Bayesian Modelling in Practice: Using Uncertainty to Improve Trustworthiness in Medical Applications

David Ruhe, Giovanni Ciná, Michele Tonutti, Daan de Bruin, Paul W. G. Elbers

Introduction

In high-stakes environments like the Intensive Care Unit (ICU), a machine learning model’s "best guess" is often insufficient. If a model predicts a low risk of mortality but is secretly uncertain, clinical reliance on that prediction could be catastrophic. This research explores how Bayesian Neural Networks (BNNs) can move beyond simple point estimates to create "trustworthy" AI that explicitly flags when it is out of its depth.

Methodology

The study employs BNNs trained using the Bayes By Backprop (BBB) algorithm. Unlike standard neural networks with fixed weights, BNNs treat weights as probability distributions. By sampling from these distributions multiple times, the model generates a range of predictions; high variance among these samples indicates high predictive uncertainty.

A core innovation is the derivation of analytical bounds showing that binary cross-entropy loss is mathematically bounded by predictive uncertainty. This theoretical framework ensures that low uncertainty correlates with a guaranteed limit on how wrong the model can be, provided the model is well-calibrated.

Analytical bound demonstrating that prediction loss is constrained by uncertainty.

Experimental Setup

The researchers utilized the MIMIC-III database, comprising over 46,000 adult ICU admissions. To test out-of-domain (OOD) detection, 7,821 newborn records were specifically excluded from the training set. Given that newborn physiology differs vastly from adults, they served as a perfect test case to see if the model would correctly flag unfamiliar data as "unknown."

Key Insights

  1. The "Moon" Relationship: The relationship between predicted risk (0% to 100% mortality) and uncertainty forms a crescent shape. The model only makes extreme predictions (very likely to live or die) when its uncertainty is near zero. In the mid-range (50/50 risk), uncertainty is naturally higher.
  2. Uncertainty as a Loss Predictor: Uncertainty serves as a direct proxy for error probability. The most uncertain 20% of patients accounted for 20 times more loss than the most certain 20%.
  3. Identifying Bias and OOD Data: When presented with underrepresented ethnic minorities, the BNN’s uncertainty jumped by 130%. Similarly, for the newborn OOD dataset, uncertainty was 230% higher on average than for the adult test set.
The "Moon Plot" of risk vs. uncertainty (a) and the distribution of uncertainty for adult vs. newborn data (b).

Results and Performance

The BNN demonstrated superior calibration. For the 20% of patients where the model was most certain, the AUROC approached 1.0, meaning the model was nearly perfect when it claimed to be sure. Furthermore, the uncertainty generated by the BNN could be used to calibrate other architectures, such as Gradient Boosting models, suggesting that a BNN could act as a universal "safety sensor."

Conclusion

Bayesian methods provide a critical "safety valve" for clinical AI. By quantifying "what the model doesn't know," these systems can prevent silent failures on unfamiliar patients and build the trust necessary for real-world medical integration. Future work will focus on reducing the computational cost of sampling and refining variational approximations to ensure these bounds remain robust in all clinical scenarios.

Summary updated

BibTeX
@misc{ruhe2019bayesian,
  author = {David Ruhe and Giovanni Ciná and Michele Tonutti and Daan de Bruin and Paul W. G. Elbers},
  title = {{Bayesian Modelling in Practice: Using Uncertainty to Improve Trustworthiness in Medical Applications}},
  year = {2019},
  eprint = {1906.08619},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.08619},
}
Figure