Mixed Autoencoder for Self-Supervised Visual Representation Learning

Kai Chen, Zhili Liu, Lanqing Hong, Hang Xu, Zhenguo Li, Dit-Yan Yeung

Abstract

Self-supervised visual representation learning has been dominated by two paradigms: Contrastive Learning and Masked Image Modeling (MIM). While data augmentation techniques like image mixing (e.g., CutMix) are staples of contrastive learning, they have historically proven difficult to integrate into MIM frameworks like Masked Autoencoders (MAE). This paper introduces MixedAE, a novel architecture that successfully incorporates image mixing into the MIM paradigm. By introducing a "homologous recognition" pretext task and constrained attention mechanisms, MixedAE prevents the model from exploiting information shortcuts, resulting in superior, object-aware representations and state-of-the-art efficiency.

Introduction

In recent years, Masked Image Modeling (MIM) has emerged as a powerful tool for visual pre-training, with models like MAE learning to reconstruct missing image patches. However, unlike contrastive learning, which thrives on heavy data augmentations, MIM performance often degrades when images are mixed. MixedAE addresses this limitation by rethinking how models process mixed inputs, forcing the network to perform "unmixing" and "homologous recognition" alongside standard reconstruction.

The Challenge: Mutual Information and Shortcuts

The primary obstacle to using image mixing in MIM is the leakage of Mutual Information (MI). In a standard MAE, the model uses global self-attention to reconstruct masked patches. When multiple images are mixed into a single input sequence, the model can often find "hints" of a target patch's content within other patches from the same source image that are scattered throughout the mixed sequence. This allows the model to take a shortcut, performing simple interpolation rather than learning deep semantic features. MixedAE is designed to block these shortcuts, turning the mixing process into a challenging feature-learning task.

The MixedAE Framework

MixedAE introduces several key architectural innovations to handle mixed inputs effectively:

  1. Mixing and Unmixing: The model takes patches from multiple source images (an input group) and mixes them into a single sequence. The decoder is then tasked with unmixing these patches to reconstruct the original, individual images.
  2. Homologous Attention via TopK Sampling: To prevent the model from using "heterologous" patches (those from different source images) as shortcuts, MixedAE replaces standard self-attention with TopK sampling. Each patch is constrained to attend only to the $K$ patches most likely to belong to the same source image.
  3. Homologous Contrastive Loss: An auxiliary loss function is introduced to encourage patches from the same source image to have similar representations in the latent space, while pushing patches from different images apart. This reinforces the model's ability to distinguish between different objects and backgrounds within the mixed input.
  4. Segment Embeddings: Similar to the approach used in BERT for NLP, MixedAE adds segment embeddings to the input patches. These embeddings provide a signal to the model regarding which source image a patch originated from, aiding in the unmixing process.

Experimental Results

The researchers evaluated MixedAE against standard benchmarks, demonstrating significant improvements in both performance and efficiency.

ImageNet-1K Classification

Using a standard ViT-Base backbone, MixedAE achieved a top-1 accuracy of 83.9% on ImageNet-1K. This outperforms the standard MAE by +0.3% and surpasses iBOT, while requiring significantly less computational overhead.

Downstream Tasks

The benefits of MixedAE are even more pronounced in dense prediction tasks:

  • Semantic Segmentation (ADE20K): MixedAE achieved a +1.7 mIoU improvement over MAE.
  • Object Detection (COCO): The model showed a +0.9 AP gain over the MAE baseline.
  • Transfer Learning: On a suite of 11 classification datasets (including CIFAR and specialized datasets like Flowers and Cars), MixedAE achieved an average accuracy of 86.9%, outperforming all other tested self-supervised Transformers.

Efficiency

One of the most significant advantages of MixedAE is its efficiency. Unlike Siamese network approaches (such as iBOT or DINO) that require multiple forward passes of different image "views," MixedAE processes mixed images in a single pass. It achieves state-of-the-art results while using only 53.4% of the training overhead required by iBOT.

Qualitative Insights: Emergent Object-Awareness

Beyond quantitative metrics, MixedAE exhibits a unique qualitative trait: emergent object-awareness. By forcing the model to group homologous patches, MixedAE naturally learns to identify object boundaries. While standard MAE often focuses on high-contrast edges, attention maps from MixedAE show a much more holistic focus on entire foreground objects. This suggests that the homologous recognition task encourages the model to understand object completeness and semantic consistency.

Conclusion

MixedAE successfully bridges the gap between image mixing and Masked Image Modeling. By addressing the shortcut problem through homologous attention and contrastive losses, the framework provides a highly efficient and effective method for self-supervised learning. The resulting representations are not only more accurate on standard benchmarks but also demonstrate a deeper, object-aware understanding of visual scenes.

Summary updated

BibTeX
@inproceedings{chen2023mixed,
  author = {Kai Chen and Zhili Liu and Lanqing Hong and Hang Xu and Zhenguo Li and Dit-Yan Yeung},
  title = {{Mixed Autoencoder for Self-Supervised Visual Representation Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  doi = {10.1109/cvpr52729.2023.02178},
}
Figure