Induction head

An induction head is an attention circuit in a transformer that spots an earlier occurrence of the current token and predicts that whatever followed it last time will follow again.

An induction head is one of the clearest pieces of machinery researchers have found inside a language model. It completes patterns of the form [A][B] ... [A] by predicting [B]. If a document earlier mentioned "Mr Dursley" and the model now sees "Mr" again, an induction head looks back to the last time "Mr" appeared, sees that "Dursley" came next, and makes "Dursley" more likely as the next token.

It works as a two-step circuit spread across two layers. A previous-token head in an earlier layer tags each position with information about the token just before it. The induction head in a later layer then searches the context for positions whose previous token matches the current one, attends to them, and copies the token it finds there into its prediction. Researchers describe these two behaviours as prefix matching and copying. Because the circuit needs one attention head to build on another, it cannot form in a model with only one layer.

The idea comes from Anthropic's interpretability team. Their December 2021 paper, A Mathematical Framework for Transformer Circuits, named induction heads while reverse-engineering small attention-only transformers with zero, one and two layers. A follow-up published in March 2022, In-context Learning and Induction Heads by Olsson and colleagues, found that induction heads appear at the same point in training as a sudden jump in in-context learning ability, visible as a bump in the training loss curve. When the authors changed the architecture to shift that bump, the heads and the in-context learning moved together.

The finding matters because it ties a behaviour people care about, a model picking up on patterns in its prompt, to specific, inspectable components. The authors were careful about how far it goes. For small attention-only models they had direct causal evidence, since removing induction heads sharply reduced in-context learning. For large models with MLP layers the evidence was indirect, resting on timing, co-movement and examples, and they called it a beginning rather than a proof.

In practice, induction heads are a textbook case in mechanistic interpretability: a worked example showing that some of what happens inside a neural network can be traced to identifiable circuits. They do not explain everything a large model does with its context, but they show what a successful explanation looks like.

Common questions

What does an induction head do?

It looks for an earlier place in the context where the current token appeared and predicts that the token which followed it then will come next again. This lets a transformer continue repeated names, phrases and sequences it has seen earlier in the same prompt.

How are induction heads related to in-context learning?

Anthropic researchers found that induction heads form at the same point in training as a sharp rise in in-context learning ability. In small attention-only models, removing them greatly reduces that ability. For large models the link rests on indirect evidence, so they are best seen as a major contributor rather than a full explanation.

Why can't a one-layer transformer have an induction head?

The circuit needs two attention heads working in sequence: one that records which token came before each position, and a later one that uses that record to find a match. That composition across layers is impossible with a single layer, and the 2021 study found induction heads only in models with at least two.

Who discovered induction heads?

They were named by researchers at Anthropic, including Nelson Elhage, Neel Nanda, Catherine Olsson and Chris Olah, in a December 2021 paper on transformer circuits. A 2022 paper led by Olsson studied how they relate to in-context learning.

Finding more

Search for "induction heads", "in-context learning and induction heads" or "transformer circuits" to find the original work and later replications. The most reliable sources are the papers on transformer-circuits.pub and arXiv, and interpretability tutorials that reproduce the circuit in small models with code. Treat claims that a single mechanism explains everything a large model does in context with care; the original authors framed the evidence for large models as indirect.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.