arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2403.10030cs.CV
收藏

面向高效视觉Transformer的多准则令牌融合与一步前瞻注意力

Multi-criteria Token Fusion with One-step-ahead Attention for Efficient Vision Transformers

Korea University(高丽大学)

Sanghyeok Lee, Joonmyung Choi, Hyunwoo J. Kim

AI总结:

本文提出多准则令牌融合方法MCTF,结合一步前瞻注意力逐步融合冗余令牌,在ImageNet1K上以约44%的FLOPs降低实现性能提升,并在多种ViT上实现至少31%的无损加速。

摘要:

视觉Transformer(ViT)已成为计算机视觉领域的重要骨干网络。为了实现更高效的ViT,近期研究通过剪枝或融合冗余令牌来降低自注意力层的二次计算代价。然而,这些工作因信息损失而面临速度与精度之间的权衡。本文认为,令牌融合需要考虑令牌之间的多样化关系,以尽量减少信息损失。为此,我们提出了一种多准则令牌融合方法(MCTF),该方法基于多种准则(例如相似性、信息量以及已融合令牌的大小)逐步融合令牌。此外,我们利用一步前瞻注意力,这是一种改进的方法,用于捕获令牌的信息量。通过使用令牌减少一致性来训练配备MCTF的模型,我们在图像分类(ImageNet1K)中实现了最佳的速度与精度权衡。实验结果表明,无论是否经过训练,MCTF都持续优于以往的令牌减少方法。具体而言,配备MCTF的DeiT-T和DeiT-S分别将FLOPs降低了约44%,同时相较于基础模型分别提升了性能(+0.5%和+0.3%)。我们还展示了MCTF在各种视觉Transformer(例如T2T-ViT、LV-ViT)中的适用性,在无性能下降的情况下实现了至少31%的加速。代码可在https://github.com/mlvlab/MCTF获取。

英文摘要:

Vision Transformer (ViT) has emerged as a prominent backbone for computer vision. For more efficient ViTs, recent works lessen the quadratic cost of the self-attention layer by pruning or fusing the redundant tokens. However, these works faced the speed-accuracy trade-off caused by the loss of information. Here, we argue that token fusion needs to consider diverse relations between tokens to minimize information loss. In this paper, we propose a Multi-criteria Token Fusion (MCTF), that gradually fuses the tokens based on multi-criteria (e.g., similarity, informativeness, and size of fused tokens). Further, we utilize the one-step-ahead attention, which is the improved approach to capture the informativeness of the tokens. By training the model equipped with MCTF using a token reduction consistency, we achieve the best speed-accuracy trade-off in the image classification (ImageNet1K). Experimental results prove that MCTF consistently surpasses the previous reduction methods with and without training. Specifically, DeiT-T and DeiT-S with MCTF reduce FLOPs by about 44% while improving the performance (+0.5%, and +0.3%) over the base model, respectively. We also demonstrate the applicability of MCTF in various Vision Transformers (e.g., T2T-ViT, LV-ViT), achieving at least 31% speedup without performance degradation. Code is available at https://github.com/mlvlab/MCTF.

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

↑