Circuit Tracing

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2025 May 10 22:55
Editor
Edited
Edited
2026 Jun 25 15:2

Transcoder
based Attribution tracing

  • CLT compresses amplification chains across multiple MLP layers into a single feature representation, resulting in shorter path lengths in the graphs
  • CLT globally optimizes MLP outputs across layers (joint training), achieving lower MSE than PLT while explaining much more variance than thresholded neurons

Overall Pipeline

  1. Build a replacement model by substituting the original model's MLP with a "Cross-Layer Transcoder (CLT)"
  1. Visualize the computational flow of the replacement model as an "attribution graph" for specific prompts
  1. Identify critical paths in the graph
  1. Verify the causal role of individual features using "patching" techniques

CLT (cross-layer
Transcoder
)

notion image
Unlike
Crosscoder
which only shares latent dimensions, CLT shares encoders and trains different decoders for subsequent layers. While PLT (Per Layer Transcoder) was trained to mimic each layer's MLP input-to-output function to learn causality, CLT scaled this approach with n encoder-decoder pairs. CLT maintains the same encoder for each layer, but has decoders for all subsequent causal MLP outputs (including itself), capturing much more diverse cross-layer causality. Through this, with + encoders trained, it creates a half fully-connected graph, then combines various pruning techniques with correlation-based importance scores and metrics like TWERA and ERA to obtain the final
Attribution Graph
. Causality is then verified through patching, though the graph construction itself is not based on patching-derived causality.
notion image

Decoder sparsity loss

Building on
Crosscoder
's decoder sparsity loss, CLT uses tanh activation for decoders to achieve appropriate regularization: behaving linearly near 0 and saturating to 1 for larger values, which stabilizes training.

Local Replacement Model

To achieve 100% output matching with the original model for the given prompt:
  • Replace all MLP subblocks in attention blocks with CLT
  • Freeze the attention patterns and layer-norm denominators from the original model
  • Correct node output differences (errors) for each token and layer using error nodes

Causal Role Verification

  1. First, run the base model to record MLP outputs at each layer and store the decoder contributions of CLT features.
  1. In the second forward pass, multiply all decoder contributions of selected features by a coefficient and replace with "recorded MLP output + ".
  1. Analyze logit changes by considering suppression, removal, and amplification results from patching.
Constrained Patching modifies CLT decoder contributions only for specific layer ranges and fixes subsequent layers. This blocks side-effects between later layer features, linearizing the prediction path. Iterative Patching re-runs the entire model (including unmodified layers) after each change. While this captures secondary and tertiary knock-on effects, the causal paths become more complex and harder to interpret.

2. Global circuit discovery (Context independent Global graph)

While the local graph shows features and attention-mediated paths activated only for specific prompts, the global weight circuit reveals more general addition graphs and how cases like harmful request rejection are aggregated. This captures repeated and consistent computation patterns that may not be visible in single prompts. Additionally, it enables "pre-filtering" of key feature pairs to more efficiently narrow down targets for local graph and patching experiments.

Global Weights

Global Weight is a constant calculated as the dot product of CLT decoder and encoder weights, representing the linear, prompt-independent influence (virtual weight) that feature has on feature "across all contexts".
  1. TWERA (Target-Weighted Expected Residual Attribution)
  1. ERA (Expected Residual Attribution)
In theory, we need to construct a matrix with rows and columns representing the sum of all layer features, but since it's too large, we create a TWERA/ERA filtering submatrix instead. Also, since all model features are mixed in a single residual stream, large global weights appear even for feature pairs that are never actually activated together. Therefore, we highlight only the weights when features are "actually activated together", removing out-of-spectrum interference.

Evaluation

Measure graph simplicity (path length), completeness, and mechanical fidelity (perturbation agreement)
  • Path Length
    • Measure how much the path between "embedding→logit" relies on short paths by examining the cumulative impact ratio of to calculate the average number of steps to reach the output
  • Completeness
    • The ratio of edge contribution sum from "feature·embedding→logit" in pruned graph to total edge contribution sum. The closer to 1, the smaller the error nodes (unexplained portions)
  • Replacement Score
    • The proportion of paths from "embedding→logit" that use only feature paths without errors
  • Mechanistic Fidelity
    • Cosine similarity between perturbations, measuring the similarity of downstream activation change vectors when patching the same features in the same way between original model vs. local replacement model
    • Normalized MSE: Difference in magnitude of changes between the two models shows accumulated errors per layer
  • Automated Interpretability
    • Sort Eval: Show two features (top-k examples) to an LLM and measure the distinguishability index of feature visualization if they are decomposable
    • Contrastive Eval: Present differing features from contrasting prompts (varying by one point) to LLM and measure the probability of correctly identifying the source prompt as an indicator of how well features capture differences

Limitation

Uninterpreted attention QK circuits, reconstruction errors ("dark matter"), graph complexity, ignored inactive features. The approach of simplifying a language model’s complex computations using a cross-layer transcoder is innovative, but it has limitations: it freezes nonlinear processes such as attention patterns and normalization and therefore analyzes only their indirect effects. For this reason, it cannot fully explain the causes of information movement through the attention mechanism. In addition, the accumulation of reconstruction error and the difficulty of interpreting global weights remain open problems.
 
 
 
 
Supernode is a grouping of multiple feature nodes into a "single semantic unit" to simplify visualization and causal effect analysis of nodes with similar roles. These are manually designated.
 
 
method
Circuit Tracing: Revealing Computational Graphs in Language Models
We describe an approach to tracing the “step-by-step” computation involved when a model responds to a single prompt.
Circuit Tracing: Revealing Computational Graphs in Language Models
analysis
On the Biology of a Large Language Model
We investigate the internal mechanisms used by Claude 3.5 Haiku — Anthropic's lightweight production model — in a variety of contexts, using our circuit tracing methodology.
On the Biology of a Large Language Model

Neuronpedia
Research
circuit-tracer
decoderesearchUpdated 2026 Jun 25 13:28

Two-step reasoning (e.g., Dallas→Texas→Austin) actually uses intermediate holes. Language-agnostic reasoning followed by language-specific feature combination. CLT shows better replacement score/sparsity tradeoff compared to PLT, while skip PLT generally offers fewer benefits.
The Circuits Research Landscape: Results and Perspectives - August 2025
A multi-organization interpretability project to replicate and extend circuit tracing research.
The Circuits Research Landscape: Results and Perspectives - August 2025
gemma-2-2b Attribution Graph
Attribution Graphs for Dummies - 1. What are Attribution Graphs?
Part 2: https://youtu.be/hdi1a9MjwDs An introduction to attribution graphs from Anthropic's Circuit Tracing and Model Biology papers, featuring Jack Lindsey (Anthropic), Emmanuel Ameisen (Anthropic), Tom McGrath (Goodfire AI), and Neel Nanda (Google DeepMind). 0:00 Introduction 2:18 Attribution Graph Orientation 19:10 Analyzing an Attribution Graph from Scratch 40:25 Reflection: What have we Learned? Explore Attribution Graphs: https://neuronpedia.org/graph Blog Post: https://www.neuronpedia.org/graph/info circuit-tracer GitHub: https://github.com/safety-research/circuit-tracer Original Papers by Anthropic - Circuit Tracing: https://transformer-circuits.pub/2025/attribution-graphs/methods.html - Biology of an LLM: https://transformer-circuits.pub/2025/attribution-graphs/biology.html
Attribution Graphs for Dummies - 1. What are Attribution Graphs?

TWERA

They argue that using TWERA to analyze downstream connections enables more accurate identification of the features that have a tangible steering effect on the model’s output.
Circuits Updates – May 2026
A short update on understanding features through downstream connections.
 
 
 

Recommendations