Detecting and Mitigating Test-time Failure Risks via Model-agnostic Uncertainty Learning

Preethi Lahoti, Krishna P. Gummadi, Gerhard Weikum

Abstract

Reliably predicting potential failure risks of machine learning (ML) systems when deployed with production data is a crucial aspect of trustworthy AI. This paper introduces Risk Advisor, a novel post-hoc meta-learner for estimating failure risks and predictive uncertainties of any already-trained black-box classification model. In addition to providing a risk score, the Risk Advisor decomposes the uncertainty estimates into aleatoric and epistemic uncertainty components, thus giving informative insights into the sources of uncertainty inducing the failures. Consequently, Risk Advisor can distinguish between failures caused by data variability, data shifts and model limitations and advise on mitigation actions (e.g., collecting more data to counter data shift). Extensive experiments on various families of black-box classification models and on real-world and synthetic datasets covering common ML failure scenarios show that the Risk Advisor reliably predicts deployment-time failure risks in all the scenarios, and outperforms strong baselines.

Introduction: The Problem of Silent Failures

Machine learning models often suffer from "silent failures," where a classifier makes an incorrect prediction with dangerously high confidence. Standard metrics like Maximum Class Probability (MCP) are frequently overconfident and fail to explain why a model is uncertain. For instance, a neural network might classify a digit incorrectly while reporting over 90% confidence, providing no signal to the end-user that the prediction should be disregarded.

Examples of silent failures where models provide high-confidence incorrect predictions across MNIST and Fashion MNIST datasets.

To build trustworthy AI, we need tools that can distinguish between different sources of failure: inherent data ambiguity (aleatoric uncertainty), distribution shifts (epistemic uncertainty), or inherent model limitations. Existing post-hoc methods like "Trust Score" provide a single value but offer no guidance on how to mitigate the specific type of risk encountered.

Methodology: The Risk Advisor Framework

Risk Advisor is a model-agnostic "meta-learner" designed to predict when a black-box classifier is likely to fail. It treats the base classifier as a black box and requires no changes to its architecture.

1. The Meta-Learner

The system trains an ensemble of $M$ Stochastic Gradient Boosted Trees (E-SGBT) to predict the errors of the base classifier. The meta-learner maps input features to a binary variable $Z$, where $Z=1$ indicates a base model failure and $Z=0$ indicates a correct prediction. Crucially, the meta-learner inherits the "blind spots" of the base model because it is trained on the same data distribution.

2. Uncertainty Decomposition

Drawing on information theory and Fano’s Inequality, Risk Advisor calculates three distinct scores:

  • Model Uncertainty: The meta-learner’s predicted probability of base model failure.
  • Aleatoric Uncertainty: The average entropy across the ensemble, capturing inherent noise or ambiguity in the data.
  • Epistemic Uncertainty: Calculated as the Mutual Information (total entropy minus aleatoric entropy), flagging when the ensemble disagrees because the input is far from the training distribution.

Experimental Evaluation

The researchers evaluated Risk Advisor across synthetic benchmarks (Two-circles, Two-moons) and high-dimensional image datasets (MNIST, CIFAR-10), as well as mission-critical datasets like Census Income and Heart Disease distribution shifts.

Key Results

  • Superior Failure Prediction: Risk Advisor consistently outperformed baselines like Trust Score. In AUROC for failure detection, it achieved 0.80 on CIFAR-10 compared to 0.64 for standard baselines.
  • Effective Selective Abstention: Using the Risk Score to reject uncertain predictions significantly improved the accuracy of the remaining samples.
  • Out-of-Distribution (OOD) Detection: The epistemic uncertainty component proved to be a powerful detector for OOD data, outperforming softmax confidence which often remains high for unfamiliar inputs.
  • Actionable Mitigation: By separating uncertainty types, the system enables specific interventions. High epistemic uncertainty suggests the need for more data (active learning), while high aleatoric uncertainty suggests the task requires human intervention (selective abstention).

Conclusion

Risk Advisor provides a robust, post-hoc solution for monitoring black-box models in production. By decomposing uncertainty into actionable components, it moves beyond simple error detection to provide a roadmap for model improvement and safe deployment. While it requires access to the original training features, its model-agnostic nature makes it a versatile tool for enhancing the reliability of modern ML systems.

Summary updated

BibTeX
@inproceedings{lahoti2021detecting,
  author = {Preethi Lahoti and Krishna P. Gummadi and Gerhard Weikum},
  title = {{Detecting and Mitigating Test-time Failure Risks via Model-agnostic Uncertainty Learning}},
  booktitle = {ICDM},
  year = {2021},
  url = {https://openreview.net/forum?id=fL0KtOnH9M},
}
Figure