Beyond Instance Discrimination: Relation-aware Contrastive Self-supervised Learning

Yifei Zhang, Chang Liu, Yu Zhou, Weiping Wang, Qixiang Ye, Xiangyang Ji

TL;DR

This paper introduces ReCo, a novel self-supervised learning framework that goes beyond simple instance discrimination. By incorporating both global distribution and local interpolation relations between data samples, ReCo learns richer semantic representations, leading to significant performance improvements across various downstream tasks, especially in low-data regimes.

What Problem Does This Paper Address?

Traditional contrastive self-supervised learning (CSL) methods primarily focus on instance discrimination, aiming to pull similar (positive) samples together and push dissimilar (negative) samples apart. While effective, this binary approach has limitations: it can incorrectly treat semantically similar samples as negatives, and it fails to capture nuanced relationships and differences between instances. This can lead to a less structured feature space and hinder generalization, particularly when labeled data is scarce. The authors aim to address this by developing a more sophisticated way to model instance relationships within CSL.

Methods

ReCo builds upon existing CSL frameworks (like MoCo-v2) and introduces two key "relation-aware" components:

  • Global Distribution Relation: This component enriches the learning process by considering the similarity distribution between an anchor view and all its negative samples. Instead of treating all negatives equally, it leverages the varying degrees of similarity to relax the strict positive/negative assignments. This is achieved through "distribution generation" (calculating similarity distributions) and "distribution alignment" (using KL divergence to match distributions).
  • Local Interpolation Relation: This component addresses the "apparent similarity" between samples. It uses a data mixture strategy (similar to Mixup or CutMix) to create synthetic "interpolated" images by blending pixel data. Crucially, it then interpolates the features of these image pairs with the same ratio. By enforcing consistency between the interpolated pixel space and the interpolated feature space, ReCo quantitatively models feature differences and ensures that visually similar samples are closer in the feature space.

These two relations are integrated into the CSL framework in a "plug-and-play" manner, meaning they can be added to existing CSL methods. The overall loss function is a combination of the standard CSL loss (InfoNCE) and the proposed global and local relation losses.

Datasets

The paper evaluates ReCo on several standard datasets:

  • ImageNet-1K: Used for pre-training and linear classification evaluation.
  • ImageNet-100: A subset of ImageNet, used for faster evaluation and ablation studies.
  • PASCAL VOC (2007): Used for low-shot classification and object detection tasks.
  • COCO: Used for object detection and instance segmentation tasks.

Key Insights and Ideas

  • Beyond Binary Discrimination: The core idea is that CSL can be significantly improved by moving beyond a simple positive/negative dichotomy and embracing "soft" instance relations.
  • Complementarity of Global and Local Relations: The paper highlights that global distribution relations (understanding how samples relate across the entire dataset) and local interpolation relations (understanding fine-grained similarities between visually similar samples) are complementary and together lead to a more robust feature representation.
  • Relaxing the "Hard Negative" Problem: By considering similarity distributions, ReCo implicitly handles "false negatives" (semantically similar samples incorrectly treated as negatives) more gracefully than traditional CSL.
  • Quantitative Modeling of Apparent Similarity: The local interpolation relation provides a principled way to quantify and leverage visual similarity, which is often overlooked in standard CSL.
  • Plug-and-Play Efficacy: The modular design of ReCo allows it to be easily integrated with existing CSL frameworks, demonstrating its broad applicability.

Key Results

ReCo consistently outperforms baseline methods like MoCo-v2 across various tasks:

  • Linear Classification (ImageNet-100): Achieved a top-1 accuracy of 78.8%, a significant improvement over MoCo-v2's 66.2%.
  • Semi-supervised Classification (ImageNet-1% labeled): Surpassed MoCo-v2 by 13.4% top-1 accuracy.
  • Low-shot Classification (VOC 2007): Improved MoCo-v2 by up to 7.7% mAP for k=1 shot.
  • Object Detection (VOC 07+12): Improved MoCo-v2 by 3.3% AP and 2.7% AP75.
  • Object Detection (COCO): Achieved 1.1% AP and 1.3% AP75 improvements over MoCo-v2.
  • Intra-/Inter-Class Similarity: ReCo showed higher intra-class similarity and a better discriminative index compared to MoCo-v2, indicating a more structured feature space.
  • Efficiency: ReCo achieved strong performance with fewer training epochs compared to baselines, demonstrating improved pre-training efficiency.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the paper explores some hyperparameter settings (e.g., temperature parameters for distribution alignment), the optimal choices for balance weights ($\lambda_1, \lambda_2$) and interpolation parameters might require careful tuning.
  • Computational Cost: Adding the global distribution and local interpolation modules likely increases the computational overhead compared to vanilla CSL, although the paper doesn't explicitly quantify this.
  • Future Directions: The authors suggest exploring neighborhood discovery or clustering techniques for better semantic-aware instance relation exploration, which could be a promising avenue for future research. They also implicitly suggest that further improvements can be made by combining ReCo with advanced data augmentation strategies (e.g., multi-crop).

Summary updated

BibTeX
@article{zhang2022beyond,
  author = {Yifei Zhang and Chang Liu and Yu Zhou and Weiping Wang and Qixiang Ye and Xiangyang Ji},
  title = {{Beyond Instance Discrimination: Relation-aware Contrastive Self-supervised Learning}},
  journal = {IEEE Trans. Multimedia},
  year = {2022},
  url = {https://openreview.net/forum?id=GqFv4WXzG7t},
}
Figure