[论文解读] MAFormer: A Transformer Network with Multi-scale Attention Fusion for Visual Recognition
MAFormer 提出了一种双流 Transformer 架构,结合多尺度注意力融合(MAF),通过窗口注意力联合学习局部细粒度特征与通过新型下采样全局学习(GLD)模块学习的全局粗粒度特征,并通过注意力机制动态融合。该方法实现了最先进性能,在 ImageNet 上达到 85.9% 的 Top-1 准确率,并在参数量相近的情况下,超越了 CSWin 和 LV-ViT 在目标检测与实例分割任务上的表现。
Vision Transformer and its variants have demonstrated great potential in various computer vision tasks. But conventional vision transformers often focus on global dependency at a coarse level, which suffer from a learning challenge on global relationships and fine-grained representation at a token level. In this paper, we introduce Multi-scale Attention Fusion into transformer (MAFormer), which explores local aggregation and global feature extraction in a dual-stream framework for visual recognition. We develop a simple but effective module to explore the full potential of transformers for visual representation by learning fine-grained and coarse-grained features at a token level and dynamically fusing them. Our Multi-scale Attention Fusion (MAF) block consists of: i) a local window attention branch that learns short-range interactions within windows, aggregating fine-grained local features; ii) global feature extraction through a novel Global Learning with Down-sampling (GLD) operation to efficiently capture long-range context information within the whole image; iii) a fusion module that self-explores the integration of both features via attention. Our MAFormer achieves state-of-the-art performance on common vision tasks. In particular, MAFormer-L achieves 85.9$\%$ Top-1 accuracy on ImageNet, surpassing CSWin-B and LV-ViT-L by 1.7$\%$ and 0.6$\%$ respectively. On MSCOCO, MAFormer outperforms the prior art CSWin by 1.7$\%$ mAPs on object detection and 1.4$\%$ on instance segmentation with similar-sized parameters, demonstrating the potential to be a general backbone network.
研究动机与目标
- 为解决传统视觉 Transformer 同时捕捉细粒度局部与长程全局依赖的局限性。
- 克服混合模型中卷积与自注意力机制之间的不兼容性与训练模糊性。
- 设计一种统一的、端到端可训练的框架,实现在 token 级别的局部与全局特征有效融合。
- 开发一种通用主干网络,用于视觉任务,其性能优于现有的视觉 Transformer 与 CNN。
- 实现在不具标准自注意力二次复杂度的前提下,高效建模长程上下文。
提出的方法
- 引入多尺度注意力融合(MAF)模块,包含两条并行分支:一条用于短程特征聚合的局部窗口注意力分支。
- 提出一种下采样全局学习(GLD)模块,通过下采样与自注意力机制从完整输入图像中捕捉长程上下文。
- 在全局分支中使用位置嵌入以编码 token 级的空间位置信息。
- 通过可学习的注意力融合模块融合局部与全局特征,实现两种表征的协同自适应训练。
- 采用双流架构,其中 MAF 模块用于浅层,深层则使用标准注意力机制。
- 采用简单且参数高效的结构,无需额外模块或复杂操作,仅依赖注意力机制实现特征融合。

实验结果
研究问题
- RQ1双流 Transformer 架构是否能有效在 token 级别学习并融合局部与全局表征,从而提升视觉识别性能?
- RQ2所提出的下采样全局学习(GLD)模块是否能在保持计算效率的同时实现高效的长程上下文建模?
- RQ3与标准自注意力或后期融合策略相比,多尺度注意力融合(MAF)机制如何提升特征表示能力?
- RQ4在目标检测与实例分割等密集预测任务中,MAFormer 相较于现有视觉 Transformer 与 CNN 的性能提升程度如何?
- RQ5MAFormer 是否可作为自监督预训练中视觉任务的强通用主干网络?
主要发现
- MAFormer-L 在 ImageNet 上达到 85.9% 的 Top-1 准确率,较 CSWin-B 提升 1.7%,较 LV-ViT-L 提升 0.6%。
- 在 MSCOCO 目标检测任务中,MAFormer-B 达到 49.6% 的 box mAP,较 CSWin 提升 1.7%,且参数量相近。
- 在 MSCOCO 实例分割任务中,MAFormer-B 达到 49.6% 的 mask mAP,较 CSWin 提升 1.4%,在相同配置下表现更优。
- 在 ADE20K 语义分割任务中,使用 UPerNet 时,MAFormer-B 达到 51.1% 的 mIoU 与 51.6% 的 MS mIoU,分别较 Swin-Base 提升 3.0 与 2.5 个百分点。
- 在 ADE20K 上使用语义 FPN 时,MAFormer-S 达到 47.9% 的 mIoU,较 Swin-T 提升 6.4 个百分点。
- 即使在 1x 训练调度下,MAFormer 各变体在所有基准测试中均持续超越先前最先进模型,展现出强大的泛化能力与可扩展性。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。