Corollary 2: cross-entropy lower bound with penalty
ProvedSupConGeometry.ce_loss_l2_penaltyUnder the hypotheses of Theorem 1 (, , , , balanced ), let and let be the unique solution in of . Then
with equality if and only if there are such that
- (C1) for all ;
- (C2) form a -sphere-inscribed regular simplex;
- (C3-wd) for all .
So weight decay removes the need for an explicit norm constraint on the classifier: at the optimum the weights form a regular simplex of radius .
import Mathlib import Definitions.Def_SupConGeometry_Basic open Finset
namespace SupConGeometry
theorem ce_loss_l2_penalty {N K h : ℕ} (hK : 2 ≤ K) (hKh : K ≤ h + 1) (hN : 0 < N)
(ρ : ℝ) (hρ : 0 < ρ) (Z : Fin N → Rep h) (hZ : ∀ n, ‖Z n‖ ≤ ρ) (W : Fin K → Rep h)
(Y : Fin N → Fin K) (hY : IsBalanced Y) (lam : ℝ) (hlam : 0 < lam) :
Real.log (1 + ((K : ℝ) - 1) *
Real.exp (-(ρ * ((K : ℝ) / ((K : ℝ) - 1)) * ceL2Radius K ρ lam))) +
lam * (K : ℝ) * ceL2Radius K ρ lam ^ 2 ≤ ceLoss Z W Y + lam * frobNorm W ^ 2 ∧
(ceLoss Z W Y + lam * frobNorm W ^ 2 =
Real.log (1 + ((K : ℝ) - 1) *
Real.exp (-(ρ * ((K : ℝ) / ((K : ℝ) - 1)) * ceL2Radius K ρ lam))) +
lam * (K : ℝ) * ceL2Radius K ρ lam ^ 2 ↔
∃ ζ : Fin K → Rep h, (∀ n, Z n = ζ (Y n)) ∧ IsSphereInscribedRegularSimplex ζ ρ ∧
∀ y, W y = (ceL2Radius K ρ lam / ρ) • ζ y) := by sorry
end SupConGeometryRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix natural numbers and work in with the standard Euclidean inner product and norm . The theorem assumes the following:
- and ;
- ;
- a real number ;
- points (the configuration ) with for every ;
- arbitrary vectors (the rows of ), with no constraint;
- a labelling that is balanced. For every class , the count satisfies . So divides and every class occurs exactly times.
- a real number .
The cross-entropy loss is
The Frobenius norm is , so .
The quantity is defined as the infimum of the real solution set
The theorem itself asserts nothing about : not that it is nonempty, not that it is bounded below, and not that it has a unique element. If were empty or unbounded below, the infimum would take the default value .
Write
The theorem asserts two things:
- Lower bound.
- Equality characterisation. Equality holds if and only if there exist vectors satisfying all of the following:
- for every , so all points of a class coincide with that class's vertex;
- form a "sphere-inscribed regular simplex of radius ". By definition this means:
- ;
- for every ;
- there is some real , otherwise unspecified, with for all ;
- for every class .
The statement holds for all satisfying the norm bound and for all . The value of enters only through the infimum defined above.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.