[论文解读] Incorporating Convolution Designs into Visual Transformers
本文提出CeiT,一种将卷积神经网络归纳偏置融入视觉Transformer的模型,以提升特征提取能力和优化效率。通过引入Image-to-Tokens模块、局部增强前馈层以及逐层分类token注意力机制,CeiT在ImageNet上实现了SOTA性能(输入为384×384时top-1准确率达到83.3%),且收敛速度比DeiT快3倍,无需大规模数据或知识蒸馏。
Motivated by the success of Transformers in natural language processing (NLP) tasks, there emerge some attempts (e.g., ViT and DeiT) to apply Transformers to the vision domain. However, pure Transformer architectures often require a large amount of training data or extra supervision to obtain comparable performance with convolutional neural networks (CNNs). To overcome these limitations, we analyze the potential drawbacks when directly borrowing Transformer architectures from NLP. Then we propose a new extbf{Convolution-enhanced image Transformer (CeiT)} which combines the advantages of CNNs in extracting low-level features, strengthening locality, and the advantages of Transformers in establishing long-range dependencies. Three modifications are made to the original Transformer: extbf{1)} instead of the straightforward tokenization from raw input images, we design an extbf{Image-to-Tokens (I2T)} module that extracts patches from generated low-level features; extbf{2)} the feed-froward network in each encoder block is replaced with a extbf{Locally-enhanced Feed-Forward (LeFF)} layer that promotes the correlation among neighboring tokens in the spatial dimension; extbf{3)} a extbf{Layer-wise Class token Attention (LCA)} is attached at the top of the Transformer that utilizes the multi-level representations. Experimental results on ImageNet and seven downstream tasks show the effectiveness and generalization ability of CeiT compared with previous Transformers and state-of-the-art CNNs, without requiring a large amount of training data and extra CNN teachers. Besides, CeiT models also demonstrate better convergence with $3 imes$ fewer training iterations, which can reduce the training cost significantly\footnote{Code and models will be released upon acceptance.}.
研究动机与目标
- 为解决纯Transformer在小数据集上泛化能力差的问题,通过引入CNN的归纳偏置。
- 通过在分词前提取低级特征,提升局部性与空间相关性,从而改善特征表示。
- 通过将局部归纳偏置嵌入Transformer架构,加速训练收敛。
- 在ImageNet及下游任务上实现具有竞争力的性能,且不依赖大规模预训练或知识蒸馏。
提出的方法
- 引入Image-to-Tokens(I2T)模块,在图像分块分词前通过卷积层生成低级特征,提升特征质量且不增加计算量。
- 用使用深度可分离卷积的局部增强前馈(LeFF)层替代标准前馈网络,增强相邻token之间的空间相关性。
- 采用逐层分类token注意力(LCA)机制,聚合多层级特征以优化分类token的表示。
- 采用多阶段注意力机制,利用编码器不同层的特征,提升最终分类性能。
- 在I2T和LeFF模块中引入BatchNorm与最大池化,以稳定训练并提升性能。
- 设计架构时在保持计算效率的同时,将CNN的归纳偏置嵌入Transformer框架。
实验结果
研究问题
- RQ1将卷积归纳偏置融入是否能提升视觉Transformer在小数据集上的泛化能力?
- RQ2用基于特征的分词替代原始图像块分词,是否能增强视觉Transformer中的特征表示?
- RQ3在前馈模块中引入局部归纳偏置,是否能改善空间相关性建模与训练稳定性?
- RQ4与标准Transformer(如DeiT)相比,所提架构在训练成本上能降低多少?
- RQ5混合CNN-Transformer设计是否能在无需知识蒸馏或大规模预训练的情况下实现SOTA性能?
主要发现
- CeiT-S在标准224×224输入下于ImageNet上达到82.0%的top-1准确率,优于ViT与DeiT变体。
- 在384×384分辨率微调时,CeiT-S准确率提升至83.3%,展现出强大的泛化能力。
- CeiT模型收敛速度比DeiT快3倍,在100个周期内达到与DeiT在300个周期内相当的性能。
- 消融实验证实,LeFF层中使用BatchNorm与3×3卷积核可获得最佳性能,较基线提升2.2%准确率。
- 结合最大池化与BatchNorm的I2T模块优于其他变体,证明其对稳定高效特征提取至关重要。
- LCA模块相较基线将top-1准确率提升0.6%,证实多层级特征聚合的有效性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。