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

预测令牌影响力以实现高效视觉Transformer

Predicting Token Impact Towards Efficient Vision Transformer

Fudan University(复旦大学);China University of Petroleum(中国石油大学)

Hong Wang, Su Yang, Xiaoke Huang, Weishan Zhang

AI总结:

本文首次从特征选择视角提出令牌过滤方法,通过预测令牌被掩蔽后的损失变化来衡量其影响力,并在自注意力前仅用一次多层感知机过滤不相关令牌,从而在推理阶段显著降低视觉Transformer的计算量,实现易于部署的轻量化模型。

摘要:

在自注意力之前进行令牌过滤以减少不相关令牌,是实现高效视觉Transformer的一种直接方法。这是首个从特征选择视角看待令牌过滤的工作,我们根据令牌被掩蔽后能在多大程度上改变损失来衡量其重要性。如果掩蔽某个感兴趣的令牌后损失变化很大,则意味着该令牌对最终决策具有显著影响,因此是相关的。否则,该令牌对最终决策的重要性较低,可以被过滤掉。在应用从整个训练数据中泛化得到的令牌过滤模块后,推理阶段馈入自注意力模块的令牌数量可以明显减少,从而使后续所有自注意力层的计算量大幅降低。令牌过滤器可以用一个非常简单的网络实现,我们采用的是多层感知机。除了在自注意力之前从一开始仅执行一次令牌过滤这一独特之处外,使我们的方法区别于其他令牌过滤器的另一个核心特征在于从特征选择角度看待令牌影响力的可预测性。实验表明,所提出的方法提供了一种高效途径,在与骨干网络结合并通过微调优化后可以得到轻量化模型,与现有的基于从头训练的方法相比更易于部署。

英文摘要:

Token filtering to reduce irrelevant tokens prior to self-attention is a straightforward way to enable efficient vision Transformer. This is the first work to view token filtering from a feature selection perspective, where we weigh the importance of a token according to how much it can change the loss once masked. If the loss changes greatly after masking a token of interest, it means that such a token has a significant impact on the final decision and is thus relevant. Otherwise, the token is less important for the final decision, so it can be filtered out. After applying the token filtering module generalized from the whole training data, the token number fed to the self-attention module can be obviously reduced in the inference phase, leading to much fewer computations in all the subsequent self-attention layers. The token filter can be realized using a very simple network, where we utilize multi-layer perceptron. Except for the uniqueness of performing token filtering only once from the very beginning prior to self-attention, the other core feature making our method different from the other token filters lies in the predictability of token impact from a feature selection point of view. The experiments show that the proposed method provides an efficient way to approach a light weighted model after optimized with a backbone by means of fine tune, which is easy to be deployed in comparison with the existing methods based on training from scratch.

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

↑