TL;DR
This paper provides a rigorous theoretical and experimental comparison between Cross-Entropy (CE) and Binary Cross-Entropy (BCE) losses for deep feature learning in normalized spaces. It reveals that while both losses can lead to "Neural Collapse," the scale factor $\gamma$ creates a fundamental trade-off: large $\gamma$ values facilitate classification but exponentially slow down the convergence of global feature properties, making BCE a superior choice for challenging tasks like long-tailed and open-set recognition.
What Problem Does This Paper Address?
In modern deep learning, we typically learn features by training a classifier. However, the authors argue there is an essential difference between classification (a local, sample-wise property) and deep feature learning (a global property focusing on intra-class compactness and inter-class separability).
When working in normalized feature spaces—where features and classifier weights are projected onto a hypersphere—researchers often use a scale factor $\gamma$ (or a temperature parameter $\tau$) to adjust the space. While empirical "rules of thumb" exist for setting these values, we lack a deep theoretical understanding of how $\gamma$ actually affects the geometry of the learned features. This paper aims to bridge that gap by analyzing how CE and BCE losses behave under different scaling conditions.
Methods
The authors employ several key techniques to dissect the learning process:
- BCE Reformulation: They derive a multi-class BCE loss directly from the fundamental requirements of feature learning (compactness and separability), rather than just treating it as a collection of binary tasks.
- Unconstrained Feature Model (UFM): To make the math tractable, they analyze the losses using the UFM, which treats features and classifier weights as free variables, bypassing the complexities of specific neural network architectures.
- Neural Collapse (NC) Analysis: They investigate whether these losses lead to "Neural Collapse"—a state where all features of a class collapse to their center, and those centers form a perfectly symmetric geometric structure (an Equiangular Tight Frame).
- Convergence Rate Analysis: They mathematically prove how the convergence rates of "unbiased decision scores" (the raw similarities before scaling and bias) change as $\gamma$ approaches zero or infinity.
Datasets
The study validates its theoretical findings across a variety of standard and specialized benchmarks:
- Standard Classification: MNIST, CIFAR10, and CIFAR100.
- Long-Tailed Recognition (LTR): CIFAR10-LT and CIFAR100-LT (using imbalance factors of 10, 50, and 100).
- Open-Set Recognition (OSR): MNIST, SVHN, CIFAR10, and a "CIFAR+50" setup where 50 classes from CIFAR100 are treated as unknown.
- Architectures: Experiments were conducted using both Convolutional Neural Networks (ResNet18, ResNet32, ResNet50, DenseNet121) and Transformers (ViT).
Key Insights and Ideas
- BCE's Unique Minimum: A major theoretical finding is that while CE has infinitely many global minima for classifier biases, BCE has only one. This implies that classifier biases play a much more active role in shaping features when using BCE.
- The $\gamma$ "Goldilocks" Zone:
- Large $\gamma$: Classification becomes "easy" (training accuracy hits 100% quickly), but the convergence of feature properties decays exponentially. This results in "messy" features that lack global compactness.
- Small $\gamma$: Convergence decays linearly toward zero. The gap between positive and negative scores becomes too small, making the model highly sensitive to noise and resulting in poor classification.
- Moderate $\gamma$: There is an intermediate range where both classification and feature properties can be optimized simultaneously.
- Decoupling for Robustness: BCE effectively decouples the $K$-class problem into $K$ binary tasks. This prevents the "winner-takes-all" nature of the Softmax function in CE from suppressing minority classes in long-tailed data or struggling with unknown samples in open-set scenarios.
Key Results
- Feature Quality vs. Accuracy: In experiments with $\gamma=64$, ResNet and ViT achieved 100% training accuracy, yet their feature compactness ($E_{com}$) and separability ($E_{sep}$) were significantly worse than at moderate $\gamma$ values.
- Long-Tailed Superiority: BCE consistently outperformed CE on imbalanced datasets. For example, on CIFAR100-LT (IF=100), BCE achieved 52.15% accuracy compared to CE's 49.47%.
- Open-Set Performance: BCE showed a clear advantage in identifying unknown classes. On the CIFAR+50 benchmark, BCE reached an AUROC of 90.2, outperforming CE's 87.8.
- Convergence Verification: The authors successfully fitted their theoretical convergence formulas to actual training data on MNIST, confirming the linear vs. exponential decay predictions.
Limitations and Future Work
- Balanced vs. Imbalanced Theory: While the experimental results for long-tailed data are strong, the authors note that their rigorous theoretical proofs are currently limited to balanced datasets. Extending this geometric analysis to imbalanced settings is a stated goal for future work.
- Proxy Metrics: The analysis relies on unbiased decision scores as a proxy for feature properties. The authors suggest that future work should investigate contrastive learning losses to measure distances between sample features more directly.
- Temperature in CL: The authors conjecture that the temperature parameter $\tau$ in contrastive learning functions similarly to $\gamma$, but a formal theoretical bridge between the two has yet to be fully established.
Summary updated