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

The paper introduces Low-Rank Sparse Attention (Lorsa), a novel sparse replacement module for Transformer attention layers that decomposes complex, multi-dimensional attention heads into thousands of simple, 1D "attention units." By disentangling the messy phenomenon of attention superposition, Lorsa uncovers cleaner, finer-grained versions of known model behaviors and exposes entirely new mechanisms, such as specialized arithmetic trackers and long-range thematic anchors.

What Problem Does This Paper Address?

In mechanistic interpretability, researchers try to understand neural networks by reverse-engineering their internal circuits. While we have made progress understanding some specific Multi-Head Self-Attention (MHSA) behaviors (like "induction heads" that handle pattern copying), most attention heads remain a black box.

The core issue is attention superposition. Much like individual neurons in a feedforward network can be "polysemantic" (activating for multiple unrelated concepts), standard attention heads often multiplex many different tasks at once, or conversely, spread a single task across multiple heads. This overlapping behavior makes it incredibly difficult to trace how information is routed between tokens. The authors aim to break down these superimposed attention behaviors into isolated, human-comprehensible components.

Figure 1: (A) Low-Rank Sparse Attention (Lorsa) comprises thousands of sparsely activated attention heads with 1D outputs, designed to extract interpretable attention units from the original Multi Head Self Attention (MHSA). (B) Lorsa serves as a replacement model for Transformer attention, substituting sparse interpretable components for attention modules. (C) Each Lorsa head explains an atomic feature-feature interaction across token positions, which was originally a part of an MHSA head or spread across multiple heads, i.e. put in attention superposition.

Methods

The authors propose Low-Rank Sparse Attention (Lorsa) as a drop-in sparse replacement for standard MHSA layers. Its architecture relies on three main pillars:

  1. Overcomplete, 1D Attention Heads: Instead of a few multi-dimensional heads, Lorsa scales up to thousands of heads ($N_{Lorsa} \gg N_{MHSA}$). Crucially, each head is restricted to a 1-dimensional Output-Value (OV) circuit, forcing it to read from and write to only a single feature direction in the residual stream.
  2. Top-K Sparsity: To keep computation manageable and force specialization, only a small subset ($K$) of the most salient Lorsa heads are allowed to activate for any given token position.
  3. Parameter-Shared QK Circuits: To prevent parameter explosion and maintain scalability, groups of Lorsa heads share their Query-Key (QK) weights. This ensures that while the heads look for information using a shared attention pattern, they extract and output entirely different 1D features.

Lorsa is trained by minimizing the mean squared error (MSE) between its outputs and the outputs of the original target model's attention layers.

Datasets

The Lorsa modules were trained using text data sampled from SlimPajama, utilizing a total training set of 800 million tokens. The method was evaluated on two open-source target models:

  • Pythia-160M (evaluated with a context length of 256 tokens)
  • Llama-3.1-8B (evaluated with a context length of 1024 tokens)

Key Insights and Ideas

  • Superposition is Real and Quantifiable: By projecting Lorsa units back onto the original attention heads, the authors found that roughly half of the learned attention units are spread across multiple original MHSA heads. This provides direct, empirical evidence of attention superposition in the wild.
  • Granular Mechanics: Instead of a single "successor head" doing multiple things, Lorsa isolates distinct sub-behaviors. For instance, it separates the mechanism that increments days of the week ("Monday" $\rightarrow$ "Tuesday") from the one that increments numbers ("1" $\rightarrow$ "2").
  • Discovery of Arithmetic Heuristics: In Llama-3.1-8B, Lorsa exposed a family of heads dedicated to tracking specific mathematical properties during simple arithmetic operations (e.g., heads that specifically look for operands that are "near 30" or "end in 4 or 6").
  • Thematic Anchors: The authors discovered a class of long-range heads that attend to specific topical keywords (like "presidency") and broadcast that thematic context to all subsequent tokens, likely biasing the model toward domain-appropriate vocabulary.

Key Results

  • Interpretability Parity with SAEs: Using automated interpretability (where GPT-4o generates and scores explanations for head activations), Lorsa achieved scores comparable to Sparse Autoencoders (SAEs), proving that its attention units are highly monosemantic and human-comprehensible.
Figure 3: Automated interpretability scores of Lorsa heads and SAE features. Each distribution is estimated with 100 heads / features. The average score of each group is represented by a horizontal dash line. We highlight distributions with larger mean value suggested by t-tests with α = 0.05.
  • The "Dark Matter" Connection: The authors observed a strong correlation between the errors made by Lorsa and those made by SAEs trained on the same layers. This suggests a universal "dark matter"—shared blind spots where sparse dictionary learning methods struggle to capture highly non-linear or ultra-rare data components.
  • Ablation Constraints: The architectural choices were validated through rigorous ablation studies. Notably, the authors found that reducing the QK dimension below the original MHSA head dimension severely degrades performance, justifying their parameter-sharing design.

Limitations and Future Work

  • Bound QK Circuits: Because groups of Lorsa heads share QK weights, they are not completely independent. Overcoming performance drops when unbinding these circuits remains an open challenge.
  • Dead Heads: Despite hyperparameter tuning, a significant portion of the overcomplete Lorsa heads remain inactive ("dead"), leading to wasted computational capacity during training.
  • Single-Layer Focus: The current iteration of Lorsa only decomposes attention within a single layer. It cannot yet account for cross-layer attention superposition, where features interact across multiple layers of the network.

Summary updated

BibTeX
@inproceedings{he2026towards,
  author = {Zhengfu He and Junxuan Wang and Rui Lin and Xuyang Ge and Wentao Shu and Qiong Tang and Junping Zhang and Xipeng Qiu},
  title = {{Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=9A2etpDFIB},
}
Figure