Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition
Zhengfu He, Junxuan Wang, Rui Lin, Xuyang Ge, Wentao Shu, Qiong Tang, Junping Zhang, Xipeng Qiu
TL;DR
This work tackles the challenge of interpreting Transformer attention by addressing attention superposition, where atomic attention units are entangled across many MHSA heads. It introduces Low-Rank Sparse Attention (Lorsa), an overcomplete, sparsity-constrained replacement for MHSA that yields thousands of 1D read/write units (OV circuits) and selects Top-K active heads per token to reconstruct MHSA outputs. Lorsa recovers known attention mechanisms (e.g., induction heads, name movers) and reveals new interpretable behaviors, including arithmetic-specific heads and thematic anchors, while achieving interpretability comparable to Sparse Autoencoders (SAEs) and enabling cross-head attribution of Q/K/V activity. The approach enables finer-grained circuit discovery and provides tools for automated interpretability assessment, though challenges remain in achieving fully independent QK circuits and in understanding cross-layer interactions, with potential implications for in-context learning analysis and model biology.
Abstract
We propose Low-Rank Sparse Attention (Lorsa), a sparse replacement model of Transformer attention layers to disentangle original Multi Head Self Attention (MHSA) into individually comprehensible components. Lorsa is designed to address the challenge of attention superposition to understand attention-mediated interaction between features in different token positions. We show that Lorsa heads find cleaner and finer-grained versions of previously discovered MHSA behaviors like induction heads, successor heads and attention sink behavior (i.e., heavily attending to the first token). Lorsa and Sparse Autoencoder (SAE) are both sparse dictionary learning methods applied to different Transformer components, and lead to consistent findings in many ways. For instance, we discover a comprehensive family of arithmetic-specific Lorsa heads, each corresponding to an atomic operation in Llama-3.1-8B. Automated interpretability analysis indicates that Lorsa achieves parity with SAE in interpretability while Lorsa exhibits superior circuit discovery properties, especially for features computed collectively by multiple MHSA heads. We also conduct extensive experiments on architectural design ablation, Lorsa scaling law and error analysis.
