Skip to content
OpenTrain AIFor AI Companies

MetaFormer Is Actually What You Need for Vision

Weihao Yu, Mi Luo, Pan Zhou, Chenyang Si, Yichen Zhou +3 morePublished Nov 22, 2021
arXiv PDF
Researcher verdict
Starting point
Use as implementation starting point
Benchmark evidence
Thin evidence
Verify before relying
Time to first repro
A few hours
Fast first run
Risk flags
0
None detected

Abstract

Domain fit: AI-core

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 50%/62% fewer MACs. The effectiveness of PoolFormer 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. Code is available at https://github.com/sail-sg/poolformer.

Results and benchmarks

Transformers have shown great potential in computer vision tasks.

Implementation

Best maintained implementation now

Recommended
Confidence: High
Reproducibility: Strong

The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more

37,093 stars · 5,192 forks · Last push Aug 25, 2026 · Apache-2.0 license

  • License
  • CI
  • Dependencies
  • Docker

Official implementation from Papers with Code · Repository link is mentioned in the paper metadata · Community adoption signal (37093 stars)

Why this implementation
Confidence: high

rwightman/pytorch-image-models is the strongest maintained implementation based on ranking signals. CI workflows are present. License is declared (Apache-2.0).

Open rwightman/pytorch-image-models
Reproduction risks
  • No repository-level red flags were detected, but paper-specific preprocessing and hyperparameter details may still be under-specified.
  • Selected rwightman/pytorch-image-models as the strongest maintained implementation for new work.
  • Includes CI workflow signals.
  • Includes dependency/environment manifest signals.
  • Repository activity is within the last 24 months.

Compare implementation paths

Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.

Maintenance
Active
Confidence
High
Reproducibility
Strong
Stars
37,093
Last push
Aug 25, 2026 (1d)

Official implementation from Papers with Code · Repository link is mentioned in the paper metadata

  • No Docker setup
sail-sg/poolformer
historical official
Maintenance
Stale
Confidence
High
Reproducibility
Limited
Stars
1,362
Last push
Jun 1, 2024 (816d)

Official implementation from Papers with Code · Repository link is mentioned in the paper metadata

  • No push in 12+ months
  • No CI pipeline detected
  • No Docker setup
Maintenance
Active
Confidence
Low
Reproducibility
Strong
Stars
164,438
Last push
Aug 25, 2026 (1d)

Partial overlap with paper title keywords · Community adoption signal (164438 stars)

  • No Docker setup
  • Low confidence match

Reproduction readiness

Time to first repro: hours
Last checked: Aug 26, 2026

Ready to run

Ready to reproduce

  • Clone rwightman/pytorch-image-models and install dependencies from pyproject.toml.
  • CI pipeline detected, so automated tests are in place.
  • Last updated 1 days ago.
Open rwightman/pytorch-image-models

Quick start

git clone https://github.com/rwightman/pytorch-image-models.git
pip install -e .

Repositories and ecosystem

No additional verified repositories beyond the primary recommendation.

Hugging Face artifacts

No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.

Tip: start with models, then check datasets and spaces if you need evaluation data or demos.

Research context

Tasks

Image classification

Methods

Transformer

Domains

Computer vision

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.

Data includes links from Papers with Code ( CC-BY-SA-4.0 ).