Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Masked Autoencoders Are Scalable Vision Learners

  • Problem Masked autoencoding has trailed in vision even though masked pre-training has scaled in NLP. The authors attribute part of the gap to the high spatial redundancy of images and to the different role a decoder plays when it reconstructs pixels rather than words.
  • Method Masks a high share of randomly chosen image patches, encodes only the visible patches with a ViT, and reconstructs the masked pixels with a small Transformer decoder that receives mask tokens.
  • Results Reached 87.8% top-1 accuracy on ImageNet-1K with ViT-Huge at 448 size, using only IN1K data for pre-training and fine-tuning.

Figure 1: Our MAE architecture . During pre-training, a large
random subset of image patches ( e.g., 75%) is masked out. The
encoder is applied to the small su…

Figure 1 . Our MAE architecture . During pre-training, a large random subset of image patches ( e.g., 75%) is masked out. The encoder is applied to the small subset of visible patches. Mask tokens are introduced after the encoder, and the full set of en- coded patches and mask tokens is processed by a small decoder that reconstructs the original image in pixels. After pre-training, the decoder is discarded and the encoder is applied to uncorrupted images (full sets of patches) for recognition tasks.

Original paper · CC BY 4.0 · Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick · Masked Autoencoders Are Scalable Vision Learners · Original paper figure · Extracted the figure area from page 1 of the original PDF.

Why masked autoencoding lags in vision

BERT hides part of a token sequence and learns to predict what was hidden, while GPT-style models predict tokens autoregressively. Denoising autoencoders supply the general recipe for this, and masked image modelling in vision appeared before BERT, yet progress on autoencoding in vision has trailed NLP. The authors ask what makes masked autoencoding different between the two domains and answer in three parts.

The first part is architectural. Convolutional networks dominated vision, and their regular grids make it awkward to insert mask tokens or positional embeddings; Vision Transformers remove that obstacle. The second part is information density. Words are dense in meaning, so predicting a few missing words pushes a model toward real language understanding, whereas a missing image patch can often be inferred from its neighbours.

Masking a very high share of random patches is the authors' answer to that redundancy, because the task then demands more than low-level image statistics.

The third part concerns the decoder. In vision the decoder maps the latent representation back to pixels, so its output sits at a lower semantic level than the words a language decoder predicts. BERT can use a trivial MLP decoder, but the authors found that for images the decoder design strongly affects the semantic level of the learned representations.

An encoder that sees only visible patches

The image is divided into regular non-overlapping patches, as in ViT, and a subset of the patches is kept as visible while the rest are masked. The encoder is a ViT applied only to the visible patches, which are embedded by a linear projection with positional embeddings, and no mask tokens enter the encoder. After encoding, a separate lightweight decoder receives the encoded visible patches together with mask tokens and reconstructs the image in pixels; after pre-training the decoder is removed and the encoder processes uncorrupted images.

Patches are sampled uniformly without replacement, and the authors call this random sampling. At a high masking ratio, random sampling removes much of the redundancy, so the hidden patches cannot be filled in by extrapolating from neighbouring visible patches. The default masking ratio is 75%, which leaves the encoder roughly a quarter of the patches.

Uniform sampling also avoids a bias toward masking more patches near the image centre.

Each mask token is a shared learned vector that marks one missing patch, and positional embeddings are added to every token in the full set, because without them the mask tokens would carry no location information. The decoder is deliberately narrower and shallower than the encoder, and its default uses less than 10% of the encoder's computation per token.

The implementation needs no sparse operations: tokens are shuffled and the tail is dropped, and after encoding the mask tokens are appended and the list is unshuffled to line up with the targets.

What the decoder predicts and how the loss is set

The last decoder layer is a linear projection with as many outputs as there are pixel values in one patch, and these outputs are reshaped into the reconstructed image. The loss is the mean squared error in pixel space, and it is computed only over masked patches, following the masked-position loss used in BERT. Computing the loss on all pixels instead, as classical denoising autoencoders do, lowered accuracy by about 0.5% in the authors' experiments, and they describe the choice as driven by results.

The normalized-pixel variant computes the mean and standard deviation of all pixels inside each masked patch and uses those two statistics to normalize that patch before the loss. The authors read per-patch normalization as boosting local contrast in the target, and the ablations that compare this target with raw pixels appear in the next section.

Masking ratio and decoder design

Across the masking-ratio sweep, the authors find that 75% works well for both linear probing and fine-tuning. This is far higher than the roughly 15% masking ratio used by BERT and the 20% to 50% used in earlier vision masking work. Linear probing is much more sensitive to the ratio than fine-tuning: across the sweep it falls as low as 54.6%, a gap of up to about 20% against 73.5%, whereas fine-tuning stays close to its best for ratios from 40% to 80%.

The authors also apply a model pre-trained at 75% to inputs masked at 85% and 95%, and the predictions differ from the originals in plausible ways. They read these varied but plausible completions as evidence that the model infers the overall shape of objects and scenes rather than extending lines or textures, and they hypothesize that this behaviour is tied to useful representations.

With a 1-block decoder, linear probing is 65.5, while with 8 blocks it is 73.5, so a deep decoder matters for linear probing. Fine-tuning is almost flat: 84.8 for one block, 84.9 for two to eight blocks, and 84.4 at twelve blocks. The authors attribute the linear-probing gain to the last decoder layers specializing in reconstruction, which leaves the encoder's representations at a more abstract level, while under fine-tuning the encoder's last layers can adapt to recognition.

A single Transformer block is the minimum that carries information from visible tokens to mask tokens, and the authors note that it still gives 84.8% fine-tuning accuracy.

A decoder width of 512 performs well under both protocols, and a width of 1024, equal to the encoder, gives 84.3 fine-tuning and 73.1 linear probing. The default decoder has 8 blocks and width 512, and it uses 9% of the FLOPs per token of ViT-L, which has 24 blocks and width 1024.

Mask tokens and training cost

With mask tokens in the encoder, ViT-L reaches 84.2 fine-tuning and 59.6 linear probing, against 84.9 and 73.5 without them. The authors explain the linear-probing drop as a train-deploy gap: an encoder fed mask tokens sees many corrupted inputs in pre-training, which deployed uncorrupted images do not contain. Removing the tokens from the encoder means it always sees real patches, which the authors credit for the accuracy gain.

In the Table 1c setting, dropping mask tokens from the encoder reduces overall training FLOPs by 3.3 times. In the wall-clock setting of 800 epochs on 128 TPU-v3 cores with TensorFlow, ViT-L with an 8-block decoder takes 15.4 hours without mask tokens against 42.4 hours with them, a 2.8 times speedup. A 1-block decoder gives ViT-L a 3.7 times speedup, and ViT-H gives 3.5 times with an 8-block decoder and 4.1 times with a 1-block decoder, where the ViT-H baseline time is estimated from ten epochs.

The authors note that self-attention cost is quadratic in the number of tokens, which partly explains why the speedup exceeds 4 times at a 75% masking ratio. Memory use also falls, which the authors say could allow larger models or larger batch sizes.

Target, masking strategy, augmentation and schedule

Normalized pixels reach 85.4 fine-tuning and 73.9 linear probing, against 84.9 and 73.5 for unnormalized pixels. Projecting onto the top 96 PCA coefficients lowers both values, to 84.6 and 72.3. The dVAE token target gives 85.3 fine-tuning but 71.6 linear probing, and it needs a tokenizer pre-trained on 250M images. The authors read the PCA result and the normalized-pixel gain together as evidence that high-frequency components help the method.

Grid-wise sampling, which keeps one of every four patches, reaches 84.0 and 66.0 at 75%, against 84.9 and 73.5 for random sampling. The authors describe block-wise reconstructions as blurrier and the grid task as easier, with lower training loss but lower representation quality.

Fixed-size cropping gives 84.7 fine-tuning and 73.1 linear probing, random-size cropping gives 84.9 and 73.5, and no augmentation gives 84.0 and 65.7. Adding color jittering lowers the results to 84.3 and 71.9, so the authors leave it out of the other experiments. The authors explain the weak need for augmentation by the fact that the masks change every iteration, which generates new training samples regardless of augmentation.

They contrast this with contrastive methods, where cropping-only augmentation reduces accuracy by 13% for BYOL and 28% for SimCLR.

Fine-tuning accuracy rises from 82.3 at 100 epochs to 85.1 at 1600 epochs, and linear probing rises from 57.3 to 75.1 over the same range. The authors have not seen linear probing saturate even at 1600 epochs, whereas they report that MoCo v3 saturates at 300 epochs for ViT-L. They also note that the MAE encoder sees 25% of patches per epoch, while contrastive encoders see 200% with two crops or more with multi-crop.

ImageNet-1K results against prior work

With only IN1K pre-training and end-to-end fine-tuning, MAE reaches 83.6 with ViT-B, 85.9 with ViT-L and 86.9 with ViT-H at 224 size. Fine-tuning ViT-H at 448 size gives 87.8, and that result uses normalized pixels and 1600 pre-training epochs. The authors compare the 87.8 with the previous best IN1K-only result of 87.1 at 512 size, which uses advanced networks, and they expect advanced backbones to do better still with MAE.

Training supervised ViT-L from scratch on IN1K gave 82.6 with the authors' recipe, and their ViT-H reached 83.1, while the original ViT paper reports 76.5 for ViT-L trained from scratch. The authors' recipe needed strong regularization and an exponential moving average to avoid unstable training, with NaN losses appearing frequently otherwise.

The authors report that the MAE gain over scratch training grows with model capacity and follows a trend similar to JFT-300M supervised pre-training in the original ViT paper.

The authors report that ViT-L MAE pre-training for 1600 epochs on 128 TPU-v3 cores takes 31 hours, against 36 hours for MoCo v3 over 300 epochs. BEiT reported a 1.8% degradation when reconstructing pixels with ViT-B, and the authors measure their MAE as 3.5 times faster per epoch than BEiT.

Linear probing and partial fine-tuning

Linear probing trains only a linear classifier on the pre-trained features, which are normalized by an extra BatchNorm layer without affine transform, and it disables mixup, cutmix, drop path, color jittering and weight decay. Under this protocol the MAE ViT-L model reaches 75.8%, above the earlier masking-based methods in the authors' comparison, where MAE ViT-B reaches 68.0 and ViT-H reaches 76.6.

MoCo v3 reaches 77.6% for ViT-L under linear probing, so MAE still trails contrastive learning on this protocol.

Partial fine-tuning updates only the last few Transformer blocks and freezes the others; fine-tuning one block lifts ViT-L from 73.5% to 81.0%. Tuning only the MLP sub-block of the last block gives 79.1%, and tuning 4 or 6 blocks comes close to full fine-tuning. MoCo v3 has higher linear probing accuracy, but all of its partial fine-tuning results are below MAE, with a 2.6% gap when 4 blocks are tuned.

The authors conclude that linear separability does not fully measure representation quality, since MAE features are less linearly separable yet stronger as non-linear features when a non-linear head is tuned.

Transfer to COCO, ADE20K and classification

Mask R-CNN with a ViT backbone adapted to an FPN is fine-tuned end-to-end on COCO, with hyper-parameters searched separately for each entry. The ViT-B MAE model reaches 50.3 box AP against 47.9 for supervised pre-training, and the ViT-L MAE model reaches 53.3 against 49.3, a 4.0 point gap. For ViT-L, mask AP is 47.2 for MAE against 43.9 for supervised pre-training.

On ADE20K, UperNet is fine-tuned end-to-end for 100 epochs with batch size 16, and ViT-L MAE pre-training reaches 53.6 mIoU against 49.9 for supervised pre-training. For ViT-B the figures are 48.1 for MAE and 47.4 for supervised pre-training, and the authors report 53.3 mIoU for BEiT with ViT-L, reproduced with its official code. MAE pre-training does not use relative position bias, so the authors enable it only during transfer, initialized as zero.

On iNaturalist 2019, ViT-H with MAE reaches 85.7 against a previous best of 84.1. The prior Places results were obtained with pre-training on 1 billion images for Places205 and 3.5 billion images for Places365.

Robustness on ImageNet variants

The models fine-tuned on IN1K are evaluated without further tuning on IN-Adversarial, IN-Rendition, IN-Sketch and IN-Corruption. On IN-Adversarial, ViT-H with MAE pre-training reaches 68.2% against 33.1% for the supervised counterpart, which the authors describe as 35% better. Model size gives clear gains on these sets, and a larger image size helps on every set except IN-C.

Limitations

Linear probing is the weakest part of the results: MAE's ViT-L reaches 75.8%, while MoCo v3 reaches 77.6% for ViT-L. The authors present the holistic reconstructions as a sign of a rich hidden representation, and they state this as a hypothesis for future work. The supervised ViT-L and ViT-H baselines use the authors' own recipe, so the comparison depends on that recipe.

The ViT-H speedup is measured against a baseline whose training time is estimated from ten epochs, and the wall-clock figures come from TPU-v3 cores running TensorFlow. The BEiT comparison in the dVAE experiments relies on a tokenizer pre-trained on 250M images, which the pixel-based MAE does not need.

Because predictions draw on statistics of the training data, the authors note that the model can reflect dataset biases and can generate content that does not exist.

Paper info

Authors
Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick
Venue
arXiv · Preprint
First published
2021-11-11
Added
2026-10-20
Updated
2021-12-19
Version
v3
arXiv
2111.06377
Category
cs.CV
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

This paper shows that masked autoencoders (MAE) are scalable self-supervised learners for computer vision. Our MAE approach is simple: we mask random patches of the input image and reconstruct the missing pixels. It is based on two core designs. First, we develop an asymmetric encoder-decoder architecture, with an encoder that operates only on the visible subset of patches (without mask tokens), along with a lightweight decoder that reconstructs the original image from the latent representation and mask tokens. Second, we find that masking a high proportion of the input image, e.g., 75%, yields a nontrivial and meaningful self-supervisory task. Coupling these two designs enables us to train large models efficiently and effectively: we accelerate training (by 3x or more) and improve accuracy. Our scalable approach allows for learning high-capacity models that generalize well: e.g., a vanilla ViT-Huge model achieves the best accuracy (87.8%) among methods that use only ImageNet-1K data. Transfer performance in downstream tasks outperforms supervised pre-training and shows promising scaling behavior.

Quote from the paper

Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick (2021). Masked Autoencoders Are Scalable Vision Learners. arXiv:2111.06377v3. https://arxiv.org/abs/2111.06377v3

BibTeX
@misc{he2021masked,
  title = {{Masked Autoencoders Are Scalable Vision Learners}},
  author = {Kaiming He and Xinlei Chen and Saining Xie and Yanghao Li and Piotr Dollár and Ross Girshick},
  year = {2021},
  eprint = {2111.06377},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.06377v3}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up