THE INDUCTION HEAD

Two attention heads wired into one trick: a previous-token head in layer 1 tags every position with the token before it, and an induction head in layer 2 uses your current token to find where it last appeared and copies what came next. Feed it [A][B]…[A] and it answers [B]. This is the mechanism Olsson et al. tied to the sudden onset of in-context learning — the copy engine, built here by hand so every readout has a closed form.

source Olsson et al., In-context Learning and Induction Heads (2022), Anthropic / transformer-circuits.pub — arxiv.org/abs/2209.11895 rendered, not quoted: [A][B] … [A] → [B]

BLUE TEAM · BUILDS & DEFENDS
3

THE MODEL

Attention-only, two layers, no MLP, hardmax attention (the zero-temperature limit of softmax — exact, deterministic).

Layer 1 — previous-token head. Attention matrix is the sub-diagonal: position i attends to i−1. It copies that token's identity into a separate "prev" channel. So position k now carries token[k−1].

Layer 2 — induction head. Query = current token[i]. Key at k = the prev-channel token[k−1]. They match exactly when token[k−1]=token[i], i.e. k−1=j is a prior occurrence of the current token — so it attends to k=j+1, the position after the match, and outputs token[j+1].

Weights are constructed, not trained — the readouts below are exact, not approximate.
5

THE LINEAGE

Two the-attention-heads given a concrete job. Neither head alone copies anything; composed — layer 2 reading the channel layer 1 wrote — they become a pattern-completer. This sphere is the-attention-heads with the composition made load-bearing: the circuit Olsson et al. named as the engine of in-context learning.

neighbour the-attention-heads → the-induction-head

7

THE WITNESS

Live re-check of the running panel against the closed-form expectation. Green while the circuit copies correctly; flips red the instant the wiring is tampered.

WITNESS: —
Press TAMPER (window 6) and watch this catch it.
THE MACHINE
4

DATA IN in ↓

A repeated sequence. The block A B C appears, then repeats — the induction head should complete the repeat from the second occurrence onward.

previous-token head → induction head
0

THE PANEL LIT

Per-position prediction from the live circuit. A green outline = a confident copy; the attended source cell (the position after the prior match) is highlighted.

SELFCHECK FAILED — engine not LIT
argmax over the token channel
8

DATA OUT out ↓

Proven result: after the circuit predicts the repeat.

RED TEAM · ATTACKS & BREAKS
1

THE ADVERSARY

WALL Induction is positional copying, not understanding. It fires on any repeat — including adversarial or nonsense strings — and will confidently reproduce a poisoned continuation. It also copies the most recent prior match; a later, misleading occurrence can hijack the prediction over the intended one.
2

THE GRAVEYARD

  • "The induction head understands grammar / meaning." → It matches surface token identity. No semantics; a repeated random-token string is copied just as well.
  • "One head does it." → It takes two, composed. Ablate the previous-token head and the induction head keys on the wrong channel and fails (see window 6).
  • "It's trained/emergent so behaviour is fuzzy." → The mechanism is exact. Constructed here, every prediction has a closed form and is asserted, not sampled.
6

THE TAMPER

Shift the previous-token head to the wrong offset (attend to i−2). Now the induction head keys on the wrong position and the copy [A][B]…[A]→[B] breaks. The WITNESS (7) catches it live.