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

ToSA:面向高效 Vision Transformer 的 Token 选择性注意力

ToSA: Token Selective Attention for Efficient Vision Transformers

Qualcomm AI Research(高通人工智能研究)

Manish Kumar Singh, Rajeev Yasarla, Hong Cai, Mingu Lee, Fatih Porikli

AI总结:

提出 ToSA token 选择性注意力,通过预测下一层注意力图筛选重要 token 并让其余 token 跳层,在保持精度的同时降低 ViT 计算成本并支持密集预测。

摘要:

本文提出一种新颖的 token 选择性注意力方法 ToSA,它能够识别需要被注意的 token,以及那些可以跳过某个 transformer 层的 token。更具体地说,一个 token 选择器解析当前注意力图,并预测下一层的注意力图,随后这些预测图被用于选择应当参与注意力运算的重要 token。其余 token 直接绕过下一层,并与经过注意力处理的 token 拼接,以重新组成完整的 token 集合。通过这种方式,由于参与自注意力的 token 更少,我们降低了二次方级别的计算和内存开销,同时在整个网络中保留所有图像 patch 的特征,这使其能够用于密集预测任务。实验表明,通过应用 ToSA,我们可以在 ImageNet 分类基准上保持精度的同时显著降低计算成本。此外,我们在 NYU Depth V2 上的单目深度估计这一密集预测任务中进行评估,结果表明,使用带有 ToSA 的明显更轻量的骨干网络,可以达到相近的深度预测精度。

英文摘要:

In this paper, we propose a novel token selective attention approach, ToSA, which can identify tokens that need to be attended as well as those that can skip a transformer layer. More specifically, a token selector parses the current attention maps and predicts the attention maps for the next layer, which are then used to select the important tokens that should participate in the attention operation. The remaining tokens simply bypass the next layer and are concatenated with the attended ones to re-form a complete set of tokens. In this way, we reduce the quadratic computation and memory costs as fewer tokens participate in self-attention while maintaining the features for all the image patches throughout the network, which allows it to be used for dense prediction tasks. Our experiments show that by applying ToSA, we can significantly reduce computation costs while maintaining accuracy on the ImageNet classification benchmark. Furthermore, we evaluate on the dense prediction task of monocular depth estimation on NYU Depth V2, and show that we can achieve similar depth prediction accuracy using a considerably lighter backbone with ToSA.

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

↑