On Focal Loss for Class-Posterior Probability Estimation: A Theoretical Perspective
Abstract
The focal loss has demonstrated its effectiveness in many real-world applications such as object detection and image classification, but its theoretical understanding has been limited so far. In this paper, we first prove that the focal loss is classification-calibrated, i.e., its minimizer surely yields the Bayes-optimal classifier and thus the use of the focal loss in classification can be theoretically justified. However, we also prove a negative fact that the focal loss is not strictly proper, i.e., the confidence score of the classifier obtained by focal loss minimization does not match the true class-posterior probability. This may cause the trained classifier to give an unreliable confidence score, which can be harmful in critical applications. To mitigate this problem, we prove that there exists a particular closed-form transformation that can recover the true class-posterior probability from the outputs of the focal risk minimizer. Our experiments show that our proposed transformation successfully improves the quality of class-posterior probability estimation and improves the calibration of the trained classifier, while preserving the same prediction accuracy.
Cite
Text
Charoenphakdee et al. "On Focal Loss for Class-Posterior Probability Estimation: A Theoretical Perspective." Conference on Computer Vision and Pattern Recognition, 2021. doi:10.1109/CVPR46437.2021.00516Markdown
[Charoenphakdee et al. "On Focal Loss for Class-Posterior Probability Estimation: A Theoretical Perspective." Conference on Computer Vision and Pattern Recognition, 2021.](https://mlanthology.org/cvpr/2021/charoenphakdee2021cvpr-focal/) doi:10.1109/CVPR46437.2021.00516BibTeX
@inproceedings{charoenphakdee2021cvpr-focal,
title = {{On Focal Loss for Class-Posterior Probability Estimation: A Theoretical Perspective}},
author = {Charoenphakdee, Nontawat and Vongkulbhisal, Jayakorn and Chairatanakul, Nuttapong and Sugiyama, Masashi},
booktitle = {Conference on Computer Vision and Pattern Recognition},
year = {2021},
pages = {5202-5211},
doi = {10.1109/CVPR46437.2021.00516},
url = {https://mlanthology.org/cvpr/2021/charoenphakdee2021cvpr-focal/}
}