arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.15005cs.CV
收藏

无需重新训练的视觉Transformer深度剪枝:跨领域层冗余研究

Retraining-Free Depth Pruning of Vision Transformers: A Cross Domain Study of Layer Redundancy

University of Padua(帕多瓦大学)

Alessandro Viespoli, Loris Nanni

AI总结:

本研究通过分析视觉Transformer的层冗余,提出无需重训练的深度剪枝方法,可在精度损失极小的情况下提升推理效率,还构建了自动选择最优剪枝配置的流程。

摘要:

Transformer架构在自然语言处理和计算机视觉领域已取得优异成果,但其部署受限于高昂的计算、内存及存储成本,推动了模型压缩技术(如剪枝)的研究,以在保留性能的同时降低成本。已有研究表明大型语言模型(LLMs)存在大量冗余,视觉Transformer的冗余也已被探究,但相较于LLMs,其系统性分析仍显不足。本研究将基于相似度的冗余分析扩展至视觉模型,通过测量层输入与输出间的余弦相似度,识别影响最小的变换。我们研究了多种Transformer架构的冗余模式,发现DINOv2和SwinV2等深度视觉Transformer与语言模型类似,存在显著冗余。随后,我们评估如何利用该冗余提升效率,分析不同剪枝策略下推理速度与性能下降的权衡关系。结果显示,适度剪枝可实现显著加速且对精度影响有限:在ImageNet-1K上,无需重新训练即可移除20%的DINOv2块,吞吐量提升1.24倍,每图像能耗降低20%,相对精度损失低于1%。我们进一步提出一种模型选择流程,可自动为给定数据集确定最优剪枝配置,使各架构的FLOPs平均降低13%至27%,精度变化在-0.3至+1.0个点之间。

英文摘要:

Transformer architectures have achieved strong results in natural language processing and computer vision, but their deployment is limited by high computational, memory and storage costs, motivating research into model compression techniques, such as pruning, while preserving performance. Prior work has shown substantial redundancy in large language models (LLMs), and redundancy in vision transformers has also been investigated, but it remains less systematically analyzed than in LLMs. In this work, we extend similarity-based redundancy analysis to vision models by measuring cosine similarity between layer inputs and outputs to identify transformations with minimal impact. We study redundancy patterns across several transformer architectures and find that deep vision transformers such as DINOv2 and SwinV2, like language models, exhibit significant redundancy. We then evaluate how this redundancy can be exploited to improve efficiency, analyzing the trade-off between inference speed and performance degradation under different pruning strategies. Our results show that moderate pruning can yield substantial acceleration with limited impact on accuracy, and that 20% of the DINOv2 blocks can be removed without any retraining, for a 1.24x throughput gain and a 20% lower energy per image at a relative accuracy loss below 1% on ImageNet-1K. We further propose a model selection pipeline that automatically identifies the best pruned configuration for a given dataset, reducing FLOPs by 13% to 27% on average across architectures with an average accuracy change between -0.3 and +1.0 points.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑