DOCTOR: A Simple Method for Detecting Misclassification Errors

Federica Granese, Marco Romanelli, Daniele Gorla, Catuscia Palamidessi, Pablo Piantanida

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

  1. $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.
  2. $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.

Histograms of discriminator scores for correct and wrong predictions across different methods. While baselines like MHLNB (g, h) show significant overlap, DOCTOR variants (a-d) provide better separation between 'Correct' and 'Wrong' samples.

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

BibTeX
@inproceedings{granese2021doctor,
  author = {Federica Granese and Marco Romanelli and Daniele Gorla and Catuscia Palamidessi and Pablo Piantanida},
  title = {{DOCTOR: A Simple Method for Detecting Misclassification Errors}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure