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

面向视觉的 MetaFormer 基线

MetaFormer Baselines for Vision

National University of Singapore(新加坡国立大学);Sea AI Lab(Sea AI实验室)

Weihao Yu, Chenyang Si, Pan Zhou, Mi Luo, Yichen Zhou, Jiashi Feng, Shuicheng Yan, Xinchao Wang

AI总结:

本文通过 IdentityFormer、RandFormer、ConvFormer 和 CAFormer 等简单实例验证 MetaFormer 架构的稳健下界与通用性,并提出 StarReLU,在 ImageNet-1K 上取得最先进结果。

摘要:

MetaFormer 是 Transformer 的抽象架构,已被发现在实现具有竞争力的性能方面发挥重要作用。本文进一步探索 MetaFormer 的能力,并且同样不关注 token mixer 设计:我们使用最基本或常见的 mixer,在 MetaFormer 下引入若干基线模型,并将观察结果总结如下:(1)MetaFormer 确保可靠的性能下界。仅采用恒等映射作为 token mixer 时,名为 IdentityFormer 的 MetaFormer 模型在 ImageNet-1K 上取得超过 80% 的准确率。(2)MetaFormer 可与任意 token mixer 很好地协同工作。即使将 token mixer 指定为随机矩阵以混合 token,所得模型 RandFormer 也能取得超过 81% 的准确率,优于 IdentityFormer。因此,当采用新的 token mixer 时,可以对 MetaFormer 的结果放心。(3)MetaFormer 能够毫不费力地提供最先进结果。仅使用五年前的传统 token mixer,由 MetaFormer 实例化得到的模型就已经超越当前最先进水平。(a)ConvFormer 优于 ConvNeXt。以常见的深度可分离卷积作为 token mixer,被称为 ConvFormer 的模型可被视为纯 CNN,其性能优于强大的 CNN 模型 ConvNeXt。(b)CAFormer 在 ImageNet-1K 上创下新纪录。通过简单地在底部阶段使用深度可分离卷积作为 token mixer、在顶部阶段使用普通自注意力,所得模型 CAFormer 在 ImageNet-1K 上创下新纪录:在不使用外部数据或蒸馏的常规监督训练下,其在 224×224 分辨率下取得 85.5% 的准确率。在探索 MetaFormer 的过程中,我们还发现一种新的激活函数 StarReLU;与 GELU 相比,它将激活相关 FLOPs 降低 71%,同时取得更好的性能。我们期待 StarReLU 在类 MetaFormer 模型以及其他神经网络中展现巨大潜力。

英文摘要:

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.

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

↑