Abstract
Masked image modeling has demonstrated great potential to eliminate the label-hungry problem of training large-scale vision Transformers, achieving impressive performance on various downstream tasks. In this work, we propose a unified view of masked image modeling after revisiting existing methods. Under the unified view, we introduce a simple yet effective method, termed as MaskDistill, which reconstructs normalized semantic features from teacher models at the masked positions, conditioning on corrupted input images. Experimental results on image classification and semantic segmentation show that MaskDistill achieves comparable or superior performance than state-of-the-art methods. When using the huge vision Transformer and pretraining 300 epochs, MaskDistill obtains 88.3% fine-tuning top-1 accuracy on ImageNet-1k (224 size) and 58.8 semantic segmentation mIoU metric on ADE20k (512 size).
Introduction
Vision Transformers (ViTs) have become the backbone of modern computer vision, yet their performance is often gated by the requirement for massive labeled datasets. Masked Image Modeling (MIM) has emerged as a promising self-supervised pre-training paradigm to address this "label-hungry" challenge. By training models to reconstruct missing parts of an image—analogous to masked language modeling in NLP—MIM allows ViTs to learn robust visual representations without human annotations.
However, the rapid development of MIM has led to a fragmented landscape of methodologies, ranging from pixel-level reconstruction (e.g., MAE) to discrete token prediction (e.g., BEiT) and feature-based distillation (e.g., MaskFeat). This work seeks to unify these diverse approaches into a single framework and introduces MaskDistill, a streamlined and highly effective recipe for MIM.
A Unified Framework for MIM
To clarify the relationship between existing MIM methods, we propose a unified mathematical framework: $$MIM = \mathcal{L}(\mathcal{N}(\mathcal{T}(I_{full})), \mathcal{H}(\mathcal{S}(I_{masked})))$$ In this formulation, the process is decomposed into five key components:
- Teacher ($\mathcal{T}$): Generates the target representation from the full image (e.g., CLIP, DINO, or raw pixels).
- Normalization ($\mathcal{N}$): Stabilizes the target features to facilitate learning.
- Student ($\mathcal{S}$): The Vision Transformer being trained.
- MIM Head ($\mathcal{H}$): A lightweight module that predicts the target from the student's latent representation.
- Loss Function ($\mathcal{L}$): Measures the discrepancy between the predicted and target representations.
MaskDistill: Simple and Effective
Building on this unified view, we introduce MaskDistill. The core philosophy of MaskDistill is that predicting high-level semantic features is more beneficial for downstream tasks than reconstructing low-level pixels.
MaskDistill utilizes a pre-trained CLIP model as its teacher, providing rich semantic targets. Unlike traditional knowledge distillation which focuses on visible patches, MaskDistill emphasizes extrapolation—predicting features for patches that the student model has not seen. To keep the architecture efficient, we use a simple Fully Connected (FC) layer as the MIM head. We find that applying LayerNorm to the teacher's features is critical for training stability, and we employ the Smooth-$\ell_1$ loss to optimize the student.
Experimental Results
We evaluated MaskDistill on standard benchmarks, including ImageNet-1k for classification and ADE20k for semantic segmentation.
As shown in the comparison with other state-of-the-art MIM methods, MaskDistill achieves highly competitive results. For instance, a ViT-Base model pre-trained with MaskDistill reaches 85.5% top-1 accuracy on ImageNet-1k, matching the performance of more complex methods like BEiT v2 while using a simpler architecture. When scaled to a ViT-Huge backbone, MaskDistill achieves a remarkable 88.3% top-1 accuracy and 58.8% mIoU on ADE20k.
Beyond raw accuracy, MaskDistill significantly improves the model's shape bias. While supervised models often rely on local textures, MIM-trained models like MaskDistill learn to recognize objects by their global geometric forms, leading to better robustness against image corruptions and sketches.
Conclusion
MaskDistill demonstrates that a simple approach to feature distillation, when properly normalized and targeted at masked positions, can match or exceed the performance of more complex MIM frameworks. By providing a unified view of the field, we hope to simplify the design of future self-supervised vision models. Future research will focus on multimodal integration and scaling these techniques to even larger, uncurated datasets.
Summary updated