Introduction
Deep neural networks are notoriously overconfident, often assigning high probabilities to incorrect predictions. When a self-driving car misidentifies a pedestrian or a medical AI misses a tumor, the consequences are dire. For these models to be safely deployed, they must "know when they don't know."
This paper introduces ConfidNet, a secondary network trained to predict the "True Class Probability" (TCP)—the likelihood the model assigns to the actual correct label. This approach allows for much more reliable failure prediction than standard methods.
The Problem: Overconfidence and MCP
The standard approach for estimating confidence is Maximum Class Probability (MCP)—simply taking the highest value from the softmax output. However, modern neural networks are poorly calibrated; they tend to produce "peaky" distributions where the winning class has a very high probability even when the model is wrong. This makes it nearly impossible to distinguish a confident correct prediction from a confident mistake.
The authors tackle the challenge of failure prediction: ranking samples such that incorrect predictions are assigned lower confidence scores than correct ones.
The Solution: True Class Probability (TCP)
The core innovation is shifting the target of confidence from the predicted class to the True Class Probability (TCP). Instead of looking at the probability of the predicted label, the authors look at the probability the model assigns to the ground truth label.
- If the model is correct, TCP is high.
- If the model is wrong, the probability assigned to the true label is usually very low.
Ironically, the fact that deep networks are overconfident actually helps TCP. Because the model pushes the probability of the true class very low when it makes a mistake, the gap between "correct" and "incorrect" TCP values becomes very wide, making them easier to separate.
ConfidNet Architecture
The catch is that at test time, we don't know the true label, so we cannot calculate TCP directly. To solve this, the authors propose ConfidNet, a small auxiliary network attached to the penultimate layer of a pre-trained (and frozen) classifier.
ConfidNet is trained to perform a regression task: predicting what the TCP would be for a given input. The learning scheme proceeds as follows:
- The main classifier is trained normally.
- The classifier is frozen, and ConfidNet is trained using a Mean Squared Error (MSE) loss to estimate the TCP on the training set.
- The encoder (the "ConvNet" part) can be fine-tuned to further boost performance, provided the classification layers remain fixed to ensure the error distribution doesn't shift.
Key Insights and Results
The authors validated their approach across several standard benchmarks for both classification (MNIST, SVHN, CIFAR-10/100) and semantic segmentation (CamVid).
- Theoretical Guarantees: The authors prove that TCP has better mathematical properties for failure prediction than MCP. For instance, if TCP > 0.5, the model is guaranteed to be correct. If TCP < 1/K (where K is the number of classes), it is guaranteed to be wrong.
- Ranking over Calibration: While many researchers focus on "calibration" (making the probability match the actual accuracy), this paper focuses on ranking. Even if a model is uncalibrated, as long as its "wrong" scores are lower than its "right" scores, we can successfully predict failures.
- Performance: The authors primarily used AUPR-Error (Area Under the Precision-Recall curve, treating errors as the positive class) to measure success. ConfidNet consistently outperformed MCP, Trust Score, and Monte-Carlo Dropout (MCDropout) across all datasets. On CIFAR-100 using a VGG-16 backbone, ConfidNet reached 73.68% AUPR-Error vs. MCP's 71.99%. In semantic segmentation, ConfidNet provided much clearer "uncertainty maps," highlighting misclassified pixels far more effectively than the standard baseline.
Limitations and Future Work
A primary limitation is data scarcity for errors. Since modern models reach very high accuracy on training sets, there are very few "error" samples for ConfidNet to learn from. The authors noted that training on a separate validation set didn't necessarily help because the overall sample size was too small. Additionally, while ConfidNet is small, it still requires a second forward pass and additional memory during training.
Future directions include exploring methods to artificially generate errors (perhaps via adversarial examples) to give ConfidNet more "failure data" to learn from, as well as applying this method to domain adaptation and multi-task learning.
Summary updated