Although vision transformers (ViTs) have shown promising results in various computer vision tasks recently, their high computational cost limits their practical applications. Previous approaches that prune redundant tokens have demonstrated a good trade-off between performance and computation costs. Nevertheless, errors caused by pruning strategies can lead to significant information loss. Our quantitative experiments reveal that the impact of pruned tokens on performance should be noticeable. To address this issue, we propose a novel joint Token Pruning & Squeezing module (TPS) for compressing vision transformers with higher efficiency. Firstly, TPS adopts pruning to get the reserved and pruned subsets. Secondly, TPS squeezes the information of pruned tokens into partial reserved tokens via the unidirectional nearest-neighbor matching and similarity-based fusing steps. Compared to state-of-the-art methods, our approach outperforms them under all token pruning intensities. Especially while shrinking DeiT-tiny&small computational budgets to 35%, it improves the accuracy by 1%-6% compared with baselines on ImageNet classification. The proposed method can accelerate the throughput of DeiT-small beyond DeiT-tiny, while its accuracy surpasses DeiT-tiny by 4.78%. Experiments on various transformers demonstrate the effectiveness of our method, while analysis experiments prove our higher robustness to the errors of the token pruning policy. Code is available at https://github.com/megvii-research/TPS-CVPR2023.


翻译:尽管视觉Transformer(ViTs)近年来在多种计算机视觉任务中展现出令人瞩目的成果,但其高计算成本限制了实际应用。先前通过剪枝冗余令牌的方法在性能与计算开销之间取得了良好平衡,然而,剪枝策略导致的误差可能引发显著的信息损失。我们的定量实验表明,被剪除令牌对性能的影响不容忽视。为解决该问题,我们提出一种新颖的联合令牌剪枝与挤压模块(TPS),以实现更高效率的视觉Transformer压缩。首先,TPS通过剪枝获得保留子集与剪除子集;其次,TPS通过单向最近邻匹配与基于相似性的融合步骤,将剪除令牌的信息压缩至部分保留令牌中。与现有最优方法相比,我们的方法在所有令牌剪枝强度下均表现更优。特别地,当DeiT-tiny与DeiT-small的计算预算缩减至35%时,在ImageNet分类任务上,我们的方法相比基线模型将准确率提升了1%-6%。该方法可加速DeiT-small的吞吐量超越DeiT-tiny,同时其准确率比DeiT-tiny高出4.78%。针对多种Transformer的实验验证了本方法的有效性,而分析实验进一步证明,本方法对令牌剪枝策略的误差具有更强的鲁棒性。代码已开源至https://github.com/megvii-research/TPS-CVPR2023。

0
下载
关闭预览

相关内容

专知会员服务
30+阅读 · 2021年7月30日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
灾难性遗忘问题新视角:迁移-干扰平衡
CreateAMind
17+阅读 · 2019年7月6日
深度卷积神经网络中的降采样
极市平台
12+阅读 · 2019年5月24日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
1+阅读 · 2009年12月31日
VIP会员
最新内容
美空军新型反无人机部队初探
专知会员服务
3+阅读 · 今天5:45
《防空交战流程的概率建模研究》
专知会员服务
6+阅读 · 今天5:04
ICML 2026 教程 | 数值优化理论还重要吗?
专知会员服务
4+阅读 · 7月26日
ICM 2026 | 陶哲轩:人工智能时代的数学
专知会员服务
8+阅读 · 7月26日
《反无人机交战场景下的战斗归零研究》
专知会员服务
7+阅读 · 7月26日
博士论文 | 用代码结构感知方法推进代码大模型
相关VIP内容
专知会员服务
30+阅读 · 2021年7月30日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
1+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员