Extreme Masking for Learning Instance and Distributed Visual Representations

Zhirong Wu, Zihang Lai, Xiao Sun, Stephen Lin

Abstract

Self-supervised learning (SSL) has historically been divided into two paradigms: Siamese networks, which learn holistic instance representations, and Masked Image Modeling (MIM), which focuses on distributed local features. We present ExtreMA, a novel approach that bridges this gap by employing extreme masking (75%–90%) as a data augmentation strategy within a Siamese framework. By requiring a Vision Transformer (ViT) to predict the global features of a full image from a minimal subset of its patches, ExtreMA learns representations that are both semantically rich and spatially precise. Our method achieves 73.3% top-1 accuracy on ImageNet-1k linear probing and demonstrates up to 10x training speedups compared to existing SSL techniques.

Introduction

The efficacy of Self-Supervised Learning (SSL) often depends on the nature of the pretext task. Siamese networks (e.g., BYOL, DINO) typically rely on hand-engineered augmentations to learn instance-level invariance, often at the cost of local spatial awareness. Conversely, Masked Image Modeling (MIM) methods (e.g., MAE, BEiT) excel at learning distributed representations through reconstruction but often underperform in global instance-level tasks like image retrieval.

ExtreMA proposes that extreme masking serves as a superior alternative to traditional augmentations. By discarding the vast majority of image data, the model is forced to extrapolate semantic context from sparse information, effectively learning both global and local representations simultaneously.

Methodology

ExtreMA utilizes a Vision Transformer (ViT) backbone within a teacher-student framework. The teacher network receives the complete, original image to generate a holistic target feature vector. Simultaneously, the student network is provided with an "extremely masked" version of the same image, containing only 10% to 25% of the original patches.

The ExtreMA architecture uses a teacher-student framework where the student processes a highly masked input to predict the teacher's global representation.

Key architectural innovations include:

  • Extreme Masking Ratios: Pushing masking to 90% creates a challenging pretext task that prevents the model from relying on local pixel redundancy.
  • Cross-Attention Aggregation: Instead of a standard [CLS] token, ExtreMA employs CaiT-style cross-attention blocks at the end of the student network. This ensures that patch-level features remain distributed while allowing for a coherent global summary.
  • Multi-Masking Efficiency: The computational lightness of processing only 10% of an image allows the student to evaluate multiple different masks in a single pass, significantly increasing data throughput.

Experimental Results

The model was pre-trained on ImageNet-1k and ImageNet-22k and evaluated across various downstream tasks, including semantic segmentation (ADE20K) and object detection (MSCOCO).

Representation Quality

ExtreMA significantly outperforms previous MIM methods in linear probing, reaching 73.3% accuracy on ImageNet-1k. In transfer learning for segmentation, it achieved 48.4 mIoU on ADE20K, surpassing both contrastive and masked benchmarks.

Qualitative comparison of image reconstructions from features learned by various SSL methods at different masking ratios.

Generative Insights

Although ExtreMA is not trained on a pixel-reconstruction loss, its learned features are remarkably descriptive. Qualitative analysis via "deep image prior" reconstruction shows that ExtreMA preserves higher spatial fidelity and semantic consistency than MAE or DINO, even at 90% masking.

Computational Efficiency

Due to the reduced input size for the student network and the multi-masking strategy, ExtreMA is 5x to 10x faster to train than standard SSL methods. A ViT-Base model can be fully trained in approximately two days on a single 8-GPU node.

Discussion and Conclusion

ExtreMA demonstrates that "less is more" in visual representation learning. By treating masking as a hard augmentation rather than a reconstruction target, the model captures the underlying structure of images more effectively than traditional methods. While the architecture shows sensitivity to the specific aggregation method (cross-attention vs. [CLS] token), its scalability and efficiency mark a significant step forward for self-supervised vision models. Future work will explore automated hyperparameter tuning for masking ratios across diverse datasets.

Summary updated

BibTeX
@article{wu2023extreme,
  author = {Zhirong Wu and Zihang Lai and Xiao Sun and Stephen Lin},
  title = {{Extreme Masking for Learning Instance and Distributed Visual Representations}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2023},
}
Figure