Clustering in pure-attention hardmax transformers and its role in sentiment analysis
Not on the map. Why?
Abstract (arXiv)
Transformers are extremely successful machine learning models whose mathematical properties remain poorly understood. Here, we rigorously characterize the behavior of transformers with hardmax self-attention and normalization sublayers as the number of layers tends to infinity. By viewing such transformers as discrete-time dynamical systems describing the evolution of points in a Euclidean space, and thanks to a geometric interpretation of the self-attention mechanism based on hyperplane separation, we show that the transformer inputs asymptotically converge to a clustered equilibrium determined by special points called textitleaders. We then leverage this theoretical understanding to solve sentiment analysis problems from language processing using a fully interpretable transformer model, which effectively captures `context' by clustering meaningless words around leader words carrying the most meaning. Finally, we outline remaining challenges to bridge the gap between the mathematical analysis of transformers and their real-life implementation.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 28 of its 46 references that are in the map. First posted on arXiv 26 Jun 2024.
Builds on
28 of 46 references.
References · 28
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2023GPT-4 Technical Reportcited by 18,132
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,094
- 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 3,972
- 2018Neural Ordinary Differential Equationscited by 3,733
- 2020Taming Transformers for High-Resolution Image Synthesiscited by 3,229
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
16 more
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2020Generative Language Modeling for Automated Theorem Provingcited by 379
- 2018Molecular Transformer - A Model for Uncertainty-Calibrated Chemical Reaction Predictioncited by 225
- 2023A mathematical perspective on Transformerscited by 160
- 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 136
- 2023The emergence of clusters in self-attention dynamicscited by 133
- 2019Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of Viewcited by 108
- 2019Deep Learning via Dynamical Systems: An Approximation Perspectivecited by 78
- 2021Neural ODE control for classification, approximation and transportcited by 56
- 2023Sumformer: Universal Approximation for Efficient Transformerscited by 30
- 2019Effects of padding on LSTMs and CNNscited by 22
- 2022On the infinite-depth limit of finite-width neural networkscited by 22
- 2019Infinitely deep neural networks as diffusion processescited by 21
- 2022Turnpike in optimal control of PDEs, ResNets, and beyondcited by 10
- 2020Doubly infinite residual neural networks: a diffusion process approachcited by 4
- 2021A deep language model to predict metabolic network equilibriacited by 3
Built on by
Citing papers per year: 2024: 2; 2025: 8; 2026: 5.
15 papers.
Sort:
By area:
- 2024Dynamic metastability in the self-attention modelcited by 42
- 2024Measure-to-measure interpolation using Transformerscited by 28
- 2025A multiscale analysis of mean-field transformers in the moderate interaction regimecited by 24
- 2025The Mean-Field Dynamics of Transformerscited by 24
- 2026Perceptrons and localization of attention's mean-field landscapecited by 7
- 2025Attention-Only Transformers via Unrolled Subspace Denoisingcited by 5
- 2025Exact Sequence Interpolation with Transformerscited by 2
- 2025Localmax dynamics for attention in transformers and its asymptotic behaviorcited by 2
- 2025Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encodingcited by 2
- 2026Random Quadratic Form on a Sphere: Synchronization by Common Noisecited by 2
- 2025Control, Optimal Transport and Neural Differential Equations in Supervised Learningcited by 1
- 2025Machine Learning and Control: Foundations, Advances, and Perspectivescited by 0
- 2026The Attention Within: Consensus Dynamics in Selective State Space Models16 Sep 2026
- 2026Interior interpretability with attention rollout: contraction and propagation profiles in Transformers24 Jul 2026
- 2026Reachability and asymptotics of Gaussian Transformer dynamics29 May 2026
- 2026Random Quadratic Form on a Sphere: Synchronization by Common Noise6 Mar 2026
- 2026Perceptrons and localization of attention's mean-field landscape29 Jan 2026
- 2025The Mean-Field Dynamics of Transformers1 Dec 2025
- 2025Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encoding25 Nov 2025
- 2025Machine Learning and Control: Foundations, Advances, and Perspectives30 Sep 2025
- 2025A multiscale analysis of mean-field transformers in the moderate interaction regime29 Sep 2025
- 2025Localmax dynamics for attention in transformers and its asymptotic behavior19 Sep 2025
- 2025Attention-Only Transformers via Unrolled Subspace Denoising4 Jun 2025
- 2025Control, Optimal Transport and Neural Differential Equations in Supervised Learning19 Mar 2025
3 more
- 2025Exact Sequence Interpolation with Transformers4 Feb 2025
- 2024Measure-to-measure interpolation using Transformers7 Nov 2024
- 2024Dynamic metastability in the self-attention model9 Oct 2024
- 2024Dynamic metastability in the self-attention modelcited by 42
- 2024Measure-to-measure interpolation using Transformerscited by 28
- 2025A multiscale analysis of mean-field transformers in the moderate interaction regimecited by 24
- 2025The Mean-Field Dynamics of Transformerscited by 24
- 2026Perceptrons and localization of attention's mean-field landscapecited by 7
- 2025Attention-Only Transformers via Unrolled Subspace Denoisingcited by 5
- 2025Exact Sequence Interpolation with Transformerscited by 2
- 2025Localmax dynamics for attention in transformers and its asymptotic behaviorcited by 2
- 2025Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encodingcited by 2
- 2026Random Quadratic Form on a Sphere: Synchronization by Common Noisecited by 2
- 2025Control, Optimal Transport and Neural Differential Equations in Supervised Learningcited by 1
- 2025Machine Learning and Control: Foundations, Advances, and Perspectivescited by 0
12 most cited of 14 All 14 (JSON)
- 2026Interior interpretability with attention rollout: contraction and propagation profiles in Transformers24 Jul 2026
- 2026Reachability and asymptotics of Gaussian Transformer dynamics29 May 2026
- 2026Random Quadratic Form on a Sphere: Synchronization by Common Noise6 Mar 2026
- 2026Perceptrons and localization of attention's mean-field landscape29 Jan 2026
- 2025The Mean-Field Dynamics of Transformers1 Dec 2025
- 2025Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encoding25 Nov 2025
- 2025Machine Learning and Control: Foundations, Advances, and Perspectives30 Sep 2025
- 2025A multiscale analysis of mean-field transformers in the moderate interaction regime29 Sep 2025
- 2025Localmax dynamics for attention in transformers and its asymptotic behavior19 Sep 2025
- 2025Attention-Only Transformers via Unrolled Subspace Denoising4 Jun 2025
- 2025Control, Optimal Transport and Neural Differential Equations in Supervised Learning19 Mar 2025
- 2025Exact Sequence Interpolation with Transformers4 Feb 2025
12 newest of 14 All 14 (JSON)