Lune

NeurIPS2021Top-tier venue

DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification

Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, Cho-Jui Hsieh

Abstract

Attention is sparse in vision transformers. We observe the final prediction in vision transformers is only based on a subset of most informative tokens, which is sufficient for accurate image recognition. Based on this observation, we propose a dynamic token sparsification framework to prune redundant tokens progressively and dynamically based on the input. Specifically, we devise a lightweight prediction module to estimate the importance score of each token given the current features. The module is added to different layers to prune redundant tokens hierarchically. To optimize the prediction module in an end-to-end manner, we propose an attention masking strategy to differentiably prune a token by blocking its interactions with other tokens. Benefiting from the nature of self-attention, the unstructured sparse tokens are still hardware friendly, which makes our framework easy to achieve actual speed-up. By hierarchically pruning 66% of the input tokens, our method greatly reduces 31% ∼ 37% FLOPs and improves the throughput by over 40% while the drop of accuracy is within 0.5% for various vision transformers. Equipped with the dynamic token sparsification framework, DynamicViT models can achieve very competitive complexity/accuracy trade-offs compared to state-of-the-art CNNs and vision transformers on ImageNet. Code is available at https://github.com/ raoyongming/DynamicViT .

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.

324 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

  • Focal Modulation Networks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Focal Modulation Networks cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Focal Modulation Networks cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Focal Modulation Networks cites Training data-efficient image transformers & distillation through attention
  • Focal Modulation Networks cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • 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 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites Training data-efficient image transformers & distillation through attention
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • EfficientFormer: Vision Transformers at MobileNet Speed cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Training data-efficient image transformers & distillation through attention
  • EfficientFormer: Vision Transformers at MobileNet Speed cites MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • Global Filter Networks for Image Classification cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Global Filter Networks for Image Classification cites PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers
  • Global Filter Networks for Image Classification cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Global Filter Networks for Image Classification cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Global Filter Networks for Image Classification cites Training data-efficient image transformers & distillation through attention
  • MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Training data-efficient image transformers & distillation through attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers324

  1. MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 citations
  2. Global Filter Networks for Image ClassificationYongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu et al.NeurIPS 2021 · 798 citations
  3. EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu et al.NeurIPS 2022 · 742 citations
  4. PoinTr: Diverse Point Cloud Completion with Geometry-Aware TransformersXumin Yu, Yongming Rao, Ziyi Wang, Zuyan Liu et al.ICCV 2021 · 592 citations
  5. Focal Modulation NetworksJianwei Yang, Chunyuan Li, Xiyang Dai, Jianfeng GaoNeurIPS 2022 · 494 citations

Builds on18

  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. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  4. Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li et al.ICLR 2021 · 7,353 citations
  5. Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan et al.ICCV 2021 · 4,909 citations

Related papers

  1. SPOT: Sparsification with Attention Dynamics via Token Relevance in Vision TransformersOded Schlesinger, Amirhossein Farzam, J. Matias Di Martino, Guillermo SapiroCVPR Findings 2026
  2. Sparsifiner: Learning Sparse Instance-Dependent Attention for Efficient Vision TransformersCong Wei, Brendan Duke, Ruowei Jiang, Parham Aarabi et al.CVPR 2023
  3. Dyna-ViT: Parameter-Free Pre-Encoder Token Pruning for Efficient Vision TransformersSyeda Fiza Rubab, Arslan Abdul Ghaffar, Malik Junaid Jami Gul, Sheriff Murtala, Ingyu Lee, Gyu Sang ChoiCVPR Findings 2026
  4. Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image RecognitionYulin Wang, Rui Huang, Shiji Song, Zeyi Huang et al.NeurIPS 2021 · 283 citations
  5. Beyond Attentive Tokens: Incorporating Token Importance and Diversity for Efficient Vision TransformersSifan Long, Zhen Zhao, Jimin Pi, Shengsheng Wang et al.CVPR 2023
Dusk over the sea between two cliffs drawn in fine vertical lines