Theorem 11: risk of direct embeddings and the excess contrastive loss
ProvedMultiViewRedundancy.error_direct_embeddingLet have , valued in a standard Borel space and . Let and be measurable with for -almost every and with finite . Let be a common upper bound, -almost everywhere, of and . Then
Formalization Note The paper's is replaced by any almost-everywhere upper bound of and , which is all the proof uses. Positivity of is needed for (a logarithm of ) to be defined and for to be a probability in the proof's Pinsker step. Finiteness of is a hypothesis (otherwise the bound is infinite). takes values in .
import Mathlib import Definitions.Def_MultiViewRedundancy_Basic open MeasureTheory ProbabilityTheory open scoped ENNReal NNReal
namespace MultiViewRedundancy
theorem error_direct_embedding {X Z : Type*} [MeasurableSpace X] [MeasurableSpace Z]
[StandardBorelSpace Z] [Nonempty Z]
(ρ : Measure (X × Z × ℝ)) [IsProbabilityMeasure ρ] (hY : MemLp (fun t => t.2.2) 2 ρ)
(hac : lawXZ ρ ≪ (lawXZ ρ).fst.prod (lawXZ ρ).snd)
{m : ℕ} (η : X → Fin m → ℝ) (ψ : Z → Fin m → ℝ) (hη : Measurable η) (hψ : Measurable ψ)
(G : ℝ)
(hGs : ∀ᵐ p ∂(lawXZ ρ).fst.prod (lawXZ ρ).snd, densityRatio (lawXZ ρ) p.1 p.2 ≤ G)
(hGe : ∀ᵐ p ∂(lawXZ ρ).fst.prod (lawXZ ρ).snd, innerEmb η ψ p.1 p.2 ≤ G)
(hpos : ∀ᵐ p ∂(lawXZ ρ).fst.prod (lawXZ ρ).snd, 0 < innerEmb η ψ p.1 p.2)
(hint : Integrable (fun t => Real.log (1 + 1 / innerEmb η ψ t.1 t.2.1 ^ t.2.2))
(contrastDist (lawXZ ρ))) :
risk ρ η ≤
ENNReal.ofReal ((∫ t, t.2.2 ^ 2 ∂ρ) * (1 + G) ^ 4 * epsOptDirect (lawXZ ρ) η ψ) := by sorry
end MultiViewRedundancyRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be any measurable space and a nonempty standard Borel space. Let be a probability measure on , and write a generic point as , with random triple . Define:
- , the law of , which is the pushforward of under .
- and , its two marginals. Both are probability measures.
- , their product measure.
Hypotheses on .
- is square-integrable under : .
- is absolutely continuous with respect to .
Density ratio. Let be the Radon–Nikodym derivative , converted from to a real number. A value of is converted to .
Embeddings. Let , and let and be measurable maps. Write
Hypotheses on . Let . For -almost every , assume all three of the following:
Contrastive distribution and integrability. Let be the measure on defined by
Assume the function is integrable under . Here is a real power with exponent , and a division by is read as .
Direct loss. For any , define
This integral is taken to be whenever the integrand is not integrable. No integrability is assumed for .
The excess direct loss is
Regression functions.
- is the mean of the conditional law of given . This conditional law is a disintegration kernel of the law of .
- , where is a disintegration kernel of .
- Each mean is set to when the corresponding integrand is not integrable.
Risk. The risk of is
Conclusion. The theorem asserts
where . A negative value of the right-hand product is replaced by .
Degenerate cases.
- If , then . The hypothesis almost everywhere under the probability measure then cannot hold, so the statement is vacuous.
- Together, the conditions almost everywhere force .
- The positivity and upper-bound hypotheses on and are required only almost everywhere with respect to .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.