Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma B.4: when the lower bound of Lemma B.3 is attained

Proved
NeuralCollapseUFM.ce_risk_lower_bound_attained

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

cross-entropyneural-collapsesimplex-etfstrict-saddleunconstrained-feature-model

Under the assumptions of Lemma B.3 (K≥2K\ge2K≥2, n≥1n\ge1n≥1, λW,λH,λb>0\lambda_W,\lambda_H,\lambda_b>0λW​,λH​,λb​>0, (W,H,b)(W,H,b)(W,H,b) a critical point of fff, ρ=∥W∥F2\rho=\|W\|_F^2ρ=∥W∥F2​, c1>0c_1>0c1​>0), the lower bound

g(WH+b1⊤)≥−ρ(1+c1)(K−1)λWλHn+c2g(WH+b1^\top)\ge-\frac{\rho}{(1+c_1)(K-1)}\sqrt{\frac{\lambda_W}{\lambda_Hn}}+c_2g(WH+b1⊤)≥−(1+c1​)(K−1)ρ​λH​nλW​​​+c2​

is attained if and only if all of the following hold:

  1. ∥w1∥2=∥w2∥2=⋯=∥wK∥2\|w^1\|_2=\|w^2\|_2=\cdots=\|w^K\|_2∥w1∥2​=∥w2∥2​=⋯=∥wK∥2​;
  2. b=b1b=b1b=b1 for some b∈Rb\in\mathbb{R}b∈R;
  3. hˉi:=1K∑j=1Khj,i=0\bar h_i:=\frac1K\sum_{j=1}^Kh_{j,i}=0hˉi​:=K1​∑j=1K​hj,i​=0 for all i∈[n]i\in[n]i∈[n];
  4. λW/(λHn) wk=hk,i\sqrt{\lambda_W/(\lambda_Hn)}\,w^k=h_{k,i}λW​/(λH​n)​wk=hk,i​ for all k∈[K]k\in[K]k∈[K], i∈[n]i\in[n]i∈[n];
  5. WW⊤=ρK−1(IK−1K1K1K⊤)WW^\top=\frac{\rho}{K-1}\big(I_K-\frac1K1_K1_K^\top\big)WW⊤=K−1ρ​(IK​−K1​1K​1K⊤​);
  6. c1=[(K−1)exp⁡(−ρK−1λWλHn)]−1c_1=\Big[(K-1)\exp\Big(-\frac{\rho}{K-1}\sqrt{\frac{\lambda_W}{\lambda_Hn}}\Big)\Big]^{-1}c1​=[(K−1)exp(−K−1ρ​λH​nλW​​​)]−1.

These are the equality conditions (a)-(e) of the proof of Theorem 3.1.

Preamble
import Mathlib
import Definitions.Def_NeuralCollapseUFM_Basic

open Matrix Filter Topology
Formal statement
namespace NeuralCollapseUFM

theorem ce_risk_lower_bound_attained {K d n : ℕ} (hK : 2 ≤ K) (hn : 1 ≤ n)
    (lamW lamH lamb : ℝ) (hW : 0 < lamW) (hH : 0 < lamH) (hb : 0 < lamb)
    (x : Params K d n) (hx : IsCriticalPoint (objective lamW lamH lamb) x) (c1 : ℝ)
    (hc1 : 0 < c1) :
    ceRisk (logits x.1 x.2.1 x.2.2) =
        -(frobSq x.1) / ((1 + c1) * ((K : ℝ) - 1)) * Real.sqrt (lamW / (lamH * n)) + cTwo K c1 ↔
      (∀ k l, Real.sqrt (sqNorm (x.1 k)) = Real.sqrt (sqNorm (x.1 l))) ∧
      (∃ b0 : ℝ, x.2.2 = fun _ => b0) ∧
      (∀ i, (1 / (K : ℝ)) • (∑ j, fun r => x.2.1 r (j, i)) = 0) ∧
      (∀ k i, Real.sqrt (lamW / (lamH * n)) • x.1 k = fun r => x.2.1 r (k, i)) ∧
      x.1 * x.1ᵀ = (frobSq x.1 / ((K : ℝ) - 1)) • (1 - (1 / (K : ℝ)) • onesMat K) ∧
      c1 = (((K : ℝ) - 1) *
        Real.exp (-(frobSq x.1 / ((K : ℝ) - 1)) * Real.sqrt (lamW / (lamH * n))))⁻¹ := by sorry

end NeuralCollapseUFM
Source
Zhu, Ding, Zhou, Li, You, Sulam and Qu, A Geometric Analysis of Neural Collapse with Unconstrained Features, arXiv:2105.02375v1 (2021), Appendix B.2, Lemma B.4, p. 34 (bound (19), p. 32)
Read-back

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

Let K,d,nK, d, nK,d,n be natural numbers with K≥2K \ge 2K≥2 and n≥1n \ge 1n≥1. The feature dimension ddd is unrestricted and may be 000. Let λW,λH,λb\lambda_W, \lambda_H, \lambda_bλW​,λH​,λb​ be real numbers with

λW>0,λH>0,λb>0.\lambda_W > 0, \qquad \lambda_H > 0, \qquad \lambda_b > 0 .λW​>0,λH​>0,λb​>0.

Let x=(W,H,b)x = (W, H, b)x=(W,H,b) be an arbitrary parameter triple:

  • W∈RK×dW \in \mathbb{R}^{K \times d}W∈RK×d, with rows w1,…,wK∈Rdw^1, \dots, w^K \in \mathbb{R}^dw1,…,wK∈Rd;
  • H∈Rd×(K×n)H \in \mathbb{R}^{d \times (K \times n)}H∈Rd×(K×n), whose columns are indexed by pairs (k,i)(k,i)(k,i) with k∈{1,…,K}k \in \{1,\dots,K\}k∈{1,…,K} and i∈{1,…,n}i \in \{1,\dots,n\}i∈{1,…,n}; column (k,i)(k,i)(k,i) is written hk,i∈Rdh_{k,i} \in \mathbb{R}^dhk,i​∈Rd;
  • b∈RKb \in \mathbb{R}^Kb∈RK.

Let c1c_1c1​ be any real number with c1>0c_1 > 0c1​>0.

Definitions used. For a logit vector z∈RKz \in \mathbb{R}^Kz∈RK and a class kkk, the cross-entropy loss is

LCE(z,k)=−log⁡ezk∑j=1Kezj.L_{CE}(z, k) = -\log \frac{e^{z_k}}{\sum_{j=1}^K e^{z_j}} .LCE​(z,k)=−log∑j=1K​ezj​ezk​​.

The logit matrix is Z=WH+b1⊤∈RK×(K×n)Z = WH + b\mathbf{1}^\top \in \mathbb{R}^{K \times (K \times n)}Z=WH+b1⊤∈RK×(K×n), whose column (k,i)(k,i)(k,i) is Whk,i+bW h_{k,i} + bWhk,i​+b. The averaged risk is

g(Z)=1Kn∑k=1K∑i=1nLCE(Whk,i+b,  k).g(Z) = \frac{1}{Kn} \sum_{k=1}^K \sum_{i=1}^n L_{CE}\big(W h_{k,i} + b,\; k\big).g(Z)=Kn1​k=1∑K​i=1∑n​LCE​(Whk,i​+b,k).

The objective is

f(W,H,b)=g(WH+b1⊤)+λW2∥W∥F2+λH2∥H∥F2+λb2∥b∥22,f(W,H,b) = g(WH + b\mathbf{1}^\top) + \frac{\lambda_W}{2}\|W\|_F^2 + \frac{\lambda_H}{2}\|H\|_F^2 + \frac{\lambda_b}{2}\|b\|_2^2 ,f(W,H,b)=g(WH+b1⊤)+2λW​​∥W∥F2​+2λH​​∥H∥F2​+2λb​​∥b∥22​,

where ∥⋅∥F2\|\cdot\|_F^2∥⋅∥F2​ is the sum of squared entries and ∥⋅∥22\|\cdot\|_2^2∥⋅∥22​ is the sum of squared coordinates.

The constant c2c_2c2​ is

c2(K,c1)=11+c1log⁡((1+c1)(K−1))+c11+c1log⁡1+c1c1.c_2(K, c_1) = \frac{1}{1+c_1}\log\big((1+c_1)(K-1)\big) + \frac{c_1}{1+c_1}\log\frac{1+c_1}{c_1}.c2​(K,c1​)=1+c1​1​log((1+c1​)(K−1))+1+c1​c1​​logc1​1+c1​​.

Write 11⊤\mathbf{1}\mathbf{1}^\top11⊤ for the K×KK\times KK×K all-ones matrix and IKI_KIK​ for the identity matrix.

Hypothesis. xxx is a critical point of fff in the following directional sense. For every direction Δ=(ΔW,ΔH,Δb)\Delta = (\Delta_W, \Delta_H, \Delta_b)Δ=(ΔW​,ΔH​,Δb​) in the parameter space, the real function t↦f(x+tΔ)t \mapsto f(x + t\Delta)t↦f(x+tΔ) is differentiable at t=0t = 0t=0 with derivative 000. Nothing requires xxx to be a local or global minimizer.

Conclusion. The following equation holds

g(WH+b1⊤)  =  −∥W∥F2(1+c1)(K−1)λWλHn  +  c2(K,c1)g(WH + b\mathbf{1}^\top) \;=\; -\frac{\|W\|_F^2}{(1+c_1)(K-1)}\sqrt{\frac{\lambda_W}{\lambda_H n}} \;+\; c_2(K, c_1)g(WH+b1⊤)=−(1+c1​)(K−1)∥W∥F2​​λH​nλW​​​+c2​(K,c1​)

if and only if all six of the following conditions hold simultaneously:

  1. All rows of WWW have the same Euclidean norm: ∥wk∥2=∥wl∥2\|w^k\|_2 = \|w^l\|_2∥wk∥2​=∥wl∥2​ for all classes k,lk, lk,l.
  2. The bias is a constant vector: there is a real b0b_0b0​ with b=b01b = b_0 \mathbf{1}b=b0​1. No condition such as b0=0b_0 = 0b0​=0 is imposed.
  3. For every sample index i∈{1,…,n}i \in \{1,\dots,n\}i∈{1,…,n}, the average of the features across classes vanishes:
1K∑j=1Khj,i=0∈Rd.\frac{1}{K}\sum_{j=1}^K h_{j,i} = 0 \in \mathbb{R}^d.K1​j=1∑K​hj,i​=0∈Rd.
  1. Every feature is a fixed multiple of its class's classifier row: for all k,ik, ik,i,
hk,i=λWλHn  wk.h_{k,i} = \sqrt{\frac{\lambda_W}{\lambda_H n}}\; w^k .hk,i​=λH​nλW​​​wk.
  1. The Gram matrix of WWW has the form
WW⊤=∥W∥F2K−1(IK−1K11⊤).W W^\top = \frac{\|W\|_F^2}{K-1}\Big(I_K - \frac{1}{K}\mathbf{1}\mathbf{1}^\top\Big).WW⊤=K−1∥W∥F2​​(IK​−K1​11⊤).
  1. The constant c1c_1c1​ equals a specific value determined by WWW:
c1=1(K−1)exp⁡ ⁣(−∥W∥F2K−1λWλHn).c_1 = \frac{1}{(K-1)\exp\!\Big(-\dfrac{\|W\|_F^2}{K-1}\sqrt{\dfrac{\lambda_W}{\lambda_H n}}\Big)} .c1​=(K−1)exp(−K−1∥W∥F2​​λH​nλW​​​)1​.

Remarks on the literal content.

  • c1>0c_1 > 0c1​>0 is universally quantified. Condition 6 is part of the right-hand side, so for a fixed xxx the equivalence can only have a true right-hand side for the single value of c1c_1c1​ named in condition 6. For every other c1>0c_1 > 0c1​>0, the statement asserts that the displayed equation fails.
  • All logarithms and the inverse in condition 6 have strictly positive arguments, because K≥2K \ge 2K≥2 and c1>0c_1 > 0c1​>0.
  • When d=0d = 0d=0 (or more generally when W=0W = 0W=0), we have ∥W∥F=0\|W\|_F = 0∥W∥F​=0. In that case:
    • the left-hand equation reads g(b1⊤)=c2(K,c1)g(b\mathbf{1}^\top) = c_2(K, c_1)g(b1⊤)=c2​(K,c1​);
    • conditions 1, 3, 4 and 5 hold automatically when W=0W = 0W=0 and H=0H = 0H=0;
    • condition 6 reads c1=1/(K−1)c_1 = 1/(K-1)c1​=1/(K−1).
  • The hypothesis λb>0\lambda_b > 0λb​>0 is assumed, but condition 2 permits any constant bias b0b_0b0​.
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