Superposition and Circuits
Your model squeezes far more ideas than it has neurons, so ideas share directions. Small wired groups of heads then turn those shared directions into decisions you can trace.
Why Does This Exist?
Open a trained model and ask a simple question: which neuron means John? You will not find one. One neuron fires for John, for French verbs, and for semicolons. Another fires for Mary, for chess, and for error messages. If you treat each neuron as one idea, every explanation you write is wrong, and every edit you try lands somewhere you did not intend.
That tangle has a name. Superposition is the model packing more features than it has dimensions, so features share directions instead of owning neurons. A middle size model may have a few thousand numbers per layer and need millions of detectable ideas. It cannot give each idea its own wire, so it stashes them as overlapping directions and trusts that only a few are active at once. You have felt the cost whenever a probe says an idea is present yet removing that neuron changes nothing. Presence is not use.
Circuits are the other half of the story. A circuit is a small subgraph of the network, a few heads and directions wired together, that runs one readable step such as copy the earlier name or suppress the repeated one. Superposition says where ideas live. Circuits say what the model does with them.
This page covers both halves and how they join. The tool that pulls shared directions apart is sparse autoencoders. The test that proves a wire actually causes the answer is activation patching. Read those next for the methods. Here you get the mental model.
The one idea you need first: a transformer never rewrites its state from scratch. Each layer reads the shared residual stream, adds a small update, and writes it back. Attention heads are the readers. Each head computes where to look and what to copy, then adds that copy into the stream. The full next word machinery lives in next-token prediction. Everything below assumes that picture: directions in a stream, plus heads that move them.
Think of It Like This
Three stations, two frequencies, one wired speaker
You manage a small apartment block with three tenants but only two intercom frequencies. You give each tenant a distinct ring pattern that shares the two wires. Anna gets a long tone on wire one. Ben gets a short double tap spread across both wires. Cara gets a chirp wired opposite to Ben. When one tenant rings, you know exactly who it is. The patterns overlap, yet a single ring still reads clean.
Then you wire a tiny decision box to the speaker. It listens for rings, damps the tenant who just buzzed to let someone in, and copies the other name onto the lobby display. Rings plus wiring produce an answer: admit Anna, not Ben.
Where it stops: real features are continuous vectors with measurable overlap, here minus 0.5, not audible rings. And nobody solders model wiring by hand. The model learns its own shared directions and its own decision boxes from data, which is why untangling them takes work instead of a screwdriver.
How It Actually Works
Call a feature any decodable idea, such as John the person or past tense. Call a neuron one coordinate of the activation. In superposition, features are directions, not neurons. Write each feature as a unit vector , meaning a list of numbers with length 1 pointing somewhere in activation space. Write its current strength as , meaning how present that idea is right now, usually zero. The observed activation , meaning the actual numbers you read off the layer, is the weighted sum:
Here counts features and counts dimensions, with larger than . That inequality is the whole game. More ideas than wires forces sharing.
Why sharing can still read clean
You read feature with a probe direction , meaning a vector that scores how much of points along . The readout , meaning your estimate of , is the dot product:
The first term is the truth. The sum is crosstalk, meaning every other active feature leaking through its overlap . If overlaps are small and few features fire together, the leak stays small and the winner still wins. That sparsity assumption, meaning few active features per input, is what superposition rests on. Break it and readings blur.
Take two dimensions and three features spaced evenly, the smallest case that forces sharing. Let , meaning full strength on neuron one and none on neuron two. Let , meaning minus half on neuron one and about 0.866 on neuron two. Let , the mirror image. Each has length 1, since . Each pair overlaps at minus 0.5, since and the other pairs match. That minus 0.5 is the price of fitting three directions into two wires.
Now activate only feature one with strength 1, so and . The readouts are , , . Feature one wins by 1.5, a clean read despite sharing. Activate features one and two together with , so . Then , , . Two winners tie and the answer is ambiguous. Same geometry, different sparsity, different result. That is why sparse inputs decode and dense inputs confuse.
What a circuit adds on top
A circuit traces those directions through weights that act on them. Nodes are features, heads, or probe directions. Edges are the matrices that carry one node into the next. For attention, two operations matter. The QK step, meaning query dot key scaled and softmaxed, decides where the head looks. The OV step, meaning the value vectors mixed by those weights, decides what gets copied into the stream. Here is the query at the current position, runs over keys at earlier positions, is the head size that keeps the scale steady, and the output is a weighted sum of values.
Two circuits made this concrete. An induction head pair implements complete the pattern. A previous token head first marks each position with what came before it. The induction head then matches the current token against those marks, attends to the earlier match, and copies its successor forward. That is the engine behind much of in-context learning: show Country then Capital twice, and the head completes the third pair by copying, not by recalling a fact.
The indirect object circuit resolves who did what to whom. On John and Mary went to the store, then Mary gave a drink to, the model must output John. Three roles cooperate. Duplicate detectors mark the repeated names. S-inhibition heads damp the subject doing the giving, here Mary. Name mover heads copy the surviving name into the output. Remove the middle step and the model repeats Mary. That causal test, swapping one clean state into a corrupted run, is activation patching, and the midway readout that watches the guess sharpen is the logit lens.
A worked vote that picks John
Use toy logits, meaning small illustrative scores, not measured weights, to show the arithmetic the diagram draws. Start tied at John 1.2 and Mary 1.2. Let S-inhibition add minus 0.8 to Mary, leaving John 1.2 and Mary 0.4. Let the name mover add plus 0.9 to the attended name John, giving final scores John 2.1 and Mary 0.4.
Softmax turns scores into shares. With , exponentiate to about , sum to about , divide to get about . John takes roughly six sevenths of the mass from a 0.9 copy boost plus a 0.8 suppression. Flip either sign and Mary wins. That sign sensitivity is why circuit work checks causation rather than admiring correlations.
The trade is honesty for coverage. You gain a checkable story for one behavior on inputs like the one you tested. You pay narrowness, because the same answer on stranger phrasings may ride backup paths. Do not reach for circuits when you need broad behavioral guarantees or fast fixes across a distribution. Reach for evaluation, guardrails, and retraining instead. The method assumes the behavior decomposes into a few findable parts and that your test inputs represent the cases you care about. When inputs fire many overlapping features at once, or several circuits vote together, single part stories mislead and patch results stop transferring.
Code
This snippet replays both numbers from the page: the superposition readouts and the final vote shares. It uses only the standard library.
import math
def dot(a: list[float], b: list[float]) -> float: return sum(x * y for x, y in zip(a, b))
def softmax(z: list[float]) -> list[float]: m = max(z) # subtract the max so exp cannot overflow e = [math.exp(v - m) for v in z] s = sum(e) return [v / s for v in e]
v1 = [1.0, 0.0]v2 = [-0.5, 0.8660254]v3 = [-0.5, -0.8660254]x = [1.0, 0.0] # only feature 1 activeprint([dot(v1, x), dot(v2, x), dot(v3, x)]) # -> [1.0, -0.5, -0.5]print([round(p, 2) for p in softmax([2.1, 0.4])]) # -> [0.85, 0.15]The first line matches the hand readout: 1.0 for the active feature, minus 0.5 of crosstalk elsewhere. The second line matches the diagram vote: the 2.1 versus 0.4 gap becomes about 0.85 versus 0.15.
Watch Out For
Reading one neuron as one idea
You find a neuron that fires on John and label it the John neuron. It feels done. Then you steer with it and the model starts emitting French verbs, because that neuron also carries two unrelated features along its shared direction.
Symptom: a probe scores well yet editing or ablating that neuron changes unrelated behaviors. Fix: read directions, not neurons. Fit or borrow sparse autoencoder features for the layer, then confirm with a causal patch before you claim a meaning.
Calling one circuit the whole answer
You disable the S-inhibition heads, the IOI answer flips, and you declare the circuit found. Then a paraphrased prompt answers correctly anyway through a backup path your ablation never touched.
Symptom: a clean patch result on one template that fades across rephrasings or longer contexts. Fix: test a small suite of variants, patch each head family separately, and report the share explained rather than a binary found it. Do not ship a safety claim on a single prompt.
The Quick Version
- Superposition packs more features than neurons by storing features as overlapping directions, readable only while few fire at once.
- A toy with three features in two neurons and minus 0.5 overlap still reads clean when one feature fires and ties when two fire.
- Circuits are small wired subgraphs that turn those directions into steps such as suppress Mary and copy John.
- Induction heads complete repeated patterns by attending to the earlier match and copying its successor, which powers much few shot reuse.
- One ablation never proves the story. Patch across phrasings and expect backup paths.