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

Extending Momentum Contrast with Cross Similarity Consistency Regularization

Mehdi Seyfi, Amin Banitalebi-Dehkordi, Yong Zhang · DOI

Abstract

Self-supervised contrastive learning has traditionally focused on maximizing the similarity between different views of the same image while pushing all other images in a batch or queue away equally. This approach, governed by the InfoNCE loss, often ignores the underlying semantic relationships between different images—what is referred to as "dark knowledge." This paper introduces XMoCo (Extended Momentum Contrast), a framework that regularizes the cross-similarity between negative pairs. By enforcing consistency across augmentations and ensuring a uniform distribution of similarities through optimal transport, XMoCo captures richer structural information, leading to improved performance across classification, detection, and segmentation tasks.

Introduction

In the realm of self-supervised learning (SSL), contrastive methods like MoCo and SimCLR have set benchmarks by learning representations that are invariant to data augmentations. The core mechanism involves a simple binary distinction: "positive pairs" (two views of the same image) are pulled together, while "negative pairs" (views of different images) are pushed apart.

However, the standard InfoNCE loss treats all negative pairs as equally distinct. For instance, in a latent space, an image of a dog is forced to be as far from another dog as it is from a car. This one-hot labeling ignores the inherent semantic hierarchy of the data. XMoCo addresses this by leveraging the relationships between negative samples to provide a more nuanced supervisory signal.

Methodology

XMoCo extends the Momentum Contrast (MoCo) framework by introducing two primary innovations designed to exploit the "dark knowledge" within negative pairs.

1. Cross Similarity Consistency

The authors propose that the relationship between two distinct images should be invariant to the specific transformations applied to them. If image $A$ and image $B$ are different, the similarity between $Source(A)$ and $Target(B)$ should ideally match the similarity between $Target(A)$ and $Source(B)$. By regularizing this "cross-similarity," the model learns to maintain stable inter-image relationships regardless of the view.

2. Soft Pseudo-labeling via Sinkhorn-Knopp

To avoid the pitfalls of hard one-hot labels, XMoCo generates soft pseudo-labels for negative pairs. The method employs the Sinkhorn-Knopp algorithm to solve an optimal transport problem. This enforces a uniformity constraint, ensuring that similarities are distributed evenly across all negative peers in a batch on average. This prevents the model from collapsing into degenerate solutions or making over-confident, arbitrary distinctions between semantically related negatives.

3. Symmetric Cross-Entropy Loss

These constraints are integrated into a symmetric cross-entropy loss function. The training process alternates between computing optimal soft pseudo-labels and updating the network weights. This "plug-and-play" loss can be integrated into existing contrastive architectures with minimal modification.

Experimental Results

The authors evaluated XMoCo across a diverse set of benchmarks to test its robustness and generalization capabilities.

ImageNet Classification

On the ImageNet-1K linear probe benchmark, XMoCo achieved a 74.0% top-1 accuracy. This outperforms several prominent baselines under similar training conditions, including MoCo-v2 (72.2%) and SimCLR (70.4%). The improvement suggests that the soft-labeling approach helps the backbone learn more discriminative features.

Transfer Learning and Downstream Tasks

The utility of XMoCo features was further validated through transfer learning across 10 different classification datasets (including CIFAR-10/100, Pascal VOC 2007, and Oxford Pets). XMoCo ranked in the top two for 8 out of the 10 datasets, demonstrating high generalizability.

In object detection and instance segmentation on COCO 2017, XMoCo matched or exceeded state-of-the-art methods like SwAV and SimSiam, achieving an instance segmentation score of 36.9 AP. This indicates that the learned representations are not only good for global classification but also for localized spatial tasks.

Discussion and Insights

The success of XMoCo highlights several key insights in SSL:

  • Relational Semantics: The relative similarity between different images contains a vital semantic signal. A zebra is naturally closer to a horse than to a car; capturing this helps the model build a more logical embedding space.
  • Universal Consistency: Invariance should not be limited to the identity of a single object but should extend to the relationships between different objects.
  • Efficiency: By utilizing the MoCo memory queue, XMoCo remains computationally efficient and accessible, avoiding the massive batch size requirements of some clustering-based SSL methods.

Limitations

Despite its performance, XMoCo introduces additional hyperparameters, such as $\xi$ (positive pair probability) and $\lambda$ (Sinkhorn regularization), which may require tuning for specific datasets. Additionally, while the Sinkhorn-Knopp algorithm is efficient, it does introduce a minor iterative overhead compared to standard InfoNCE. Future work remains to be done on how these relational priors scale with newer architectures like Vision Transformers (ViT).

Conclusion

XMoCo demonstrates that there is significant value in the "negatives" of contrastive learning. By moving beyond one-hot labels and enforcing cross-similarity consistency, the framework provides a more robust and semantically aware approach to self-supervised representation learning.

Summary updated

BibTeX
@article{seyfi2022extending,
  author = {Mehdi Seyfi and Amin Banitalebi-Dehkordi and Yong Zhang},
  title = {{Extending Momentum Contrast with Cross Similarity Consistency Regularization}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2022},
  doi = {10.1109/tcsvt.2022.3169145},
}
Figure