Introduction
Contrastive representation learning has emerged as a powerful paradigm for self-supervised learning, enabling models to learn useful features by distinguishing between similar and dissimilar data pairs. However, the success of methods like SimCLR and MoCo is often contingent on sophisticated, domain-specific data augmentations (e.g., color jittering for images). This dependence limits their applicability to domains where such augmentations are not well-defined, such as speech or tabular data. Furthermore, these models are susceptible to overfitting on the instance-level pretext task. We present i-Mix, a domain-agnostic regularization strategy that adapts the "MixUp" technique to the contrastive learning framework.
Methodology
The i-Mix strategy reformulates contrastive learning as a virtual classification problem. In a batch of $N$ instances, each instance is treated as a unique "virtual class" represented by a one-hot label vector of length $N$.
The core of i-Mix involves linear interpolation in both the input space and the virtual label space. Given two data points $(x_i, x_j)$ and their corresponding virtual labels $(v_i, v_j)$, i-Mix generates a synthetic training pair:
- $\tilde{x} = \lambda x_i + (1 - \lambda)x_j$
- $\tilde{v} = \lambda v_i + (1 - \lambda)v_j$
where $\lambda$ is sampled from a Beta distribution. The model is then trained to predict the mixed virtual label $\tilde{v}$ from the interpolated input $\tilde{x}$. This approach encourages the model to learn a smoother representation manifold, preventing it from simply memorizing discrete training samples. i-Mix is easily integrated into existing contrastive frameworks like MoCo or SimCLR by modifying the loss function to accommodate fractional labels.
Experimental Results
The efficacy of i-Mix was evaluated across vision, speech, and tabular datasets.
Vision Performance
On the CIFAR-10 and CIFAR-100 benchmarks, i-Mix consistently improved the performance of MoCo v2 across various ResNet architectures. As shown in Figure 1, the gains are particularly pronounced on CIFAR-100, where adding i-Mix to MoCo v2 yielded a top-1 accuracy improvement of up to 6.1%.
Data Efficiency and Robustness
A key advantage of i-Mix is its performance in low-data regimes. By regularizing the embedding space, i-Mix allows models to generalize better even when trained on small fractions of the original dataset. Figure 6 illustrates this effect on ImageNet, where i-Mix consistently outperforms the MoCo v2 baseline as the relative dataset size decreases.
Beyond Vision
The domain-agnostic nature of i-Mix was further validated on non-visual tasks. In speech recognition (Speech Commands dataset), i-Mix improved N-pair contrastive learning accuracy from 83.7% to 91.1%. On tabular datasets like CovType, performance increased from 65.8% to 69.5%, demonstrating its utility where traditional augmentations are difficult to design.
Analysis and Discussion
i-Mix serves as a "safety net" for contrastive learning. In scenarios where standard augmentations (like cropping or color distortion) are omitted, vanilla contrastive methods often fail. i-Mix, however, maintains respectable performance by providing a data-driven form of augmentation. Analysis using Frechet Embedding Distance (FED) confirms that i-Mix reduces the distribution gap between training and test embeddings, effectively mitigating overfitting.
While i-Mix introduces some computational overhead—requiring additional forward passes for mixed samples in some implementations—the resulting gains in accuracy and transferability make it a valuable tool for robust self-supervised learning.
Conclusion
i-Mix provides a simple yet effective regularization strategy for contrastive representation learning. By leveraging the principles of MixUp in a virtual classification setting, it achieves state-of-the-art results across diverse data modalities and demonstrates exceptional robustness in low-resource scenarios. Future work will explore the interaction of i-Mix with other self-supervised objectives and more complex mixing operators.
Summary updated