N EURAL C OLLAPSE U NDER MSE L OSS : P ROXIMITY TO AND D YNAMICS ON THE C ENTRAL P ATH
Anonymous authors
Paper under double-blind review
A BSTRACT
The recently discovered Neural Collapse (NC) phenomenon occurs pervasively in today’s deep net training paradigm of driving cross-entropy (CE) loss towards zero.
During NC, last-layer features collapse to their class-means, both classifiers and class-means collapse to the same Simplex Equiangular Tight Frame, and classifier behavior collapses to the nearest-class-mean decision rule.
Recent works demonstrated that deep nets trained with mean squared error (MSE) loss perform comparably to those trained with CE.
As a preliminary, we empirically establish that NC emerges in such MSE-trained deep nets as well through experiments on three canonical networks and five benchmark datasets.
We provide, in a Google
Colab notebook, PyTorch code for reproducing MSE-NC and CE-NC: here.
The analytically-tractable MSE loss offers more mathematical opportunities than the hard-to-analyze CE loss, inspiring us to leverage MSE loss towards the theoretical investigation of NC.
We develop three main contributions: (I)
We show a new decomposition of the MSE loss into (A) terms directly interpretable through the lens of NC and which assume the last-layer classifier is exactly the least-squares classifier; and (B) a term capturing the deviation from this least-squares classifier.
(II) We exhibit experiments on canonical datasets and networks demonstrating that term-(B) is negligible during training.
This motivates us to introduce a new theoretical construct: the central path , where the linear classifier stays MSE-optimal for feature activations throughout the dynamics.
(III)
By studying renormalized gradient flow along the central path, we derive exact dynamics that predict NC.
I NTRODUCTION
Modern deep learning includes paradigmatic procedures that are commonly adopted, but not entirely understood.
Some examples are multi-layered architectures, stochastic gradient descent, batch normalization, cross-entropy (CE) loss, and training past zero error towards zero loss .
Analyzing the properties of these practices is an important research task.
In this work, we theoretically investigate behavior of last-layer features in classification deep nets.
In particular, we consider the training of deep neural networks on datasets containing images from
C different classes with N examples in each class.
After passing the i -th example in the c -th class through all layers except the last-layer of the network, the network outputs some last-layer features h i,c ∈ R P .
The last-layer of the network—which, for each class c , possesses a classifier w c ∈ R P and bias b c ∈ R —then predicts a label for the example using the rule arg max c ′ ( ⟨ w c ′ ,
h i,c ⟩ + b c ′ ) .
The network’s performance is evaluated by calculating the error defined by
[Equation]
while the weights, biases, and other parameters of the network (that determine the behavior of the layers before the last layer) in the network are updated by minimizing the CE loss defined by
[Equation]
where Ave is the operator that averages over its subscript indices.
Prior works such as Zhang et al.
; Belkin et al.
(2019) have shown that overparameterized classifiers (such as deep nets) can “memorize” their training set without harming performance on unseen test data.
Moreover, works such as Soudry et al.
(2018) have further shown that continuing to train networks past memorization can still lead to performance improvements 1 , 2 .
Papyan, Han, and Donoho (2020) recently examined this setting, referring to the phase during which one trains past zero-error towards zero-CE-loss as the Terminal Phase of Training (TPT).
During TPT, they exposed a phenomenon called Neural Collapse (NC).
1. N EURAL C OLLAPSE
NC is defined relative to the feature global mean,
[Equation]
the feature class-means,
[Equation]
the feature within-class covariance,
[Equation]
and the feature between-class covariance,
[Equation]
figure depicts the last-layer features, classmeans, and classifiers with which NC is defined—as well as the Simplex ETF to which they all converge with training.
Bottom figure shows the deviations of features from their corresponding class-means.
Reproduced and modified from Figure 1 of Papyan, Han, and
Donoho (2020).
It is characterized by the following four limiting behaviors where limits take place with increasing training epoch t :
[Equation]
where † denotes the Moore-Penrose pseudoinverse.
(NC2) Convergence to Simplex ETF:
[Equation]
(NC3) Convergence to self-duality:
[Equation] [Equation]
: Simplification to nearest class center:
[Equation]
shows that it could be beneficial when training on noisy data or small datasets datasets out of the of this paper.
Our characterization of (NC1) is more precise than that given by Papyan, Han, and Donoho (2020), which only states Σ W → 0 for (we suspect) rhetorical simplicity.
The convergence of the trace-norm of Σ † B Σ W to zero is the actual quantity measured by Figure 6 of Papyan, Han, and Donoho (2020) when demonstrating (NC1) .
Σ † B Σ W captures the subtlety that the size of the within-class “noise” (captured by Σ W ) should be viewed relative to the size of the class-means (captured by Σ B ).
The (NC2) property captures convergence to a simple geometric structure called an Equiangular Tight
Frame (ETF).
An ETF is a collection of vectors { v c }
Cc =1 having equal lengths and equal, maximally separated pair-wise angles.
In modern classification deep nets, last-layer features are always of higher dimension than the number of classes i.e. P > C .
In this setting, the maximal pair-wise angles are given by
[Equation]
and the ETF is called a Simplex ETF 4 .
Observe that as C increases, the ETF approaches a (partial) orthogonal matrix.
Thus, when C is large, this translates to the intuitive notion that classifiers and class-means tend with training to (near) orthogonality.
1. D EEP NET CLASSIFICATION WITH MSE LOSS
While classification deep nets are typically trained with CE loss, Demirkaya et al.
and Hui &
Belkin (2020) recently reported deep nets trained with squared error (MSE) loss,
[Equation]
achieve comparable test performance as those trained with CE loss.
Above, H ∈ R P × CN and
Y ∈ R C × CN are matrices resulting from stacking 5 together the feature vectors
h i,c and one-hot vectors
y i,c as their respective columns; W ∈ R C × P is the matrix resulting from the stacking of classifiers w c as rows; b ∈ R C is the vector resulting from concatenating the scalars { b c } Cc =1 ; and
CN is the length- CN vector of ones.
Table 1 in Appendix A shows supplementary measurements affirming the findings of Hui & Belkin (2020);
Demirkaya et al.
(2020), i.e. the measurements affirm that MSE-trained networks indeed achieve accuracies on testing data comparable to those of CE-trained networks (cf.
the analogous Table 1 in Papyan, Han, and Donoho (2020)).
The analytically-tractable MSE loss offers more mathematical opportunities than the hard-to-analyze CE loss and inspires this paper’s main theoretical contributions explicitly characterizing MSE-NC.
1. C ONTRIBUTIONS
Our main contributions are as follows:
• We propose a new decomposition of the MSE loss :
L =
L NC1 + L NC2/3 + L ⊥ LS .
The terms L NC1 and L NC2/3 possess interpretations attributable to NC phenomena and assume the classifier W is exactly the least-squares optimal classifier W LS (relative to the given H ); and L ⊥ LS captures the deviation of W from W LS .
(Section 2) •
We provide empirical measurements of our decomposition (Figure 2) on realistic datasetnetwork combinations showing that L ⊥ LS becomes negligible during training—leading us to define the central path where L ⊥ LS = zero .
(Section 2) •
We reveal a key invariance property on the central path.
The invariance motivates the examination of a representative set of features, X = Σ − 12 W H , that we call renormalized features .
(Sections 3.1-3.2) •
We study the gradient flow of those renormalized features along the central path and derive exact, closed-form dynamics that imply NC.
The dynamics are explicit in terms of the singular value decomposition of the renormalized feature class-means at initialization.
(Section 3.3)
Assume the stacking is performed in i -then- c order : the first column is ( i, c ) =
(1 , 1) , the second is ( i, c ) =
(2 , 1) ,..., the N -th is ( i, c ) =
( N, 1) , the ( N + 1) -st is ( i, c ) =
(1 , 2) , and so on.
This matters for formalizing Equation 11 in Corollary 2.
Additionally, we complement this paper with new, extensive measurements on five benchmark datasets—in particular, the MNIST, FashionMNIST, CIFAR10, SVHN, and STL10 datasets 6 (Deng et al., 2009; Krizhevsky & Hinton, 2009; LeCun et al., 2010; Xiao et al., 2017)—and three canonical deep nets—in particular, the VGG, ResNet, and DenseNet networks (He et al., 2016; Huang et al., 2017; Simonyan & Zisserman, 2014)—that verify the empirical reality of MSE-NC i.e. they show (NC1)-(NC4) indeed occur for networks trained with MSE loss.
These experiments are auxiliary deliverables establishing that theoretical modeling of MSE-NC is empirically well-motivated.
But, they are lengthy—together spanning four pages with seven figures and a table.
Since this paper is mainly theoretical, we collectively defer these NC-verification experiments to Appendix A.
D ECOMPOSITION OF MSE LOSS
Inspired by the community’s interest in the role of the MSE loss in deep net training (Demirkaya et al., 2020; Hui & Belkin, 2020; Mixon et al., 2020; Poggio & Liao, 2020a;b), we derive a new decomposition of the MSE loss that gives insights into the NC phenomenon.
First, absorb the bias vector into the weight matrix—by defining the extended weight matrix (cid:102) W =
[ W , b ] ∈ R C × ( P +1) and the extended feature vector (cid:101) h
i,c
=
[ h i,c ; 1] ∈ R P +1 —so that Equation 2 can be rewritten as
[Equation]
Using (cid:110)(cid:101) h
i,c (cid:111) , define the entities (cid:101) µ c , (cid:101) µ G , (cid:102) H , and (cid:101)
Σ
W analogously to those in Section 1.1.
We further define the extended total covariance and extended class-means matrices, respectively, as
[Equation]
Next, we reformulate, with weight decay incorporated, a classic result of Webb & Lowe (1990):
Proposition 1 ( Webb & Lowe (1990) with Weight Decay ) .
For fixed extended features (cid:102) H , the optimal classifier minimizing the MSE loss L ( (cid:102) W , (cid:102) H ) is
[Equation]
where I is the identity matrix.
Note that (cid:102) W LS depends on (cid:102) H only.
Note that we can interpret (cid:102) W LS as a function of (cid:102) H , leading us to identify the following decomposition of L where one term depends on (cid:102) H only.
Theorem 1.
(Decomposition of MSE Loss; Proof in Appendix B)
The MSE loss, L ( (cid:102) W , (cid:102) H ) , can be decomposed into two terms, L ( (cid:102) W , (cid:102) H ) =
L LS ( (cid:102) H ) + L ⊥ LS ( (cid:102) W , (cid:102) H ) , where
[Equation]
and
L ⊥
[Equation]
In the above, L LS ( (cid:102) H ) is independent of (cid:102) W .
Intuitively, it is the MSE-performance of the optimal classifiers (cid:102) W LS (rather than the “real classifiers” (cid:102) W ) on input (cid:102) H .
The component L ⊥ LS ( (cid:102) W , (cid:102) H ) is non-negative 7 and is zero
only when (cid:102) W = (cid:102) W LS .
Therefore, L ⊥ LS ( (cid:102) H ) quantifies the distance of (cid:102) W from (cid:102) W LS .
In short, the least-squares component, L LS ( (cid:102) H ) , captures the behavior of the network when the classifier possesses optimal, least squares behavior.
Meanwhile, the deviation component, L ⊥ LS ( (cid:102) W , (cid:102) H ) , captures the divergence from that behavior.
We can further decompose L LS ( (cid:102) H ) into two terms, one capturing activation collapse (NC1) and the other capturing convergence to Simplex ETF of both features and classifiers ( (NC2) and (NC3) ).
Theorem 2.
(Decomposition of Least-Squares Component; Proof in Appendix C)
The least-squares component, L LS ( (cid:102) H ) , of the MSE decomposition in Theorem 1 can be further decomposed into
L LS ( (cid:102)
[Equation]
) , where
[Equation]
and
[Equation]
Inspection of these terms is revealing.
First, observe that L NC2/3 is a function of the class-means and
MSE-optimal classifiers.
Minimizing L NC2/3 will push the (unextended) class-means and classifiers towards the same Simpex ETF matrix 8 i.e. (NC2)-(NC3) .
Next, note that the within-class variation is independent of the means.
Thus, despite the fact that classifiers are converging towards some (potentially large) ETF matrix, we can always reduce L NC1 by pushing Σ W towards zero, which corresponds to (NC1) .
Figure 2 measures the empirical values of the above decomposition terms on five canonical datasets and three prototypical networks.
It shows that L ⊥ LS ( (cid:102) W , (cid:102) H ) becomes negligible compared to L LS ( (cid:102) H ) when training canonical deep nets on benchmark datasets.
In other words, L ( (cid:102) W , (cid:102) H ) ≈L LS ( (cid:102) H ) starting from an early epoch in training and persists into TPT.
This motivates us to formulate the central path :
[Equation]
(4) where the notation (cid:102) W LS ( · ) makes explicit the fact that (cid:102) W LS is a function of (cid:102) H only.
Intuitively, for a classifier-features pair to lie on the central path, i.e. ( (cid:102) W , (cid:102) H ) ∈ P , means that the “real classifier” (cid:102) W will exactly equal (cid:102) W LS ( (cid:102) H ) —the optimal classifier that would result from fixing (cid:102) H and minimizing L w.r.t.
just the classifier.
Combined with Theorem 1, we see ( (cid:102) W , (cid:102) H ) ∈ P if and only if L ( (cid:102) W , (cid:102) H )=
L LS ( (cid:102) H ) .
Figure 2 shows that classifier-features pairs lie approximately on the central path during TPT, allowing us to shift focus from L to L LS .
E XACT CLOSED - FORM ANALYSIS ON CENTRAL PATH
Consider λ = 0 in this section.
For the subsequent theory, we adopt the unconstrained features (Mixon et al., 2020) or layer-peeled (Fang et al., 2021)
modeling perspective 9 .
We consider continuous training dynamics with gradient flow where time-of-training is denoted by the variable 10 t ≥ 0 .
Within this model, we analyze the dynamics of the renormalized features X =
Σ
− 12 W H on the central path
[Equation]
name features
Intuitively, one should interpret t =0 as the time-of-training when feature-classifier pairs effectively enter the central path.
Starting from an early epoch in training, L ⊥ LS ( (cid:102) W , (cid:102) H ) becomes negligible compared to the dominant term, L NC1 ( (cid:102) H ) , implying L ⊥ LS ( (cid:102) W , (cid:102) H )
≪L LS ( (cid:102) H )=
L NC1 ( (cid:102) H )+ L NC2/3 ( (cid:102) H ) , i.e. the features and classifiers are effectively on the central path during TPT.
Note that L NC2/3 ( (cid:102) H ) diminishes the fastest among all the terms: Intuitively, this shows that the network primarily focuses on distributing the feature class-means into a “uniform” Simplex ETF configuration (NC1)-(NC2) early on and, from there, compresses the activations towards their class-means, i.e. (NC1) , as much as possible.
Further experimental details are in Appendix A. Outlier behavior is discussed in Appendix A.7.
where the operator Π T X X projects the gradient onto the manifold 11 , X , of all identity-covariance features.
For Σ − 12 W H to be well-defined, we assume that Σ W remains full-rank 12 during training.
We call Equation 5 the continually renormalized gradient flow and will motivate it in more detail in later subsections.
We now state our main theorem:
Theorem 3.
(NC Under Continually Renormalized Gradient Flow) Consider the continually renormalized gradient flow (Equation 5) in which the dynamics are restricted to the central path, and the features are renormalized to identity within-class covariance.
Assume the features are initialized with zero global mean.
Then, Neural Collapse emerges on the renormalized features with explicit dynamics of the flow given in Proposition 2 as well as Corollaries 1 and 2 later in this paper.
Three assumptions standout which we discuss below:
(A1) Restriction to central path: Figure 2 shows that—in practice, during TPT—
L ⊥ LS ( (cid:102) W , (cid:102) H ) is observed to be negligible compared to the dominant term, L LS ( (cid:102) H ) .
This indicates ( (cid:102) W , (cid:102) H ) is close to the central path (Equation 4) where L ( (cid:102) W , (cid:102) H ) =
L LS ( (cid:102) H ) .
One the central path, one is effectively training with L LS as the loss.
(A2) Zero global mean: Proximity to the central path implies that the last-layer biases become close to b LS .
Having biases b = b LS is effectively performing classification with no bias term (i.e. using only a linear classifier W ) on zero-mean data .
To see this, define the globally-centered features, globally-centered means, and total-covariance matrix in unextended coordinates:
[Equation]
Proposition 1 then reduces to the following forms for the unextended weights and biases:
[Equation]
For an arbitrary activation-target pair ( h , y ) , the prediction error obeys
[Equation]
The last line exhibits two terms in parentheses, both traceable to the action of the bias b LS .
The term h − µ G demonstrates that the bias induces a global-mean subtraction on h , while the term y − C − 1demonstrates that the bias also induces a global-mean subtraction on the one-hot targets.
(A3) Renormalization to identity covariance: Renormalization is ubiquitous in the empirical deep learning literature through works such batch normalization and its variants (Ioffe & Szegedy, 2015;
Salimans & Kingma, 2016; Wu & He, 2018;
Ulyanov et al., 2016; Ba et al., 2016; Krizhevsky et al., 2012).
It is also ideologically precedented in the theoretical ML literature through works such as
Douglas et al.
Banburski et al.
; Poggio & Liao (2020a;b).
Within this paper, the covariance-renormalization is inspired by an invariance property of the loss as well as the intuitive concept of the signal-to-noise ratio from mathematical statistics (discussed later in Sections 3.1-3.2).
In the subsequent sections, we motivate and introduce the theoretical constructs necessary for proving
Theorem 3 and for presenting the explicit dynamics of the flow.
3. I NVARIANCE PROPERTY
By Assumption (A2) , classification on the central path is equivalent to classification on globallycentered features using only the linear classifier W LS .
Then, using Equation 6, we can equivalently represent the central path (Equation 4) as follows:
Definition 1 ( Zero Global Mean Central Path ) .
[Equation]
An invariance property holds on the central path.
Let A denote a symmetric, full-rank matrix.
Then, the explicit form in Equation 6 for W LS implies
[Equation]
[Equation]
where the notation W LS ( · ) makes explicit that W LS is a function of a set of input features.
Thus, the actual predictions made by the least squares classifier are invariant to choice of the coordinates in which we express Ď H , i.e. all features A Ď H are equivalently performing .
Among those coordinate systems, we will prefer the one in which the “noise” is “whitened” or “sphered.”
Recall that we assume Σ W ( Ď H ) —where the notation Σ W ( · ) expresses the within-class covariance as a function of the features—is positive-definite.
Consider the coordinate transformation Ď H (cid:55)→ A Ď H with A
= Σ − 12 W ( Ď H ) .
In these coordinates, the features are “renormalized” to spherical covariance,
[Equation]
so we will call A Ď H the renormalized features .
The class-means of A Ď H are
[Equation]
where the notation Ď M ( · ) expresses that the means are a function of features.
Thus, Equationdescribes continuous training dynamics where we continually “renormalize” features to their equivalently-performing representer.
3. S IGNAL - TO -N OISE RATIO MATRIX ON THE CENTRAL PATH
The Σ − 12 W Ď M term evokes the canonical idea of a signal-to-noise ratio from statistics.
To see this, note that the classifier in Equation 6 can be rewritten as
[Equation]
The combined presence of the terms Ď M Ď M ⊤ and Σ W in the denominator, along with Ď M in the numerator, signals to us the presence of the informative signal-to-noise (SNR) ratio matrix :
[Equation]
Why this terminology?
The globally-centered class-means represent the overall “signal” indicating that the class-means are separated from each other: if they were non-separated—e.g. all equal— Ď M would be zero.
However, a classifier decision must keep in view noise—captured by Σ W —which might confuse the classifier.
So, one wishes the signal be large compared to the noise.
It may help to consider the mental model—which is not at all necessary to the correctness of our analysis—under which the activations are normally distributed with h i,c ∼ N ( µ c , Σ W ) .
Under that model, a linear classifier will indeed get confused if the norm ∥ µ c − µ G ∥ 2 is “small compared” to Σ W .
Replacing this somewhat vague statement by a discussion of quantitative properties of the SNR matrix is well understood by mathematical statisticians to be decisive for understanding classification performance in the normal case.
Additionally, observe that SNR = Ď M ( Σ − 12 W Ď H ) .
Thus, connecting back to
Section 3.1, the SNR matrix is simply the class-means matrix of the renormalized features.
The SNR can be further understood through its singular value decomposition (SVD).
Definition 2 ( SVD of SNR Matrix ) .
Denote the SVD of the SNR matrix (Equation 8) as follows:
[Equation]
j .
Here, { ω c } C − 1 c =1 are the non-zero singular values of SNR ; Ω = diag (cid:0) { ω c } C − 1 c =1 , 0 (cid:1) ∈ R C × C ; and the left and right singular-vectors, U ∈ R P × C and V ∈ R C × C , are partial orthogonal and orthogonal matrices, respectively, with columns { u j } Cj =1 and { v j } Cj =1 .
The SNR matrix is rank C − 1 since Σ W is assumed full-rank and Ď M is rank C − 1 due to global-mean subtraction.
The non-zero singular values, { ω j } C − 1 j =1 , are decisive for understanding the separation performance of the least-squares linear classifier.
Good performance demands that the singular values be large.
Works such as Fukunaga (1972, Chapter 10) and Hastie & Tibshirani (1996) show that the magnitude of each singular value of the SNR matrix is the size of the class separation in the direction of the corresponding singular vector.
In this sense, the smallest singular value captures the smallest separation between classes.
Consequently, driving-larger the smallest nonzero singular value makes the task of linear separation more immune to (spherical) noise and to Euclidean-norm-constrained adversarial noise.
As we will see in the next section, examining the dynamics of these singular-values when the features undergo gradient flow in renormalized coordinates leads to precise characterizations of Neural Collapse 13 .
3. D YNAMICS OF SNR
For any matrix Z , we use Z t in this section to denote the state of that matrix at time t .
Similarly, we denote with { ω j ( t ) } C − 1 j =1 the state of the non-zero SNR singular values at t .
We now present
Proposition 2 and Corollaries 1-2 that provide the explicit dynamics referenced by Theorem 3.
Proposition 2 ( Dynamics of Singular Values of SNR Matrix; Proof in Appendix D.4 ) .
Continually renormalized gradient flow on the central path (Equation 5) induces the following closed-form dynamics on the SNR singular values (Definition 2):
[Equation]
for all j
[Equation]
[Equation]
c 1 , c 2 , and c 3 are positive constants independent of j , and a j is a constant depending on ω j (0) .
Corollary 1 ( Properties of SNR Singular Values; Proof in Appendix D.5 ) .
SNR singular values (Definition 2) following the Equation 9 dynamics satisfy the following limiting behaviors:
lim t →∞ ω j ( t ) = ∞ and lim t →∞ ω j ( t ) 4 (cid:113) tc = 1 , for all j = 1 , . .
, C − 1 . 2.
lim t →∞ max j ω j ( t ) min j ω j ( t ) = 1 .
The first fact shows that all non-zero singular values of the SNR matrix, Σ − 12 W Ď M , grow to infinity at an asymptotic rate of 4 (cid:112) t/c 3 . Intuitively, this shows that the “signal” becomes infinitely large compared to the “noise”, i.e. (NC1) . The second fact shows that the singular values also approach equality.
The only C -column matrices possessing C − 1 equal, non-zero singular values are Simplex ETFs—which therefore implies (NC2) .
Finally, as derived Papyan, Han, and Donoho (2020, Theorem 1), (NC1)-(NC2) implies (NC3)-(NC4) on the central path. Corollary 2 formalizes these ideas. Corollary 2 ( Neural Collapse Under MSE Loss; Proof in Appendix D.6 ) .
Under continually renormalized gradient flow (Equation 5), the SNR matrix (Equation 8) converges to
[Equation]
(10) where (cid:98) U 0 ∈ R P × ( C − 1) and (cid:98) V 0 ∈ R C × ( C − 1) are the left and right singular vectors of the SNR matrix (Definition 2) at t =0 corresponding to the non-zero singular values; and ω max ( t ) is the largest singular value at time t .
Corollary 1 and Equation 10 together imply the occurrence of (NC1)-(NC4) i.e. renormalized gradient flow on the central path leads to Neural Collapse.
Moreover, denoting the Kronecker product with ⊗ , the renormalized features matrix converges to
[Equation] [Equation]
R ELATED W ORKS
Since the publication of Papyan, Han, and Donoho (2020), several works (Mixon et al., 2020; Lu &
Steinerberger, 2020; E & Wojtowytsch, 2020; Poggio & Liao, 2020a;b; Fang et al., 2021; Ergen &
Pilanci, 2020; Zhu et al., 2021) proposed mathematical frameworks ratifying Neural Collapse.
Among them, Mixon et al.
and Poggio & Liao (2020a;b) also examine MSE-NC.
Our contributions in this paper are distinct from the MSE-NC analyses of Mixon et al.
and Poggio & Liao (2020a;b): The work of Mixon et al.
(2020) relies on a linearization of the unconstrained features model ODE while Poggio & Liao (2020a;b)—in a special section co-authored with Andrzej
Banburski—examine homogeneous, weight-normalized networks.
In contrast, this paper considers the dynamics of the renormalized gradient flow on the central path (motivated by the discussions in
Sections 2-3).
Neither Mixon et al.
nor Poggio & Liao (2020a;b) provide exact, closed-form dynamics as we do.
Outside the MSE setting, Lu & Steinerberger (2020)
; E & Wojtowytsch (2020); Ergen & Pilanci (2020); Fang et al.
; Zhu et al.
(2021) examine the emergence of the NC properties under variants of the unconstrained features/layer-peeled model trained with CE loss.
These works focus on characterizing the loss landscape or the global minima without describing the dynamics.
We provide a detailed survey of all above-mentioned papers in Appendix E.
C ONCLUSION
In this paper, after verifying that NC occurs when prototypical classification deep nets are trained with
MSE loss on canonical datasets, we then derive and measure a novel decomposition of the MSE loss.
We observed that the last-layer classifier tends to the least-squares classifier—motivating us to define the central path on which the classifier behaves exactly as optimal least-squares classifier.
On the central path, we showed invariance properties that inspired us to examine the renormalized features and their corresponding continually renormalized gradient flow.
This flow induces closed-form dynamics that imply the occurrence of Neural Collapse.
R EPRODUCIBILITY S TATEMENT
This paper is reproducible.
Experimental details about all empirical results described in this paper are provided in Appendix A. Additionally, we provide PyTorch (Paszke et al., 2019) code for reproducing
NC under both MSE and CE—as well as the Figure 2 MSE decomposition—in the following Google
Colaboratory notebook: here.
All datasets and networks used in our experiments originate from the
PyTorch Model Zoo with pre-processing details described in Appendix A. Formal statements and proofs of all our theoretical results are provided in Appendices B-D.
A PPENDIX A MSE Neural Collapse experiments
A.1 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3 Optimization methodology . .
A.4 Computational resources . .
A.5 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.6 Experimental results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.7 Exceptions: STL10-ResNet and STL10-DenseNet . . . . . . . . . . . . . . . . . .
A.8 Open Questions: Weight-decay, batch normalization, SGD, generalization, test data
B Theorem
C Theorem
C.1 Intuitions for Theorem 2 in unextended coordinates . . . . . . . . . . . . . . . . .
C.2 Additional intuitions for Theorem 2 terms . .
D Theorem
D.1 Implications of invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D.2 Aligned SNR coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D.3 Continually renormalized gradient flow . . . . . . . . . . . . . . . . . . . . . . .
D.4 Proof of Proposition 2 (gradient flow in aligned SNR coordinates) . . . . . . . . .
D.
Proof of Corollary 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D.6 Proof of Corollary 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E Related works examining Neural Collapse
E.1 Mixon, Parshall, and Pi (2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.2 Lu and Steinerberger (2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.3 E and Wojtowytsch (2020) .
E.4 Poggio & Liao (2020a;b) (with Banburski) . . . . . . . . . . . . . . . . . . . . . .
E.5 Ergen & Pilanci (2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.6 Fang, He, Long, and Su (2021) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.7 Zhu, Ding, Zhou, Li, You, Sulam, and Qu (2021) . . . . . . . . . . . . . . . . . .
A MSE N EURAL C OLLAPSE EXPERIMENTS
The experiments in this section examine the properties of Neural Collapse (NC) on deep nets trained using MSE loss.
The direct MSE-analogues to the cross-entropy (CE) loss table and figures in Papyan,
Han, and Donoho (2020) are in Table 1 and Figures 3-9 here.
Furthermore, Figures 10-11 compares the MSE-NC experiments observed in this paper with the CE-NC behaviors in Papyan, Han, and
Donoho (2020).
Experimental descriptions and discussions are within the captions.
Subsections
A.1-A.5 describe formatting and experimental details.
Then, Subsection A.6 collectively presents all experimental figures for this section.
Subsection A.7 addresses outlier behaviors observed in the plots.
Finally, Subsection A.8 discusses open questions inspired by NC.
A. D ATASETS
We consider the MNIST, FashionMNIST, CIFAR10, SVHN, and STL10 datasets with pre-processing the same as in Papyan, Han, and Donoho (2020).
A.1. C HOICE OF DATASETS
Demirkaya et al.
and Hui & Belkin (2020) showed multi-class classification deep nets trained with MSE loss—sometimes with a heuristical-scaling—demonstrate comparable test-error performance to those trained with CE loss.
Even without additional scaling, i.e. with vanilla MSE loss, we found this true for ten class classification datasets—such as MNIST, FashionMNIST, SVHN,
CIFAR10, and STL10—so we focus on these five datasets.
For more than ten classes (i.e. datasets such as CIFAR100 and ImageNet), both Demirkaya et al.
and Hui & Belkin (2020) showed that the additional scaling-heuristic does need to be applied to the loss before comparable test-performance can be achieved.
In informal, exploratory experiments not reported here, we were able to reproduce their results on datasets with more than ten classes.
But, we feel these scaling-heuristics merit further scientific investigation of their own and are beyond the scope of this article 14 , so we do not include datasets that require scaling-heuristic tuning.
A. N ETWORKS
We train VGG, ResNet, and DenseNet models with the same depth-selection procedures and architecture-specification choices as in Papyan, Han, and Donoho (2020).
In the MSE setting, the final chosen depths were as follows:
[Equation] [Equation]
[Equation]
VGG
[Equation]
ET
D
[Equation]
ET
SVHN
VGG
R
[Equation]
N ET
D ENSE N ET
CIFAR
VGG
R ES N ET
D ENSE N ET
STL
VGG
R ES N ET
D ENSE N ET
A. O PTIMIZATION METHODOLOGY
The optimization algorithm, parameters, and hyperparameter tuning are the same as in Papyan, Han, and Donoho (2020).
A. C OMPUTATIONAL RESOURCES
The experiments were run on our institutional High-Performance Computing (HPC) cluster.
Each dataset-network combination was trained on a single GPU attached to a CPU with at least 32GB of
RAM—the specific types of the CPUs/GPUs vary according to whichever was first assigned to us by the HPC cluster scheduler.
A. F ORMATTING
The coloring and formatting of the plots are the same as in Papyan, Han, and Donoho (2020).
A. E XPERIMENTAL RESULTS
[Table]
A. E XCEPTIONS : STL10-R ES N ET AND STL10-D ENSE N ET
The STL10-ResNet and STL10-DenseNet dataset-network pairs stand out among the experiments described in this section—sometimes displaying outlier behavior either by converging more slowly to
Neural Collapse or by exhibiting trends inconsistent with those found in other dataset-network pairs.
STL10 stands apart from the other canonical datasets for multiple reasons 15 and is a “less-typical” benchmark compared to more “compulsory” datasets like CIFAR10.
In this particular case, we hypothesize that its outlier behavior might be caused by the size of the STL10 images ( 96 ×compared to the 32 × 32 , after padding, of the other datasets)—leading to a higher-dimensional problem, which, in turn, induces a harder non-convex optimization problem, which might make SGD less likely to converge to a useful optimum or might make the convergence much slower and harder to observe under a fixed computational budget.
It was previously noted in Hui & Belkin (2020) and Demirkaya et al.
(2020) that more challenging classification problems—in those projects, problems with more classes to be labeled—may require modifications to the MSE loss.
We decided that such modifications are unnecessary in the ten class problems examined in this paper’s experiments.
But perhaps the outlier nature of the STL10-ResNet and STL10-DenseNet combinations signal that the MSE loss modifications proposed by Hui & Belkin (2020) and Demirkaya et al.
(2020) ought to have been used.
A. O PEN Q UESTIONS : W EIGHT - DECAY , BATCH NORMALIZATION , SGD, GENERALIZATION , TEST DATA
The experiments in this paper as well as those in Papyan, Han, and Donoho (2020) were conducted under the canonical setting where deep nets were trained using SGD with weight-decay and batch normalization—leading one to wonder about the roles that these particular ingredients play on the
NC phenomena.
Additionally, most observables focus on the train data—raising the question of how the NC phenomena behave on test data as well as their relationship to generalization.
We find these questions intriguing, but feel each deserves careful experimentation outside the scope of this paper.
Nonetheless, we note here that several existing papers have already begun insightful investigations in these directions.
For example, weight-decay, weight-normalization (as a proxy for batchnormalization), and SGD play key roles in the analyses of Banburski et al.
; Poggio & Liao (2020a;b)
that, along other things, lead to the prediction of NC in homogeneous deep nets.
Banburski et al.
(2021) also explores the connection between NC and margin distributions with generalization.
Another example is Zhu et al.
(2021) in which the authors conduct several experiments on ResNets trained on CIFAR10.
On their models, the authors examine NC-related properties relative to the train data, test data, and randomly labeled data; they also conducted ablation studies varying control parameters (weight-decay, width, etc.) and the optimization algorithm (SGD, ADAM, L-BFGS).
Based on their results, Zhu et al.
propose thought-provoking conjectures on the role of each of these components (see Section E.7 for a brief survey of their findings).
As a preliminary exploration, we include Figure 12 showing the variability collapse (NC1) behavior on test data for the networks trained with MSE loss (used in this paper) as well as those trained with
CE loss (released 16 by Papyan, Han, and Donoho (2020)).
From Figure 12, we see that variability collapse occurs much slower on the test data than on the train data.
Although not shown here, the other NC phenomena behave similarly.
In this Appendix, we show Figure 12 since it is concise, within reach, and may be of interest to readers who share our curiosity.
We refrain from presenting the entire series of multi-figure NC measurements on test data because it is outside the scope of this paper and would significantly lengthen this appendix.
We also refrain from speculating on any underlying explanations until more meticulous experiments are conducted.
The CE test data results
B T HEOREM
Theorem 1.
(Decomposition of MSE Loss)
The MSE loss, L ( (cid:102) W , (cid:102) H ) , can be decomposed into two terms, L ( (cid:102) W , (cid:102) H ) =
L LS ( (cid:102) H ) + L ⊥ LS ( (cid:102) W , (cid:102) H ) , where
[Equation]
and
[Equation]
Proof.
Recall the MSE loss:
[Equation]
Consider a specific extended activations matrix (cid:102) H ; the least-squares solution (cid:102) W minimizing
L ( (cid:102) W , (cid:102) H ) with (cid:102) H kept fixed must obey the following first-order optimality condition:
[Equation]
From Proposition 1 in the main manuscript, the solution to the above is given by
[Equation]
The loss can be rewritten as
[Equation]
Combining the above with Equation 13 gives, after rearranging:
[Equation]
which is equivalent to
[Equation]
Using the above
[Equation]
the loss can indeed be decomposed as
[Equation]
where
[Equation]
14) and
[Equation]
This completes the proof.
C T HEOREM
Theorem 2.
(Decomposition of Least-Squares Component)
The least-squares component, L LS ( (cid:102) H ) , of the MSE decomposition in Theorem 1 can be further decomposed into L LS ( (cid:102) H ) =
L NC1 ( (cid:102) H ) +
L NC2/3 ( (cid:102) H ) , where
[Equation]
NC
[Equation]
(cid:102)
[Equation]
, and
[Equation]
Proof.
Under Euclidean distance, perturbations to the extended activations matrix (cid:102) H which affect only the class-means or global-mean are orthogonal to perturbations which affect only the within-class covariance.
Using this, L LS ( (cid:102) H ) can be further decomposed via the Pythagorean theorem:
[Equation]
The first and second terms above merge into L NC1 ( (cid:102) H ) , while the third term becomes L NC2/3 ( (cid:102) H ) :
[Equation] [Equation]
This completes the proof.
C. I NTUITIONS FOR T HEOREM 2 IN UNEXTENDED COORDINATES
For intuition, consider when λ = 0 , i.e. the no weight-decay case.
Proposition 1 in the main text gives
[Equation]
(16) where Ď M ∈ R P × C is the matrix with columns µ c − µ G .
Returning to the unextended coordinates,
L NC1 ( Ď H ) simplifies to
[Equation]
(17) where Ď H ∈ R P × CN has columns
h i,c − µ G .
The term L NC2/3 ( Ď H ) also simplifies instructively to
[Equation] [Equation]
where Φ ∈ R C × C is the standard Simplex ETF:
[Equation]
C. A DDITIONAL INTUITIONS FOR T HEOREM 2 TERMS
The expressions in Equation 15 and Equation 17 further evoke the intuition that
L NC1 ( Ď H ) is a variance term that goes to zero only under activation collapse (NC1) .
More specifically, we see that, with the class-means held constant , the only way to have L NC1 ( Ď H ) → 0 is for Σ W → 0 .
Similarly, by examining Equation 18, we see that
L NC2/3 ( Ď H ) quantifies deviations of W LS Ď M —i.e. the matrix of class-mean predictions—from the standard Simplex ETF.
Under (NC2) and (NC3) , both W LS and Ď M tend to jointly aligned ETF’s, possibly in an alternate pose; so W LS → Φ U T and Ď M → U Φ for a partial orthogonal matrix U satisfying U T U
= I C .
Since Φ 2 = Φ , (NC2) and (NC3) together demand W LS Ď M → Φ .
Thus, L NC2/3 ( Ď H ) can be interpreted as a semi-metric reflecting the distance from achieving (NC2) and (NC3) .
D T HEOREMD. I MPLICATIONS OF INVARIANCE
In this section, we will discuss in more detail how the invariance observed Section 3.1 leads the the continually renormalized gradient flow (Equation 5).
In particular, we have seen in Section 3.1 of the main text that, on the central path, both the predictions W LS ( Ď H ) Ď H and the MSE loss
L ( W LS ( Ď H ) , Ď M ( Ď H )) are invariant under the transformation Ď H (cid:55)→ A Ď H when A is a invertible matrix.
Since our interest mainly lies with A = Σ − 12 W , we will restrict the intuitive discussion in this section to positive-definite A .
Now, consider the set H of features Ď H with with non-singular within-class covariances.
We view H as a fiber bundle 17 , where—on each fiber—live (apparently) different activations, Ď H , that (in fact) generate the exact same class predictions and the exact same MSE loss (see Figure 13).
The base space—we will denote it X —can be taken to be the collection of X ∈ H where Σ W ( X )
=
I .
Every Ď H ∈ H is representable as Ď H = AX where A = Σ − 12 W ( Ď H ) and Σ W ( X )
=
I .
The activation matrices X in the base space might be variously called “pre-whitened,” “normalized,” “standardized,” or “sphered.”
We shall call X a normalized features manifold 18 .
Invoking invariance, we can make the following observations about our optimization task:
If, at a specific t , H t happens to be a normalized set of activations (i.e. H t ∈ X is currently located in the base space X ), there is no performance benefit to leaving the base space.
There is also no performance benefit to moving along a fiber; only by moving from fiber-to-fiber can we improve performance.
In some sense, we waste time except when jumping from fiber-to-fiber; we might prefer to stay in
the base space all the time by forcing the dynamics to jump from fiber-to-fiber.
On the other hand, we started with the viewpoint of studying gradient flow of the original H .
So, we consider the following natural model for the application of gradient descent in X :
For a given initial feature activations, Ď H 0 ∈ H , we renormalize—obtaining a starting point X 0 ∈ X ; here X
=
Σ − 12 W ( Ď H 0 )
Ď H 0 .
Class predictions and MSE loss performance for the MSE-optimal classifier do not change from this renormalization.
We compute the usual gradient of MSE loss, at X 0 , obtaining a step ∆ X 0 = − η ∇ X L LS ( X 0 ) , where η is a step size.
We take a step, going to
[Equation]
Ď H 1 will not necessarily be normalized.
We map back along whatever fiber we have landed upon, obtaining a corresponding point in the base space X , call this X 1 .
Here,
[Equation]
Class
predictions and MSE loss
performance do
not
change from this
renormalization
Repeat steps 2, 3, 4 at X 1 , obtaining thereby X 2 ; and so on.
This process might be described as gradient descent with continual renormalization :
Renormalize the initial features activation matrix; 2.
Compute the ordinary gradient of MSE loss and take the gradient descent step; 3.
Renormalize again after each such step; and 4.
Repeat steps 2 and 3.
While the continual renormalization process differs from usual gradient flow, it is both intuitively understandable and sensible.
See discussion of assumption (A3) in Section
D. A LIGNED SNR COORDINATES
Analysis of continually renormalized gradient flow can be simplified, without loss of generality, by applying a change of basis i.e. in both row and column space:
Definition 3 ( Transformation into Aligned SNR Coordinates ) .
Consider the SVD decomposition of the SNR from Definition 2 outputting left singular vectors U ∈ R P × C and right singular vectors V ∈ R C × C .
For any matrix Z ∈ R P × C , define the transformation Z → U ⊤ ZV as the transformation into aligned-SNR coordinates .
The aligned-SNR coordinates is so-named because it diagonalizes i.e. aligns the SNR matrix:
Definition 4 ( Aligned SNR Matrix ) .
Consider the SVD decomposition of the SNR from Definition 2.
Combined with Equation 8, observe that
[Equation]
We call Ω the aligned SNR matrix .
The following facts about the aligned SNR matrix becomes useful later in our derivations:
Observation 1 ( SVD of Aligned SNR Matrix ) .
The SVD of the aligned SNR matrix itself is simply
[Equation]
j , with the canonical basis { e j } Cj =1 as its singular vectors.
As discussed in Section 3.2, the { ω c } C − 1 c =1 that comprise Ω are decisive for understanding separation performance.
In fact, the MSE loss can be entirely characterized by the SNR singular values on the central path :
Lemma 1 ( Spectral Representation of MSE Loss ) .
On the central path, the MSE loss obeys
[Equation]
and its decomposition obeys
[Equation]
Proof.
Using Equation 16, Equation 17, and Equation 18, the loss on the central path equals
[Equation]
Observe Ď M ⊤ Σ − 1 T Ď M and Φ are simultaneously diagonalizable since they share the same [1 , . .
, 1] ⊤ null space and Φ has C − 1 equal eigenvalues.
Also, observe that
[Equation]
Let (cid:98) Ω be submatrix of the aligned-SNR matrix Ω corresponding to the non-zero singular values i.e.
(cid:98) Ω = diag (cid:0) { ω j } C − 1 c =1 (cid:1) .
After taking simultaneous-diagonalizations and canceling partial orthogonal matrices, Equation 19 can be written solely in terms of (cid:98) Ω :
[Equation]
This can be further simplified into
[Equation]
This completes the proof for Lemma 1.
Thus, the aligned SNR matrix, U ⊤ Σ − 12 W Ď MV , maximally simplifies analysis by reducing the vanilla
SNR matrix to a diagonal matrix (Definition 4) whose entries determine the MSE loss (Lemma 1).
We introduce the alignment of features into their own notion of aligned SNR coordinates:
Definition 5 ( Renormalization to aligned SNR Coordinates ) .
Consider Ď H ∈ R P × CN with corresponding SNR left and right singular vectors U and V (Definition 2).
Then, define the SNRaligned renormalization of the features as
[Equation]
where ⊗ is the Kronecker product and C is a class-centering matrix defined as
[Equation]
As discussed in Section 3.1, the transformation Ď H → Σ − 12 W Ď H does not change the predictions of the least squares classifier.
Hence, it does not change the MSE loss.
It is easy to check that this still holds for X i.e. invariance is preserved by the change into SNR-aligned coordinates.
It is also easy to check that the sphericity of the within-class covariance is preserved as well:
Observation 2 ( Sphericity of Within-Class Covariance of SNR Coordinates ) .
[Equation]
Finally, routine applications of Definitions and canceling out of (partial) orthogonal matrix multiplications in aligned SNR coordinates lead to the following simplified representation for Ω and its differential:
Observation 3 ( Relation Between SNR Coordinates and SNR Matrix ) .
The aligned SNR matrix, Ω (Definition 4) can be expressed as a function of the features in aligned SNR-coordinates X (Definition 5) as simply
[Equation]
Moreover, let d Ω ij ( · ) : T X X
→ R be the differential 1-form 19 associated with the ij -th entry of Ω .
Define d Ω ( · ) : T X X
→ R C × C such that, for some Z ∈ T X X , each entry matrix of the matrix d Ω ( Z ) is d Ω i,j ( Z ) .
Then, it follows that
[Equation]
From a geometric perspective, the transformation in Definition 5 maps the features, H , to X belonging to a Normalized Features Manifold :
Definition 6 ( Normalized Features Manifold ) .
[Equation]
To understand the dynamics of the singular values of Ω —which is connected to the dynamics of the features through Lemma 1—we will analyze the gradient flow on this manifold .
To this end, we first identify its tangent space at a particular X as well as the projection operator onto that tangent space.
Proposition 3 ( Tangent Space of Normalized Features Manifold ) .
[Equation]
Proposition 4 ( Projection Onto Tangent Space of Normalized Features Manifold ) .
[Equation]
D. C ONTINUALLY RENORMALIZED GRADIENT FLOW
In fact, gradient flow on the normalized features manifold (Definition 6) is the continuous analogue of the intuitive, discrete algorithm in Subsection D.1.
In particular, the intuitive algorithm consists of a gradient step, Ď H 1 =
X 0 + ∆ X 0 followed by a mapping to the base space of the fiber bundle,
X 1 = Σ ( Ď H 1 ) − 12 Ď H 1 .
For small ∆ X 0 , these two steps are in fact equivalent (up to a negligible term) to taking a T X X -projected gradient step on the manifold X as proven below:
Lemma 2.
Assuming X 0 ∈ X , a renormalized gradient step,
[Equation]
X 0 ) , is equivalent, up to an O (cid:16) ∥
∆ X 0 ∥ 2 (cid:17) term, to a T X X -projected gradient step, i.e.
[Equation]
Proof.
Notice that
[Equation]
where in the last step we used our assumption that X 0 ∈ X , i.e., X 0 CX
= I .
By Taylor’s
Theorem,
[Equation]
Therefore, we get
[Equation]
where the last step follows from Proposition 4.
As we transition from a discrete gradient descent to a continuous gradient flow, the step size η → 0 , and the residual O (cid:16) ∥
∆ X 0 ∥ 2 (cid:17) in the above lemma becomes negligible, since ∆ X 0 = − η ∇ X L LS ( X 0 ) .
This motivates us to study, in the next section, the continually renormalized gradient flow (as defined in Equation 5 of the main text) of X on X :
[Equation]
D. P ROOF OF P ROPOSITION 2 ( GRADIENT FLOW IN ALIGNED SNR COORDINATES )
To prove Proposition 2, we first set up some auxiliary notation and lemmas.
Denote the j -th row (transposed) of X and Y , respectively, by
[Equation]
and
[Equation]
Recall that—when differentiating SVDs—the derivative of the j -th singular value, ω j , only depends on the j -th singular subspace (see Equation 17 of Townsend (2016)).
As a consequence, we will see in the following lemma that, for any differential d X , the corresponding d ω j only depends on d x j .
Lemma 3 ( Derivative of Singular Values With Respect to SNR Coordinates ) .
Given the differential 1-form d ω j ( · ) : T X X → R , the following holds for all 19 d X ∈ R C × CN :
[Equation]
where (consistent with Definition 2) we adopt the convention that ω C =0 is the C -th singular value of the SNR matrix.
Proof.
Using Observation 1 and the differential of the singular value decomposition (see Equationof Townsend (2016)):
[Equation]
where d Ω ( · ) is defined as in Observation 3.
Next, Observation 3 implies
[Equation] [Equation]
Using the projection onto the tangent space given in Proposition 4 above
[Equation]
Combining Equation 23, Equation 24, and Equation 25, we obtain:
[Equation]
Moreover, using Observation 1 and 3, we can simplify these expressions into
[Equation]
Finally, substituting the above three expressions into Equation 26, we get:
[Equation]
which proves the claim.
Using Lemma 3, we can now obtain the dynamics of x j under gradient flow:
Lemma 4.
Under continually renormalized gradient flow (Equation 5),
[Equation]
where (consistent with Definition 2) we adopt the convention that ω C =0 is the C -th singular value of the SNR matrix.
Proof.
Recall x j ∈ R CN is the j -th row of X ∈ R C × CN .
Applying the flow definition in Equationto the i -th element of x j gives
[Equation]
where d L LS d X ∈ R C × CN is the standard derivative within the ambient R C × CN -space, e i ∈ R CN and e j ∈ R C are the canonical basis vectors, and ⟨· , ·⟩ F is the Frobenius matrix inner-product.
Next, observe that the differential 1-form d L LS ( · ) : T X X
→ R satisfies the following:
[Equation]
Taking Z = Π T X X (cid:0)
e j e ⊤
i (cid:1) then leads to
[Equation]
where the second step follows by the chain rule, and the last step follows from Lemma 3 in that d ω
[Equation]
Π T X X (cid:0) e j e ⊤
i
(cid:1)(cid:1)
=
if k ̸ = j .
Moreover, Lemma 3 also gives
[Equation]
It then follows that
[Equation]
where the last step follows from differentiating the expression in Lemma 1.
The gradient flows of x j induce the dynamics of ω j , which are described below.
Lemma 5 ( Induced Dynamics on SVD of SNR ) .
Under continually renormalized gradient flow (Equation 5), the dynamics for the j -th non-zero SNR singular value (Definition 2) is
[Equation]
Proof.
Observation 1, the differential of the singular value decomposition (see Equation 17 of
Townsend (2016)), and Observation 3 collectively imply that for any 20 d X ∈ T X X ,
[Equation]
[Equation]
Recall that the differential of ω j only depends on the differential of x j (see Lemma 3).
Then, we can apply the chain rule:
[Equation]
where the last equality results substituting-in Lemma 4 and Equation 28.
Since Y Y ⊤ =
N I ,
[Equation]
Applying the same relation and Equation 21:
[Equation]
Combining all the above equations, we obtain
[Equation]
The closed-form given in Proposition 2 now directly follows.
Proposition 2 ( Dynamics of Singular Values of SNR Matrix ) .
Continually renormalized gradient flow on the central path (Equation 5) induces the following closed-form dynamics on the SNR singular values (Definition 2):
[Equation]
c 1 , c 2 , and c 3 are positive constants independent of j , and a j is a constant depending on ω j (0) .
Proof.
Follows from symbolically solving the ODE in Lemma 5 with routine methods.
The constants are c 1 = C 2 N , c 2 = CN , and c 3 = N 4 .
D. P ROOF OF C OROLLARY
Corollary 1 ( Properties of SNR Singular Values ) .
SNR singular values (Definition 2) following the
Equation 9 dynamics satisfy the following limiting behaviors:
lim t →∞ ω j ( t ) = ∞ and lim t →∞ ω j ( t ) 4 (cid:113) tc = 1 , for all j = 1 , . .
, C − 1 . 2.
lim t →∞ max j ω j ( t ) min j ω j ( t ) = 1 .
Proof.
As t tends to infinity, the right-hand side of Equation 9 diverges to infinity and therefore so does the left-hand side (LHS).
As the LHS approaches infinity, the logarithmic terms become negligible compared to the dominant quartic term, implying ω 4 j ( t ) → ∞ .
Since ω j ( t ) are singular values, they must be non-negative—implying ω j ( t ) → ∞ .
Based on the same argument, observe that lim t →∞ ω j ( t ) 4 (cid:113) tc = 1 for all j .
Since the constant c 3 is independent of j , it follows that lim
t →∞ max j ω j ( t ) min j ω j ( t ) = 1 .
D. P ROOF OF C OROLLARY
Lemma 6.
Under continually renormalized gradient flow (Equation 5), the left and right singular vectors of the SNR matrix remain constant i.e. they are independent of t .
Proof.
Recall from Definitions 3-4 and Observation 3 that, without loss of generality, this section analyzes the renormalized features X in a coordinate system where the corresponding SNR matrix, Ω = N − 1 XY ⊤ , is diagonal.
In these coordinates, the left and right singular vectors are simply partial identity matrices.
To show that the singular values of the SNR remain constant, it then suffices to show that d Ω d t = d
X d t Y is a diagonal matrix as well 21 .
Lemma 4 gives
[Equation]
where D 1 and D 2 are C × C diagonal matrices with the diagonal entries (cid:110)
ω
j ( C + ω 2 j )(cid:111)
C c =1 and (cid:110) ω
2 j ( C + ω 2 j ) 2 (cid:111)
C c =1 , respectively.
Then,
[Equation]
where, in the last equality, we used the easy-to-check identities that Y Y ⊤
=
N I C and CY = 0 .
In more detail, the first identity follows from the fact that Y is the one-hot label vectors stacked as columns; the second identity follows from the facts that C is the class-centering matrix, and the one-hot label is the same for examples from the same class.
Thus, we have shown d Ω d t is diagonal, which concludes our proof.
Corollary 2 ( Neural Collapse Under MSE Loss ) .
Under continually renormalized gradient flow (Equation 5), the SNR matrix (Equation 8) converges to [Equation]
[Equation]
where (cid:98) U 0 ∈ R P ×
( C − 1) and (cid:98) V 0 ∈ R C × ( C − 1) are the left and right singular vectors of the SNR matrix (Definition 2) at t =0 corresponding to the non-zero singular values; and ω max ( t ) is the largest singular value at time t .
Corollary 1 and Equation 10 together imply the occurrence of (NC1)-(NC4) i.e. renormalized gradient flow on the central path leads to Neural Collapse.
Moreover, denoting the Kronecker product with ⊗ , the renormalized features matrix converges to
[Equation]
Proof.
Consider the normalized SNR matrix
[Equation]
max
[Equation]
t ) SNR t at time t .
Corollary 1 proves the singular values j = 1 , . . .
, C − 1 of SNR t diverge to infinity and that their ratio tends to one.
(The Cth singular value is 0 due to the zero global-mean.)
Hence, (every convergent subsequence of)ω max ( t ) SNR t converges to a Simplex ETF.
This gives (NC2) .
By Lemma 6, the renormalized gradient flow will not change the singular vectors of the SNR matrix, and we get the limit in Equation 10.
Based on Equation 10, we deduce the within-class covariance, Σ W (cid:16)
[Equation]
, becomes negligible compared to the between-class covariance.
Therefore, the normalized matrix 1 ω max ( t ) X t undergoes activation collapse (NC1) .
From Theorem 1 of Papyan, Han, and Donoho (2020), we then know that (NC3) and (NC4) follow from (NC1) and (NC2) on the central path.
Combining the limit in Equation 10 with (NC1) proves the limit in Equation 11.
E R ELATED WORKS EXAMINING N EURAL C OLLAPSE
In this section, we discuss the contributions and limitations of seven recent works that propose and analyze theoretical abstractions of Neural Collapse.
These works are only available in preprint, and may not yet be peer-reviewed.
Thus, they might ultimately appear with very different claims or results.
Additionally, works such as Poggio & Liao (2020a;b); Ergen & Pilanci (2020) also analyze behaviors other than NC; we will only discuss the parts relevant to Neural Collapse here.
E. M IXON , P ARSHALL , AND P I (2020)
Mixon et al.
(2020) considered the unconstrained features model in Equation 2 (without weight decay) where, under gradient flow, ( W , H ) evolve according to a nonlinear ordinary differential equation (ODE).
They followed a two-step strategy for studying Neural Collapse.
First, they linearized the
ODE—claiming nonlinear terms are negligible for models initialized near the origin—and proved the simplified ODE converges to a subspace of ( W , H ) satisfying (NC1) and (NC3) .
Second, they proved that gradient flow, restricted to that subspace, converges to (NC2) .
The assumption of small weights and classifiers leading to the linearized ODE is not aligned with today’s paradigm.
Specifically, the most commonly used He initialization (He et al., 2015) is designed: (i) to create weights with non-negligible magnitude; and (ii) to preserve the magnitude of features, as they propagate throughout the layers of the network, exactly so that last-layer features would have non-negligible magnitude.
Moreover, the analysis of Mixon et al.
essentially assumes that (NC1) and (NC3) occur much sooner than (NC2) .
However, from the experiments in both Papyan, Han, and
Donoho (2020) and this paper, there is no empirical evidence that (NC2) happens slower than (NC1) and (NC3) in practice.
E. L U AND S TEINERBERGER (2020)
While the MSE loss provides a mathematically natural setting for analysis, the modern paradigm in multi-class classification with deep learning involves training with CE loss, which is more challenging to analyze than MSE.
Lu & Steinerberger (2020) studied the (one-example-per-class) unconstrained 22 features model with
CE loss:
[Equation]
Since under linear separability the CE loss can be driven arbitrarily close to zero, just by re-scaling the norms of W and M , the authors further imposed a norm constraint on w c and µ c .
Lu & Steinerberger observe that the global minimizer of this optimization problem is only achieved once W and M are the same Simplex ETF.
This derivation is suggestive, but it does not identify closed-form dynamics which would get gradient flow to such a global minimizer, nor does it address the rate of convergence to Neural Collapse.
Additionally, the constraint on µ c possesses no immediate or direct analogy to standard deep net training—where procedures often control the norm of the weights W , but not features H —nor class-means M .
E. E AND W OJTOWYTSCH (2020)
E & Wojtowytsch (2020) also consider the unconstrained features model 22 with CE loss,
[Equation]
where they adopt a more technical, spectral norm constraint on W to specify their model.
Building on the results of Chizat & Bach (2018; 2020), E & Wojtowytsch also construct a simple counter-example showing that Neural Collapse need not occur in two-layer, infinite-width networks— which have been the focus of intense recent study in the theoretical deep learning community (Mei et al., 2018; Rotskoff & Vanden-Eijnden, 2018; Arora et al., 2019).
Thus, E & Wojtowytsch’s counterexample suggests the alternative perspective that, despite the expressiveness of infinite-width, two-layer networks, such abstractions do not capture key aspects of trained deep nets.
As with Lu & Steinerberger (2020), standard deep net training does not possess any direct analogies for constraining the norm of features (as opposed to weights)—nor are there any paradigmatic regularizations that correspond to controlling the spectral norm on W .
Moreover, the work does not characterize any closed-form dynamics or the rate of convergence to Neural Collapse.
E.
[Equation]
WITH
Distinguished from the simplified unconstrained features models in the previously mentioned works is the theoretical analysis of Poggio & Liao (2020a;b) (in a special section, co-authored with Andrzej
Banburski).
The authors study deep homogeneous classification networks, with weight normalization layers, trained with stochastic gradient descent and weight decay.
This is much closer to today’s training paradigm, but the setting still differs from the one in which Neural Collapse has been empirically observed in Papyan, Han, and Donoho (2020) and in Section A of this paper.
In particular, they replace batch normalization with weight normalization and consider deep homogeneous networks; homogeneous networks can not have bias vectors nor skip connections, which are present both in
ResNet and DenseNet.
Moreover, the work gives explicit descriptions of neither the dynamics nor the rate of convergence to Neural Collapse.
E. E RGEN & P ILANCI (2020)
While the above-described works tend to focus on either the used-in-practice CE loss or the theoretically-insightful MSE loss, Ergen & Pilanci (2020) observed that these are both instances of the general class of convex loss functions and, thus, one could derive insights from the classical convex analysis literature.
Moreover, compared to Mixon et al.
; Lu & Steinerberger (2020);
E & Wojtowytsch (2020), this work studies the optimization starting from the second -to-last layer features rather than the last-layer features.
In particular, the authors use a strong-duality argument to show that NC emerges in the optimal solution of an equivalent proxy-model to the following optimization:
[Equation]
where L ( · ) is a general convex loss, H L − 1 are the second-to-last layer activations, W L − 1 are the second-to-last layer weights, W L are the network classifiers, Y are the training targets, λ is a weight-decay parameter, BN γ,α ( · ) is a batch-norm operator parameterized by α and γ , and ( · ) + is a
ReLU.
The incorporation of batch-normalization and weight-decay ensures the existence of bounded, well-defined optimal solutions—serving a similar role to that of weight-normalization and weight decay in Poggio & Liao (2020a;b) as well as the norm constraints in the other aforementioned related works.
Since strong-duality only characterizes properties of the converged optimal solution of an optimization model, Ergen & Pilanci (2020) does not provide insights into the dynamics with which that solution is achieved which training.
E. F ANG , H E , L ONG , AND S U (2021)
In Fang et al.
(2021), the authors introduce the ( N -) layer-peeled model in which one considers only the direct optimization of the N -th-to-last layer features of a deep net along with the weights that come after the N -th-to-last layer.
The motivating philosophy is that, after raw inputs are passed through some initial number of layers, the overparameterization of those layers would allow us to effectively model the N -th-to-last layer features as freely-moving in some subset of Euclidean space.
In this terminology, the concurrent works of Mixon et al.
; Lu & Steinerberger (2020);
E & Wojtowytsch (2020) on the unconstrained (last-layer) features model could be considered instances of a 1-layer-peeled model; while the model of Ergen & Pilanci (2020) could be considered as a 2-layer-peeled model.
This perspective is attractive because it gives a name and organization to a common modeling philosophy behind the above-described body of independent works.
For comparison, the work of Poggio & Liao (2020a;b) is a non-example of layer-peeled modeling as it considers optimization on the weights of homogeneous deep nets and not the input features.
Fang et al.
(2021) then analyzes a convex relaxation of the 1-layer-peeled model—with norm constraints on the weights and features—into a semidefinite program.
Not only do the authors show that this model exhibits Neural Collapse in the canonical setting of balanced examples-per-class, but they also analyze the behavior of this model under imbalanced classes .
While, in the imbalanced case, one would intuitively expect the Simplex ETF to “skew” to have bigger angles around overrepresented classes and smaller angles around under-represented ones; Fang et al.
(2021) identifies the surprising phenomenon—named minority collapse —in their model where, when the imbalances pass a certain threshold, the last-layer features and classifiers of the under-represented classes collapse to be exactly the same .
However, their work does not provide closed-form dynamics or rates at which collapse—in either the balanced or imbalance case—occurs.
E. Z HU , D ING , Z HOU , L I , Y OU , S ULAM , AND Q U (2021)
In Zhu et al.
(2021), the authors examine the following unconstrained features model:
[Equation]
where ( W , b ) are the classifier weights and biases, H are the last layer features, and ( λ W , λ H , λ b ) are weight-decay parameters.
On this model, the authors not only prove that all minima exhibit
Neural Collapse but also that all local minima are global minima .
In comparison to our current paper, Zhu et al.
(2021) focus on characterizing the landscape of the loss and, thus, do not explore the dynamics and rate at which such minimizers of the loss are achieved.
Zhu et al.
(2021) also make notable empirical contributions by conducting a series of experiments on the MNIST and CIFAR10 datasets trained on MLPs, ResNet18, and ResNet50.
Their measurements give evidence for the following novel NC-related phenomena in deep classification networks:
NC is algorithm independent: NC emerges in realistic classification deep net training regardless of whether the algorithm is SGD, ADAM, or L-BFGS.
NC occurs on random labels: NC emerges even when the one-hot target vectors are completely shuffled.
Width improves NC: Increasing network width expedites NC when training with random labels.
The authors of Zhu et al.
(2021) moreover conducted ablation experiments suggesting that the following substitutions can be made to deep neural net architectures without affecting performance:
Weight-decay substitution:
Replacing (A) weight-decay on the norm of all network parameters with (B) weight-decay just on the norm of the last-layer features and classifiers.
Classifier substitution:
Replacing (A) the last-layer classifiers that are trained with SGD with (B) Simplex ETF classifiers that are fixed throughout training.
While the authors only demonstrated these new behaviors on limited network-dataset combinations, these experiments indeed inspire interesting conjectures about the generalization behavior of deep nets as well as potential architecture design improvements; Zhu et al.
(2021) discuss many of these conjectures and related open-questions in detail.