How Transformers Get Rich: Approximation and Dynamics Analysis
Not on the map. Why?
Abstract (arXiv)
Transformers have demonstrated exceptional in-context learning capabilities, yet the theoretical understanding of the underlying mechanisms remains limited. A recent work (Elhage et al., 2021) identified a ``rich'' in-context mechanism known as induction head, contrasting with ``lazy'' n-gram models that overlook long-range dependencies. In this work, we provide both approximation and dynamics analyses of how transformers implement induction heads. In the em approximation analysis, we formalize both standard and generalized induction head mechanisms, and examine how transformers can efficiently implement them, with an emphasis on the distinct role of each transformer submodule. For the em dynamics analysis, we study the training dynamics on a synthetic mixed target, composed of a 4-gram and an in-context 2-gram component. This controlled setting allows us to precisely characterize the entire training process and uncover an em abrupt transition from lazy (4-gram) to rich (induction head) mechanisms as training progresses.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 51 of its 67 references that are in the map. First posted on arXiv 15 Oct 2024.
Builds on
51 of 67 references.
References · 51
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2016Understanding intermediate layers using linear classifier probescited by 1,279
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2017Nonparametric regression using deep neural networks with ReLU activation functioncited by 431
38 more
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2023Looped Transformers as Programmable Computerscited by 224
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2021Thinking Like Transformerscited by 182
- 2018Algorithmic Regularization in Learning Deep Homogeneous Models: Layers are Automatically Balancedcited by 172
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2023In-Context Convergence of Transformerscited by 112
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2020Towards a Mathematical Understanding of Neural Network-Based Machine Learning: what we know and what we don'tcited by 94
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2018A Priori Estimates of the Population Risk for Two-layer Neural Networkscited by 76
- 2024Transformers, parallel computation, and logarithmic depthcited by 75
- 2024Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimalitycited by 71
- 2023Transformers as Support Vector Machinescited by 67
- 2023Max-Margin Token Selection in Attention Mechanismcited by 57
- 2023On Learning Gaussian Multi-index Models with Gradient Flowcited by 53
- 2023Transformers learn through gradual rank increasecited by 52
- 2024Induction Heads as an Essential Mechanism for Pattern Matching in In-context Learningcited by 46
- 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 46
- 2024Implicit Bias and Fast Convergence Rates for Self-attentioncited by 31
- 2024One-layer transformers fail to solve the induction heads taskcited by 30
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 26
- 2024Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modelingcited by 25
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 21
- 2024What Can Transformer Learn with Varying Depth? Case Studies on Sequence Learning Taskscited by 19
- 2021Optimization-Based Separations for Neural Networkscited by 17
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2024: 1; 2025: 3; 2026: 3.
7 papers.
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scalecited by 13
- 2025An explainable transformer circuit for compositional generalizationcited by 8
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 5
- 2026Structure Before Collapse: Transient semantic geometry in next-token predictioncited by 2
- 2026Ability Transfer and Recovery via Modularized Parameters Localizationcited by 0
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Inductioncited by 0
- 2026Structure Before Collapse: Transient semantic geometry in next-token prediction25 Jun 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Ability Transfer and Recovery via Modularized Parameters Localization14 Jan 2026
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scale28 Oct 2025
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformers16 Jun 2025
- 2025An explainable transformer circuit for compositional generalization19 Feb 2025
- 2024KV Shifting Attention Enhances Language Modeling29 Nov 2024