Theorem 4 (as proved): entropic graph estimation recovers the SimCLR similarities
ProvedSSLSpectralEmbedding.graph_estimate_recovers_simclrLet , , let be a representation and a symmetric dissimilarity on , with . Let
- Over (symmetric, nonnegative, zero diagonal), the unique minimiser of is .
- Over the nonnegative, zero-diagonal, right-stochastic matrices, the unique minimiser of is
- If is the cosine distance , this row-normalised estimate is the SimCLR similarity estimate of eq. (3).
Formalization Note The paper states part 2 over , which also requires symmetry. Its proof drops the symmetry constraint and claims the optimum is symmetric anyway, which is false in general: for , and distances , , the row-normalised kernel has . The statement is the one the proof establishes, with the symmetry constraint removed. The paper's " any preferred metric" includes the cosine distance, which is not a metric, so only symmetry of is assumed. The identification with the Lifted Structured Loss is informal and is not included.
import Mathlib import Definitions.Def_SSLSpectralEmbedding_Basic open Matrix
namespace SSLSpectralEmbedding
theorem graph_estimate_recovers_simclr {N K : ℕ} (hN : 2 ≤ N) (τ : ℝ) (hτ : 0 < τ)
(d : (Fin K → ℝ) → (Fin K → ℝ) → ℝ) (hd : ∀ u v, d u v = d v u)
(Z : Matrix (Fin N) (Fin K) ℝ) :
(expKernel τ (distMat d Z) ∈ graphSet N ∧
∀ W ∈ graphSet N, W ≠ expKernel τ (distMat d Z) →
graphObjective (distMat d Z) (entropyReg τ) (expKernel τ (distMat d Z)) <
graphObjective (distMat d Z) (entropyReg τ) W) ∧
(softmaxKernel τ (distMat d Z) ∈ rowStochSet N ∧
∀ W ∈ rowStochSet N, W ≠ softmaxKernel τ (distMat d Z) →
graphObjective (distMat d Z) (entropyReg τ) (softmaxKernel τ (distMat d Z)) <
graphObjective (distMat d Z) (entropyReg τ) W) ∧
softmaxKernel τ (distMat cosineDist Z) = simclrSim τ Z := by sorry
end SSLSpectralEmbeddingRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix:
- natural numbers and with ( is arbitrary, including );
- a real number ;
- an arbitrary function whose only assumed property is symmetry, for all . It is not assumed to be nonnegative, to satisfy , or to satisfy the triangle inequality;
- an arbitrary real matrix , whose -th row is written .
Distance matrix and objective. Let be the matrix . For an real matrix , define the objective
where is taken to be , and for means . Only nonnegative are compared below, so an entry contributes .
Two admissible sets.
- is the set of real matrices that are symmetric, have all entries , and have zero diagonal.
- is the set of real matrices with all entries , zero diagonal, and every row summing to ( for each ). Symmetry is not required in .
On both sets the diagonal terms vanish.
Two kernels. Define
The theorem asserts three things.
-
, and for every with we have the strict inequality . So is the unique minimiser of over .
-
, and for every with we have the strict inequality . So is the unique minimiser of over the not-necessarily-symmetric set .
-
Take the specific choice , the cosine distance
Here the quotient is defined to be whenever the denominator is , i.e. whenever or , and in particular always when . For this choice, the matrix built from equals, entry by entry, the matrix given by
This third claim does not involve the given or its symmetry hypothesis. It holds for the fixed and only.
The denominators above are sums over the indices of positive exponentials.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.