Demystify Mamba in Vision: A Linear Attention Perspective
Dongchen Han, Ziyi Wang, Zhuofan Xia, Yizeng Han, Yifan Pu, Chunjiang Ge, Jun Song, Shiji Song, Bo Zheng, Gao Huang
摘要
Mamba is an effective state space model with linear computation complexity. It has recently shown impressive efficiency in dealing with high-resolution inputs across various vision tasks. In this paper, we reveal that the powerful Mamba model shares surprising similarities with linear attention Transformer, which typically underperform conventional Transformer in practice. By exploring the similarities and disparities between the effective Mamba and subpar linear attention Transformer, we provide comprehensive analyses to demystify the key factors behind Mamba's success. Specifically, we reformulate the selective state space model and linear attention within a unified formulation, rephrasing Mamba as a variant of linear attention Transformer with six major distinctions: input gate, forget gate, shortcut, no attention normalization, single-head, and modified block design. For each design, we meticulously analyze its pros and cons, and empirically evaluate its impact on model performance in vision tasks. Interestingly, the results highlight the forget gate and block design as the core contributors to Mamba's success, while the other four designs are less crucial. Based on these findings, we propose a Mamba-Inspired Linear Attention (MILA) model by incorporating the merits of these two key designs into linear attention. The resulting model outperforms various vision Mamba models in both image classification and high-resolution dense prediction tasks, while enjoying parallelizable computation and fast inference speed. Code is available at https://github.com/LeapLabTHU/MLLA.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 49 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Rectifying Magnitude Neglect in Linear Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Rectifying Magnitude Neglect in Linear Attention 引用了 A ConvNet for the 2020s
- Rectifying Magnitude Neglect in Linear Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Rectifying Magnitude Neglect in Linear Attention 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Rectifying Magnitude Neglect in Linear Attention 引用了 Bridging the Divide: Reconsidering Softmax and Linear Attention
- A ConvNet for the 2020s 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- 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
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- 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 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- ENAT: Rethinking Spatial-temporal Interactions in Token-based Image Synthesis 引用了 Bridging the Divide: Reconsidering Softmax and Linear Attention
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- VSSD: Vision Mamba With Non-Causal State Space Duality 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- VSSD: Vision Mamba With Non-Causal State Space Duality 引用了 A ConvNet for the 2020s
- VSSD: Vision Mamba With Non-Causal State Space Duality 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- VSSD: Vision Mamba With Non-Causal State Space Duality 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 A ConvNet for the 2020s
- Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- CLEAR: Conv-Like Linearization Revs Pre-Trained Diffusion Transformers Up 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
引用它的顶会 Paper49
- Bridging the Divide: Reconsidering Softmax and Linear AttentionDongchen Han, Yifan Pu, Zhuofan Xia, Yizeng Han 等NeurIPS 2024 · 69 次引用
- CLEAR: Conv-Like Linearization Revs Pre-Trained Diffusion Transformers UpSonghua Liu, Zhenxiong Tan, Xinchao WangNeurIPS 2025 · 33 次引用
- VSSD: Vision Mamba With Non-Causal State Space DualityYuheng Shi, Mingjia Li, Minjing Dong, Chang XuICCV 2025 · 20 次引用
- ENAT: Rethinking Spatial-temporal Interactions in Token-based Image SynthesisZanlin Ni, Yulin Wang, Renping Zhou, Yizeng Han 等NeurIPS 2024 · 15 次引用
- Rectifying Magnitude Neglect in Linear AttentionQihang Fan, Huaibo Huang, Yuang Ai, Ran HeICCV 2025 · 14 次引用
它引用的 Paper31
- 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 次引用
- A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer 等CVPR 2022 · 6,782 次引用
- CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh 等ICCV 2019 · 5,843 次引用
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan 等ICCV 2021 · 4,909 次引用
相关 Paper
- MobileMamba: Lightweight Multi-Receptive Visual Mamba NetworkHaoyang He, Jiangning Zhang, Yuxuan Cai, Hongxu Chen 等CVPR 2025
- EfficientVMamba: Atrous Selective Scan for Light Weight Visual MambaXiaohuan Pei, Tao Huang, Chang XuAAAI 2025 · 248 次引用
- VMamba: Visual State Space ModelYue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu 等NeurIPS 2024 · 3,199 次引用
- Mamba-3: Improved Sequence Modeling using State Space PrinciplesAakash Sunil Lahoti, Kevin Y. Li, Berlin Chen, Caitlin Wang 等ICLR 2026 · 96 次引用
- The Hidden Attention of Mamba ModelsAmeen Ali, Itamar Zimerman, Lior WolfACL 2025
