Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 10 (as proved): lower bound on the averaged exponent

Proved
SupConGeometry.supcon_inner_bound

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

cross-entropyneural-collapseregular-simplexrepresentation-geometrysupervised-contrastive-loss

Throughout, h,N,K∈Nh,N,K\in\mathbb Nh,N,K∈N with K≤h+1K\le h+1K≤h+1, the batch size is b≥3b\ge3b≥3, ρ>0\rho>0ρ>0, and every znz_nzn​ lies on the sphere Sρh−1={z∈Rh:∥z∥=ρ}\mathbb S^{h-1}_\rho=\{z\in\mathbb R^h:\|z\|=\rho\}Sρh−1​={z∈Rh:∥z∥=ρ} (standing assumptions of Supplementary S1). In addition, K≥2K\ge2K≥2, N≥1N\ge1N≥1 and YYY is balanced.

For every l∈{2,…,b−1}l\in\{2,\dots,b-1\}l∈{2,…,b−1},

1Ml∑y∑B∈By,lS(Z;Y,B,y) ≥ −KK−1 ρ2,\frac1{M_l}\sum_y\sum_{B\in\mathcal B_{y,l}}S(Z;Y,B,y)\ \ge\ -\frac{K}{K-1}\,\rho^2,Ml​1​y∑​B∈By,l​∑​S(Z;Y,B,y) ≥ −K−1K​ρ2,

with equality if and only if

  1. (A3) yn=ymy_n=y_myn​=ym​ implies zn=zmz_n=z_mzn​=zm​, and
  2. (A4) ∑n∈[N]zn=0\sum_{n\in[N]}z_n=0∑n∈[N]​zn​=0.

It bounds the exponent in Lemma 3 using the attraction bound (Lemma 4) and the repulsion bound (Lemmas 5-9).

Formalization Note The printed right-hand side is +KK−1ρ2+\frac{K}{K-1}\rho^2+K−1K​ρ2. The proof derives −∣Y∣∣By,l∣ρ2KK−1=−MlKK−1ρ2-|\mathcal Y||\mathcal B_{y,l}|\rho^2\frac{K}{K-1}=-M_l\frac{K}{K-1}\rho^2−∣Y∣∣By,l​∣ρ2K−1K​=−Ml​K−1K​ρ2, and Lemma 11 uses the negative sign. The printed version is false: at the simplex configuration the left side equals −KK−1ρ2-\frac{K}{K-1}\rho^2−K−1K​ρ2. The statement is the one the proof establishes. N≥1N\ge1N≥1 is needed: for N=0N=0N=0 the left side is 000 (with Lean's 1/0=01/0=01/0=0) and the equality claim fails.

Preamble
import Mathlib
import Definitions.Def_SupConGeometry_Basic

open Finset
Formal statement
namespace SupConGeometry

theorem supcon_inner_bound {N K h b : ℕ} (hK : 2 ≤ K) (hKh : K ≤ h + 1) (hb : 3 ≤ b)
    (hN : 0 < N) (ρ : ℝ) (hρ : 0 < ρ) (Z : Fin N → Rep h) (hZ : ∀ n, ‖Z n‖ = ρ)
    (Y : Fin N → Fin K) (hY : IsBalanced Y) (l : ℕ) (hl : 2 ≤ l) (hlb : l < b) :
    -((K : ℝ) / ((K : ℝ) - 1)) * ρ ^ 2 ≤
      (1 / (batchCountTotal Y b l : ℝ)) * ∑ y, ∑ B ∈ batchesWithCount Y b y l, sAux Z Y B y ∧
    ((1 / (batchCountTotal Y b l : ℝ)) * ∑ y, ∑ B ∈ batchesWithCount Y b y l, sAux Z Y B y =
        -((K : ℝ) / ((K : ℝ) - 1)) * ρ ^ 2 ↔
      (∀ n m : Fin N, Y n = Y m → Z n = Z m) ∧ ∑ n, Z n = 0) := by sorry

end SupConGeometry
Source
Graf, Hofer, Niethammer and Kwitt, Dissecting Supervised Contrastive Learning, ICML 2021, arXiv:2102.08817v4, Supplementary S1.3, Lemma 10, eq. (108), p. 25 (sign as derived in its proof, p. 25); standing assumptions of Supplementary S1, p. 12
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Fix natural numbers NNN (number of points), KKK (number of classes), hhh (dimension) and bbb (batch size), subject to

K≥2,K≤h+1,b≥3,N>0.K \ge 2, \qquad K \le h+1, \qquad b \ge 3, \qquad N > 0.K≥2,K≤h+1,b≥3,N>0.

These force h≥1h \ge 1h≥1. Fix a real radius ρ>0\rho > 0ρ>0 and a configuration Z=(z1,…,zN)Z = (z_1,\dots,z_N)Z=(z1​,…,zN​) of points in Rh\mathbb{R}^hRh, with the Euclidean inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ and norm. Every point lies on the sphere of radius ρ\rhoρ:

∥zn∥=ρfor all n.\|z_n\| = \rho \quad\text{for all } n.∥zn​∥=ρfor all n.

Fix labels Y=(y1,…,yN)Y = (y_1,\dots,y_N)Y=(y1​,…,yN​) with each yn∈{1,…,K}y_n \in \{1,\dots,K\}yn​∈{1,…,K}. The labels are assumed balanced: for every class yyy, the count mY(y)=∣{n:yn=y}∣m_Y(y) = |\{n : y_n = y\}|mY​(y)=∣{n:yn​=y}∣ satisfies K⋅mY(y)=NK \cdot m_Y(y) = NK⋅mY​(y)=N. Since N>0N > 0N>0, every class therefore contains exactly N/K≥1N/K \ge 1N/K≥1 points. Finally, fix a natural number lll with 2≤l<b2 \le l < b2≤l<b. Given l≥2l \ge 2l≥2 and l<bl < bl<b, the hypothesis b≥3b \ge 3b≥3 is already implied.

Batches. A batch BBB is a multiset of size bbb drawn from the indices {1,…,N}\{1,\dots,N\}{1,…,N}, so repetitions are allowed and counted. For a class yyy:

  • ByB_yBy​ is the sub-multiset of entries of BBB whose label is yyy;
  • ByCB_y^CByC​ is the sub-multiset of entries whose label is not yyy.

By,l\mathcal{B}_{y,l}By,l​ denotes the finite set of all size-bbb batches with ∣By∣=l|B_y| = l∣By​∣=l, counted with multiplicity. For such a batch, ∣ByC∣=b−l≥1|B_y^C| = b - l \ge 1∣ByC​∣=b−l≥1. Let

Ml=∑y=1K∣By,l∣.M_l = \sum_{y=1}^K |\mathcal{B}_{y,l}|.Ml​=y=1∑K​∣By,l​∣.

The statement uses the reciprocal 1/Ml1/M_l1/Ml​ as a real number, with the convention that 1/0=01/0 = 01/0=0. Under the hypotheses, Ml>0M_l > 0Ml​>0: every class is nonempty and K≥2K \ge 2K≥2, so a batch made of lll copies of one class-yyy index and b−lb-lb−l copies of an index from another class always exists.

The auxiliary quantity. For B∈By,lB \in \mathcal{B}_{y,l}B∈By,l​, define S(Z;Y,B,y)=Satt+SrepS(Z;Y,B,y) = S_{\mathrm{att}} + S_{\mathrm{rep}}S(Z;Y,B,y)=Satt​+Srep​. Since l<bl < bl<b, the repulsion term takes its nonzero-case formula:

Satt(Z;Y,B,y)=−1l(l−1)∑i∈By  ∑j∈By∖{{i}}⟨zi,zj⟩,S_{\mathrm{att}}(Z;Y,B,y) = -\frac{1}{l(l-1)} \sum_{i \in B_y} \; \sum_{j \in B_y \setminus \{\{i\}\}} \langle z_i, z_j\rangle,Satt​(Z;Y,B,y)=−l(l−1)1​i∈By​∑​j∈By​∖{{i}}∑​⟨zi​,zj​⟩, Srep(Z;Y,B,y)=1l(b−l)∑i∈By  ∑j∈ByC⟨zi,zj⟩.S_{\mathrm{rep}}(Z;Y,B,y) = \frac{1}{l(b-l)} \sum_{i \in B_y} \; \sum_{j \in B_y^C} \langle z_i, z_j\rangle.Srep​(Z;Y,B,y)=l(b−l)1​i∈By​∑​j∈ByC​∑​⟨zi​,zj​⟩.

In these formulas:

  • all sums run over multisets with multiplicity;
  • By∖{{i}}B_y \setminus \{\{i\}\}By​∖{{i}} removes a single copy of iii, so other copies of the same index remain and contribute ⟨zi,zi⟩=ρ2\langle z_i, z_i\rangle = \rho^2⟨zi​,zi​⟩=ρ2.

Set

A=1Ml∑y=1K  ∑B∈By,lS(Z;Y,B,y).A = \frac{1}{M_l} \sum_{y=1}^K \; \sum_{B \in \mathcal{B}_{y,l}} S(Z;Y,B,y).A=Ml​1​y=1∑K​B∈By,l​∑​S(Z;Y,B,y).

The claim. The theorem asserts two things.

  1. The lower bound:
A  ≥  −KK−1 ρ2.A \;\ge\; -\frac{K}{K-1}\,\rho^2.A≥−K−1K​ρ2.
  1. Equality A=−KK−1ρ2A = -\frac{K}{K-1}\rho^2A=−K−1K​ρ2 holds if and only if both of the following hold:
    • any two points with the same label coincide, that is, yn=ym  ⟹  zn=zmy_n = y_m \implies z_n = z_myn​=ym​⟹zn​=zm​;
    • the points sum to zero, ∑n=1Nzn=0\sum_{n=1}^N z_n = 0∑n=1N​zn​=0.

The equality condition is stated only in terms of these two properties. It does not refer to the regular-simplex notion defined in the accompanying file. It also does not separately require that points with different labels be distinct, nor does it constrain the pairwise inner products between classes.

Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me