Proposition 1 (as proved): minimizers of the cross-entropy maintain the dot product,
ProvedContrastiveInverts.ce_minimizers_preserve_dot_productLet , , , , and let . Let be a class of measurable maps sending into the sphere of radius . Suppose the class is flexible enough to match the ground truth: some has for all . If minimises the cross-entropy over at every anchor , then for all
Formalization Note The paper prints the second conclusion as . Its proof, which omits the factor in the last step, actually yields , and that is what is stated. The printed form fails for the matching map whenever . "Minimiser of the cross-entropy" is read at each anchor , as printed. Membership of in the class encodes "sufficiently flexible such that and can match".
import Mathlib import Definitions.Def_ContrastiveInverts_Basic open MeasureTheory Filter Topology
namespace ContrastiveInverts
theorem ce_minimizers_preserve_dot_product {N : ℕ} (hN : 0 < N) (τ κ : ℝ) (hτ : 0 < τ)
(hκ : 0 < κ) (H : Set (Vec N → Vec N))
(hH : ∀ h' ∈ H, (∀ z ∈ Metric.sphere (0 : Vec N) 1,
h' z ∈ Metric.sphere (0 : Vec N) (Real.sqrt (τ * κ))) ∧
Measurable (fun z : Sph N => h' z))
(hflex : ∃ h₀ ∈ H, ∀ z ∈ Metric.sphere (0 : Vec N) 1, ∀ z' ∈ Metric.sphere (0 : Vec N) 1,
sphModelCond τ h₀ z z' = vmfCond N κ z z')
(h : Vec N → Vec N) (hh : h ∈ H)
(hmin : ∀ z ∈ Metric.sphere (0 : Vec N) 1, ∀ h' ∈ H,
sphCondCrossEntropy κ τ h z ≤ sphCondCrossEntropy κ τ h' z) :
(∀ z ∈ Metric.sphere (0 : Vec N) 1, ∀ z' ∈ Metric.sphere (0 : Vec N) 1,
vmfCond N κ z z' = sphModelCond τ h z z') ∧
(∀ z ∈ Metric.sphere (0 : Vec N) 1, ∀ z' ∈ Metric.sphere (0 : Vec N) 1,
τ * κ * inner ℝ z z' = inner ℝ (h z) (h z')) := by sorry
end ContrastiveInvertsRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a natural number with , and real numbers with and . Work in with the standard Euclidean inner product . Let be the unit sphere.
Let be the surface measure on . Concretely, for , is times the Lebesgue volume of the truncated cone . For the sphere is and gives each point mass .
Ground-truth conditional. For , the von Mises–Fisher conditional is
Model conditional. For any map , the model conditional is
Cross-entropy at a fixed anchor. For , the cross-entropy is
Conventions for undefined values. These formulas use the following conventions:
- Every integral above is set to if its integrand is not integrable.
- Division by yields .
- The logarithm satisfies and for .
Hypotheses. Let be a set of maps . Values of these maps off are unconstrained and play no role in any of the quantities above. Assume:
- Range and measurability. Every maps into the sphere of radius centred at , i.e. for all . In addition, the restriction of to is Borel-measurable.
- Flexibility. There exists some with
For instance, the map satisfies this identity and condition 1. So the hypothesis is satisfiable whenever contains such a map. 3. Membership. is an element of . 4. Pointwise minimality. minimises the anchor-wise cross-entropy over simultaneously at every anchor:
This is required at every anchor point, not merely for almost every or on average over .
Conclusion. The theorem asserts both of the following:
- (a) Conditionals agree. For all ,
- (b) Inner products are preserved up to scale. For all ,
Both conclusions hold pointwise at every pair of points of the unit sphere, and say nothing about outside .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.