DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification
Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, Cho-Jui Hsieh
摘要
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 .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 324 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Focal Modulation Networks 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Focal Modulation Networks 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Focal Modulation Networks 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Focal Modulation Networks 引用了 Training data-efficient image transformers & distillation through attention
- Focal Modulation Networks 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- 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
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 Training data-efficient image transformers & distillation through attention
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 Training data-efficient image transformers & distillation through attention
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer
- EfficientFormer: Vision Transformers at MobileNet Speed 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Global Filter Networks for Image Classification 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Global Filter Networks for Image Classification 引用了 PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers
- Global Filter Networks for Image Classification 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Global Filter Networks for Image Classification 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Global Filter Networks for Image Classification 引用了 Training data-efficient image transformers & distillation through attention
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 Training data-efficient image transformers & distillation through attention
引用它的顶会 Paper324
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 次引用
- Global Filter Networks for Image ClassificationYongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu 等NeurIPS 2021 · 798 次引用
- EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu 等NeurIPS 2022 · 742 次引用
- PoinTr: Diverse Point Cloud Completion with Geometry-Aware TransformersXumin Yu, Yongming Rao, Ziyi Wang, Zuyan Liu 等ICCV 2021 · 592 次引用
- Focal Modulation NetworksJianwei Yang, Chunyuan Li, Xiyang Dai, Jianfeng GaoNeurIPS 2022 · 494 次引用
它引用的 Paper18
- 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 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li 等ICLR 2021 · 7,353 次引用
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan 等ICCV 2021 · 4,909 次引用
相关 Paper
- SPOT: Sparsification with Attention Dynamics via Token Relevance in Vision TransformersOded Schlesinger, Amirhossein Farzam, J. Matias Di Martino, Guillermo SapiroCVPR Findings 2026
- Sparsifiner: Learning Sparse Instance-Dependent Attention for Efficient Vision TransformersCong Wei, Brendan Duke, Ruowei Jiang, Parham Aarabi 等CVPR 2023
- 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
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image RecognitionYulin Wang, Rui Huang, Shiji Song, Zeyi Huang 等NeurIPS 2021 · 283 次引用
- Beyond Attentive Tokens: Incorporating Token Importance and Diversity for Efficient Vision TransformersSifan Long, Zhen Zhao, Jimin Pi, Shengsheng Wang 等CVPR 2023
