Lune

CVPR2022Top-tier venue

MetaFormer is Actually What You Need for Vision

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

Abstract

Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model's performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1 % top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 49%/61% fewer MACs. The effectiveness of Pool-Former verifies our hypothesis and urges us to initiate the concept of “MetaFormer”, a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

214 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Vision GNN: An Image is Worth Graph of Nodes cites CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
  • Vision GNN: An Image is Worth Graph of Nodes cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Vision GNN: An Image is Worth Graph of Nodes cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Vision GNN: An Image is Worth Graph of Nodes cites Training data-efficient image transformers & distillation through attention
  • Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
  • Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites Training data-efficient image transformers & distillation through attention
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Large Selective Kernel Network for Remote Sensing Object Detection cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
  • How Do Vision Transformers Work? cites CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
  • How Do Vision Transformers Work? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • How Do Vision Transformers Work? cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • How Do Vision Transformers Work? cites Training data-efficient image transformers & distillation through attention
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • EfficientFormer: Vision Transformers at MobileNet Speed cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • EfficientFormer: Vision Transformers at MobileNet Speed cites Training data-efficient image transformers & distillation through attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers214

  1. Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNsXiaohan Ding, Xiangyu Zhang, Jungong Han, Guiguang DingCVPR 2022 · 1,298 citations
  2. EfficientFormer: Vision Transformers at MobileNet SpeedYanyu Li, Geng Yuan, Yang Wen, Ju Hu et al.NeurIPS 2022 · 742 citations
  3. Vision GNN: An Image is Worth Graph of NodesKai Han, Yunhe Wang, Jianyuan Guo, Yehui Tang et al.NeurIPS 2022 · 668 citations
  4. How Do Vision Transformers Work?Namuk Park, Songkuk KimICLR 2022 · 653 citations
  5. Large Selective Kernel Network for Remote Sensing Object DetectionYuxuan Li, Qibin Hou, Zhaohui Zheng, Ming-Ming Cheng et al.ICCV 2023 · 535 citations

Builds on24

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  4. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  5. CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh et al.ICCV 2019 · 5,843 citations

Related papers

  1. UniNeXt: Exploring A Unified Architecture for Vision RecognitionFangjian Lin, Jianlong Yuan, Sitong Wu, Fan Wang et al.ACM MM 2023 · 15 citations
  2. RIFormer: Keep Your Vision Backbone Effective But Removing Token MixerJiahao Wang, Songyang Zhang, Yong Liu, Taiqiang Wu et al.CVPR 2023
  3. Sparse MLP for Image Recognition: Is Self-Attention Really Necessary?Chuanxin Tang, Yucheng Zhao, Guangting Wang, Chong Luo et al.AAAI 2022 · 125 citations
  4. Searching for BurgerFormer with Micro-Meso-Macro Space DesignLongxing Yang, Yu Hu, Shun Lu, Zihao Sun et al.ICML 2022 · 14 citations
  5. Inception TransformerChenyang Si, Weihao Yu, Pan Zhou, Yichen Zhou et al.NeurIPS 2022 · 24 citations
Dusk over the sea between two cliffs drawn in fine vertical lines