Interpretability at Scale: Identifying Causal Mechanisms in Alpaca

Zhengxuan Wu, Atticus Geiger, Thomas Icard, Christopher Potts, Noah D. Goodman

TL;DR

This paper introduces "Boundless DAS," a scalable method for uncovering interpretable causal mechanisms within large language models (LLMs). They demonstrate that Alpaca, a 7B parameter LLM, solves a numerical reasoning task by implementing a simple, two-variable causal model, and that this learned mechanism is robust to variations in input and instructions.

What Problem Does This Paper Address?

As LLMs become increasingly powerful and integrated into society, understanding their internal workings is crucial for AI safety, trustworthiness, and identifying biases. While methods for interpreting smaller models exist, scaling them to the billions of parameters in modern LLMs has been a significant challenge. Specifically, existing methods like Distributed Alignment Search (DAS) rely on brute-force searches that become computationally infeasible with larger models. The authors aim to bridge this gap by developing a method that can faithfully explain the causal mechanisms underlying LLM behavior at scale.

Methods

The core contribution is Boundless DAS, an extension of the Distributed Alignment Search (DAS) method. DAS uses a theory of causal abstraction to find alignments between interpretable symbolic variables and distributed neural representations. The "boundless" aspect comes from replacing the brute-force search for the dimensionality of neural representations with learned parameters. This allows Boundless DAS to efficiently search for interpretable causal structures in LLMs. The method involves training a rotation matrix and learned boundary masks to align neural representations with hypothesized causal variables. Interchange Intervention Accuracy (IIA) is used as the primary metric to evaluate the faithfulness of these alignments.

Datasets

The primary dataset used is the Alpaca (7B) model's instruction-following data, specifically for a "Price Tagging Game" task. This task involves an instruction to say "yes" if a cost falls within a specified range, and "no" otherwise. The authors generated counterfactual datasets for training Boundless DAS, where examples were paired with base and source inputs, intervention indicators, and counterfactual labels. They also generated irrelevant contexts using GPT-4 for robustness testing.

Key Insights and Ideas

  • Scalability is Key: The development of Boundless DAS is a crucial step towards making interpretability methods practical for the massive LLMs we use today.
  • Alpaca's Simplicity: Despite its capabilities, Alpaca appears to solve the numerical reasoning task using a surprisingly simple, two-variable causal model, rather than a complex, emergent one.
  • Robustness of Learned Mechanisms: The identified causal mechanisms in Alpaca are not brittle; they generalize well to unseen inputs and instructions, suggesting a stable internal representation.
  • Causal Abstraction as a Foundation: The paper strongly grounds its work in the theory of causal abstraction, providing a formal framework for understanding and validating the discovered alignments.

Key Results

  • Boundless DAS successfully identified interpretable causal mechanisms in the Alpaca (7B) model for a numerical reasoning task.
  • The "Left Boundary" and "Left and Right Boundary" hypotheses showed high Interchange Intervention Accuracy (IIA), reaching up to 0.90 and 0.86 respectively, indicating faithful alignment with Alpaca's internal representations.
  • These learned alignments were robust, showing minimal drop in IIA when tested with new price brackets (94% IIAmax) and irrelevant contexts (83% IIAmax).
  • The method demonstrated that only a small fraction (5-10%) of the representation space is needed for aligning a causal variable, and these representations can be efficiently identified.

Limitations and Future Work

  • Hypothesis Space: While Boundless DAS explores a flexible hypothesis space, it is not completely exhaustive. The authors acknowledge that they are limited by the set of causal models they choose to test.
  • Task Accuracy: For models with task accuracy below 100%, it's possible for IIA to reach 100% if the causal model explains errors. However, in cases where the model is near-perfect, Boundless DAS might find only partial support for causal structure.
  • Whole Layer Representation: Applying Boundless DAS to the entire layer representation of very large models is currently intractable due to memory constraints.
  • Future Work: The authors suggest extending this work to larger LLMs, exploring more complex reasoning tasks requiring multiple steps, and incorporating human feedback for testing hypotheses. They also propose modeling errors in LLMs in more detail to further refine the connection between task performance and interpretability.

Summary updated

BibTeX
@inproceedings{wu2023interpretability,
  author = {Zhengxuan Wu and Atticus Geiger and Thomas Icard and Christopher Potts and Noah D. Goodman},
  title = {{Interpretability at Scale: Identifying Causal Mechanisms in Alpaca}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=nRfClnMhVX},
}
Figure