Towards Accurate and Calibrated Classification: Regularizing Cross-Entropy From A Generative Perspective
About
Accurate classification requires not only high predictive accuracy but also well-calibrated confidence estimates. Yet, modern deep neural networks (DNNs) are often overconfident, primarily due to overfitting on the negative log-likelihood (NLL). While focal loss variants alleviate this issue, they typically reduce accuracy, revealing a persistent trade-off between calibration and predictive performance. Motivated by the complementary strengths of generative and discriminative classifiers, we propose Generative Cross-Entropy (GCE), which maximizes $p(x|y)$ and is equivalent to cross-entropy augmented with a class-level confidence regularizer. Under mild conditions, GCE is strictly proper. Across CIFAR-10/100, Tiny-ImageNet, and a medical imaging benchmark, GCE improves both accuracy and calibration over cross-entropy, especially in the long-tailed scenario. Combined with adaptive piecewise temperature scaling (ATS), GCE attains calibration competitive with focal-loss variants without sacrificing accuracy.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | CIFAR-10 (test) | -- | 410 | |
| Image Classification | Tiny ImageNet (test) | -- | 362 | |
| Image Classification | CIFAR-100 (test) | -- | 175 | |
| Image Classification Calibration | CIFAR100 | Classwise ECE0.2 | 90 | |
| Image Classification Calibration | CIFAR10 | Classwise ECE0.39 | 84 | |
| Model Calibration | CIFAR-100 | ECE1.25 | 81 | |
| Model Calibration | CIFAR-10 | ECE66 | 68 | |
| Classwise Calibration | CIFAR-10-LT | Average Classwise ECE1.07 | 56 | |
| Image Classification | CIFAR-10 LT-100 (test) | Error Rate23.75 | 40 | |
| Model Calibration | Tiny-ImageNet | Expected Calibration Error1.15 | 32 |