$i$-Mix: A Domain-Agnostic Strategy for Contrastive Representation Learning

Kibok Lee, Yian Zhu, Kihyuk Sohn, Chun-Liang Li, Jinwoo Shin, Honglak Lee

Contrastive representation learning has revolutionized self-supervised learning (SSL), allowing models to learn rich representations from unlabeled data. The core mechanism involves bringing "positive pairs" (different views of the same instance) closer together in the embedding space while pushing "negative pairs" (different instances) apart.

However, the success of frameworks like SimCLR and MoCo relies heavily on domain-specific data augmentations. For images, researchers have spent years perfecting combinations of cropping, color jittering, and blurring. For other domains—like tabular data or specialized medical signals—it is often unclear what a "meaningful" augmentation even looks like. Furthermore, contrastive learning typically requires massive amounts of data and large batch sizes to generalize well.

This paper introduces i-Mix, a simple yet powerful regularization strategy designed to make contrastive representation learning more effective and "domain-agnostic." By borrowing the concept of MixUp from supervised learning and applying it to the "virtual labels" used in SSL, the authors demonstrate significant performance gains across images, speech, and tabular data.

The i-Mix Methodology

The authors propose adapting the popular MixUp augmentation to the contrastive learning setting through a few key steps:

  1. Virtual Labels: In contrastive learning, ground-truth classes are unavailable. i-Mix treats each data instance in a batch as its own "virtual class." For a batch of $N$ items, the model effectively assigns $N$ unique one-hot labels.
  2. Mixing in Input and Label Space: Similar to standard MixUp, i-Mix takes two data points ($x_i, x_j$) and creates a synthetic sample by linearly interpolating them: $\tilde{x} = \lambda x_i + (1-\lambda)x_j$. Crucially, it also interpolates their corresponding one-hot virtual labels.
  3. Integration with SSL Frameworks: The paper demonstrates how to integrate this loss into major frameworks:
  4. SimCLR/N-pair: Mixing the inputs and the contrastive cross-entropy loss.
  5. MoCo: Mixing inputs and comparing them against a memory bank of keys.
  6. BYOL: Applying i-Mix to a framework that doesn't use negative pairs, proving the regularization effect is broad.

By training the model to recognize these "mixed" identities, i-Mix forces the network to learn smoother, more generalized decision boundaries in the representation space.

Key Insights: Data Scarcity and Smoothing

i-Mix acts as a powerful regularizer that prevents the model from overfitting to the pretext task. In deep learning, models often become overconfident; i-Mix forces the model to predict a distribution over virtual classes, leading to better-behaved embedding spaces.

One of the most striking findings is that i-Mix can act as a substitute for complex augmentations. On CIFAR-10, a model trained without standard augmentations (like cropping/flipping) but with i-Mix achieved 83.4% accuracy, compared to only 47.7% for a standard contrastive model.

Furthermore, the performance gains from i-Mix are most pronounced when the dataset is small. As the amount of unlabeled data decreases, the "gap" filled by i-Mix's synthetic samples becomes increasingly valuable.

Accuracy vs. Relative Dataset Size

Cross-Domain Results

To prove its domain-agnostic nature, the authors evaluated i-Mix across a wide variety of benchmarks, including images (CIFAR, ImageNet), speech (Speech Commands), and tabular data (CovType, Higgs).

Across all tested domains, i-Mix consistently improved top-1 accuracy. For example, adding i-Mix to MoCo v2 on CIFAR-100 boosted accuracy from 71.6% to 78.1% (a massive 6.5% absolute improvement).

Performance improvements across Image, Speech, and Tabular domains

The strategy proved especially vital for domains where spatial augmentations don't apply. On the Speech Commands dataset, i-Mix pushed accuracy from 96.3% to 98.4%. On the tabular CovType dataset, it improved results from 70.5% to 73.1%. Finally, representations learned with i-Mix on ImageNet transferred better to downstream tasks like PASCAL VOC object detection, showing that the learned features are more robust and generalizable.

Limitations and Future Work

While highly effective, i-Mix does come with considerations:

  • Computational Cost: For certain implementations (like the SimCLR version), i-Mix can require more memory or training time because the model needs to process both the original and the mixed views to maintain performance.
  • Hyperparameter Sensitivity: While a mixing coefficient ($\alpha$) of 1.0 or 2.0 generally works well, different architectures or extremely different data types might require specific tuning of the interpolation distribution.
  • Alternative Mixing Operators: The paper primarily uses linear MixUp. The authors suggest that other operators, like CutMix (which patches parts of images together), could be used within the i-Mix framework for even better results in specific domains like computer vision.

Summary updated

BibTeX
@inproceedings{lee2021i,
  author = {Kibok Lee and Yian Zhu and Kihyuk Sohn and Chun-Liang Li and Jinwoo Shin and Honglak Lee},
  title = {{$i$-Mix: A Domain-Agnostic Strategy for Contrastive Representation Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=T6AxtOaWydQ},
}
Figure