Introduction
Deep Neural Networks (DNNs) are frequently overconfident, often assigning high probability scores to incorrect predictions. This lack of "self-awareness" poses a significant challenge for deploying AI in safety-critical domains such as autonomous driving or medical diagnostics, where the ability to "reject" uncertain inputs is paramount. While much research focuses on Out-of-Distribution (OOD) detection, the broader challenge is misclassification detection—identifying both OOD samples and in-distribution samples that the model fails to classify correctly.
This paper introduces DOCTOR, a lightweight, "plug-and-play" discriminator framework designed to identify likely misclassifications. By analyzing the entire softmax output distribution rather than just the maximum confidence score, DOCTOR significantly outperforms state-of-the-art error detection methods without requiring model retraining.
Methodology
DOCTOR operates as a discriminator that decides whether a given prediction should be trusted or rejected. It is proposed in two primary variants and two deployment scenarios.
Discriminator Variants
- $D_\alpha$: This variant utilizes the sum of squared softmax probabilities. It is mathematically linked to the quadratic Rényi entropy, providing a measure of uncertainty across the entire probability distribution.
- $D_\beta$: This variant focuses on the maximum softmax probability (the standard confidence score) but frames it within newly derived theoretical error bounds.
Deployment Scenarios
- Totally Black Box (TBB): The method relies solely on the final softmax output ("soft-predictions"). This is ideal for proprietary models where internal weights or gradients are inaccessible.
- Partially Black Box (PBB): This scenario allows for a minor "input pre-processing" step. By calculating the gradient of the discriminator function, a small perturbation is applied to the input. This "nudge" amplifies the discrepancy between confident correct predictions and confident incorrect ones.
Experimental Setup
The authors evaluated DOCTOR across diverse benchmarks:
- Computer Vision: CIFAR-10, CIFAR-100, TinyImageNet, and SVHN.
- Natural Language Processing: IMDb, AmazonFashion, and AmazonSoftware for sentiment analysis.
- OOD Testing: Datasets such as iSUN and resized TinyImageNet were used as OOD samples against models trained on CIFAR.
Results and Discussion
DOCTOR consistently outperforms state-of-the-art methods, including ODIN, Mahalanobis distance (MHLNB), and energy-based models. In the PBB scenario, DOCTOR achieved up to a 4% reduction in the False Rejection Rate (FRR), meaning fewer correct predictions are discarded while still effectively catching errors.
A key insight is the power of the whole distribution. While standard methods like Softmax Response (SR) only consider the highest probability, DOCTOR’s $D_\alpha$ leverages the entire softmax vector. The relationship between all class probabilities contains subtle signals about the model's true certainty. Furthermore, the input perturbation in the PBB mode acts as a "stress test"; if a small change causes uncertainty to spike, the original prediction is likely unreliable.
Conclusion
DOCTOR provides a theoretically grounded and model-agnostic approach to error detection. It works effectively across various architectures (e.g., DenseNet, ResNet, BERT) without altering the training process. Future work aims to extend DOCTOR into a "white-box" version that incorporates internal latent codes from hidden layers to further enhance its discriminative power.
Summary updated