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

MixCo: Mix-up Contrastive Learning for Visual Representation

Sungnyun Kim, Gihun Lee, Sangmin Bae, Se-Young YunarXiv 2020

Abstract

Contrastive learning has shown remarkable results in recent self-supervised approaches for visual representation. By learning to contrast positive pairs' representation from the corresponding negatives pairs, one can train good visual representations without human annotations. This paper proposes Mix-up Contrast (MixCo), which extends the contrastive learning concept to semi-positives encoded from the mix-up of positive and negative images. MixCo aims to learn the relative similarity of representations, reflecting how much the mixed images have the original positives. We validate the efficacy of MixCo when applied to the recent self-supervised learning algorithms under the standard linear evaluation protocol on TinyImageNet, CIFAR10, and CIFAR100. In the experiments, MixCo consistently improves test accuracy. Remarkably, the improvement is more significant when the learning capacity (e.g., model size) is limited, suggesting that MixCo might be more useful in real-world scenarios.

Introduction: The Challenge of Triviality in Contrastive Learning

In self-supervised learning, contrastive methods have become the standard for training visual representations without labels. The core principle involves pulling representations of augmented views of the same image (positive pairs) together while pushing different images (negative pairs) apart. However, this binary logic often leads to a "triviality" problem: once a model learns low-level features, distinguishing between two distinct images becomes too easy, preventing the model from learning deeper semantic relationships. Furthermore, these methods are often sensitive to augmentation strategies and require large batches of negative samples to avoid collapsing into simple solutions.

Methodology: The MixCo Framework

To address these limitations, we introduce MixCo (Mix-up Contrast), which integrates the mix-up data augmentation strategy directly into the contrastive learning framework.

Instead of relying solely on discrete positive and negative pairs, MixCo creates "semi-positives" by blending two different images ($x_i$ and $x_k$) using a mixing ratio ($\lambda$). This forces the model to move beyond binary classification and instead predict relative similarity. If a mixed image consists of 70% of Image A and 30% of Image B, the model is trained to ensure its representation reflects these proportions relative to the original images.

The MixCo architecture introduces an 'Additional Comparison' block where mixed images are contrasted against original representations using soft similarity targets.

The total loss function combines standard contrastive loss (e.g., from MoCo-v2) with a specific MixCo loss designed to handle these soft targets. This "plug-and-play" approach allows MixCo to be easily integrated into existing state-of-the-art algorithms like SimCLR or MoCo-v2 with minimal architectural changes.

Experimental Evaluation and Key Results

We evaluated MixCo across several benchmarks, including TinyImageNet, CIFAR10, CIFAR100, and the large-scale ImageNet dataset.

Performance Gains and Model Efficiency

A key finding of our study is that MixCo provides substantial performance improvements, particularly for models with limited capacity. For instance, on TinyImageNet using a ResNet-18 encoder, MixCo improved top-1 accuracy from 35.79% to 42.65%—a significant jump of nearly 7%.

MixCo provides a substantial accuracy boost over the MoCo-v2 baseline, particularly for smaller encoders like ResNet-18.

This trend holds across different architectures, as shown in the figure above. While larger models like ResNet-50 also see improvements, the relative gain is most pronounced for smaller encoders. This suggests that MixCo acts as a powerful regularizer that helps smaller models capture more nuanced features from the same amount of data.

Transfer Learning and Scalability

The representations learned via MixCo are highly robust and versatile. When a ResNet-18 pre-trained on TinyImageNet was transferred to CIFAR100, accuracy rose from 48.81% to 53.23%. On the full ImageNet dataset, MixCo achieved 68.4% accuracy, outperforming standard MoCo-v2 (67.5%) and SimCLR (61.9%) under comparable training regimes.

Discussion: Semantic Clustering and Computational Trade-offs

Visualization of the embedding space using t-SNE reveals that MixCo produces tighter and more semantically distinct clusters compared to baseline methods. By forcing the model to understand the "in-between" states of mixed images, it develops a more organized internal representation of object classes, leading to better separation in the feature space.

While MixCo introduces a modest increase in computational overhead—requiring approximately 1.29x more memory and 1.16x more training time per epoch—the resulting accuracy gains and improved feature quality provide a compelling trade-off, especially for real-world applications where model size and efficiency are critical constraints.

Conclusion

MixCo successfully extends contrastive learning by introducing the concept of semi-positives through mix-up augmentation. By training models to recognize relative similarity rather than just binary identity, MixCo produces more versatile and accurate visual representations. Its effectiveness across various datasets and its particular benefit to smaller models make it a valuable tool for practical self-supervised learning.

Summary updated

BibTeX
@misc{kim2020mixco,
  author = {Sungnyun Kim and Gihun Lee and Sangmin Bae and Se-Young Yun},
  title = {{MixCo: Mix-up Contrastive Learning for Visual Representation}},
  year = {2020},
  eprint = {2010.06300},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.06300},
}
Figure