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

CrossFormer++:一种基于跨尺度注意力的多功能视觉Transformer

CrossFormer++: A Versatile Vision Transformer Hinging on Cross-scale Attention

Zhejiang University(浙江大学);Zhejiang Lab(之江实验室);Hong Kong University of Science and Technology(香港科技大学);Tencent(腾讯)

Wenxiao Wang, Wei Chen, Qibo Qiu, Long Chen, Boxi Wu, Binbin Lin, Xiaofei He, Wei Liu

AI总结:

本文提出CrossFormer++,通过跨尺度嵌入层、长短距离注意力、渐进式组大小和振幅冷却层,解决视觉Transformer未充分利用多尺度特征及注意力图扩大和振幅爆炸问题,在多个视觉任务上取得领先性能。

摘要:

虽然不同尺度的特征在感知上对视觉输入很重要,但现有的视觉Transformer尚未明确利用它们。为此,我们首先提出了一种跨尺度视觉Transformer,称为CrossFormer。它引入了跨尺度嵌入层(CEL)和长短距离注意力(LSDA)。一方面,CEL将每个token与多个不同尺度的patch混合,为自注意力模块本身提供跨尺度特征。另一方面,LSDA将自注意力模块拆分为短距离注意力和长距离注意力两个部分,这不仅降低了计算负担,还同时在token中保留了小尺度和大尺度特征。此外,通过在CrossFormer上的实验,我们观察到另外两个影响视觉Transformer性能的问题,即自注意力图不断扩大和振幅爆炸。因此,我们进一步提出了渐进式组大小(PGS)范式和振幅冷却层(ACL),分别用于缓解这两个问题。将PGS和ACL结合到CrossFormer中的模型称为CrossFormer++。大量实验表明,CrossFormer++在图像分类、目标检测、实例分割和语义分割任务上优于其他视觉Transformer。代码将发布在:https://github.com/cheerss/CrossFormer。

英文摘要:

While features of different scales are perceptually important to visual inputs, existing vision transformers do not yet take advantage of them explicitly. To this end, we first propose a cross-scale vision transformer, CrossFormer. It introduces a cross-scale embedding layer (CEL) and a long-short distance attention (LSDA). On the one hand, CEL blends each token with multiple patches of different scales, providing the self-attention module itself with cross-scale features. On the other hand, LSDA splits the self-attention module into a short-distance one and a long-distance counterpart, which not only reduces the computational burden but also keeps both small-scale and large-scale features in the tokens. Moreover, through experiments on CrossFormer, we observe another two issues that affect vision transformers' performance, i.e., the enlarging self-attention maps and amplitude explosion. Thus, we further propose a progressive group size (PGS) paradigm and an amplitude cooling layer (ACL) to alleviate the two issues, respectively. The CrossFormer incorporating with PGS and ACL is called CrossFormer++. Extensive experiments show that CrossFormer++ outperforms the other vision transformers on image classification, object detection, instance segmentation, and semantic segmentation tasks. The code will be available at: https://github.com/cheerss/CrossFormer.

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

↑