vix.ing · top · new · best · stats · spec

The Complexity of Finding Local Optima in Contrastive Learning

2025/09/21 by Yiyuan Luo, Yan, Jingming, Luo, Yiyuan +8
Computer Science · Psychology · #Computational Complexity (cs.CC) #FOS: Computer and information sciences #FOS: Mathematics #Face and Expression Recognition #Learning Styles and Cognitive Differences #Machine Learning (cs.LG) #Metaheuristic Optimization Algorithms Research #Optimization and Control (math.OC)

paper · pdf · doi:10.48550/arxiv.2509.16898

openalex publication_date 2025/09/21 · openalex created_date 2025/10/16 · openalex updated_date 2026/07/28

Abstract

Contrastive learning is a powerful technique for discovering meaningful data representations by optimizing objectives based on contrastive information, often given as a set of weighted triplets \(xi, yi+, zi-)\i = 1m indicating that an "anchor" xi is more similar to a "positive" example yi than to a "negative" example zi. The goal is to find representations (e.g., embeddings in ℝd or a tree metric) where anchors are placed closer to positive than to negative examples. While finding global optima of contrastive objectives is NP-hard, the complexity of finding 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-hardness in discrete settings (e.g., maximize satisfied triplets) and CLS-hardness in continuous settings (e.g., minimize Triplet Loss), where PLS (Polynomial Local Search) and 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\subseteqP (or CLS⊆ P for continuous problems). Even in the unlikely scenario that PLS\subseteqP (or CLS⊆ P), our reductions imply that there exist instances where local search algorithms need exponential time to reach a local optimum, even for d=1 (embeddings on a line).

Citations

Related