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

利用组混合注意力推进视觉Transformer

Advancing Vision Transformers with Group-Mix Attention

The University of Hong Kong(香港大学);Tencent AI Lab(腾讯人工智能实验室);Ant Research(蚂蚁研究院);Fudan University(复旦大学);Peking University(北京大学);The Chinese University of Hong Kong(香港中文大学)

Chongjian Ge, Xiaohan Ding, Zhan Tong, Li Yuan, Jiangliu Wang, Yibing Song, Ping Luo

AI总结:

提出组混合注意力(GMA)替代传统自注意力,通过同时捕获token与组的多粒度相关性提升表示能力,并构建GroupMixFormer骨干网络在多项视觉任务上以更少参数实现SOTA性能。

摘要:

视觉Transformer(ViTs)已被证明能通过多头自注意力(MHSA)建模长程依赖来增强视觉识别,MHSA通常被表述为Query-Key-Value计算。然而,由Query和Key生成的注意力图仅捕获单一粒度上的token到token相关性。在本文中,我们认为自注意力应具有更全面的机制来捕获token和组(即多个相邻token)之间的相关性,以获得更高的表示能力。因此,我们提出组混合注意力(GMA)作为传统自注意力的高级替代方案,它能同时捕获不同组大小的token到token、token到组和组到组相关性。为此,GMA将Query、Key和Value均匀分割为多个段,并执行不同的组聚合以生成组代理。注意力图基于token和组代理的混合进行计算,并用于重新组合Value中的token和组。基于GMA,我们引入了一个强大的骨干网络GroupMixFormer,它在图像分类、目标检测和语义分割任务上以比现有模型更少的参数量实现了最先进的性能。例如,GroupMixFormer-L(具有70.3M参数和384^2输入)在ImageNet-1K上无外部数据下达到86.2%的Top-1准确率,而GroupMixFormer-B(具有45.8M参数)在ADE20K上达到51.2%的mIoU。

英文摘要:

Vision Transformers (ViTs) have been shown to enhance visual recognition through modeling long-range dependencies with multi-head self-attention (MHSA), which is typically formulated as Query-Key-Value computation. However, the attention map generated from the Query and Key captures only token-to-token correlations at one single granularity. In this paper, we argue that self-attention should have a more comprehensive mechanism to capture correlations among tokens and groups (i.e., multiple adjacent tokens) for higher representational capacity. Thereby, we propose Group-Mix Attention (GMA) as an advanced replacement for traditional self-attention, which can simultaneously capture token-to-token, token-to-group, and group-to-group correlations with various group sizes. To this end, GMA splits the Query, Key, and Value into segments uniformly and performs different group aggregations to generate group proxies. The attention map is computed based on the mixtures of tokens and group proxies and used to re-combine the tokens and groups in Value. Based on GMA, we introduce a powerful backbone, namely GroupMixFormer, which achieves state-of-the-art performance in image classification, object detection, and semantic segmentation with fewer parameters than existing models. For instance, GroupMixFormer-L (with 70.3M parameters and 384^2 input) attains 86.2% Top-1 accuracy on ImageNet-1K without external data, while GroupMixFormer-B (with 45.8M parameters) attains 51.2% mIoU on ADE20K.

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

↑