atlas

Research map / Architectures and efficiency / Attention and transformers

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

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Hybrid and interpretable ViT designs

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Mobile-Attention, a kernel-based linear attention with small per-head dimension (d=4) and a head-competition mechanism based on information flow, and plugs it into DeiT, PVTv2 and EfficientFormerV2 to get mobile-friendly ViTs.

Problem

Quadratic cost of ViT self-attention limits mobile deployment; kernel-based linear attention is cheaper but reducing per-head dimension for mobile efficiency makes many small heads weak, hurting accuracy.

Approach

Reduce per-head dimension to a tiny constant (d=4) for linear-time attention, and recover capacity with a head-competition mechanism that reweights value heads by competed outgoing flow and gates results by competed incoming flow (adapted from Flowformer's information flow, applied across heads rather than tokens).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace standard attention with Mobile-AttentionDeiT-S · ImageNet-1K valTop-1 Acc(%): 79.8 -> 80.0Helped
Replace standard attention with Mobile-AttentionPVT-v2-b2 · ImageNet-1K valCoreML latency: 101.0 -> 65.6Helped
Replace standard attention with Mobile-AttentionEfficientFormerV2-S2 · ImageNet-1K valTop-1 Acc(%): 81.6 -> 82.1Helped
Replace standard attention with Mobile-AttentionEfficientFormerV2-S2 · ImageNet-1K valCoreML latency: 1.6 -> 1.2Helped
Replace attention in the last two stages with Mobile-AttentionEfficientFormerV2-S2 · COCO 2017 valAPbox: 43.4 -> 43.7Helped
Replace attention in the last two stages with Mobile-AttentionEfficientFormerV2-S2 · ADE20K valmIoU: 42.4 -> 43.1Helped
Add the head-competition mechanism (ablation)DeiT-S-MobiAtt · ImageNet-1K valTop-1 Acc (%): 76.4 -> 80.0Helped
Use vanilla design instead of Mobile-Attention head competition (ablation)DeiT-S-MobiAtt · ImageNet-1K valTop-1 Acc (%): 80.0 -> 79.0Hurt
Replace head competition with SE (ablation)DeiT-S-MobiAtt · ImageNet-1K valTop-1 Acc (%): 80.0 -> 78.3Hurt
Replace head competition with GLU (ablation)DeiT-S-MobiAtt · ImageNet-1K valTop-1 Acc (%): 80.0 -> 77.5Hurt
Reduce the per-head dimension (ablation)DeiT-S-MobiAtt · ImageNet-1KCoreML latencyHelped
Reduce the per-head dimension (ablation)DeiT-S-MobiAtt · ImageNet-1KaccuracyHurt

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K COCO 2017 ADE20K

Benchmarks: ImageNet-1K COCO 2017 ADE20K

Metrics: top-1 accuracy CoreML latency (ms) A100 latency (ms) Pixel 6 latency (ms) box AP mask AP mIoU GMACs params

Baselines: DeiT PVT-v2 EfficientFormerV2 Hydra-attention Castling-DeiT-S EdgeViT-XXS ConvNeXt-T Swin-T PoolFormer MobileViT-XS

Builds on: Flowformer DeiT EfficientFormerV2 PVTv2 Hydra attention

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy