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

DaViT:双重注意力视觉Transformer

DaViT: Dual Attention Vision Transformers

The University of Hong Kong(香港大学);Microsoft Cloud + AI(微软云计算与人工智能部门);Baidu(百度)

Mingyu Ding, Bin Xiao, Noel Codella, Ping Luo, Jingdong Wang, Lu Yuan

摘要:

在这项工作中,我们介绍了双注意力视觉Transformer(DaViT),一个简单而有效的视觉Transformer架构,能够捕捉全球范围内,同时保持计算效率。我们建议从一个正交的角度来处理这个问题:利用“空间令牌”和“通道令牌”的自我注意力机制。对于空间标记,空间维度定义标记范围,通道维度定义标记特征维度。对于通道标记,我们有相反的情况:通道维度定义了标记范围,空间维度定义了标记特征维度。我们进一步沿着空间和通道令牌的序列方向对令牌进行分组,以保持整个模型的线性复杂度。我们发现,这两个自我注意力是相辅相成的:(i)由于每个通道令牌包含整个图像的抽象表示,通道注意力自然捕捉全局的相互作用和表示,通过考虑所有的空间位置时,计算注意力分数通道之间;(ii)空间注意力通过执行跨空间位置的细粒度交互来细化局部表征,这又有助于信道注意力中的全局信息建模。大量实验表明,我们的DaViT在四种不同的任务上实现了最先进的性能,并进行了高效的计算。在没有额外数据的情况下,DaViT-Tiny、DaViT-Small和DaViT-Base在ImageNet-1 K上分别实现了82.8%、84.2%和84.6%的top-1准确率,参数分别为28.3M、49.7M和87.9M。当我们使用1.5B弱监督图像和文本对进一步扩展DaViT时,DaViT-Gaint在ImageNet-1 K上达到了90.4%的top-1准确率。代码可在https://github.com/dingmyu/davit上获得。

英文摘要:

In this work, we introduce Dual Attention Vision Transformers (DaViT), a simple yet effective vision transformer architecture that is able to capture global context while maintaining computational efficiency. We propose approaching the problem from an orthogonal angle: exploiting self-attention mechanisms with both "spatial tokens" and "channel tokens". With spatial tokens, the spatial dimension defines the token scope, and the channel dimension defines the token feature dimension. With channel tokens, we have the inverse: the channel dimension defines the token scope, and the spatial dimension defines the token feature dimension. We further group tokens along the sequence direction for both spatial and channel tokens to maintain the linear complexity of the entire model. We show that these two self-attentions complement each other: (i) since each channel token contains an abstract representation of the entire image, the channel attention naturally captures global interactions and representations by taking all spatial positions into account when computing attention scores between channels; (ii) the spatial attention refines the local representations by performing fine-grained interactions across spatial locations, which in turn helps the global information modeling in channel attention. Extensive experiments show our DaViT achieves state-of-the-art performance on four different tasks with efficient computations. Without extra data, DaViT-Tiny, DaViT-Small, and DaViT-Base achieve 82.8%, 84.2%, and 84.6% top-1 accuracy on ImageNet-1K with 28.3M, 49.7M, and 87.9M parameters, respectively. When we further scale up DaViT with 1.5B weakly supervised image and text pairs, DaViT-Gaint reaches 90.4% top-1 accuracy on ImageNet-1K. Code is available at https://github.com/dingmyu/davit.

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

↑