mlsanityData to 7 Oct 2026

Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers

arXiv 2409.10559 ↗First posted 9 Sep 2024cs.LG cs.AI cs.CLcited by 46

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 23; 2026: 16.

46 papers.

Sort:

By area:

  1. 2025A Survey on Latent Reasoningcited by 71
  2. 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
  3. 2025When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformerscited by 38
  4. 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
  5. 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
  6. 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
  7. 2024Toward Understanding In-context vs. In-weight Learningcited by 19
  8. 2025Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Pointscited by 15
  9. 2025Why and How LLMs Hallucinate: Connecting the Dots with Subsequence Associationscited by 14
  10. 2025Context parroting: A simple but tough-to-beat baseline for foundation models in scientific machine learningcited by 14
  11. 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scalecited by 13
  12. 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
34 more
  1. 2024KV Shifting Attention Enhances Language Modelingcited by 7
  2. 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
  3. 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformerscited by 6
  4. 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 5
  5. 2025Scaling sparse feature circuit finding for in-context learningcited by 5
  6. 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 4
  7. 2025Provable Benefit of Curriculum in Transformer Tree-Reasoning Post-Trainingcited by 4
  8. 2025On the Emergence of Induction Heads for In-Context Learningcited by 3
  9. 2025Induction Signatures Are Not Enough: A Matched-Compute Study of Load-Bearing Structure in In-Context Learningcited by 2
  10. 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
  11. 2025Transformers Provably Learn Directed Acyclic Graphs via Kernel-Guided Mutual Informationcited by 2
  12. 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 2
  13. 2026Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnosticscited by 2
  14. 2024Universal Response and Emergence of Induction in LLMscited by 1
  15. 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separationcited by 1
  16. 2025Towards Understanding Transformers in Learning Random Walkscited by 1
  17. 2026Incremental Learning of Sparse Attention Patterns in Transformerscited by 1
  18. 2026Hierarchical Latent Structures in Data Generation Process Unify Mechanistic Phenomena across Scalecited by 1
  19. 2026Visual prompting reimagined: The power of the Activation Promptscited by 1
  20. 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
  21. 2026Convergent Stochastic Training of Multi-Headed Attention and Understanding LoRAcited by 1
  22. 2026Fine-Tuning Dynamics of In-Context Factual Recall in Transformerscited by 1
  23. 2024Rethinking Associative Memory Mechanism in Induction Headcited by 0
  24. 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Contextcited by 0
  25. 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functionscited by 0
  26. 2025In-Context Learning Without Copyingcited by 0
  27. 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Inductioncited by 0
  28. 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encodingcited by 0
  29. 2026How Transformers Learn to Plan via Multi-Token Predictioncited by 0
  30. 2026Induction Heads Interpolate N-Gramscited by 0
  31. 2026A Minimal Interpretable Architecture for Zero-Shot Reconstruction of Dynamical Systemscited by 0
  32. 2026Align, Unify, Suppress, Route: A Coherentist View of Transformer Computationcited by 0
  33. 2026Rethinking Contextualization by Reinterpreting Attention Head Channelscited by 0
  34. 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learningcited by 0