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

ImagePiece:用于高效图像识别的内容感知重标记化

ImagePiece: Content-aware Re-tokenization for Efficient Image Recognition

LG AI Research(LG人工智能研究院);Chung-ang University(中央大学)

Seungdong Yoa, Seungjun Lee, Hyeseung Cho, Bumsoo Kim, Woohyung Lim

AI总结:

针对ViT网格token语义不足的问题,提出重标记化策略ImagePiece,通过局部连贯分组生成有意义的token,在大幅提升推理速度的同时保持或提升分类准确率。

摘要:

Vision Transformers(ViTs)在各种计算机视觉任务中取得了显著成功。然而,由于其内在对多头自注意力(MHSA)的依赖,ViTs具有巨大的计算成本,这促使人们努力加速ViTs以用于实际应用。为此,近期的工作旨在减少token数量,主要关注如何有效地修剪或合并它们。尽管如此,由于ViT token是从不重叠的网格块生成的,它们通常无法传达足够的语义,这使其与高效的ViT不兼容。为了解决这个问题,我们提出了ImagePiece,一种用于Vision Transformers的新型重标记化策略。遵循NLP标记化的MaxMatch策略,ImagePiece将语义不足但在局部连贯的token进行分组,直到它们传达出意义。这种简单的重标记化与先前的token减少方法高度兼容,能够大幅缩小相关token的范围,将DeiT-S的推理速度提高54%(快了近1.5倍),同时在ImageNet分类准确率上实现了0.39%的提升。对于超高速推理场景(加速251%),我们的方法以超过8%的准确率超越了其他基线方法。

英文摘要:

Vision Transformers (ViTs) have achieved remarkable success in various computer vision tasks. However, ViTs have a huge computational cost due to their inherent reliance on multi-head self-attention (MHSA), prompting efforts to accelerate ViTs for practical applications. To this end, recent works aim to reduce the number of tokens, mainly focusing on how to effectively prune or merge them. Nevertheless, since ViT tokens are generated from non-overlapping grid patches, they usually do not convey sufficient semantics, making it incompatible with efficient ViTs. To address this, we propose ImagePiece, a novel re-tokenization strategy for Vision Transformers. Following the MaxMatch strategy of NLP tokenization, ImagePiece groups semantically insufficient yet locally coherent tokens until they convey meaning. This simple retokenization is highly compatible with previous token reduction methods, being able to drastically narrow down relevant tokens, enhancing the inference speed of DeiT-S by 54% (nearly 1.5$\times$ faster) while achieving a 0.39% improvement in ImageNet classification accuracy. For hyper-speed inference scenarios (with 251% acceleration), our approach surpasses other baselines by an accuracy over 8%.

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

↑