The Geometric and Algebraic Structure of Transformer Attention

This paper develops a unified geometric and algebraic analysis of the attention mechanism in Transformer architectures. The central observation is that, given a token embedding matrix $X\in R^{N\times d}$, every similarity matrix producible by a single attention head lies inside a nested hierarchy $\mathcal{V}(d_k)(\mathbf{X}) \subset \mathcal{V} (\mathbf{X}) \subset \mathbb{R}^{N \times N}$ is a vector subspace of dimension at most $r^2$ (with $r=rk(X)$) and $V^{(d_k)}(X)$ is its intersection with the rank-$d_k$ determinantal variety. From this structure we derive results of three kinds. \emph{Principal contributions}: (i) a matching necessary-and-sufficient \emph{discriminability theorem} showing that the minimum number of attention heads achievable by some choice of query projections is exactly $\lceil d/d_k\rceil$, providing an \emph{a priori} structural justification for the standard design $h\cdot d_k=d$ that complements the capacity-based account and addresses the gap; (ii) a tighter effective-rank version $\lceil r/d_k\rceil$ when $rk(X)=r<d$; (iii) an exact characterization $dimV(X)=r^2$ and a structural capacity bound on the family of attention operators that is independent of $N$, $d$, and $H$. Consistency checks with the established literature: we recover, within the geometric framework, the asymmetric-kernel view of , the relative-distance property of Rotary Position Embedding, and the gradient-stability advantage of Pre-LN over Post-LN. We are explicit about which results are new and which are reformulations. All theorems are accompanied by numerical experiments confirming that the predicted bounds are tight.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-05-22
DOI
https://doi.org/10.5281/zenodo.20348686
Primary Topic
Advanced Memory and Neural Computing
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

The Geometric and Algebraic Structure of Transformer Attention

Guillermo Blas Sentoni
Zenodo (CERN European Organization for Nuclear Research)
Advanced Memory and Neural Computing
preprint

The Geometric and Algebraic Structure of Transformer Attention

Guillermo Blas Sentoni
preprint en

Abstract

This paper develops a unified geometric and algebraic analysis of the attention mechanism in Transformer architectures. The central observation is that, given a token embedding matrix $X\in R^{N\times d}$, every similarity matrix producible by a single attention head lies inside a nested hierarchy $\mathcal{V}(d_k)(\mathbf{X}) \subset \mathcal{V} (\mathbf{X}) \subset \mathbb{R}^{N \times N}$ is a vector subspace of dimension at most $r^2$ (with $r=rk(X)$) and $V^{(d_k)}(X)$ is its intersection with the rank-$d_k$ determinantal variety. From this structure we derive results of three kinds. \emph{Principal contributions}: (i) a matching necessary-and-sufficient \emph{discriminability theorem} showing that the minimum number of attention heads achievable by some choice of query projections is exactly $\lceil d/d_k\rceil$, providing an \emph{a priori} structural justification for the standard design $h\cdot d_k=d$ that complements the capacity-based account and addresses the gap; (ii) a tighter effective-rank version $\lceil r/d_k\rceil$ when $rk(X)=r<d$; (iii) an exact characterization $dimV(X)=r^2$ and a structural capacity bound on the family of attention operators that is independent of $N$, $d$, and $H$. Consistency checks with the established literature: we recover, within the geometric framework, the asymmetric-kernel view of , the relative-distance property of Rotary Position Embedding, and the gradient-stability advantage of Pre-LN over Post-LN. We are explicit about which results are new and which are reformulations. All theorems are accompanied by numerical experiments confirming that the predicted bounds are tight.

Zenodo (CERN European Organization for Nuclear Research)
Universidad Nacional de La Matanza (AR)
Reduced inequalities
Advanced Memory and Neural Computing
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.

The Geometric and Algebraic Structure of Transformer Attention — Guillermo Blas Sentoni · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS