THE ORIGIN OF SELF-ATTENTION: FROM PAIRWISE AFFINITY MATRICES TO TRANSFORMERS

The self-attention mechanism, now central to deep learning architectures such as Transformers, represents a modern instantiation of a broader computational principle: learning and leveraging pairwise affinity matrices to modulate information flow. This paper traces the conceptual lineage of self-attention across domains—vision, language, and graph learning - through the shared structure of an affinity matrix A. In particular, we spotlight Infinite Feature Selection (Inf-FS) as a foundational framework that generalizes the notion of affinity-based weighting. Unlike the fixed dot-product formulation in Transformers, Inf-FS defines A flexibly—either handcrafted or learned—and computes feature importance through multi-hop propagation over the affinity graph. Methodologically, this positions Inf-FS as a superset: self-attention arises as a specific case where A is parameterized via learned token similarities and applied in a single-hop fashion. We argue that the core structure—reasoning over pairwise relationships—is conserved, and the main distinction lies in how A is constructed and utilized. By reframing self-attention within the broader paradigm of affinity-based computation, we unify disparate threads in machine learning and underscore a shared mathematical foundation that transcends task or architecture.<br>

Publication Details

Journal
Figshare
Published
2025-07-20
DOI
https://doi.org/10.6084/m9.figshare.29605208
Primary Topic
Advanced Graph Neural Networks
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

THE ORIGIN OF SELF-ATTENTION: FROM PAIRWISE AFFINITY MATRICES TO TRANSFORMERS

Figshare
Advanced Graph Neural Networks
article

THE ORIGIN OF SELF-ATTENTION: FROM PAIRWISE AFFINITY MATRICES TO TRANSFORMERS

article en

Abstract

The self-attention mechanism, now central to deep learning architectures such as Transformers, represents a modern instantiation of a broader computational principle: learning and leveraging pairwise affinity matrices to modulate information flow. This paper traces the conceptual lineage of self-attention across domains—vision, language, and graph learning - through the shared structure of an affinity matrix A. In particular, we spotlight Infinite Feature Selection (Inf-FS) as a foundational framework that generalizes the notion of affinity-based weighting. Unlike the fixed dot-product formulation in Transformers, Inf-FS defines A flexibly—either handcrafted or learned—and computes feature importance through multi-hop propagation over the affinity graph. Methodologically, this positions Inf-FS as a superset: self-attention arises as a specific case where A is parameterized via learned token similarities and applied in a single-hop fashion. We argue that the core structure—reasoning over pairwise relationships—is conserved, and the main distinction lies in how A is constructed and utilized. By reframing self-attention within the broader paradigm of affinity-based computation, we unify disparate threads in machine learning and underscore a shared mathematical foundation that transcends task or architecture.<br>

Figshare
Openalex Percentile: Top 74%
Advanced Graph Neural Networks
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.