Alphabeta Math
Pipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Nearest neighbors and learned metrics

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicableOpen item page →

Mahalanobis pseudometric induced by a positive-semidefinite matrix

Definition

Fix an integer d≥1. A real matrix M∈Rd×d is positive semidefinite, written M⪰0, when it is symmetric and vTMv≥0 for every v∈Rd. For x,x′∈Rd, define the squared Mahalanobis distance and its nonnegative square root by

qM(x,x′):=(x−x′)TM(x−x′),dM(x,x′):=qM(x,x′).

The square root is defined because qM(x,x′)≥0. A pseudometric is a nonnegative symmetric function that vanishes on the diagonal and satisfies the triangle inequality, but may assign distance zero to distinct points. The function dM is called the Mahalanobis pseudometric associated with M; qM=dM2 is its squared-distance form. The theorem on this page proves the pseudometric properties and the equivalent linear-feature representation.

LemmaStatement: AI-adaptedProof: AI-adaptedOpen item page →

Symmetric matrices are Euclidean under the Frobenius norm

Statement

Let d≥1, let Sd be the real vector space of symmetric d×d matrices, and set m=d(d+1)/2. Use one-based entry labels Aij:=A(i−1,j−1) for 1≤i,j≤d, and likewise for every matrix below. Equip Sd with the Frobenius inner product ⟨A,B⟩F:=∑i=1d∑j=1dAijBij and its induced norm. Define svec⁡:Sd→Rm by listing A11,…,Add first, followed by 2Aij for 1≤i<j≤d in lexicographic order. Then svec⁡ is a linear bijection and preserves inner products and norms; in particular, ∥svec⁡(A)−svec⁡(B)∥2=∥A−B∥F for all A,B∈Sd.

Facts & Assumptions

Given: An integer d≥1, symmetric real matrices A,B∈Sd, and m=d(d+1)/2.

[F1]

For a real matrix, the squared Frobenius norm is the sum of the squares of all entries (The Frobenius norm ∥A∥F=(∑i,j∣aij∣2)1/2 on real or complex matrices). Under the stated entry labels, substituting i=r+1, j=s+1 gives ∑r<d∑s<dA(r,s)2=∑i=1d∑j=1dAij2; in particular, when d=1, A11=A(0,0).

[F2]

The Euclidean inner product on Rm is the coordinate dot product, with norm the square root of the sum of coordinate squares (The Euclidean inner product ⟨x,y⟩=∑k<nxkyk on Rn).

[F3]

Every nonnegative real number has a unique nonnegative square root, so 2>0 and division by 2 is defined (Square roots exist: a unique a≥0 with (a)2=a; the positives are {x2:x≠0}).

Proof

1.1givenF3algebra

The coordinate list has d+d(d−1)/2=m entries. Its first d entries recover each diagonal entry of A, and each later entry recovers the corresponding symmetric pair by division by 2 from [F3]. Thus it has a unique inverse on Rm; its coordinate formulas are linear, so svec⁡ is a linear bijection.

1.2F2givenalgebra

For A,B∈Sd, the Euclidean dot product of their coordinate lists is ∑iAiiBii+2∑i<jAijBij, because each off-diagonal coordinate contributes (2Aij)(2Bij). Symmetry gives ⟨A,B⟩F=∑iAiiBii+∑i<j(AijBij+AjiBji), which is the same expression. Hence ⟨svec⁡(A),svec⁡(B)⟩2=⟨A,B⟩F.

2.1step 1.2F1F2F3algebra∎

Linearity gives svec⁡(A)−svec⁡(B)=svec⁡(A−B). Applying step 1.2 to A−B with itself and taking the unique nonnegative square roots from [F1]–[F3] yields ∥svec⁡(A)−svec⁡(B)∥2=∥A−B∥F. This proves norm preservation.

TheoremStatement: AI-adaptedProof: AI-adaptedOpen item page →

Frobenius projection onto the positive-semidefinite cone is spectral clipping

Statement

Let d≥1 and let A∈Rd×d be symmetric. There exists an orthogonal eigendecomposition A=Udiag⁡(λ1,…,λd)UT. For any such decomposition define λi+=max⁡{λi,0} and A+=Udiag⁡(λ1+,…,λd+)UT. Let S+d be the set of real symmetric matrices Z with vTZv≥0 for every v∈Rd, and let ∥B∥F=(∑i,jBij2)1/2. Then A+ is the unique minimizer of ∥A−Z∥F over Z∈S+d, so its value is independent of the chosen orthogonal eigendecomposition.

Facts & Assumptions

Given: A real symmetric matrix A∈Rd×d, d≥1, and its orthogonal eigendecomposition from the Statement.

[F1]

Every self-adjoint endomorphism of a finite-dimensional real inner-product space has an orthonormal eigenbasis (Real spectral theorem: a self-adjoint endomorphism of a finite-dimensional real inner product space has an orthonormal eigenbasis).

[F3]

For a finite-dimensional real inner-product space, a self-adjoint operator is nonnegative exactly when its associated symmetric form is positive semidefinite (Over the reals, non-negative and positive operators correspond exactly to positive semidefinite and positive definite symmetric forms).

[F5]

The squared Frobenius norm is the sum of the squares of all matrix entries (The Frobenius norm ∥A∥F=(∑i,j∣aij∣2)1/2 on real or complex matrices).

Proof

1.1F1F2F3given

By [F1], choose an orthogonal eigendecomposition of A and define A+ as in the Statement. It is symmetric and has eigenvalues λi+≥0. By [F2] its associated operator is nonnegative, and by [F3] its quadratic form is positive semidefinite; hence A+∈S+d.

1.2F4given

Let Z∈S+d and set W=UTZU. For each coordinate vector ei, Wii=eiTWei=(Uei)TZ(Uei)≥0; also W is symmetric. Orthogonal invariance [F4] gives ∥A−Z∥F2=∥diag⁡(λ1,…,λd)−W∥F2.

2.1step 1.2F5algebra

Expanding the entry sum [F5], the last square is ∑i(λi−Wii)2+∑i≠jWij2. For every w≥0, (λi−w)2≥(λi−λi+)2: if λi≥0 the right side is zero and equality is attained only at w=λi, while if λi<0 then w−λi≥−λi and equality is attained only at w=0. Thus every feasible Z has squared distance at least ∑i(λi−λi+)2.

3.1step 2.1givenalgebra

For Z=A+ the conjugated matrix W is diag⁡(λ1+,…,λd+), so all off-diagonal terms vanish and every diagonal term attains its lower bound from step 2.1. Hence A+ is a minimizer.

4.1step 2.1step 3.1algebra∎

Equality in the lower bound requires every off-diagonal square in step 2.1 to vanish and every diagonal term to attain its unique scalar minimum. Therefore W=diag⁡(λ1+,…,λd+) and Z=UWUT=A+. The minimizer is unique; since the argument applies to any orthogonal eigendecomposition, every allowed decomposition gives this same nearest matrix.

Remarks

The proof above is choice-free: it constructs the unique minimizer from a finite orthogonal eigendecomposition and checks the objective directly. The separate abstract Hilbert-projection route used in the LMNN procedure is recorded under its own Countable Choice assumption.

LemmaStatement: AI-adaptedProof: AI-adaptedOpen item page →

The real positive-semidefinite cone is closed in the Frobenius metric

Statement

For an integer d≥1, let Sd be the real symmetric d×d matrices and let S+d={M∈Sd:vTMv≥0 for every v∈Rd}. With the Frobenius norm ∥A∥F=(∑i,jAij2)1/2, the set S+d is closed in Sd.

Facts & Assumptions

Given: An integer d≥1 and the real vector space Sd with the Frobenius metric.

[F3]

A set is closed when its complement is open, and an open set contains a positive-radius ball around each of its points (The metric topology: a set is open when every one of its points has a ball around it inside the set; closed means open complement, Open ball, closed ball and sphere in a metric space).

Proof

1.1givenchoose

Let A∈Sd∖S+d. By the definition of S+d, there is v∈Rd with vTAv<0; necessarily v≠0. Set ρ=−vTAv/(2∥v∥22)>0.

2.1step 1.1F1F2F4algebra

For any Z∈Sd with ∥Z−A∥F<ρ, the entry norm [F1], entry inner product, and Cauchy–Schwarz [F2] give ∣vT(Z−A)v∣=∣⟨Z−A,vvT⟩F∣≤∥Z−A∥F∥vvT∥F<ρ∥v∥22=−12vTAv. Hence vTZv<vTAv−12vTAv=12vTAv<0, so Z∉S+d.

3.1step 1.1step 2.1F3F4∎

Step 2.1 shows that the open ball BF(A,ρ) in the metric dF is contained in the complement of S+d. Since A was arbitrary in that complement, every point of it has an open ball contained in it; the complement is open by [F3], and therefore S+d is closed.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Finite-sample k-nearest-neighbor classifier with fixed tie-breaking

Definition

Let d,n,C be positive integers, let (xi,yi)i=1n be a finite labeled sample with xi∈Rd and yi∈{1,…,C}, let M∈Rd×d be symmetric with vTMv≥0 for every v∈Rd, let 1≤k≤n, and let x∈Rd be a query. For each sample index set δi=(x−xi)TM(x−xi). Order indices i by increasing pairs (δi,i) in lexicographic order, and let Kk(x) be the first k indices in this order. For each class c∈{1,…,C} compute vc(x)=∑i∈Kk(x)1{yi=c} and return the smallest class label attaining max⁡1≤c≤Cvc(x). Thus equal distances are resolved by the fixed sample-index order, and equal class votes by the smallest class label.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Fixed-target large-margin nearest-neighbor objective

Definition

Fix positive integers d,n,C, a finite labeled sample (xi,yi)i=1n with xi∈Rd and yi∈{1,…,C}, and a weight μ∈[0,1]. For each i, fix in advance an integer ki with 0≤ki≤∣{j≠i:yj=yi}∣ and a fixed target-neighbor set Ni⊆{j≠i:yj=yi} with ∣Ni∣=ki. These target sets do not change with the matrix being optimized. Let S+d denote the real symmetric matrices M satisfying vTMv≥0 for all v∈Rd, and put qM(x,x′)=(x−x′)TM(x−x′). For a real number z, let [z]+=max⁡{z,0}. For M∈S+d, define

ϵpull(M)=∑i=1n∑j∈NiqM(xi,xj),ϵpush(M)=∑i=1n∑j∈Ni∑1≤l≤nyl≠yi[1+qM(xi,xj)−qM(xi,xl)]+,

and Fμ(M)=(1−μ)ϵpull(M)+μϵpush(M). This is the fixed-target LMNN training surrogate; it is not a test-error or calibrated/generalization-risk quantity. The quantity qM is a squared distance, while its square root is the Mahalanobis pseudometric.

TheoremStatement: AI-adaptedProof: AI-adaptedOpen item page →

The Mahalanobis distance is a pseudometric and comes from a linear feature map

Statement

Let d≥1 and let M∈Rd×d be real symmetric and positive semidefinite, meaning vTMv≥0 for every v∈Rd. Define qM(x,x′)=(x−x′)TM(x−x′) and dM(x,x′)=qM(x,x′). Then there is a real matrix L∈Rd×d with M=LTL and, for all x,x′∈Rd, dM(x,x′)=∥Lx−Lx′∥2. Consequently dM is nonnegative, symmetric, zero on the diagonal, and satisfies the triangle inequality, without asserting separation of distinct points.

Facts & Assumptions

Given: An integer d≥1, a real symmetric positive-semidefinite matrix M∈Rd×d, and x,x′∈Rd.

[F1]

For a finite-dimensional real inner-product space, a symmetric bilinear form is positive semidefinite exactly when its associated self-adjoint operator is nonnegative (Over the reals, non-negative and positive operators correspond exactly to positive semidefinite and positive definite symmetric forms).

[F2]

Every nonnegative endomorphism of a finite-dimensional real inner-product space has the form S∗S for a linear endomorphism S (A non-negative operator is equivalently self-adjoint with nonnegative eigenvalues, a positive semidefinite matrix in an orthonormal basis, or an operator of the form S^*S).

[F3]

The Euclidean inner product is ⟨u,v⟩=∑j=1dujvj and its induced norm satisfies ∥u∥22=⟨u,u⟩ (The Euclidean inner product ⟨x,y⟩=∑k<nxkyk on Rn).

Proof

1.1givenF1

Regard M as the matrix of an endomorphism TM:Rd→Rd, TMv=Mv. The associated symmetric bilinear form is (u,v)↦uTMv, so its positive-semidefinite hypothesis and [F1] imply that TM is nonnegative.

2.1step 1.1F2algebra

By [F2], there is an endomorphism S with TM=S∗S. Let L be its real matrix in the standard basis; the Euclidean adjoint has matrix LT, hence M=LTL.

3.1step 2.1F3F5algebra

For h=x−x′, steps 2.1 and [F3] give qM(x,x′)=hTMh=hTLTLh=⟨Lh,Lh⟩=∥Lh∥22. Both dM(x,x′) and ∥Lh∥2 are nonnegative and their squares agree, so [F5] gives dM(x,x′)=∥Lx−Lx′∥2.

4.1step 3.1F4∎

Nonnegativity, symmetry, and zero diagonal follow from the corresponding properties of the Euclidean norm in [F4]. For any x,y,z∈Rd, dM(x,z)=∥Lx−Lz∥2≤∥Lx−Ly∥2+∥Ly−Lz∥2=dM(x,y)+dM(y,z) by the triangle inequality in [F4]. The pseudometric axioms follow.

LemmaStatement: AI-adaptedProof: AI-adaptedOpen item page →

Symmetric vectorization transports closed convex domains and subgradients

Statement

Let C⊆Sd be a closed convex set of real symmetric matrices in the Frobenius metric, let F:C→R be convex, let svec⁡:Sd→Rm be the symmetric vectorization isometry, and define C′=svec⁡(C) and f:C′→R by f(z)=F(svec⁡−1(z)). Then C′ is closed and convex and f is convex. If G is a Frobenius subgradient of F at M∈C, meaning F(N)≥F(M)+⟨G,N−M⟩F for every N∈C, then svec⁡(G) is a Euclidean subgradient of f at svec⁡(M).

Facts & Assumptions

Given: A closed convex set C⊆Sd, a convex function F:C→R, a point M∈C, and a Frobenius subgradient G at M.

[F1]

The map svec⁡ is a linear bijection and preserves inner products and distances (Symmetric matrices are Euclidean under the Frobenius norm).

[F2]

A function is convex when it satisfies the convex-combination inequality, and a set is convex when it contains every convex combination of its points (Convex and strictly convex functions on Euclidean convex sets, A convex subset of Rm contains every line segment between two of its points).

[F3]

A set is closed when its complement is open, and an open set contains a positive-radius ball around each of its points (The metric topology: a set is open when every one of its points has a ball around it inside the set; closed means open complement, Open ball, closed ball and sphere in a metric space).

[F4]

A subgradient supplies a global supporting affine lower bound on the convex function (Subgradients and the subdifferential of a convex function).

Proof

1.1givenF1F2construct

If z0,z1∈C′, choose M0,M1∈C with zi=svec⁡(Mi). For t∈[0,1], linearity gives tz0+(1−t)z1=svec⁡(tM0+(1−t)M1), and the matrix on the right is in C by [F2]. Thus C′ is convex.

1.2givenF1F3

Let z∉C′ and set M=svec⁡−1(z)∉C. Since C is closed, [F3] gives r>0 such that BF(M,r)⊆Sd∖C, where BF(M,r)={A∈Sd:∥A−M∥F<r}. For any w∈B2(z,r), isometry [F1] gives svec⁡−1(w)∈BF(M,r), hence w∉C′. Therefore B2(z,r)⊆Rm∖C′, so the complement of C′ is open and C′ is closed.

1.3givenF1F2algebra

For z0,z1∈C′ with preimages M0,M1, linearity yields svec⁡−1(tz0+(1−t)z1)=tM0+(1−t)M1. Applying convexity of F from [given] proves f(tz0+(1−t)z1)≤tf(z0)+(1−t)f(z1), so f is convex.

2.1givenF1F4∎

Let z=svec⁡(M) and take any w∈C′, with preimage N∈C. The assumed subgradient inequality gives f(w)=F(N)≥F(M)+⟨G,N−M⟩F. By inner-product preservation [F1], this equals f(z)+⟨svec⁡(G),w−z⟩2; hence svec⁡(G) is a Euclidean subgradient by [F4].

TheoremStatement: AI-adaptedProof: AI-adaptedOpen item page →

The fixed-target LMNN objective is convex

Statement

Let d,n,C be positive integers, let (xi,yi)i=1n be a finite sample with xi∈Rd and yi∈{1,…,C}, let each fixed target set satisfy Ni⊆{j≠i:yj=yi}, and let μ∈[0,1]. For symmetric M∈Rd×d write qM(x,x′)=(x−x′)TM(x−x′) and define

Fμ(M)=(1−μ)∑i=1n∑j∈NiqM(xi,xj)+μ∑i=1n∑j∈Ni∑1≤l≤nyl≠yi[1+qM(xi,xj)−qM(xi,xl)]+,

where [z]+=max⁡{z,0}. Then Fμ is convex on the real vector space of symmetric matrices. The feasible set S+d={M=MT:vTMv≥0 for all v∈Rd} is convex, so minimizing Fμ over S+d is a convex optimization problem.

Facts & Assumptions

Given: The finite sample, fixed target sets, and parameter μ∈[0,1] in the Statement.

[F1]

For fixed a,b∈Rd, qM(a,b)=tr⁡(M(a−b)(a−b)T), so it is affine-linear in the entries of M (Fixed-target large-margin nearest-neighbor objective, The trace tr⁡(A) as the sum of the diagonal entries).

[F2]

A real-valued function on a convex set is convex when its value at every convex combination is at most the same convex combination of its values (Convex and strictly convex functions on Euclidean convex sets).

[F3]

A subset of a real vector space is convex when it contains every convex combination of any two of its points (A convex subset of Rm contains every line segment between two of its points).

Proof

1.1F1givenalgebra

For each fixed pair (i,j), let Cij=(xi−xj)(xi−xj)T. By [F1], qM(xi,xj)=tr⁡(MCij) is linear in M, so every pull term is affine-linear. Each margin expression hijl(M)=1+tr⁡(M(Cij−Cil)) is also affine-linear.

2.1F2step 1.1algebra

For any affine-linear h and 0≤t≤1, h(tM+(1−t)N)=th(M)+(1−t)h(N). The number t[h(M)]++(1−t)[h(N)]+ is at least 0 and at least th(M)+(1−t)h(N), hence it is at least their maximum [h(tM+(1−t)N)]+. Thus each hinge term is convex by [F2].

3.1givenstep 1.1step 2.1F2algebra

Finite sums of affine-linear functions and convex hinge functions are convex, and the coefficients 1−μ and μ are nonnegative because μ∈[0,1]. Applying the convexity inequality term by term proves Fμ is convex on all symmetric matrices, including the endpoint cases μ=0 and μ=1.

4.1F3givenalgebra∎

If M,N∈S+d and 0≤t≤1, then tM+(1−t)N is symmetric and for every v, vT(tM+(1−t)N)v=t vTMv+(1−t) vTNv≥0. Hence S+d is convex by [F3]. Restricting the already convex function Fμ to this convex feasible set yields a convex optimization problem.

LemmaStatement: AI-adaptedProof: AI-adaptedOpen item page →

LMNN hinge subgradient formula and a uniform data-dependent bound

Statement

Fix the finite labeled sample, fixed target sets, and μ∈[0,1] of the LMNN objective. For each j∈Ni and each impostor index l with yl≠yi, set Cij=(xi−xj)(xi−xj)T, Dijl=Cij−Cil, and hijl(M)=1+⟨M,Dijl⟩F, where ⟨A,B⟩F=∑r,sArsBrs. Define γijl(M)=1 if hijl(M)>0 and γijl(M)=0 if hijl(M)≤0. Put

G(M)=(1−μ)∑i∑j∈NiCij+μ∑i∑j∈Ni∑l:yl≠yiγijl(M)Dijl.

For the convex objective Fμ on S+d, a Frobenius subgradient at M means a symmetric matrix G such that Fμ(N)≥Fμ(M)+⟨G,N−M⟩F for every N∈S+d. Then G(M) is a subgradient at every M∈S+d. Moreover, uniformly in M,

∥G(M)∥F≤Bdata:=(1−μ)∑i∑j∈Ni∥xi−xj∥22+μ∑i∑j∈Ni∑l:yl≠yi(∥xi−xj∥22+∥xi−xl∥22).

At an exact hinge kink hijl(M)=0, the selected subgradient coefficient is 0.

Facts & Assumptions

Given: The finite sample, fixed target sets and weight μ in the Statement, and M∈S+d.

[F1]

The objective is the finite weighted sum of linear pull terms and positive-part hinge terms with affine arguments (Fixed-target large-margin nearest-neighbor objective).

[F2]

The objective is convex on S+d (The fixed-target LMNN objective is convex).

[F3]

A subgradient is a vector whose inner product gives a global supporting affine lower bound on the convex function (Subgradients and the subdifferential of a convex function).

[F5]

The Euclidean norm on Rd satisfies ∥a∥22=∑rar2 (The Euclidean inner product ⟨x,y⟩=∑k<nxkyk on Rn).

Proof

1.1F1algebra

For aij=xi−xj, the entrywise inner product satisfies ⟨M,Cij⟩F=∑r,sMrs(aij)r(aij)s=aijTMaij=qM(xi,xj). Thus each hinge has the form ϕ(M)=max⁡{0,1+⟨M,Dijl⟩F}, with affine argument hijl(M).

1.2F4F5algebra

For any a∈Rd, ∥aaT∥F2=∑r,s(aras)2=(∑rar2)2, so ∥Cij∥F=∥xi−xj∥22 by [F5]. By [F4], ∥Dijl∥F≤∥Cij∥F+∥Cil∥F=∥xi−xj∥22+∥xi−xl∥22.

2.1step 1.1algebra

If hijl(M)>0, then ϕ(M)=hijl(M) and ϕ(N)≥hijl(N)=ϕ(M)+⟨Dijl,N−M⟩F for every N. If hijl(M)≤0, then ϕ(M)=0 and ϕ(N)≥0=ϕ(M)+⟨0,N−M⟩F for every N. Hence γijl(M)Dijl is a subgradient of this hinge, including the selected zero coefficient at equality.

3.1step 1.1step 2.1F2F3algebra

Each Cij and Dijl is symmetric, so their weighted sum G(M) is symmetric. Each pull term is linear with Frobenius subgradient Cij. Adding its supporting equality to the hinge supporting inequalities in step 2.1, weighted by the nonnegative coefficients 1−μ and μ, proves Fμ(N)≥Fμ(M)+⟨G(M),N−M⟩F for every N∈S+d. Thus G(M) is a subgradient by [F3].

4.1step 1.2givenF4algebra∎

Since each γijl(M)∈{0,1}, the triangle inequality and step 1.2 give ∥G(M)∥F≤(1−μ)∑i∑j∈Ni∥Cij∥F+μ∑i∑j∈Ni∑l:yl≠yi∥Dijl∥F≤Bdata. The bound is finite because the sample and all index sets are finite, and it is independent of M.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

Finite-budget projected-subgradient training for fixed-target LMNN

Definition

Use the finite sample, fixed target sets, weight μ∈[0,1], and objective Fμ defined by the LMNN objective item. The inputs are an integer budget T≥1, an initial matrix M0∈S+d, and positive step sizes η0,…,ηT−1. Let m=d(d+1)/2 and use svec⁡:Sd→Rm, the linear isometry that lists the diagonal entries followed by the 2-scaled upper-triangle entries in lexicographic order. Set C′=svec⁡(S+d) and f(z)=Fμ(svec⁡−1(z)); this is a nonempty closed convex domain and f is convex.

Initialize z0=svec⁡(M0). At each t=0,…,T−1, put Mt=svec⁡−1(zt) and compute the Frobenius subgradient

Gt=(1−μ)∑i∑j∈NiCij+μ∑i∑j∈Ni∑l:yl≠yiγijl(Mt)(Cij−Cil),

where Cij=(xi−xj)(xi−xj)T, hijl(M)=1+⟨M,Cij−Cil⟩F, γijl(M)=1 when hijl(M)>0, and γijl(M)=0 when hijl(M)≤0. Supply the successful oracle response (f(zt),svec⁡(Gt)) to the finite-budget projected-subgradient method on C′ with step size ηt. It updates zt+1=PC′(zt−ηtsvec⁡(Gt)), where PC′ is the unique nearest point in the Euclidean norm. Equivalently, form At=Mt−ηtGt, choose an orthogonal eigendecomposition At=Utdiag⁡(λt,1,…,λt,d)UtT, and set

Mt+1=Utdiag⁡(max⁡{λt,1,0},…,max⁡{λt,d,0})UtT.

All T oracle calls succeed; the generic method reports budget-exhausted after T updates. The requested final iterate is MT; its status, completed update count, weighted average, and least-index best observed iterate are also defined by the generic method. The explicit spectral-clipping implementation is choice-free. The equivalent abstract Hilbert-projection interface assumes Countable Choice, as in the general closest-point theorem; that axiom branch is retained separately for the conditional analysis. This finite procedure makes no unconditional convergence, optimality, empirical-error, or generalization claim.

TheoremStatement: AI-adaptedProof: AI-adaptedOpen item page →

Conditional best-iterate and weighted-average bound for LMNN training

Statement

Assume Countable Choice ACω. Let d,n,C be positive integers, let (xi,yi)i=1n be a finite sample with xi∈Rd and yi∈{1,…,C}, let fixed target sets satisfy Ni⊆{j≠i:yj=yi}, and let μ∈[0,1]. For symmetric M put qM(x,x′)=(x−x′)TM(x−x′) and

Fμ(M)=(1−μ)∑i∑j∈NiqM(xi,xj)+μ∑i∑j∈Ni∑l:yl≠yi[1+qM(xi,xj)−qM(xi,xl)]+,

where [z]+=max⁡{z,0}, and minimize over S+d={M=MT:vTMv≥0 for every v∈Rd}. Let T≥1 be an integer, choose M0∈S+d and step sizes η0,…,ηT−1>0, and suppose a global minimizer M∗∈S+d of Fμ exists. For each t<T, put Cij=(xi−xj)(xi−xj)T, hijl(M)=1+⟨M,Cij−Cil⟩F, and γijl(M)=1 if hijl(M)>0 and 0 if hijl(M)≤0. Form

Gt=(1−μ)∑i∑j∈NiCij+μ∑i∑j∈Ni∑l:yl≠yiγijl(Mt)(Cij−Cil),Mt−ηtGt=Utdiag⁡(λt,1,…,λt,d)UtT,

where Ut is orthogonal, and define

Mt+1=Utdiag⁡(max⁡{λt,1,0},…,max⁡{λt,d,0})UtT.

Set

AT=∑t=0T−1ηt,M‾T=1AT∑t=0T−1ηtMt,

let Mbest be the least-index minimizer of Fμ(Mt) over 0≤t<T, and define

Bdata=(1−μ)∑i∑j∈Ni∥xi−xj∥22+μ∑i∑j∈Ni∑l:yl≠yi(∥xi−xj∥22+∥xi−xl∥22),R=∥M0−M∗∥F,

where ∥z∥2=(∑r=1dzr2)1/2 and ∥⋅∥F is the entry-sum Frobenius norm.

Then AT>0, Mbest,M‾T∈S+d, and

max⁡{Fμ(Mbest)−Fμ(M∗), Fμ(M‾T)−Fμ(M∗)}≤R2+Bdata2∑t=0T−1ηt22AT.

This conditional bound applies to the best observed iterate and weighted average; it does not assert the same bound for the final iterate MT or any test-error improvement.

Facts & Assumptions

Given: The data and objective in the Statement, ACω, an attained minimizer M∗, the finite projected-subgradient procedure, and its positive step sizes.

[A1]

Countable Choice selects one element from each member of a countable family of nonempty sets (The Axiom of Countable Choice (ACω)).

[F1]

The finite target objective is convex on S+d, and this cone is convex (The fixed-target LMNN objective is convex).

[F2]

The real positive-semidefinite cone is closed in the Frobenius metric (The real positive-semidefinite cone is closed in the Frobenius metric).

[F3]

Symmetric vectorization is a linear inner-product isometry to Rm and transports closed convex domains and subgradients (Symmetric matrices are Euclidean under the Frobenius norm, Symmetric vectorization transports closed convex domains and subgradients).

[F5]

Under Countable Choice, every point of a real Hilbert space has a unique nearest point in each nonempty closed convex set (Projection onto a nonempty closed convex set).

[F6]

The local subgradient formula returns valid subgradients and satisfies ∥G(Mt)∥F≤Bdata for every iterate (LMNN hinge subgradient formula and a uniform data-dependent bound).

[F7]

The finite-budget projected-subgradient method updates zt+1=PC′(zt−ηtgt) and records its finite status, final iterate, weighted average, and least-index best observed point (Projected subgradient method with finite budget).

[F8]

For a convex objective on a nonempty closed convex Euclidean domain, a finite projected-subgradient run with valid bounded subgradients, an attained minimizer, and an initial-distance bound satisfies the stated best-observed and weighted-average gap estimate (Projected subgradient best-iterate and weighted-average bound).

[F9]

The explicit eigenvalue-clipping update is the unique Frobenius projection onto S+d (Frobenius projection onto the positive-semidefinite cone is spectral clipping).

Proof

1.1A1F1F2F3F4F5F7F9given

Put m=d(d+1)/2 and C′=svec⁡(S+d). The cone contains 0; [F1] makes it convex, [F2] makes it closed in Frobenius distance, and [F3] transfers both properties to C′. By [F4], Rm is a real Hilbert space; under [A1], [F5] gives a unique Euclidean projection onto C′, which is the projection used in [F7]. The explicit matrix update is that projection because [F9] identifies the unique Frobenius-nearest PSD matrix.

1.2F3F6F7given

For every t<T, the displayed data formula in [F6] computes G(Mt) and its bound. The coordinate transport [F3] makes svec⁡(G(Mt)) a Euclidean subgradient of f=Fμ∘svec⁡−1 with norm ∥svec⁡(G(Mt))∥2=∥G(Mt)∥F≤Bdata. Thus all T oracle calls in [F7] are valid.

1.3F3F7F8givenalgebra

The point M∗ maps to a global minimizer z∗=svec⁡(M∗) of f on C′, the initial point satisfies ∥z0−z∗∥2=R, and the positive step sizes give AT>0. Apply [F8] to the generic run with N=T, subgradient bound Bdata, and distance bound R. It yields the asserted upper bound for the least-index best observed objective gap and the weighted-average objective gap in Euclidean coordinates.

2.1step 1.3F1F3algebra∎

By linearity of svec⁡−1, the Euclidean weighted average maps to M‾T as defined in the Statement. Each iterate lies in S+d, so convexity [F1] puts M‾T there; bijectivity also preserves the finite-list minimum, so the Euclidean bound from step 1.3 is exactly the displayed matrix bound.

Remarks

The explicit eigenvalue-clipping implementation and its finite local projection formula are choice-free. The proof above separately records the stronger abstract Hilbert-projection route required by the current interface; that branch uses only ACω, not the full Axiom of Choice. The hypothesis that M∗ exists is essential to this stated application and is not derived from convexity alone.

4 · Examples, counterexamples and false statements

None yet.

Sources