LLM Circuit Analyses Are Consistent Across Training and Scale

Curt Tigges, Michael Hanna, Qinan Yu, Stella Biderman · DOI

Introduction

Mechanistic interpretability aims to reverse-engineer Large Language Models (LLMs) by identifying "circuits"—specific internal subgraphs of neurons and attention heads that implement discrete algorithms, such as identifying the indirect object in a sentence. Historically, most research in this field has focused on a single "snapshot" of a model, typically at the conclusion of its pre-training phase. This raises a fundamental question: are these circuits merely fleeting artifacts of a specific training checkpoint, or do they represent stable, fundamental ways that transformer architectures solve problems?

A collaborative study by researchers from EleutherAI, Brown University, and the University of Amsterdam addresses this by examining the consistency of these internal mechanisms across both training time and model scale. By analyzing the Pythia model suite, the authors demonstrate that the algorithms models use to solve tasks are remarkably stable, suggesting that mechanistic insights gained from small, early-stage models can reliably generalize to massive, production-ready systems.

Methodology

The researchers leveraged the Pythia model suite, which is uniquely suited for this study as it provides public checkpoints at various stages of training across a wide range of scales (from 70 million to 12 billion parameters). To map out the models' internal logic, several key techniques were employed:

  • Circuit Discovery (EAP-IG): The team used Edge Attribution Patching with Integrated Gradients to efficiently identify the most important connections (edges) between layers for specific tasks. This method is significantly faster than traditional patching, enabling the analysis of hundreds of checkpoints.
  • Path Patching: A causal intervention technique used to verify that a specific path between components actually performs the hypothesized function.
  • Functional Scoring: The authors developed metrics to "score" attention heads based on known behaviors, such as Induction Heads (pattern completion), Successor Heads (counting/sequencing), and Name Mover Heads (token copying).
  • Jaccard Similarity: To measure structural stability, they used Jaccard similarity to compare the composition of circuit nodes (heads and MLPs) across different training stages.

The study evaluated models on four core "mechanistic" tasks: Indirect Object Identification (IOI), Greater-Than sequence completion, Gendered Pronoun prediction, and Subject-Verb Agreement (SVA).

Key Results: Emergence and Stability

A primary insight from the study is the "Quantization" of Learning. Task abilities and the specific components that support them, such as induction heads, emerge at nearly the same point in training—roughly between 2 billion and 5 billion tokens—regardless of whether the model has 70 million or 2.8 billion parameters. This suggests that the emergence of these capabilities is driven primarily by data exposure rather than raw parameter count.

Performance metrics across four mechanistic tasks as a function of training tokens and model scale.

As illustrated in the figure above, performance metrics (logit or probability differences) for all four tasks stabilize early and remain consistent throughout the remainder of the 300-billion-token training process. While larger models achieve higher absolute performance and exhibit more stable internal components with fewer abrupt fluctuations, the high-level algorithmic structure remains scale-invariant.

Algorithmic Consistency and Scale

The research highlights a significant distinction between algorithmic stability and component fluctuation. While the specific attention heads involved in a circuit might swap out during training—a form of "load balancing" or "self-repair"-—the underlying algorithm (the way information flows through the model) remains remarkably consistent.

Furthermore, circuits in small models often appear as "miniature" versions of those in larger models. Larger models do not necessarily invent entirely new algorithms for these tasks; instead, they utilize a larger "budget" of nodes to implement the same logic more robustly. There is a strong positive correlation (Pearson $r$ between 0.6 and 0.9) between model size and the number of nodes recruited for a task.

Conclusion

The finding that circuits are consistent across scales has profound implications for the field of AI safety and interpretability. It suggests that researchers can perform the "heavy lifting" of mechanistic analysis on tiny, computationally inexpensive models and expect those insights to hold for frontier-scale models.

However, limitations remain. This study focused on relatively simple, "solved" tasks. Future work is required to determine if more complex reasoning or coding tasks exhibit the same algorithmic stability. Additionally, extending this research to non-transformer architectures, such as Mamba or Mixture-of-Experts (MoE), will be crucial for a universal understanding of how neural networks learn and organize information.

Summary updated

BibTeX
@inproceedings{tigges2024llm,
  author = {Curt Tigges and Michael Hanna and Qinan Yu and Stella Biderman},
  title = {{LLM Circuit Analyses Are Consistent Across Training and Scale}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=3Ds5vNudIE},
}
Figure