The Promise and Peril of Mechanistic Interpretability
To understand the "black box" of deep learning, researchers increasingly turn to mechanistic interpretability. A common first step in this process involves simplifying a model's internal representations to make them human-readable. Techniques like Singular Value Decomposition (SVD) are used to reduce the dimensionality of hidden states, or clustering is applied to find discrete, rule-like behaviors. Researchers then study this simpler "proxy" model, assuming it faithfully represents the original network's underlying computations.
But is this assumption safe? This paper investigates whether these simplified proxies actually capture the true mechanisms of the model, particularly when the model faces out-of-distribution (OOD) data. The authors reveal a concerning "interpretability illusion": a simplified proxy model might perfectly mimic the original model on familiar training data, but completely fail to capture how the model behaves in novel situations. Consequently, any safety or behavioral guarantees derived from that interpretation may be fundamentally flawed.
Testing the Faithfulness of Proxies
To explicitly measure this "generalization gap," the researchers trained small-scale Transformer language models on controlled sequence modeling tasks with clear, systematic generalization splits:
- Dyck Languages: Synthetic datasets of balanced parentheses (e.g.,
[ { } ]). Models were trained on sequences up to a nesting depth of 10 and tested on unseen structures and deeper nesting depths (up to 20). - CodeSearchNet: A dataset of computer code for character-level next-token prediction. Models trained on Java were tested on Java with deeper bracket nesting, as well as entirely unseen languages like JavaScript, PHP, and Go.
The authors created simplified versions of the models' attention mechanisms using three methods:
- Dimensionality Reduction (SVD): Projecting key and query embeddings onto their top principal components (a data-dependent simplification).
- Clustering: Using k-means to group key and query embeddings, replacing them with discrete cluster centers (data-dependent).
- Hard Attention: Forcing the model to use "one-hot" attention, attending only to the highest-scoring token instead of standard soft attention (data-independent).
They then compared the predictions and attention patterns of the original models against these simplified proxies on both in-distribution (ID) and out-of-distribution (OOD) test sets.
The Interpretability Illusion in Action
The results demonstrate that simplified proxy models can be highly faithful to the original model on in-domain data, tricking researchers into thinking they've found the true mechanism. However, this faithfulness often breaks down on OOD data.
Underestimating Generalization
Data-dependent simplifications (like SVD and clustering) often underestimate the original model's ability to generalize. They tend to capture coarse-grained features—such as whether a bracket is at an odd or even depth—that work perfectly for simple, in-distribution cases. However, they discard the high-dimensional, fine-grained features the model actually relies on for complex, OOD reasoning.
For example, in the Dyck task, reducing key/query embeddings to just 4 dimensions via SVD yielded nearly 100% prediction similarity with the original model on in-distribution data. But on OOD data (unseen structures), the simplified model's faithfulness plummeted, diverging significantly from the original model's predictions.
Similarly, in the code completion task, simplifying the specific "induction head" responsible for copying repeated words dropped ID prediction similarity to 75%, and OOD similarity down to 61%. This proves the model relies on higher-dimensional features to execute copying mechanisms in unfamiliar contexts.
Overestimating Generalization
Conversely, data-independent simplifications can sometimes overestimate generalization. By forcing hard attention, researchers apply a tweak that perfectly aligns with the ideal human-written algorithm for bracket matching. As a result, the simplified proxy actually outperformed the original model on deeper, unseen depths, failing to faithfully represent the original model's actual (and more flawed) OOD behavior.
Conclusion and Future Directions
The generalization gap is most pronounced on strict "algorithmic" subtasks, where precise feature representation is critical. While this study focuses on small-scale Transformers trained on narrow tasks, it raises vital questions about how these illusions might manifest in massive, natural language models like GPT-4 or Llama.
Real-world interpretability often involves simplifying entire circuits (subgraphs of multiple components) rather than isolated heads. Simplifying whole circuits simultaneously might cause even more dramatic distribution shifts. Ultimately, the authors caution against relying solely on lossy, data-dependent simplifications when trying to guarantee model behavior, urging the community to evaluate interpretability proxies across a wider variety of distribution shifts.
Summary updated