MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head

Kewei Zhang, Ye Huang, Yufan Deng, Jincheng Yu, Junsong Chen, Huan Ling, Enze Xie, Daquan Zhou

Abstract

Standard Transformers struggle with long sequences due to the quadratic computational cost of self-attention. While faster "linear attention" alternatives exist, they usually suffer a massive drop in accuracy and expressive power. This paper introduces Multi-Head Linear Attention (MHLA), a novel technique that splits tokens into distinct blocks to restore the model's sharp focus and representational capacity. MHLA achieves state-of-the-art performance across image classification, video generation, and NLP tasks while maintaining strict linear-time efficiency.

Generation results and multi-domain benchmark performance of MHLA, showcasing high-quality image synthesis and significant throughput speedups.

Introduction: The Bottleneck of Self-Attention

Self-attention is the engine powering modern Transformers, but its computational and memory costs scale quadratically ($O(N^2)$) with sequence length. If you double the length of a video or a document, the attention mechanism takes four times as long to process.

To resolve this, researchers developed linear attention ($O(N)$), which compresses all the "keys" and "values" of a sequence into a single, fixed-size global summary. However, this creates a severe bottleneck. The authors diagnose this failure mode as global context collapse. Because every "query" in the model is forced to look at the exact same global summary, the model loses its ability to focus on specific, relevant tokens. Mathematically, the attention matrix suffers from rank limitation (it runs out of capacity to represent diverse interactions) and loss of sparsity (attention weights get smeared uniformly across all tokens instead of focusing sharply on a few).

Previous attempts to fix linear attention usually involved bolting on extra modules—like depthwise convolutions or hybrid self-attention layers—which re-introduced computational overhead and defeated the original purpose of linear scaling.

Methodology: Multi-Head Linear Attention (MHLA)

To cure global context collapse without sacrificing speed, the authors propose Multi-Head Linear Attention (MHLA). Note that "Multi-Head" here means something different than in standard Transformers: instead of splitting the feature dimension, MHLA splits the token dimension.

Here is how the mechanism works:

  1. Local Summaries: Instead of compressing the whole sequence into one giant global summary, MHLA divides the sequence into $M$ non-overlapping blocks (or "heads"). It computes a local key-value summary for each block.
  2. Multi-Head Mixing: MHLA introduces a learnable coefficient matrix. For any given query block, the model dynamically mixes the $M$ local summaries using specific weights.
  3. Query-Conditioned Selectivity: Because of this mixing, different queries now retrieve different, customized context summaries.

This creates a two-stage weighting mechanism: the model first selects the most relevant blocks for a specific query, and then uses standard kernel inner products to reweight individual tokens within those blocks. Because all of this relies on standard matrix multiplications (GEMMs), the overall complexity remains strictly linear ($O(N)$).

Evaluation Domains

The authors evaluated MHLA across a highly diverse set of domains to prove its generalizability:

  • Image Classification: ImageNet-1K.
  • Image Generation: ImageNet-1K (for training DiT/DiG models) and a custom collection of 31M internet images (for fine-tuning the SANA text-to-image model).
  • Video Generation: Evaluated on VBench using a fine-tuned Wan2.1-1.3B model.
  • Natural Language Processing: Trained on 10B tokens from FineWeb-Edu; evaluated on commonsense reasoning benchmarks, MMLU, and LongBench (for long-context understanding).

Key Insights

  • The Diagnosis of "Global Context Collapse": The paper provides a compelling mathematical and empirical explanation for why linear attention fails. By proving that a global summary strictly caps the rank of the attention matrix at the head dimension $d$, they show that standard linear attention is fundamentally incapable of handling long sequences effectively.
  • Restoring Sparsity Natively: Standard softmax attention is powerful because the exponential function forces the model to focus sharply on a few tokens (high sparsity/low entropy). MHLA naturally restores this sharp focus without needing the expensive softmax operation, simply by allowing queries to ignore irrelevant blocks of tokens.
  • No Crutches Needed: Many recent linear attention papers rely heavily on convolutional layers to inject local context and prop up performance. The authors show that while these modules help small models, their benefits vanish at larger scales. MHLA scales beautifully without needing any auxiliary modules.

Performance and Results

MHLA consistently outperforms existing linear attention baselines with negligible computational overhead:

  • Image Classification: Achieved a 3.6% accuracy gain over standard self-attention on the DeiT-T architecture (75.8% vs 72.2%) while using the same parameters.
  • Image Generation: Improved the performance of the Diffusion Transformer (DiT) architecture by 12.6%. On DiT-S/2, MHLA dropped the FID score from 89.72 (vanilla linear) to 59.80. On massive XL models, MHLA matched the performance of exact self-attention while running significantly faster.
  • Video Generation: In ultra-long context scenarios (31,500 tokens), vanilla linear attention completely broke down. MHLA provided a 41% enhancement in quality scores over linear attention and achieved a 2.1x inference speedup compared to FlashAttention on the Wan2.1-1.3B model.
  • NLP: Achieved a 6.3% improvement over baseline linear models on MMLU and posted the highest average score on the LongBench long-context evaluation suite.

Limitations and Future Directions

The computational complexity of MHLA is $O(Nd^2 + M^2d^2)$, where $M$ is the number of token blocks. To maintain linear-time efficiency, $M$ must be kept relatively small (specifically, $M^2 \le N$). If a user sets the number of blocks too high, the $M^2$ term dominates and introduces noticeable computational overhead.

Because MHLA acts as a fundamental, drop-in replacement for standard attention, it holds massive potential for downstream applications currently bottlenecked by sequence length. Future work will likely explore its deployment in long-horizon video synthesis, ultra-high-resolution image generation, and massive-scale language modeling.

Summary updated

BibTeX
@inproceedings{zhang2026mhla,
  author = {Kewei Zhang and Ye Huang and Yufan Deng and Jincheng YU and Junsong Chen and Huan Ling and Enze Xie and Daquan Zhou},
  title = {{MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=340QjF3jJP},
}
Figure