EnsLoss: Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification

Ben Dai · DOI

Introduction

Deep neural networks are notoriously prone to overfitting, often memorizing the specific quirks of training data rather than learning generalizable patterns. While model ensembling techniques like Dropout are widely used to combat this, "loss ensembling"—the practice of combining multiple objective functions—is typically computationally prohibitive as it requires training multiple separate models.

EnsLoss introduces a novel regularization approach that acts as "Dropout for loss functions." By randomly generating a mathematically valid, calibrated loss function for every training batch, EnsLoss forces models to learn robust features that generalize across a wide variety of objectives, significantly improving accuracy in overparameterized models.

Methodology: Doubly Stochastic Gradient Descent

The core innovation of EnsLoss is the implementation of Doubly Stochastic Gradient Descent. While standard SGD is stochastic with respect to the data (using minibatches), EnsLoss adds a second layer of stochasticity to the loss function itself.

Conceptual framework of EnsLoss, showing how mathematical properties of the loss function $\phi$ translate into algorithmic constraints for generating random loss-derivatives.

To ensure that these randomly generated losses are effective and mathematically "legitimate," the algorithm enforces several critical properties:

  • Convexity and Calibration: For a surrogate loss to be useful, it must be calibrated such that minimizing it leads to the best classification accuracy. The authors prove that by sorting random variables and applying specific rescaling, these properties can be enforced directly on the loss-derivatives.
  • Superlinear Raising-Tail: For training stability, the right tail of the loss-derivative must rise rapidly. EnsLoss implements a specific rescaling step (Algorithm 1, Line 13) to prevent the training process from becoming unstable.
  • Derivative Generation: A key insight of the paper is that the explicit formula for a loss function is unnecessary for training; only its derivative is required. By generating valid derivatives directly during backpropagation, the authors avoid complex symbolic mathematics during the training loop.

Experimental Setup

The authors evaluated EnsLoss on a massive scale across three primary domains:

  1. Tabular Data: 14 high-dimensional binary classification datasets from OpenML (e.g., Bioresponse, OVA-Breast).
  2. Image Classification: 45 unique binary pairs derived from CIFAR-10 (CIFAR2).
  3. Medical Imaging: The PatchCamelyon (PCam) dataset, which contains over 327,000 histopathologic scans for cancer detection.

Key Results and Discussion

EnsLoss consistently outperformed standard fixed losses, including Binary Cross-Entropy (BCE), Hinge, and Exponential loss. On the CIFAR2 and PCam datasets, the method achieved accuracy gains of 3.84% and 3.79% respectively over the best-performing fixed loss baselines.

Test accuracy across different architectures (MobileNetV2, ResNet34, VGG16) comparing EnsLoss against standard fixed losses.

Architectural Robustness and Compatibility

As illustrated in Figure 1, the performance improvements offered by EnsLoss are "universal," appearing consistently across diverse architectures such as ResNet, VGG, and MobileNet. The effectiveness of the method actually increases as models become more complex (overparameterized), making it uniquely suited for modern deep learning.

Furthermore, EnsLoss is complementary to existing regularization tools. Experiments demonstrated that combining EnsLoss with Dropout or Data Augmentation yielded even better results than using those methods in isolation, suggesting that stochastic loss ensembles target a different aspect of the overfitting problem.

Limitations and Future Work

While highly effective, EnsLoss typically requires more epochs to converge compared to fixed losses because the objective function is constantly shifting. This results in longer total training times. Additionally, the diversity of the generated losses is controlled by a parameter $\lambda$ (from the Box-Cox transform); while the method is relatively insensitive, finding the optimal $\lambda$ for a specific task remains an area for further investigation.

Finally, this work focuses on binary classification. Extending the mathematical conditions for legitimacy (convexity and calibration) to multi-class problems like ImageNet is a logical and mathematically complex next step for the research.

Summary updated

BibTeX
@inproceedings{dai2025ensloss,
  author = {Ben Dai},
  title = {{EnsLoss: Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=wP8meX6uJC},
}
Figure