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

自适应MLP剪枝用于大型视觉变换器

Adaptive MLP Pruning for Large Vision Transformers

Central South University(中南大学)

Chengchao Shen

AI总结:

本文提出自适应MLP剪枝方法,通过改进的重要性评估和自适应剪枝策略,显著减少大型视觉变换器的参数和计算量,同时保持性能。

摘要:

大型视觉变换器展现出出色的可扩展性,因为随着模型容量的增加,其性能可以得到显著提升。然而,其庞大的参数导致了极高的计算和内存需求。通过分析常见的变换器结构,我们发现多层感知机(MLP)模块构成了模型参数的最大部分。在本文中,我们提出了一种自适应MLP剪枝(AMP)方法,以大幅减少大型视觉变换器的参数,而不会明显降低性能。首先,我们采用基于泰勒的方法来评估MLP神经元的重要性。然而,使用one-hot交叉熵损失计算重要性会忽略对其他类别的潜在预测,从而降低评估的重要性分数的质量。为了解决这个问题,我们引入了无标签信息熵标准,以更准确地建模原始模型的预测。其次,我们通过上述的重要性分数对MLP的隐藏神经元进行排序,并应用二分查找算法,根据不同MLP模块的冗余性,自适应地剪枝排序后的神经元,从而避免预定义的压缩比率。在几种最先进的大型视觉变换器上进行的实验结果表明,我们的方法在接近无损的方式下实现了约40%的参数和FLOPs减少。此外,当模型在剪枝后不进行微调时,我们的方法在显著的幅度上优于其他剪枝方法。源代码和训练权重可在https://github.com/visresearch/AMP上获得。

英文摘要:

Large vision transformers present impressive scalability, as their performance can be well improved with increased model capacity. Nevertheless, their cumbersome parameters results in exorbitant computational and memory demands. By analyzing prevalent transformer structures, we find that multilayer perceptron (MLP) modules constitute the largest share of the model's parameters. In this paper, we propose an Adaptive MLP Pruning (AMP) method to substantially reduce the parameters of large vision transformers without obvious performance degradation. First, we adopt Taylor based method to evaluate neuron importance of MLP. However, the importance computation using one-hot cross entropy loss ignores the potential predictions on other categories, thus degrading the quality of the evaluated importance scores. To address this issue, we introduce label-free information entropy criterion to fully model the predictions of the original model for more accurate importance evaluation. Second, we rank the hidden neurons of MLP by the above importance scores and apply binary search algorithm to adaptively prune the ranked neurons according to the redundancy of different MLP modules, thereby avoiding the predefined compression ratio. Experimental results on several state-of-the-art large vision transformers, including CLIP and DINOv2, demonstrate that our method achieves roughly 40\% parameter and FLOPs reduction in a near lossless manner. Moreover, when the models are not finetuned after pruning, our method outperforms other pruning methods by significantly large margin. The source code and trained weights are available at https://github.com/visresearch/AMP.

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

↑