A Simple Data Mixing Prior for Improving Self-Supervised Learning

Sucheng Ren, Huiyu Wang, Zhengqi Gao, Shengfeng He, Alan L. Yuille, Yuyin Zhou, Cihang Xie

Abstract

Self-supervised learning (SSL) has revolutionized visual representation learning, yet data mixing techniques like Mixup and CutMix, which are highly effective in supervised settings, often degrade SSL performance, particularly for Vision Transformers (ViTs). We present Simple Data Mixing Prior (SDMP), a novel strategy that incorporates mixed images as additional positive pairs relative to their source images. By leveraging intra-batch mixing and semantic loss weighting, SDMP consistently improves the accuracy and robustness of both CNNs and ViTs across various SSL frameworks like MoCo and DINO.

Introduction

In computer vision, data mixing techniques such as Mixup and CutMix serve as powerful regularizers in supervised learning by creating synthetic training samples from image pairs. However, applying these techniques to Self-Supervised Learning (SSL) has proven challenging. SSL typically relies on contrastive learning or feature distillation between different "views" of the same unlabeled image. Naive data mixing introduces noise into this signal; for instance, a cat-dog hybrid might be incorrectly forced to match a pure cat feature, leading to semantic ambiguity. This issue is particularly acute for Vision Transformers (ViTs), where previous attempts at SSL mixing often resulted in performance drops.

The Simple Data Mixing Prior (SDMP)

The core innovation of this work is the Simple Data Mixing Prior (SDMP). Rather than treating mixed images as independent samples, SDMP explicitly models the relationship between a mixed image and its "parent" source images.

Overview of the SDMP data mixing process and the definition of positive pairs.

Key Components

  1. Intra-batch Mixing: To minimize computational overhead, images are mixed within the same training batch (e.g., pairing the $i$-th image with the $(n-i)$-th image).
  2. New Positive Pairs: SDMP introduces two additional positive relationships:
  3. Source-to-Mixed: A mixed image is treated as a partial positive match for both of its source images.
  4. Mixed-to-Mixed: Two different mixed images derived from the same pair of source images are treated as a positive pair.
  5. Semantic Loss Weighting: The contribution of these new pairs to the loss function is weighted by the mixing coefficient $\lambda$. For a mix of 80% Image A and 20% Image B, the model is encouraged to align more strongly with Image A.
  6. Diverse Mixing Toolbox: To enhance generalization, SDMP randomly selects between Mixup, CutMix, and ResizeMix during training.

Experimental Results

The authors evaluated SDMP across multiple architectures (ResNet-50, ViT-S, ViT-B) and benchmarks, including ImageNet-1K and CIFAR.

Performance Gains

On ImageNet-1K, integrating SDMP into MoCo v3 (ViT-S) improved top-1 linear evaluation accuracy from 73.2% to 73.8%. For DINO (ViT-S), accuracy rose from 76.0% to 76.4%. The gains were even more significant for CNNs; on CIFAR-100, a ResNet-50 trained with SDMP outperformed the baseline by 5% (68.2% vs. 63.2%).

Robustness and Generalization

A key finding is that SDMP significantly enhances model robustness. On the ImageNet-A dataset, which contains adversarial natural images, SDMP improved DINO's performance by 1.1%, compared to a modest 0.2% gain on standard ImageNet. This suggests that learning from mixed samples encourages the model to capture more robust, high-level semantic features rather than relying on local textures.

Conclusion and Future Work

SDMP provides a simple yet effective framework for bringing the benefits of data mixing to self-supervised learning. It is the first strategy to consistently improve ViT performance in SSL settings without significant computational cost. Future research will explore the integration of SDMP with Masked Image Modeling (MIM) approaches like MAE and investigate its scalability to larger model architectures.

Summary updated

BibTeX
@inproceedings{ren2022simple,
  author = {Sucheng Ren and Huiyu Wang and Zhengqi Gao and Shengfeng He and Alan L. Yuille and Yuyin Zhou and Cihang Xie},
  title = {{A Simple Data Mixing Prior for Improving Self-Supervised Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01419},
}
Figure