Rectifying Magnitude Neglect in Linear Attention
Qihang Fan, Huaibo Huang, Yuang Ai, Ran He
摘要
As the core operator of Transformers, Softmax Attention exhibits excellent global modeling capabilities. However, its quadratic complexity limits its applicability to vision tasks. In contrast, Linear Attention shares a similar formulation with Softmax Attention while achieving linear complexity, enabling efficient global information modeling. Nevertheless, Linear Attention suffers from a significant performance degradation compared to standard Softmax Attention. In this paper, we analyze the underlying causes of this issue based on the formulation of Linear Attention. We find that, unlike Softmax Attention, Linear Attention entirely disregards the magnitude information of the Query(Q or ϕ(Q)). This prevents the attention score distribution from dynamically adapting as the Query scales. As a result, despite its structural similarity to Softmax Attention, Linear Attention exhibits a significantly different attention score distribution. Based on this observation, we propose Magnitude-Aware Linear Attention (MALA), which modifies the computation of Linear Attention to fully incorporate the Query's magnitude. This adjustment allows MALA to generate an attention score distribution that closely resembles Softmax Attention while exhibiting a more well-balanced structure. We evaluate the effectiveness of MALA on multiple tasks, including image classification, object detection, instance segmentation, semantic segmentation, natural language processing, speech recognition, and image generation. Our MALA achieves strong results on all of these tasks. Code will be available at https: //github.com/qhfan/MALA.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head 引用了 Scalable Diffusion Models with Transformers
- MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-Head 引用了 Training data-efficient image transformers & distillation through attention
- Scalable Diffusion Models with Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- A ConvNet for the 2020s 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- A ConvNet for the 2020s 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- A ConvNet for the 2020s 引用了 Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
- DiCo: Revitalizing ConvNets for Scalable and Efficient Diffusion Modeling 引用了 Scalable Diffusion Models with Transformers
- DiCo: Revitalizing ConvNets for Scalable and Efficient Diffusion Modeling 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- DiCo: Revitalizing ConvNets for Scalable and Efficient Diffusion Modeling 引用了 A ConvNet for the 2020s
- DiCo: Revitalizing ConvNets for Scalable and Efficient Diffusion Modeling 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Transformers as Measure-Theoretic Associative Memory: A Statistical Perspective and Minimax Optimality 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
引用它的顶会 Paper6
- DiCo: Revitalizing ConvNets for Scalable and Efficient Diffusion ModelingYuang Ai, Qihang Fan, Xuefeng Hu, Zhenheng Yang 等NeurIPS 2025 · 8 次引用
- MHLA: Restoring Expressivity of Linear Attention via Token-Level Multi-HeadKewei Zhang, Ye Huang, Yufan Deng, Jincheng Yu 等ICLR 2026 · 6 次引用
- TimeViper: A Hybrid Mamba-Transformer Vision-Language Model for Efficient Long Video UnderstandingBoshen Xu, Zihan Xiao, Jiaze Li, Jianzhong Ju 等CVPR 2026 · 5 次引用
- Transformers as Measure-Theoretic Associative Memory: A Statistical Perspective and Minimax OptimalityRyotaro Kawata, Taiji SuzukiICLR 2026 · 3 次引用
- VMonarch: Efficient Video Diffusion Transformers with Structured AttentionCheng Liang, Haoxian Chen, Liang Hou, Qi Fan 等CVPR 2026 · 2 次引用
它引用的 Paper32
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer 等CVPR 2022 · 6,782 次引用
- Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 次引用
相关 Paper
- Breaking the Low-Rank Dilemma of Linear AttentionQihang Fan, Huaibo Huang, Ran HeCVPR 2025
- Bridging the Divide: Reconsidering Softmax and Linear AttentionDongchen Han, Yifan Pu, Zhuofan Xia, Yizeng Han 等NeurIPS 2024 · 69 次引用
- SEMA: a Scalable and Efficient Mamba like Attention via Token Localization and AveragingNhat Thanh Tran, Fanghui Xue, shuai zhang, Jiancheng Lyu 等ICML 2026 · 1 次引用
- NormDirection: Restoring the Missing Query Norm in Vision Linear AttentionWeikang Meng, Yadan Luo, Liangyu Huo, Yingjian Li 等ICML 2026 · 2 次引用
- FLatten Transformer: Vision Transformer using Focused Linear AttentionDongchen Han, Xuran Pan, Yizeng Han, Shiji Song 等ICCV 2023 · 358 次引用
