Skip to main content
QUICK REVIEW

[Paper Review] Are All Losses Created Equal: A Neural Collapse Perspective

Jin‐Xin Zhou, Chong You|arXiv (Cornell University)|Oct 4, 2022
Machine Learning and Data ClassificationComputer Science8 citations
TL;DR

This paper demonstrates that diverse deep learning loss functions—cross-entropy, label smoothing, focal loss, mean squared error, and supervised contrastive loss—produce nearly identical test performance when trained to global optimality in wide neural networks. Using the Neural Collapse framework, it shows all losses lead to equivalent last-layer features on training data, implying their empirical differences stem from suboptimal training rather than inherent superiority.

ABSTRACT

While cross entropy (CE) is the most commonly used loss to train deep neural networks for classification tasks, many alternative losses have been developed to obtain better empirical performance. Among them, which one is the best to use is still a mystery, because there seem to be multiple factors affecting the answer, such as properties of the dataset, the choice of network architecture, and so on. This paper studies the choice of loss function by examining the last-layer features of deep networks, drawing inspiration from a recent line work showing that the global optimal solution of CE and mean-square-error (MSE) losses exhibits a Neural Collapse phenomenon. That is, for sufficiently large networks trained until convergence, (i) all features of the same class collapse to the corresponding class mean and (ii) the means associated with different classes are in a configuration where their pairwise distances are all equal and maximized. We extend such results and show through global solution and landscape analyses that a broad family of loss functions including commonly used label smoothing (LS) and focal loss (FL) exhibits Neural Collapse. Hence, all relevant losses(i.e., CE, LS, FL, MSE) produce equivalent features on training data. Based on the unconstrained feature model assumption, we provide either the global landscape analysis for LS loss or the local landscape analysis for FL loss and show that the (only!) global minimizers are neural collapse solutions, while all other critical points are strict saddles whose Hessian exhibit negative curvature directions either in the global scope for LS loss or in the local scope for FL loss near the optimal solution. The experiments further show that Neural Collapse features obtained from all relevant losses lead to largely identical performance on test data as well, provided that the network is sufficiently large and trained until convergence.

Motivation & Objective

  • To investigate whether different loss functions lead to fundamentally different generalization performance in deep learning.
  • To examine whether the observed empirical advantages of certain losses (e.g., focal loss, label smoothing) are due to optimization or inherent inductive bias.
  • To extend the Neural Collapse phenomenon—previously known only for cross-entropy and MSE—to a broad class of loss functions including label smoothing, focal loss, and supervised contrastive loss.
  • To establish that equivalent Neural Collapse solutions on training data predict nearly identical test performance across diverse loss functions.
  • To clarify the role of architectural components like projection heads and normalization in the success of contrastive losses like SupCon.

Proposed method

  • Theoretical analysis extends the Neural Collapse phenomenon to a broad family of loss functions, including CE, LS, FL, MSE, and SupCon, by proving they all yield the same global minimizers under sufficient width and optimization.
  • The paper introduces a generalized loss condition (Definition GLoss) that captures the contrastive property shared by these losses, enabling unified analysis of their global optimality.
  • It proves that Simplex ETFs (Equiangular Tight Frames) are the unique global minimizers for all such loss functions, ensuring identical feature geometry on training data.
  • Empirical validation across CIFAR-10, CIFAR-100, and mini-ImageNet datasets confirms that test accuracy is nearly identical across all losses when training reaches convergence.
  • Theoretical analysis of Hessian structure shows that label smoothing and focal loss are globally or locally strict saddle functions with no spurious local minima, supporting convergence to optimal solutions.
  • The study uses feature space rotation invariance to show that equivalent Neural Collapse solutions across losses imply equivalent test performance, despite different loss forms.

Experimental results

Research questions

  • RQ1Do different deep learning loss functions lead to fundamentally different test performance when models are trained to global optimality?
  • RQ2To what extent does the Neural Collapse phenomenon unify the behavior of diverse loss functions in wide neural networks?
  • RQ3Why do some losses (e.g., focal loss, label smoothing) empirically outperform others if they are theoretically equivalent under global optimality?
  • RQ4Can the success of supervised contrastive learning be attributed to the loss function itself, or to architectural components like projection heads and normalization?
  • RQ5Does Neural Collapse on training data reliably predict generalization performance across different loss functions?

Key findings

  • All examined losses—cross-entropy, label smoothing, focal loss, mean squared error, and supervised contrastive loss—produce identical test performance when training reaches global optimality in wide networks.
  • The last-layer features of all losses collapse to the same Simplex ETF configuration on training data, differing only by rotation, due to shared global minimizers under the generalized loss condition.
  • Empirical results show that test accuracy differences between losses vanish when training is sufficiently long and models are wide, supporting the equivalence under Neural Collapse.
  • Theoretical analysis confirms that label smoothing and focal loss are globally or locally strict saddle functions with no spurious local minima, enabling convergence to optimal solutions.
  • The benefits of supervised contrastive loss are shown to stem primarily from the use of a projection head and feature normalization, not the loss function per se.
  • Neural Collapse on training data well predicts test performance across all losses, indicating that generalization is determined by the optimization endpoint, not the loss form.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.