Abstract
Researchers have discovered that despite their radically different architectures, Transformer and Mamba language models converge on a surprisingly similar set of internal "features" and "circuits." While they share the same fundamental logic for tasks like in-context learning, Mamba exhibits a unique "Off-by-One" quirk where it processes token information one step later than its Transformer cousins. This study provides compelling evidence for the Universality Hypothesis in mechanistic interpretability.
What Problem Does This Paper Address?
In the world of Mechanistic Interpretability, researchers try to "reverse engineer" neural networks to understand the specific algorithms they use to process language. However, most of this work has focused exclusively on the Transformer architecture.
As new architectures like Mamba (based on State Space Models or SSMs) gain popularity, a critical question arises: Is our understanding of AI "universal," or is it architecture-specific? If different models converge on the same internal solutions for the same tasks, then what we learn about Transformers will remain relevant for whatever comes next. This paper tests that hypothesis by comparing the "interpretable primitives" of Transformers (specifically Pythia) and Mambas.
Methods
To compare these two "black boxes," the authors used several sophisticated tools:
- Sparse Autoencoders (SAEs): These are used to decompose the messy, high-dimensional activations of a model into thousands of "features" that represent single, understandable concepts (e.g., a feature that fires only on "legal terminology" or "the word 'in'").
- Max Pairwise Pearson Correlation (MPPC): A metric used to match features between models. If a feature in Pythia (Transformer) and a feature in Mamba both fire on the exact same tokens in a massive dataset, they are considered "mechanistically similar."
- Skylines and Baselines: To know if a similarity score is actually "good," the authors compared cross-architecture results against "skylines"—the similarity between two identical models trained with different random seeds.
- Path Patching: A causal intervention technique used to identify "induction circuits"—the specific internal pathways models use to perform "in-context learning" (completing patterns like
[A][B]...[A] -> [B]).
The study utilized standard large-scale text corpora, including The Pile (for original training), SlimPajama (for extracting and matching SAE features), and RedPajama-Github & OpenWebText (for validation).
Key Insights and Results
Architecture-Agnostic Primitives
The "building blocks" of language modeling appear to be largely universal. Most features found in Transformers have a direct counterpart in Mamba, suggesting that the task of language modeling itself dictates the features, not the specific math of the layers. Simple features (like punctuation or specific parts of speech) are highly universal. However, as features become more semantically complex (e.g., abstract themes), the models begin to diverge slightly in how they represent them.
High Feature Overlap and Depth Specialization
The cross-architecture similarity (Mean MPPC = 0.681) was remarkably close to the "Model Seed" skyline (0.725). Over 55% of SAE features showed a correlation greater than 0.7 across architectures, far exceeding random baselines. This suggests that switching from a Transformer to a Mamba is only slightly more disruptive to internal features than retraining the same model with a different random seed.
Furthermore, features follow a "stretched" hierarchy. As shown in the depth distribution heatmap above, a feature found in layer $l$ of a 12-layer Transformer is most likely to be found around layer $2l$ in a 24-layer Mamba.
The "Off-by-One" Motif
This is the paper's most nuanced discovery regarding circuit-level differences. The authors successfully located induction circuits in Mamba. While Transformers use "Attention Heads" to look back at previous tokens, Mamba uses its SSM states to store "Key-Value" pairs, performing a functionally identical algorithm through a different mechanical process.
However, in Mamba, the local convolution layer (Conv) causes token information to be written into the SSM state at the next position. In contrast, Transformers typically process token interactions "live" within the same position. This structural quirk fundamentally shifts how Mamba models align their internal sequence processing compared to Transformers.
Limitations and Future Work
- SAE Imperfections: The authors acknowledge that Sparse Autoencoders only capture a subset of a model's "true" features. Some rare or nuanced features might behave differently across architectures but remain hidden from current SAEs.
- Qualitative Circuit Analysis: While the feature matching was quantitative, the circuit analysis (induction circuits) was largely qualitative. Future work could involve automated circuit discovery to compare the two architectures more rigorously.
- Model Scale: While the authors briefly tested 2.8B parameter models, the bulk of the study was on smaller models (~160M). It remains to be seen if "Universality" holds even more strongly or begins to break down as models grow to trillion-parameter scales.
Summary updated