Lune

ICLR2025Top-tier venue

X-Sample Contrastive Loss: Improving Contrastive Learning with Sample Similarity Graphs

Vlad Sobal, Mark Ibrahim, Randall Balestriero, Vivien Cabannes, Diane Bouchacourt, Pietro Astolfi, Kyunghyun Cho, Yann LeCun

Abstract

Learning good representations involves capturing the diverse ways in which data samples relate. Contrastive loss-an objective matching related samples-underlies methods from self-supervised to multimodal learning. Contrastive losses, however, can be viewed more broadly as modifying a similarity graph to indicate how samples should relate in the embedding space. This view reveals a shortcoming in contrastive learning: the similarity graph is binary, as only one sample is the related positive sample. Crucially, similarities across samples are ignored. Based on this observation, we revise the standard contrastive loss to explicitly encode how a sample relates to others. We experiment with this new objective, called X-Sample Contrastive, to train vision models based on similarities in class or text caption descriptions. Our study spans three scales: ImageNet-1k with 1 million, CC3M with 3 million, and CC12M with 12 million samples. The representations learned via our objective outperform both contrastive self-supervised and visionlanguage models trained on the same data across a range of tasks. When training on CC12M, we outperform CLIP by 0.6% on both ImageNet and ImageNet Real. Our objective appears to work particularly well in lower-data regimes, with gains over CLIP of 17.2% on ImageNet and 18.0% on ImageNet Real when training with CC3M. Finally, our objective encourages the model to learn representations that separate objects from their attributes and backgrounds, with gains of 3.3-5.6% over CLIP on ImageNet9. The proposed method takes a step towards developing richer learning objectives for understanding sample relations in foundation models.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Unsupervised Learning of Visual Features by Contrasting Cluster Assignments cites A Simple Framework for Contrastive Learning of Visual Representations
  • Unsupervised Learning of Visual Features by Contrasting Cluster Assignments cites Supervised Contrastive Learning
  • ProMax: Exploring the Potential of LLM-derived Profiles with Distribution Shaping for Recommender Systems cites Learning Transferable Visual Models From Natural Language Supervision
  • Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • Supervised Contrastive Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • EMBridge: Enhancing Gesture Generalization from EMG Signals Through Cross-modal Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • EMBridge: Enhancing Gesture Generalization from EMG Signals Through Cross-modal Representation Learning cites Learning Transferable Visual Models From Natural Language Supervision
  • Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • Learning Transferable Visual Models From Natural Language Supervision cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
  • I-Con: A Unifying Framework for Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • I-Con: A Unifying Framework for Representation Learning cites Supervised Contrastive Learning
  • I-Con: A Unifying Framework for Representation Learning cites Learning Transferable Visual Models From Natural Language Supervision
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. ProMax: Exploring the Potential of LLM-derived Profiles with Distribution Shaping for Recommender SystemsYi Zhang, Yiwen Zhang, Kai Zheng, Tong Chen et al.SIGIR 2026
  2. EMBridge: Enhancing Gesture Generalization from EMG Signals Through Cross-modal Representation LearningWenhui Cui, Christopher Michael Sandino, Hadi Pouransari, Ran Liu et al.ICLR 2026
  3. I-Con: A Unifying Framework for Representation LearningShaden Naif Alshammari, John R. Hershey, Axel Feldmann, William T. Freeman et al.ICLR 2025

Builds on24

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
  4. Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
  5. Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations

Related papers

  1. Non-Contrastive Learning Meets Language-Image Pre-TrainingJinghao Zhou, Li Dong, Zhe Gan, Lijuan Wang et al.CVPR 2023
  2. Learning Visual Representations via Language-Guided SamplingMohamed El Banani, Karan Desai, Justin JohnsonCVPR 2023
  3. Teaching CLIP to Count to TenRoni Paiss, Ariel Ephrat, Omer Tov, Shiran Zada et al.ICCV 2023 · 196 citations
  4. RankCLIP: Ranking-Consistent Language-Image PretrainingYiming Zhang, Zhuokai Zhao, Zhaorun Chen, Zhili Feng et al.ICCV 2025 · 1 citation
  5. Contrasting with Symile: Simple Model-Agnostic Representation Learning for Unlimited ModalitiesAdriel Saporta, Aahlad Manas Puli, Mark Goldstein, Rajesh RanganathNeurIPS 2024 · 28 citations
Dusk over the sea between two cliffs drawn in fine vertical lines