Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: neural collapse for the cross-entropy loss

Proved
NeuralCollapseCE.ce_minimizers_are_simplex_etf

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

cross-entropyjensen-inequalityneural-collapsesimplex-etfuniform-distribution-on-sphere

Let n≥2n\ge2n≥2 and d≥n−1d\ge n-1d≥n−1. Consider the problem of minimising the cross-entropy loss

L(u,v)=∑i=1nlog⁡∑j=1ne⟨vj,ui⟩e⟨vi,ui⟩\mathcal{L}(u,v)=\sum_{i=1}^n\log\frac{\sum_{j=1}^n e^{\langle v_j,u_i\rangle}}{e^{\langle v_i,u_i\rangle}}L(u,v)=i=1∑n​loge⟨vi​,ui​⟩∑j=1n​e⟨vj​,ui​⟩​

over ui,vi∈Rdu_i,v_i\in\mathbb{R}^dui​,vi​∈Rd with ∥ui∥=∥vi∥=1\|u_i\|=\|v_i\|=1∥ui​∥=∥vi​∥=1, i=1,…,ni=1,\dots,ni=1,…,n. A pair (u,v)(u,v)(u,v) is a global minimiser if and only if {ui}i=1n\{u_i\}_{i=1}^n{ui​}i=1n​ is a simplex equiangular tight frame and vi=uiv_i=u_ivi​=ui​ for all iii.

This is the neural collapse phenomenon for unconstrained features with cross-entropy loss: at the optimum the class features form a simplex ETF and coincide with the classifier vectors.

Formalization Note "The global minimum corresponds to" is stated as an equivalence. The hypothesis n≥2n\ge2n≥2 is implicit in the paper and necessary: for n=1n=1n=1 the loss is identically 000, so every pair of unit vectors, including v1≠u1v_1\ne u_1v1​=u1​, is a minimiser.

Preamble
import Mathlib
import Definitions.Def_NeuralCollapseCE_Basic

open MeasureTheory Filter Topology Asymptotics
Formal statement
namespace NeuralCollapseCE

theorem ce_minimizers_are_simplex_etf {n d : ℕ} (hn : 2 ≤ n) (hd : n ≤ d + 1)
    (u v : Fin n → Vec d) :
    IsCEMinimizer u v ↔ (IsSimplexETF u ∧ v = u) := by sorry

end NeuralCollapseCE
Source
Lu and Steinerberger, Neural collapse with cross-entropy loss, arXiv:2012.08465v2 (2021), Section 1.2, Theorem 1, eq. (2), p. 2; proof in Section 3, pp. 6-8
Read-back

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

For natural numbers nnn and ddd with

2≤nandn≤d+1,2 \le n \qquad\text{and}\qquad n \le d+1,2≤nandn≤d+1,

let u=(u1,…,un)u = (u_1, \dots, u_n)u=(u1​,…,un​) and v=(v1,…,vn)v = (v_1, \dots, v_n)v=(v1​,…,vn​) be arbitrary nnn-tuples of vectors in Rd\mathbb{R}^dRd. Here Rd\mathbb{R}^dRd carries the standard Euclidean inner product ⟨⋅,⋅⟩\langle \cdot, \cdot \rangle⟨⋅,⋅⟩ and norm ∥⋅∥\|\cdot\|∥⋅∥. Since n≥2n \ge 2n≥2, the second hypothesis forces d≥1d \ge 1d≥1. The theorem asserts that the two conditions (A) and (B) below are equivalent (both directions).

(A) (u,v)(u, v)(u,v) is a constrained global minimiser of the cross-entropy loss. This means all three of the following hold:

  • ∥ui∥=1\|u_i\| = 1∥ui​∥=1 for every i=1,…,ni = 1, \dots, ni=1,…,n;
  • ∥vi∥=1\|v_i\| = 1∥vi​∥=1 for every i=1,…,ni = 1, \dots, ni=1,…,n;
  • L(u,v)≤L(u′,v′)L(u, v) \le L(u', v')L(u,v)≤L(u′,v′) for every pair of nnn-tuples u′,v′u', v'u′,v′ in Rd\mathbb{R}^dRd whose vectors all have norm 111.

The loss LLL is defined for any nnn-tuples u,vu, vu,v by

L(u,v)  =  ∑i=1nlog⁡ ⁣(∑j=1nexp⁡⟨vj,ui⟩exp⁡⟨vi,ui⟩).L(u, v) \;=\; \sum_{i=1}^{n} \log\!\left( \frac{\sum_{j=1}^{n} \exp\langle v_j, u_i\rangle}{\exp\langle v_i, u_i\rangle} \right).L(u,v)=i=1∑n​log(exp⟨vi​,ui​⟩∑j=1n​exp⟨vj​,ui​⟩​).

The denominator is always positive, so no division by zero occurs. There is no temperature, scaling or bias parameter. The competitors (u′,v′)(u', v')(u′,v′) range only over unit-norm configurations.

(B) uuu is a simplex equiangular tight frame and vvv equals uuu. This means all three of the following hold:

  • ∥ui∥=1\|u_i\| = 1∥ui​∥=1 for every iii;
  • for all indices i≠ji \ne ji=j,
⟨ui,uj⟩  =  −1n−1;\langle u_i, u_j\rangle \;=\; -\frac{1}{n-1};⟨ui​,uj​⟩=−n−11​;
  • vi=uiv_i = u_ivi​=ui​ for every i=1,…,ni = 1, \dots, ni=1,…,n, so the two tuples coincide entry by entry.

Because n≥2n \ge 2n≥2, the quantity n−1n - 1n−1 in the frame condition is at least 111, so no division by zero occurs there. The frame condition consists solely of unit norms and the stated pairwise inner products. It imposes no separate requirement that the vectors sum to zero, nor any condition on the span of the vectors.

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

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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