Calibrating Deep Neural Networks using Focal Loss
Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz,, Philip H.S. Torr, Puneet K. Dokania

TL;DR
This paper demonstrates that focal loss, combined with temperature scaling, significantly improves the calibration of deep neural networks across various datasets and architectures without sacrificing accuracy.
Contribution
It introduces the use of focal loss for better calibration of DNNs and provides a method for automatic hyperparameter selection, achieving state-of-the-art calibration results.
Findings
Focal loss improves model calibration over cross-entropy.
Combining focal loss with temperature scaling enhances calibration while maintaining accuracy.
The approach is effective across diverse datasets and network architectures.
Abstract
Miscalibration - a mismatch between a model's confidence and its correctness - of Deep Neural Networks (DNNs) makes their predictions hard to rely on. Ideally, we want networks to be accurate, calibrated and confident. We show that, as opposed to the standard cross-entropy loss, focal loss [Lin et. al., 2017] allows us to learn models that are already very well calibrated. When combined with temperature scaling, whilst preserving accuracy, it yields state-of-the-art calibrated models. We provide a thorough analysis of the factors causing miscalibration, and use the insights we glean from this to justify the empirically excellent performance of focal loss. To facilitate the use of focal loss in practice, we also provide a principled approach to automatically select the hyperparameter involved in the loss function. We perform extensive experiments on a variety of computer vision and NLP…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Anomaly Detection Techniques and Applications · Machine Learning and Data Classification
MethodsFocal Loss
