Neural Collapse by Design: Learning Class Prototypes on the Hypersphere

Panagiotis Koromilas, Theodoros Giannakopoulos, Mihalis Nicolaou, Yannis Panagakis

Abstract

Supervised classification possesses a theoretical geometric optimum known as Neural Collapse (NC). However, the two dominant paradigms in deep learning—Cross-Entropy (CE) classification and Supervised Contrastive Learning (SCL)—fail to fully realize this state in practice. This paper unifies both paradigms under a single geometric framework: prototype contrast on the unit hypersphere. By eliminating unconstrained vector magnitudes, the authors introduce novel normalized loss functions (NTCE and NONL) and a training-free classifier for SCL. These innovations achieve Neural Collapse by design, yielding superior generalization, robustness, and training efficiency across major benchmarks.

Introduction: The Promise and Failure of Neural Collapse

In deep learning, Neural Collapse (NC) describes a "perfect" geometric state that models theoretically approach at the end of training. In this state:

  1. Feature Collapse: All features of the same class collapse to a single point (their class mean).
  2. Optimal Separation: These class means spread out as far as possible from one another, forming an Equiangular Tight Frame (ETF).
  3. Classifier Alignment: The classifier's weights align perfectly with these class means.

While NC represents the global optimum for most common loss functions, standard training pipelines rarely achieve it. Cross-Entropy (CE) fails because it retains "radial degrees of freedom." It allows the network to artificially reduce loss by simply increasing the length (magnitude) of feature vectors, rather than improving the underlying geometric separation of the classes. Conversely, Supervised Contrastive Learning (SCL) successfully builds this optimal geometry during pretraining but discards it during the final "linear probing" phase. Training a standard linear classifier on top of SCL features reintroduces the very radial freedoms the pretraining avoided.

A Unified Geometric Framework

The core insight of this research is that Classification and SCL are fundamentally the same process: prototype contrast. The primary difference is whether the prototype is "explicit" (learned weights in a classifier) or "implicit" (the mean of the features).

To bridge the gap between these paradigms, the authors propose constraining all features and weights to the unit hypersphere (normalizing them to a length of 1). By removing the "easy way out" of inflating vector lengths, the model is forced to focus entirely on angular similarity, which contains the true discriminative power necessary for Neural Collapse.

Methodology: Fixing CE and SCL

By viewing both paradigms through the lens of hyperspherical geometry, the authors identify and fix the specific points of failure in each.

1. Upgrading Classifier Learning (The CE Side)

To import the power of contrastive optimization into standard classification, the authors introduce two new normalized losses:

  • NTCE (Normalized Temperature-scaled Cross Entropy): Instead of a single instance comparing itself to $K$ class prototypes, NTCE flips the dynamic. The class prototype acts as an "anchor" that looks at $M$ batch instances. This dramatically increases the effective number of "negatives" the model learns from, a crucial ingredient in contrastive learning.
  • NONL (Negatives Only Normalization Loss): This loss decouples the "alignment" term (pulling similar items together) from the "uniformity" term (pushing all items apart). By removing same-class instances from the denominator of the loss function, NONL prevents the model from inadvertently pushing away members of the same class.

2. Streamlining Supervised Contrastive Learning (The SCL Side)

For SCL, the authors mathematically prove that the class means are already the optimal classifier weights. They introduce Fixed Prototypes (FP), demonstrating that the standard practice of "linear probing"—which often requires hours of additional training—is both redundant and geometrically harmful. Instead, practitioners can simply use the class means as the classifier weights immediately after pretraining.

Empirical Validation and Key Results

The proposed methods were rigorously evaluated across four major image classification benchmarks: CIFAR-10/100, ImageNet-100/1K, ImageNet-C (for robustness against corruptions), and a Transfer Learning Suite comprising 8 diverse datasets (including Food, Cars, Pets, and Flowers).

  • Unprecedented Training Efficiency: The proposed normalized losses (NTCE and NONL) reach the same level of Neural Collapse as standard CE in under 7.5% of the iterations.
  • Superior Accuracy: NTCE and NONL consistently surpass standard Cross-Entropy accuracy across all tested ImageNet and CIFAR benchmarks.
  • Enhanced Transferability: Features learned via NONL demonstrated a +5.5% mean relative improvement in transfer learning accuracy across the 8 downstream tasks.
  • Robustness to Imbalance and Corruption: Under severe class imbalance (long-tailed data distributions), the NC-inducing objectives improved performance by up to +8.7%. They also achieved a lower Mean Corruption Error (mCE) on ImageNet-C.
  • Training-Free SCL: Utilizing "Fixed Prototypes" matched the accuracy of traditional linear probing while entirely eliminating the hours-long classifier training phase.

Limitations and Future Directions

While "Neural Collapse by Design" offers a robust unification of classification and contrastive learning, the authors note a few limitations:

  • Batch Size Dependency: Like most contrastive methods, NTCE and NONL rely on larger batch sizes to provide a sufficient number of negative samples. Future work may incorporate memory banks or momentum encoders to alleviate this requirement.
  • Architectural Assumptions: The theoretical proofs rely on the Unconstrained Feature Model (UFM), a standard proxy in NC research. However, specific architectural choices, such as ReLU activations, can slightly alter the optimal geometry (e.g., biasing toward an orthogonal frame rather than a simplex ETF).
  • Coarse-to-Fine Transfer Trade-offs: Recent literature suggests that extreme feature collapse might hinder a model's ability to distinguish very fine-grained sub-classes within a broader category. Exploring the balance between perfect collapse and fine-grained feature retention remains an open and exciting area for the Neural Collapse community.

Summary updated

BibTeX
@inproceedings{koromilas2026neural,
  author = {Panagiotis Koromilas and Theodoros Giannakopoulos and Mihalis Nicolaou and Yannis Panagakis},
  title = {{Neural Collapse by Design: Learning Class Prototypes on the Hypersphere}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=VN8RbsdxYs},
}
Figure