Olsson, Elhage, Nanda et al. (Anthropic, Transformer Circuits Thread, 8 March 2022) track 34 transformers, from one-layer models to 13 billion parameters, each trained once. In every model with more than one layer, induction heads form in the same narrow window early in training (roughly 2.5 to 5 billion tokens) in which the in-context learning score jumps from under 0.15 to about 0.4 nats, a phase change that also leaves a bump in the loss curve. Ablating induction heads in small attention-only models removes almost all of that score, and an architecture change that lets them form earlier moves the jump with them. For large models the case is correlational: no ablations were run there, and the authors call their evidence "preliminary and indirect".
Language models get better at predicting text the further they read into a document: the later tokens of a passage are easier to predict than the early ones, because the model can use what it has already seen. This ability, in-context learning, is what lets a prompt teach a model a task without changing its weights. What mechanism inside the model produces it? The previous paper on the Transformer Circuits Thread, A Mathematical Framework for Transformer Circuits, had found induction heads in two-layer attention-only models; this paper's introduction says that work showed they implement pattern copying and "appear to be the primary source of in-context learning" there. This paper, published on 8 March 2022, asks whether the same is true of real language models with many layers and MLP layers, where reverse engineering from the weights is not yet possible. The authors describe their evidence as "preliminary and indirect evidence for a tantalizing hypothesis" (Introduction): that induction heads, in a looser, fuzzier form, might implement the majority of in-context learning in large transformers. The paper is unusual in how openly it grades its own evidence, with a table for each argument rating its strength for small and large models.
Terms used in this note
- In-context learning score. The paper's measure of in-context learning: the average loss on the 500th token of a context minus the average loss on the 50th token, over 10,000 examples of 512 tokens (section "In-context Learning"). Written that way the score is negative; Argument 1 writes it the other way round (50th minus 500th) and reports it as a positive amount, as this note does. Loss is measured in nats (natural-log units). Later work calls this quantity the "token-loss difference", to keep it apart from accuracy on few-shot tasks. The paper follows Kaplan et al. (2020) in treating in-context learning as falling loss with position in the context, rather than as success on a set of few-shot tasks, because this is more general and does not depend on a choice of tasks.
- Induction head. Defined in this paper by behavior, on a sequence of random tokens that repeats: a head that attends from the current token back to the token that followed the current token's earlier occurrence (prefix matching) and raises the logit of the token it attends to (copying) (section "Induction Heads"). In the earlier paper's terms, it completes "[A][B] … [A]" with "[B]". Mechanically, in small models it works together with a previous-token head in an earlier layer.
- Phase change. The authors' name for an abrupt change during training that shows up both in large-scale measurements (loss, in-context learning) and in internal structure (induction heads), by loose analogy with ice melting.
- Ablation. Removing one attention head's contribution at test time and measuring what changes, like a gene knockout. The paper mostly uses a pattern-preserving ablation that zeroes the head's output while keeping every head's attention pattern as it was in an unablated run (appendix "Per-token losses (attention head ablations)").
- Per-token loss vector and PCA. For each saved snapshot of a model, the losses on a fixed set of 10,000 tokens, one from each of 10,000 examples, form a vector; principal component analysis of these vectors across snapshots and models shows how models' predictions move over training (section "Per-Token Loss Analysis").
What the paper does
The models
The analysis covers 34 decoder-only transformers, each trained once, with many snapshots saved during training, and more than 50,000 single-head ablations (Introduction and section "Model Analysis Table"). Because each model was trained once, the paper reports no variation across training runs:
- Small attention-only models, 1 to 6 layers, without MLP layers;
- Small models with MLPs, 1 to 6 layers;
- Full-scale models, from 4 layers and 13 million non-embedding parameters to 40 layers and 13 billion, from the same family as the models in A General Language Assistant as a Laboratory for Alignment;
- Smeared-key models, an architectural variant described below, at one and two layers, each with a matched control.
The small models have a residual stream of width 768, 12 heads per layer and an 8,192-token context, and were trained for 10,000 steps (about 10 billion tokens) with 200 snapshots, one every 50 steps (section "Model Details"). The full-scale models have only 14 or 15 snapshots each, spaced exponentially. The training data was filtered Common Crawl, internet books and smaller sources including about 10% Python code; a second set of small models was trained on internet books only, to check that the results do not depend on the dataset. Ablations were run only on the small models; a footnote notes that the cost of a full set of ablations grows faster than model size.
Measurements
For each snapshot the authors record per-token losses, the in-context learning score, and three scores per attention head computed on synthetic sequences: copying, prefix matching and previous-token attention (appendix "Head activation evaluators"). They also compute a weight-based measure of prefix matching drawn from the earlier paper, and validate the behavioral scores against weight-based ones in the small attention-only models.
Six arguments
The paper is organized as six arguments, each with its own strength table (section "Arguments that induction heads are the mechanism for the majority of in-context learning"):
- Co-occurrence: induction heads form at the same time in-context learning improves.
- Co-perturbation: changing the architecture so that induction heads form earlier, or at all in a one-layer model, moves the improvement in in-context learning with them.
- Ablation: removing induction heads at test time in small models greatly reduces in-context learning.
- Examples of generality: induction heads in a large model also perform more abstract tasks such as translation.
- Mechanistic plausibility: the mechanism understood in small models could naturally generalize.
- Continuity: measurements look the same from small to large models, so the simplest explanation is that the mechanism is the same.
What it finds
A phase change early in training (Argument 1)
In-context learning develops abruptly in a narrow window early in training, roughly 2.5 to 5 billion tokens, and then stays nearly constant: below 0.15 nats of in-context learning before the window, roughly 0.4 nats after, and about the same amount across model sizes, except for the one-layer model, which never develops much (section "Argument 1"). In exactly the same window:
- induction heads form, as measured by prefix-matching scores, in every model with more than one layer and never in the one-layer model;
- the training loss shows a visible "bump", the only point at which the loss curve is not convex;
- the models' trajectories in per-token-loss space turn sharply.
The authors report that the window does not appear to correspond to a scheduled change in learning rate, warmup or weight decay, and that it appears in the models trained on books only (section "Looking at the Phase Change More Closely"). The section "Model Details" adds that, in the small models, weight decay was reduced at about 5 billion tokens, past the phase change, and that the learning-rate warm-up, which ramps up over the first 1.5 billion tokens, is the only other scheduled change within the range of the phase change. On a passage of text, most of the change during the phase concerns repeated tokens: the model gets better at predicting a sequence the second time it appears, and worse at a token that breaks an earlier pattern, such as the first "Mrs Potter" after two occurrences of "Mrs Dursley". The section "Model Details" gives a slightly different window for the small models, approximately 1 to 3 billion tokens, and Argument 1 estimates that for large models the window falls about 1 to 2% of the way through training.
The authors list the confounds themselves (section "Assessing the Evidence"). Over 75% of the final in-context learning score forms in the window, which they say one might "naively" take as the share induction heads are responsible for. The full-scale models offer only 15 points in time. Something else, such as the general ability to compose heads across layers, could form at the same moment and drive both changes. And a constant score after the phase change does not mean the mechanism stays constant, since gaining the same 0.4 nats from a better starting point is probably harder. They conclude that the case is stronger for the moment of the phase change than for the end of training.
Moving the phase change by changing the architecture (Argument 2)
An induction head needs each key to carry information about the token before it, which a standard transformer can only arrange with two layers. The smeared-key variant gives every head a trainable parameter that mixes each token's key with the previous token's key, so that a single layer can express an induction head (section "Argument 2"). As the hypothesis predicts, a one-layer smeared-key model develops in-context learning, which the ordinary one-layer model does not, and a two-layer smeared-key model develops it earlier than its control. The authors rate this as medium, interventional evidence for small models, with and without MLP layers, both that induction heads contribute some in-context learning and that they contribute the majority, and as weak evidence on both counts for large models, because the change "makes a bigger difference for smaller models". The smeared-key models were trained only at one and two layers (section "Smeared key models"). They note that it does not rule out other mechanisms in larger models or a change of mechanism over training.
Ablations in small models (Argument 3)
Knocking out induction heads in small models greatly reduces the in-context learning score; in small attention-only models, "almost all" in-context learning appears to come from them, from the start of the phase change to the end of training (section "Argument 3"). A footnote reports that ablating most other heads appears to increase the score, which the authors explain as the model leaning on in-context learning for tokens it can no longer predict in other ways. The authors call the ablations "by far our strongest evidence" and conclude that induction heads are the primary mechanism for in-context learning in small attention-only models. For models with MLP layers they treat the ablation evidence that induction heads provide the majority as suggestive only, since heads and MLP layers can interact and two similar heads can mask each other. The ablations measure the in-context learning score, not accuracy on few-shot tasks.
Induction heads doing more abstract work (Argument 4)
In the 40-layer, 13-billion-parameter model, the authors show heads that meet the strict definition of an induction head on random repeated tokens and also do something more abstract (section "Argument 4"):
- a literal copying head (copying score 0.89, prefix-matching score 0.75) that repeats names and sentences from earlier in a passage;
- a translation head in layer 7 (copying 0.20, prefix matching 0.85) that, given the same sentence in English, French and German, attends to the word in the earlier language that will come next in the current one;
- a pattern-matching head (copying 0.69, prefix matching 0.94) that, on synthetic lines of the form "month animal: 0", "month fruit: 1", "color animal: 2", "color fruit: 3", attends back to an earlier line of the same category and puts about 65% of its attention from the colons on correct positions.
The scores are from the table at the start of the section. The authors present these as anecdotes that make the general claim plausible, not as measurements of how much in-context learning induction heads perform. They describe the abstract behavior as a "fuzzy" or "nearest neighbor" version of induction, completing [A*][B*] … [A] with [B], where A* resembles A and B* resembles B.
Mechanism and continuity (Arguments 5 and 6)
For small attention-only models the mechanism is known from the earlier paper: a copying OV circuit plus K-composition with a previous-token head. In two-layer attention-only models the authors see no other mechanism that could supply the in-context learning (section "Argument 5"). They also report a second mechanism in GPT-2, which builds induction heads from positional embeddings, unavailable to their own models. For large models they argue from continuity: every model with more than one layer goes through the same phase change, with the same amounts of in-context learning before and after (section "Argument 6"). The most compelling alternative they name is that other composition mechanisms form at the same time and, in larger models with more heads, account for more of the effect than induction heads do.
Curiosities
The section "Unexplained Curiosities" collects observations the authors cannot explain:
- After the phase change, the in-context learning score is about the same for a small two-layer model and the 13-billion-parameter model. Large models are better at every position, but they gain most of their advantage within the first ten tokens of the context.
- Plotted against the logarithm of training tokens, the rate at which loss falls orders the models by size one way before the phase change and the opposite way after it (section "Phase Change Effect on Loss Derivatives").
- Individual oddities include a non-induction head in the 6-layer attention-only model whose ablation looks like reversing the phase change, and an induction head in the 6-layer MLP model whose ablation has the opposite effect on in-context learning.
Safety framing
The authors give two reasons the work bears on safety (sections "Introduction" and "Safety Implications"). Abrupt changes in capability, during training or with scale, make it harder to prepare for problems, and this phase change is one that can be studied up close. In-context learning means a model's behavior can change during use without further training. On the concern that in-context learning might hide an internal optimizer (mesa-optimization), they write that their work "suggests" the primary mechanism, at least in small models, is induction heads, and that "We did not observe any evidence of mesa-optimizers" (section "Safety Implications"); the paper does not describe a search designed to find one. They also present the phase change as the first case they know of in which a phase change in machine learning has a mechanistic explanation, linking scaling-law-style measurements to circuits.
Limitations and open questions
- Indirect evidence for large models. The paper's summary table rates the evidence that induction heads contribute the majority of in-context learning in large models as "Medium, Correlational", against "Strong, Causal" for small attention-only models. No ablations were run on the full-scale models.
- A narrow measure. The in-context learning score measures how much later tokens are easier to predict. It does not isolate specific few-shot tasks, and the paper's link to task-style in-context learning rests on the examples in Argument 4. The paper's conclusions are about this score; one later study finds that it and few-shot accuracy respond differently to ablating the same heads (see "Later outside tests" below).
- Few snapshots for large models. With 14 or 15 snapshots, the timing of changes in large models is less certain.
- Shared training order. Apart from the books-only runs, all models saw the same data in the same order, which the authors flag in a footnote as a limit on the dataset check.
- Definition changes. A change log records that in September 2022 the authors corrected the wording of the prefix-matching definition in two places and added detail on how the copying evaluator uses a ReLU; a footnote also records that the copying evaluator omitted a start-of-sequence token by mistake.
- Figures that differ between passages. The opening of Argument 4 says the authors study models up to 12 billion parameters, while the same section and the model table give the largest as 13 billion; the text places the pattern-matching head at layer 26, while the table at the start of the section lists it at layer 8 of 40. This note gives neither layer for that head.
- Replications. Two external comments are appended. Adam Scherlis of Redwood Research reports induction heads reliably appearing in two-layer attention-only models; replacing the previous-token head's attention with exact previous-token attention recovered 99% of the loss difference, and a simple idealized induction pattern recovered about 65%, with a further 10% when longer matches of the form "[A][B][C] … [A][B]" were included. Tom Lieberum reports candidate induction heads in GPT-2 and GPT-Neo, mostly from mid-depth (section "Comments & Replications"). Both replications concern the existence and structure of induction heads, not their share of in-context learning.
- Later outside tests in larger models, with few-shot accuracy. Two later preprints, not by Anthropic, ablate induction heads in open models and measure accuracy on few-shot tasks, the conception of in-context learning this paper set aside. Crosbie and Shutova (arXiv 2407.07011, version 3, 2025) mean-ablate the 1% or 3% of heads with the highest prefix-matching scores in Llama-3-8B and InternLM2-20B. On their abstract pattern tasks this cuts accuracy far more than ablating the same number of random heads from the same layers; in Llama-3-8B, ten-shot accuracy on a repetition task falls from 91.3% to 59.7% with 1% of heads ablated, against 85.9% for random heads and about 50% zero-shot (their Table 1). They identify induction heads by prefix-matching score alone and say they cannot test whether induction heads are the only mechanism. Yin and Steinhardt (arXiv 2502.14010, version 1, February 2025) compare induction heads with "function vector" heads, heads whose average output on a task's prompts, patched into a model given shuffled examples, restores the correct answers (a compact encoding of the demonstrated task), in 12 models from 70 million to 7 billion parameters (Pythia, GPT-2 and Llama 2). When heads that score high on both are excluded, ablating induction heads lowers few-shot accuracy about as much as ablating random heads in models above 1 billion parameters, while ablating function vector heads lowers it substantially; on this paper's token-loss measure the pattern reverses, with induction-head ablations mattering more in models above 345 million parameters (their Section 4 and Figure 4). They conclude that the two measures of in-context learning track different things, and conjecture that induction heads are precursors of function vector heads. Their Section 2.1 describes this paper as studying small attention-only models of 1 to 3 layers, which understates its range. Neither preprint tests the paper's models or its phase change directly.
Research questions
- Do induction heads account for most in-context learning in a large model under ablation? The paper had no ablations at full scale. Running pattern-preserving ablations of the highest-scoring induction heads in one large model, and measuring the change in the in-context learning score, would test the central claim directly. Later outside work has run mean ablations in open models up to 20 billion parameters (see "Later outside tests" above), mostly measuring few-shot accuracy rather than this score.
- Is the phase change driven by induction heads or by composition in general? The authors name this as the main alternative. Training models in which K- and Q-composition are available but previous-token information is blocked, and checking whether the bump still appears, would separate the two.
- Why is the in-context learning score nearly the same across model sizes? Measuring how much of the late-context loss reduction in large models comes from induction heads, against other mechanisms, would show whether the constant score hides a change of mechanism.
- How common are abstract induction heads? Argument 4 shows three hand-picked heads. Scoring every induction head of a large model on translation and category-matching tasks would give a rate rather than examples.
- What role do induction heads play in task-style few-shot prompting? The paper's measure is loss by position. Ablating induction heads while measuring accuracy on few-shot tasks would connect the two conceptions of in-context learning the paper distinguishes. The two later preprints described under "Later outside tests" did this and reached different conclusions, which turn partly on whether heads that also score as function vector heads are excluded; this note has found no test on the paper's own models that measures both quantities.
- Do the unexplained heads matter? The non-induction head whose ablation reverses the phase change, and the "anti-copying prefix-search" heads found in full-scale models above 16 layers, are listed but not studied. Characterizing their OV and QK circuits would show whether they are part of the same mechanism.
How it connects
- A Mathematical Framework for Transformer Circuits (December 2021) discovered induction heads in two-layer attention-only models and supplies the mechanism and the weight-based measures this paper relies on.
- Scaling Laws and Interpretability of Learning from Repeated Data (May 2022) uses this paper's prefix-matching score and finds that repeated training data degrades induction heads and copying out of proportion to overall loss; its authors present this as further evidence for induction heads as a source of in-context learning.
- Softmax Linear Units (June 2022) cites this paper and the framework paper as early mechanistic interpretability work on language models, and this paper as an example of drawing indirect conclusions about large models from empirical evidence.
- Toy Models of Superposition (September 2022) compares the sudden jumps it sees in feature geometry during training with this paper's induction-head phase change.
- For what attention heads and the residual stream are, see Building Self-Attention Step by Step and Assembling the Transformer Block in the language-model walkthrough.
References
- Olsson, C., Elhage, N., Nanda, N., Joseph, N., DasSarma, N., Henighan, T., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., Drain, D., Ganguli, D., Hatfield-Dodds, Z., Hernandez, D., Johnston, S., Jones, A., Kernion, J., Lovitt, L., Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. (2022). In-context Learning and Induction Heads. Transformer Circuits Thread, 8 March 2022. https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html (also arXiv:2209.11895). Section names in this note refer to the web version. record · 4 pages
- Anthropic. (2022, March 8). In-context Learning and Induction Heads [research page]. https://www.anthropic.com/research/in-context-learning-and-induction-heads record
- Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and Amodei, D. (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361. Cited here only as the source of the paper's definition of in-context learning, as the paper itself states. record · 3 pages
- Crosbie, J., and Shutova, E. (2024). Induction Heads as an Essential Mechanism for Pattern Matching in In-context Learning. arXiv:2407.07011, version 3 (2 April 2025). Cited for its later ablations in Llama-3-8B and InternLM2-20B. record
- Yin, K., and Steinhardt, J. (2025). Which Attention Heads Matter for In-Context Learning? arXiv:2502.14010, version 1 (19 February 2025). Cited for its later comparison of induction and function vector heads; any later published version was not checked. record
Reviewed: checked against sources, 12 Nov 2026 · editorial review, 23 Nov 2026 · 3 revisions