[Paper Review] Post-hoc Calibration of Neural Networks.
This paper provides a theoretical foundation for post-hoc calibration of neural networks by proving that even when a base network is not optimal, adding a learnable calibration head (g) and minimizing Negative Log-Likelihood (NLL) on the output of the base network (f) can yield a calibrated final model (g∘f). Experiments on image classification benchmarks confirm the theoretical findings.
Calibration of neural networks is a critical aspect to consider when incorporating machine learning models in real-world decision-making systems where the confidence of decisions are equally important as the decisions themselves. In recent years, there is a surge of research on neural network calibration and the majority of the works can be categorized into post-hoc calibration methods, defined as methods that learn an additional function to calibrate an already trained base network. In this work, we intend to understand the post-hoc calibration methods from a theoretical point of view. Especially, it is known that minimizing Negative Log-Likelihood (NLL) will lead to a calibrated network on the training set if the global optimum is attained (Bishop, 1994). Nevertheless, it is not clear learning an additional function in a post-hoc manner would lead to calibration in the theoretical sense. To this end, we prove that even though the base network ($f$) does not lead to the global optimum of NLL, by adding additional layers ($g$) and minimizing NLL by optimizing the parameters of $g$ one can obtain a calibrated network $g \circ f$. This not only provides a less stringent condition to obtain a calibrated network but also provides a theoretical justification of post-hoc calibration methods. Our experiments on various image classification benchmarks confirm the theory.
Motivation & Objective
- To understand the theoretical underpinnings of post-hoc calibration methods for neural networks.
- To investigate whether learning an additional function after training a base network can lead to theoretically calibrated predictions.
- To relax the requirement that the base network must achieve the global optimum of NLL for calibration to be achieved.
- To provide theoretical justification for the empirical success of post-hoc calibration techniques.
Proposed method
- The paper introduces a two-stage model: a pre-trained base network f and a learnable calibration head g, forming the composition g∘f.
- It proves that minimizing NLL on the output of f via optimization of g's parameters leads to a calibrated model, even if f is not globally optimal.
- The theoretical analysis relies on the known property that minimizing NLL yields calibration on the training set when the global optimum is reached.
- The method treats the base network f as fixed and optimizes only the parameters of g to calibrate the outputs.
- The approach is applicable to any base network and calibration head architecture, as long as g can model the necessary transformation.
Experimental results
Research questions
- RQ1Can post-hoc calibration via a learnable head g achieve theoretical calibration even when the base network f is not globally optimal?
- RQ2What conditions ensure that the composition g∘f is calibrated after optimizing g's parameters?
- RQ3How does minimizing NLL on the output of f through g relate to the calibration of the final model?
- RQ4Does the theoretical justification hold in practice across diverse image classification benchmarks?
Key findings
- Theoretical analysis proves that minimizing NLL on the output of a pre-trained base network f via a learnable head g results in a calibrated final model g∘f, even if f is not globally optimal.
- The method provides a less stringent condition than requiring the base network to achieve the global optimum of NLL for calibration.
- The theoretical justification supports the empirical success of post-hoc calibration methods in practice.
- Experiments on multiple image classification benchmarks validate the theoretical claims, showing effective calibration.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.