P ERTURBATION A NALYSIS OF N EURAL C OLLAPSE
Anonymous authors
Paper under double-blind review
A BSTRACT
Training deep neural networks for classification often includes minimizing the training loss beyond the zero training error point.
In this phase of training, a “neural collapse” behavior has been observed: the variability of features (outputs of the penultimate layer) of within-class samples decreases and the mean features of different classes approach a certain tight frame structure.
Recent works analyze this behavior via idealized unconstrained features models where all the minimizers exhibit exact collapse.
However, with practical networks and datasets, the features typically do not reach exact collapse, e.g., because deep layers cannot arbitrarily modify intermediate features that are far from being collapsed.
In this paper, we propose a richer model that can capture this phenomenon by forcing the features to stay in the vicinity of a predefined features matrix (e.g., intermediate features).
We explore the model in the small vicinity case via perturbation analysis and establish results that cannot be obtained by the previously studied models.
For example, we prove reduction in the within-class variability of the optimized features compared to the predefined input features (via analyzing gradient flow on the “central-path” with minimal assumptions), analyze the minimizers in the near-collapse regime, and provide insights on the effect of regularization hyperparameters on the closeness to collapse.
We support our theory with experiments in practical deep learning settings.
I NTRODUCTION
Modern classification systems are typically based on deep neural networks (DNNs), whose parameters are optimized using a large amount of labeled training data.
Their training scheme often includes minimizing the training loss beyond the zero training error point (Hoffer et al., 2017;
Ma et al., 2018; Belkin et al., 2019).
In this terminal phase of training, a “neural collapse” (NC) behavior has been empirically observed when using either cross-entropy (CE) loss (Papyan et al., 2020) or mean squared error (MSE) loss (Han et al., 2022).
The NC behavior includes several simultaneous phenomena that evolve as the number of epochs grows.
The first phenomenon, dubbed NC1, is decrease in the variability of the features (outputs of the penultimate layer) of training samples from the same class.
The second phenomenon, dubbed
NC2, is increasing similarity of the structure of the inter-class features’ means (after subtracting the global mean) to a simplex equiangular tight frame (ETF).
The third phenomenon, dubbed NC3, is alignment of the last layer’s weights with the inter-class features’ means.
A consequence of these phenomena is that the classifier’s decision rule becomes similar to nearest class center in feature space.
Many recent works attempt to theoretically analyze the NC behavior (Mixon et al., 2020;
Lu &
Steinerberger, 2022; Wojtowytsch et al., 2021; Fang et al., 2021; Zhu et al., 2021; Graf et al., 2021;
Ergen & Pilanci, 2021; Ji et al., 2021;
Galanti et al., 2021; Tirer & Bruna, 2022;
Zhou et al., 2022;
Thrampoulidis et al., 2022; Yang et al., 2022; Kothapalli et al., 2022).
The mathematical frameworks are almost always based on variants of the unconstrained features model (UFM), proposed by Mixon et al.
(2020), which treats the (deepest) features of the training samples as free optimization variables (disconnected from data or intermediate/shallow features).
Typically, in these “idealized” models all the minimizers exhibit “exact collapse” (i.e., their within-class variability is exactly 0 and an exact simplex ETF structure is demonstrated) provided that arbitrary (but nonzero) level of regularization is used.
However, the features of DNNs are not free optimization variables but outputs of predetermined architectures that get training samples as input and have parameters (shared by all the samples) that are hard to optimize.
Thus, usually, the deepest features demonstrate reduced “NC distance metrics” (such as within-class variability) compared to features of intermediate layers but do not exhibit convergence to an exact collapse.
Indeed, as can be seen in any NC paper that presents empirical results, the decrease in the NC metrics is typically finite and stops above zero at some epoch (the margin depends on the dataset complexity, architecture, hyperparameter tuning, etc.).
In this paper, this issue is taken into account by studying a model that can force the features to stay in the vicinity of a predefined features matrix.
By considering the predefined features as intermediate features of a DNN, the proposed model allows us to analyze how deep features progress from, or relate to, shallower features.
We explore the model in the small vicinity case via perturbation analysis and establish results that cannot be obtained by the previously studied UFMs.
Specifically, we prove reduction in the within-class variability of the optimized features compared to the predefined input features.
To obtain this result (for arbitrary input features), we prove monotonic decrease of withinclass variability along gradient flow on the “central-path” of a UFM with minimal assumptions (i.e., we drop the assumptions and modifications of the flow that Han et al.
(2022) did to facilitate their analysis).
Next, we provide a closed-form approximation for the model’s minimizer.
Then, focusing on the case where the input features matrix is already near collapse (e.g., the penultimate features of a well-trained DNN), we present a fine-grained analysis of our closed-form approximation, which provides insights on the effect of regularization hyperparameters on the closeness to collapse.
We support our theory with experiments in practical deep learning settings.
B ACKGROUND AND P ROBLEM S ETUP
Consider a classification task with K classes and n training samples per class.
Let us denote by y k ∈ R K the one-hot vector with 1 in its k -th entry and by x k,i ∈
R p the i -th training sample of the k -th class.
DNN-based classifiers can be typically expressed as
[Equation]
where h θ ( · ) : R p −→ R d (with d ≥ K ) is the feature mapping that is composed of multiple layers (with learnable parameters θ ), and W = [ w 1 , . .
. , w K ] ⊤ ∈ R K × d ( w ⊤ k denotes the k th row of
W ) and b ∈ R K are the weights and bias of the last classification layer.
The network’s parameters Θ = { W , b , θ } are usually learned by empirical risk minimization
[Equation]
where L ( · , · ) is a loss function (e.g., CE or MSE 1 ) and R ( · ) is a regularization term.
Following the work of Mixon et al.
(2020), in order to mathematically show the emergence of minimizers with NC structure, most of the theoretical papers have followed the “unconstrained features model” (UFM) approach, where the features { h θ ( x k,i ) } are treated as free optimization variables { h k,i } .
Namely, they study problems of the form
[Equation]
One such example is the work in (Tirer & Bruna, 2022), which considered a setting with regularized
MSE loss (which shares similarity with models in the matrix factorization literature (Koren et al., 2009; Chi et al., 2019), except the assumptions that d ≥ K and on the specific structure of Y ):
[Equation]
where H =
[ h 1 , 1 , . . .
, h 1 ,n , h 2 , 1 , . .
, h K,n ] ∈ R d ×
Kn is the (organized) unconstrained features matrix, Y
=
I K ⊗ 1 ⊤ n ∈ R K × Kn (where ⊗ denotes the Kronecker product) is its associated onehot vectors matrix, and λ W and λ H are positive regularization hyperparameters.
It was shown that all the (global) minimizers of this bias-free UFM exhibit an orthogonal collapse, as stated in the following theorem.
Theorem 2.1 (Theorem 3.1 in (Tirer & Bruna, 2022)) .
Let d ≥ K and define c := √ λ H λ W .
If c ≤ 1 , then any global minimizer ( W ∗ , H ∗ ) of Eq.
1 satisfies
[Equation]
If c > 1 , then Eq. 1 is minimized by ( W ∗ , H ∗ ) =
In short, the theorem states that any minimizer ( W ∗ , H ∗ ) of Eq.
1 obeys that H ∗
=
H ⊗ 1 ⊤ n for some H ∈ R d × K , and W ∗ H
∝ H ⊤ H ∝ W ∗ W ∗⊤ ∝ I K .
It is not hard to show that H ⊤ H
=
ρ I K implies that
[Equation]
where h ∗ G = 1 K (cid:80)
Kk =
h ∗ k
= 1 K H1 K is the global mean.
Namely, the “mean-subtracted features” collapse to a simplex ETF.
From the structure of the problem and the theorem, we see that there are infinitely many minimizers of Eq. 1.
Indeed, as can be deduced from the proof of Theorem 2.
in (Tirer & Bruna, 2022):
Taking any (partial) orthonormal matrix R ∈ R d × K (i.e., R ⊤ R =
I K ), one can construct a minimizer for Eq.
1 simply by H ∗ = (cid:112) ρ ( λ W , λ H ) R ⊗ 1 ⊤ n and W ∗ =
(cid:112) λ H /λ W (cid:112)
ρ ( λ W , λ H ) R ⊤ .
The existing literature includes other different UFM settings where all the minimizers exhibit NC structures (e.g., see (Lu & Steinerberger, 2022;
Wojtowytsch et al., 2021; Zhu et al., 2021; Fang et al., 2021; Thrampoulidis et al., 2022)).
However, as discussed in Section 1, all the previously studied UFMs are idealized and their results deviate from the situation in practical DNN training, where the features do not exhibit exact collapse (e.g., since deep layers cannot arbitrarily modify intermediate features that are far from being collapsed) and the setting of the hyperparameters affects the distance from NC structure.
In this paper, we consider a different model with the goal of better analyzing the real-world “near collapse” situation where “exact NC” cannot be reached.
Motivated by Eq.
1, we consider the following model
[Equation]
where H 0 ∈ R d × Kn is an input features matrix, which is fixed, and β is a positive hyperparameter that controls the distance of H from H 0 .
Let us discuss the motivation for studying this model.
As before, we interpret W and H as the final weights and deepest features of the DNN, respectively.
Clearly, for H 0 = 0 this model reduces to Eq.
1 (with ∥ H ∥ 2 F regularized by λ H + β ).
Furthermore, when H 0 is nonzero, but already a minimizer of Eq. (and thus has zero within-class variability and an orthogonal frame structure), the following statement is straightforward.
Corollary 2.2.
Let d ≥ K , λ H λ W < 1 , and let ( W ∗ , H ∗ ) be a minimizer of Eq.
Then, the minimizer of f ( W , H ; H
= H ∗ ) (in Eq. 2) is unique
and it is given by ( W ∗ , H ∗ ) . t W closed of H
That is, Eq. 2 allows us to pick one of the minimizers of Eq.
1 by H
and transfer its orthogonal collapse properties, which are stated in Theorem 2.1, to the minimizer of Eq. 2.
However, the usefulness of Eq.
2 comes from exploring cases with nonzero/non-collapsed H 0 .
Indeed, while H can be interpreted as the deepest features of a DNN, here we interpret H
as the features that are obtained in a shallower layer.
In this case, 1 /β can be understood as the complexity of the subnetwork from H 0 to H .
We are particularly interested in the the large β regime, β ≫ 1 , where H 0 expresses penultimate features (only one layer before H ) that significantly constrain H . In Appendix F we review practical DNNs where the distance between the deepest and penultimate features may be small or is even inherently small.
In this paper we focus on this large β regime, and provide mathematical reasoning for the empirical NC behavior that are not captured by previously studied UFMs, such as proving that the optimized H has smaller within-class variability than H 0 , and analyzing how perturbations from collapse of H 0 can be mitigated by the minimizer of Eq. 2.
D ECREASE IN W ITHIN -C LASS V ARIABILITY
As discussed above, while the features matrix H represents the output of a DNN’s penultimate layer, the input matrix H 0 can be interpreted as the features of a preceding layer.
Several works have presented empirical settings where the within-class variability of the features, measured by some “NC1 metric”, decreases across depth (Papyan et al., 2020; Tirer & Bruna, 2022; Galanti, 2022).
The goal of this section is to prove such a phenomenon for the model stated in Eq.
The theory that we provide shows also monotonic decrease of the within-class variability (till exact collapse) along gradient flow on the “central-path” of the UFM stated in Eq.
Let us begin with several definitions that will be used in this section.
For a given set of n features for each of K classes, { h k,i } , we define the per-class and global means as h k := 1 n (cid:80) ni =1 h k,i and h G :
= 1 Kn (cid:80) kk =1 (cid:80) ni
=1 h k,i , respectively, as well as the mean features matrix H :
= (cid:2)
h 1 , . .
, h K (cid:3) .
Next, we define the within-class and between-class d × d covariance matrices
[Equation]
The within-class variability collapse (NC1) can be expressed as Σ W ( H ) → 0 while Σ B ( H ) ↛ 0 , where the limit takes place with increasing the training epoch, and Σ B ( H ) > 0 filters degenerate cases such as H = 0 .
Several papers considered in their experiments the metric [Equation] Tr
[Equation]
H
[Equation]
, where Σ † B denotes the pseudoinverse of Σ B (Papyan et al., 2020; Han et al., 2022; Zhu et al., 2021).
Yet, we believe that considering the metric
[Equation]
is more amenable for theoretical analysis while capturing the desired nondegenerate collapse behavior.
Indeed, the trace of a covariance matrix equals zero if and only if the covariance matrix is a zero matrix (this follows from Cov 2 (
X, Y ) ≤ Var( X )Var( Y ) ).
Recall that the minimizer w.r.t.
W in Eq.
2 (and Eq. 1) has a closed-form expression that is a function of H , which is given by W ∗ ( H ) =
YH ⊤ ( HH ⊤ [Equation] nλ W I d ) − 1 .
Thus, the optimization in Eq.
2 is equivalent to
[Equation]
where L ( H ) :
=
[Equation]
For large β , the minimizer H 1 /β can be viewed as a backward/implicit gradient descent update from
H 0 with respect to the loss L .
This follows from rewriting the first order optimality condition as
[Equation]
Observing that for β → ∞ we have H 1 /β
→ H 0 (formally shown in Appendix B), the above equation can be written as d H t dt (cid:12)(cid:12) t =
= − Kn ∇L ( H 0 ) , where we think of t as β − 1 .
This naturally gives rise to the gradient flow
[Equation]
associated with the UFM in Eq.
This means that results on this flow can be translated to results on the minimizer of Eq.
2 in the large β regime.
Indeed, in Theorem 3.1 below, we show that (cid:103) NC 1 ( H ) monotonically decreases along this flow, which implies that (cid:103) NC 1 ( H 1 /β ) < (cid:103) NC 1 ( H 0 ) for large enough β (see the statement in Corollary 3.2 below).
Note that a flow for an objective that is equivalent to L ( H ) with λ W = 0 and λ H = 0 has been studied in (Han et al., 2022), who called it the “central path”.
The motivation for studying such an objective, where the optimization variable W is replaced by the optimal W ∗ ( H ) , comes from the empirical observation in (Han et al., 2022) that the gap ∥ W ∗ ( H ) H − Y ∥ 2 F −∥ WH − Y ∥
2 F is rather small (compared to each term) during the optimization process of practical DNNs.
We now state our result for gradient flow on the ”central path” (which is proved in Appendix A).
Theorem 3.1.
Assume that λ W > 0 , λ H ≥ 0 , and that H 0 is non-collapsed (i.e., Σ W ( H 0 ) ̸ = 0 ).
Then, along the gradient flow, which is stated in Eq.
4, we have that
• (cid:103) NC 1 ( H t ) strictly decreases along the flow untill it reaches zero.
• t (cid:55)→ e 2 λ H t
Tr( Σ W ( H t )) decreases along the flow.
In particular, when λ H > 0 , Tr( Σ W ( H t )) decays exponentially.
• t (cid:55)→ e 2 λ H t
Tr( Σ B ( H t )) strictly increases along the flow.
Remark.
Note that our gradient flow analysis has minimal assumptions.
Unlike (Han et al., 2022), our flow does not assume zero global mean ( h G = 0 ), λ W = λ H = 0 and invertibility of Σ W .
And most importantly, it does not include any engineered renormalization and projection of the gradient, contrary to the previous work.
Thus, it is more similar to practical gradient descent optimization of DNNs.
Our unmodified flow and minimal assumptions require a different, and more general, analysis with quite involved computations.
Not only does Theorem 3.1 state a monotonic decrease toward 0 in the NC1 metric, it also provides a separation between the behavior of Tr( Σ W ) and
Tr( Σ B ) along the flow.
A strict separation is observed for λ H = 0 :
Tr( Σ W ) decreases while Tr( Σ B ) increases.
As gradient flow is often used as a proxy for analyzing gradient descent with a small step-size (Elkabetz & Cohen, 2021), if we overlook the difference between optimizing the UFM in Eq.
1 jointly w.r.t.
W and H and restricting the optimization to the “central path” ( W ∗ ( H ) , H ) , then our theory also provides a mathematical reasoning for the experiments on gradient descent in (Tirer & Bruna, 2022) that show monotonic decrease in within-class variability.
Finally, with our interpretation of t as β − 1 , the following Corollary is a direct consequence of
Theorem 3.1 and the continuity of ∇L ( H ) (see Appendix B for a formal proof).
Corollary 3.2.
Assume that H 0 is non-collapsed.
Then, there exists some constant C = C
( H 0 )
>such that for β > C we have that (cid:103) NC [Equation]
( H ) H
Recall that in the large β regime we can interpret H as features of DNN that are deeper than H 0 but such that the architecture between H 0 and H is extremely simple (e.g., they are features of adjacent layers) and thus the distance between them is constrained.
Under this interpretation, Corollary 3. implies that layer-wise optimization of DNN where each time a new layer is added (so that the previous deepest features H 1 /β are considered as the new H 0 ) will result in gradually depthwise decreasing NC1.
An extension of the model in Eq.
2 that will include multiple levels of optimizable parameters may be able to provide similar reasoning to the gradual depthwise decrease in NC1 that is observed in practical DNN training, where all the layers are optimized simultaneously.
A NALYSIS OF THE N EAR -C OLLAPSE R EGIME
In this section, we will explore the behavior of the minimizers of Eq.
2 in the near collapse regime.
As stated in Corollary 2.2, if H 0 is already collapsed then the minimizer of Eq.
2 is also collapsed.
This is aligned with the rationale that if we have a DNN that already exhibits collapse at some intermediate layer, we would expect the subsequent layers to maintain this collapse.
Essentially, we would like to analyze the minimizer of Eq.
2 for H 0 that is not already collapsed.
Unfortunately, for general non-collapsed H
it is not likely that the minimizer is amenable for explicit analytical characterization.
Yet, the fact that for orthogonally collapsed H
= H ∗ we get a unique minimizer ( W ∗ , H ∗ ) of Eq. 2, which is still characterized by Theorem 2.1, gives us a desirable setting for examining the minimizer of Eq.
2 obtained for ˜ H
= H ∗ + δ H 0 (with sufficiently small δ H 0 ) by exploiting our knowledge on ( W ∗ , H ∗ ; H
= H ∗ ) .
Analyzing the near-collapse setting will shed light on the way that the deviation from collapse in the input features is transferred to the optimized features, e.g., the amount of interaction within/between classes and the effects of hyperparameters.
Such insights can be latter examined empirically beyond the near-collapse regime.
Let us denote by ( ˜ W ∗ , ˜ H ∗ ) the minimizer of f ( W , H ; ˜ H 0 ) .
We are interested in studying the dependence of δ W :=
˜ W ∗ − W ∗ and δ H :=
˜ H ∗ − H ∗ on δ H
= ˜
H 0 − H ∗ without the requirement of computing ( ˜ W ∗ , ˜
H ∗ ) (that lack analytical expressions).
In particular, our focus is on the relation between the features δ H and δ H 0 (rather than δ W and δ H 0 ), both because a minimizer ˜
H ∗ uniquely implies the associated ˜ W ∗ , and because important aspects of NC, such as within-class variability decrease (NC1) and inter-class feature structure (NC2), consider the feature mapping rather than the last layer weights.
We begin with establishing such a result in the following theorem (which is proved in Appendix C) for H 0 that is not necessarily a collapsed features matrix.
The notation in the theorem is as follows.
We use vec( · ) to denote the column-stack vectorization of a matrix.
The derivatives are w.r.t.
the vectorized matrices vec( H ) and vec( W ) .
For example, ∇ H f ∈ R dnK × 1 stands for the derivative of f w.r.t.
vec( H ) , and a second derivative w.r.t.
vec( W ) ⊤ yields ∇ ⊤ W ∇ H f ∈ R dnK ×
Kd .
Theorem 4.1.
Let d ≥ K , and set some H 0 and δ H 0 .
Let ( ˆ W ∗ , ˆ H ∗ ) be the minimizer of f ( W , H ; H 0 ) (with f stated in Eq. 2).
Let ( ˜ W ∗ , ˜
H ∗ ) be the minimizer of f ( W , H ; ˜ H
=
H
+ δ H 0 ) .
Define δ W :=
˜ W ∗ − ˆ W ∗ and δ H :=
˜ H ∗ − ˆ H ∗ .
Then, with approximation accuracy of O ( ∥ δ H ∥ 2 , ∥ δ W ∥ 2 , ∥ δ H 0 ∥ 2 ) , we have that vec( δ H )
≈ β Kn (cid:0)
[Equation]
where all the derivatives 7 are evaluated at the point ( ˆ W ∗ , ˆ H ∗ ; H 0 ) .
In particular, for β ≫ max { 1 , λ H } we have (with additional approximation error of O ( β − 2 ) )
[Equation]
where
[Equation]
and e d,i is the standard vector in R d with 1 in its i th entry (similar definition stands for e K,k ).
Observe that, assuming small approximation error, Theorem 4.1 states the linear operation that transforms δ H 0 to δ H .
We will focus on the large β regime that is stated in Eq.
5, where the matrix inversion can be well approximated.
Furthermore, due to the vectorization operation, observe that the linear expression vec( δ H )
≈ F vec( δ H 0 ) has the following block-based representation
[Equation]
where δ H ( k ) :
=
δ H
[: , dn ( k − 1) + 1 : dnK ] ∈ R d × n is the sub-matrix of δ H that is composed of the columns associated with the k th class (and similarly for δ H 0 ).
Namely, we have that F ∈ R dnK × dnK is composed of blocks of size dn × dn .
The diagonal blocks are the “intra-class blocks”.
Each of them shows the effect of perturbation in a certain class in H 0 on the features of the same class in H .
The off-diagonal blocks are the “inter-class blocks”.
Each of them shows the effect of perturbation in a certain class in H 0 on the features of another class in H .
Recall that for H
= H ∗ that is already exactly collapsed, the minimizer of f ( · ; H 0 ) is also collapsed, so ˆ H ∗ =
H ∗ in the above theorem.
Importantly, in this case the matrix in Eq.
6 transforms deviation from exact collapse in the input features to deviation from exact collapse in the optimized features.
Thus, we have that stronger attenuation behavior of the blocks of F (e.g., small singular values) implies that the minimizer
˜ H ∗ is closer to exact collapse.
Based on specializing Theorem 4. to the near-collapse case, we present in the following theorem (which is proved in Appendix D) an exact analysis of singular values of the blocks of F .
(The notations σ max ( · ) and σ min ( · ) stand for the largest and smallest singular values of a matrix, respectively).
Theorem 4.2.
Consider the setting of Theorem 4.1, λ H λ W < 1 (assumed in Theorem 2.1), d > K , β ≫ max { 1 , λ H } , and the representation of Eq.
5 that is given in Eq.
Let H 0 be a collapse features matrix (minimizer of Eq.
1 for the same λ H , λ W as in Eq. 2).
Then, for k, ˜ k ∈ [ K ] with k ̸ =
˜
k
we have that F k,k is full rank, F k, ˜ k is rank-1, and
[Equation]
Remark.
In Appendix D we derive expressions for the complete singular value decomposition of F k,k and F k, ˜ k .
Our expressions for the entire spectrum of F k,k reveal its step-wise decreasing shape, as visualized in Figure 1 for β = 100 , K = 4 , d = 10 , n = 10 , λ W = √and various values of λ H .
To keep the paper concise, we state in the above theorem only the results for the maximal and minimal singular values of F k,k , but note that, similarly to σ min ( F k,k ) , almost all singular values decrease as λ H increases.
Even though a small portion ( 1 − K/d n ) of the singular values equal 1 (as shown in our analysis in
Appendix D), we can still gain insights on the attenuation profile since generic perturbations are unlikely to concentrate in such an extremely low-dimensional subspace (and, in fact, the singular vectors associated with this subspace do not affect the within-class variability).
From Theorem 4.2 we gain the following insights on the minimizer of Eq.
2 in the near-collapse and large β regime.
First, observe that not only do exactly collapsed minimizers have orthogonal features for different classes, but also in the near-collapse setting an intra-class block is much more dominant than each inter-class block, as follows from F k, ˜
k being rank-1 and σ max ( F k, ˜ k ) ≪
σ min ( F k,k ) .
For generic perturbations that do not concentrate in specific low-dimensional subspaces this implies that also before/near pure collapse, we have that the deviation from collapse in the features of a certain class is mainly due to deviation from collapse of input (preceding) features of the same class and not those of the K − 1 other classes.
(See Appendix D.1 for more details, and note that this also implies preservation of per-class near-collapse).
Second, we see that the feature mapping regularization plays the major role in approaching (near-)collapse behavior.
Indeed, increasing λ H decreases the spectral values of the (more dominant) intra-class blocks { F k,k } (contrary to increasing λ W ).
Recall that reducing the singular values of the blocks of F implies reducing the distance of the minimizer
˜ H ∗ from exact collapse.
Third, our result on the inter-class blocks { F k, ˜ k
̸ = k } hints that the regularization of the last layer’s weights (determined by λ W > 0 ) may still have a supportive effect on reaching (near-)collapse behavior by reducing the component of the deviation from collapse that is due to “crosstalk”/interference of features of different classes (e.g., when some classes are harder to be classified then others).
In the sequel, we show that the above observations correlate with the NC behavior in practical settings.
E XPERIMENTS
In this section, we translate the insights that are obtained for the model in Eq.
2 to what is observed with practical DNNs and datasets.
We evaluate the distance of DNN’s features from exact NC using metrics that have been also used in previous works.
Despite defining the metric (cid:103) NC 1 in Eq. 3, here we mainly measure within-class variability using NC 1 := 1 K Tr (cid:16) Σ W Σ † B (cid:17) , where we use the definitions of Section 3.
(We use this metric due to its popularity even though it is less amenable for theoretical analysis).
We measure the structure of the features using
[Equation]
where the simplex ETF is normalized to unit Frobenius norm.
The result of Section 3 provides reasoning to justify depthwise decrease in within-class variability, which has already been empirically demonstrated for end-to-end training in several papers (Papyan et al., 2020;
Tirer & Bruna, 2022; Galanti, 2022) (we present such experiments in
Appendix E.2).
Here we show this behavior also for layer-wise training, which is better represented by our model.
We consider the CIFARdataset and train an MLP with 1 to 10 hidden layers and a final classification layer.
Each time, we add and train a hidden layer on top of the previous hidden layers, which are maintained fixed.
Then we compute the NC1 metrics for the deepest features.
Due to space limitation, the experimental details are deferred to Appendix E.1.
Figure 2 demonstrates decrease in both NC 1 and (cid:103) NC 1 as we add more hidden layers on top the previous, which are maintained fixed.
Note that our theory justifies such decrease for all the layers (the features are not required to be near collapse).
Next, we turn to demonstrate correlation of practical NC behavior with the insight gained in Section
that λ H plays a bigger role than λ W does in approaching NC.
Based on the equivalence of
L 2 -regularization with weight decay (WD) in gradient-based methods, we can make the analogy of regularizing H in Eq.
2 to WD of the weights of practical DNNs in the feature mapping layers (i.e., excluding the last layer’s weights).
Importantly, note that this analogy is empirically justified for plain UFMs in (Zhu et al., 2021).
Under this analogy, our analysis suggests that, as long as entering the zero training error phase of training is maintained, increasing (resp.
decreasing) the WD in the feature mapping layers should decrease (resp.
increase) the distance from exact collapse more than increasing (resp.
decreasing) the WD in the classification layer.
Indeed, we empirically show this behavior below.
(More experiments are presented in Appendix E.2).
We note that there exists a work that empirically 8 shows that WD facilitates collapse (Rangamani & Banburski-Fahey, 2022), however, they do not examine the WD in feature mapping and classification layers separately.
[Figure]
We consider the CIFAR-10 dataset and examine how modifying the regularization hyperparameters affects the NC behavior of the widely used ResNet18 (He et al., 2016a) compared to a baseline setting.
Specifically, as a baseline hyperparameter setting, we consider one that is used in previous works (Papyan et al., 2020; Zhu et al., 2021): default PyTorch initialization of the weights, SGD optimizer with learning rate 0.05 that is divided by 10 every 40 epochs, momentum of 0.9, and WD of 5e-4 for all the network’s parameters.
The modifications include: 1) doubling the WD only for the last (FC) layer; 2) doubling the WD only for feature mapping (conv) layers; 3) zeroing the WD for the last layer; and 4) zeroing the WD for feature mapping layers.
Figure 3 presents the NC1 and NC2 metrics of the (deepest) features for: (Top) MSE loss with no bias in the FC layer (similar to the analyzed model); and (Bottom) CE loss with bias in the
FC layer.
In all the settings, we reach zero training error at the 40 epoch approximately.
The empirical results show that modifying the WD in the feature mapping layers leads to curves with larger deviations from the baseline compared to modifying the last layer’s WD, which is aligned with the theory established in Section 4 (i.e., the important role of λ H in attenuating the dominant intraclass perturbations).
Reducing (zeroing) the WD in the feature mapping increases the distance from exact NC (i.e., from 0 value of the metrics), while increasing the WD decreases the gap from exact
NC, as the theory predicts.
The fact that sometimes (e.g., with CE loss) increasing the WD of the last layer can also decrease the gap from collapse hints that mitigating inter-class interference/correlation of features in practical deep learning settings is more significant for reaching NC than in our analysis that considers a near-collapse regime.
Yet, both the experiments and the theoretical study show that the regularization of the feature mapping has larger significance in approaching NC.
C ONCLUSION
The features that are learned by training practical networks on real world datasets typically do not reach exact NC.
In this paper, we addressed this issue by studying a model that can force the features to stay in the vicinity of a predefined features matrix.
We analyzed it for the small vicinity case and established results that cannot be obtained by the previously studied (idealized) UFMs.
We proved reduction in within-class variability of the optimized features compared to the input features (via analyzing gradient flow along the “central-path” of a UFM with minimal assumptions, unlike existing literature).
We also presented an analysis of the model’s minimizer in the near-collapse regime that provides insights on the effect of the regularization hyperparameters on the closeness to collapse, which correlate with the behavior in practical deep learning settings.
We believe that our perturbation analysis approach, which is based on exploiting our knowledge on exactly collapsed minimizers of UFMs for studying non-collapse cases, can be applied to models other than the one considered in this paper, such as models with different loss functions and/or multiple levels of features and/or imbalanced data.
A P ROOF OF T HEOREM 3.
To prove Theorem 3.1, in addition to the within-class and between-class covariance matrices, let us define the total covariance matrix (across all classes) of the non-centered features
[Equation]
For convenience we also define the non-centered between-class covariance matrix
[Equation]
We have the decomposition ˜ Σ T ( H ) =
Σ W ( H )
+ ˜ Σ B ( H ) .
Using YH ⊤
=
( I K ⊗ 1 ⊤ n ) H ⊤ = n H ⊤ and ˜ Σ T = 1 Kn HH ⊤ , we have that for each feature matrix
H , the optimal weight matrix W ∗ ( H ) is given by
[Equation]
Next, let us simplify the terms with W ∗ ( H ) in L ( H ) :
[Equation]
For the first term in L ( H ) , observe that
[Equation]
where in the second equality we used ˜ Σ B = 1 K HH ⊤ , and in the last equality we used ( ˜ Σ T + λ W K
I
[Equation] [Equation]
λ
[Equation]
For the second term in L ( H ) , observe that
[Equation]
Adding the two terms together,
[Equation]
where we used ( ˜ Σ T + λ W K I )
− 1 ˜ Σ B
= I − ( ˜ Σ T + λ W K I ) − 1 ( Σ W + λ W K I ) .
Finally, for the third term in L ( H ) we have
[Equation]
H
[Equation]
To conclude
[Equation]
Next, we are going to analyze the traces of d Σ B dt , d Σ W dt , and d ˜ Σ T dt , along the flow that is stated in
Eq. 4, which is repeated here for the convenience of the reader:
[Equation]
In the following lemma
[Equation]
we state the required derivatives.
Lemma A.1.
Denote C B := Σ
[Equation] [Equation]
1 , ˜ C B
[Equation]
= ˜ Σ B ( ˜ Σ T + λ W K I ) − 1 and C W := Σ W
[Equation]
˜ Σ T + λ W K I ) − 1 .
Along the gradient flow we have
[Equation]
Proof.
We use the notation ∂ kjl to denote the derivative w.r
[Equation]
t. the l th entry of h k,j .
Then
[Equation]
where e l ∈ R
d is the one-hot vector whose l th entry is one (i.e., a standard basis vector).
By the product rule,
[Equation]
Therefore, the gradient of L is given by ∇L ( H ) =
[Equation]
(cid:33) .
Next, we compute how each covariance matrix updates along the flow.
Let Σ B ( a, b ) =
e ⊤ a Σ B e b denote the a, b -th entry of Σ B .
We further denote C :=
( ˜ Σ T + λ W K I ) − 1 , C B := Σ B ( ˜ Σ
T + λ W K I ) − 1 , ˜ C B :=
˜ Σ B ( ˜ Σ T + λ W K I ) − 1 C W := Σ W ( ˜ Σ T + λ W K I ) − 1 and write ∂ kjl L ( H ) =
⟨ L kj , e l ⟩ , where
[Equation]
Using the chain rule, we have that
[Equation]
Similar computation yields
[Equation]
Let T B : t (cid:55)→ e 2 λ H t
Tr ( Σ B ) and T W : t (cid:55)→ e 2 λ H t
Tr ( Σ W ) .
The above lemma suggests that T B strictly increases along the flow, while T W decreases.
Indeed,
[Equation]
The last inequality holds because the trace of the product of two positive semidefinite matrices is always non-negative (e.g. by Von-Neumann’s trace inequality).
Similarly dT B
[Equation]
where the strict inequality again comes from Von-Neumann trace inequality, which ensures that the trace of product of a positive definite matrix and a non-zero positive semidefinite matrix is positive.
Since (cid:103) NC 1 = T W /T B , the above computation also shows that (cid:103) NC 1 has to strictly decrease along the flow.
B P ROOF OF C OROLLARY 3.
Recall that the minimizer H 1 /β satisfies the first order equation
[Equation]
We first show that H 1 /β
→ H 0 as β → ∞ .
The following lemma would be helpful.
Lemma B.1.
There exists a constant M > 0 independent of H , such that
[Equation]
for any H ∈ R d × Kn .
Proof.
We bound each term in the expression of ∇L equation Eq.
7 individually.
For the first term we have
[Equation]
where ∥ · ∥ op denotes the operator norm and the second inequality is due to the fact that each eigenvalue of ( ˜ Σ T + λ W K I ) − 1 is no bigger than Kλ W .
Similarly,
[Equation]
op ∥ H ∥
[Equation]
, where in the last inequality we used ∥ ( ˜ Σ T + λ W K I ) − 1 / 2 ∥ op ≤ (cid:112) K/λ W since every eigenvalue of ( ˜ Σ T + λ W K I ) − 1 / 2 is bounded by (cid:112) K/λ W .
Denote A = (cid:0) Σ W + λ W K
I (cid:1) , B = (cid:16) ˜ Σ
T + λ W K
I (cid:17) and use A + ˜ Σ B = B , we have
[Equation]
Combining the above bounds together, we have obtained for any H ∈ R d × Kn ,
[Equation]
Next, we combine the lemma and the stationary equation Eq.
8 to get
[Equation]
Rearranging, we have the bound
[Equation]
This implies that H 1 /β
→ H 0 as β → ∞ .
Combined with the continuity of ∇L ( · ) and the first order equation Eq. 8, this further implies
[Equation]
Now, by chain rule,
[Equation]
In the last line, H t denotes the gradient flow iterate defined in Eq. 4.
By (the proof of) Theorem 3.1, when H 0 is non-collapsed,
[Equation]
must hold.
This further implies that there exists some constant C = C ( H 0 ) > 0 such that for β > C we have that
[Equation]
C P ROOF OF T HEOREM 4.
Our proof is essentially a perturbation analysis approach that exploits the fact that each of the minimizers is a stationary point of its associated objective function.
Namely, the minimizer of the perturbed problem f
( W , H ; ˜ H 0 ) ,
i
[Equation]
e., ( ˜ W ∗ , ˜ H ∗ ) , obeys that ∇ f ( ˜ W ∗ , ˜ H ∗ ; ˜ H
[Equation]
=
[Equation]
= 0 , and the minimizer of the unperturbed problem,
i
[Equation]
e., ( W ∗ , H ∗ ) where for brevity we omit the ’ ˆ ’ symbol, obeys that
[Equation]
We use these properties in the following first order Taylor approximation of ∇ f ( ˜ W ∗ , ˜ H ∗ ; ˜ H 0 ) around ( W ∗ , H ∗ ; H 0 ) (with accuracy of O ( ∥ δ H ∥ 2 , ∥ δ W ∥ 2 , ∥ δ H
∥ 2 ) ) that is given by
[Equation]
δ H
[Equation]
Recall that δ H :=
˜ H ∗ − H ∗ , δ W :=
˜ W ∗ − W ∗ , and δ H
= ˜
H 0 − H 0 .
Since the two terms in the first line of Eq.
9 vanish, we get that
[Equation]
where all the derivatives are evaluated at ( W ∗ , H ∗ ; H 0 ) , which is omitted in order to simplify the presentation.
As shown below, in our setting the matrix that is inverted is indeed nonsingular.
We turn now to compute the derivatives.
Let us denote h :
= vec( H ) , w :=
vec( W ) , and y :
= vec( Y ) .
Observe that from well known identities on the Kronecker product and the vectorization operation we have
[Equation]
Therefore, the first order derivatives are given by
[Equation]
Hence,
[Equation]
Plugging these expressions in Eq.
10 and using blockwise matrix inversion gives
[Equation]
which are stated in the theorem
[Equation]
where all the derivatives are evaluated at the point ( W ∗ , H ∗ ; H 0 )
[Equation]
Let us state the second order derivatives that appear above.
First, one can observe that
[Equation]
As for the mixed partial derivative, applying ∇ ⊤ W on Eq.
11, we get
[Equation]
where r := vec( WH − Y )
but treated as independent of w due to the product rule, and E ( W , H ) :
= ∂∂ w (cid:0) ( I kn ⊗ W ⊤ ) r (cid:1) .
Denoting w k,i :=
W [ k, i ] , we have that
[Equation]
where e d,i is the standard vector in R d with 1 in its i th entry (similar definition stands for e K,k ).
Therefore,
[Equation]
where E ∗ =
E ( W ∗ , H ∗ ) and E (
W , H ) ∈
R dnK × Kd is given by
E ( W , H
[Equation]
We focus now on the effect the deviation δ H
= ˜
H 0 − H 0 on the feature learning δ H =
˜
H ∗ − H ∗ .
This requires inverting the dnK × dnK matrix that links δ H and δ H 0 , which is quite challenging.
Yet, from the derivatives that are stated above we observe the following
[Equation]
where
[Equation]
Therefore, under the assumption of β ≫ max { 1 , λ H } , which is associated with a restrictive link between H 0 and H
[Equation]
we can use the first-order truncated Neumann series to approximate the matrix inversion (with accuracy of O ( β − 2 ) ) that is stated in Eq.
5 and repeated here for the convenience of the reader:
[Equation]
D P ROOF OF T HEOREM 4.
In this section we compute the entire spectrum (singular values) for the diagonal blocks (“intra-class blocks”) and the off-diagonal blocks (“inter-class blocks”) of the block matrix in Eq. 6.
To keep the main body of the paper concise, we present in the statement of Theorem 4.2 only the results for σ max ( F k,k ) and σ min ( F k,k ) of the full rank matrix F k,k , as well as σ max ( F k, ˜ k ) of the rankmatrix F k, ˜ k
( ˜ k ̸ = k ).
Recall that we consider the (non-degenerate) setting c := √
λ H λ W < 1 .
Therefore, when H
= H ∗ is a minimizer of Eq.
1 (associated with W ∗ ), from Corollary 2.2 we have that ( W ∗ , H ∗ ) the minimizer of f ( W , H ; H 0 ) is also orthogonally collapsed and characterized by Theorem 2.1 with λ W and λ H (independent of K, n, d ).
That is, H ∗ =
H ⊗ 1 ⊤ n and W ∗ H ∝ H
⊤ H ∝ W ∗ W ∗⊤ ∝
I K .
We also have the following results for the spectral norm of H and W ∗ , that we denote by σ H and σ W respectively:
[Equation]
Observe that these expressions do not depend on the number of samples K, n, d .
Note also that
[Equation]
We remind the reader that vec( δ H )
≈ F vec( δ H 0 ) , for
[Equation]
where
[Equation]
( E ∗⊤ + H ∗ ⊗ W ∗ ) ⊤ (
HH ∗⊤ ⊗ I K
[Equation]
nλ W I dK ) − 1 ( E ∗⊤ + H ∗ ⊗ W ∗ ) , and E ∗ =
E ( W ∗ , H ∗ ) and E (
W , H ) ∈
R dnK ×
Kd is defined as
E ( W , H ) :=
[Equation]
where e d,i is the standard vector in R d with 1 in its i th entry (similar definition stands for e K,k ).
For the collapsed minimizer ( W ∗ , H ∗ ) , we know that H ∗ =
σ H R ⊗ 1 ⊤ n and W ∗ =
σ W R ⊤ for some (partial) orthonormal matrix R ∈ R d × K (i.e., R ⊤ R
= I K ).
Therefore, we have that W ∗ H ∗ − Y = − c
I K ⊗ 1 ⊤ n ⊗ I d , and that H ∗ ⊗ W ∗ =
(1 − c ) R ⊗ 1 ⊤ n ⊗ R ⊤ .
Observe that the alignment of the former expression with the latter (where the locations of the dimensions d and K are swapped) is done using the matrices { e d,i e ⊤ K,k } .
Indeed, we can write
E ∗⊤ = K d,K ( − c
I K ⊗ 1 ⊤ n ⊗ I d ) , where K d,K ∈ R
Kd ×
dK is the permutation matrix that satisfies
[Equation]
d,K
[Equation] [Equation]
for any X 1 ∈ R d × d and X 2 ∈ R K × K .
Such a matrix K d,k is also known as commutation matrix in the matrix theory literature.
Another useful property of the commutation matrix that we will frequently use is that
[Equation]
for any x ∈ R K × 1 and Y ∈ R d × m .
Let us extract the k, ˜
k -th block
Z ∗ k, ˜
k ∈ R dn × dn of Z ∗ .
First, observe that
[Equation]
where
[Equation]
Denote by { e k } the standard basis vectors in R K .
To extract the k, ˜ k -th block of Z ∗ , we compute
[Equation]
with
[Equation]
where in the last line
[Equation]
we have used property Eq.
12 to swap the Kronecker product.
Then,
[Equation]
Let us write R =
[ r 1 r 2 ... r K ] ∈ R d × K and let r K +1 , ..., r d be the orthonormal vectors such that { r i } di =1 forms an orthonormal basis.
We know that
[Equation]
Therefore,
[Equation]
We can thus conclude that
[Equation]
When k ̸ = ˜ k
[Equation]
the off-diagonal block of Z ∗ is given by
[Equation]
which is a rank-1 matrix.
Since other matrices in F do not contribute to the inter-class block
[Equation]
we know that F k, ˜ k
= 1 β Z ∗ k, ˜ k .
It is well-known that the eigenvalues of Kronecker product of two matrices are given by the products of their eigenvalues.
We know that 1 n ( 1 n 1 ⊤ n ) has exactly one non-zero eigenvalue, which equals to 1 .
This implies that
[Equation]
Next, let us compute the intra-class block.
Setting k = ˜ k in equation Eq.
13, we get
[Equation]
where
[Equation]
The intra-class block is therefore given by
[Equation]
where
[Equation]
Let s 1 = 1 √ n 1 n and { s i } ni =1 be a set of orthonormal basis of R n .
Then
[Equation]
we can further write
[Equation]
One can easily verify that { s j ⊗ r i } 1 ≤ j ≤ n, 1 ≤ i ≤ d is an orthonormal basis of R nd .
So, Eq. 16 gives us the eigendecomposition of F k,k .
The spectral norm of F k,k is therefore given by
[Equation]
As we consider the large β regime, the expressions in both Eq.
14 and Eq.
15 are positive.
Observe that for K < i ≤ d (associated with the over-parameterization of the model) we have that the eigenvalue associated with the eigenvector ( s 1 ⊗ r i ) is given by
[Equation]
Note, though, that due to the Kronecker product with s 1 = 1 √ n 1 n , perturbation in the direction of this eigenvector does not affect the variability in the k th class at all.
Furthermore, generic/practical perturbations are likely to correlate with, or have their power spectrum spread over, many components of the dn dimensional eigenbasis of F k,k and not concentrate in an extremely low dimensional d − K subspace (composed only of s 1 ⊗ r i with K < i < d ).
Thus, we expect these eigenvectors to have small correlation with generic perturbations.
Showing that σ max ( F k,k ) = 1 reduces now to eliminating the option of eigenvalues larger thanfor 1 ≤ i ≤ K .
This is equivalent to having that
[Equation]
and both are ensured under our assumption c :=
√ λ H λ W < 1 (the non-degenerate case of the model).
Finally, observing that Eq.
14 is smaller than Eq. 15, and that the second term in Eq.
16 does not include eigenvectors ( s j ⊗ r i ) for j > 1 , we conclude that
[Equation]
D. A DDITIONAL D ISCUSSION ON THE R ESULTS OF THE T HEOREM
Theorem 4.2 has no restricting assumptions on the number of classes K .
The only assumption, which is common in theoretical NC papers and is also what is done in practice is that d > K , i.e., that the dimension of the features is larger than the number of classes.
This means that, regardless of the number of classes, the inter-class (off-diagonal) blocks have rank 1, while the intra-class (diagonal) blocks have full rank (recall that each block is of size dn × dn ).
Considering the conclusions from Theorem 4.2, which are stated in Section 4, if we sum up the maximal contribution of each of the K − 1 inter-class blocks of a certain class, i.e., ( K − 1) σ max ( F k, ˜ k ) , then for guaranteeing that this sum is smaller than the minimal contribution of the intra-class block, i.e., σ min ( F k,k ) , we may need to assume that β ≫ K .
Note that this is a reasonable assumption under our large β setting.
Yet, we believe that the rank difference between the two types of blocks is a more important indicator for the dominance of the intra-class blocks, and this property is independent of the number of classes K .
Specifically, since dn > K (all the more so, in practice we even have n ≫ K ), then for generic perturbations (that uniformly span the entire dnK dimensional space) the rank-1 inter-class blocks nullify much of the perturbation contrary to the intra-class block (which has full rank).
This strengthen our conclusion that the deviation from collapse of each class of the minimizer H is dominated by the deviation from collapse of the same class in H 0 rather than by the deviations of other classes.
One thing that should be reminded here is that we analyse the “near-NC” regime, so we assume that the system is already not far from exact NC.
Reaching this point in general might become harder when the number of classes grows.
Another point that can be raised regarding the results of Theorem 4.2, is that we do not analyze the full matrix F but rather its blocks.
In fact, we believe that our analysis, which includes complete spectral analysis for each block separately, is more informative, as it clearly distinguishes between properties of intra- and inter-class blocks and provides insights on the roles of the regularization hyperparameters that are aligned with practical DNN training.
In contrast, in the large β regime we have that F is full rank, which masks the rank-1 property of the inter-class (off-diagonal) blocks.
Nevertheless, analyzing the relationship of the full F and its blocks is an interesting a direction for future research.
E A DDITIONAL E XPERIMENTS AND E XPERIMENTAL D ETAILS E. E XPERIMENTAL D ETAILS FOR T HE L AYER -W ISE E XPERIMENT
In this section, we provide the experimental details for the layer-wise training experiment that is presented in Figure 2 in the main body of the paper.
We train an MLP with 10 hidden layers on CIFAR-10 dataset, where each sample is flattened to a 3072x1 vector.
Each hidden layer includes 3072 fully connected neurons with default PyTorch initialization of the weights, batchnorm, and ReLU nonlinearity.
We start with one hidden layer and train the MLP with 3 epochs of Adam with mini-batch size of 256, learning rate of 1e-4, and CE loss.
Then, we compute NC1 metrics for the deepest features.
At this point, the first “outer iteration” of the procedure is finished.
We fix the parameters in the existing hidden layers, insert a new hidden layer before the final classification layer, and repeat the procedure.
Namely, at each outer iteration of the procedure we optimize only the deepest hidden layer, which has just been inserted with default
PyTorch initialization of the weights, and the final classification layer, which is “initialized” with its weights from the previous outer iteration.
Let us provide more details that has led to the implementation decisions that are stated above.
We have found that layer-wise training of DNNs (on a practical dataset, e.g., CIFAR-10 that we use here) is significantly harder than end-to-end training in terms of reaching a small training loss value.
(Presumably, this is the reason that DNNs are typically trained in an end-to-end fashion).
Careful configuration of the training procedure was required for reaching considerable low loss (though, still not zero training error) and low NC1 metrics as presented in Figure 2.
From our efforts in layer-wise training the 10-layer MLP we observed the following: Adam optimizer worked better than SGD (which is harder to tune); Layer-wise minimization with CE loss (rather than MSE loss) has led to lower NC1 metrics; Using no more than 3 epochs per “outer iteration” allowed reaching lower values for the loss and the NC1 metrics at the deeper layers.
Regarding the latter (i.e., more epochs per outer iteration lead to worse optimization results), when there are only one or two hidden layers then the decrease in the loss and the decrease in the NC1 metrics are larger when more epochs are being used. However, when we add in that case more hidden layers, the optimization appears to get stuck at some local minima with higher loss and NC1 metrics compared to what we get with only 3 epochs per outer iteration. As far as we understand, this behavior follows from the (extreme) nonconvexity of the problem. E. M ORE E XPERIMENTS ON THE E FFECT OF THE R EGULARIZATION H YPERPARAMETERS
In this section, we present more experiments that examine how modifying the regularization hyperparameters affects the NC behavior of a practical DNN – ResNet18 (He et al., 2016a) – compared to a baseline setting.
Specifically, as a baseline hyperparameter setting, we consider one that is used in previous works (Papyan et al., 2020; Zhu et al., 2021): default PyTorch initialization of the weights, SGD optimizer with mini-batch size of 256, learning rate of 0.05 that is divided by 10 every 40 epochs, momentum of 0.9, and weight decay ( L 2 regularization) of 5e-4 for all the network’s parameters.
The first set of experiments is similar to the experiments in Section 5.
These experiments support the insight gained in Section 4 that λ H (the regularization of the feature mapping) plays a bigger role than λ W (the regularization of the classification layer) does in approaching NC.
We compare the NC1 and NC2 metrics (defined in Section 5) of the baseline setting and the following modified settings: 1) doubling the weight decay only for the last (FC) layer; 2) doubling the weight decay only for feature mapping (conv) layers; 3) zeroing the weight decay for the last layer; and 4) zeroing the weight decay for feature mapping layers.
In Figure 4 we consider the MNIST dataset with 3K training samples per class.
Figure 4a presents the NC1 and NC2 metrics of the deepest features for MSE loss and no bias in the FC layer.
Figures 4b and 4c present the NC1 and NC2 metrics of the deepest and intermediate (output of 3 out of the 4 ResBlock) features, respectively, when for CE loss with bias in the FC layer.
In all the settings, we reach zero training error at the 40 epoch approximately.
In Figure 5 we repeat the experiments with 5K training samples per class.
Furthermore, repeating the experiments with 3 different random seeds for initializing the DNN’s parameters yields similar curves that demonstrate the same trends.
In Table 1 we report the mean and the standard deviation (SD) for the NC metrics computed for the [Table] deepest features at the 100 epoch (which is already after the NC metrics reach plateaus) for both the
CIFAR-10 and the MNIST datasets.
Similar to previous works, from comparing Figures 4b and 4c (as well as Figures 5b and 5c) we see that the NC distance metrics are larger in the intermediate features, which correlates with the results for our model in Section 3.
Examining all the settings of Figures 4 and 5, as well as Table 1, the experiments show the important role of the regularization of the feature mapping layers in approaching NC.
Namely, modifying the regularization of the feature mapping layers leads to curves with larger deviations from the baseline compared to modifying the last layer’s regularization.
This is aligned with the theory established in Section 4 that links increasing λ H to reducing the dominant component of the distance from collapse of a class, which is the deviation from collapse of its own features in preceding layers.
The second set of experiments shows the role of λ W in mitigating the interferences between the features of different classes (such interferences can hinder approaching NC).
To visualize such behavior we use a “per-class NC1” metric, defined as
[Equation]
Note that the NC1 metric, which is defined in Section 5, can be written as
[Equation]
We also use the following metric to measure the alignment of the mean features and the last layer’s weights
[Equation]
where the simplex ETF is normalized to unit Frobenius norm.
In Figure 6a we present the NC metrics of the deepest features of the baseline training scheme on the MNIST dataset with 3K samples per class.
The other lines in Figure 6 show the NC metrics for a modified training set, where the samples of classes (digits) 4 and 9 are degraded by a uniform blur (blur kernel of size 9 × 9 ) that hardens the distinction between them.
Each line corresponds to a different value of weight decay for the last layer’s parameters.
Yet, in all of the settings we reached zero training error at the 40 epoch approximately.
The empirical results show that large λ W facilitates reaching reduced NC metrics (closeness to NC structure) by reducing the effect (“interference”) of the features of the degraded samples on the features of the other classes.
This is aligned with the theory that is established for our model in Section 4.
F A DDITIONAL M OTIVATION FOR THE M ODEL IN E Q .
{+In the model that we consider in Eq. 2, we interpret H as the deepest features of a DNN and H 0 as shallower features of the DNN. In particular, in the large β regime that we theoretically analyze in the paper, we interpret H 
 as the penultimate features (one layer before H ). Even though the relation between H and H 0 in our model differs from their explicit relation in many practical DNNs, there exist networks where it is very reasonable to assume that the deepest features and the penultimate features are close to each other.+}
For example, consider the ResNet architecture from (He et al., 2016b), where (under our interpretation of H and H 0 ) the deepest features obey H
{+= H 
 + r ( H 0 ) , where r ( · ) denotes a residual block. The residual term can potentially be very small if H 0 already separates the classes (e.g., it has a “near NC” structure). In fact, in the popular neural ODE framework (Chen et al., 2018), which is understood as the infinite depth limit of these ResNets, we inherently have that H ≈ H 0 .+}
Another example where the concept H ≈ H 0 inherently holds is deep equilibrium models (DEQ) (Bai et al., 2019). These practical DNN frameworks provide the rationality for analyzing our model. Furthermore, our theoretical results, such as depthwise decrease in the within-class variability, are aligned also with the empirical behavior of DNN architectures beyond the aforementioned examples (e.g., plain MLP).
[Figure] [Figure]
[Figure] [Figure] [Figure] [Figure]