arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.04803cs.CVcs.LG
收藏

CoAtNet:将卷积和注意力结合到所有数据大小

CoAtNet: Marrying Convolution and Attention for All Data Sizes

Google Research, Brain Team(谷歌研究院大脑团队)

Zihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing Tan

摘要:

Transformers在计算机视觉中引起了越来越多的兴趣,但它们仍然落后于最先进的卷积网络。在这项工作中,我们表明,虽然Transformers往往具有更大的模型容量,但由于缺乏正确的归纳偏差,它们的泛化能力可能比卷积网络更差。为了有效地结合这两种架构的优势,我们提出了CoAtNets(发音为“coat”nets),这是一个基于两个关键见解的混合模型家族:(1)dependency卷积和self-Attention可以通过简单的相对注意力自然地统一起来;(2)以原则性的方式垂直堆叠卷积层和注意力层在提高泛化能力,容量和效率方面令人惊讶地有效。实验表明,我们的CoAtNet在不同的资源约束下,在不同的数据集上实现了最先进的性能:在没有额外数据的情况下,CoAtNet达到了86.0%的ImageNet top-1准确率;当使用ImageNet-21 K的13 M图像进行预训练时,我们的CoAtNet达到了88.56%的top-1准确率,将ViT-huge预训练与JFT-300 M的300 M图像进行匹配,同时使用23倍的数据;值得注意的是,当我们使用JFT-3B进一步扩展CoAtNet时,它在ImageNet上实现了90.88%的top-1准确率,建立了一个新的最先进的结果。

英文摘要:

Transformers have attracted increasing interests in computer vision, but they still fall behind state-of-the-art convolutional networks. In this work, we show that while Transformers tend to have larger model capacity, their generalization can be worse than convolutional networks due to the lack of the right inductive bias. To effectively combine the strengths from both architectures, we present CoAtNets(pronounced "coat" nets), a family of hybrid models built from two key insights: (1) depthwise Convolution and self-Attention can be naturally unified via simple relative attention; (2) vertically stacking convolution layers and attention layers in a principled way is surprisingly effective in improving generalization, capacity and efficiency. Experiments show that our CoAtNets achieve state-of-the-art performance under different resource constraints across various datasets: Without extra data, CoAtNet achieves 86.0% ImageNet top-1 accuracy; When pre-trained with 13M images from ImageNet-21K, our CoAtNet achieves 88.56% top-1 accuracy, matching ViT-huge pre-trained with 300M images from JFT-300M while using 23x less data; Notably, when we further scale up CoAtNet with JFT-3B, it achieves 90.88% top-1 accuracy on ImageNet, establishing a new state-of-the-art result.

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

↑