mlsanityData to 13 Oct 2026

Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition

arXiv 2105.15075 ↗First posted 31 May 2021cs.CV cs.AI cs.LGcited by 143

Not on the map. Why?

Abstract (arXiv)

Vision Transformers (ViT) have achieved remarkable success in large-scale image recognition. They split every 2D image into a fixed number of patches, each of which is treated as a token. Generally, representing an image with more tokens would lead to higher prediction accuracy, while it also results in drastically increased computational cost. To achieve a decent trade-off between accuracy and speed, the number of tokens is empirically set to 16x16 or 14x14. In this paper, we argue that every image has its own characteristics, and ideally the token number should be conditioned on each individual input. In fact, we have observed that there exist a considerable number of "easy" images which can be accurately predicted with a mere number of 4x4 tokens, while only a small fraction of "hard" ones need a finer representation. Inspired by this phenomenon, we propose a Dynamic Transformer to automatically configure a proper number of tokens for each input image. This is achieved by cascading multiple Transformers with increasing numbers of tokens, which are sequentially activated in an adaptive fashion at test time, i.e., the inference is terminated once a sufficiently confident prediction is produced. We further design efficient feature reuse and relationship reuse mechanisms across different components of the Dynamic Transformer to reduce redundant computations. Extensive empirical results on ImageNet, CIFAR-10, and CIFAR-100 demonstrate that our method significantly outperforms the competitive baselines in terms of both theoretical computational efficiency and practical inference speed. Code and pre-trained models (based on PyTorch and MindSpore) are available at https://github.com/blackfeather-wang/Dynamic-Vision-Transformer and https://github.com/blackfeather-wang/Dynamic-Vision-Transformer-MindSpore.

Key facts. Cited by 143 papers in the map (data through 13 Oct 2026). Builds on 51 of its 62 references that are in the map. First posted on arXiv 31 May 2021.

Builds on

51 of 62 references.

References · 51

  1. 2017Attention Is All You Needcited by 60,106
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,950
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
  4. 2020Language Models are Few-Shot Learnerscited by 32,320
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,043
  6. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,111
  7. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,426
  8. 2016Layer Normalizationcited by 5,624
  9. 2015Rethinking the Inception Architecture for Computer Visioncited by 5,457
  10. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,170
  11. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,880
  12. 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,786
38 more
  1. 2020Training data-efficient image transformers & distillation through attentioncited by 4,574
  2. 2017MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applicationscited by 3,836
  3. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,882
  4. 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,266
  5. 2019Searching for MobileNetV3cited by 1,990
  6. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,961
  7. 2017Random Erasing Data Augmentationcited by 1,238
  8. 2017ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devicescited by 1,199
  9. 2018ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Designcited by 1,134
  10. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
  11. 2016Deep Networks with Stochastic Depthcited by 977
  12. 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
  13. 2021Multiscale Vision Transformerscited by 896
  14. 2021CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classificationcited by 806
  15. 2021Going deeper with Image Transformerscited by 762
  16. 2021Transformer in Transformercited by 633
  17. 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 592
  18. 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
  19. 2021LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inferencecited by 475
  20. 2021TransReID: Transformer-based Object Re-Identificationcited by 432
  21. 2021Dynamic Neural Networks: A Surveycited by 406
  22. 2021Conditional Positional Encodings for Vision Transformerscited by 406
  23. 2021MOTR: End-to-End Multiple-Object Tracking with Transformercited by 380
  24. 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 330
  25. 2021DeepViT: Towards Deeper Vision Transformercited by 288
  26. 2021Incorporating Convolution Designs into Visual Transformerscited by 248
  27. 2021LocalViT: Analyzing Locality in Vision Transformerscited by 228
  28. 2017BlockDrop: Dynamic Inference Paths in Residual Networkscited by 187
  29. 2017Convolutional Networks with Adaptive Inference Graphscited by 147
  30. 2020Resolution Adaptive Networks for Efficient Inferencecited by 146
  31. 2016Spatially Adaptive Computation Time for Residual Networkscited by 118
  32. 2020Glance and Focus: a Dynamic Approach to Reducing Spatial Redundancy in Image Classificationcited by 99
  33. 2020Convolutional Networks with Dense Connectivitycited by 98
  34. 2019Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inferencecited by 91
  35. 2021Training Vision Transformers for Image Retrievalcited by 90
  36. 2021Adaptive Focus for Efficient Video Recognitioncited by 77
  37. 2019Improved Techniques for Training Adaptive Deep Networkscited by 66
  38. 2021CondenseNet V2: Sparse Feature Reactivation for Deep Networkscited by 34

50 most cited of 51 All 51 (JSON)

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2021: 5; 2022: 25; 2023: 37; 2024: 37; 2025: 25; 2026: 14.

143 papers.

Sort:

By area:

  1. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,404
  2. 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,063
  3. 2022Vision Transformer with Deformable Attentioncited by 294
  4. 2023FLatten Transformer: Vision Transformer using Focused Linear Attentioncited by 170
  5. 2023GSVA: Generalized Segmentation via Multimodal Large Language Modelscited by 153
  6. 2022FlexiViT: One Model for All Patch Sizescited by 152
  7. 2021A Survey of Visual Transformerscited by 117
  8. 2024DeeR-VLA: Dynamic Inference of Multimodal Large Language Models for Efficient Robot Executioncited by 116
  9. 2022CF-ViT: A General Coarse-to-Fine Method for Vision Transformercited by 63
  10. 2024Dynamic Diffusion Transformercited by 62
  11. 2023Dynamic Token Pruning in Plain Vision Transformers for Semantic Segmentationcited by 61
  12. 2023Which Tokens to Use? Investigating Token Reduction in Vision Transformerscited by 59
38 more
  1. 2023Adaptive Rotated Convolution for Rotated Object Detectioncited by 51
  2. 2023Rank-DETR for High Quality Object Detectioncited by 50
  3. 2024A Survey on Transformer Compressioncited by 46
  4. 2022EfficientTrain: Exploring Generalized Curriculum Learning for Training Visual Backbonescited by 43
  5. 2024AIM: Adaptive Inference of Multi-Modal LLMs via Token Merging and Pruningcited by 43
  6. 2022Glance and Focus Networks for Dynamic Visual Recognitioncited by 41
  7. 2021AdaFocus V2: End-to-End Training of Spatial Dynamic Networks for Video Recognitioncited by 37
  8. 2022ResFormer: Scaling ViTs with Multi-Resolution Trainingcited by 34
  9. 2022Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuningcited by 33
  10. 2023FGAHOI: Fine-Grained Anchors for Human-Object Interaction Detectioncited by 30
  11. 2021Improving Transformers with Probabilistic Attention Keyscited by 28
  12. 2022PatchDropout: Economizing Vision Transformers Using Patch Dropoutcited by 28
  13. 2023Making Vision Transformers Efficient from A Token Sparsification Viewcited by 28
  14. 2024Fast yet Safe: Early-Exiting with Risk Controlcited by 28
  15. 2024ALGM: Adaptive Local-then-Global Token Merging for Efficient Semantic Segmentation with Plain Vision Transformerscited by 28
  16. 2025Scaling Vision Pre-Training to 4K Resolutioncited by 27
  17. 2023Stitchable Neural Networkscited by 26
  18. 2023SGAT4PASS: Spherical Geometry-Aware Transformer for PAnoramic Semantic Segmentationcited by 26
  19. 2024Dynamic Tuning Towards Parameter and Inference Efficiency for ViT Adaptationcited by 25
  20. 2024Efficient Diffusion Transformer with Step-wise Dynamic Attention Mediatorscited by 24
  21. 2022Attentive Mask CLIPcited by 23
  22. 2023Prune Spatio-temporal Tokens by Semantic-aware Temporal Accumulationcited by 23
  23. 2023Adaptive Computation with Elastic Input Sequencecited by 22
  24. 2023Content-aware Token Sharing for Efficient Semantic Segmentation with Vision Transformerscited by 22
  25. 2023DAT++: Spatially Dynamic Vision Transformer with Deformable Attentioncited by 21
  26. 2023MSViT: Dynamic Mixed-Scale Tokenization for Vision Transformerscited by 19
  27. 2022AdaFocusV3: On Unified Spatial-temporal Dynamic Video Recognitioncited by 18
  28. 2023MonoATT: Online Monocular 3D Object Detection with Adaptive Token Transformercited by 18
  29. 2024ScanFormer: Referring Expression Comprehension by Iteratively Scanningcited by 18
  30. 2022Transformer Scale Gate for Semantic Segmentationcited by 17
  31. 2023Fine-grained Recognition with Learnable Semantic Data Augmentationcited by 17
  32. 2024EfficientTrain++: Generalized Curriculum Learning for Efficient Visual Backbone Trainingcited by 17
  33. 2023Towards Anytime Classification in Early-Exit Architectures by Enforcing Conditional Monotonicitycited by 16
  34. 2023DynamicDet: A Unified Dynamic Architecture for Object Detectioncited by 15
  35. 2023Jointly-Learned Exit and Inference for a Dynamic Neural Network : JEI-DNNcited by 15
  36. 2025Keeping Yourself is Important in Downstream Tuning Multimodal Large Language Modelcited by 15
  37. 2023Computation-efficient Deep Learning for Computer Vision: A Surveycited by 14
  38. 2025SapiensID: Foundation for Human Recognitioncited by 14

50 most cited of 143 All 143 (JSON)