[论文解读] MetaFormer Baselines for Vision
本文研究了带有基本令牌混合器的 MetaFormer,展示了一个坚实的下界、与混合器的通用兼容性,以及如 CAFormer 在 ImageNet-1K 上达到 85.5% top-1 的最先进结果,并伴随 StarReLU 的改进。
MetaFormer, the abstracted architecture of Transformer, has been found to play a significant role in achieving competitive performance. In this paper, we further explore the capacity of MetaFormer, again, without focusing on token mixer design: we introduce several baseline models under MetaFormer using the most basic or common mixers, and summarize our observations as follows: (1) MetaFormer ensures solid lower bound of performance. By merely adopting identity mapping as the token mixer, the MetaFormer model, termed IdentityFormer, achieves >80% accuracy on ImageNet-1K. (2) MetaFormer works well with arbitrary token mixers. When specifying the token mixer as even a random matrix to mix tokens, the resulting model RandFormer yields an accuracy of >81%, outperforming IdentityFormer. Rest assured of MetaFormer's results when new token mixers are adopted. (3) MetaFormer effortlessly offers state-of-the-art results. With just conventional token mixers dated back five years ago, the models instantiated from MetaFormer already beat state of the art. (a) ConvFormer outperforms ConvNeXt. Taking the common depthwise separable convolutions as the token mixer, the model termed ConvFormer, which can be regarded as pure CNNs, outperforms the strong CNN model ConvNeXt. (b) CAFormer sets new record on ImageNet-1K. By simply applying depthwise separable convolutions as token mixer in the bottom stages and vanilla self-attention in the top stages, the resulting model CAFormer sets a new record on ImageNet-1K: it achieves an accuracy of 85.5% at 224x224 resolution, under normal supervised training without external data or distillation. In our expedition to probe MetaFormer, we also find that a new activation, StarReLU, reduces 71% FLOPs of activation compared with GELU yet achieves better performance. We expect StarReLU to find great potential in MetaFormer-like models alongside other neural networks.
研究动机与目标
- 通过使用基本或常见的令牌混合器来研究 MetaFormer 的容量。
- 评估 MetaFormer 是否在不同混合器之间提供稳定的性能下界。
- 检查 MetaFormer 在任意令牌混合器下的通用性。
- 通过 ConvFormer 和 CAFormer,使用常规令牌混合器展示最先进的性能。
- 引入激活和训练技术(StarReLU、缩放)以提升 MetaFormer 的效率和准确性。
提出的方法
- 将 IdentityFormer 和 RandFormer 形式化为 MetaFormer 框架内的基本令牌混合器实例。
- 通过在不同阶段使用分离卷积和普通自注意力作为令牌混合器来构建 ConvFormer 和 CAFormer。
- 采用具有阶段特定块配置的 4 阶段分层结构。
- 引入 StarReLU 作为低成本激活函数,以降低激活 FLOPs 并提高对分布偏移的鲁棒性。
- 在残差分支中应用 ResScale 风格的缩放并禁用偏置以稳定训练。
- 在 ImageNet-1K 上使用标准增强/训练设置进行基准测试,并在 ImageNet-21K 上进行预训练以进行可扩展性测试。
实验结果
研究问题
- RQ1在使用最小或随机令牌混合器时,MetaFormer 是否能够提供稳固的性能下界?
- RQ2MetaFormer 能否在任意或较旧的令牌混合器(例如随机、聚合、可分离卷积、注意力)下保持竞争力的性能?
- RQ3基于卷积神经网络的或混合型 MetaFormer 变体(ConvFormer、CAFormer)在常规训练下是否在 ImageNet-1K 上实现了最先进的结果?
- RQ4StarReLU 与缩放技术对 MetaFormer 的效率和准确性有何影响?
主要发现
- IdentityFormer 在 ImageNet-1K 上以 73M 参数和 11.5G MACs 实现 80.4% 的 top-1 准确率。
- RandFormer 达到 81.4% top-1 准确率,超过 IdentityFormer。
- ConvFormer(分离卷积)可以超越 ConvNeXt。
- CAFormer 在 224^2、常规监督训练下,在 ImageNet-1K 上取得 85.5% 的 top-1 准确率的新纪录,且无需外部数据或蒸馏。
- StarReLU 将激活 FLOPs 相比 GELU 下降约 71%,并且在可学习的缩放/偏置下可以提高准确性。
- 在 MetaFormer 中使用传统令牌混合器可产生强基线,并展示了与多样化混合器的通用兼容性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。