Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unconstrained feature model with regularized cross-entropy: objective, nuclear norm, Simplex ETF Gram matrix, landscape notions

Definition
NeuralCollapseUFM_Basic

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

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

Objects of Sections 2.2 and 3 and Appendices A-C of Zhu, Ding, Zhou, Li, You, Sulam and Qu (2021).

  1. Cross-entropy (eq. 3). For logits z∈RKz\in\mathbb{R}^Kz∈RK and the one-hot label yky_kyk​, LCE(z,yk)=−log⁡(ezk/∑i=1Kezi)\mathcal L_{CE}(z,y_k)=-\log\big(e^{z_k}/\sum_{i=1}^K e^{z_i}\big)LCE​(z,yk​)=−log(ezk​/∑i=1K​ezi​).
  2. Norms. ∥v∥22=∑ivi2\|v\|_2^2=\sum_i v_i^2∥v∥22​=∑i​vi2​, ∥A∥F2=∑i,jAij2\|A\|_F^2=\sum_{i,j}A_{ij}^2∥A∥F2​=∑i,j​Aij2​, ∥A∥\|A\|∥A∥ is the spectral (operator ℓ2→ℓ2\ell^2\to\ell^2ℓ2→ℓ2) norm, and ∥Z∥∗=∑kσk(Z)\|Z\|_*=\sum_k\sigma_k(Z)∥Z∥∗​=∑k​σk​(Z) is the nuclear norm.
  3. Simplex ETF (Definition A.1). 1K1K⊤1_K1_K^\top1K​1K⊤​ is the all-ones matrix, and KK−1(IK−1K1K1K⊤)\frac{K}{K-1}\big(I_K-\frac1K1_K1_K^\top\big)K−1K​(IK​−K1​1K​1K⊤​) is the Gram matrix M⊤MM^\top MM⊤M of the standard KKK-Simplex ETF M=KK−1(IK−1K1K1K⊤)M=\sqrt{\frac{K}{K-1}}\big(I_K-\frac1K1_K1_K^\top\big)M=K−1K​​(IK​−K1​1K​1K⊤​).
  4. Unconstrained feature model (eqs. 4, 14, 15). There are KKK classes with nnn samples each, N=nKN=nKN=nK. The parameters are a classifier W∈RK×dW\in\mathbb{R}^{K\times d}W∈RK×d with rows (wk)⊤(w^k)^\top(wk)⊤, features H=[h1,1⋯hK,n]∈Rd×NH=[h_{1,1}\cdots h_{K,n}]\in\mathbb{R}^{d\times N}H=[h1,1​⋯hK,n​]∈Rd×N and a bias b∈RKb\in\mathbb{R}^Kb∈RK. The averaged cross-entropy of a logit matrix Z∈RK×NZ\in\mathbb{R}^{K\times N}Z∈RK×N with columns zk,iz_{k,i}zk,i​ is g(Z)=1N∑k=1K∑i=1nLCE(zk,i,yk)g(Z)=\frac1N\sum_{k=1}^K\sum_{i=1}^n\mathcal L_{CE}(z_{k,i},y_k)g(Z)=N1​∑k=1K​∑i=1n​LCE​(zk,i​,yk​), and 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+b1^\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​.
  1. Gradient of ggg. [∇g(Z)]j,(k,i)=1N(softmax⁡(zk,i)j−1[j=k])[\nabla g(Z)]_{j,(k,i)}=\frac1N\big(\operatorname{softmax}(z_{k,i})_j-\mathbb 1[j=k]\big)[∇g(Z)]j,(k,i)​=N1​(softmax(zk,i​)j​−1[j=k]).
  2. Constant of Lemma B.5. c2(c1)=11+c1log⁡((1+c1)(K−1))+c11+c1log⁡1+c1c1c_2(c_1)=\frac1{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​(c1​)=1+c1​1​log((1+c1​)(K−1))+1+c1​c1​​logc1​1+c1​​.
  3. Convex counterpart (eq. 37). f~(Z,b)=g(Z+b1⊤)+λWλH∥Z∥∗+λb2∥b∥22\tilde f(Z,b)=g(Z+b1^\top)+\sqrt{\lambda_W\lambda_H}\|Z\|_*+\frac{\lambda_b}2\|b\|_2^2f~​(Z,b)=g(Z+b1⊤)+λW​λH​​∥Z∥∗​+2λb​​∥b∥22​.
  4. Landscape notions. A critical point is a point where every directional derivative of fff vanishes. A global minimizer minimizes fff over all parameters. A strict saddle (footnote 3) is a critical point at which the Hessian has a negative eigenvalue, that is, d2dt2f(x+tΔ)∣t=0<0\frac{d^2}{dt^2}f(x+t\Delta)\big|_{t=0}<0dt2d2​f(x+tΔ)​t=0​<0 for some direction Δ\DeltaΔ.
  5. Collapsed solution (Theorem 3.1). (W,H,b)(W,H,b)(W,H,b) is collapsed if there are w,b0∈Rw,b_0\in\mathbb{R}w,b0​∈R with ∥wk∥2=w\|w^k\|_2=w∥wk∥2​=w for all kkk, b=b01b=b_01b=b0​1 with b0=0b_0=0b0​=0 or λb=0\lambda_b=0λb​=0, hk,i=λW/(λHn) wkh_{k,i}=\sqrt{\lambda_W/(\lambda_Hn)}\,w^khk,i​=λW​/(λH​n)​wk for all k,ik,ik,i, hˉi=1K∑jhj,i=0\bar h_i=\frac1K\sum_jh_{j,i}=0hˉi​=K1​∑j​hj,i​=0 for all iii, and
WW⊤=w2 KK−1(IK−1K1K1K⊤).WW^\top=w^2\,\frac{K}{K-1}\Big(I_K-\frac1K1_K1_K^\top\Big).WW⊤=w2K−1K​(IK​−K1​1K​1K⊤​).

Formalization Note The parameters are the triple (W,H,b)(W,H,b)(W,H,b) with the product topology. Column (k,i)(k,i)(k,i) of HHH is the feature hk,ih_{k,i}hk,i​. The nuclear norm is the sum of the square roots of the eigenvalues of ZZ⊤ZZ^\topZZ⊤ (the roots of its characteristic polynomial, with multiplicity). The gradient ∇g\nabla g∇g is written out explicitly. The collapsed form is stated with WW⊤WW^\topWW⊤ multiplied by w2w^2w2 instead of normalizing WWW by 1/w1/w1/w, so that it is defined when w=0w=0w=0 (see Theorem 3.1).

Definition code
import Mathlib

/-!
Zhu, Ding, Zhou, Li, You, Sulam and Qu, *A Geometric Analysis of Neural Collapse with
Unconstrained Features*, arXiv:2105.02375v1 (2021): the cross-entropy loss (eq. (3)), the
unconstrained feature model with weight decay (eq. (4), restated as eqs. (14)-(15)), the Simplex
ETF (Definition A.1), the nuclear norm (Lemma A.3), the constant `c_2` of Lemma B.5, the
convex counterpart (37), and the notions of critical point, local and global minimizer and
strict saddle used in Section 3 (footnote 3, p. 4).
-/

open Matrix

noncomputable section

namespace NeuralCollapseUFM

variable {K d n : ℕ}

/-- Eq. (3), p. 7: the cross-entropy loss of a logit vector `z ∈ ℝ^K` for the one-hot label
`y_k`, `L_CE(z, y_k) = -log(exp(z_k) / ∑_i exp(z_i))`. -/
def ceLoss (z : Fin K → ℝ) (k : Fin K) : ℝ :=
  -Real.log (Real.exp (z k) / ∑ i, Real.exp (z i))

/-- Squared Euclidean norm `‖v‖₂²` of a vector (Notations, p. 6). -/
def sqNorm {m : Type*} [Fintype m] (v : m → ℝ) : ℝ := ∑ i, v i ^ 2

/-- Squared Frobenius norm `‖A‖_F²` of a real matrix (Notations, p. 6). -/
def frobSq {m p : Type*} [Fintype m] [Fintype p] (A : Matrix m p ℝ) : ℝ :=
  ∑ i, ∑ j, A i j ^ 2

/-- The all-ones matrix `1_K 1_K^T` (Notations, p. 6). -/
def onesMat (K : ℕ) : Matrix (Fin K) (Fin K) ℝ := Matrix.of fun _ _ => 1

/-- Definition A.1, p. 28: the Gram matrix `M^T M = K/(K-1) (I_K - (1/K) 1_K 1_K^T)` of the
standard `K`-Simplex ETF `M = sqrt(K/(K-1)) (I_K - (1/K) 1_K 1_K^T)`. -/
def etfGram (K : ℕ) : Matrix (Fin K) (Fin K) ℝ :=
  ((K : ℝ) / ((K : ℝ) - 1)) • ((1 : Matrix (Fin K) (Fin K) ℝ) - (1 / (K : ℝ)) • onesMat K)

/-- Section 2.2, p. 8: the parameters `(W, H, b)` of the unconstrained feature model, with
classifier `W ∈ ℝ^{K×d}` (rows `w^k`), features `H = [h_{1,1} ⋯ h_{K,n}] ∈ ℝ^{d×N}`, `N = nK`,
whose column `(k, i)` is the feature `h_{k,i}` of the `i`-th sample of class `k`, and bias
`b ∈ ℝ^K`. -/
abbrev Params (K d n : ℕ) : Type :=
  Matrix (Fin K) (Fin d) ℝ × Matrix (Fin d) (Fin K × Fin n) ℝ × (Fin K → ℝ)

/-- Eq. (14), p. 30: the logit matrix `W H + b 1^T ∈ ℝ^{K×N}`; its column `(k, i)` is
`W h_{k,i} + b`. -/
def logits (W : Matrix (Fin K) (Fin d) ℝ) (H : Matrix (Fin d) (Fin K × Fin n) ℝ)
    (b : Fin K → ℝ) : Matrix (Fin K) (Fin K × Fin n) ℝ :=
  W * H + Matrix.of fun j _ => b j

/-- Eq. (15), p. 30: the averaged cross-entropy
`g(Z) = (1/N) ∑_{k=1}^K ∑_{i=1}^n L_CE(z_{k,i}, y_k)` of a logit matrix `Z ∈ ℝ^{K×N}`, `N = Kn`,
whose column `(k, i)` is `z_{k,i}`. -/
def ceRisk (Z : Matrix (Fin K) (Fin K × Fin n) ℝ) : ℝ :=
  (1 / ((K : ℝ) * n)) * ∑ k, ∑ i, ceLoss (fun j => Z j (k, i)) k

/-- Eq. (4), p. 8 (restated as eq. (14), p. 30): the regularized cross-entropy objective
`f(W, H, b) = g(W H + b 1^T) + (λ_W/2) ‖W‖_F² + (λ_H/2) ‖H‖_F² + (λ_b/2) ‖b‖₂²`. -/
def objective (lamW lamH lamb : ℝ) (x : Params K d n) : ℝ :=
  ceRisk (logits x.1 x.2.1 x.2.2) + lamW / 2 * frobSq x.1 + lamH / 2 * frobSq x.2.1 +
    lamb / 2 * sqNorm x.2.2

/-- Eqs. (17)-(18), p. 32: the gradient `∇g(Z) ∈ ℝ^{K×N}` of the averaged cross-entropy (15),
written out: its entry `(j, (k, i))` is `(1/N) (softmax(z_{k,i})_j - [j = k])`. -/
def ceRiskGrad (Z : Matrix (Fin K) (Fin K × Fin n) ℝ) : Matrix (Fin K) (Fin K × Fin n) ℝ :=
  Matrix.of fun j c =>
    (1 / ((K : ℝ) * n)) *
      (Real.exp (Z j c) / ∑ l, Real.exp (Z l c) - if j = c.1 then 1 else 0)

/-- The spectral (operator) norm `‖A‖` of a real matrix, as the operator norm of
`A : ℓ²(p) → ℓ²(m)` (used in eq. (43), p. 41 and in Lemma C.3). -/
def opNorm {m p : Type*} [Fintype m] [Fintype p] [DecidableEq p] (A : Matrix m p ℝ) : ℝ :=
  ‖LinearMap.toContinuousLinearMap (Matrix.toEuclideanLin A)‖

/-- Lemma A.3, p. 28: the nuclear norm `‖Z‖_* = ∑_k σ_k(Z)`, computed as the sum of the square
roots of the eigenvalues of `Z Z^T` (the roots of its characteristic polynomial, with
multiplicity). -/
def nuclearNorm {m p : Type*} [Fintype m] [DecidableEq m] [Fintype p] (Z : Matrix m p ℝ) : ℝ :=
  (((Z * Zᵀ).charpoly.roots).map Real.sqrt).sum

/-- Lemma B.5, p. 36: the constant
`c_2 = (1/(1+c_1)) log((1+c_1)(K-1)) + (c_1/(1+c_1)) log((1+c_1)/c_1)`. -/
def cTwo (K : ℕ) (c1 : ℝ) : ℝ :=
  1 / (1 + c1) * Real.log ((1 + c1) * ((K : ℝ) - 1)) + c1 / (1 + c1) * Real.log ((1 + c1) / c1)

/-- Eq. (37), p. 38: the convex counterpart
`f̃(Z, b) = g(Z + b 1^T) + sqrt(λ_W λ_H) ‖Z‖_* + (λ_b/2) ‖b‖₂²`. -/
def convexObjective (lamW lamH lamb : ℝ) (Z : Matrix (Fin K) (Fin K × Fin n) ℝ)
    (b : Fin K → ℝ) : ℝ :=
  ceRisk (Z + Matrix.of fun j _ => b j) + Real.sqrt (lamW * lamH) * nuclearNorm Z +
    lamb / 2 * sqNorm b

/-- A critical point `∇F(x) = 0` (Section 3.2 and Appendix C, p. 38), written as the vanishing of
every directional derivative `d/dt F(x + t Δ)|_{t=0}`. -/
def IsCriticalPoint {E : Type*} [AddCommGroup E] [Module ℝ E] (F : E → ℝ) (x : E) : Prop :=
  ∀ Δ : E, HasDerivAt (fun t : ℝ => F (x + t • Δ)) 0 0

/-- A global minimizer of `F` (Theorem 3.1, p. 9). -/
def IsGlobalMinimizer {E : Type*} (F : E → ℝ) (x : E) : Prop :=
  ∀ y : E, F x ≤ F y

/-- Footnote 3, p. 4: the Hessian of `F` at `x` has a negative eigenvalue, i.e. there is a
direction `Δ` with negative curvature `∇²F(x)[Δ, Δ] = d²/dt² F(x + t Δ)|_{t=0} < 0`. -/
def HasNegativeCurvature {E : Type*} [AddCommGroup E] [Module ℝ E] (F : E → ℝ) (x : E) :
    Prop :=
  ∃ Δ : E, deriv (deriv fun t : ℝ => F (x + t • Δ)) 0 < 0

/-- Footnote 3, p. 4: a strict saddle is a critical point at which the Hessian has at least one
negative eigenvalue. -/
def IsStrictSaddle {E : Type*} [AddCommGroup E] [Module ℝ E] (F : E → ℝ) (x : E) : Prop :=
  IsCriticalPoint F x ∧ HasNegativeCurvature F x

/-- Theorem 3.1, eqs. (5)-(6), p. 9, in the form established by its proof (Appendix B,
conditions (a)-(d), p. 31): all rows of `W` have the same norm `w`, `b = b 1` with `b = 0` or
`λ_b = 0`, `h_{k,i} = sqrt(λ_W/(λ_H n)) w^k`, the class-wise means `h̄_i = (1/K) ∑_j h_{j,i}`
vanish, and `W W^T = w² · K/(K-1) (I_K - (1/K) 1_K 1_K^T)`. -/
def IsCollapsedSolution (lamW lamH lamb : ℝ) (x : Params K d n) : Prop :=
  ∃ w b0 : ℝ,
    (∀ k, Real.sqrt (sqNorm (x.1 k)) = w) ∧
    (x.2.2 = fun _ => b0) ∧ (b0 = 0 ∨ lamb = 0) ∧
    (∀ k i, (fun r => x.2.1 r (k, i)) = Real.sqrt (lamW / (lamH * n)) • x.1 k) ∧
    (∀ i, (1 / (K : ℝ)) • (∑ j, fun r => x.2.1 r (j, i)) = 0) ∧
    x.1 * x.1ᵀ = w ^ 2 • etfGram K

end NeuralCollapseUFM
Source
Zhu, Ding, Zhou, Li, You, Sulam and Qu, A Geometric Analysis of Neural Collapse with Unconstrained Features, arXiv:2105.02375v1 (2021), Sections 2.2 and 3 (eqs. (3)-(6), footnote 3), Appendix A (Definition A.1, Lemma A.3), Appendix B (eqs. (14)-(15), Lemma B.5), Appendix C (eq. (37))
Read-back

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

This bundle contains only definitions and asserts no theorem. Throughout, K,d,nK, d, nK,d,n are arbitrary natural numbers, and each may be 000. Real division by zero is taken to be 000. The real logarithm satisfies log⁡0=0\log 0 = 0log0=0 and log⁡x=log⁡∣x∣\log x = \log|x|logx=log∣x∣ for x<0x<0x<0. The real square root satisfies x=0\sqrt{x} = 0x​=0 for x≤0x \le 0x≤0.

ceLoss (cross-entropy). For a vector z∈RKz \in \mathbb{R}^Kz∈RK and a class index k∈{1,…,K}k \in \{1,\dots,K\}k∈{1,…,K}, it is defined as

LCE(z,k)=−log⁡ ⁣(ezk∑i=1Kezi).L_{\mathrm{CE}}(z,k) = -\log\!\left(\frac{e^{z_k}}{\sum_{i=1}^K e^{z_i}}\right).LCE​(z,k)=−log(∑i=1K​ezi​ezk​​).

Because some index kkk exists, K≥1K \ge 1K≥1, so the denominator is strictly positive and no junk value arises.

sqNorm. For a vector vvv indexed by any finite set mmm, it is ∥v∥22=∑i∈mvi2\|v\|_2^2 = \sum_{i \in m} v_i^2∥v∥22​=∑i∈m​vi2​. It is 000 when mmm is empty.

frobSq. For a real matrix AAA with finite row set mmm and finite column set ppp, it is ∥A∥F2=∑i∈m∑j∈pAij2\|A\|_F^2 = \sum_{i\in m}\sum_{j\in p} A_{ij}^2∥A∥F2​=∑i∈m​∑j∈p​Aij2​.

onesMat. This is the K×KK\times KK×K matrix JK=1K1K⊤J_K = \mathbf 1_K \mathbf 1_K^\topJK​=1K​1K⊤​, all of whose entries are 111.

etfGram. It is the K×KK \times KK×K real matrix

GK=KK−1(IK−1KJK),G_K = \frac{K}{K-1}\left(I_K - \frac1K J_K\right),GK​=K−1K​(IK​−K1​JK​),

computed with real arithmetic.

  • For K≥2K \ge 2K≥2, its diagonal entries are 111 and its off-diagonal entries are −1K−1-\tfrac{1}{K-1}−K−11​.
  • For K=1K = 1K=1, the factor KK−1=10\tfrac{K}{K-1} = \tfrac10K−1K​=01​ is taken to be 000, so G1=0G_1 = 0G1​=0.
  • For K=0K = 0K=0, it is the empty matrix.

Params. A parameter is a triple (W,H,b)(W, H, b)(W,H,b):

  • W∈RK×dW \in \mathbb{R}^{K\times d}W∈RK×d, whose kkk-th row is written wk∈Rdw^k \in \mathbb{R}^dwk∈Rd;
  • HHH, a real d×(K⋅n)d \times (K\cdot n)d×(K⋅n) matrix whose columns are indexed by pairs (k,i)(k,i)(k,i) with k∈{1,…,K}k \in \{1,\dots,K\}k∈{1,…,K}, 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.

logits. For such W,H,bW, H, bW,H,b, it is the K×(K⋅n)K \times (K\cdot n)K×(K⋅n) matrix Z=WH+b1⊤Z = WH + b\mathbf 1^\topZ=WH+b1⊤, whose entry in row jjj and column (k,i)(k,i)(k,i) is

Zj,(k,i)=∑r=1dWjr Hr,(k,i)+bj,Z_{j,(k,i)} = \sum_{r=1}^d W_{jr}\, H_{r,(k,i)} + b_j,Zj,(k,i)​=r=1∑d​Wjr​Hr,(k,i)​+bj​,

so that column (k,i)(k,i)(k,i) equals Whk,i+bW h_{k,i} + bWhk,i​+b.

ceRisk. For a K×(K⋅n)K \times (K\cdot n)K×(K⋅n) matrix ZZZ with column (k,i)(k,i)(k,i) written zk,iz_{k,i}zk,i​, it is

g(Z)=1Kn∑k=1K∑i=1nLCE(zk,i,k).g(Z) = \frac{1}{Kn}\sum_{k=1}^K\sum_{i=1}^n L_{\mathrm{CE}}(z_{k,i}, k).g(Z)=Kn1​k=1∑K​i=1∑n​LCE​(zk,i​,k).

The column (k,i)(k,i)(k,i) is thus paired with the label kkk. If K=0K=0K=0 or n=0n=0n=0, the sum is empty and g(Z)=0g(Z)=0g(Z)=0; the prefactor 10\tfrac{1}{0}01​ is also 000.

objective. For arbitrary real numbers λW,λH,λb\lambda_W, \lambda_H, \lambda_bλW​,λH​,λb​ (no sign or positivity condition) and a parameter (W,H,b)(W,H,b)(W,H,b), it 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​.

ceRiskGrad. For a K×(K⋅n)K\times(K\cdot n)K×(K⋅n) matrix ZZZ, it is the K×(K⋅n)K\times(K\cdot n)K×(K⋅n) matrix whose entry in row jjj and column (k,i)(k,i)(k,i) is

1Kn(eZj,(k,i)∑l=1KeZl,(k,i)−[ j=k ]),\frac{1}{Kn}\left(\frac{e^{Z_{j,(k,i)}}}{\sum_{l=1}^K e^{Z_{l,(k,i)}}} - [\,j = k\,]\right),Kn1​(∑l=1K​eZl,(k,i)​eZj,(k,i)​​−[j=k]),

where [j=k][j=k][j=k] is 111 if j=kj=kj=k and 000 otherwise. This is only an explicit formula. Nothing in the bundle asserts that it is the gradient of ggg.

opNorm. For a real matrix AAA with finite row set mmm and finite column set ppp, it is the operator norm of the linear map x↦Axx \mapsto Axx↦Ax from Euclidean Rp\mathbb{R}^pRp to Euclidean Rm\mathbb{R}^mRm, both with the ℓ2\ell^2ℓ2 norm:

∥A∥=sup⁡∥x∥2≤1∥Ax∥2.\|A\| = \sup_{\|x\|_2 \le 1}\|Ax\|_2.∥A∥=∥x∥2​≤1sup​∥Ax∥2​.

nuclearNorm. For a real m×pm\times pm×p matrix ZZZ, it is computed as follows:

  1. Take the characteristic polynomial of the m×mm\times mm×m matrix ZZ⊤ZZ^\topZZ⊤.
  2. Take its real roots, listed with multiplicity, μ1,…,μr\mu_1,\dots,\mu_rμ1​,…,μr​.
  3. Define
∥Z∥∗=∑s=1rμs.\|Z\|_* = \sum_{s=1}^r \sqrt{\mu_s}.∥Z∥∗​=s=1∑r​μs​​.

Since ZZ⊤ZZ^\topZZ⊤ is symmetric positive semidefinite, its characteristic polynomial has mmm real nonnegative roots counted with multiplicity. Zero eigenvalues contribute 000 to the sum.

cTwo. For a natural number KKK and a real number c1c_1c1​, it 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\!\left(\frac{1+c_1}{c_1}\right).c2​(K,c1​)=1+c1​1​log((1+c1​)(K−1))+1+c1​c1​​log(c1​1+c1​​).

No restriction is placed on c1c_1c1​ or KKK, so the junk conventions apply:

  • c1=−1c_1=-1c1​=−1 makes both coefficients 000;
  • c1=0c_1 = 0c1​=0 gives log⁡10=log⁡0=0\log\tfrac{1}{0} = \log 0 = 0log01​=log0=0;
  • K=1K=1K=1 gives log⁡0=0\log 0 = 0log0=0;
  • negative arguments of log⁡\loglog are replaced by their absolute values.

convexObjective. For arbitrary real λW,λH,λb\lambda_W,\lambda_H,\lambda_bλW​,λH​,λb​, a K×(K⋅n)K\times(K\cdot n)K×(K⋅n) matrix ZZZ and b∈RKb\in\mathbb{R}^Kb∈RK, it is

f~(Z,b)=g(Z+b1⊤)+λWλH ∥Z∥∗+λb2∥b∥22.\tilde f(Z,b) = g(Z + b\mathbf 1^\top) + \sqrt{\lambda_W\lambda_H}\,\|Z\|_* + \frac{\lambda_b}{2}\|b\|_2^2.f~​(Z,b)=g(Z+b1⊤)+λW​λH​​∥Z∥∗​+2λb​​∥b∥22​.

Here ∥Z∥∗\|Z\|_*∥Z∥∗​ is the root-sum defined above, and λWλH\sqrt{\lambda_W\lambda_H}λW​λH​​ is 000 whenever λWλH≤0\lambda_W\lambda_H \le 0λW​λH​≤0.

IsCriticalPoint. For a function F:E→RF : E\to\mathbb{R}F:E→R on any real vector space EEE (no norm or topology on EEE is used), xxx is a critical point iff, for every direction Δ∈E\Delta\in EΔ∈E, the one-variable function

φΔ(t)=F(x+tΔ)\varphi_\Delta(t) = F(x + t\Delta)φΔ​(t)=F(x+tΔ)

is differentiable at t=0t=0t=0 with φΔ′(0)=0\varphi_\Delta'(0) = 0φΔ′​(0)=0. This requires every directional derivative at xxx to exist and vanish. It does not require FFF to be differentiable at xxx in any stronger sense.

IsGlobalMinimizer. For any type EEE and F:E→RF: E \to \mathbb{R}F:E→R, xxx is a global minimizer iff F(x)≤F(y)F(x) \le F(y)F(x)≤F(y) for all y∈Ey\in Ey∈E. The inequality is non-strict, so minimizers need not be unique.

HasNegativeCurvature. For F:E→RF : E\to\mathbb{R}F:E→R on a real vector space, this holds at xxx iff there exists a direction Δ∈E\Delta\in EΔ∈E with

(φΔ′)′(0)<0,φΔ(t)=F(x+tΔ).\big(\varphi_\Delta'\big)'(0) < 0, \qquad \varphi_\Delta(t) = F(x+t\Delta).(φΔ′​)′(0)<0,φΔ​(t)=F(x+tΔ).

The derivatives follow the convention that the derivative of a function at a point where it is not differentiable is 000:

  • The inner derivative φΔ′(t)\varphi_\Delta'(t)φΔ′​(t) is that everywhere-defined function, set to 000 at points of non-differentiability.
  • The outer derivative must exist at 000 and be strictly negative, since a non-differentiable outer function would yield 000, which is not <0<0<0.

No twice-differentiability of FFF, Hessian, or eigenvalue appears.

IsStrictSaddle. xxx is a strict saddle of FFF iff xxx is a critical point of FFF in the sense above and FFF has negative curvature at xxx in the sense above. It does not require that xxx fail to be a local minimizer.

IsCollapsedSolution. For arbitrary real λW,λH,λb\lambda_W,\lambda_H,\lambda_bλW​,λH​,λb​ and a parameter (W,H,b)(W,H,b)(W,H,b), this holds iff there exist real numbers www and b0b_0b0​ such that all of the following hold:

  1. Every row has the same Euclidean norm: ∥wk∥2=w\|w^k\|_2 = w∥wk∥2​=w for every kkk. When K≥1K\ge1K≥1, this forces w≥0w\ge 0w≥0.
  2. b=b01Kb = b_0\mathbf 1_Kb=b0​1K​, meaning every entry of bbb equals b0b_0b0​.
  3. b0=0b_0 = 0b0​=0 or λb=0\lambda_b = 0λb​=0.
  4. For every kkk and iii,
hk,i=λWλH n  wk,h_{k,i} = \sqrt{\frac{\lambda_W}{\lambda_H\, n}}\; w^k,hk,i​=λH​nλW​​​wk,

where wkw^kwk is read as a vector in Rd\mathbb{R}^dRd. The square root is 000 if λHn=0\lambda_H n = 0λH​n=0 or if the ratio is ≤0\le 0≤0; in those cases every hk,ih_{k,i}hk,i​ must be 000. 5. For every iii,

1K∑j=1Khj,i=0.\frac1K\sum_{j=1}^K h_{j,i} = 0.K1​j=1∑K​hj,i​=0.
  1. The Gram matrix of the rows of WWW satisfies
WW⊤=w2 GK.WW^\top = w^2\, G_K.WW⊤=w2GK​.

For K≥2K\ge2K≥2, this says ⟨wj,wk⟩=w2\langle w^j,w^k\rangle = w^2⟨wj,wk⟩=w2 when j=kj=kj=k and −w2K−1-\tfrac{w^2}{K-1}−K−1w2​ when j≠kj\ne kj=k. For K=1K=1K=1, because G1=0G_1=0G1​=0, it forces W=0W=0W=0 and hence w=0w=0w=0.

This predicate is purely structural. It makes no reference to the value of the objective fff, to minimality, or to criticality.

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