TL;DR
This paper introduces a framework to turn a Transformer’s computation into an exact linear computation graph over monosemantic sparse autoencoder (SAE) features. By replacing dense, non-linear MLP blocks with Transcoders and applying Hierarchical Attribution to prune nodes during backpropagation, the authors isolate interpretable subgraphs for behaviors like bracket tracking, induction, and Indirect Object Identification (IOI) in GPT-2 Small without resorting to linear approximations or ablation interventions.
What Problem Does This Paper Address?
Traditional mechanistic interpretability often operates at the level of attention heads and MLP neurons. However, these components are notoriously polysemantic due to superposition (where models represent more features than dimensions). While Sparse Autoencoders (SAEs) extract monosemantic features from superposition, two major roadblocks hinder feature-level circuit discovery:
- MLP Non-Linearity: Unlike attention OV (Output-Value) circuits, which are linear given fixed attention weights, non-linear MLP layers break direct linear connections between upstream and downstream features, traditionally forcing researchers to use local linear approximations (like attribution patching).
- Attribution Artifacts: Standard gradient-based attribution computes importance after a full backward pass, improperly routing credit through intermediate nodes that end up pruned from the final circuit.
Methods
The authors build an exact, fine-grained circuit discovery pipeline:
[Tokens] -> [Interpretable Leaf Nodes (Embeddings)]
│
▼ (Fixed QK Attention Patterns)
[OV Circuits + Transcoders] <── Strictly Linear Graph
│
▼ (Backward Pass with On-the-Fly Detaching)
[Hierarchical Attribution Subgraph]
- Transcoders for MLPs: Instead of standard SAEs (which reconstruct an input $x$), a Transcoder takes the pre-MLP residual activation $x$ and directly predicts the MLP output $y$ via a sparse hidden layer: $f = \text{ReLU}(W_E x + b_E), \hat{y} = W_D f$. Because the weight connection $W_E^T W_D^S$ across consecutive modules is constant across inputs, upstream-to-downstream feature interactions exhibit exact edge invariance.
- Linear Computation Graph: Fixing the attention patterns determined by Query-Key (QK) circuits reduces the remaining network (OV pathways + Transcoder-replaced MLPs) to a directed acyclic graph composed solely of linear transformations interspersed with node-level ReLUs.
- Hierarchical Attribution: Unlike post-hoc thresholding, this breadth-first attribution algorithm cuts gradient flow on-the-fly during the backward pass for any node whose attribution score ($a_v \cdot \nabla_{a_v} a_t$) falls below a threshold $\tau$. This prevents upstream nodes from receiving credit through paths that are omitted from the circuit.
- Ablation-Free Evaluation: Because the graph is linear, the root node activation equals the exact sum of attribution scores from all leaf nodes ($\sum_{\text{deg}_{in}(v)=0} \text{attr}_{v,t}$), evaluating causal impact without inducing out-of-distribution "hydra" or self-repair effects.
Datasets
- Training Corpus: SAEs and Transcoders were trained on 1 billion tokens from the OpenWebText corpus.
- Evaluated Tasks & Benchmarks:
- Synthetic nested bracket sequences (e.g.,
0 0 [ 1 1 1 [ 2 ] 3 ] 4). - In-context induction sequences (e.g.,
"Video in WebM support: ... HTML5 video in WebM"). - The Indirect Object Identification (IOI) benchmark on GPT-2 Small, analyzing 20 prompt pairs across 30 sparsity thresholds.
Key Insights and Ideas
- Granular Discrepancies Behind Coarse Equivalence: In head-level analyses, the prompt variants $s_{\text{John}}$ ("When John and Mary...") and $s_{\text{Mary}}$ ("When Mary and John...") activate the same high-level heads (Name Mover, S-Inhibition, Induction). However, zoom into SAE features reveals completely different mechanisms:
- In $s_{\text{John}}$, the answer
"Mary"is captured via a Consecutive Entity feature (activated because it follows"and"). - In $s_{\text{Mary}}$, the target is represented by a Centered Entity feature (the primary topic preceding
"and"). - Two-Step Attention Deconstruction: Attention behaves as two distinct linear/bilinear operations over features: QK operates as a bilinear operator deciding token interaction, after which OV executes linear feature transport.
- Pruning Noise via Dynamic Backprop: Detaching nodes during backpropagation consistently achieves higher faithfulness (logit recovery) for a given circuit size than traditional post-backward attribution.
Key Results
- Transcoder & SAE Fidelity: Trained dictionaries (24,576 features per site, $32\times$ model width) explained 73%–94% of activation variance. For example, layer 0 Transcoder (L0M) attained 94.16% variance explained and a 99.65% cross-entropy reconstruction score.
- Single-Pass Circuit Faithfulness: Hierarchical Attribution consistently outperformed standard attribution across all 30 evaluated sparsity thresholds on IOI prompts.
- Micro-mechanisms Uncovered:
- Bracket Circuit: Layer 0 opening-bracket features account for 104.1%–314.2% of the layer 1 In-Square-Bracket feature activation (via head L1A.H1), while closing-bracket features actively suppress it.
- Induction Circuit: In copying the
"M"token, feature L0M.88 provides 35.0% of the Capital Induction feature's activation, mediated by previous-token features in L2A and head L5A.H1.
Limitations and Future Work
- Input-Specificity: The isolated computation graphs are input-conditioned. While feature edges remain invariant, attention scores and active ReLUs change per prompt, creating a trade-off between fine-grained fidelity and generalizability across datasets.
- SAE Reconstruction Errors: Despite pruning and post-training finetuning, SAE/Transcoder reconstructions carry non-zero error terms that cannot be directly interpreted.
- Future Work: Developing methods to aggregate these input-specific feature subgraphs into universal, abstract circuit representations across broader model families and tasks.
Summary updated