Lemma 3.2: spectral contrastive loss
ProvedSpectralContrastive.spectral_contrastive_loss_eq_mfConsider the finite data model with augmentation graph weights and degrees . For a feature map , let have rows . Then there is a constant , depending only on the graph and not on , such that for every
So minimizing the spectral contrastive loss is the same as computing a rank- factorization of the normalized adjacency matrix.
import Mathlib import Definitions.Def_SpectralContrastive_Basic open Matrix
namespace SpectralContrastive
theorem spectral_contrastive_loss_eq_mf {Xbar X : Type*} [Fintype Xbar] [Fintype X]
[DecidableEq X] {k : ℕ} (P : Xbar → ℝ) (A : Xbar → X → ℝ) (hM : IsAugModel P A) :
∃ c : ℝ, ∀ f : X → Fin k → ℝ,
mfLoss (augWeight P A) (fun x i => Real.sqrt (degree (augWeight P A) x) * f x i) =
scLoss P A f + c := by sorry
end SpectralContrastiveRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and be arbitrary finite types, with decidable equality on , and let be a natural number. The case is allowed. Let and be arbitrary real-valued functions, written and . They are subject to a single hypothesis: is an augmentation model, meaning all of the following hold.
- for every , and .
- for all , and for every . This includes those with .
- For every there is some with and .
These conditions force both and to be nonempty. They are satisfiable, for example with one-point sets. is not required to have full support.
From these data the statement builds the augmentation-graph weights and the degrees:
It also builds the normalized adjacency matrix:
Here division by is taken to give , and of a negative number is taken to be . Under the hypotheses, however, every and every .
For an embedding , write . Two losses are involved.
The matrix factorization loss is evaluated at the rescaled embedding :
The spectral contrastive loss of is
The theorem asserts the following. Under the augmentation-model hypothesis, there exists a real constant , depending only on , , the types, and , such that for every :
The quantifier order is , so does not depend on . The value of is not specified; only its existence is asserted. When , every inner product is , and the statement holds trivially with .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.