提出考虑层间差异的深度剪枝方法,显著提升视觉Transformer加速效果。
Rethinking Depth Pruning for Vision Transformers: A Heterogeneity-Aware Perspective

- 基于层间异质性设计剪枝策略,避免维度不匹配问题。
- DeiT-B提速1.58倍且精度不变,DeiT-S提速1.39倍几乎无精度损失。
- 与宽度剪枝结合可实现5.19倍加速,刷新极端剪枝性能纪录。
现有视觉Transformer压缩方法多聚焦于宽度剪枝以减小模型规模,而深度剪枝(移除整层)虽具更高加速潜力,却因难以恢复精度而受限。本文揭示其失败根源在于忽视了各层间的异质性,提出HetDPT方法,通过感知层间差异实现无维度错配的深度剪枝。在ImageNet-1K、CIFAR-100、COCO和ADE20K上的实验表明:HetDPT使DeiT-B提速1.58倍且精度不变,DeiT-S提速1.39倍近无精度损失。结合宽度剪枝后,HetDPT+在Isomorphic-Pruning-2.6G配置下加速比从4.24×提升至5.19×,实现近无损精度下的新纪录。代码已开源。
原文摘要 · Abstract (English)
While prior studies have successfully compressed vision Transformers (ViTs) through various pruning techniques, most have concentrated on width pruning to achieve significant reductions in model size. Depth pruning, which removes entire layers from a ViT, is notoriously difficult for accuracy recovery despite its potential to deliver higher speedups, limiting the acceleration achieved by existing joint width-and-depth pruning methods. In this work, we reveal that the failure of existing depth pruning methods lies in their neglect of heterogeneity between different layers, and we introduce HetDPT, a heterogeneity-aware depth pruning method that avoids dimension mismatch. Comprehensive experiments on ImageNet-1K, CIFAR-100, COCO, and ADE20K validate our method: HetDPT achieves a 1.58$\times$ speedup for DeiT-B while maintaining accuracy and a 1.39$\times$ speedup for DeiT-S with nearly no accuracy degradation. Furthermore, when combined with width pruning, HetDPT+ sets a new state-of-the-art record in extreme ViT pruning, enhancing the acceleration ratio from 4.24$\times$ to 5.19$\times$ for the Isomorphic-Pruning-2.6G configuration while maintaining near-lossless accuracy; our code is available at https://github.com/Efficient-AI-for-All/HetDPT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。