AdaViT: Adaptive Vision Transformers for Efficient Image Recognition
Lingchen Meng, Hengduo Li, Bor-Chun Chen, Shiyi Lan, Zuxuan Wu, Yu-Gang Jiang, Ser-Nam Lim
Abstract
Built on top of self-attention mechanisms, vision transformers have demonstrated remarkable performance on a variety of tasks recently. While achieving excellent performance, they still require relatively intensive computational cost that scales up drastically as the numbers of patches, self-attention heads and transformer blocks increase. In this paper, we argue that due to the large variations among images, their need for modeling long-range dependencies between patches differ. To this end, we introduce AdaViT, an adaptive computation framework that learns to derive usage policies on which patches, self-attention heads and transformer blocks to use throughout the backbone on a per-input basis, aiming to improve inference efficiency of vision transformers with a minimal drop of accuracy for image recognition. Optimized jointly with a transformer backbone in an end-to-end manner, a light-weight decision network is attached to the backbone to produce decisions on-the-fly. Extensive experiments on ImageNet demonstrate that our method obtains more than 2 × improvement on efficiency compared to state-of-the-art vision transformers with only 0.8% drop of accuracy, achieving good efficiency/accuracy trade-offs conditioned on different computational budgets. We further conduct quantitative and qualitative analysis on learned usage polices and provide more insights on the redundancy in vision transformers. Code is available at ht tps: / / gi thub. com/MengLcool/AdaVi T.
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.
113 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- ProPainter: Improving Propagation and Transformer for Video Inpainting cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- 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 Training data-efficient image transformers & distillation through attention
- Focal Modulation Networks cites SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
- BEVT: BERT Pretraining of Video Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- BEVT: BERT Pretraining of Video Transformers cites ObjectFormer for Image Manipulation Detection and Localization
- ObjectFormer for Image Manipulation Detection and Localization cites BEVT: BERT Pretraining of Video Transformers
- BEVT: BERT Pretraining of Video Transformers cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- BEVT: BERT Pretraining of Video Transformers cites Training data-efficient image transformers & distillation through attention
- ObjectFormer for Image Manipulation Detection and Localization cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- 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
- 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 Searching for MobileNetV3
- 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 Training data-efficient image transformers & distillation through attention
- EfficientFormer: Vision Transformers at MobileNet Speed cites SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
- SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
Cited by top-tier papers113
- EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu et al.NeurIPS 2022 · 742 citations
- Focal Modulation NetworksJianwei Yang, Chunyuan Li, Xiyang Dai, Jianfeng GaoNeurIPS 2022 · 494 citations
- ProPainter: Improving Propagation and Transformer for Video InpaintingShangchen Zhou, Chongyi Li, Kelvin C. K. Chan, Chen Change LoyICCV 2023 · 205 citations
- BEVT: BERT Pretraining of Video TransformersRui Wang, Dongdong Chen, Zuxuan Wu, Yinpeng Chen et al.CVPR 2022 · 200 citations
- ObjectFormer for Image Manipulation Detection and LocalizationJunke Wang, Zuxuan Wu, Jingjing Chen, Xintong Han et al.CVPR 2022 · 190 citations
Builds on31
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- 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
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
- Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
Related papers
- 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
- Patch Slimming for Efficient Vision TransformersYehui Tang, Kai Han, Yunhe Wang, Chang Xu et al.CVPR 2022 · 173 citations
- Skip-Attention: Improving Vision Transformers by Paying Less AttentionShashanka Venkataramanan, Amir Ghodrati, Yuki M. Asano, Fatih Porikli et al.ICLR 2024 · 42 citations
- A-ViT: Adaptive Tokens for Efficient Vision TransformerHongxu Yin, Arash Vahdat, José M. Álvarez, Arun Mallya et al.CVPR 2022 · 288 citations
- EViT: Expediting Vision Transformers via Token ReorganizationsYouwei Liang, Chongjian Ge, Zhan Tong, Yibing Song et al.ICLR 2022 · 137 citations
