X-Pruner: eXplainable Pruning for Vision Transformers
Abstract
Recently vision transformer models have become prominent models for a range of tasks. These models, however, usually suffer from intensive computational costs and heavy memory requirements, making them impractical for deployment on edge platforms. Recent studies have proposed to prune transformers in an unexplainable manner, which overlook the relationship between internal units of the model and the target class, thereby leading to inferior performance. To alleviate this problem, we propose a novel explainable pruning framework dubbed X-Pruner, which is designed by considering the explainability of the pruning criterion. Specifically, to measure each prunable unit's contribution to predicting each target class, a novel explainability-aware mask is proposed and learned in an end-to-end manner. Then, to preserve the most informative units and learn the layer-wise pruning rate, we adaptively search the layer-wise threshold that differentiates between unpruned and pruned units based on their explainabilityaware mask values. To verify and evaluate our method, we apply the X-Pruner on representative transformer models including the DeiT and Swin Transformer. Comprehensive simulation results demonstrate that the proposed X-Pruner outperforms the state-of-the-art black-box methods with significantly reduced computational costs and slight performance degradation. Code is available at https: //github.com/vickyyu90/XPruner.
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.
27 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
- Outlier-aware Slicing for Post-Training Quantization in Vision Transformer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Outlier-aware Slicing for Post-Training Quantization in Vision Transformer cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Outlier-aware Slicing for Post-Training Quantization in Vision Transformer cites Training data-efficient image transformers & distillation through attention
- The Need for Speed: Pruning Transformers with One Recipe cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- The Need for Speed: Pruning Transformers with One Recipe cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- The Need for Speed: Pruning Transformers with One Recipe cites Training data-efficient image transformers & distillation through attention
- Do Vision Transformers See Like Convolutional Neural Networks? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Gradient-based Visual Explanation for Transformer-based CLIP cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- ECoFLaP: Efficient Coarse-to-Fine Layer-Wise Pruning for Vision-Language Models cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- ECoFLaP: Efficient Coarse-to-Fine Layer-Wise Pruning for Vision-Language Models cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- 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
- ALGM: Adaptive Local-then-Global Token Merging for Efficient Semantic Segmentation with Plain Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Cited by top-tier papers27
- Gradient-based Visual Explanation for Transformer-based CLIPChenyang Zhao, Kun Wang, Xingyu Zeng, Rui Zhao et al.ICML 2024 · 24 citations
- ECoFLaP: Efficient Coarse-to-Fine Layer-Wise Pruning for Vision-Language ModelsYi-Lin Sung, Jaehong Yoon, Mohit BansalICLR 2024 · 22 citations
- Outlier-aware Slicing for Post-Training Quantization in Vision TransformerYuexiao Ma, Huixia Li, Xiawu Zheng, Feng Ling et al.ICML 2024 · 17 citations
- The Need for Speed: Pruning Transformers with One RecipeSamir Khaki, Konstantinos N. PlataniotisICLR 2024 · 17 citations
- ALGM: Adaptive Local-then-Global Token Merging for Efficient Semantic Segmentation with Plain Vision TransformersNarges Norouzi, Svetlana Orlova, Daan de Geus, Gijs DubbelmanCVPR 2024 · 15 citations
Builds on21
- 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
- Do Vision Transformers See Like Convolutional Neural Networks?Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang et al.NeurIPS 2021 · 1,553 citations
- Attention on Attention for Image CaptioningLun Huang, Wenmin Wang, Jie Chen, Xiaoyong WeiICCV 2019 · 992 citations
Related papers
- Width & Depth Pruning for Vision TransformersFang Yu, Kun Huang, Meng Wang, Yuan Cheng et al.AAAI 2022 · 159 citations
- Zero-TPrune: Zero-Shot Token Pruning Through Leveraging of the Attention Graph in Pre-Trained TransformersHongjie Wang, Bhishma Dedhia, Niraj K. JhaCVPR 2024 · 24 citations
- SAViT: Structure-Aware Vision Transformer Pruning via Collaborative OptimizationChuanyang Zheng, Zheyang Li, Kai Zhang, Zhi Yang et al.NeurIPS 2022 · 98 citations
- Unified Visual Transformer CompressionShixing Yu, Tianlong Chen, Jiayi Shen, Huan Yuan et al.ICLR 2022 · 118 citations
- NuWa: Deriving Lightweight Class-Specific Vision Transformers for Edge DevicesZiteng Wei, Qiang He, Bing Li, Feifei Chen et al.CVPR 2026 · 1 citation
