Lemma 5.1 (as proved): sub-Gaussian representations
ProvedContrastiveUnsupervised.subgaussian_neq_loss_le_margin_lossLet be a countable set of latent classes with distribution , let , and let be the hinge loss. Let be measurable with for all . Suppose that, for every class , with is -sub-Gaussian in every direction, where . Then for every ,
where is the average binary mean-classifier loss with . Here
Formalization Note The paper prints with an unspecified constant. That expression is undefined for , and the proof (Appendix A.2 and its footnote) establishes the explicit above, which is stated here. Lean's square root of a negative number is ; then and the inequality still holds. The lemma is stated for the hinge loss, which is the loss the proof uses; for the logistic loss it fails. is any bound on ; the right side increases with , so this is equivalent to taking .
import Mathlib import Definitions.Def_ContrastiveUnsupervised_Basic open MeasureTheory Filter Topology universe u v
namespace ContrastiveUnsupervised
theorem subgaussian_neq_loss_le_margin_loss {X : Type*} [MeasurableSpace X] {C : Type*}
[Countable C] {d : ℕ} (D : C → Measure X) (ρ : C → ℝ) (hDρ : IsLatentClassModel D ρ)
(hτ : collisionProb ρ < 1) (f : X → Rep d) (R σ : ℝ) (hf : IsBoundedRep f R)
(hσ : 0 ≤ σ) (hsub : IsSubGaussianRep D f σ) (ε : ℝ) (hε : 0 < ε) :
unsupLossNeq true D ρ 1 f ≤
subGaussianMargin R σ ε *
avgMeanSupLoss (marginHingeLoss (subGaussianMargin R σ ε)) D ρ 1 f + ε := by sorry
end ContrastiveUnsupervisedRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a measurable space, a countable set of "latent classes", and a natural number. Representations take values in with the Euclidean norm and inner product . The theorem quantifies over the following data and hypotheses.
- Class model. For each class there is a measure on , and . Every is a probability measure, for all , and (as an unconditionally convergent sum).
- Collision probability. The collision probability is
and it is assumed that . Equivalently, at least two classes have positive weight.
- Representation. is a measurable function with for every , where is a real number. Since the are probability measures, is nonempty, so this forces .
- Sub-Gaussian parameter. is a real number with .
- Sub-Gaussianity. Let be the class mean. For every class (including classes with ) and every unit vector , the real random variable under has a sub-Gaussian moment generating function with variance proxy . That is, for every real , is -integrable and
When there are no unit vectors, so this hypothesis is vacuous.
- Tolerance. is a real number with .
The margin. The margin is defined by
Here the square root of a negative number is taken to be . This case arises, for example, when and . Under the hypotheses, .
Left-hand side: the contrastive loss on distinct classes. The quantity uses the hinge loss and one negative sample:
In this formula:
- The sums run over ordered pairs of distinct classes.
- , and are drawn independently.
- .
The denominator equals , which is positive by hypothesis.
Right-hand side: the averaged mean-classifier loss with margin . The quantity averages over 2-way tasks formed by ordered pairs of distinct classes , weighted by and normalized by the same total weight .
For the task , labels are uniform (each with probability ), and the mean classifier scores class by . The task loss is
where denotes the other class of . Thus
Conclusion. Under all of the above hypotheses, the theorem asserts
Conventions. All sums over classes are infinite sums, which are taken to be if not summable. All expectations are Bochner integrals, which are taken to be for non-integrable integrands. Since is bounded and measurable and is summable, these conventions do not obviously come into play here. The inequality is non-strict, and is arbitrary, but depends on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.