Source-linked AI summary

Prevalence of Neural Collapse during the terminal phase of deep learning training

Vardan Papyan, X. Y. Han, David L. Donoho

arXiv:2008.08186v2cs.LGcs.CVstat.ML

TL;DR

Despite overparameterized networks appearing arbitrary and opaque, the paper measures their terminal training phase across architectures and datasets. It finds Neural Collapse: a simple, symmetric geometry that coincides with improved generalization and adversarial robustness.

  • Problem

    The paper addresses whether trained deepnet classifiers and last-layer activations exhibit common structure rather than varying arbitrarily across datasets and architectures.

  • Method

    The authors measure networks during terminal training, when cross-entropy loss continues toward zero after classification error vanishes, across standard deepnets and datasets.

  • Results

    Neural Collapse consistently emerges as a simple, symmetric geometry in which features and classifiers converge toward structured configurations, alongside improving generalization and adversarial robustness.

  • Takeaways & Limitations

    The terminal training phase helps explain deepnet behavior by revealing interpretable feature and classifier geometry with stability and performance benefits.

Abstract

from arXiv · show

Modern practice for training classification deepnets involves a Terminal Phase of Training (TPT), which begins at the epoch where training error first vanishes; During TPT, the training error stays effectively zero while training loss is pushed towards zero. Direct measurements of TPT, for three prototypical deepnet architectures and across seven canonical classification datasets, expose a pervasive inductive bias we call Neural Collapse, involving four deeply interconnected phenomena: (NC1) Cross-example within-class variability of last-layer training activations collapses to zero, as the individual activations themselves collapse to their class-means; (NC2) The class-means collapse to the vertices of a Simplex Equiangular Tight Frame (ETF); (NC3) Up to rescaling, the last-layer classifiers collapse to the class-means, or in other words to the Simplex ETF, i.e. to a self-dual configuration; (NC4) For a given activation, the classifier's decision collapses to simply choosing whichever class has the closest train class-mean, i.e. the Nearest Class Center (NCC) decision rule. The symmetric and very simple geometry induced by the TPT confers important benefits, including better generalization performance, better robustness, and better interpretability.

1. Introduction … C. Network architecture and feature engineering.

The paper shows that extending standard overparameterized deep-network training beyond zero classification error toward zero loss induces Neural Collapse: a simple, symmetric structure in classifiers and last-layer activations. Across canonical datasets and architectures, this structure is associated with improved generalizability, adversarial robustness, and interpretability.

  • 1. Introduction: Across canonical deep-learning settings, Terminal Phase of Training frequently induces mathematical simplicity in classifiers and last-layer activations rather than arbitrary trained configurations.The study spans seven canonical classification datasets and three prototypical, contest-winning architectures.
  • 1. Introduction: Neural Collapse comprises four manifestations: within-class activation variability vanishes, class-means form a Simplex ETF, classifiers become self-dual, and decisions simplify to nearest class-center.NC1 describes collapse to class-means; NC2 describes centered class-means converging to a Simplex ETF; NC3 describes classifier/class-mean alignment up to rescaling; NC4 gives the NCC rule.
  • 2. Setting and methodology: The methodology drives cross-entropy loss toward zero after classification error has already reached zero, using standard deep networks trained beyond interpolation.The paper calls this post-zero-error period the Terminal Phase of Training.
  • Significance Statement: The Simplex ETF places class-means equally spaced around the sphere, while self-duality makes linear classifiers coincide with class-means up to rescaling.These symmetries simplify classifier behavior and support precise predictions under the NCC decision rule.
  • Significance Statement: During TPT, Neural Collapse progresses alongside improvements in generalizability and adversarial robustness.The paper also characterizes the induced structure as highly symmetric, rigid, and interpretable across datasets and architectures.
  • A. Image classification.: In image classification, a deep network maps an input image x ∈ R^d to a p-dimensional last-layer feature h(x), followed by a linear classifier.The classifier uses weights W ∈ R^(C×p) and biases b ∈ R^C to output arg max_c′ ⟨w_c′, h⟩ + b_c′.
  • B. Deep learning for classification.: The network label is determined by the largest component of W h(x) + b, linking the final prediction directly to the learned features and linear classifier.This formulation defines the classifier’s decision as arg max over class scores.
  • C. Network architecture and feature engineering.: Deep architectures use parameters θ to determine data-adaptive nonlinear feature engineering, while (W, b) determines the linear classifier operating on those features.With architecture and problem size fixed, the labeling algorithm depends on the combined parameter vector (θ, W, b).

D. Training. … J. Formalization of Neural Collapse.

The paper trains deep networks with SGD-based cross-entropy minimization across seven datasets and three architecture families, then tracks activation moments to formalize Neural Collapse. The formalization specifies convergence toward Simplex ETF geometry, self-duality, and nearest-class-center decisions during training.

  • D. Training.: Training fits network parameters by minimizing cross-entropy loss, while training error counts incorrect class predictions and can already be zero when loss remains non-zero.This distinction characterizes the Terminal Phase of Training.
  • E. Datasets.: Experiments use seven classification datasets, including MNIST, FashionMNIST, CIFAR10, CIFAR100, SVHN, STL10, and ImageNet.MNIST, SVHN, and ImageNet were subsampled to 5000, 4600, and 600 examples per class, respectively; the remaining datasets were balanced, and no augmentation was used.
  • F. Networks.: The study evaluates VGG, ResNet, and DenseNet architecture families, selecting dataset-adapted network depths through preparatory experiments.Examples include VGG19, ResNet152, and DenseNet201 for ImageNet, and VGG13, ResNet50, and DenseNet250 for STL10 and CIFAR100.
  • H. Large-scale experimentation.: The large-scale experiment includes 450 fully trained models from 6 datasets, 3 networks, and 25 learning rates.The reported tally is 6 datasets × 3 nets × 25 lrs = 450 models.
  • I. Moments of activations.: At snapshotted epochs, the study extracts last-layer training activations and computes their first- and second-moment statistics, including global means, class-means, and total covariance.Class-means are discussed after global centering unless otherwise specified.
  • J. Formalization of Neural Collapse.: Neural Collapse is mathematically described through convergence relations as training progresses, including normalized class-mean geometry.The notation defines renormalized class-means and the class-mean matrix used in the formalization.
  • J. Formalization of Neural Collapse.: The formalization identifies convergence to a Simplex ETF, convergence to self-duality, and simplification to the nearest-class-center rule.The Simplex ETF condition is expressed through pairwise inner products of renormalized class-means.

3. Results · 4. Discussion · 5. Neural Collapse sharpens previous insights

Across seven datasets and three prototypical deep networks, continued training after zero error produces Neural Collapse: class variability vanishes, class-means and classifiers form aligned Simplex ETFs, and classifier decisions approach nearest-class-center classification. These structural changes continue during the terminal phase and coincide with improving test accuracy and adversarial robustness, while sharpening prior constraints on trained classifiers.

  • 4. Discussion: As training progresses, network decisions increasingly agree with the Nearest Class-Center rule based on last-layer test activations and training class-means.The measured quantity is the testing-set proportion where classifier predictions disagree with arg min_c ∥h −µc∥2.
  • 4. Discussion: During TPT, class-means and classifiers converge toward equinormed, maximally equiangular configurations, implying Simplex ETFs.The cosine values converge to −1/(C−1), the maximum separation allowed by the constraints.
  • 4. Discussion: The classifier and centered class-means converge to the same Simplex ETF up to rescaling, establishing self-duality.Their unit-Frobenius-norm distance decreases throughout training.
  • 4. Discussion: Within-class activation variation collapses toward zero, so individual last-layer activations converge to their corresponding class-means.This collapse continues well after TPT begins.
  • 3. Results: Neural Collapse continues after zero training error, producing substantial changes in the trained network’s underlying structure during TPT.TPT is defined using 99.6% training accuracy for ImageNet and 99.9% for the remaining datasets because some datasets contain inconsistencies and mislabels.
  • 4. Discussion: Test accuracy and adversarial robustness continue improving during TPT, with most robustness improvement occurring after zero error.Table 1 tracks test accuracy, while Figure 8 evaluates robustness using DeepFool perturbations on sampled test images.
  • 5. Neural Collapse sharpens previous insights: Compared with prior classifier-structure constraints developed for fixed features, Neural Collapse yields drastically tighter, extremely simple, and symmetric structure for trained deep-learning features.The modern setting includes data-adaptive feature engineering during deep-learning training.

A. Webb and Lowe (1990). · B. Soudry et. al. (2018).

The Webb–Lowe and Soudry et al. results show that, when last-layer activations exhibit NC1–NC2, optimal classifiers additionally become self-dual and behaviorally equivalent to nearest-class-center decisions. The latter extends max-margin results for cross-entropy with fixed features by identifying a much more constraining deepnet inductive bias.

  • A. Webb and Lowe (1990).: Webb and Lowe’s optimal last-layer classifier has a form similar to modified linear discriminant analysis.Their formulation uses ΣT rather than Fisher’s ΣW.
  • A. Webb and Lowe (1990).: Adding NC1–NC2 to the Webb–Lowe setting implies NC3 self-duality and NC4 behavioral agreement with NCC.The added variability-collapse and Simplex ETF assumptions significantly narrow the possible optimal classifiers.
  • A. Webb and Lowe (1990).: Under NC2, the Webb–Lowe classifier is self-dual up to rescaling.The Simplex ETF structure makes the centered class-mean matrix have equal nonzero singular values, yielding the classifier’s proportionality to that matrix.
  • A. Webb and Lowe (1990).: The Webb–Lowe classifier’s linear decision is identical to the nearest-class-center decision rule.The theorem predicts that NC1–NC2 evidence should accompany NC3–NC4, as observed in the reported figures.
  • B. Soudry et. al. (2018).: Soudry et al. proved that, for almost every linearly separable fixed-feature dataset, cross-entropy gradient descent tends to the max-margin classifier.Because the activations are fixed rather than learned, the result gives only indirect information about deepnet feature engineering and decisions.
  • B. Soudry et. al. (2018).: Modern deepnet training selects a very small subset of max-margin classifiers with the additional property of being Simplex ETFs.These classifiers also exhibit striking behavioral simplicity in decision making.
  • B. Soudry et. al. (2018).: With NC1–NC2 imposed in Soudry et al.’s cross-entropy setting, the classifier additionally satisfies NC3 self-duality and NC4 NCC equivalence.The resulting optimum has W = M-dot^T, establishing self-duality; an analogous argument gives behavioral equivalence to NCC.
  • B. Soudry et. al. (2018).: The combined result indicates an inductive bias toward NCC that is more total and limiting than the max-margin bias.Evidence of NC1–NC2 is therefore expected to accompany NC3–NC4 in the cross-entropy setting.

6. Theoretical derivation of Simplex ETF emergence · A. Model assumptions. · B. Information theory perspective.

The paper derives Simplex ETF emergence from information-theoretic and probabilistic principles by framing class means as optimally designed codewords under noisy observations. The model jointly designs constrained class means, a linear classifier, and biases to minimize class-recovery errors, assessed through a large-deviations error exponent.

  • 6. Theoretical derivation of Simplex ETF emergence: Theoretical analysis shows that Simplex ETF geometry and self-duality can emerge as solutions to an information-theoretic optimization problem.The derivation uses standard ideas from information theory and probability theory to explain the observed Neural Collapse end-state.
  • 6. Theoretical derivation of Simplex ETF emergence: The ideal feature designer should choose activations whose class means form a Simplex ETF.
  • 6. Theoretical derivation of Simplex ETF emergence: The model represents each observation as h = µγ + z ∈ R^C, with independent Gaussian noise z and uniformly distributed unknown class index γ.Specifically, z ∼ N(0, σ^2I) and γ ∼ Unif{1, . . . , C}.
  • 6. Theoretical derivation of Simplex ETF emergence: The recovery task uses a linear classifier W h + b with class-specific weights and biases to infer γ while minimizing error.
  • A. Model assumptions.: The design problem jointly chooses the classifier W, bias b, and class-mean matrix M, subject to ∥µc∥2 ≤ 1 for every class.
  • A. Model assumptions.: The formulation is recast as an optimal coding problem in which class means are codewords and M is a codebook containing C codewords.This connects feature design to Shannon-style coding.
  • B. Information theory perspective.: The information-theoretic setting treats transmission as white additive Gaussian noise followed by linear decoding of the noisy signal h = µc + z.The norm constraint models limits on signal strength between transmitter and receiver.
  • B. Information theory perspective.: Success is measured using the large-deviations error exponent for recovering the transmitted class identity from noisy information.

C. Large-deviations perspective. … Supplementary Material

The paper connects Neural Collapse to vanishing-noise large-deviations analysis and shows that the Simplex ETF uniquely optimizes theoretical misclassification exponents. It also relates Neural Collapse to prior work on feature variability, Hessian spectra, stability, robustness, and out-of-sample performance.

  • C. Large-deviations perspective.: As NC1 drives activation noise toward zero, large-deviations tools provide the appropriate framework for analyzing vanishing misclassification probabilities.The analysis reduces the ambient space to R^C before deriving error exponents.
  • D. Theoretical result.: The standard Simplex ETF uniquely solves the abstract feature-design problem of maximizing the optimal error exponent, up to orthogonal rotation.Every optimizer is an isometric pose of the standard Simplex ETF, and the associated optimal decoder is W = M⋆U^T, b = 0.
  • 7. Related works: Neural Collapse reframes earlier observations by showing that trained deepnets naturally suppress within-class activation variability across the original dataset and six additional challenging benchmarks.This parallels earlier analytical efforts to limit variability caused by morphing class-specific templates.
  • A. Theoretical feature engineering.: NC1 provides an empirical form of feature engineering by collapsing within-class variability, demonstrating that controlling activation variability is powerful across diverse datasets.The finding extends the original goal of limiting within-class variability beyond the dataset originally considered in earlier work.
  • B. Observed structure of spectral Hessians: NC1 and NC2 explain why deepnet Hessians develop C outlier eigenvalues: activations approach a rank-(C−1) class-mean matrix while within-class deviations shrink.The class means converge toward the Simplex ETF limit, causing the outliers to separate from the bulk.
  • C. Stability against random and adversarial noise.: Standard training implicitly induces last-layer stability through Simplex ETF structure, rather than requiring explicit orthogonality or tight-frame constraints.Equal nonzero singular values resist noise amplification, motivating the expected robustness to adversarial perturbations.
  • 8. Conclusion: During TPT, Neural Collapse comprises four interconnected phenomena, and convergence to this simple structure improves out-of-sample performance and robustness to adversarial examples.The paper identifies NC1–NC4 as the fundamental process occurring during terminal-phase training.
  • Supplementary Material: The paper identifies training beyond zero error toward zero loss as a standard workflow practice whose effects and benefits require fuller analysis.This practice is the terminal phase of training examined throughout the paper.

A. Setup … B. Fundamental events causing misclassification.

The paper formulates noisy class recovery as codebook and linear-decoder design, then shows that Simplex ETF feature means achieve the optimal large-deviations error exponent. Misclassification is analyzed through pairwise score-comparison events, with error minimization equivalent to maximizing the resulting exponent.

  • A. Setup: The setup models an observation as h = µ_γ + z, with uniformly sampled class γ and Gaussian noise z, and seeks to recover γ.The feature means form the columns of M, while γ is unknown and z ∼ N(0, σ^2I).
  • A. Setup: In information-theoretic terms, the feature means are codewords, M is their codebook, and decoding recovers the transmitted class identity from noisy h.The design problem is to choose a codebook and decoder enabling optimal retrieval under white additive Gaussian noise.
  • B. Theorem 5 from main manuscript: The optimization asks which codebook M and linear decoder W, b achieve the optimal error rate, with columns of M constrained to have at most unit norm.The theorem maximizes over C × C matrices M and W and C × 1 vectors b.
  • B. Theorem 5 from main manuscript: The optimal error exponent is achieved precisely by a Simplex ETF M⋆, and every optimal M is an orthogonal transform of that configuration.The optimal feature-mean geometry is therefore unique up to orthogonal pose.
  • B. Theorem 5 from main manuscript: For an optimal M = UM⋆, the decoder W = M⋆U^⊤ with b = 0 attains β⋆, preserving the same performance under orthogonal transformations.The performance identity is β(M, W, b) = β(UM⋆, M⋆U^⊤, 0) = β⋆.
  • A. Basic large deviations, Gaussian White Noise.: Large-deviations analysis identifies the closest point in a rare-event set as the most likely noise realization causing that event.For Gaussian noise, the rare-event exponent is determined by the squared distance of the closest feasible perturbation to zero.
  • B. Fundamental events causing misclassification.: Pairwise pre-misclassification events Fc,c′ occur when the linear classifier score for c′ is at least as large as the score for the true class c.These events are fundamental because they characterize the score comparisons underlying misclassification.
  • B. Fundamental events causing misclassification.: For classwise and overall misclassification events, the probabilities obey large-deviations exponents βc and β, so minimizing misclassification probability amounts to maximizing β.The overall event is E = ∪cEc, with −log Pσ{Ec} ∼ σ^-2βc as σ → 0.

D. Optimization Interpretation · E. A Lower Bound

The optimization formulation identifies the codebook and linear decoder whose tuple achieves the optimal error rate, with the LD exponent determined by the optimization value. A Gaussian two-class lower-bound analysis reduces performance to codeword separation and motivates maximizing the minimum codeword distance.

  • D. Optimization Interpretation: Although expressed over multiple components, the optimization is separable, with β_c,c′ = 1/2 in the cases considered.
  • D. Optimization Interpretation: The optimization value β = β(M, W, b) is the minimum pairwise component value and determines the LD exponent of misclassification error.The exponent therefore depends on the codebook M and linear classifier (W, b).
  • D. Optimization Interpretation: The central optimization problem seeks tuples (M, W, b) that achieve the optimal error rate.It asks which codebook M and linear decoder W, b provide the optimum.
  • E. A Lower Bound: For two Gaussian class-conditional distributions, the minimax test compares the projection onto the normalized mean-difference direction against the midpoint threshold.The decision accepts H0 when ⟨h − ν_1/2, u⟩ > 0 and rejects it otherwise.
  • E. A Lower Bound: The two conditional error probabilities are Gaussian tail probabilities evaluated at the negative and positive mean separation δ.Under H1, the acceptance error is P{N(0, σ²) > δ}; under H0, the rejection error is P{N(0, σ²) < −δ}.
  • E. A Lower Bound: No decision procedure can have worst-case error better than the minimax test, yielding an asymptotic lower bound as σ → 0.The lower-bound argument assumes h = μ_γ + z with z ∼ N(0, σ²I).
  • E. A Lower Bound: For a fixed codebook, the resulting distance controls the optimal β and motivates maximizing the minimum codeword distance.This leads to the question of which codebook matrices achieve the maximin distance.

F. ∆-Optimality of the Simplex Tight Frame

The Simplex ETF globally maximizes the minimum pairwise Euclidean distance among constrained class-mean configurations. Equality is achieved only by orthogonal transformations of the standard Simplex ETF.

  • Equality characterization: Every equality-achieving matrix is left-equivalent to the standard Simplex ETF through an orthogonal transformation, and therefore is itself a Simplex ETF.The section identifies the complete equality class as M = UM⋆ with U^⊤U = I.
  • Global maximization: Unit-normalizing any subunit column configuration strictly increases every corresponding intercolumn distance, so global maximizers can be assumed to have unit-length columns.This follows by replacing columns with an exactly normalized matrix whose pairwise distances are strictly larger.
  • Distance bound: For C unit vectors, positive semidefiniteness forces some pairwise inner product to be at least −1/(C−1), limiting squared distances to 2C/(C−1).The Gram matrix has diagonal entries 1 and nonnegative-semidefinite structure, yielding the lower bound on the largest off-diagonal inner product.
  • Equality conditions: The bound is attained only when every distinct pair satisfies ⟨µ_c, µ_c′⟩ = −1/(C−1), which is precisely the equiangular configuration.If any pair were more negatively correlated, positive semidefiniteness would be violated under the assumed upper bound.

G. β-Optimality of the Simplex Tight Frame · A. LD exponent for the Simplex Tight Frame.

The simplex tight frame’s β-optimality is established by analyzing its classifier decision regions, which remain unchanged under positive simultaneous rescaling. The proof reduces the key geometric claim to showing that the relevant candidate lies on the decision boundary and that this boundary is orthogonal to the class-mean segment.

  • G. β-Optimality of the Simplex Tight Frame: The section solves the optimization instance β(M⋆, M⋆, 0) associated with the simplex tight frame.
  • A. LD exponent for the Simplex Tight Frame.: For a linear classifier, each decision region Γc(W, b) is invariant under simultaneous positive rescaling (W, b) → (aW, ab).
  • A. LD exponent for the Simplex Tight Frame.: The proof therefore replaces W = M⋆ with a rescaled W⋆ having singular values 1 or 0, making it a partial isometry.
  • A. LD exponent for the Simplex Tight Frame.: The optimization can be interpreted as finding the least Euclidean-norm displacement translating a class mean into another classifier decision region.
  • A. LD exponent for the Simplex Tight Frame.: The candidate point is the midpoint of the segment joining two class means and lies on the corresponding decision boundary.
  • A. LD exponent for the Simplex Tight Frame.: The decision boundary between classes c and c′ is defined by equal classifier scores, (W⋆h)(c) = (W⋆h)(c′).
  • A. LD exponent for the Simplex Tight Frame.: Orthogonality is proved by decomposing h into kernel and range components of W⋆ and showing the resulting boundary condition implies equality of the corresponding coordinates.
  • A. LD exponent for the Simplex Tight Frame.: Combining the established identities completes the orthogonality argument and the demonstration of the main claim.

B. Proof of Theorem 5.

The proof establishes that the standard Simplex ETF is β-optimal and, by orthogonal invariance, every isometric pose is optimal. It then shows that all other admissible candidates are suboptimal, characterizing the complete set of optimizers.

  • Proof of Theorem 5.: The standard Simplex ETF achieves equality and is β-optimal.This follows from Corollary 13 and Theorem 6.
  • Proof of Theorem 5.: Orthogonal invariance extends optimality to every Simplex ETF in any isometric pose.The proof states equality holds for all U satisfying U^⊤U = I.
  • Proof of Theorem 5.: Simplex ETFs are the only solutions to the relevant optimality condition under the constraint ∥M∥2,∞≤1.The proof identifies such M as the only solutions to Δ⋆(M) = Δ⋆C.
  • Proof of Theorem 5.: Any admissible candidate not equal to UM⋆ for an orthogonal U is suboptimal.For such a candidate, Theorem 6 gives Δ(Ṁ) < Δ⋆C, and inequality bounds its maximal β by 1.
Loading 2008.08186v2…