Introduction
In mission-critical applications such as autonomous driving or medical diagnostics, the reliability of a model's prediction is as vital as the prediction itself. This reliability is quantified through uncertainty estimation. While traditional calibration techniques often rely on a model's internal outputs, researchers from Ben-Gurion University of the Negev have introduced a novel approach presented at UAI 2022. Their method shifts the focus from internal model logic to the geometry of the training data distribution.
The Calibration Challenge
Standard machine learning models, particularly deep neural networks, are prone to overconfidence. A model might assign a high probability to a misclassified input simply because it has not encountered similar data during training. Existing post-hoc calibration methods, such as Temperature Scaling, attempt to adjust these probabilities by scaling the raw output logits. However, because these methods are tethered to the model's internal representations, they are limited by any inherent biases or flaws within the model itself.
Geometric Separation Method
The proposed method utilizes "Geometric Separation" to estimate uncertainty. The core intuition is that an input's reliability is proportional to its distance from the boundaries of its predicted class.
1. Separation Measure
For a given input $x$, the authors define separation based on the distance to training points of the same predicted class ($F_M$) versus points of different classes ($\overline{F}_M$). High positive separation indicates the input is deep within the territory of its class, while negative separation suggests it is closer to a different class boundary.
2. Fast-Separation Approximation
To ensure the method is viable for real-time use, the authors developed a simplified approximation: $$\mathcal{S}^M(x) \approx \frac{\text{dist}(x, \text{nearest different class}) - \text{dist}(x, \text{nearest same class})}{2}$$ This approximation avoids the computational cost of calculating exact geometric boundaries in high-dimensional space, allowing the system to focus only on nearest neighbors.
3. Calibration via Isotonic Regression
The raw geometric signal is then mapped to a probability using Isotonic Regression. This step transforms the distance value into a value between 0 and 1, representing the actual likelihood of the prediction being correct.
Experimental Evaluation
The researchers evaluated their method across five diverse computer vision benchmarks: MNIST, Fashion MNIST, GTSRB (German Traffic Sign Recognition), SignLang, and CIFAR-10. These datasets were tested against three distinct model architectures: Random Forests (RF), Gradient Boosted Decision Trees (GBDT), and Convolutional Neural Networks (CNN).
Key Findings
- Superior Calibration: The geometric approach consistently outperformed industry standards like Scikit-learn’s calibration tools and Temperature Scaling. It reduced the Expected Calibration Error (ECE)—the gap between predicted confidence and actual accuracy—by over 90% in many scenarios, and in some instances, up to 99%.
- Model Agnosticism: Because the method relies on training data distribution rather than internal model parameters, it provided significant boosts for both deep learning models and tree-based models (RF and GBDT).
- Real-time Performance: Utilizing the fast-separation approximation, the method achieved processing speeds between 23 and 46 predictions per second on a standard laptop. This throughput is sufficient for video-based applications typically requiring 24–60 frames per second.
Limitations and Future Work
The primary limitation of this approach is the memory overhead. To calculate distances, the system requires access to the training dataset (or a representation of it) during the inference phase. For massive datasets, storing and searching through millions of high-dimensional vectors can be resource-intensive.
Future research will focus on exploring data structures that can approximate the training set geometry using significantly less memory, essentially "summarizing" the training data to maintain performance without the full storage burden.
Summary updated