MetaFormer

The paper argues that the general Transformer-style scaffold matters more than the specific attention token mixer for many vision backbones.

Metadata

FieldValue
PaperMetaFormer Is Actually What You Need for Vision
AuthorsWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si, Yichen Zhou, Xinchao Wang, Jiashi Feng, Shuicheng Yan
Year2022
VenueCVPR 2022
arXiv2111.11418
CVFCVPR 2022 paper
Codesail-sg/poolformer
Statusfull note started

Question

Vision Transformers made attention the default explanation for why Transformer-like models work in vision. MLP-like models then showed that attention can be replaced by spatial MLPs while retaining competitive behavior.

MetaFormer asks a sharper question:

The paper deliberately replaces attention with an extremely simple pooling operator. The resulting model, PoolFormer, still performs competitively on vision benchmarks. This supports the paper’s hypothesis:

for a broad class of vision backbones.

Main Claim

The paper abstracts a family of recent vision models into a common block:

The token mixer can be attention, spatial MLP, convolution, pooling, or another operator. The claim is not that token mixers do not matter. The claim is that the scaffold itself is a strong architecture prior:

Architecture Contract

ItemContract
Inputimage features or patch tokens
Backbone typehierarchical MetaFormer-style vision backbone
Token mixerunspecified in the abstraction; pooling in PoolFormer
Channel mixerMLP / feed-forward block
Normalizationnormalization before mixer blocks
Residual pathresidual connections around token mixer and channel MLP
Natural task in paperimage classification, detection, segmentation evidence

The abstract block can be written as:

This is close to the standard Transformer block, except the token mixer is left open:

PoolFormer as the Test Case

PoolFormer is the deliberately simple instantiation:

For a spatial feature map , average pooling computes local neighborhood statistics:

The subtraction keeps the mixer focused on local context difference:

There are no attention scores, learned convolution kernels, or token-axis MLP weights in this mixer. That makes PoolFormer a controlled architecture probe:

MetaFormer vs Transformer

ComponentTransformerMetaFormer
token mixerself-attentionany token-mixing operator
channel mixerfeed-forward networkMLP / feed-forward network
normalizationusually pre-norm or post-normnormalization around both mixer stages
residual structureresidual around attention and FFNresidual around token mixer and MLP
claimattention-based token mixing is centralscaffold may be the central reusable form

This reframes Attention Is All You Need for vision. The original Transformer made attention the dominant sequence mixer. MetaFormer asks whether the architecture skeleton around the mixer is also doing much of the work.

Relation to Nearby Vision Backbones

PaperToken MixerWhat MetaFormer Helps Ask
Vision Transformerglobal self-attentionis global attention necessary or just one mixer?
MLP-Mixertoken-axis MLPcan MLP token mixing replace attention?
Swin Transformershifted-window attentionwhat happens when token mixing is local and hierarchical?
CoAtNetconvolution then relative attentionwhere should different token mixers appear by stage?
ConvNeXtdepthwise convolutioncan modern ConvNets be read as MetaFormer-like blocks?
MetaFormerabstract token mixer; pooling in PoolFormerhow much performance comes from the scaffold?

This is why MetaFormer belongs in architecture papers. It is less about one model family and more about the decomposition of a modern backbone.

Token Mixer Is a Slot

The key abstraction is to treat token mixing as a replaceable slot:

Examples:

MixerOperationBias
self-attentioncontent-dependent weighted sumadaptive global interaction
window attentioncontent-dependent local/window sumlocal adaptive interaction
token MLPlearned fixed token-axis mixinglearned position interaction
depthwise convolutionlocal learned kernellocality and translation sharing
poolinglocal non-parametric averagesimple local smoothing
identityno token mixingtests scaffold lower bound

For reading architecture papers, this slot view prevents over-attributing results to a named mechanism. A result may come from the mixer, but it may also come from normalization, residual layout, MLP ratio, hierarchical downsampling, training recipe, or regularization.

Evidence to Read Carefully

The paper uses PoolFormer to test whether a very simple token mixer can still produce competitive vision models. It also compares against Transformer-like and MLP-like baselines.

Read the evidence along these axes:

EvidenceWhat It Supports
PoolFormer classification resultssimple token mixing can be enough inside the scaffold
downstream task transferthe scaffold is not only an ImageNet classifier trick
comparisons with DeiT and ResMLPattention and MLP token mixers are not the only viable choices
ablation of block designnormalization/residual/channel MLP are part of the claim

The correct takeaway is:

Limits

  • Pooling as a token mixer is mainly a proof device, not necessarily the best final design.
  • Strong performance still depends on training recipe, stage design, resolution, and data.
  • The claim is most directly about vision backbones, not every Transformer use case.
  • It does not prove attention is unimportant; it shows attention is not the only explanation.
  • Later MetaFormer variants can blur the line between concept paper and performance recipe.

What This Paper Teaches

MetaFormer is useful because it gives a compact checklist for architecture reading:

When a paper claims a new mixer is better, ask:

  • Is the scaffold fixed?
  • Is the MLP ratio fixed?
  • Is the normalization placement fixed?
  • Is the stage layout fixed?
  • Are parameter count, FLOPs, data, augmentation, and training length matched?
  • Does the mixer improve all tasks or only the benchmark shown?

Concepts