English

Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights

Machine Learning 2026-05-12 v5 Computer Vision and Pattern Recognition

Abstract

The vanilla self-attention mechanism in Transformers can be viewed as a two-layer fast-weight MLP, whose weights are dynamically induced by inputs and whose hidden dimension is equal to the sequence length NN. As the context extends, the expressive capacity of such an NN-width MLP increases, but it becomes unscalable for extremely long sequences. Recently, this fast-weight perspective has motivated the Mixture-of-Experts (MoE) attention mechanism, which partitions the sequence into rigid blocks, treats them as fast-weight experts, and sparsely routes the tokens to them. In this paper, we elevate this perspective to a unifying framework for efficient attention mechanisms, interpreting them as making fast weights scalable through either routing or compression, and organizing them into a five-dimensional taxonomy. Then, we propose Mixture-of-Top-kk Attention (MiTA), which employs a small set of landmark queries to gather top-kk attended key-value pairs as query-aware and deformable routed experts, while compressing the NN-width MLP into a narrower shared expert. Consequently, our MiTA improves the flexibility of prior MoE attention from rigid to deformable fast-weight experts, as well as the scalability of prior top-kk attention from query-specific set to reusable top-kk set. We conduct extensive experiments on vision tasks showing the superior effectiveness and efficiency of our MiTA, and also uncovering intriguing properties such as an emergent token-pruning effect and easy generalization from standard attention. Code is available at https://github.com/QishuaiWen/MiTA.

Keywords

Cite

@article{arxiv.2602.01219,
  title  = {Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights},
  author = {Qishuai Wen and Zhiyuan Huang and Xianghan Meng and Wei He and Chun-Guang Li},
  journal= {arXiv preprint arXiv:2602.01219},
  year   = {2026}
}

Comments

Code is available at https://github.com/QishuaiWen/MiTA