Mobile Attention: Mobile-Friendly Linear-Attention for Vision Transformers
Zhiyu Yao, Jian Wang, Haixu Wu, Jingdong Wang, Mingsheng Long
摘要
Vision Transformers (ViTs) excel in computer vision tasks due to their ability to capture global context among tokens. However, their quadratic complexity O(N 2 D) in terms of token number N and feature dimension D limits practical use on mobile devices, necessitating more mobilefriendly ViTs with reduced latency. Multi-head linear-attention is emerging as a promising alternative with linear complexity O(N Dd), where d is the per-head dimension. Still, more compute is needed as d gets large for model accuracy. Reducing d improves mobile friendliness at the expense of excessive small heads weak at learning valuable subspaces, ultimately impeding model capability. To overcome this efficiency-capability dilemma, we propose a novel Mobile-Attention design with a head-competition mechanism empowered by information flow, which prevents overemphasis on less important subspaces upon trivial heads while preserving essential subspaces to ensure Transformer's capability. It enables linear-time complexity on mobile devices by supporting a small per-head dimension d for mobile efficiency. By replacing the standard attention of ViTs with Mobile-Attention, our optimized ViTs achieved enhanced model capacity and competitive performance in a range of computer vision tasks. Specifically, we have achieved remarkable reductions in latency on the iPhone 12. Code is available at https://github.com/thuml/MobileAttention .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficiency Follows Global-Local Decoupling 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Efficiency Follows Global-Local Decoupling 引用了 A ConvNet for the 2020s
- Efficiency Follows Global-Local Decoupling 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Efficiency Follows Global-Local Decoupling 引用了 Training data-efficient image transformers & distillation through attention
- 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
- PolaFormer: Polarity-aware Linear Attention for Vision Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- PolaFormer: Polarity-aware Linear Attention for Vision Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- PolaFormer: Polarity-aware Linear Attention for Vision Transformers 引用了 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
- CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction 引用了 A ConvNet for the 2020s
- CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction 引用了 Training data-efficient image transformers & distillation through attention
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
引用它的顶会 Paper3
- Efficiency Follows Global-Local DecouplingZhenyu Yang, Gensheng Pei, Tao Chen, Yichao Zhou 等CVPR 2026 · 3 次引用
- PolaFormer: Polarity-aware Linear Attention for Vision TransformersWeikang Meng, Yadan Luo, Xin Li, Dongmei Jiang 等ICLR 2025
- CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual InteractionYuan Zhou, Qingshan Xu, Jiequan Cui, Junbao Zhou 等CVPR 2025
它引用的 Paper27
- 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 次引用
- Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le 等ICCV 2019 · 9,163 次引用
- 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 次引用
相关 Paper
- EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu 等NeurIPS 2022 · 742 次引用
- Rethinking Vision Transformers for MobileNet Size and SpeedYanyu Li, Ju Hu, Yang Wen, Georgios Evangelidis 等ICCV 2023 · 300 次引用
- Rep ViT: Revisiting Mobile CNN From ViT PerspectiveAo Wang, Hui Chen, Zijia Lin, Jungong Han 等CVPR 2024 · 500 次引用
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 次引用
- You Only Need Less Attention at Each Stage in Vision TransformersShuoxi Zhang, Hanpeng Liu, Stephen Lin, Kun HeCVPR 2024 · 19 次引用
