NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the Emergence of Induction Heads for In-Context Learning

Tiberiu Musat, Tiago Pimentel, Lorenzo Noci, Alessandro Stolfo, Mrinmaya Sachan, Thomas Hofmann · DOI

Introduction

Large Language Models (LLMs) exhibit a remarkable capability known as In-Context Learning (ICL), where they adapt to new tasks provided in a prompt without explicit weight updates. While mechanistic interpretability has identified "induction heads"—specific neural circuits that recognize and copy patterns—as the primary drivers of ICL, the process by which these circuits emerge during training has remained a "black box." This research provides a rigorous theoretical framework to model the birth of these circuits, demonstrating that they develop in a predictable three-step sequence and that their formation time scales quadratically with context length.

The Induction Task and Model Setup

To study these dynamics, the researchers utilized a synthetic ICL task. The model is presented with a sequence of random item-label pairs $(a_1, b_1, a_2, b_2, \dots)$ followed by a query item $a_q$. The objective is to predict the corresponding label $b_q$ by identifying the previous occurrence of $a_q$ in the context.

The study employs a "disentangled Transformer" architecture, which simplifies information flow by concatenating rather than adding to the residual stream. Crucially, the authors proved that the training dynamics for this task are constrained to a low-dimensional subspace. This allowed them to reduce the complex weight matrices to a "3-parameter model" consisting of:

  1. $\gamma_3$: The output layer's capacity to produce the retrieved label.
  2. $\beta_2$: The second layer's ability to attend to the correct label.
  3. $\alpha_3$: The first layer's ability to associate a label with its preceding item.

Sequential Emergence of the Induction Circuit

A key finding of the paper is that induction heads do not appear instantaneously. Instead, they emerge through a "sequential click" of these three parameters. Initially, the model learns a general baseline ($\gamma_3$). Subsequently, the second layer begins to attend to labels ($\beta_2$), and finally, the first layer masters the precise previous-token mapping ($\alpha_3$).

Figure 5: Sequential emergence of the three key parameters ($\alpha_3, \beta_2, \gamma_3$) during training.

This sequential development explains the "phase transitions" often observed in Transformer training, where performance on ICL tasks suddenly improves after a long period of stagnation. The loss only plummets once all three components of the circuit are sufficiently developed.

Theoretical and Empirical Results

The researchers derived a formal asymptotic bound for the emergence time of ICL, $t_{ICL} = \Theta(N^2)$, where $N$ is the context length. This quadratic penalty suggests that training models to perform ICL on significantly longer sequences is disproportionately more difficult.

Visual analysis of the learned weights confirms the theoretical model. The weights $W^{(1)}, W^{(2)},$ and $W^{(3)}$ naturally organize into diagonal and sub-diagonal structures. These structures represent the physical manifestation of the induction circuit: the model learns to "look back" at specific relative positions to solve the task.

Figure 3: Visualization of learned weight matrices showing the structural formation of the induction circuit.

Conclusion and Future Directions

This work provides a foundational understanding of how Transformers "learn to learn." While the study used a simplified attention-only architecture and synthetic data, the results were empirically validated on standard Transformers. Future research may explore how real-world data properties, such as "burstiness" (the clustering of words), might accelerate the emergence of these circuits by reducing the effective context length. Additionally, investigating how models learn semantic associations beyond exact identity matching remains a promising avenue for understanding the full scope of LLM capabilities.

Summary updated

BibTeX
@misc{musat2025emergence,
  author = {Tiberiu Musat and Tiago Pimentel and Lorenzo Noci and Alessandro Stolfo and Mrinmaya Sachan and Thomas Hofmann},
  title = {{On the Emergence of Induction Heads for In-Context Learning}},
  year = {2025},
  eprint = {2511.01033},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.01033},
}
Figure