Some Attention is All You Need for Retrieval
Felix Michalak, Steven Abreu
TL;DR
This work shows that in hybrid SSM-Transformer models, retrieval is exclusively handled by self-attention, with SSMs contributing no retrieval capability. Using entropy-based attention sparsification and Just Read Twice prompting across RG-2B, RG-9B, and Jamba, the authors demonstrate that removing most attention heads catastrophically kills retrieval, while keeping as few as ~15% of heads preserves retrieval and much of MMLU performance. They further reveal that retrieval requires precise mechanistic conditions, including needle-token exposure during generation and sufficient context during prefill or generation. These results argue for strict specialization within hybrid architectures, offering actionable implications for architecture optimization and interpretability, such as targeted sparsification and retrieval-focused modules. The study thus provides a concrete, mechanistic view of how hybrid models organize computation, moving beyond assumptions of redundancy toward task-specific computational delegation.
Abstract
We demonstrate complete functional segregation in hybrid SSM-Transformer architectures: retrieval depends exclusively on self-attention layers. Across RecurrentGemma-2B/9B and Jamba-Mini-1.6, attention ablation causes catastrophic retrieval failure (0% accuracy), while SSM layers show no compensatory mechanisms even with improved prompting. Conversely, sparsifying attention to just 15% of heads maintains near-perfect retrieval while preserving 84% MMLU performance, suggesting self-attention specializes primarily for retrieval tasks. We identify precise mechanistic requirements for retrieval: needle tokens must be exposed during generation and sufficient context must be available during prefill or generation. This strict functional specialization challenges assumptions about redundancy in hybrid architectures and suggests these models operate as specialized modules rather than integrated systems, with immediate implications for architecture optimization and interpretability.
