Patch Slimming for Efficient Vision Transformers
Yehui Tang, Kai Han, Yunhe Wang, Chang Xu, Jianyuan Guo, Chao Xu, Dacheng Tao
Abstract
This paper studies the efficiency problem for visual transformers by excavating redundant calculation in given networks. The recent transformer architecture has demonstrated its effectiveness for achieving excellent performance on a series of computer vision tasks. However, similar to that of convolutional neural networks, the huge computational cost of vision transformers is still a severe issue. Considering that the attention mechanism aggregates different patches layer-by-layer, we present a novel patch slimming approach that discards useless patches in a topdown paradigm. We first identify the effective patches in the last layer and then use them to guide the patch selection process of previous layers. For each layer, the impact of a patch on the final output feature is approximated and patches with less impacts will be removed. Experimental results on benchmark datasets demonstrate that the proposed method can significantly reduce the computational costs of vision transformers without affecting their performances. For example, over 45% FLOPs of the ViT-Ti model can be reduced with only 0.2% top-1 accuracy drop on the Ima-geNet dataset.
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.
66 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
- Chasing Sparsity in Vision Transformers: An End-to-End Exploration cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Chasing Sparsity in Vision Transformers: An End-to-End Exploration cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Chasing Sparsity in Vision Transformers: An End-to-End Exploration cites Training data-efficient image transformers & distillation through attention
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition cites Language Models are Few-Shot Learners
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition cites Training data-efficient image transformers & distillation through attention
- Post-Training Quantization for Vision Transformer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Post-Training Quantization for Vision Transformer cites Training data-efficient image transformers & distillation through attention
- TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation cites Training data-efficient image transformers & distillation through attention
- CMT: Convolutional Neural Networks Meet Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CMT: Convolutional Neural Networks Meet Vision Transformers cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- CMT: Convolutional Neural Networks Meet Vision Transformers cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- CMT: Convolutional Neural Networks Meet Vision Transformers cites Training data-efficient image transformers & distillation through attention
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- 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
- 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
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Cited by top-tier papers66
- CMT: Convolutional Neural Networks Meet Vision TransformersJianyuan Guo, Kai Han, Han Wu, Yehui Tang et al.CVPR 2022 · 839 citations
- Post-Training Quantization for Vision TransformerZhenhua Liu, Yunhe Wang, Kai Han, Wei Zhang et al.NeurIPS 2021 · 528 citations
- TopFormer: Token Pyramid Transformer for Mobile Semantic SegmentationWenqiang Zhang, Zilong Huang, Guozhong Luo, Tao Chen et al.CVPR 2022 · 313 citations
- Chasing Sparsity in Vision Transformers: An End-to-End ExplorationTianlong Chen, Yu Cheng, Zhe Gan, Lu Yuan et al.NeurIPS 2021 · 295 citations
- 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
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- 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
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
- 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
- AdaViT: Adaptive Vision Transformers for Efficient Image RecognitionLingchen Meng, Hengduo Li, Bor-Chun Chen, Shiyi Lan et al.CVPR 2022
- SPOT: Sparsification with Attention Dynamics via Token Relevance in Vision TransformersOded Schlesinger, Amirhossein Farzam, J. Matias Di Martino, Guillermo SapiroCVPR Findings 2026
- Scalable Vision Transformers with Hierarchical PoolingZizheng Pan, Bohan Zhuang, Jing Liu, Haoyu He et al.ICCV 2021 · 154 citations
- FDViT: Improve the Hierarchical Architecture of Vision TransformerYixing Xu, Chao Li, Dong Li, Xiao Sheng et al.ICCV 2023 · 21 citations
- Vision Transformer Slimming: Multi-Dimension Searching in Continuous Optimization SpaceArnav Chavan, Zhiqiang Shen, Zhuang Liu, Zechun Liu et al.CVPR 2022 · 64 citations
