TL;DR
This paper adapts the "Attention Knockout" interpretability framework from Transformers to Mamba-1 and Mamba-2 State-Space Models (SSMs) to trace how factual information flows through them. The authors discover that while all large language models (LLMs) universally rely on subject tokens in late-intermediate layers to resolve facts, Mamba models process relations much later than Transformers and lack their characteristic "first-token" attention sink bias.
What Problem Does This Paper Address?
Transformer-based models dominate natural language processing, and researchers have developed a rich toolkit to understand how they store and retrieve facts (e.g., completing the prompt "Beats Music is owned by ___"). We know that Transformers use attention mechanisms to route information from "subject" tokens (e.g., "Beats Music") to the final token where the prediction happens.
However, structured state-space models (SSMs) like Mamba-1 and Mamba-2 are rising in popularity due to their linear-time scaling. Because SSMs compress context into a recurrent hidden state rather than maintaining an explicit attention matrix, it has been unclear exactly how and where factual information travels across their layers and tokens. This paper bridges that interpretability gap.
Methods
The authors exploit recent theoretical work showing that selective SSMs can be viewed through an attention-like lens. They adapt Attention Knockout—a technique that systematically zeroes out the information flow between specific tokens across a sliding window of layers—to see how next-token prediction probability changes.
- Mamba-1 Hidden Attention: They use the kernel representation of selective SSMs to isolate token-to-token relationships and set specific entries to zero.
- Mamba-2 Implicit Linear Attention: Since Mamba-2 can be mathematically formulated as a masked linear attention mechanism, they directly zero out entries in its implicit attention matrix.
- Feature Knockout (Novel): Leveraging Mamba's unique structure where each feature acts as an independent signal, they classify features based on their learned decay rate ($\bar{A}$). Features with slow decay are labeled context-dependent (retaining long-term history), while fast-decaying features are context-independent (focusing on local information). They selectively knock out these feature types to analyze their distinct roles.
Datasets
The study evaluates models using a subset of COUNTERFACT, a dataset consisting of factual triplets (subject, relation, attribute). To ensure any observed performance drops were strictly due to the knockout interventions, they focused on a clean subset of 672 triplets where all baseline models originally predicted the correct attribute.
Key Insights and Ideas
- The Universal Subject Bottleneck: Across Mamba-1, Mamba-2, GPT-2, Llama 3, and Mistral, blocking the final token from "attending" to the subject token in late-intermediate layers (around 70% model depth) causes a massive drop in accuracy. This suggests that factual retrieval dynamics might be an inherent property of autoregressive LLMs, regardless of whether they use attention or state-space equations.
- No "Attention Sinks" in Mamba: Transformers exhibit a strong "first-position bias," where the very first token acts as an attention sink. Mamba models completely lack this bias; blocking the first token has virtually no impact on performance.
- Delayed Relation Processing: GPT-2 relies heavily on relation tokens (e.g., "is owned by") in its earliest layers. In contrast, Mamba models only show significant dependence on relation tokens in their later layers.
- The Last-Token Paradox: In Mamba-1, knocking out the final token's self-attention in the ultimate layers surprisingly caused the correct-token probability to surge to nearly 1.0, regardless of its baseline likelihood.
Key Results
The authors validated their findings across multiple model sizes (ranging from 130M to 7B parameters).
As shown in the primary knockout experiments, removing information flow from the subject token consistently degrades the model's ability to predict the correct factual attribute:
When applying their novel feature-level intervention, they discovered that context-dependent features (those that decay slowly and maintain history) are almost entirely responsible for routing factual information. Knocking them out closely mirrors the catastrophic drop of knocking out all features simultaneously, whereas knocking out context-independent features has virtually no effect:
Limitations and Future Work
While this work successfully extends mechanistic interpretability to SSMs, the authors note several limitations:
- Coarse Layer Windows: The knockout is applied across continuous blocks of layers simultaneously, which might miss highly diffuse or intricate layer-skipping pathways.
- Inter-token Focus Only: The method isolates token-to-token communication but does not explain the role of token-independent operations unique to Mamba, such as local convolutions and gating mechanisms.
- The "Why" Remains Unclear: While the paper maps where information flows, it does not decipher the exact semantic content of the hidden representations being passed.
The authors suggest that these insights could pave the way for smarter model pruning (safely removing context-independent features) and highly targeted fine-tuning strategies for state-space architectures.
Summary updated