Towards Understanding Neural Collapse: The Effects of Batch Normalization and Weight Decay

Leyan Pan, Xinyuan CaoSubmission to ICLR 2024 · Rejected

TL;DR

While Neural Collapse ($\mathcal{NC}$) is widely observed in deep classifiers, theoretical explanations often rely on unrealistic assumptions like exact loss minimizers or directly optimizing penultimate features. This paper proves that combining last-layer Batch Normalization (BN) and weight decay with near-optimal cross-entropy loss is sufficient to guarantee proximity to $\mathcal{NC}$ under an intuitive cosine similarity metric. Empirical benchmarks confirm that BN paired with proper weight decay drives features toward the $\mathcal{NC}$ geometry smoothly and stably.

What Problem Does This Paper Address?

During the "terminal phase of training" (after reaching near-zero training error), deep classifiers undergo Neural Collapse ($\mathcal{NC}$):

  • NC1 (Variability Collapse): Within-class feature vectors collapse to their class mean.
  • NC2 (Simplex ETF): Class means form a symmetric, maximally separated simplex Equiangular Tight Frame (ETF), where angles between distinct class pairs equal $-\frac{1}{C-1}$.
  • NC3 (Self-Duality): Last-layer classifier weights align directly with class means.
  • NC4 (NCC Equivalence): The classifier behaves like a simple nearest-class-center rule.

Existing theoretical proofs mostly rely on the "unconstrained feature" (layer-peeled) model and assume models reach exact global loss minima or follow continuous gradient flow. In practice, networks optimize deep weights (not raw features), exact zero loss is unattainable, and optimization paths are messy. This paper asks: What is a realistic, minimal set of conditions that guarantees proximity to $\mathcal{NC}$?

Methods

The authors tackle this with both a new analytical framing and quantitative metrics:

  • Cosine Similarity Metric: Instead of relying on within-class covariance matrices, they track average pairwise cosine similarities: $\text{intra}_c$ (which reaches $1$ under collapse) and $\text{inter}_{c, c'}$ (which reaches $-\frac{1}{C-1}$).
  • The Jensen Gap on Strongly Convex Functions: The authors derive a general stability lemma: when an empirical average nearly achieves equality in Jensen's inequality for a strongly convex function (such as $\exp(x)$ or the cross-entropy log-sum-exp), no substantial subset of samples can stray far from the global mean.
  • BN Equivalence to Feature Norm Regularization: The authors prove that for zero-bias Batch Normalization, the quadratic average of feature norms is directly tied to the BN scale parameter: $\sqrt{\frac{1}{N}\sum_{i=1}^N \|h_i\|_2^2} = \|\gamma\|_2$.
  • Optimization-Agnostic Proximity Bounds: By penalizing $\|\gamma\|_2^2$ and $\|W\|_F^2$ via weight decay $\lambda$ under near-optimal regularized loss ($L_{\text{reg}} \le m_{\text{reg}} + \epsilon$), they show that the feature and classifier norms remain tightly bounded, establishing non-asymptotic bounds for intra-class collapse ($\ge 1 - \mathcal{O}((C/\lambda)^{\mathcal{O}(C)} \sqrt{\epsilon/\delta})$) and inter-class simplex structure without making assumptions about early layer optimization.

Datasets

The authors test their theory on both controlled synthetic data and standard computer vision benchmarks:

  • 4-Class Conic Hull Dataset: Synthetic inputs partitioned into four distinct quadrants by two intersecting hyperplanes.
  • MLP$k$ Datasets ($k \in \{3, 6, 9\}$): Synthetic datasets where labels are generated by passing standard Gaussian vectors through randomly initialized $k$-layer MLPs with fixed weights.
  • Computer Vision Benchmarks: Standard classification benchmarks including MNIST, CIFAR-10, and CIFAR-100.

Key Insights and Ideas

  • Batch Normalization controls the geometry scale: Weight decay on linear weights is standard, but applying weight decay to the scale vector $\gamma$ of a penultimate BN layer explicitly caps the quadratic mean of feature norms.
  • Near-optimality replaces exact optimality: Proving bounds under $L \le m + \epsilon$ makes the theory applicable to realistic deep learning scenarios where optimization terminates before finding an exact mathematical minimum.
  • Weight decay sharpens collapse: Because the proximity bounds scale inversely with weight decay ($\lambda$), higher weight decay pulls features closer to the ETF configuration—provided the model still has enough capacity to achieve near-optimal training loss.
  • BN prevents optimization failure: In deeper architectures without BN (like 6- and 9-layer MLPs), increasing weight decay often causes optimization instability or catastrophic drops in $\mathcal{NC}$. BN enables smooth convergence to $\mathcal{NC}$ as weight decay increases.

Key Results

  • Theoretical Guarantees (Theorems 2.1 & 2.2): For any network without bias terms reaching $\epsilon$-near-optimal loss with last-layer BN and weight decay $\lambda$, at least $1 - \delta$ fraction of classes satisfy: $$\text{intra}_c \ge 1 - \mathcal{O}\left(\left(\frac{C}{\lambda}\right)^{\mathcal{O}(C)} \sqrt{\frac{\epsilon}{\delta}}\right)$$ and distinct class pairs satisfy: $$\text{inter}_{c, c'} \le -\frac{1}{C-1} + \mathcal{O}\left(\left(\frac{C}{\lambda}\right)^{\mathcal{O}(C)} \left(\frac{\epsilon}{\delta}\right)^{1/6}\right)$$
  • Synthetic MLPs: Across 4-layer and 6-layer MLPs, networks with BN exhibited near-perfect intra-class collapse ($\text{intra} \to 1.0$) and optimal separation ($\text{inter} \to -1/(4-1) \approx -0.33$) as weight decay increased from $10^{-4}$ to $10^{-1}$. Non-BN models plateaued early or degraded.
  • Vision Models (VGG & ResNet): On CIFAR-10, CIFAR-100, and MNIST, VGG-11+BN, VGG-19+BN, and ResNet-18 consistently achieved intra-class cosine similarities near $1.0$. Beyond a critical weight decay threshold, severe regularization led to underfitting, causing $\mathcal{NC}$ metrics to degrade because the near-optimal loss condition was violated.

Limitations and Future Work

  • Penultimate-Layer Focus: The theoretical derivation focuses strictly on the penultimate BN layer and the final classification head (the layer-peeled regime), whereas $\mathcal{NC}$ has been observed propagating backwards into earlier intermediate hidden layers.
  • Zero-Bias Assumption: The analysis assumes zero-bias linear layers and zero-bias BN layers to enforce that the global feature mean is strictly centered at zero. Extending the bounds to architectures with learned biases remains open.
  • Underfitting Threshold: The current bounds predict monotonic tightening with higher $\lambda$, but in practice, excessively large weight decay prevents interpolation ($\epsilon$ grows), breaking the premises of the theorem.

Summary updated

Abstract

Neural Collapse (NC) is a geometric structure recently observed in the final layer of neural network classifiers. In this paper, we investigate the interrelationships between batch normalization (BN), weight decay, and proximity to the NC structure. Our work introduces the geometrically intuitive intra-class and inter-class cosine similarity measure, which encapsulates multiple core aspects of NC. Leveraging this measure, we establish theoretical guarantees for the emergence of NC under the influence of last-layer BN and weight decay, specifically in scenarios where the regularized cross-entropy loss is near-optimal. Experimental evidence substantiates our theoretical findings, revealing a pronounced occurrence of NC in models incorporating BN and appropriate weight-decay values. This combination of theoretical and empirical insights suggests a greatly influential role of BN and weight decay in the emergence of NC.
BibTeX
@misc{pan2023towards,
  author = {Leyan Pan and Xinyuan Cao},
  title = {{Towards Understanding Neural Collapse: The Effects of Batch Normalization and Weight Decay}},
  year = {2023},
  eprint = {2309.04644},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.04644},
}
Figure