NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adversarial Masking for Self-Supervised Learning

Yuge Shi, N. Siddharth, Philip H. S. Torr, Adam R. Kosiorek

Abstract

Masked Image Modeling (MIM) has emerged as a powerful paradigm for self-supervised learning in computer vision. However, traditional MIM approaches rely on random patch masking, which often allows models to solve the task through low-level pixel interpolation rather than high-level semantic reasoning. We present Adversarial Inference-Occlusion Self-supervision (ADIOS), a framework that replaces random masking with a learned, adversarial occlusion model. By training a generator to hide the most informative semantic parts of an image, ADIOS forces the encoder to learn deeper structural relationships. Our results demonstrate that ADIOS consistently outperforms standard baselines across various architectures, including both Vision Transformers and Convolutional Neural Networks.

Introduction: The Semantic Gap in Masked Modeling

Masked Image Modeling was directly inspired by the success of Masked Language Modeling (MLM) in natural language processing, most notably BERT. In NLP, a masked word represents a discrete semantic unit. In contrast, standard vision models like MAE or BEiT typically use random patch masking.

Comparison of masking strategies in language (BERT) versus vision models. Unlike random patch masking in MAE or BEiT, ADIOS attempts to mask semantic units.

Because images possess high spatial redundancy, a model can often "cheat" by looking at pixels immediately adjacent to a mask to interpolate missing values. This allows the model to solve the task using low-level textures rather than high-level semantic reasoning. The authors of ADIOS argue that the effectiveness of the pretext task depends less on the quantity of the mask and more on its semantic relevance.

The ADIOS Framework

The core of ADIOS is a min-max game played between two neural networks:

  1. The Occlusion Model ($\mathcal{M}$): Typically implemented as a U-Net, this model generates $N$ different masks for an input image. Its objective is adversarial: it identifies and masks regions that maximize the distance between the original image's representation and the masked version. Essentially, it learns to hide the "most important" parts of the scene.
  2. The Inference Model ($\mathcal{I}$): This is the image encoder being trained. Its goal is to minimize the distance between the original and masked representations, forcing it to conceptually "fill in the blanks."

To prevent the occlusion model from simply masking the entire image, the framework includes a sparsity penalty. Notably, ADIOS is an "encoder-only" framework. Unlike MAE, it does not require a heavy decoder to reconstruct pixels; it operates entirely within the representation space. This design makes it backbone-agnostic, compatible with both Vision Transformers (ViTs) and traditional Convolutional Neural Networks (CNNs) like ResNet.

Key Insights and Emergent Properties

Semantic Masking vs. Pixel Interpolation

By learning to mask whole entities—such as a bird's head or a car's wheel—ADIOS moves vision-based masking closer to the discrete semantic units found in NLP. This forces the encoder to learn that a "wing" belongs to a "bird," rather than just learning local color gradients.

A detailed view of an ADIOS-generated mask, showing how the model naturally learns to segment semantic parts of the object.

Emergent Segmentation

One of the most striking findings is that the occlusion model naturally learns to segment objects and their constituent parts without any manual labels. This occurs because these parts are the most informative features to hide from the inference model. This suggests that adversarial masking could serve as a path toward unsupervised object segmentation.

Experimental Results and Robustness

The researchers evaluated ADIOS across diverse benchmarks, including ImageNet100, STL10, and various transfer learning tasks (CIFAR, Flowers102).

  • Performance Gains: ADIOS consistently outperformed standard SSL baselines like SimCLR and BYOL. On ImageNet100-S, it improved BYOL’s top-1 accuracy by 9% when using a ViT-Tiny backbone.
  • Adversarial Robustness: In the "Backgrounds Challenge," ADIOS-trained models showed higher accuracy when backgrounds were replaced with noise. This indicates that the model learns object-centric representations rather than relying on spurious background correlations.

Conclusion and Future Work

While ADIOS shows significant promise, it introduces higher computational complexity due to the multiple forward passes required by the occlusion model. Future work involves scaling the framework to massive datasets like ImageNet-1k and further refining the occlusion model's architecture to improve the quality of emergent segmentations. Despite these challenges, ADIOS demonstrates that intelligent, adversarial masking is a vital step toward more robust and semantically-aware self-supervised learning.

Summary updated

BibTeX
@inproceedings{shi2022adversarial,
  author = {Yuge Shi and N. Siddharth and Philip H. S. Torr and Adam R. Kosiorek},
  title = {{Adversarial Masking for Self-Supervised Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
}
Figure