Reading time: about 7 minutes · 7 December 2026 · CVPR, 2022

This paper shows that a masked autoencoder can pretrain a large Vision Transformer by hiding most of the image, encoding only the visible patches, and reconstructing the missing pixels, and that this simple recipe scales to strong ImageNet accuracy.

Background

In language, it has become common to pretrain a model by hiding some of the input and asking the model to fill it in. The same idea is appealing in vision: an image can be cut into patches, some of those patches can be removed, and a network can be trained to reconstruct what is missing. If the model must infer objects, textures and spatial relations from the parts that remain, the resulting representation may later be useful for recognition.

A Vision Transformer (ViT) is a natural architecture for this task, because it already treats an image as a sequence of patches. The difficulty is practical as well as conceptual. Images are highly redundant, so a model that sees most of the patches may reconstruct the missing ones by local interpolation, without learning much. Training a large encoder on every patch, including placeholders for the missing ones, is also computationally heavy. The authors’ question is whether a carefully designed masked autoencoder can turn those obstacles into advantages: use a very high masking ratio to make the task hard, and skip the masked patches in the encoder to make training efficient.

Problem

Self-supervised pretraining in vision had often relied on contrastive learning, which compares different views of an image, or on other pretext tasks that do not reconstruct pixels. Masked reconstruction is simpler, but it was not obvious that it would scale to large ViT models on ImageNet, or that a high masking ratio would help rather than hurt. The problem is to design a masked autoencoder that is both an efficient learner and a strong transferable representation, and to measure how masking ratio, decoder size and related choices affect recognition after pretraining.

Method

The method, called MAE, has two core designs. First, the architecture is asymmetric. During pretraining, a large random subset of patches—by default 75%—is masked out. The encoder sees only the visible patches, with no mask tokens. Mask tokens are introduced after the encoder, and a lightweight decoder then processes the full set of encoded patches plus mask tokens and reconstructs the image in pixels. The loss is mean squared error on the masked patches only. After pretraining, the decoder is discarded, and the encoder is applied to uncorrupted images, that is, to the full set of patches, for recognition tasks.

Figure 1. Our MAE architecture (He et al., 2022, Fig. 1). During pre-training a large random subset of patches (e.g., 75%) is masked out. The encoder is applied only to visible patches; mask tokens are introduced after the encoder, and a lightweight decoder reconstructs pixels. The decoder is discarded at recognition time.

Figure 1. Our MAE architecture (He et al., 2022, Fig. 1). During pre-training a large random subset of patches (e.g., 75%) is masked out. The encoder is applied only to visible patches; mask tokens are introduced after the encoder, and a lightweight decoder reconstructs pixels. The decoder is discarded at recognition time.

Second, the high masking ratio is treated as a feature, not a compromise. Because only a quarter of the patches (under the 75% default) go through the encoder, pretraining is substantially cheaper than a symmetric design that would encode placeholders for every missing patch. The authors report that this accelerates training by 3× or more and also improves accuracy. Data augmentation can be minimal: the default in their ablations is random resized cropping, without a strong requirement for color jitter.

Experiments

The main recognition benchmark is ImageNet-1K. Models are pretrained as masked autoencoders and then either fine-tuned or evaluated by linear probing, in which a linear classifier is trained on a frozen encoder. The default ablation configuration is a ViT-L/16 model with a decoder of depth 8 and width 512, unnormalized pixels as the reconstruction target, 75% random masking, and 800 pretraining epochs. Under those defaults, fine-tuning reaches 84.9% and linear probing reaches 73.5%. Fine-tuning after MAE uses 50 epochs, compared with 200 epochs for a from-scratch baseline.

Ablations vary decoder depth and width, the presence of mask tokens in the encoder, the reconstruction target, augmentation, and the masking strategy (random, block, or grid). A separate curve varies the masking ratio for both fine-tuning and linear probing. Scaling experiments include a ViT-Huge model. The paper also shows qualitative reconstructions, including examples at an 80% masking ratio (39 of 196 patches visible) and reconstructions of images that are masked even more heavily than the 75% used in training.

Results

The reconstructions are semantically plausible even when most of the image is hidden. In the illustrative examples, an 80% mask still yields a coherent object, although the loss is computed only on masked patches, so the visible patches are not forced to look perfect. When a model trained at 75% masking is given still higher masking ratios, including 85% and 95%, the predictions remain plausible even when they differ from the original image, which the authors take as a sign that the model is generalizing rather than merely copying local texture.

Figure 2. Example results on ImageNet validation images (He et al., 2022, Fig. 2). For each triplet: masked image (left), MAE reconstruction (middle), and ground truth (right). The masking ratio in these examples is 80%, leaving only 39 of 196 patches; the default method uses 75% masking.

Figure 2. Example results on ImageNet validation images (He et al., 2022, Fig. 2). For each triplet: masked image (left), MAE reconstruction (middle), and ground truth (right). The masking ratio in these examples is 80%, leaving only 39 of 196 patches; the default method uses 75% masking.

On ImageNet-1K, the default ViT-L configuration reaches 84.9% fine-tuning accuracy and 73.5% linear-probing accuracy. A ViT-L trained from scratch, in a comparison in the paper, reaches 82.5% with a longer 200-epoch fine-tuning schedule, versus 84.9% after MAE pretraining and 50 epochs of fine-tuning. A ViT-Huge model reaches 87.8% ImageNet-1K fine-tuning accuracy, which the paper reports as the best among the ImageNet-1K-only methods it compares.

Figure 4. Reconstructions of ImageNet validation images using an MAE pre-trained at 75% masking but applied at higher masking ratios (He et al., 2022, Fig. 4). Predictions at 85% and 95% masking remain plausible even when they differ from the original images.

Figure 4. Reconstructions of ImageNet validation images using an MAE pre-trained at 75% masking but applied at higher masking ratios (He et al., 2022, Fig. 4). Predictions at 85% and 95% masking remain plausible even when they differ from the original images.

Masking-ratio curves show that high ratios work well for fine-tuning: the plotted curve remains in a narrow, high band, with 83.2% at 10% masking, 83.4% at 20% and 30% masking, and 83.0% at 90% masking. Linear probing is more sensitive and prefers higher ratios, rising from 54.6% at 10% masking to a peak of 73.5% at 75%, then falling to 66.1% at 90%. Random sampling at 75% outperforms block or grid masking in the default table.

Figure 5. Masking ratio (He et al., 2022, Fig. 5). A high masking ratio (75%) works well for both fine-tuning (top) and linear probing (bottom). Linear probing rises from 54.6% at 10% masking to 73.5% at 75%. The y-axes are ImageNet-1K validation accuracy (%).

Figure 5. Masking ratio (He et al., 2022, Fig. 5). A high masking ratio (75%) works well for both fine-tuning (top) and linear probing (bottom). Linear probing rises from 54.6% at 10% masking to 73.5% at 75%. The y-axes are ImageNet-1K validation accuracy (%).

The decoder can be narrower than the encoder and still work; a width of 512 matches the default 84.9% / 73.5%, and a very shallow decoder is already enough for fine-tuning, while a deeper decoder helps linear probing (depth 8 gives 73.5% versus 65.5% at depth 1). An encoder without mask tokens is both more accurate and cheaper than an encoder that includes them (84.9% / 73.5% and 1× FLOPs, versus 84.2% / 59.6% and 3.3× FLOPs). Pixel reconstruction targets are effective; a normalized-pixel variant can be slightly higher (85.4% / 73.9%).

Table 1. MAE ablation experiments with ViT-L/16 on ImageNet-1K (He et al., 2022, Table 1). Default settings (decoder depth 8, width 512, 75% random masking, 800-epoch pre-training) reach 84.9% fine-tuning and 73.5% linear-probing accuracy, marked in gray.

Table 1. MAE ablation experiments with ViT-L/16 on ImageNet-1K (He et al., 2022, Table 1). Default settings (decoder depth 8, width 512, 75% random masking, 800-epoch pre-training) reach 84.9% fine-tuning and 73.5% linear-probing accuracy, marked in gray.

Analysis

MAE’s contribution is the combination of a hard pretext task with an encoder that never sees the discarded patches during pretraining. The high mask ratio is what makes reconstruction difficult enough to be useful, and it is also what makes the encoder cheap. The fact that fine-tuning remains strong across a wide band of high mask ratios, while linear probing peaks near 75%, suggests that the representation used by a frozen encoder is more sensitive to the pretext design than the representation obtained after fine-tuning the whole model.

The paper’s strongest ImageNet-1K fine-tuning number in this set of experiments is 87.8% with ViT-Huge. That should be read as the authors state it: a leading result among methods trained only on ImageNet-1K in their comparison, not as a claim about every later system or every larger dataset. The 84.9% default ViT-L number is the more useful reference for the ablations, because that is the setting in which decoder depth, width, mask tokens and sampling were varied.

Discarding the decoder at recognition time is part of the practical design. The decoder exists to give the encoder a reconstruction objective; once pretraining is done, recognition uses a complete, unmasked image and does not need mask tokens. That asymmetry is why the method can spend capacity on a large encoder without paying the same cost on every masked position.

Summary

MAE pretrains a Vision Transformer by randomly masking a large fraction of patches—75% by default—encoding only the visible subset, and reconstructing pixels with a lightweight decoder that is discarded at recognition time. On ImageNet-1K, a default ViT-L model reaches 84.9% fine-tuning and 73.5% linear-probing accuracy, compared with 82.5% for a from-scratch ViT-L in the paper’s comparison, and a ViT-Huge model reaches 87.8% fine-tuning accuracy among the ImageNet-1K-only methods compared. High masking ratios work well for fine-tuning, linear probing peaks at 75% (54.6% at 10% masking versus 73.5% at 75%), and an encoder without mask tokens is both more accurate and computationally cheaper.

References

He, K., Chen, X., Xie, S., Li, Y., Dollár, P., & Girshick, R. (2022). Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).