Abstract
Neural networks are often characterized as "black boxes" due to the difficulty of interpreting their high-dimensional internal activations. We present InversionView, a general-purpose interpretability method designed to decode the information hidden within these activations by sampling their "preimage"—the set of inputs that produce similar internal states. By training a conditional decoder to reconstruct inputs from specific activations, researchers can directly observe the concepts a model represents at any given layer. We demonstrate the utility of InversionView across diverse tasks, including arithmetic, linguistic processing, and factual recall, revealing human-understandable algorithms and enabling the discovery of fully verified neural circuits.
1. Introduction
Despite the transformative success of transformer-based models, understanding their internal logic remains a significant challenge. Internal representations are continuous, high-dimensional vectors that do not naturally map to human language or logic. Existing interpretability tools, while useful, possess inherent limitations: supervised probes require prior hypotheses, logit lens techniques are restricted to the final vocabulary space, and causal interventions often show information flow without clarifying the underlying content.
InversionView addresses these gaps by providing a hypothesis-free method to decode neural activations. By asking "What does this specific vector represent?" and answering it through input reconstruction, InversionView allows for the discovery of internal mechanisms that were previously opaque.
2. Methodology: The $\epsilon$-Preimage
The foundational concept of InversionView is the $\epsilon$-preimage. If an activation vector $z$ encodes a specific concept (e.g., a numerical value or a grammatical role), then any input sequence containing that concept should produce a similar activation. Conversely, inputs lacking that concept should produce a distant activation.
To explore this preimage, the InversionView pipeline follows four primary steps:
- Conditional Decoder Training: A small, auxiliary transformer is trained to take an activation from the target model as input and reconstruct the original input sequence.
- Neighborhood Sampling: By adjusting sampling temperature and introducing noise to the query activation, the decoder generates a variety of inputs that the original model treats as functionally similar.
- Commonality Analysis: Researchers identify consistent features across the generated samples. If every sample generated from a specific activation contains the digit "5" in the hundreds place, it can be inferred that the activation specifically encodes that information.
- Causal Verification: To ensure the decoded information is functional rather than incidental, activation patching is used to confirm that the identified features are what the model uses to reach its final output.
3. Experimental Evaluation
The authors evaluated InversionView across four distinct domains to test its versatility:
- Character Counting: A synthetic task requiring the model to count occurrences of a target character in a random string.
- Indirect Object Identification (IOI): A linguistic task using templates (e.g., "When Mary and John went to the store, John gave a drink to...") to track how models identify entities.
- 3-Digit Addition: A mathematical task (e.g., "B362+405=767E") used to reverse-engineer arithmetic logic.
- Factual Recall: Utilizing subsets of the COUNTERFACT and BEAR datasets to explore knowledge retrieval in GPT-2 XL (1.5B parameters).
4. Key Insights and Results
4.1 Information Abstraction and Forgetting
In the character counting task, InversionView revealed a clear trajectory of information processing. Early layers encode both the identity of the character and its count. However, as the signal progresses, the character's identity is "forgotten" by the model—the decoder begins generating random characters—while the count is reinforced. This demonstrates how models prune irrelevant data to focus on the task-specific objective.
4.2 Granularity of Mathematical Representation
In the 3-digit addition task, the method highlighted the specialized roles of different attention heads. Some heads represent digits as distinct entities, while others represent them only as a combined sum. This suggests that transformers utilize different "data types" or levels of abstraction at different stages of a calculation. Notably, InversionView enabled the discovery of the first fully causally verified circuit for 3-digit addition, mapping the precise logic of carry-over operations across layers.
4.3 Scaling and Fidelity
When applied to GPT-2 XL, InversionView successfully identified heads specialized in retrieving specific relations (e.g., "developed by") versus subjects (e.g., "Microsoft"). In the addition task, the decoder achieved an average "in-preimage rate" of 88.6%, indicating that the generated samples were highly representative of the original activation's neighborhood. Furthermore, in the IOI task, the method provided more nuanced interpretations than previous manual analyses, identifying heads that encode positional information rather than just token identity.
4.4 Automated Interpretability
Because InversionView outputs human-readable text, it facilitates automated analysis. The authors demonstrated a proof-of-concept where Claude 3 was used to summarize the commonalities in decoded samples, potentially alleviating the human bottleneck in interpretability research.
5. Limitations and Future Work
While powerful, InversionView faces several challenges. Training the conditional decoder is computationally expensive, requiring significant GPU time. The results are also sensitive to the choice of distance metrics (e.g., Euclidean vs. Cosine) and the $\epsilon$ threshold. While the method scales to 1.5B parameter models, its efficacy on frontier models (70B+) remains to be tested, as the mapping from activations back to inputs becomes increasingly complex. Future research may also extend this framework beyond text to vision and audio modalities.
6. Conclusion
InversionView represents a significant step toward making neural networks transparent. By shifting the focus from what a model might be doing to what its activations actually represent, this method provides a robust framework for discovering the internal algorithms that drive modern AI.
Summary updated