arXiv reader

The Complexity of Finding Local Optima in Contrastive Learning

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

arXiv
2509.16898v1 · PDF · 21 September 2025
Categories
cs.LG, cs.CC, math.OC
Licence
CC BY 4.0 The site shows the text.

Abstract

Contrastive learning is a powerful technique for discovering meaningful data representations by optimizing objectives based on \textit{contrastive information}, often given as a set of weighted triplets \{(x_i, y_i^+, z_{i}^-)\}_{i = 1}^m indicating that an "anchor" x_i is more similar to a "positive" example y_i than to a "negative" example z_i. The goal is to find representations (e.g., embeddings in \mathbb{R}^d or a tree metric) where anchors are placed closer to positive than to negative examples. While finding \textit{global} optima of contrastive objectives is \mathsf{NP}-hard, the complexity of finding \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 \mathsf{PLS}-hardness in discrete settings (e.g., maximize satisfied triplets) and \mathsf{CLS}-hardness in continuous settings (e.g., minimize Triplet Loss), where \mathsf{PLS} (Polynomial Local Search) and \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 \mathsf{PLS}\subseteq\mathsf{P} (or \mathsf{CLS}\subseteq \mathsf{P} for continuous problems). Even in the unlikely scenario that \mathsf{PLS}\subseteq\mathsf{P} (or \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=1 (embeddings on a line).

Items 18

Theorem

Theorem (Abridged; see Theorems Theorem, Theorem, Theorem, Theorem)

MKJM

Triplet maximization problems ?, ? are \PLS-hard, i.e., every problem in \PLS efficiently reduces to them. The Triplet Loss minimization problem ? is \mathsf{CLS}-hard, i.e., every problem in \mathsf{CLS} efficiently reduces to it. As a corollary, assuming the widely-believed \mathsf{PLS}\nsubseteq\mathsf{P} and \mathsf{CLS}\nsubseteq \mathsf{P}, no polynomial time algorithm (local search or otherwise) can find a local optimum of objectives ?, ?, ?. Even if \mathsf{PLS}\subseteq\mathsf{P} or \mathsf{CLS}\subseteq \mathsf{P}, there exist instances where local search (including gradient-methods) require exponential time to reach a local optimum.

Definition

Definition 2.1 (\PLS-reduction)

BDD5

A \PLS-reduction from problem \Pi_1 to problem \Pi_2 is two polynomial-time algorithms: (i) the first algorithm A maps every instance x of \Pi_1 to an instance A(x) of \Pi_2, and (ii) the second algorithm B maps every local optimum of A(x) to a local optimum of x.

Theorem

Theorem

CZ0Y

LocalContrastive-Euclidean, even for embedding dimension d=1, is \PLS-hard.

Proof of Theorem

We present a \PLS-reduction from LocalMaxCut to LocalContrastive-Euclidean with d=1. Let G = (V, E) be an undirected graph with edge-weights w\ge0. Let W\coloneq \sum_{(u,v) \in E} w_{uv} be the total weight. Moreover, let M \coloneq W + 1 and M' \coloneq (2|V| + 1)M denote two heavy weights. For our reduction, we introduce three special vertices X, Y, Z (we use capital letters to distinguish them from the vertices of G). Eventually, the input to the LocalContrastive-Euclidean problem will be V\cup\{X,Y,Z\} together with a collection of m=|E|+2|V|+2 contrastive triplets. Our goal is to show how we can recover a locally maximum cut for G, from a locally maximum embedding of our constructed instance.

We add the following two types of contrastive triplet constraints:

Type A (Edge Constraints). For every edge (u, v) \in E with weight w_{uv}, add a single triplet constraint (u, X^+, v^-) with weight w_{uv}. This incentivizes embeddings to put u closer to X than v.

Type B (Boundary Constraints). We add the following:

  • For every vertex v \in V, add (X, Y^+, v^-) with weight M.

  • For every vertex v \in V, add (X, v^+, Z^-) with weight M.

  • Finally, add (Y, Z^+, X^-) with weight M', and (X, Y^+, Z^-) also with weight M'.

In total, this creates m=|E|+2|V|+2 contrastive triplets on V\cup\{X,Y,Z\}.

First, observe that because of the heavy constraints (X, Y^+, Z^-) and (Y, Z^+, X^-), any locally maximum embedding must satisfy those two constraints: if any of those two constraints was violated, we can always satisfy both simultaneously by moving Z and forcing either the order X < Y < Z or Z < Y < X, with distances |X - Y| \geq |Y - Z|, thus gaining at least M' while losing at most 2 |V| M + \sum_{(u,v) \in E} w_{uv} < M', which would contradict local optimality.

Next, we show that in any locally maximum embedding, all (X, Y^+, v^-) and (X, v^+, Z^-) are satisfied, meaning that each v \in V must lie on one of two line segments YZ or Y'Z', where Y' and Z' are the reflections of Y and Z with respect to X respectively (see Figure ?). Note that Y',Z' are only used for the analysis and they are not part of the reduction. If any (X, Y^+, v^-) or (X, v^+, Z^-) is violated, we can always satisfy both by moving v to segment YZ or to Y'Z', thus gaining at least M while losing at most \sum_{(u,v) \in E} w_{uv} < M = \sum_{(u,v) \in E} w_{uv} + 1.

The paper has a figure here, which this page does not show.

Finally, it is clear that (u, X^+, v^-) is satisfied if and only if u and v are placed on different sides of X. This encodes a solution to the LocalMaxCut instance, by defining one side of the cut (S,\overline{S}) to be all vertices placed in segment YZ and the other side to be the remaining vertices.

Theorem

Theorem

81OP

For every fixed dimension d\ge 1, LocalContrastive-Euclidean is \PLS-hard.

Proof (Proof of Theorem Theorem) of Theorem

We extend the reduction for LocalContrastive-Euclidean to higher dimensions by modifying the LocalBetweenness-Euclidean construction.

Recall that in the LocalBetweenness-Euclidean construction, all v \in V are forced onto two opposing rays. We can encode the same isosceles and equilateral gadgets using contrastive triplets, for example, replacing a betweenness triplet (x,y,z) with two contrastive triplets (x,y^+,z^-) and (z,y^+,x^-). We then use the same idea for the d=1 case we considered in ?, to turn the rays into segments. Let Y be a new special vertex forming a regular simplex with X_1, \dots, X_d, and Z be a new special vertex on one of the rays. We add a constraint (Y, Z^+, X_1^-) to ensure that \left\| X_1 - Y \right\|_2 \geq \left\| Y - Z \right\|_2, so YZ is the segment we “cut” on the ray.

For each v \in V, we add two constraints (X_1, Y^+, v^-) and (X_1, v^+, Z^-) to ensure that v is on YZ, or on its mirror Y'Z' with respect to the hyperplane spanned by X_1,\dots,X_d.

We can always choose a hierarchy of weights so that these newly added constraints are satisfied in any local optimum. The rest of the proof follows similarly to Theorem Theorem.

Uses Theorem
Theorem

Theorem

M9UX

For every fixed dimension d\ge 1, LocalBetweenness-Euclidean is \PLS-hard.

Used by Proof, Proof
Proof (Proof of Theorem Theorem (d=2) of Theorem

Our \PLS-reduction is from LocalMaxCut. As previously, let G = (V, E) be an undirected graph with edge-weights w\ge0. Let W\coloneq \sum_{(u,v) \in E} w_{uv}, and let M \coloneq W + 1 denote a heavy weight. For our reduction, we introduce two special vertices X_1, X_2. Our goal is to show how we can recover a locally maximum cut for G, from a locally maximum embedding of our constructed instance. We add the following two types of contrastive triplet constraints:

  • Type A (Edge Constraints). For each edge (u, v) \in E with weight w_{uv}, add a single constraint (u, X_1, v) with weight w_{uv}. Geometrically, the semantics of the triplet in LocalBetweenness-Euclidean is that the pair u,v is the farthest distance apart, i.e., the largest edge in the triangle formed by u, X_1, v is the edge (u,v).

  • Type B (Isosceles Constraints). For each v \in V, add two constraints (X_1, X_2, v) and (X_2, X_1, v), each with weight M. Intuitively, because of the heavy weight, this forces X_1, X_2, v to form an isosceles triangle, such that \| v - X_1 \|_2 = \| v - X_2 \|_2 \geq \| X_1 - X_2 \|_2, where we overload the notation v,X_1,X_2 to also denote the vertex embeddings in the 2D-plane.

    Observe that in any local optimum, all Type B constraints must be satisfied. If any Type B constraint involving v is unsatisfied, we can always satisfy it by moving v to form the corresponding isosceles triangle, thus gaining at least M while losing at most \sum w_{uv} < M, which would strictly increase the objective value. This effectively forces every vertex v to lie on one of two rays (see Figure ?).

    The paper has a figure here, which this page does not show.

    Next, we show that in any locally maximum embedding for LocalBetweenness-Euclidean, a Type A constraint (u, X_1, v) is satisfied if and only if u and v are on opposite rays. To see this, let us analyze the triangle \triangle u X_1 v:

    • If u and v are on the same ray, we have \angle u X_1 v < 30 ^\circ. Basic trigonometry tells us uv cannot be the longest side of the triangle, thus (u, X_1, v) is not satisfied.

    • If u and v are on opposite rays, we have \angle u X_1 v \geq 120 ^\circ. Basic trigonometry tells us uv must be the longest side of the triangle, thus (u, X_1, v) is satisfied.

    Therefore, the configuration of a locally maximum embedding encodes a local max cut for G. We can easily recover the cut (S,\overline{S}) by checking whether each Type A constraint (u, X_1, v) is satisfied in the configuration, e.g., S can be all vertices in one ray.

  • Theorem

    Theorem

    2T3M

    The LocalContrastive-Tree problem is \PLS-hard.

    Proof (Proof of Theorem Theorem) of Theorem

    We reduce from LocalMaxCut. For a given graph G(V, E, w), we construct the triplets over vertices V \cup \{X, X', Y, Z\}. We denote W := \sum_{(u,v) \in E} w_{uv} to be the sum of edge weights. The triplets are constructed as

    Type A triplets: XX'|Y, XX'|Z, and XX'|v for all vertex v \in V, each with weight W;

  • Type B triplets: XY|Z with a large weight nW + n + 1;

  • Type C triplets: Yv|X and Zv|X for all v \in V, each with weight W + 1;

  • Type D triplets: For every edge (u, v) \in E, we add constraints uX|v and vX|u, each with weight w_{uv}/2.

    Assume that T is a local solution of the above triplets instance. Since T is an rooted binary tree, there exists a unique path P starting from the leave node X to the root. All other leave nodes V \cup \{X', Y, Z\} would be on branches of this path P. Firstly observe that X' should share the same parent node with X. In other words, X', and only X', should be on the lowest branch on the path P. If this is not the case, X' can simply move to a location such that X and X' share the same parent and this would only increase the satisfied triplets by satisfying all triplets of Type A.

    Since in any local solution T, Type A triplets are always satisfied as argued above. For nodes Y and Z, Type B triplet XY|Z has dominating weight (the weight of XY|Z is greater than the sum of weights of other triplets that Y or Z is involved). Formally, we have

    \begin{aligned} w_{XY|Z} > \sum_{v \in V} w_{Yv|X} \quad \text{and} \quad w_{XY|Z} > \sum_{v \in V} w_{Zv|X}. \end{aligned}

    Thus any local solution T needs to satisfy Type B triplet. We note that the triplet XY|Z can only be satisfied when Y is on a lower branch of Z on the path P.

    Similarly for each vertex v \in V, it holds that

    \begin{aligned} w_{Yv|X} > \sum_{u \in \mathcal{N}(v)} \left(w_{uX|v} + w_{vX|u}\right) \end{aligned}

    where \mathcal{N}(v) denotes the set of neighbors of v. Thus in any local solution T, vertex v would try to satisfy Yv|X and Zv|X first. Since Y and Z are on different branch, only one of Yv|X and Zv|X could be satisfied in a local solution T. Notice that in order to satisfy Yv|X or Zv|X, vertex v should be on the branch of Y or the branch of Z respectively. We conclude that in a local solution T, any v \in V should be on either the branch with Y or the branch with Z.

    We proceed to show that for any pair of vertices u and v, if u and v are on the same branch (either the branch with Y or the branch with Z), then neither of vX|u or uX|v would be satisfied. If u and v are on different branches, e.g., v is on the branch of Y and u is on the branch of Z, then exactly one of vX|u or uX|v would be satisfied. Since any vertex v \in V can only reside in either the branch with Y or the branch with Z, we conclude that in any local solution T, the configuration of all vertices v will introduce a solution of \textsc{LocalMaxCut} on the original graph. That is, all vertices v \in V on the branch with Y form one side of the cut and those on the branch with Z form the other side.

  • Proof

    Proof (Proof Sketch.)

    VJX9

    We do a \PLS-reduction from LocalMaxCut. Given graph G(V, E), we construct triplets over nodes V\cup \{X, X', Y, Z\} for special nodes \{X, X', Y, Z\}. The triplets are as follows:

    • Type A triplets: XX'|Y, XX'|Z, and XX'|v for all v \in V, each with weight \sum_{e \in E}w_e

    • Type B triplets: XY|Z with a large weight |V| \cdot \sum_{e \in E}w_e + |V| + 1

    • Type C triplets: Yv|X and Zv|X for all v \in V, each with weight \sum_{e \in E}w_e + 1

    • Type D triplets: uX|v and vX|u whenever (u, v) \in E, each with weight w_{uv}/2

    The purpose of the special vertices and the constraints is that they force the tree to look as in ?: X,X' are siblings, and any other vertex v\in V is either in subtree T_Y containing Y or subtree T_Z containing Z (because of heavy Type C triplets). Then, the solution to LocalMaxCut can be formed by all nodes that fell in T_Y as one side of the cut, and to T_Z as the other side. The proof proceeds by a case analysis showing that this is indeed a local max cut, and that no vertex can increase the weight of the cut edges by moving to the other subtree (for full proof, see ?).

    Theorem

    Theorem

    BI5S

    For every dimension d\ge1, LocalTripletLoss-Euclidean is \mathsf{CLS}-hard.

    Proof (Proof Sketch) of Theorem

    We present the key idea for the case d=1 with two pivot points A = 0 and B = 1/2. The full proof is in ?. We give a \mathsf{CLS}-reduction from QuadraticProgram-KKT. The key idea is that we can use triplets of the form (x, y, z) to simulate the quadratic function. For now, imagine we had as a representation function f(\cdot) the identity function. Then, a given triplet constraint (x, y, z) with weight w will contribute the following term to the overall Triplet Loss:

    \begin{aligned} \mathcal{L}(x,y,z) = w \cdot \max\{(x - y)^2 - (x - z)^2 + \alpha, 0\} \end{aligned}

    Our proof first breaks the given quadratic program into smaller quadratics on three variables at a time:

    q(x, y, z) \coloneqq c_1 x^2 + c_2 y^2 + c_3 z^2 + c_4 xy + c_5 xz + c_6 yz + c_7 x + c_8 y + c_9 z

    We then show how to generate a set of m carefully chosen triplets \{(x_i, y_i, z_i)\}_{i=1}^m with appropriate weights w_i so that the total triplet loss \mathcal{L} is the same as the quadratic program. It is easy to see that for terms depending only on one variable such as c_1x^2 or c_8 y, we can easily generate them by using a triplet (for example, triplet (0, x, \frac{1}{2}) allows us to generate the quadratic term x^2 and triplet (y, 0, \frac{1}{2}) generates the linear term y). However, the main obstacle is that for the cross-terms like xy we need to use triplet (x,0,y), and this introduces dependencies among the different triplets since there are shared variables. To overcome the difficulty of interacting terms, we need to introduce a total of 12 contrastive triplets on x,y,z, whose corresponding weights depend on the coefficients of the given quadratic. By solving a linear system for the weights, we obtain a loss \mathcal{L}(x,y,z) that equals q(x, y, z).

    Using these ideas, we can prove hardness under the framework of contrastive learning  [schroff2015facenet], even for the case where the representation f(\cdot) is a linear model parameterized by \boldsymbol{\theta} \in [0, 1]^n such that f_{\boldsymbol{\theta} }({\bm{x}}) = \boldsymbol{\theta} ^\top {\bm{x}}. Here {\bm{x}} is the sampled input to the linear model, f({\bm{x}}) is the output of the linear model. For any input {\bm{x}}_i, denote a_i(\boldsymbol{\theta} ) = \boldsymbol{\theta} ^\top {\bm{x}}_i to be the output of the linear model. We aim to find local solutions of the triplet loss problem:

    \begin{aligned} \min_{\boldsymbol{\theta} \in [0, 1]^n} \sum_{(i, j, k)} w_{i, j, k} \max \left((a_i(\boldsymbol{\theta} ) - a_j(\boldsymbol{\theta} ))^2 - (a_i(\boldsymbol{\theta} ) - a_k(\boldsymbol{\theta} ))^2 + \alpha, 0 \right). \end{aligned}

    We set \alpha = 1 and let {\bm{x}}_i = {\bm{e}}_i to be the i^{th} standard basis, then a_i(\boldsymbol{\theta} ) = \theta_i \in [0, 1]. The result follows from the case with d = 1.

    Proof (Proof of Theorem Theorem) of Theorem

    We first study the case where the embedding dimension d = 1 with pivot points A = 0 and B = 1/2. In order to show the hardness result, we reduce QuadraticProgram-KKT problem to the local solution of \textsc{LocalTripletLoss-Euclidean}. The former has been shown to be \mathsf{CLS}-complete [fearnley2024complexity]. Formally, we consider the following optimization problem

    \begin{aligned} \min_{{\bm{x}} \in [0, 1]^n} {\bm{x}}^\top \mathbf{Q} {\bm{x}} + {\bm{b}}^\top {\bm{x}}. \end{aligned}

    To show that \textsc{QuadraticProgram-KKT} reduces to \textsc{LocalTripletLoss-Euclidean}, we consider an arbitrary quadratic function of 3 variables x, y, z \in [0, 1]

    \begin{aligned} q(x, y, z) \coloneqq c_1 x^2 + c_2 y^2 + c_3 z^2 + c_4 xy + c_5 xz + c_6 yz + c_7 x + c_8 y + c_9 z. \end{aligned}

    For a \textsc{LocalTripletLoss-Euclidean} problem with points from [0, 1], we set the margin \alpha = 1. Notice that for any triplet of points (a_i, a_j, a_k) \in [0, 1]^3, we have

    \begin{aligned} (a_i - a_j)^2 - (a_i - a_k)^2 + 1 \geq 0. \end{aligned}

    Thus for any triplet constraint (a_i, a_j, a_k) with weight w, the loss function is

    \begin{aligned} \mathcal{L} = w \left((a_i - a_j)^2 - (a_i - a_k)^2 + 1\right). \end{aligned}

    For any triplet (a_i, a_j, a_k), we denote triplet (a_i, a_k, a_j) as its dual. Notice if (a_i, a_j, a_k) has weight w and the dual triplet (a_i, a_k, a_j) has weight w', we have the following objective function

    \begin{aligned} \mathcal{L} = (w - w')\left((a_i - a_j)^2 - (a_i - a_k)^2\right) + w + w'. \end{aligned}

    Now consider a \textsc{LocalTripletLoss-Euclidean} instance on (x, y, z) \in [0, 1]^3. Triplets with weights w_i are given as

    1. Triplet t_1 = (x, 0, y) with weight w_1: \mathcal{L}_1 = w_1 \left((x - 0)^2 - (x - y)^2 + 1\right);

    2. triplet t_2 = (y, 0, x) with weight w_2: \mathcal{L}_2 = w_2 \left((y - 0)^2 - (y - x)^2 + 1\right);

    3. triplet t_3 = (x, 0, z) with weight w_3: \mathcal{L}_3 = w_3 \left((x - 0)^2 - (x - z)^2 + 1\right);

    4. triplet t_4 = (z, 0, x) with weight w_4: \mathcal{L}_4 = w_{4} \left((z - 0)^2 - (z - x)^2 + 1\right);

    5. triplet t_5 = (y, 0, z) with weight w_5: \mathcal{L}_5 = w_{5} \left((y - 0)^2 - (y - z)^2 + 1\right);

    6. triplet t_6 = (z, 0, y) with weight w_6: \mathcal{L}_6 = w_{6} \left((z - 0)^2 - (z - y)^2 + 1\right);

    7. triplet t_7 = (x, 0, \frac{1}{2}) with weight w_7: \mathcal{L}_7 = w_{7} \left(x^2 - (x - \frac{1}{2})^2 + 1\right);

    8. triplet t_8 = (y, 0, \frac{1}{2}) with weight w_8: \mathcal{L}_8 = w_{8} \left(y^2 - (y - \frac{1}{2})^2 + 1\right);

    9. triplet t_9 = (z, 0, \frac{1}{2}) with weight w_9: \mathcal{L}_9 = w_{9} \left(z^2 - (z - \frac{1}{2})^2 + 1\right);

    10. triplet t_{10} = (0, x, \frac{1}{2}) with weight w_{10}: \mathcal{L}_{10} = w_{10} \left((0 - x)^2 - \frac{1}{4} + 1\right);

    11. triplet t_{11} = (0, y, \frac{1}{2}) with weight w_{11}: \mathcal{L}_{11} = w_{11} \left((0 - y)^2 - \frac{1}{4} + 1\right);

    12. triplet t_{12} = (0, z, \frac{1}{2}) with weight w_{12}: \mathcal{L}_{12} = w_{12} \left((0 - z)^2 - \frac{1}{4} + 1\right).

    The duals of above constraints are defined similarly with weight w_i'. Summing up all the objectives we get

    \begin{aligned} \mathcal{L} & = (w_1 - w_1') \left(2xy - y^2\right) + (w_2 - w_2') \left(2xy - x^2\right) + (w_3 - w_3') \left(2xz - z^2\right) \\ & + (w_4 - w_4') \left(2xz - x^2\right) + (w_5 - w_5') \left(2yz - z^2\right) + (w_6 - w_6') \left(2yz - y^2\right)\\ & + (w_{7} - w_{7}') x + (w_{8} - w_{8}') y + (w_{9} - w_{9}') z \\ & + (w_{10} - w_{10}') x^2 + (w_{11} - w_{11}') y^2 + (w_{12} - w_{12}') z^2 + C. \end{aligned}

    We note that the last constant term C wouldn’t change the first-order stationary point of the above program. By setting

    1. w_1 - w_1' = - c_2;

    2. w_2 - w_2' = c_2 + \frac{c_4}{2};

    3. w_3 - w_3' = -c_3 - \frac{c_6}{2};

    4. w_4 - w_4' = c_3 + \frac{c_5}{2} + \frac{c_6}{2};

    5. w_5 - w_5' = \frac{c_6}{2};

    6. w_6 - w_6' = 0;

    7. w_7 - w_7' = c_7;

    8. w_8 - w_8' = c_8;

    9. w_9 - w_9' = c_9;

    10. w_{10} - w_{10}' = c_1 + c_2 + c_3 + \frac{c_4}{2} + \frac{c_5}{2} + \frac{c_6}{2};

    11. w_{11} - w_{11}' = 0;

    12. w_{12} - w_{12}' = 0,

    we have \mathcal{L} = q(x, y, z). This means that from any first-order stationary point (x^*, y^*, z^*) of the objective \mathcal{L}, we have [x^*, y^*, z^*]^\top \in [0, 1]^3 is a KKT for the quadratic program defined in (Proof).

    As shown above, \mathcal{L} has the power to represent any quadratic polynomials q(x, y, z). For the general form as in (Proof), one can group variables into groups of three (v_i, v_j ,v_k) and repeat the construction shown above. Since at most we have O(n^2) interacting terms v_iv_j where v_i and v_j are different variables, it requires O(n^2) triplets to represent the quadratic program in (Proof). From the \mathsf{CLS}-hardness of QuadraticProgram-KKT, we conclude that \textsc{LocalTripletLoss-Euclidean} with embedding dimension d = 1 is \mathsf{CLS}-hard.

    To extend above result to higher dimensions, we construct a reduction similar to the one-dimension case. Since \left\| {\bm{a}}_{i} - {\bm{a}}_{j} \right\|_2^2 = \left\| {\bm{a}}_i \right\|_2^2 + \left\| {\bm{a}}_j \right\|_2^2 - 2 {\bm{a}}_i^\top {\bm{a}}_j, by using the same constraints and coefficients as the one-dimensional case and setting \alpha = d, we can construct a quadratic program of the form

    \begin{aligned} \min_{{\bm{x}} \in [0, 1]^{dn}} {\bm{x}}^\top \mathbf{Q} {\bm{x}} + {\bm{b}}^\top {\bm{x}}. \end{aligned}

    Where \mathbf{Q} is a dn \times dn matrix with n \times n blocks, the (i, j)^{th} block is of form c_{ij} \cdot \mathbf{I}. {\bm{b}} \in \mathbb{R}^{dn} is a concatenation of n vectors ({\bm{v}}_1, \dots, {\bm{v}}_n), where each {\bm{v}}_i \in \mathbb{R}^d is of form d_i \cdot \bm{1} . Now for any first-order stationary point {\bm{a}}^* = ({\bm{a}}_1^*, {\bm{a}}_2^*, \dots, {\bm{a}}_n^*)\in [0, 1]^{dn}, we consider the first coordinate for each a_{i, 1}^* = {\bm{a}}_i^* \cdot {\bm{e}}_1, one can verify that {\bm{a}}_1^* = (a^*_{1, 1}, \dots, a^*_{n, 1}) \in [0, 1]^d forms a KKT point of the following program

    \begin{aligned} \min_{{\bm{x}} \in [0, 1]^n} {\bm{x}}^\top \mathbf{C} {\bm{x}} + {\bm{d}}^\top {\bm{x}}. \end{aligned}

    Where \mathbf{C} \in \mathbb{R}^{n \times n} and c_{ij} is the coefficient for the (i, j)^{th} block of \mathbf{Q} defined in (?) and d_i is the coefficient of the i^{th} vector of {\bm{b}} in (?). From the \mathsf{CLS}-hardness of QuadraticProgram-KKT, we conclude that \textsc{LocalTripletLoss-Euclidean} is \mathsf{CLS}-hard.

    Theorem

    Theorem (Theorem Theorem, restated)

    0LCG

    For every fixed dimension d\ge 1, LocalBetweenness-Euclidean is \PLS-hard.

    Proof of Theorem

    We reduce from LocalMaxCut. Let G = (V, E, w) be a weighted undirected graph.

    Reduction Construction. We define an instance of LocalBetweenness-Euclidean in \mathbb{R}^d called \ensuremath{\mathcal{I}}_{btw} as follows. We introduce special vertices X_1,\dots,X_d and choose a hierarchy of weights

    M_3 > M_4 > \cdots > M_d > M > \sum_{(u,v) \in E} w_{uv},

    such that for each k\ge3,

    M_k > \underbrace{\sum_{j>k} \; 3 \tbinom{j-1}{2} M_j}_{\text{lower layer Type C constraints}} + \underbrace{2 |V| \tbinom{d}{2} M}_{\text{all Type B constraints}} + \underbrace{\sum_{(u,v) \in E} w_{uv}}_{\text{all Type A constraints}}.

    Now add constraints as follows:

    Type A (Edge Constraints). For each edge (u, v) \in E with weight w_{uv}, add a single constraint (u, X_1, v) with weight w_{uv}.

    Type B (Isosceles Constraints). For each v \in V and every pair (X_k, X_\ell) with 1 \leq k < \ell \leq d, add two constraints (X_k, X_\ell, v) and (X_\ell, X_k, v), each with weight M. Intuitively, this will force X_k, X_\ell, v to form an isosceles triangle such that \left\| v - X_k \right\|_2 = \left\| v - X_\ell \right\|_2 \geq \left\| X_k - X_\ell \right\|_2.

    Type C (Equilateral Constraints). For every triple (X_j, X_k, X_\ell) with 1 \leq j < k < \ell \leq d, we add three constraints (X_j, X_k, X_\ell), (X_k, X_\ell, X_j), (X_\ell, X_j, X_k), each with weight M_\ell (\ell is the largest index among j,k,\ell). Intuitively, this will force X_j, X_k, X_\ell to form an equilateral triangle.

    Lemma.

    In any local optimum of \ensuremath{\mathcal{I}}_{btw}, all Type C constraints are satisfied, therefore X_1, \dots, X_d form a (d-1)-dimensional regular simplex.(In geometry, a regular simplex is the d-dimensional generalization of an equilateral triangle (2-simplex) or a regular tetrahedron (3-simplex), consisting of d+1 points with all pairwise distances equal.)

    Proof (Proof of ?).

    We prove \{X_1,\dots,X_k\} form a regular simplex for each k=3,\dots,d. We do this by induction on k.

    Base Case (k=3). If any Type C constraint over \{X_1,X_2,X_3\} is unsatisfied, moving any of them to form an equilateral triangle with the other two will satisfy at least one new constraint of weight M_3, while losing at most \sum_{j>3} \; 3 \tbinom{j-1}{2} M_j + 2 |V| \tbinom{d}{2} M + \sum_{(u,v) \in E} w_{uv} < M_3, which contradicts local optimality.

    Inductive Step. Suppose \{X_1,\dots,X_{k-1}\} form a regular simplex but \{X_1,\dots,X_k\} do not. Similar to the above, moving X_k to form a regular simplex with \{X_1,\dots,X_{k-1}\} will satisfy at least one new constraint of weight M_k, while losing a total strictly less than M_k. Hence, \{X_1,\dots,X_k\} must also form a regular simplex.

    Lemma.

    Let C be the centroid of the simplex X_1,\dots,X_d and \ell = \left\| X_1 - X_2 \right\|_2 be its edge length. Then in any local optimum, all Type B constraints are satisfied, therefore each v \in V must lie on the line through C perpendicular to the hyperplane spanned by the X_i , and moreover at distance at least \ell from every X_i. Formally, each v \in V lies on one of two opposing rays:

    R^+ = \bigl\{\, C + t \, \mathbf{u} : t \ge t_0 \bigr\}, \quad R^- = \bigl\{\, C - t \, \mathbf{u} : t \ge t_0 \bigr\},

    where \mathbf{u} is the unit vector along that line and t_0 = \ell \cdot \sqrt{\frac{d+1}{2d}}.

    Proof (Proof of ?).

    Without loss of generality, assume the simplex is in the standard position:

    X_1 = (1, 0, \ldots, 0), X_2 = (0, 1, \ldots, 0), \ldots, X_d = (0, 0, \ldots, 1)

    with centroid C = \left(\frac{1}{d}, \frac{1}{d}, \ldots, \frac{1}{d}\right). The edge length is \ell = \sqrt{2}.

    We denote the i-th coordinate of v as v_i. The equidistant condition \left\| v - X_k \right\|_2 = \left\| v - X_\ell \right\|_2 simplifies to:

    v_i^2 - 2v_i = v_j^2 - 2v_j \quad \forall i \neq j.

    The only solutions are v = (\alpha, \alpha, \ldots, \alpha) for some \alpha \in \mathbb{R}.

    For v = \alpha \mathbf{1}, the distance to any vertex X_k is:

    \left\| v - X_k \right\|_2^2 = (\alpha - 1)^2 + (d-1)\alpha^2 = d\alpha^2 - 2\alpha + 1 \geq \ell^2 = 2.

    Solving d\alpha^2 - 2\alpha + 1 \geq 2 gives:

    \alpha \leq \frac{1 - \sqrt{d+1}}{d} \quad \text{or} \quad \alpha \geq \frac{1 + \sqrt{d+1}}{d}.

    Expressing v relative to the centroid C = \frac{1}{d}\mathbf{1}:

    v = C + t \, \mathbf{u}, \quad \mathbf{u} = \mathbf{1}/\sqrt{d}, \quad t = \sqrt{d}\left(\alpha - \frac{1}{d}\right).

    Substituting the bounds for \alpha yields t \leq -\sqrt{\frac{d+1}{d}} or t \geq \sqrt{\frac{d+1}{d}}.

    For arbitrary \ell > 0, scale the canonical simplex by \lambda = \ell/\sqrt{2}. The threshold t_0 scales as:

    t_0 = \lambda \sqrt{\frac{d+1}{d}} = \ell \sqrt{\frac{d+1}{2d}}.

    The standard basis assumption is justified because any regular simplex can be mapped to this form via a similarity transformation, which preserves the distance relationships.

    Since M > \sum_{(u,v) \in E} w_{uv}, any configuration of v that violates the Type B constraints can be improved by moving v to either R^+ or R^-.

    Lemma.

    In any local optimum, the edge constraint (u, X_1, v) is satisfied if and only if u and v lie on opposite rays R^+ and R^-.

    Proof (Proof of ?).

    Let u = C + t_i\mathbf{u} and v = C + t_j\mathbf{u}. Since u, v lie on the line through C perpendicular to the hyperplane spanned by the X_i, we have

    \begin{aligned} \left\| u - X_1 \right\|_2 &= \sqrt{t_i^2 + \left\| X_1 - C \right\|_2^2}, \\ \left\| v - X_1 \right\|_2 &= \sqrt{t_j^2 + \left\| X_1 - C \right\|_2^2}. \end{aligned}

    We can also verify that \left\| X_1 - C \right\|_2 = \ell \sqrt{\frac{d-1}{2d}}.

    Case 1: If u and v are on the same ray (e.g., R^+), then:

    \left\| u - v \right\|_2 = |t_i - t_j| \leq \max(t_i, t_j) < \max(\left\| u - X_1 \right\|_2, \left\| v - X_1 \right\|_2).

    Thus (u, X_1, v) is not satisfied.

    Case 2: If u and v are on opposite rays R^+ and R^-, then:

    \begin{aligned} \left\| u - X_1 \right\|_2 &= \sqrt{t_i^2 + \left\| X_1 - C \right\|_2^2} = \sqrt{t_i^2 + \frac{(d-1)\ell^2}{2d}}, \\ \left\| v - X_1 \right\|_2 &= \sqrt{t_j^2 + \left\| X_1 - C \right\|_2^2} = \sqrt{t_j^2 + \frac{(d-1)\ell^2}{2d}}, \\ \left\| u - v \right\|_2 &= |t_i| + |t_j|. \end{aligned}

    We need to show that \left\| u - v \right\|_2 \geq \max(\left\| u - X_1 \right\|_2, \left\| v - X_1 \right\|_2).

    To show \left\| u - v \right\|_2 \geq \left\| u - X_1 \right\|_2, we need (|t_i| + |t_j|)^2 \geq t_i^2 + \frac{(d-1)\ell^2}{2d}. Expanding:

    t_i^2 + 2 |t_i t_j| + t_j^2 \geq t_i^2 + \frac{(d-1)\ell^2}{2d} \implies 2 |t_i t_j| + t_j^2 \geq \frac{(d-1)\ell^2}{2d}.

    Since |t_i|, |t_j| \geq t_0, substitute |t_i| = |t_j| = t_0 (worst case for the inequality):

    2t_0^2 + t_0^2 = 3t_0^2 \geq \frac{(d-1)\ell^2}{2d}.

    Substitute t_0 = \ell \sqrt{\frac{d+1}{2d}}:

    3 \cdot \frac{(d+1)\ell^2}{2d} \geq \frac{(d-1)\ell^2}{2d} \implies 3(d+1) \geq d-1.

    This holds for all d \geq 2.

    Symmetrically we can show \left\| u - v \right\|_2 \geq \left\| v - X_1 \right\|_2. Thus (u, X_1, v) is satisfied.

    Special Case d=1. We note that in the case of d=1, this construction degenerates into only one special vertex X_1, with only edge constraints. We claim that this construction is still correct, as the vertices on different sides of X_1 encode a cut. Since “no local moves can improve the objective function” is a stronger condition than “no local moves of vertices except X_1 can improve the objective function”, any local optimum of \ensuremath{\mathcal{I}}_{btw} is also a local max cut.

    This concludes the proof of Theorem Theorem.

    Uses Theorem
    Theorem

    Theorem

    S5ZB

    \textsc{LocalNonBetweenness-Euclidean} for embedding dimension d = 1 is \PLS-hard.

    Proof of Theorem

    We give a polynomial time reduction from LocalMaxCut to LocalNonBetweenness-Euclidean with d = 1. Given an undirected graph G = (V, E) with edge-weights w\ge0. Denote W\coloneq \sum_{(u,v) \in E} w_{uv} to be the sum of all edge weights. We introduce two special vertices X and Y and the input to the LocalNonBetweenness-Euclidean will be vertices from V \cup \{X, Y\} with |V| + 2|E| non-betweenness triplets. The triplets can be classified into two types

    Type A triplets. For every vertex v \in V, we add triplet (X, v, Y) with weight W.

    Type B triplets. For every edge (u, v) \in E, we add triplets (u, v, X) and (v, u, X) with weight w_{uv}.

    We now argue that in any local optimal embedding over \mathbb{R}, there must be no point between X and Y. To see this, given an embedding where vertex v is in between X and Y, the corresponding triplet (X, v, Y) is not satisfied. By moving Y to the location such that there is no point between X and Y (X and Y are next to each other), triplet (X, v, Y) becomes satisfied and all previous satisfied triplets remain unchanged. Thus one can simply change the location of Y and increase the sum of weighted satisfied triplets.

    We proceed to analyze Type B triplets. For any edge (u, v) \in E, we have the following three cases.

    Case 1 Vertices u and v are to the left of X, that is, u and v are both smaller than X. Without loss of generality, we assume that u < v. Notice that in this case v is in between u and X. Thus triplet (v, u, X) is satisfied but (u, v, X) is not satisfied.

    Case 2 Both u and v are greater than X. Assume that u < v, it follows that triplet (u, v, X) is satisfied but (v, u, X) is not satisfied.

    Case 3 Vertices u and v are on different side of X. In this case it holds that

    \begin{aligned} |u - X| \leq |u - v|, \quad \text{and} \quad |v - X| \leq |u - v|. \end{aligned}

    Thus both triplets (u, v, X) and (v, u ,X) are satisfied.

    We conclude that for any edge (u, v) \in E, if vertices u and v are on the same side of X (either to the left or to the right), then one of triplets (u, v, X) or (v, u ,X) would be satisfied. If u and v are on different side of X, both (u, v, X) and (v, u ,X) would be satisfied. Thus type B triplets essentially induce a cut over the original graph G–any vertex v to the left of X is on one side of the cut and vertices to the right of X is on the other side of the cut. Any local optimal embedding over the above LocalNonBetweenness-Euclidean instance with total weight W' would induce a LocalMaxCut over G with weight W' - (|V| + 1)W.

    Source and licence

    The text on this page is from arXiv:2509.16898v1 by Jingming Yan, Yiyuan Luo, Vaggos Chatziafratis, Ioannis Panageas, Parnian Shahkar and Stelios Stavroulakis, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

    The record of each item is in analysis/objects/2509/2509.16898.jsonl.