Lune

ICML2024Top-tier venue

Mobile Attention: Mobile-Friendly Linear-Attention for Vision Transformers

Zhiyu Yao, Jian Wang, Haixu Wu, Jingdong Wang, Mingsheng Long

Abstract

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 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficiency Follows Global-Local Decoupling cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Efficiency Follows Global-Local Decoupling cites A ConvNet for the 2020s
  • Efficiency Follows Global-Local Decoupling cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Efficiency Follows Global-Local Decoupling cites Training data-efficient image transformers & distillation through attention
  • A ConvNet for the 2020s cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • A ConvNet for the 2020s cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • A ConvNet for the 2020s cites Training data-efficient image transformers & distillation through attention
  • PolaFormer: Polarity-aware Linear Attention for Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • PolaFormer: Polarity-aware Linear Attention for Vision Transformers cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • PolaFormer: Polarity-aware Linear Attention for Vision Transformers cites Training data-efficient image transformers & distillation through attention
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
  • CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction cites A ConvNet for the 2020s
  • CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interaction cites Training data-efficient image transformers & distillation through attention
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Efficiency Follows Global-Local DecouplingZhenyu Yang, Gensheng Pei, Tao Chen, Yichao Zhou et al.CVPR 2026 · 3 citations
  2. PolaFormer: Polarity-aware Linear Attention for Vision TransformersWeikang Meng, Yadan Luo, Xin Li, Dongmei Jiang et al.ICLR 2025
  3. CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual InteractionYuan Zhou, Qingshan Xu, Jiequan Cui, Junbao Zhou et al.CVPR 2025

Builds on27

  1. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations
  4. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  5. A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer et al.CVPR 2022 · 6,782 citations

Related papers

  1. EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu et al.NeurIPS 2022 · 742 citations
  2. Rethinking Vision Transformers for MobileNet Size and SpeedYanyu Li, Ju Hu, Yang Wen, Georgios Evangelidis et al.ICCV 2023 · 300 citations
  3. Rep ViT: Revisiting Mobile CNN From ViT PerspectiveAo Wang, Hui Chen, Zijia Lin, Jungong Han et al.CVPR 2024 · 500 citations
  4. MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 citations
  5. You Only Need Less Attention at Each Stage in Vision TransformersShuoxi Zhang, Hanpeng Liu, Stephen Lin, Kun HeCVPR 2024 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines