Calibrating Deep Neural Networks using Focal Loss
By Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz, Philip H. S. Torr, Puneet Kumar Dokania. Neural Information Processing Systems, 2020
646 citations recorded by the source corpus.
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 datasets, and with a wide variety of network architectures, and show that our approach achieves state-of-the-art calibration without compromising on accuracy in almost all cases. Code is available at this https URL
View Paper: https://www.semanticscholar.org/paper/07d440f44f5f955afef3c32f2610c7a716c36f97
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
Citations in the corpus
- Mitigating Neural Network Overconfidence with Logit Normalization (2022, methodology): “Besides, some regularization methods are also proposed to improve the calibration quality of deep neural networks, like weight decay (Guo et al., 2017), label smoothing (Szegedy et al., 2016; M ¨ uller et al., 2019), and focal loss (Lin et al., 2017; Mukhoti et al., 2020).”
- Revisiting the Train Loss: an Efficient Performance Estimator for Neural Architecture Search (2020, background): “This implies that the validation/test losses can become unreliable indicator for the validation/test accuracy on certain datasets; as training proceeds, the validation accuracy keeps improving but the validation losses could stagnate at a relatively high level or even start to rise [36, 37].”
- Teaching Models to Express Their Uncertainty in Words (2022, background): “Prior work on calibration focuses primarily on the classification setting, where models output a probability distribution over the set of possible classes (Guo et al., 2017; Mukhoti et al., 2020; Minderer et al., 2021), corresponding to what we call the “answer logit”.”
- Local Temperature Scaling for Probability Calibration (2020, methodology): “2), we show the performance before and after using LTS for models trained with maximum mean calibration loss (MMCE) [36] and focal loss (FL) [52].”
- Continual Segmentation with Disentangled Objectness Learning and Class Recognition (2024, unknown): “Here, we use focal loss [27] instead of cross-entropy loss for better calibration [33], which smooths the distillation process during continual learning.”
- Improving Calibration for Long-Tailed Recognition (2020, background): “For example, focal loss [18, 22] assigned smaller weights for well-classified samples.”
- Dynamically Weighted Balanced Loss: Class Imbalanced Learning and Confidence Calibration of Deep Neural Networks (2021, result): “While FL has shown to have calibration properties in [49], we did not observe significantly improved results with it in our experiments.”
- Calibrated ensembles can mitigate accuracy tradeoffs under distribution shift (2022, background): “Deep neural networks are typically large enough to memorize the training dataset, and are encouraged to magnify their weights (and hence their confidence) to decrease the training loss [Mukhoti et al., 2020, Bai et al., 2021].”
- Mitigating bias in calibration error estimation (2020, methodology): “, 2017; Zadrozny and Elkan, 2001, 2002) and, more recently, calibration-sensitive training objectives (Karandikar et al., 2021; Krishnan and Tickoo, 2020; Kumar et al., 2018; Lin et al., 2018; Mukhoti et al., 2020).”