Sixteen readers of the same sentence
Attention does not happen once. Every layer runs it many times in parallel, each with its own idea of what is worth looking at. Some learn grammar. Several learn nothing. Here they are, side by side.
9 min · Advanced · Explorable
One question, asked sixteen ways
Imagine sixteen people reading the same sentence, each told to track one thing. One follows what the previous word was. One connects every verb to its subject. One keeps an eye on what “it” refers to. None of them was given those instructions — each worked out its own job during training, and afterwards researchers looked and gave the jobs names.
A head is one reader
It scores every earlier word for relevance to the word being processed right now.
They run in parallel
Sixteen per layer here, thirty-two layers in a large model. Hundreds of readers, all at once.
Their jobs emerge
Nobody assigns a head to grammar. It arrives there because it made the next-word prediction better.
Find the one that understands “it”
The grid of sixteen small squares is every head's full attention pattern — brighter means stronger. Click one to inspect it, then tap words in the sentence to move the query. Press “Challenge me” and see if you can find the head that resolves the pronoun.
Tap a word to move the query
Head 1
Looks at the word immediately before. The most common pattern in any model, and the most useful.
Where “it” is looking
Six of these sixteen do something you could name. The rest are near-uniform or point at punctuation — which is what researchers find when they inspect real models, and why heads can often be pruned with little loss.
Patterns are hand-specified so each head does one legible thing. In a real model nobody assigns these — the roles are discovered afterwards, by looking, and most heads never get a clean label.
In plain words
Look at the thumbnails before you click anything. Several are a bright diagonal stripe — those are previous-token heads. A bright vertical line means a head that dumps everything onto one word, usually the full stop. An even grey wash means a head that learned nothing legible at all.
Most heads are doing very little
This is the finding that surprises people. When researchers prune heads from a trained transformer, a large fraction can be removed with almost no loss in quality. The capacity is there, and much of it is not being used for anything you could name.
Sinks are real
Heads that dump attention onto the first token or the punctuation are doing something genuine: parking. When a head has nothing relevant to attend to, it needs somewhere harmless to point.
Redundancy is normal
Two of the sixteen here are previous-token heads. Important patterns get learned more than once, which is part of why these models are robust to damage.
Interpretability is archaeology
Nobody designs these roles. They are discovered afterwards by feeding in thousands of sentences and looking for consistent behaviour — slow, manual, and still an open research area.
This is one layer of thirty-two
Everything above happens again at every layer, on representations that have already been rearranged. Early layers tend toward syntax, later ones toward meaning.
What this explains
Why models can be pruned and distilled
If a large share of heads are near-uniform, they can be removed or compressed. This is the basis of every small fast model built from a large slow one.
Why long context is expensive
Every head scores every token against every other. Double the input and each head does roughly four times the work — multiplied by hundreds of heads.
Why prompts can be “attacked”
If instructions are just tokens competing for attention alongside everything else, text in a document you paste can compete with the instructions you wrote. That is prompt injection in one sentence.
Why interpretability matters commercially
Being able to say which part of a model produced a decision is quickly becoming a regulatory expectation, not a research curiosity.
Next
Now build one from scratch
Module IV has you implement attention by hand — queries, keys, values, and the softmax — before you are allowed to import a transformer.