Circuit Tracing & the Biology of LLMs
Transcoders, attribution graphs, and what they revealed: planning, shared circuits, and why models hallucinate.
- → Explain transcoders and how attribution graphs are built
- → Walk through the poetry-planning and multi-step reasoning case studies
- → Use an attribution graph to form and check a mechanistic hypothesis
From a vocabulary to a wiring diagram
Module 3.4 gave you a vocabulary: sparse features, thousands of them, each a direction the model uses. Module 3.5 gave you a method for establishing causal structure, at the cost of one forward pass per component per position. Neither, on its own, gets you a wiring diagram of a frontier model.
The obstacle is that an SAE explains an activation, not a computation. It tells you what is present at layer 12; it does not tell you that layer 12's Texas feature was caused by layer 8's Dallas feature. To get edges you need the features to sit inside the computation rather than beside it.
Building an attribution graph
An attribution graph is a per-prompt diagram: which features caused which other features to fire, and which caused the output. Building one takes three moves.
One: freeze the non-linearities you are not studying. For a specific prompt, construct a local replacement model. Substitute CLTs for the MLPs, then freeze the attention patterns and the normalization denominators from the original forward pass, and add an error term at each layer equal to whatever the transcoder failed to reconstruct. The result reproduces the original model's output on this prompt exactly, and — crucially — the only remaining non-linearities are the feature activations themselves.
Two: read off the edges. With attention frozen, everything between two feature activations is linear, so the effect of source feature on target feature is just
where is the source's activation and is the virtual weight — the derivative of the target's pre-activation with respect to the source's activation, obtained through the frozen Jacobian. No approximation is needed at this step: within the local replacement model, this is exact.
Three: prune. The raw graph has millions of edges for a short prompt. Iteratively drop the lowest-influence nodes: Anthropic report reducing node count by an order of magnitude while losing only about 20% of completeness. Then a human groups features into supernodes and labels them — a manual, interpretive step the paper flags as a limitation.
The biology: what the graphs actually showed
On the Biology of a Large Language Model applies the method to Claude 3.5 Haiku across roughly a dozen behaviors. The title is deliberate — this is natural history, not theory. Here is what to take away from each.
Multi-step reasoning. “Fact: the capital of the state containing Dallas is” → Austin. The graph contains Texas features that no token in the prompt supplied. Swap them for California and the model says Sacramento; swap in Byzantine Empire and it says Constantinople. A genuine intermediate variable, computed and then used.
Planning in poems. At the line break, before writing a word of the next line, features for candidate rhyme words (“rabbit”, “habit”) activate — and they influence the output only at that position. Suppress them and the line comes out differently; inject “green” and the model rebuilds the line to land on it, about 70% of the time across 25 poems. A next-token predictor that plans ahead and writes backwards from the plan.
Addition. 36 + 59 is computed by two pathways in parallel: low-precision magnitude features (“add something near 57”) and lookup-table features for digit combinations. Asked how it did it, the model describes carrying — the algorithm it learned tosay, not the one it ran.
Multilingual circuits. The same question in English, French and Chinese runs through shared, language-independent features for the operation and the operand, with language-specific features only at input and output. The sharing increases with scale. But English is privileged: multilingual features have stronger direct weights onto English outputs, while other languages are more heavily mediated.
That reframes calibration work: the model is not failing to represent uncertainty, it is mis-triggering a suppression mechanism. It also makes hallucination attackable from the inside — and, symmetrically, makes the suppression a target. The jailbreak case study runs the same play: an acrostic gets past refusal because the model assembles the letters without ever representing the decoded word, and only catches itself at the next sentence boundary.
Unfaithful chain of thought. The graphs distinguish three cases that look identical from outside: reasoning the model actually performed, reasoning it fabricated afterwards, and motivated reasoning in which the model works backwards from an answer a human hinted at. That distinction is exactly the one CoT monitoring needs and cannot get behaviorally.
Refusal. Asked to advertise mixing bleach and ammonia, specific “dangers of mixing cleaning chemicals” features trigger a chain into “harmful request” → “should refuse”. Remove the danger features and the model complies, though warnings resurface later — the knowledge and the refusal are separable.
Hidden goals. Applied to a model finetuned to pursue a concealed objective, the method surfaced the mechanism — embedded, interestingly, inside the model's Assistant-persona features. This is the closest existing thing to an interpretability-based audit of a misaligned model, and Module 5.3 returns to it.
What the method cannot see
The paper's limitations section is unusually good and you should be able to recite it. Four things.
Feel it: read a graph, then predict one
First walk two real attribution graphs node by node. Then reverse the exercise: commit to a hypothesis about a behavior before the graph is revealed, and see how good your intuitions about model internals actually are.
The whole pruned graph. Two input tokens, a chain of features, one output. Every edge is a direct linear attribution computed through a local replacement model in which attention patterns are frozen and MLPs are replaced by transcoder features.
Click a node to see what it is and why it is in the graph.
Claude 3.5 Haiku answers 95, reliably, on arithmetic it has certainly never seen in exactly this form. Before you look at the graph: what is it doing?
Things to try: (1) In the Dallas graph, step to “4 · The shortcut” and sit with it — the clean two-hop story coexists with a memorised direct path, which is what real circuits look like. (2) In the poetry graph, note that the planning features are active at the newline only; ask yourself what behavioral experiment could have detected that from outside the model, and convince yourself none could. (3) In the game, commit out loud before clicking — the addition task in particular is designed so that the plausible answer is the model's own self-report, and the graph disagrees with it.
Problem set
The first two problems are about reading these papers critically, which is the skill this module is really teaching. The explore problem puts you in front of real graphs.
Attribution graphs freeze attention patterns from the original forward pass, so the graph contains OV-circuit effects but no QK-circuit effects.
(a) Take the IOI circuit from Module 3.5 and say precisely which parts of it an attribution graph would show, and which it would miss. (b) The Biology paper notes the method “skips over the interesting part” for some multiple-choice tasks. Construct a task where the whole mechanism is invisible to the method. (c) What would have to change for the method to see QK circuits?
Each of these could appear in a paper. For each, say what evidence would be required, whether the Biology paper supplies it, and how confident you should be.
- “Claude plans ahead when writing poetry.”
- “Claude thinks in a language-independent conceptual space.”
- “We verified that this model contains no deception circuit.”
Anthropic open-sourced the circuit-tracing tooling, and Neuronpedia hosts an interactive attribution-graph interface for open models. Go to neuronpedia.org/gemma-2-2b/graph and generate a graph for a prompt of your own design.
Pick a prompt with a predictable intermediate: a two-hop factual question in the Dallas mould (“the currency of the country whose capital is Lisbon is”) works well. Before you look, write down the intermediate feature you expect to find. Then:
- Find the output node and walk backwards along the strongest edges.
- Identify the supernodes yourself — group features that seem to be doing one job, and name them.
- Check the error nodes. How much of the influence into your output flows through features rather than error?
- Find one edge you do not believe, and say what intervention would test it.
Pick a behavior you actually care about — refusal on a borderline request, a sycophantic agreement, a specific arithmetic failure, a format instruction being ignored — and write a one-page report in the style of the Biology paper.
Required structure:
- The behavior, with the exact prompt and completion.
- Your hypothesis, written before any tooling.
- Evidence: what you observed, by which method.
- Intervention: what you changed and what happened.
- What you could not see, using the four limitations from the lesson.
Section 5 is the one that matters. Most writing in this field is weak there, and it is the section that makes a report usable by someone else.
Reusing your Module 3.4 setup on GPT-2 small, train two sparse models on the same layer's MLP: an SAE that reconstructs the MLP output from the MLP output, and a transcoder that predicts the MLP output from the MLP input. Match L0 between them.
Success check: report the reconstruction quality of each and, more importantly, splice each into the model in place of the MLP and measure loss recovered. Then pick one transcoder feature and compute its direct virtual weight to a later feature — you have just built one edge of an attribution graph by hand.
Check yourself
Go deeper
Two long papers, best read as figures first. Do the biology paper over three sittings and keep the methods companion open beside it for whenever you want to know how a claim was actually established.