Similarity Contrastive Estimation for Self-Supervised Soft Contrastive Learning

Julien Denize, Jaonary Rabarisoa, Astrid Orcesi, Romain Hérault, Stéphane Canu

TL;DR

This paper introduces Similarity Contrastive Estimation (SCE), a novel self-supervised learning method that improves upon traditional contrastive learning by explicitly modeling semantic similarity between instances. SCE achieves state-of-the-art results on ImageNet linear evaluation and demonstrates strong generalization capabilities across various downstream tasks.

What Problem Does This Paper Address?

Self-supervised learning (SSL) methods, particularly contrastive learning, have shown great success in learning powerful visual representations without manual labels. However, standard contrastive learning approaches often treat all non-positive instances as "noise" to be pushed away. This can be detrimental because instances within the same dataset often share semantic similarities, and a good representation should capture these relationships, not just discriminate between distinct instances. The "class collision problem," where hard negatives are semantically similar to positives, further exacerbates this issue. The paper aims to bridge this gap by developing a method that leverages both instance discrimination and semantic similarity.

Methods

The core of the proposed method is Similarity Contrastive Estimation (SCE). Unlike traditional contrastive learning that uses a hard positive/negative distinction, SCE employs a "soft" contrastive objective. It estimates a target similarity distribution between instances based on their semantic relationships. This target distribution is then used to guide the learning process, pushing similar instances closer and dissimilar ones further apart, but with a nuanced approach that accounts for varying degrees of similarity.

Key aspects of SCE include:

  • Soft Contrastive Objective: Instead of a binary classification of positive/negative, SCE predicts a continuous distribution of similarities.
  • Semantic Similarity Modeling: It explicitly models the semantic similarity between instances, moving beyond simple instance discrimination.
  • Sharpened Target Distribution: A temperature parameter is used to sharpen the target similarity distribution, effectively filtering out noisy relationships and focusing on more relevant similarities.
  • Asymmetric Data Augmentations: The method utilizes different data augmentation strategies for the two views of an image. A weaker augmentation is used for the "teacher" view to preserve semantic relationships, while a stronger augmentation is used for the "student" view to learn invariant features.
  • Weighted One-Hot Label: The target similarity distribution is a combination of a sharpened semantic similarity distribution and a weighted one-hot label, balancing the need for discrimination and relation modeling.

SCE can be seen as a generalization of existing methods like InfoNCE (used in MoCo) and ReSSL, by combining their strengths.

Datasets

The paper uses the following datasets:

  • ImageNet: Used extensively for pretraining and linear evaluation. Experiments were conducted on the full ImageNet dataset and a subset called ImageNet100 for ablation studies due to reduced computational requirements.
  • CIFAR-10, CIFAR-100, STL-10, Tiny-ImageNet: Used for evaluating the performance of SCE on smaller and medium-sized datasets.
  • Pascal VOC2007: Used for low-shot evaluation to assess transfer learning capabilities.
  • FGVC Aircraft, Caltech-101, Stanford Cars, CIFAR-10, CIFAR-100, DTD, Oxford 102 Flowers, Food-101, Oxford-IIIT Pets, SUN397: Used for many-shot recognition tasks to evaluate generalization.
  • COCO: Used for object detection and instance segmentation tasks.

Key Insights and Ideas

  • Semantic Similarity is Crucial: The paper strongly argues that simply pushing all non-positive instances away is suboptimal. Capturing the nuanced semantic relationships between instances leads to richer and more robust representations.
  • Soft Contrastive Learning is Powerful: Moving from hard positive/negative labels to a soft similarity distribution allows for a more flexible and informative learning signal.
  • Asymmetric Augmentations are Key for Relations: Using different augmentation strengths for the two views is essential for learning both invariant features and preserving semantic relationships. A weaker augmentation for the target distribution helps maintain these relations.
  • Sharpening is Necessary: The use of temperature parameters to sharpen the target similarity distribution is critical for filtering out noise and focusing on meaningful similarities.
  • SCE Generalizes Well: The method not only performs well on standard benchmarks but also shows impressive transferability to diverse downstream tasks like object detection and instance segmentation.

Key Results

  • ImageNet Linear Evaluation: SCE achieved 72.1% Top-1 accuracy at 100 pretraining epochs and 75.4% with multi-crop at 200 epochs, outperforming its baselines (MoCo v2, ReSSL) and being competitive with state-of-the-art methods.
  • Ablation Studies: The optimal balance between contrastive and relational aspects was found to be at $\lambda = 0.5$. Sharpening the target distribution with $T_m = 0.07$ and $T = 0.1$ was found to be effective.
  • Transfer Learning: SCE achieved Top-1 performance on 7 out of 9 many-shot recognition datasets and was competitive in low-shot learning on Pascal VOC2007.
  • Object Detection/Instance Segmentation: SCE achieved second-best results on COCO for APBox and APMask, slightly outperforming supervised training.
  • Efficiency: SCE demonstrates good performance with fewer pretraining epochs compared to many state-of-the-art methods.

Limitations and Future Work

  • Hyperparameter Sensitivity: While SCE is less sensitive to temperature parameters than ReSSL, the $\lambda$ coefficient, which balances contrastive and relational aspects, might benefit from a dynamic scheduler rather than a fixed value. The authors suggest that a scheduler for $\lambda$ that varies over time could be a future improvement.
  • Computational Cost: The multi-crop setting, while improving results, significantly increases computational time and memory requirements.
  • Finer Estimation of True Distribution: The paper proposes a simple yet effective estimation of the true similarity distribution. Future work could focus on developing more sophisticated methods for this estimation.
  • Potential for Improvement: The authors mention that while SCE is competitive, there's still room for improvement, especially at very long pretraining epochs (800+), where it falls slightly behind some top methods.

Summary updated

BibTeX
@inproceedings{denize2023similarity,
  author = {Julien Denize and Jaonary Rabarisoa and Astrid Orcesi and Romain Hérault and Stéphane Canu},
  title = {{Similarity Contrastive Estimation for Self-Supervised Soft Contrastive Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=8eHSNK5pV9},
}
Figure