Approximating How Single Head Attention Learns
Not on the map. Why?
Abstract (arXiv)
Why do models often attend to salient words, and how does this evolve throughout training? We approximate model training as a two stage process: early on in training when the attention weights are uniform, the model learns to translate individual input word `i` to `o` if they co-occur frequently. Later, the model learns to attend to `i` while the correct output is o because it knows `i` translates to `o`. To formalize, we define a model property, Knowledge to Translate Individual Words (KTIW) (e.g. knowing that `i` translates to `o`), and claim that it drives the learning of the attention. This claim is supported by the fact that before the attention mechanism is learned, KTIW can be learned from word co-occurrence statistics, but not the other way around. Particularly, we can construct a training distribution that makes KTIW hard to learn, the learning of the attention fails, and the model cannot even learn the simple task of copying the input words to the output. Our approximation explains why models sometimes attend to salient words, and inspires a toy example where a multi-head attention model can overcome the above hard training distribution by improving learning dynamics rather than expressiveness. We end by discussing the limitation of our approximation framework and suggest future directions.
Key facts. Cited by 38 papers in the map (data through 7 Oct 2026). Builds on 21 of its 27 references that are in the map. First posted on arXiv 13 Mar 2021.
Builds on
21 of 27 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,597
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2019Attention is not Explanationcited by 916
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2019Attention is not not Explanationcited by 629
- 2019Designing and Interpreting Probes with Control Taskscited by 608
- 2019Is Attention Interpretable?cited by 387
- 2016Multi30K: Multilingual English-German Image Descriptionscited by 250
9 more
- 2019A Tail-Index Analysis of Stochastic Gradient Noise in Deep Neural Networkscited by 213
- 2018Algorithmic Regularization in Learning Deep Homogeneous Models: Layers are Automatically Balancedcited by 172
- 2019On Identifiability in Transformerscited by 115
- 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
- 2019Learning to Deceive with Attention-Based Explanationscited by 111
- 2019Attention Interpretability Across NLP Taskscited by 71
- 2018Seq2Seq-Vis: A Visual Debugging Tool for Sequence-to-Sequence Modelscited by 69
- 2019Fine-grained Sentiment Analysis with Faithful Attentioncited by 23
- 2017Analogs of Linguistic Structure in Deep Representationscited by 7
Built on by
Citing papers per year: 2021: 2; 2022: 2; 2023: 24; 2024: 6; 2025: 2; 2026: 2.
38 papers.
Sort:
By area:
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexitycited by 77
- 2023Max-Margin Token Selection in Attention Mechanismcited by 57
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2023An Over-parameterized Exponential Regressioncited by 45
26 more
- 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lenscited by 39
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Timecited by 30
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamicscited by 27
- 2021Fast Contextual Adaptation with Neural Associative Memory for On-Device Personalized Speech Recognitioncited by 25
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
- 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
- 2023On the Convergence of Encoder-only Shallow Transformerscited by 13
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layerscited by 12
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
- 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamicscited by 9
- 2023Solving Tensor Low Cycle Rank Approximationcited by 8
- 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priorscited by 8
- 2023The Expressibility of Polynomial based Attention Schemecited by 7
- 2023Convergence of Two-Layer Regression with Nonlinear Unitscited by 6
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
- 2026Incremental Learning of Sparse Attention Patterns in Transformerscited by 1
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-trainingcited by 0
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics8 Oct 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2024Understanding Factual Recall in Transformers via Associative Memories9 Dec 2024
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Time23 Aug 2024
- 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priors6 Jun 2024
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layers5 Jun 2024
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamics7 May 2024
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chains6 Feb 2024
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regression26 Nov 2023
- 2023On the Convergence of Encoder-only Shallow Transformers2 Nov 2023
26 more
- 2023The Expressibility of Polynomial based Attention Scheme30 Oct 2023
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights19 Oct 2023
- 2023Why Softmax Attention Outperforms Linear Attention18 Oct 2023
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attention1 Oct 2023
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Time14 Sep 2023
- 2023Convergence of Two-Layer Regression with Nonlinear Units16 Aug 2023
- 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lens21 Jul 2023
- 2023Zero-th Order Algorithm for Softmax Attention Optimization17 Jul 2023
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trick5 Jul 2023
- 2023Max-Margin Token Selection in Attention Mechanism23 Jun 2023
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection7 Jun 2023
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Models4 Jun 2023
- 2023Birth of a Transformer: A Memory Viewpoint1 Jun 2023
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer25 May 2023
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regression1 May 2023
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regression26 Apr 2023
- 2023Attention Scheme Inspired Softmax Regression20 Apr 2023
- 2023Solving Tensor Low Cycle Rank Approximation13 Apr 2023
- 2023An Over-parameterized Exponential Regression29 Mar 2023
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problems28 Mar 2023
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understanding7 Mar 2023
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexity12 Feb 2023
- 2022Vision Transformers provably learn spatial structure13 Oct 2022
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classes1 Aug 2022
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanisms19 Oct 2021
- 2021Fast Contextual Adaptation with Neural Associative Memory for On-Device Personalized Speech Recognition5 Oct 2021
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexitycited by 77
- 2023Max-Margin Token Selection in Attention Mechanismcited by 57
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2023An Over-parameterized Exponential Regressioncited by 45
12 most cited of 36 All 36 (JSON)
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics8 Oct 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2024Understanding Factual Recall in Transformers via Associative Memories9 Dec 2024
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Time23 Aug 2024
- 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priors6 Jun 2024
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chains6 Feb 2024
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regression26 Nov 2023
- 2023On the Convergence of Encoder-only Shallow Transformers2 Nov 2023
- 2023The Expressibility of Polynomial based Attention Scheme30 Oct 2023
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights19 Oct 2023
12 newest of 36 All 36 (JSON)