What Heads Actually Learn
Lesson 2 of 3 in Multi-Head, Multi-Query, Grouped-Query Attention.
Nobody assigns jobs to heads. Training just adjusts Weights until next-token loss goes down — and yet, when researchers open trained models, some heads turn out to have recognizably specialized. Two honest caveats before the findings: the clearest evidence comes from small or older models that are easier to dissect, and plenty of heads resist any neat label.
With that hedge in place, three families of heads show up again and again. Positional heads attend by geometry — most famously, almost all of a head’s weight lands on the immediately previous token. Syntax-flavored heads track grammatical relationships: analyses of translation models (Voita et al. 2019) and of BERT’s attention (Clark et al. 2019) found heads whose patterns line up with subject–verb or object–verb links far more often than chance. And induction heads implement a find-and-continue algorithm over the context itself.
An arc diagram over the sentence "The robot picked up the red block". From each token, a single strong arc curves back to the token immediately before it: robot to The, picked to robot, up to picked, the to up, red to the, block to red. All arcs have similar high weight, showing a purely positional attention pattern.
An arc diagram over the tokens "When Mrs Dursley woke up , Mrs". From the final token Mrs, one strong arc curves back to Dursley, the token that followed the first occurrence of Mrs, with weight 0.85. A second, faint arc goes to the first Mrs with weight 0.15. The pattern shows the induction algorithm: find the previous occurrence of the current token and attend to its successor.
Induction heads deserve their fame. The pattern they complete is [A][B] … [A] → [B]: find the earlier occurrence of the current token, attend to whatever came next, and push the model toward repeating it. That works on names, code identifiers, and made-up words the model never saw in training — the information is retrieved from the current Context window, not from stored parameters. Olsson et al. (2022) showed these heads emerge in a burst partway through training, at the same time the model’s in-context learning ability jumps, and argued they are a key mechanism behind it. Their own hedge is worth repeating: the evidence is direct and causal in small attention-only models, but correlational in large ones.
Two more findings keep the picture honest. Pruning studies (Voita et al. 2019; Michel et al. 2019) found that many heads can be removed after training with little performance loss — specialization is concentrated, and some heads seem nearly redundant. And many heads park most of their weight on a delimiter or an early token — behavior related to the Attention sink phenomenon — which looks dramatic in a heatmap but often functions as a ‘no-op’ resting position rather than meaningful retrieval.
Interactive checkpoint quiz (1 questions) — open this page in a browser to take it.