Sample Margin-Aware Recalibration of Temperature Scaling
Haolan Guo, Linwei Tao, Haoyang Luo, Minjing Dong, Chang Xu
Abstract
Recent advances in deep learning have significantly improved predictive accuracy. However, modern neural networks remain systematically overconfident, posing risks for deployment in safety-critical scenarios. Current post-hoc calibration methods face a fundamental dilemma: global approaches like Temperature Scaling apply uniform adjustments across all samples, introducing high bias despite computational efficiency, while more expressive methods that operate on full logit distributions suffer from high variance due to noisy high-dimensional inputs and insufficient validation data. To address these challenges, we propose Sample Margin-Aware Recalibration of Temperature (SMART), a lightweight, data-efficient recalibration method that precisely scales logits based on the margin between the top two logits-termed the logit gap. Specifically, the logit gap serves as a denoised, scalar signal directly tied to decision boundary uncertainty, providing a robust indicator that avoids the noise inherent in high-dimensional logit spaces while preserving model prediction invariance. Meanwhile, SMART employs a novel soft-binned Expected Calibration Error (SoftECE) objective that balances model bias and variance through adaptive binning, enabling stable parameter updates even with extremely limited calibration data. Extensive evaluations across diverse datasets and architectures demonstrate that SMART achieves state-of-the-art calibration performance even with substantially fewer parameters compared to existing parametric methods, offering a principled, robust, and highly efficient solution for practical uncertainty quantification in neural network predictions. The source code is available at: https://anonymous.4open.science/r/SMART-8B11 .
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 fa75c876-0f40-44d8-9dd1-09794c1df9ecCited by top-tier papers1
Ask how each one uses itBuilds on9
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- 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
- Calibration of Neural Networks using SplinesKartik Gupta, Amir Rahimi, Thalaiyasingam Ajanthan, Thomas Mensink et al.ICLR 2021 · 128 citations
Related papers
- Rethinking Calibration of Deep Neural Networks: Do Not Be Afraid of OverconfidenceDeng-Bao Wang, Lei Feng, Min-Ling ZhangNeurIPS 2021 · 177 citations
- Soft Calibration Objectives for Neural NetworksArchit Karandikar, Nicholas Cain, Dustin Tran, Balaji Lakshminarayanan et al.NeurIPS 2021 · 127 citations
- Beyond In-Domain Scenarios: Robust Density-Aware CalibrationChristian Tomani, Futa Kai Waseda, Yuesong Shen, Daniel CremersICML 2023 · 16 citations
- Precision-Induced Miscalibration: Understanding and Correcting Confidence Distortion in Quantized Neural NetworksJiawei Gu, Fengyuan Nie, Hao Tang, Yanpeng SunICML 2026
- Proximity-Informed Calibration for Deep Neural NetworksMiao Xiong, Ailin Deng, Pang Wei Koh, Jiaying Wu et al.NeurIPS 2023 · 30 citations
