Abstract
Many applications of classification methods not only require high accuracy but also reliable estimation of predictive uncertainty. However, while many current classification frameworks, in particular deep neural networks, achieve high accuracy, they are often poorly calibrated, leading to overconfident predictions. This paper introduces GPcalib, a model-agnostic, non-parametric calibration method based on latent Gaussian Processes. By using sparse variational inference, GPcalib scales to large datasets and provides a flexible way to align predicted probabilities with actual outcomes without rigid parametric assumptions.
Introduction
In safety-critical fields like autonomous driving or medical diagnosis, it isn't enough for an AI to be accurate; it must also be calibrated. Calibration means that if a model assigns a 0.8 probability to a class, it should be correct exactly 80% of the time. Unfortunately, modern neural networks (especially CNNs) are notoriously miscalibrated, often outputting extreme probabilities near 0 or 1 even when they are likely to be wrong. Existing solutions like Temperature Scaling are popular due to their simplicity, but they are "parametric"—they assume the relationship between raw model output and true probability follows a specific, simple shape. GPcalib addresses the need for a more flexible approach that can fix complex patterns of over- and under-confidence.
The GPcalib Methodology
GPcalib treats the calibration task as a regression problem handled by a Gaussian Process (GP). The method uses a latent function $g$ to transform the model's raw outputs (logits). Unlike parametric methods, the shape of this transformation is determined by the data itself, allowing it to capture non-linearities that simpler methods miss.
To ensure scalability for large-scale datasets like ImageNet, GPcalib employs sparse variational inference. This technique uses a small set of "inducing points" to approximate the full GP, reducing computational complexity from $O(N^3)$ to a manageable level. A key feature is the choice of a "calibration prior," which assumes the model is already calibrated unless the data provides strong evidence otherwise.
Key Insights and Analysis
A significant contribution of this work is the theoretical bridge (Theorem 1) between calibration and active learning, showing that Expected Calibration Error (ECE) bounds the difference between overconfidence and underconfidence.
Visualizing the calibration maps for high-performance models reveals complex, non-linear miscalibration patterns in logit-space. As shown in the latent function analysis, these patterns are too intricate for a single "Temperature" parameter to correct, justifying the need for a non-parametric approach that treats the classifier as a black box.
Experimental Results
The authors evaluated GPcalib across a diverse range of benchmarks including KITTI, PCam, MNIST, CIFAR-100, and ImageNet.
- CIFAR-100: GPcalib consistently achieved the lowest ECE across multiple architectures (WideResNet, ResNeXt, DenseNet), often significantly outperforming Temperature Scaling.
- ImageNet: GPcalib outperformed all other methods on 9 out of 13 evaluated architectures.
- Active Learning Efficiency: In experiments on the KITTI dataset using Mondrian Forests, the calibrated model reached target accuracy using 10% fewer labeled samples, demonstrating that improved "self-awareness" helps models pick more informative data to learn from.
Conclusion
GPcalib provides a robust, model-agnostic solution for calibrating modern classifiers. While it introduces more complexity than simple scaling methods, its computational overhead is minimal compared to initial model training, with calibration taking only seconds or minutes. Future work will focus on ensuring strict monotonicity in the GP transformation and exploring online calibration techniques during the training process.
Summary updated