X-Pruner: eXplainable Pruning for Vision Transformers
Lu Yu, Wei Xiang
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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8c39fe6d-dc5e-47b9-a794-b6c025533a7fCited 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
