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

多尺度与Token合并:让你的ViT更高效

Multi-Scale And Token Mergence: Make Your ViT More Efficient

Jilin University(吉林大学)

Zhe Bian, Zhe Wang, Wenqiang Han, Kangping Wang

AI总结:

针对ViT中MHSA计算量大、现有token丢弃方法易损失信息的问题,提出结合多尺度特征融合、基于重要性与相似度的token合并剪枝方法,可无缝集成到各类ViT中,在ImageNet上使DeiT-S计算成本降33%、准确率仅降0.1%。

摘要:

自诞生以来,Vision Transformer(ViT,视觉Transformer)已成为计算机视觉领域的主流模型。尽管如此,ViT中的多头自注意力(MHSA)机制计算量巨大,因为它需要计算所有token之间的关系。虽然一些技术通过丢弃token来降低计算开销,但这也会导致这些token中潜在信息的丢失。为解决这些问题,我们提出了一种新颖的token剪枝方法,该方法通过将非关键token与更关键的token合并来保留非关键token的信息,从而减轻剪枝对模型性能的影响。关键与非关键token通过其重要性分数进行识别,并基于相似度分数完成合并。此外,我们利用多尺度特征来表示图像,这些特征在token剪枝前进行融合,以生成更丰富的特征表示。重要的是,我们的方法可以无缝集成到各类ViT中,提升了其适配性。实验结果证实了我们的方法在降低token剪枝对模型性能影响方面的有效性。例如,在ImageNet数据集上,该方法在DeiT-S上实现了计算成本显著降低33%的效果,而准确率仅下降0.1%。

英文摘要:

Since its inception, Vision Transformer (ViT) has emerged as a prevalent model in the computer vision domain. Nonetheless, the multi-head self-attention (MHSA) mechanism in ViT is computationally expensive due to its calculation of relationships among all tokens. Although some techniques mitigate computational overhead by discarding tokens, this also results in the loss of potential information from those tokens. To tackle these issues, we propose a novel token pruning method that retains information from non-crucial tokens by merging them with more crucial tokens, thereby mitigating the impact of pruning on model performance. Crucial and non-crucial tokens are identified by their importance scores and merged based on similarity scores. Furthermore, multi-scale features are exploited to represent images, which are fused prior to token pruning to produce richer feature representations. Importantly, our method can be seamlessly integrated with various ViTs, enhancing their adaptability. Experimental evidence substantiates the efficacy of our approach in reducing the influence of token pruning on model performance. For instance, on the ImageNet dataset, it achieves a remarkable 33% reduction in computational costs while only incurring a 0.1% decrease in accuracy on DeiT-S.

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

↑