Lune

NeurIPS2025Top-tier venue

The Complexity of Finding Local Optima in Contrastive Learning

Jingming Yan, Yiyuan Luo, Vaggos Chatziafratis, Ioannis Panageas, Parnian Shahkar, Stelios Stavroulakis

Abstract

Contrastive learning is a powerful technique for discovering meaningful data representations by optimizing objectives based on contrastive information\textit{contrastive information}, often given as a set of weighted triplets {(xi,yi+,zi−)}i=1m\{(x_i, y_i^+, z_{i}^-)\}_{i = 1}^m indicating that an"anchor"xix_i is more similar to a"positive"example yiy_i than to a"negative"example ziz_i. The goal is to find representations (e.g., embeddings in Rd\mathbb{R}^d or a tree metric) where anchors are placed closer to positive than to negative examples. While finding global\textit{global} optima of contrastive objectives is NP\mathsf{NP}-hard, the complexity of finding local\textit{local} optima -- representations that do not improve by local search algorithms such as gradient-based methods -- remains open. Our work settles the complexity of finding local optima in various contrastive learning problems by proving PLS\mathsf{PLS}-hardness in discrete settings (e.g., maximize satisfied triplets) and CLS\mathsf{CLS}-hardness in continuous settings (e.g., minimize Triplet Loss), where PLS\mathsf{PLS} (Polynomial Local Search) and CLS\mathsf{CLS} (Continuous Local Search) are well-studied complexity classes capturing local search dynamics in discrete and continuous optimization, respectively. Our results imply that no polynomial time algorithm (local search or otherwise) can find a local optimum for various contrastive learning problems, unless PLS⊆P\mathsf{PLS}\subseteq\mathsf{P} (or CLS⊆P\mathsf{CLS}\subseteq \mathsf{P} for continuous problems). Even in the unlikely scenario that PLS⊆P\mathsf{PLS}\subseteq\mathsf{P} (or CLS⊆P\mathsf{CLS}\subseteq \mathsf{P}), our reductions imply that there exist instances where local search algorithms need exponential time to reach a local optimum, even for d=1d=1 (embeddings on a line).

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Contrastive Learning with Hard Negative Samples cites Hard Negative Mixing for Contrastive Learning
  • Do More Negative Samples Necessarily Hurt In Contrastive Learning? cites Understanding Contrastive Learning Requires Incorporating Inductive Biases
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on15

  1. Contrastive Learning with Hard Negative SamplesJoshua David Robinson, Ching-Yao Chuang, Suvrit Sra, Stefanie JegelkaICLR 2021 · 999 citations
  2. Hard Negative Mixing for Contrastive LearningYannis Kalantidis, Mert Bülent Sariyildiz, Noé Pion, Philippe Weinzaepfel et al.NeurIPS 2020 · 805 citations
  3. Understanding Contrastive Learning Requires Incorporating Inductive BiasesNikunj Saunshi, Jordan T. Ash, Surbhi Goel, Dipendra Misra et al.ICML 2022 · 130 citations
  4. From Trees to Continuous Embeddings and Back: Hyperbolic Hierarchical ClusteringInes Chami, Albert Gu, Vaggos Chatziafratis, Christopher RéNeurIPS 2020 · 125 citations
  5. Do More Negative Samples Necessarily Hurt In Contrastive Learning?Pranjal Awasthi, Nishanth Dikkala, Pritish KamathICML 2022 · 57 citations

Related papers

  1. Provable Accuracy Collapse of Embedding-Based Representations under Dimensionality MismatchDionysis Arvanitakis, Vaggos Chatziafratis, Yiyuan LuoICML 2026
  2. Neighborhood Contrastive Learning for Novel Class DiscoveryZhun Zhong, Enrico Fini, Subhankar Roy, Zhiming Luo et al.CVPR 2021
  3. Finding One Local Optimum Is Easy - but What About Two?Yasuaki Kobayashi, Kazuhiro Kurita, Yutaro YamaguchiAAAI 2026
  4. Global Selection of Contrastive Batches via Optimization on Sample PermutationsVin Sachidananda, Ziyi Yang, Chenguang ZhuICML 2023 · 6 citations
  5. Contrastive Learning with Adversarial ExamplesChih-Hui Ho, Nuno VasconcelosNeurIPS 2020 · 174 citations
Dusk over the sea between two cliffs drawn in fine vertical lines