On the Separability of Classes with the Cross-Entropy Loss Function

Rudrajit Das, Subhasis ChaudhuriarXiv 2019

Authors: Rudrajit Das and Subhasis Chaudhuri (IIT Bombay)

Abstract

While cross-entropy loss is the standard objective for training deep neural networks, its direct influence on the geometric arrangement of learned features is often poorly understood. This paper provides a theoretical framework to bridge this gap, deriving mathematical lower bounds for the probability of class separability as a function of the cross-entropy loss value. By modeling the distribution of predicted probabilities and assuming Gaussian weights in the final layer, the authors demonstrate that minimizing cross-entropy loss directly forces the network to learn more compact and well-separated feature clusters.

Introduction

In modern deep learning, classifiers are typically trained by minimizing the cross-entropy loss. While this approach is empirically successful, it lacks the explicit geometric margin optimization found in older methods like Support Vector Machines (SVMs) or the variance-ratio maximization of Linear Discriminant Analysis (LDA). Cross-entropy is rooted in Maximum Likelihood Estimation, which does not inherently optimize for spatial distance between classes. This research addresses a fundamental question: Does minimizing cross-entropy loss mathematically guarantee a feature space where classes are well-separated?

Theoretical Framework

The authors analyze the feature space $\phi(x)$—the representation of data just before the final Softmax layer. Their methodology relies on two key pillars:

  1. Empirical Modeling of Predictions: The researchers observed that the predicted probabilities of the ground-truth class follow a specific distribution. Specifically, they found that $(-\log(\hat{y}_i^{(c(x_i))}))^{1/\beta}$ approximately follows an exponential distribution, where $\beta$ is a dataset-specific constant.
  2. Geometric Assumptions: To handle high-dimensional geometry, the weights of the final fully connected layer ($A_c$) are assumed to be zero-mean i.i.d. Gaussian random variables. This allows the use of concentration inequalities for chi-squared distributions to bound the distances between feature vectors.

Class Separability and the Role of Loss

The core of the study is the relationship between the loss value $L$ and the likelihood that the "inter-class distance" (distance between points of different classes) significantly exceeds the "intra-class distance" (distance between points of the same class).

Figure 1: CCDF of intra-class and inter-class distances for varying loss values L. As L increases, the distribution shifts, indicating poorer class separation.

As shown in the figure above, the cross-entropy loss value acts as a direct control knob for class separability. When the loss $L$ is low, the Cumulative Distribution Function (CDF) of the distances confirms that feature clusters are tight and distinct. As $L$ increases, these distributions shift and overlap, leading to a measurable decline in geometric separability.

Key Insights and Results

The Impact of Class Count and Loss

One of the more counter-intuitive findings is the "Number of Classes" effect. The mathematical bounds suggest that as the number of classes ($C$) increases, the lower bound for the probability of separation actually increases, provided the loss remains constant. This phenomenon arises from the properties of high-dimensional chi-squared distributions used in the derivation.

Figure 5: Lower bound of the probability of class separation as a function of loss L for different numbers of classes C.

The $\beta$ Parameter

The authors introduced $\beta$ to capture the inherent difficulty of a dataset or architecture. For complex benchmarks like CIFAR-10, $\beta \approx 4$, whereas for simpler synthetic tasks, it ranges between 1.4 and 2. This parameter serves as a metric for the relationship between a model's capacity and the complexity of its data.

Validation and Conclusion

The theoretical bounds were validated across MNIST, CIFAR-10, and synthetic datasets (SYN-1, SYN-2). For MNIST, which achieved a very low loss of 0.0298, the probability of inter-class distance exceeding intra-class distance was nearly 1.0. In contrast, for CIFAR-10 with a higher loss of 0.4516, the probability dropped to the 0.7–0.85 range, matching the theoretical predictions.

This work provides a formal justification for the common practice of using cross-entropy loss to achieve well-clustered representations. Future work may extend these techniques to other loss functions, such as Triplet or Center loss, which are explicitly designed for geometric compactness.

Summary updated

BibTeX
@misc{das2019separability,
  author = {Rudrajit Das and Subhasis Chaudhuri},
  title = {{On the Separability of Classes with the Cross-Entropy Loss Function}},
  year = {2019},
  eprint = {1909.06930},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.06930},
}
Figure