A Call to Reflect on Evaluation Practices for Failure Detection in Image Classification

Paul F. Jaeger, Carsten T. Lüth, Lukas Klein, Till J. Bungert

Abstract: Reliable application of machine learning-based decision systems in the wild is one of the major challenges currently investigated by the field. A large portion of established approaches aims to detect erroneous predictions by means of assigning confidence scores. This confidence may be obtained by either quantifying the model's predictive uncertainty, learning explicit scoring functions, or assessing whether the input is in line with the training distribution. Curiously, while these approaches all state to address the same eventual goal of detecting failures of a classifier upon real-life application, they currently constitute largely separated research fields with individual evaluation protocols, which either exclude a substantial part of relevant methods or ignore large parts of relevant failure sources. In this work, we systematically reveal current pitfalls caused by these inconsistencies and derive requirements for a holistic and realistic evaluation of failure detection. To demonstrate the relevance of this unified perspective, we present a large-scale empirical study for the first time enabling benchmarking confidence scoring functions w.r.t all relevant methods and failure sources. The revelation of a simple softmax response baseline as the overall best performing method underlines the drastic shortcomings of current evaluation in the abundance of publicized research on confidence scoring.

Introduction: The Fragmentation of Failure Detection

In safety-critical domains like medical imaging and autonomous driving, a "silent failure"—where a model makes a confident but incorrect prediction—can have catastrophic consequences. To mitigate this, researchers have developed various failure detection methods. However, current research is fragmented into silos: Misclassification Detection (MisD) focuses on errors within the training distribution, Out-of-Distribution Detection (OoD-D) targets entirely new classes, and Selective Classification (SC) optimizes the trade-off between accuracy and data rejection.

Current fragmented research landscape vs. the proposed unified evaluation framework for failure detection.

Because these sub-fields use inconsistent metrics and narrow benchmarks, they rarely compete. A method labeled "state-of-the-art" (SOTA) in OoD-D might fail to detect a simple misclassification of a known object. This fragmentation obscures performance in realistic scenarios where multiple failure types occur simultaneously.

A Unified Evaluation Protocol

To address these pitfalls, we propose a unified evaluation protocol based on three core requirements:

  1. Holistic Assessment: Evaluating the classifier and the confidence scoring function (CSF) as a single symbiotic system. Some methods improve failure ranking but degrade the underlying classifier's accuracy—a trade-off only visible through holistic metrics.
  2. Diverse Failure Sources: Testing across a spectrum of shifts, including image corruptions, sub-class shifts (e.g., new breeds of a known species), and "near" vs. "far" out-of-distribution scenarios.
  3. Unified Metric: We advocate for the Area Under the Risk-Coverage Curve (AURC). AURC measures the average error rate as low-confidence predictions are filtered out, naturally rewarding both high classifier accuracy and effective failure ranking.

Experimental Setup: The FD-Shifts Benchmark

We introduce FD-Shifts, a large-scale study comparing various CSFs across CNN and Vision Transformer (ViT) architectures. The study utilizes a comprehensive suite of datasets to simulate real-world distribution shifts, including medical data (CAMELYON-17), wildlife monitoring (iWildCam), and sub-population shifts (BREEDS). We test on i.i.d. data, 15 types of image corruptions, and various OoD scenarios.

Results: The "Softmax Surprise"

The most striking finding is that the simple Maximum Softmax Response (MSR)—the highest probability output by a standard neural network—is remarkably difficult to beat. Many complex SOTA methods only appear superior when evaluated on narrow tasks like "far-OoD" detection. On more nuanced, realistic covariate shifts, they are consistently outperformed by simple softmax-based baselines.

Comprehensive benchmarking results (AURC) across various datasets, shifts, and architectures. Lower values indicate better performance.

Key Insights

  • Numerical Precision: We discovered that standard 32-bit floating-point precision causes rounding errors in the softmax operation that handicap the MSR baseline, particularly for high-accuracy models like ViTs. Utilizing 64-bit precision or temperature scaling "restores" MSR's competitive edge.
  • ViT Superiority: Vision Transformers generally outperform CNNs in failure detection. This is primarily due to their higher base accuracy, which leaves fewer errors to detect, rather than a superior ability to rank failures.
  • Metric Inconsistency: Rankings of "best" methods shift significantly when moving between metrics like AUROC and AURC, highlighting the necessity of our unified protocol.

Conclusion

Our study reveals that the current abundance of complex failure detection methods may be a byproduct of narrow evaluation practices. By adopting a unified, holistic perspective, we find that simple baselines like MSR are surprisingly robust. We have released our code and trained models at https://github.com/IML-DKFZ/fd-shifts to encourage more rigorous and realistic benchmarking in the field.

Summary updated

BibTeX
@inproceedings{jaeger2023call,
  author = {Paul F. Jaeger and Carsten T. Lüth and Lukas Klein and Till J. Bungert},
  title = {{A Call to Reflect on Evaluation Practices for Failure Detection in Image Classification}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=YnkGMIh0gvX},
}

Loading related content...

Figure