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

Once for Both:用于视觉Transformer压缩的重要性与稀疏性搜索的单阶段方法

Once for Both: Single Stage of Importance and Sparsity Search for Vision Transformer Compression

School of Information Science and Technology, Fudan University(复旦大学信息科学与技术学院);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Academy for Engineering and Technology, Fudan University(复旦大学工程技术学院);Shanghai Jiao Tong University(上海交通大学);Tsinghua University(清华大学)

Hancheng Ye, Chong Yu, Peng Ye, Renqiu Xia, Yansong Tang, Jiwen Lu, Tao Chen, Bo Zhang

AI总结:

本文提出一种名为OFB的单阶段视觉Transformer压缩方法,通过双掩码方案和自适应独热损失同时评估重要性与稀疏性分数,并结合渐进式掩码图像建模正则化特征空间,在多种架构下实现优于现有方法的压缩性能且大幅提升搜索效率。

摘要:

近期的视觉Transformer压缩(VTC)工作主要遵循两阶段方案,首先在每个子模块中评估或预设每个模型单元的重要性分数,随后根据目标稀疏性约束评估稀疏性分数。这种分离的评估过程导致重要性分数与稀疏性分数分布之间产生差距,从而给VTC造成高昂的搜索成本。在本工作中,我们首次研究如何将重要性分数与稀疏性分数的评估整合到单一阶段中,以高效的方式搜索最优子网。具体而言,我们提出OFB,一种同时评估重要性分数和可微稀疏性分数的成本高效方法,称为Once for Both(OFB),用于VTC。首先,通过将重要性分数与可微稀疏性分数纠缠以共同决定每个单元的剪枝潜力(prunability),开发出双掩码方案。这种双掩码搜索策略进一步与提出的自适应独热损失结合使用,以实现最重要子网的渐进且高效的搜索。最后,提出渐进式掩码图像建模(PMIM),在搜索过程中对特征空间进行正则化使其更具代表性,因为特征空间可能因维度降低而退化。大量实验表明,OFB在各种视觉Transformer架构下能够实现优于基于搜索和基于剪枝的最先进方法的压缩性能,同时显著提升搜索效率,例如在ImageNet-1K上压缩DeiT-S仅需一个GPU搜索日。

英文摘要:

Recent Vision Transformer Compression (VTC) works mainly follow a two-stage scheme, where the importance score of each model unit is first evaluated or preset in each submodule, followed by the sparsity score evaluation according to the target sparsity constraint. Such a separate evaluation process induces the gap between importance and sparsity score distributions, thus causing high search costs for VTC. In this work, for the first time, we investigate how to integrate the evaluations of importance and sparsity scores into a single stage, searching the optimal subnets in an efficient manner. Specifically, we present OFB, a cost-efficient approach that simultaneously evaluates both importance and sparsity scores, termed Once for Both (OFB), for VTC. First, a bi-mask scheme is developed by entangling the importance score and the differentiable sparsity score to jointly determine the pruning potential (prunability) of each unit. Such a bi-mask search strategy is further used together with a proposed adaptive one-hot loss to realize the progressive-and-efficient search for the most important subnet. Finally, Progressive Masked Image Modeling (PMIM) is proposed to regularize the feature space to be more representative during the search process, which may be degraded by the dimension reduction. Extensive experiments demonstrate that OFB can achieve superior compression performance over state-of-the-art searching-based and pruning-based methods under various Vision Transformer architectures, meanwhile promoting search efficiency significantly, e.g., costing one GPU search day for the compression of DeiT-S on ImageNet-1K.

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

↑