Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Cross-Entropy Loss Functions: Theoretical Analysis and Applications

About

Cross-entropy is a widely used loss function in applications. It coincides with the logistic loss applied to the outputs of a neural network, when the softmax is used. But, what guarantees can we rely on when using cross-entropy as a surrogate loss? We present a theoretical analysis of a broad family of loss functions, comp-sum losses, that includes cross-entropy (or logistic loss), generalized cross-entropy, the mean absolute error and other cross-entropy-like loss functions. We give the first $H$-consistency bounds for these loss functions. These are non-asymptotic guarantees that upper bound the zero-one loss estimation error in terms of the estimation error of a surrogate loss, for the specific hypothesis set $H$ used. We further show that our bounds are tight. These bounds depend on quantities called minimizability gaps. To make them more explicit, we give a specific analysis of these gaps for comp-sum losses. We also introduce a new family of loss functions, smooth adversarial comp-sum losses, that are derived from their comp-sum counterparts by adding in a related smooth term. We show that these loss functions are beneficial in the adversarial setting by proving that they admit $H$-consistency bounds. This leads to new adversarial robustness algorithms that consist of minimizing a regularized smooth adversarial comp-sum loss. While our main purpose is a theoretical analysis, we also present an extensive empirical analysis comparing comp-sum losses. We further report the results of a series of experiments demonstrating that our adversarial robustness algorithms outperform the current state-of-the-art, while also achieving a superior non-adversarial accuracy.

Anqi Mao, Mehryar Mohri, Yutao Zhong• 2023

Related benchmarks

TaskDatasetResultRank
Fine-grained Image ClassificationCUB200 2011 (test)
Accuracy70.83
585
Image ClassificationCIFAR-100--
362
Image ClassificationImageNet LT
Top-1 Accuracy41.6
264
Out-of-Distribution DetectionCIFAR-10 vs SVHN (test)
AUROC0.9137
146
Out-of-Distribution DetectionCIFAR-10 vs CIFAR-100 (test)
AUROC87.82
119
Image ClassificationFGVC Aircraft
Top-1 Acc17.76
112
Image ClassificationStanford Cars
Top-1 Accuracy4.91
98
Image ClassificationCIFAR-100 LT (IF=50)
Top-1 Acc43.9
82
Model CalibrationTiny ImageNet (test)
ECE3.73
57
Image ClassificationCIFAR-100 LT (IF=100)
Top-1 Acc38.43
55
Showing 10 of 25 rows

Other info

Follow for update