Before you can reverse-engineer a transformer, you need to be able to read every symbol the parent note throws at you. This page builds each one from nothing: plain words → a picture → why the topic needs it. We go in dependency order, so nothing appears before it is earned.
Everything starts with a number: a point on a ruler. Zero in the middle, positives to the right, negatives to the left.
Now put two rulers at right angles. A pair of numbers (3,2) becomes an arrow from the origin to a spot in that flat sheet. That arrow is a vector. Add a third ruler pointing out of the page and you can place arrows in a room; with n rulers you get Rn.
Read the figure below: the yellow arrow is the vector (3,2); the blue dashed drop shows its first coordinate (how far right), the pink dashed line shows its second coordinate (how far up). That is all a vector is — a bundle of coordinates drawn as one arrow.
Why the topic needs it. Every activation inside a network — what a layer is "thinking" at one moment — is one such arrow. When the parent says "features are directions in activation space", it means arrows in some Rn. Hold that picture: thoughts = arrows in a room.
Before any layer can "add its correction to the belt", we must say what adding two arrows even means.
Read the figure below: the yellow arrow a and blue arrow b join tip-to-tail to make the pale sum a+b; the pink arrow shows a−b, the correction that carries you from b across to a.
Why the topic needs it. The residual stream (Section 6) is nothing but repeated vector addition — each layer's update is an arrow added onto the belt — and a layer update Δhl=hl−hl−1 is a vector subtraction. No addition of arrows, no residual stream.
The whole network is one giant machine f:Rn→Rm — n input numbers (a tokenised sentence turned into numbers), m output numbers (scores for each possible next word).
A network's only real move is: mix the numbers of an arrow to make a new arrow, then nudge it. The recipe for the mix is a grid of numbers called a matrix, written W.
The parent's cast of matrices, decoded once so they never scare you again:
Symbol
Plain name
What it mixes into
WQ
Query matrix
a "what am I looking for?" arrow
WK
Key matrix
a "what do I offer?" arrow
WV
Value matrix
a "what will I hand over?" arrow
WO
Output matrix
folds head results back onto the belt
WU
Unembedding matrix
turns an arrow into word-scores
You will meet these fully in Attention Mechanisms and Transformer Architecture; here only the shape of the idea matters: a matrix is a fixed mixing table the network learned, optionally followed by a bias nudge.
Why the topic needs it. A "circuit" is literally a chosen handful of these mixing tables acting in sequence. Naming the algorithm = describing what the composition of these tables (plus their biases) does.
Read the figure below: the yellow arrow a and the blue arrow b lean the same way, so their dot product is large and positive; the pink arrow c stands almost at a right angle to a, so a⋅c is near zero. The lean between arrows is exactly what the number reports.
Why this tool and not another? Attention must decide how much position i should listen to position j. "Listening" = "are their query and key arrows aligned?" The dot product is exactly the arithmetic that answers "how aligned?" in one number — no other basic operation gives alignment so cheaply. That is why the attention formula has QiKiT (a table of every query·key dot product) at its heart — we build Qi and Ki properly in Section 8.
We have a pile of raw alignment scores (logits). We want them turned into weights that are all positive and sum to 1 — a spotlight that shares 100% of its attention across positions.
Why ez and not just "positive-ify"? Because of facts (1)–(3) above: the exponential is positive (so weights are valid), monotonic (bigger score → bigger weight) and it stretches gaps (a slightly larger logit grabs a much larger share). This makes softmax behave like a soft, differentiable argmax — it can pick a "winner" position without a hard, non-trainable jump.
Read the figure below: the blue bars are the raw scores (logits, rescaled to fit); the yellow bars are what softmax turns them into. Notice the yellow bars are all positive and sum to 1, and the tallest blue score grabs a disproportionately large yellow share — that is the exponential exaggerating gaps.
Why the topic needs it. Every attention pattern matrix A is a stack of softmaxes — each row is one position's spotlight over all others. Reading a circuit is reading these spotlights.
dk is just the length of the key/query arrows (how many numbers each has). When you dot two arrows of length dk made of random-ish numbers, the result grows roughly like dk.
The parent's most important picture: layers do not overwrite each other. Each layer reads the current arrow, computes a small correction, and adds it back (vector addition, Section 0b). The arrow that flows straight through, accumulating additions, is the residual stream.
hL=h0+∑l=1LΔhl
Read it aloud: "the final belt = the starting belt + all the corrections layers wrote onto it."
Read the figure below: the yellow line is one coordinate of the belt across layers; each blue arrow is one Δhl (an update hl−hl−1) stacked on top of the previous total. The belt only ever grows by additions — nothing is erased, which is why an early layer's partial answer is still sitting there at the end.
Why the topic needs it. Because additions accumulate linearly, an early layer's answer is already sitting on the belt — you can read it before the end. That is the whole trick behind the Logit Lens (logitsl=WU⋅LN(hl)): apply the final word-reader WU to a mid-stream arrow and peek at what the model already believes.
The parent's block updates use two machines by name, MLP and LN. Meet them.
Why keep LN explicit? The parent insists on writing Attn(LN1(hl)) rather than Attn(hl). The reason: each sublayer reads a normalised copy of the belt, while the belt itself keeps the raw running sum. Drop the LN and you misdescribe what the head actually sees — and your circuit story becomes wrong.
Note the residual + in each line — that is the vector addition of Sections 0b and 6 in action: read a normalised copy, compute a correction, add it back onto the belt.
Attention runs several separate spotlights in parallel; each spotlight is a head.
Now, where do Qi, Ki, Vi come from? Each head owns its own slice of the query/key/value mixing tables — write those slices WQ(i),WK(i),WV(i). Feeding the (normalised) belt arrow x through them (matrix mix plus its bias, Section 2) gives that head's three working arrows:
Each head produces its own little result arrow. The results are glued end-to-end — that is what concat means (lay the H output arrows in a row to make one long arrow) — and passed through the single shared output table WO:
Now the payoff concept. We have n dimensions (rulers) but the network wants to store m features with m>n.
activation=∑i=1mfivi
Here fi is how strongly feature i fires (mostly 0), and vi is its direction arrow. Because the vi are not orthogonal, one neuron's axis picks up several unrelated vi — the neuron becomes polysemantic (responds to multiple meanings). Untangling this back into clean features is the job of Sparse Autoencoders.
These are the experimental backbone of Probing Classifiers and Model Editing: they turn "I have a hunch this head does X" into a testable causal claim.