mlsanityData to 7 Oct 2026

Approximating How Single Head Attention Learns

arXiv 2103.07601 ↗First posted 13 Mar 2021cs.CL cs.AIcited by 38

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  3. 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,597
  4. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  5. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
  6. 2019Attention is not Explanationcited by 916
  7. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  8. 2019Are Sixteen Heads Really Better than One?cited by 803
  9. 2019Attention is not not Explanationcited by 629
  10. 2019Designing and Interpreting Probes with Control Taskscited by 608
  11. 2019Is Attention Interpretable?cited by 387
  12. 2016Multi30K: Multilingual English-German Image Descriptionscited by 250
9 more
  1. 2019A Tail-Index Analysis of Stochastic Gradient Noise in Deep Neural Networkscited by 213
  2. 2018Algorithmic Regularization in Learning Deep Homogeneous Models: Layers are Automatically Balancedcited by 172
  3. 2019On Identifiability in Transformerscited by 115
  4. 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
  5. 2019Learning to Deceive with Attention-Based Explanationscited by 111
  6. 2019Attention Interpretability Across NLP Taskscited by 71
  7. 2018Seq2Seq-Vis: A Visual Debugging Tool for Sequence-to-Sequence Modelscited by 69
  8. 2019Fine-grained Sentiment Analysis with Faithful Attentioncited by 23
  9. 2017Analogs of Linguistic Structure in Deep Representationscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 2; 2022: 2; 2023: 24; 2024: 6; 2025: 2; 2026: 2.

38 papers.

Sort:

By area:

  1. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  2. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  3. 2023Birth of a Transformer: A Memory Viewpointcited by 154
  4. 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
  5. 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
  6. 2022Vision Transformers provably learn spatial structurecited by 92
  7. 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
  8. 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexitycited by 77
  9. 2023Max-Margin Token Selection in Attention Mechanismcited by 57
  10. 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
  11. 2023Attention Scheme Inspired Softmax Regressioncited by 49
  12. 2023An Over-parameterized Exponential Regressioncited by 45
26 more
  1. 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 45
  2. 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
  3. 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
  4. 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lenscited by 39
  5. 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
  6. 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
  7. 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
  8. 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
  9. 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
  10. 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamicscited by 27
  11. 2021Fast Contextual Adaptation with Neural Associative Memory for On-Device Personalized Speech Recognitioncited by 25
  12. 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
  13. 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
  14. 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
  15. 2023On the Convergence of Encoder-only Shallow Transformerscited by 13
  16. 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layerscited by 12
  17. 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
  18. 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
  19. 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamicscited by 9
  20. 2023Solving Tensor Low Cycle Rank Approximationcited by 8
  21. 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priorscited by 8
  22. 2023The Expressibility of Polynomial based Attention Schemecited by 7
  23. 2023Convergence of Two-Layer Regression with Nonlinear Unitscited by 6
  24. 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
  25. 2026Incremental Learning of Sparse Attention Patterns in Transformerscited by 1
  26. 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-trainingcited by 0