Multiclass Loss Geometry Matters for Generalization of Gradient Descent in Separable Classification

Matan Schliserman, Tomer Koren · DOI

Modern machine learning relies heavily on overparameterized models that can perfectly interpolate training data. Despite the lack of explicit regularization, Gradient Descent (GD) often finds solutions that generalize remarkably well. In binary classification, this phenomenon is often attributed to the "implicit bias" of GD toward max-margin solutions. However, extending this understanding to multiclass classification reveals a more nuanced picture where the specific geometry of the loss function plays a critical role.

This research investigates how the "geometry" of a loss function—defined by its smoothness with respect to different norms—determines the generalization performance of GD as the number of classes ($k$) increases. The authors demonstrate a significant theoretical gap: while standard cross-entropy loss scales gracefully with $k$, other smooth losses suffer a linear penalty.

The Geometry of Multiclass Loss

The analysis centers on the concept of "loss templates." Instead of treating the multiclass loss as a monolithic function, it is viewed as a template that operates on the differences between the score of the correct class and the scores of all other classes. The researchers categorize these templates based on their smoothness relative to $L_p$ norms:

  • $L_\infty$ Smoothness: The standard cross-entropy loss falls into this category. Its geometry is sensitive to the maximum difference between class scores.
  • $L_2$ Smoothness: Other potential loss functions might be smooth with respect to the Euclidean ($L_2$) norm.

Generalization and Rademacher Complexity

To bridge the gap between optimization and generalization, the authors derive new bounds on the Rademacher complexity for vector-valued linear predictors. This allows for an estimation of the generalization error (risk) after a finite number of gradient steps ($T$), rather than just in the infinite-time limit.

The core finding is that the risk bound for $L_p$-smooth templates scales with $k^{2/p}$. This leads to a stark contrast in performance:

  1. The $L_\infty$ Advantage: For Cross-Entropy ($p = \infty$), the dependence on the number of classes is logarithmic ($\log k$). This explains why cross-entropy remains effective even in "extreme" classification tasks with thousands or millions of categories.
  2. The $L_2$ Penalty: For $L_2$-smooth losses ($p = 2$), the dependence is linear ($k$). This represents a significantly harsher penalty, implying that as the number of classes grows, the amount of data required to maintain accuracy increases much faster than it does for cross-entropy.

Theoretical Separation

The paper provides both upper and lower bounds to confirm these findings. By constructing "hard" synthetic distributions, the authors prove that the linear dependence for $L_2$ losses is unavoidable. This establishes a formal theoretical separation: not all exponentially decaying losses are equal in the multiclass setting. The "geometry" of the loss—how it interacts with the vector of class scores—is a fundamental determinant of generalization.

Limitations and Future Directions

While these results provide a rigorous foundation for understanding multiclass generalization, they are currently limited to linear predictors and linearly separable data. In these settings, the model can achieve zero training error. Real-world deep learning involves non-linear architectures and often noisy, non-separable data.

Future research is needed to determine if these geometric insights hold for deep neural networks and how adaptive optimization algorithms (like Adam) might interact with loss geometry. Nonetheless, this work highlights why the choice of loss function is not merely a matter of optimization convenience but a critical factor in the model's ability to generalize to many classes.

Summary updated

BibTeX
@inproceedings{schliserman2025multiclass,
  author = {Matan Schliserman and Tomer Koren},
  title = {{Multiclass Loss Geometry Matters for Generalization of Gradient Descent in Separable Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=FBjTMq2Rby},
}
Figure