AdaFocal: Calibration-aware Adaptive Focal Loss
Arindam Ghosh, Thomas Schaaf, Matthew Gormley
Abstract
Much recent work has been devoted to the problem of ensuring that a neural network's confidence scores match the true probability of being correct, i.e. the calibration problem. Of note, it was found that training with focal loss leads to better calibration than cross-entropy while achieving similar level of accuracy . This success stems from focal loss regularizing the entropy of the model's prediction (controlled by the parameter ), thereby reining in the model's overconfidence. Further improvement is expected if is selected independently for each training sample (Sample-Dependent Focal Loss (FLSD-53) ). However, FLSD-53 is based on heuristics and does not generalize well. In this paper, we propose a calibration-aware adaptive focal loss called AdaFocal that utilizes the calibration properties of focal (and inverse-focal) loss and adaptively modifies for different groups of samples based on from the previous step and the knowledge of model's under/over-confidence on the validation set. We evaluate AdaFocal on various image recognition and one NLP task, covering a wide variety of network architectures, to confirm the improvement in calibration while achieving similar levels of accuracy. Additionally, we show that models trained with AdaFocal achieve a significant boost in out-of-distribution detection.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1b89b0b9-bd59-4973-9e3e-e8e220db3f62Cited by top-tier papers16
- Dual Focal Loss for CalibrationLinwei Tao, Minjing Dong, Chang XuICML 2023 · 56 citations
- ACLS: Adaptive and Conditional Label Smoothing for Network CalibrationHyekang Park, Jongyoun Noh, Youngmin Oh, Donghyeon Baek et al.ICCV 2023 · 22 citations
- RankMixup: Ranking-Based Mixup Training for Network CalibrationJongyoun Noh, Hyekang Park, Junghyup Lee, Bumsub HamICCV 2023 · 22 citations
- Learning model uncertainty as variance-minimizing instance weightsNishant Jain, Karthikeyan Shanmugam, Pradeep ShenoyICLR 2024 · 7 citations
- Variational Supervised Contrastive LearningZiwen Wang, Jiajun Fan, Thao Nguyen, Heng Ji et al.NeurIPS 2025 · 7 citations
Builds on4
- Calibrating Deep Neural Networks using Focal LossJishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz et al.NeurIPS 2020 · 674 citations
- Mix-n-Match : Ensemble and Compositional Methods for Uncertainty Calibration in Deep LearningJize Zhang, Bhavya Kailkhura, Thomas Yong-Jin HanICML 2020 · 276 citations
- Rethinking Calibration of Deep Neural Networks: Do Not Be Afraid of OverconfidenceDeng-Bao Wang, Lei Feng, Min-Ling ZhangNeurIPS 2021 · 177 citations
- Calibration of Neural Networks using SplinesKartik Gupta, Amir Rahimi, Thalaiyasingam Ajanthan, Thomas Mensink et al.ICLR 2021 · 128 citations
Related papers
- Learning to Doubt: Forgetting Aware Learning for Neural NetworksAwanish Kumar, Soumyadeep Ghosh, Akshita Sharma, Rahul GuptaKDD 2026
- The Devil is in the Margin: Margin-based Label Smoothing for Network CalibrationBingyuan Liu, Ismail Ben Ayed, Adrian Galdran, Jose DolzCVPR 2022 · 61 citations
- Uncertainty Weighted Gradients for Model CalibrationJinxu Lin, Linwei Tao, Minjing Dong, Chang XuCVPR 2025
- Learning Sample Difficulty from Pre-trained Models for Reliable PredictionPeng Cui, Dan Zhang, Zhijie Deng, Yinpeng Dong et al.NeurIPS 2023 · 21 citations
- Confidence-Aware Learning for Deep Neural NetworksJooyoung Moon, Jihyo Kim, Younghak Shin, Sangheum HwangICML 2020 · 184 citations
