Skip to main content
QUICK REVIEW

[论文解读] Conformer: Local Features Coupling Global Representations for Visual Recognition

Zhiliang Peng, Wei Huang|arXiv (Cornell University)|May 9, 2021
Advanced Neural Network Applications被引用 11
一句话总结

本文提出Conformer,一种双分支神经网络,通过一种新型的特征耦合单元(FCU)将卷积神经网络(CNN)的局部特征与视觉Transformer(ViT)的全局表征进行融合。通过在多个阶段实现交互式、双向的特征融合,Conformer在参数量和浮点运算量(FLOP)相当的条件下实现了最先进性能,在ImageNet上比DeiT-B高出2.3%,在MSCOCO上进行目标检测和实例分割时分别比ResNet-101高出3.7%和3.6%。

ABSTRACT

Within Convolutional Neural Network (CNN), the convolution operations are good at extracting local features but experience difficulty to capture global representations. Within visual transformer, the cascaded self-attention modules can capture long-distance feature dependencies but unfortunately deteriorate local feature details. In this paper, we propose a hybrid network structure, termed Conformer, to take advantage of convolutional operations and self-attention mechanisms for enhanced representation learning. Conformer roots in the Feature Coupling Unit (FCU), which fuses local features and global representations under different resolutions in an interactive fashion. Conformer adopts a concurrent structure so that local features and global representations are retained to the maximum extent. Experiments show that Conformer, under the comparable parameter complexity, outperforms the visual transformer (DeiT-B) by 2.3% on ImageNet. On MSCOCO, it outperforms ResNet-101 by 3.7% and 3.6% mAPs for object detection and instance segmentation, respectively, demonstrating the great potential to be a general backbone network. Code is available at https://github.com/pengzhiliang/Conformer.

研究动机与目标

  • 为解决CNN在捕捉长距离依赖方面的局限性以及ViT在丢失局部细节方面的不足,本文旨在结合两种架构的优势。
  • 开发一种统一的主干网络,以同时保留局部判别性特征与全局上下文表征。
  • 设计一种可学习的、交互式的融合机制,实现在不同分辨率和模态间对齐特征,且计算开销极小。
  • 证明通过特征耦合联合训练CNN与ViT分支可提升模型的泛化能力与鲁棒性。

提出的方法

  • Conformer采用并行双分支架构,其中CNN分支(受ResNet启发)与Transformer分支(受ViT启发)均通过交叉熵损失端到端训练。
  • 特征耦合单元(FCU)通过1×1卷积对齐通道维度,通过上采样/下采样对齐空间分辨率,通过LayerNorm与BatchNorm对齐特征统计量,实现双向特征融合。
  • 在两个分支的每个模块之后插入FCU,通过交互式优化逐步减少CNN与ViT特征之间的语义差异。
  • FCU中的空间对齐采用最近邻插值进行上采样,平均池化进行下采样,兼顾精度与效率。
  • 由于CNN分支具有固有的空间位置归纳偏差,因此省略了位置嵌入,以减少冗余。
  • 模型采用标准数据增强与正则化策略进行训练,推理阶段在旋转或缩放输入下无需微调,以评估其鲁棒性。
Figure 2: Network architecture of the proposed Conformer. (a) Up-sampling and down-sampling for spatial alignment of feature maps and patch embeddings. (b) Implementation details of the CNN block, the transformer block, and the Feature Coupling Unit (FCU). (c) Thumbnail of Conformer.
Figure 2: Network architecture of the proposed Conformer. (a) Up-sampling and down-sampling for spatial alignment of feature maps and patch embeddings. (b) Implementation details of the CNN block, the transformer block, and the Feature Coupling Unit (FCU). (c) Thumbnail of Conformer.

实验结果

研究问题

  • RQ1能否通过结合CNN与ViT架构的双分支网络,在视觉表征学习上超越单一架构?
  • RQ2如何在不引入显著计算成本的前提下,有效融合CNN的局部特征与自注意力机制的全局表征?
  • RQ3在旋转与缩放等分布偏移下,CNN与ViT分支之间的交互式、多阶段特征耦合是否能提升模型泛化能力?
  • RQ4在参数量与FLOP预算相当的条件下,所提架构能否超越独立的CNN与视觉Transformer?

主要发现

  • Conformer-S在ImageNet上达到83.4%的top-1准确率,优于参数量相近的DeiT-S(79.8%)与ResNet-101(80.6%)。
  • 在MSCOCO上,Conformer-S相较ResNet-101在目标检测任务中mAP提升3.7%,在实例分割任务中提升3.6%。
  • DeiT-S与ResNet-101的集成模型仅达到81.8%的准确率,比Conformer-S(83.4%)低1.6%,尽管其参数量与FLOPs显著更高。
  • Conformer-S展现出更强的旋转不变性:当输入图像发生旋转时,ResNet-101的准确率急剧下降,而Conformer-S在所有旋转角度下均保持高性能。
  • Conformer在尺度不变性方面表现更优——当输入分辨率从224×224减半至112×112时,其准确率仅下降10%,而ResNet与DeiT-S分别下降15%与25%。
  • 消融实验表明,移除位置嵌入会使DeiT-S性能下降2.4%,但对Conformer-S仅造成0.1%的轻微影响,表明其因CNN的归纳偏差而对位置编码的依赖性显著降低。
Figure 3: Structure analysis. $C_{n}$ and $T_{r}$ respectively denote a bottleneck and a transformer block. (a) The dual structure can be considered as a special serial case of the residual structure. (b) The CNN ( $e.g.$ , ResNet); (c) A special hybrid structure where the transformer block is embed
Figure 3: Structure analysis. $C_{n}$ and $T_{r}$ respectively denote a bottleneck and a transformer block. (a) The dual structure can be considered as a special serial case of the residual structure. (b) The CNN ( $e.g.$ , ResNet); (c) A special hybrid structure where the transformer block is embed

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。