Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL) is a cornerstone of large language model (LLM) functionality, yet its theoretical foundations remain elusive due to the complexity of transformer architectures. In particular, most existing work only theoretically explains how the attention mechanism facilitates ICL under certain data models. It remains unclear how the other building blocks of the transformer contribute to ICL. To address this question, we study how a two-attention-layer transformer is trained to perform ICL on n-gram Markov chain data, where each token in the Markov chain statistically depends on the previous n tokens. We analyze a sophisticated transformer model featuring relative positional embedding, multi-head softmax attention, and a feed-forward layer with normalization. We prove that the gradient flow with respect to a cross-entropy ICL loss converges to a limiting model that performs a generalized version of the induction head mechanism with a learned feature, resulting from the congruous contribution of all the building blocks. In the limiting model, the first attention layer acts as a mathitcopier, copying past tokens within a given window to each position, and the feed-forward network with normalization acts as a mathitselector that generates a feature vector by only looking at informationally relevant parents from the window. Finally, the second attention layer is a mathitclassifier that compares these features with the feature at the output position, and uses the resulting similarity scores to generate the desired output. Our theory is further validated by experiments.
Key facts. Cited by 46 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Sep 2024.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2024: 7; 2025: 23; 2026: 16.
46 papers.
Sort:
By area:
- 2025A Survey on Latent Reasoningcited by 71
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2025When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformerscited by 38
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
- 2024Toward Understanding In-context vs. In-weight Learningcited by 19
- 2025Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Pointscited by 15
- 2025Why and How LLMs Hallucinate: Connecting the Dots with Subsequence Associationscited by 14
- 2025Context parroting: A simple but tough-to-beat baseline for foundation models in scientific machine learningcited by 14
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scalecited by 13
- 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
34 more
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformerscited by 6
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 5
- 2025Scaling sparse feature circuit finding for in-context learningcited by 5
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 4
- 2025Provable Benefit of Curriculum in Transformer Tree-Reasoning Post-Trainingcited by 4
- 2025On the Emergence of Induction Heads for In-Context Learningcited by 3
- 2025Induction Signatures Are Not Enough: A Matched-Compute Study of Load-Bearing Structure in In-Context Learningcited by 2
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
- 2025Transformers Provably Learn Directed Acyclic Graphs via Kernel-Guided Mutual Informationcited by 2
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 2
- 2026Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnosticscited by 2
- 2024Universal Response and Emergence of Induction in LLMscited by 1
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separationcited by 1
- 2025Towards Understanding Transformers in Learning Random Walkscited by 1
- 2026Incremental Learning of Sparse Attention Patterns in Transformerscited by 1
- 2026Hierarchical Latent Structures in Data Generation Process Unify Mechanistic Phenomena across Scalecited by 1
- 2026Visual prompting reimagined: The power of the Activation Promptscited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
- 2026Convergent Stochastic Training of Multi-Headed Attention and Understanding LoRAcited by 1
- 2026Fine-Tuning Dynamics of In-Context Factual Recall in Transformerscited by 1
- 2024Rethinking Associative Memory Mechanism in Induction Headcited by 0
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Contextcited by 0
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functionscited by 0
- 2025In-Context Learning Without Copyingcited by 0
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Inductioncited by 0
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encodingcited by 0
- 2026How Transformers Learn to Plan via Multi-Token Predictioncited by 0
- 2026Induction Heads Interpolate N-Gramscited by 0
- 2026A Minimal Interpretable Architecture for Zero-Shot Reconstruction of Dynamical Systemscited by 0
- 2026Align, Unify, Suppress, Route: A Coherentist View of Transformer Computationcited by 0
- 2026Rethinking Contextualization by Reinterpreting Attention Head Channelscited by 0
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learningcited by 0
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learning29 Sep 2026
- 2026Rethinking Contextualization by Reinterpreting Attention Head Channels27 Sep 2026
- 2026Align, Unify, Suppress, Route: A Coherentist View of Transformer Computation22 Aug 2026
- 2026A Minimal Interpretable Architecture for Zero-Shot Reconstruction of Dynamical Systems16 Jul 2026
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026Fine-Tuning Dynamics of In-Context Factual Recall in Transformers26 May 2026
- 2026Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnostics19 May 2026
- 2026Convergent Stochastic Training of Multi-Headed Attention and Understanding LoRA8 May 2026
- 2026How Transformers Learn to Plan via Multi-Token Prediction13 Apr 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2026Visual prompting reimagined: The power of the Activation Prompts7 Apr 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
34 more
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Hierarchical Latent Structures in Data Generation Process Unify Mechanistic Phenomena across Scale4 Feb 2026
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformers21 Dec 2025
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Provable Benefit of Curriculum in Transformer Tree-Reasoning Post-Training10 Nov 2025
- 2025In-Context Learning Without Copying7 Nov 2025
- 2025On the Emergence of Induction Heads for In-Context Learning2 Nov 2025
- 2025Transformers Provably Learn Directed Acyclic Graphs via Kernel-Guided Mutual Information29 Oct 2025
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scale28 Oct 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?1 Oct 2025
- 2025Induction Signatures Are Not Enough: A Matched-Compute Study of Load-Bearing Structure in In-Context Learning26 Sep 2025
- 2025Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Points18 Aug 2025
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Context5 Aug 2025
- 2025A Survey on Latent Reasoning8 Jul 2025
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Fly24 Jun 2025
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilities27 May 2025
- 2025Context parroting: A simple but tough-to-beat baseline for foundation models in scientific machine learning16 May 2025
- 2025Scaling sparse feature circuit finding for in-context learning18 Apr 2025
- 2025Why and How LLMs Hallucinate: Connecting the Dots with Subsequence Associations17 Apr 2025
- 2025When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformers15 Apr 2025
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thought28 Feb 2025
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?19 Feb 2025
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separation12 Feb 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024Rethinking Associative Memory Mechanism in Induction Head16 Dec 2024
- 2024KV Shifting Attention Enhances Language Modeling29 Nov 2024
- 2024Universal Response and Emergence of Induction in LLMs11 Nov 2024
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-context4 Nov 2024
- 2024Toward Understanding In-context vs. In-weight Learning30 Oct 2024
- 2024How Transformers Get Rich: Approximation and Dynamics Analysis15 Oct 2024
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learning18 Sep 2024
- 2025A Survey on Latent Reasoningcited by 71
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
- 2025Provable Benefit of Curriculum in Transformer Tree-Reasoning Post-Trainingcited by 4
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 2
- 2024Rethinking Associative Memory Mechanism in Induction Headcited by 0
- 2026Rethinking Contextualization by Reinterpreting Attention Head Channelscited by 0
- 2026Rethinking Contextualization by Reinterpreting Attention Head Channels27 Sep 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2025Provable Benefit of Curriculum in Transformer Tree-Reasoning Post-Training10 Nov 2025
- 2025A Survey on Latent Reasoning8 Jul 2025
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thought28 Feb 2025
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?19 Feb 2025
- 2024Rethinking Associative Memory Mechanism in Induction Head16 Dec 2024
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
- 2024Toward Understanding In-context vs. In-weight Learningcited by 19
- 2025Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Pointscited by 15
- 2025Why and How LLMs Hallucinate: Connecting the Dots with Subsequence Associationscited by 14
- 2025Context parroting: A simple but tough-to-beat baseline for foundation models in scientific machine learningcited by 14
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scalecited by 13
- 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformerscited by 6
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 5
12 most cited of 37 All 37 (JSON)
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learning29 Sep 2026
- 2026Align, Unify, Suppress, Route: A Coherentist View of Transformer Computation22 Aug 2026
- 2026A Minimal Interpretable Architecture for Zero-Shot Reconstruction of Dynamical Systems16 Jul 2026
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026Fine-Tuning Dynamics of In-Context Factual Recall in Transformers26 May 2026
- 2026Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnostics19 May 2026
- 2026Convergent Stochastic Training of Multi-Headed Attention and Understanding LoRA8 May 2026
- 2026How Transformers Learn to Plan via Multi-Token Prediction13 Apr 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2026Visual prompting reimagined: The power of the Activation Prompts7 Apr 2026
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
12 newest of 37 All 37 (JSON)