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

Finding Highly Interpretable Prompt-Specific Circuits in Language Models

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

Introduction: Moving Beyond Task-Level Circuits

In mechanistic interpretability, the goal is to reverse-engineer Large Language Models (LLMs) by identifying "circuits"—specific sub-networks of attention heads and neurons that collaborate to perform a task. Historically, these circuits have been identified at the task level. For instance, researchers might average internal activations across thousands of prompts for "Indirect Object Identification" (IOI) to find a single representative circuit.

However, this averaging process is a lossy simplification. It assumes a model uses one stable mechanism for a task, regardless of phrasing. If different prompt structures trigger different internal strategies, averaging them creates a "confounded" description that doesn't accurately reflect any single execution. This research shifts the unit of analysis from the task to the individual prompt, revealing that circuits are highly prompt-specific.

The ACC++ Framework

To enable this granular analysis, the authors introduce ACC++ (Refined Attention Causal Communication), an upgrade to the existing ACC framework. ACC++ extracts causal signals from a single forward pass, making it significantly more scalable than traditional "activation patching" methods.

Key technical refinements include:

  • SVD-based Decomposition: Using Singular Value Decomposition on Query-Key (QK) matrices to isolate specific "directions" in the residual stream through which heads communicate.
  • Integrated Gradients (IG): Applying IG to attribute importance, which accounts for the competitive nature of the Softmax function more effectively than linear proxies.
  • Rank-1 Simplicity: Most discovered causal signals are "rank-1," meaning they rely on a single mathematical direction, which greatly simplifies interpretation.

Prompt-Specific Circuitry and Clustering

The core finding is that there is no "universal IOI circuit." Even within a single model, different prompt structures induce systematically different mechanisms. However, these variations are not random; prompts cluster into "families" with similar algorithmic strategies.

Jaccard distance heatmaps showing that circuits cluster by prompt family across different models.

As shown in the heatmaps above, models like GPT-2 Small and Pythia-160M exhibit clear block-diagonal structures in their circuit similarity (measured by Jaccard distance). This indicates that while circuits vary, they do so consistently based on prompt templates. For example, GPT-2's internal logic shifts based on name order (ABBA vs. BABA), while Pythia is more sensitive to low-level syntactic connectives.

Automated Interpretability and Discovery

To scale the understanding of these circuits, the researchers developed an automated pipeline. It identifies the mathematical signals, finds activating text snippets in large datasets, and uses an LLM to generate human-readable descriptions of each component's function.

An automated mechanistic explanation of a prompt-specific circuit in GPT-2 Small.

This pipeline successfully "dissected" complex behaviors. For instance, in BABA prompts, GPT-2 utilizes a specific "parallel-structure" detector to identify the second name. In ABBA prompts, where that structure is absent, the model falls back on more generic positional features. Using a strict statistical criterion, the authors found that 63% of signals in GPT-2 and 50% in Pythia were highly interpretable, often corresponding to specific linguistic roles like "the second item in a parallel pair."

Conclusion

By shifting the focus from tasks to prompts, this work provides a more faithful representation of how LLMs actually compute. ACC++ allows for the discovery of compact, highly interpretable circuits that reveal the "library" of sub-circuits models swap in and out depending on context. Future work will look to apply these methods to more complex reasoning tasks and use these insights to improve model robustness against prompt variations.

Summary updated

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