An attribution graph is a directed graph of causal feature contributions that traces how interpretable features inside a neural network produce one specific output on one specific input. Its nodes are input tokens, learned features, approximation errors and output logits, and its weighted edges show how strongly each node directly influences the next. In Explainable AI, attribution graphs belong to mechanistic interpretability, and the method of building them is often called circuit tracing.
The technique was popularized in 2025 for large language models, where researchers used it to reveal multi-step reasoning, planning ahead in poetry and the internal paths behind refusals. Unlike a saliency map, which only scores input tokens, an attribution graph exposes the intermediate computation between input and output, making it a prompt-level picture of a model circuit.
How an attribution graph is constructed
An attribution graph is built on a replacement model, an interpretable stand-in for the original network. Researchers first train transcoders, often cross-layer transcoders, that reconstruct the output of each MLP block from a sparse set of features. Each feature ideally represents one human-readable concept, which reduces the polysemanticity of raw neurons.
For a given prompt, the replacement model is made locally linear: attention patterns and normalization terms are frozen at the values the original model computed. In that frozen setting, the direct effect of every active feature on every later feature can be computed exactly as a linear contribution. The difference between the replacement and the real model is kept as error nodes, so the graph never silently hides what the transcoders fail to explain.
The resulting graph is usually far too large to read, so it is pruned to the nodes and edges that carry most of the influence on the chosen output logit. Analysts then group related features into supernodes, such as a cluster that represents the concept of a capital city.
| Node type | What it represents | Interpretive value |
|---|---|---|
| Embedding node | An input token at a position | Anchors the graph in the actual prompt |
| Feature node | An active transcoder feature | Carries a nameable concept or operation |
| Error node | Unexplained residual at a layer | Shows where the approximation is weak |
| Logit node | A candidate output token | Defines the behavior being explained |
| Supernode | Manually grouped related features | Simplifies the circuit for human reading |
Validating the graph with interventions
An attribution graph is a hypothesis about the mechanism, so it must be tested on the original model. The standard test is an intervention experiment: suppressing or amplifying a feature in the real network and checking whether downstream features and the output change as the graph predicts. When suppressing a hypothesized intermediate concept removes the answer, the evidence for that path becomes much stronger.
The table below summarizes the measurements researchers use to judge whether a graph is trustworthy.
| Check | What it measures | Warning sign |
|---|---|---|
| Replacement fidelity | How closely the replacement matches outputs | Large divergence on the studied prompt |
| Error share | Influence routed through error nodes | Errors dominate the key paths |
| Intervention agreement | Effect of steering on the real model | Ablations do not change the output |
| Pruned completeness | Influence kept after pruning | Important paths removed by thresholds |
| Feature interpretability | Consistency of feature activations | Labels fit only a few examples |
Comparison with other interpretability methods
Attribution graphs differ from feature attribution methods because they explain internal structure, not only input importance. SHAP, Integrated Gradients and saliency maps assign a score to each input element, whereas an attribution graph shows which intermediate concepts link the inputs to the output. It also differs from activation patching, which tests one component at a time but does not produce a complete map.
| Method | Unit of explanation | Main output |
|---|---|---|
| Attribution graph | Sparse features across layers | Weighted causal graph for one prompt |
| Saliency map | Input tokens or pixels | Importance score per input element |
| Activation patching | Individual heads or neurons | Causal effect of one component |
| Logit lens | Residual stream per layer | Intermediate next-token guesses |
| Probing classifier | Layer representations | Whether a property is decodable |
In practice these methods complement one another. A logit lens or probe can suggest where a concept appears, activation patching can confirm a single step, and an attribution graph can show how the steps connect into a circuit.
What attribution graphs have revealed
Published attribution graphs have provided concrete evidence of internal multi-step reasoning in language models. For a prompt asking for the capital of the state containing Dallas, graphs showed a feature for Texas activating before features that promote Austin, indicating a genuine two-hop path rather than a memorized shortcut.
- Planning in poetry, where features for a rhyme word activate before the line that ends with it is written.
- Shared multilingual concepts, with language-specific features only at the input and output ends.
- Arithmetic pathways that combine an approximate magnitude route with a precise last-digit route.
- Refusal and hallucination circuits, including default can-not-answer features that known entities suppress.
- Unfaithful chain of thought, where the stated reasoning does not match the traced computation.
Limitations and practical use
Attribution graphs explain one prompt at a time, so a circuit found on one example may not generalize. They also treat attention patterns as fixed, which means they show what information flows through attention but not why the model attends where it does. Significant error nodes indicate that part of the computation remains unexplained.
| Limitation | Consequence | Mitigation |
|---|---|---|
| Frozen attention | Query-key computation stays hidden | Add separate attention analysis |
| Transcoder error | Gaps in the explained mechanism | Larger dictionaries, report error share |
| Single-prompt scope | Findings may not generalize | Compare graphs across prompt families |
| Manual labeling effort | Slow and subjective interpretation | Automated interpretability for labels |
| Compute cost | Hard to apply to frontier models | Trace smaller open models first |
Open-source tooling now lets researchers generate and browse graphs for open-weight models through interactive interfaces. The method is best suited to auditing specific behaviors, such as a suspicious refusal or a factual error, rather than to routine production explanations for end users.
Understanding it simply
A language model answers a question through many hidden steps. An attribution graph is a map of those steps. It shows which ideas the model activated and how each idea pushed toward the final answer.
Think of tracing how a rumor spread through a town. You note who told whom, and how much each person influenced the next. The map does the same for concepts inside the model. Researchers then test the map by switching off one idea. If the answer changes as predicted, the map is likely correct.
Applied in practice
An interpretability team at a research lab investigates why an open-weight chat model refuses a harmless chemistry question about cleaning products. They generate an attribution graph for the prompt and prune it to the nodes carrying most influence on the refusal token. The graph shows a path from the word bleach through a dangerous-chemicals feature to a general harmful-request feature that promotes the refusal.
The team suppresses the dangerous-chemicals feature in the original model and observes that the refusal disappears and a safe answer appears. Error nodes account for a modest share of influence, so they consider the finding credible. The result guides targeted fine-tuning data that reduces over-refusals on household safety questions without weakening refusals for genuinely harmful requests.