NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Finding Interpretable Prompt-Specific Circuits in Language Models

Gabriel Franco, Lucas M. Tassis, Azalea Rohr, Mark Crovella

TL;DR

The paper introduces ACC++, an automated, single-forward-pass method to extract compact and human-interpretable computational "circuits" from Large Language Models (LLMs) on a per-prompt basis. By analyzing the low-dimensional subspaces through which attention heads communicate, ACC++ reveals that LLMs dynamically shift their internal mechanisms based on prompt structure and language, even when reusing the exact same attention heads.

What Problem Does This Paper Address?

A major goal in mechanistic interpretability is to map the inner workings of LLMs into "circuits"—networks of attention heads and MLP layers that collaborate to solve specific tasks (like syntax parsing or factual recall). However, standard circuit-discovery methods like activation patching are computationally expensive, require hand-crafted counterfactual datasets, and often produce massive, noisy graphs that are difficult for humans to interpret.

Furthermore, existing methods struggle to explain why an attention head attends to a specific token on a per-prompt level. They typically look at which components are active, rather than the specific low-dimensional mathematical "signals" (subspaces) being transmitted between those components. This paper addresses these gaps by refining Attention-Causal Communication (ACC) to find cleaner, smaller, and highly interpretable prompt-specific circuits without needing any model interventions or patching.

Methods

ACC++ builds upon the concept that attention heads communicate via low-dimensional channels exposed by the Singular Value Decomposition (SVD) of their Query-Key (QK) matrices.

The ACC++ pipeline operates directly on a single forward pass through the following steps:

  1. Residual Decomposition: The residual stream at a target destination token is broken down into the individual additive outputs of all upstream components (previous attention heads and MLPs).
  2. Precise Signal Projection: These upstream outputs are projected onto the left (query-side) or right (key-side) singular vectors of the target head's QK matrix, creating precise candidate signals.
  3. Nonlinear Attribution: Instead of using a linear surrogate approximation like prior work, ACC++ computes the causal importance of each signal directly on the nonlinear, post-Softmax attention weight using Integrated Gradients (IG).
  4. Greedy Counterfactual Search: Candidates are ranked by their IG scores and greedily removed until the head's attention on the source token drops below a specific threshold ($\tau$). The remaining omitted components form the causal circuit.
Figure 1: ACC++ method (destination side; source side is analogous). Given an attention head (ℓ, a) attending to a token pair (d, s), ACC++ identifies which upstream contributions drive the attention in four steps. (a) Select head and token pair, (b) Decompose the destination residual, (c) Construct candidate signals from singular directions, and (d) Compute attribution by Integrated Gradients and greedily remove.

Additionally, the authors introduce a Unified QK Analysis that mathematically folds architectural complexities like biases and Rotary Positional Embeddings (RoPE) directly into the token representations. This allows a single, position-independent QK matrix to be used per head, vastly simplifying SVD-based analysis.

To make these circuits human-readable, the authors adapt an automated autointerpretation pipeline: they harvest top-activating text contexts for discovered signals from a text corpus, prompt an LLM (DeepSeek-R1) to synthesize a short natural-language description, and validate the description using an LLM judge (Gemma-3-27B-IT).

Datasets

The method was evaluated across several standard interpretability tasks and models (GPT-2 Small, Pythia-160M, and Gemma-2 2B):

  • Indirect Object Identification (IOI): Sentences like "When Mary and John went to the store, John gave the bottle to [Mary]". The authors curated a balanced dataset of 3,000 prompts varying across high-level templates (ABBA vs. BABA name orderings) and 15 low-level surface wordings.
  • Greater-Than (GT) & Gender Pronoun (GP): Used to benchmark circuit size and precision against prior methods.
  • Multilingual IOI (MIOI): A newly constructed dataset translating the IOI task into English, Spanish, French, and Portuguese with culturally natural names.
  • The Pile (pile-10k split): Used to find high-activation contexts for the automated signal interpretation pipeline.

Key Insights and Ideas

  • Dynamic Circuit Reconfiguration: LLMs do not rely on a single static circuit to solve a task. Circuits cluster tightly by prompt format. Interestingly, different models are sensitive to different things: GPT-2's internal circuits change drastically based on noun order (ABBA vs. BABA), whereas Pythia is highly sensitive to low-level surface wording changes.
  • Same Component, Different Signals: An attention head can perform the same high-level role using entirely different input features. For example, the "name-mover" head (9,9) in GPT-2 is active in both ABBA and BABA prompts, but ACC++ reveals it processes completely different, structurally distinct incoming signals in each case.
  • Multilingual Component Reuse vs. Signal Specificity: In multilingual settings, models reuse the exact same physical attention heads and MLPs across different languages. However, the signals traveling through these components are language-specific.
  • Circuits Mirror Linguistics: When clustering multilingual circuits based on their mathematical signals, the structural distances between the circuits correlate strongly with actual typological and genetic relationships between the languages (e.g., Spanish and Portuguese circuits are closer to each other than to English).

Key Results

  • Drastic Noise Reduction: ACC++ yields circuits that are 2× to 10× smaller (in terms of nodes and edges) than the original ACC method, without losing attention-level causality.
  • High Interpretability: A substantial portion of the causal signals are cleanly interpretable. The automated pipeline successfully assigned accurate natural-language descriptions to 63% of signals in GPT-2 Small, 50% in Pythia-160M, and 31% in Gemma-2 2B.
  • Linguistic Correlation: Cross-language circuit distances showed a strong Pearson correlation with URIEL+ language distance metrics ($r = 0.83$ for syntactic distance and $r = 0.88$ for genetic distance in mGPT).

Limitations and Future Work

  • Heuristic Thresholding: The method relies on a threshold parameter $\tau$ to determine when to stop pruning signals. Currently, this is set using a dataset-dependent heuristic rather than a universal, principled rule.
  • MLP Opacity: While ACC++ successfully identifies when an MLP layer outputs an attention-causal signal, it does not trace further upstream to explain what caused the MLP to fire that signal.
  • LLM-as-a-Judge Dependency: The automated interpretation metrics rely on an LLM judge, meaning descriptions are highly suggestive but not definitively conclusive without human validation.

Summary updated

BibTeX
@inproceedings{franco2026finding,
  author = {Gabriel Franco and Lucas M. Tassis and Azalea Rohr and Mark Crovella},
  title = {{Finding Interpretable Prompt-Specific Circuits in Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=FHfc57fnQe},
}
Figure