Make A Long Image Short: Adaptive Token Length for Vision Transformers
Not on the map. Why?
Abstract (arXiv)
The vision transformer splits each image into a sequence of tokens with fixed length and processes the tokens in the same way as words in natural language processing. More tokens normally lead to better performance but considerably increased computational cost. Motivated by the proverb "A picture is worth a thousand words" we aim to accelerate the ViT model by making a long image short. To this end, we propose a novel approach to assign token length adaptively during inference. Specifically, we first train a ViT model, called Resizable-ViT (ReViT), that can process any given input with diverse token lengths. Then, we retrieve the "token-length label" from ReViT and use it to train a lightweight Token-Length Assigner (TLA). The token-length labels are the smallest number of tokens to split an image that the ReViT can make the correct prediction, and TLA is learned to allocate the optimal token length based on these labels. The TLA enables the ReViT to process the image with the minimum sufficient number of tokens during inference. Thus, the inference speed is boosted by reducing the token numbers in the ViT model. Our approach is general and compatible with modern vision transformer architectures and can significantly reduce computational expanse. We verified the effectiveness of our methods on multiple representative ViT models (DeiT, LV-ViT, and TimesFormer) across two tasks (image classification and action recognition).
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 57 of its 71 references that are in the map. First posted on arXiv 3 Dec 2021.
Builds on
57 of 71 references.
References · 57
- 2017Attention Is All You Needcited by 59,932
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,339
- 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2020Deformable DETR: Deformable Transformers for End-to-End Object Detectioncited by 3,410
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2021BEiT: BERT Pre-Training of Image Transformerscited by 2,360
- 2015Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Codingcited by 2,291
- 2017Non-local Neural Networkscited by 2,290
38 more
- 2018The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networkscited by 2,250
- 2017The Kinetics Human Action Video Datasetcited by 1,894
- 2018SlowFast Networks for Video Recognitioncited by 1,862
- 2018DARTS: Differentiable Architecture Searchcited by 1,782
- 2021ViViT: A Video Vision Transformercited by 1,610
- 2021Is Space-Time Attention All You Need for Video Understanding?cited by 1,609
- 2020Rethinking Attention with Performerscited by 1,584
- 2016Neural Architecture Search with Reinforcement Learningcited by 1,489
- 2017The "something something" video database for learning and evaluating visual common sensecited by 1,092
- 2021Video Swin Transformercited by 1,090
- 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
- 2021Multiscale Vision Transformerscited by 896
- 2021DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsificationcited by 849
- 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 778
- 2021Going deeper with Image Transformerscited by 759
- 2021Do Vision Transformers See Like Convolutional Neural Networks?cited by 671
- 2021Transformer in Transformercited by 632
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2021Intriguing Properties of Vision Transformerscited by 446
- 2019Single Path One-Shot Neural Architecture Search with Uniform Samplingcited by 411
- 2021Early Convolutions Help Transformers See Bettercited by 395
- 2017Relation Networks for Object Detectioncited by 305
- 2018Slimmable Neural Networkscited by 301
- 2021Post-Training Quantization for Vision Transformercited by 274
- 20213D Human Pose Estimation with Spatial and Temporal Transformerscited by 271
- 2019Depth-Adaptive Transformercited by 227
- 2021Co-Scale Conv-Attentional Image Transformerscited by 224
- 2021Keeping Your Eye on the Ball: Trajectory Attention in Video Transformerscited by 224
- 2019Universally Slimmable Networks and Improved Training Techniquescited by 219
- 20203D Object Detection with Pointformercited by 194
- 2020BigNAS: Scaling Up Neural Architecture Search with Big Single-Stage Modelscited by 187
- 2020TDN: Temporal Difference Networks for Efficient Action Recognitioncited by 183
- 2021On the Robustness of Vision Transformers to Adversarial Examplescited by 167
- 2020TAM: Temporal Adaptive Module for Video Recognitioncited by 139
- 2021Visformer: The Vision-friendly Transformercited by 137
- 2020Disentangled Non-Local Neural Networkscited by 132
- 2021Patch Slimming for Efficient Vision Transformerscited by 131
- 2019FairNAS: Rethinking Evaluation Fairness of Weight Sharing Neural Architecture Searchcited by 129
50 most cited of 57 All 57 (JSON)
Built on by
Not cited yet.