Theorem B.2: generalized version of Theorem 3.8
OpenSpectralContrastive.probe_error_sparsest_boundThere are universal constants and with the following property. Consider the finite data model and integers and with for some . Let minimize over all , let be any labeling function, and assume . Then there is a linear head with
Every argmax prediction of this head has error at most twice the same right-hand side. If moreover , the head can be taken with .
Formalization Note The paper's is written with a universal , and its universal constant is quantified before all data. The hypothesis excludes the case where the right-hand side divides by zero. The norm clause is conditional on , which is where is defined.
import Mathlib import Definitions.Def_SpectralContrastive_Basic open Matrix
namespace SpectralContrastive
theorem probe_error_sparsest_bound :
∃ (c : ℝ) (K : ℕ), ∀ (Xbar X : Type) [Fintype Xbar] [Fintype X] [DecidableEq X]
(r k k' : ℕ) (ζ : ℝ) (P : Xbar → ℝ) (A : Xbar → X → ℝ), IsAugModel P A →
1 ≤ k → 1 ≤ k' → r ≤ k' → 0 < ζ → ζ < 1 → (k : ℝ) + 1 = (1 + ζ) * k' →
∀ (y : Xbar → Fin r) (yhat : X → Fin r) (f : X → Fin k → ℝ),
(∀ f' : X → Fin k → ℝ, scLoss P A f ≤ scLoss P A f') →
0 < sparsestPartition (augWeight P A) k' →
∃ B : Matrix (Fin k) (Fin r) ℝ,
probeSqLoss P A y f B ≤
c * ((1 + 1 / ζ) ^ K * Real.log (k + 1) * cutWeight (augWeight P A) yhat /
sparsestPartition (augWeight P A) k' ^ 2 + labelDisagree P A y yhat) ∧
(∀ g : X → Fin r, IsProbePred f B g →
labelDisagree P A y g ≤
2 * c * ((1 + 1 / ζ) ^ K * Real.log (k + 1) * cutWeight (augWeight P A) yhat /
sparsestPartition (augWeight P A) k' ^ 2 + labelDisagree P A y yhat)) ∧
(lapEig (augWeight P A) k < 1 → frobNorm B ≤ 1 / (1 - lapEig (augWeight P A) k)) := by sorry
end SpectralContrastiveRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Claim. There exist a real constant and a natural number , with no sign or size restriction on , chosen once and before everything below, such that the following holds for every choice of data satisfying the hypotheses.
Data and hypotheses. Fix:
- finite sets (natural data) and (augmented data);
- natural numbers and a real number ;
- functions and , writing .
Assume all of the following:
-
is an augmentation model:
- for all , and ;
- for all , and for every ;
- every has some with and .
In particular, both and are nonempty.
-
Constraints on the integers and : , , , , and
Hence is determined by , and . This is impossible when , so effectively and .
-
Labels and representation. Fix arbitrary maps:
- a label map ;
- an arbitrary labelling ;
- a representation .
Since , can only exist if .
-
is a global minimizer of the population spectral contrastive loss over all maps : for every , where
- The sparsest -partition is positive: , defined as follows.
- The augmentation graph on has weights
with degrees .
- The conductance of is
- is the infimum, over all surjective labellings (partitions of into nonempty labelled blocks ), of .
- If there is no such , and is defined to be . So this hypothesis in particular forces .
Conclusion. There exists a matrix satisfying three properties at once. Write
where:
- is summed over ordered pairs, so each unordered pair is counted twice;
- ;
- is the natural logarithm.
The three properties are:
- Squared-loss bound:
- Error bound for every argmax classifier. Let be any map with for all and , i.e. is an argmax index under any tie-breaking. Every such satisfies
This concerns the error on augmented data. No statement is made about the ensembled prediction on natural data.
- Norm bound. Let be the -th smallest of the real roots, with multiplicity, of the characteristic polynomial of the normalized Laplacian , where . If exceeds the number of such roots, is defined to be . Then:
If , nothing is asserted about . In the junk case , the hypothesis holds automatically, and the bound reads .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.