Bayesian LSTMs in medicine

Jos van der Westhuizen, Joan LasenbyarXiv 2017

Abstract

This paper investigates the application of Bayesian principles to Long Short-Term Memory (LSTM) networks in clinical settings. By utilizing Monte Carlo (MC) dropout during inference, the authors transform standard LSTMs into Bayesian models capable of providing quantifiable uncertainty measures. Results across five datasets, including ECG and heart sound recordings, demonstrate that Bayesian LSTMs not only improve classification accuracy but also identify ambiguous cases for human review, addressing the critical need for reliable AI in healthcare.

Introduction

In medical diagnostics, the cost of a false positive or false negative can be life-altering. While deep learning models like LSTMs have shown immense promise in processing temporal medical data, they are often "overconfident" black boxes. Standard softmax outputs provide relative probabilities but fail to capture model uncertainty—the degree to which the model is unsure because it hasn't encountered similar data before. This paper proposes a practical Bayesian approach to provide clinicians with a "confidence score" alongside every prediction.

Methodology: Monte Carlo Dropout

The authors employ Monte Carlo (MC) Dropout as a computationally efficient approximation for Bayesian inference. Unlike standard dropout, which is disabled during testing, MC dropout remains active during inference. By performing multiple forward passes (100 in this study) for a single input, the model generates a distribution of outputs. The variance of these outputs serves as a proxy for epistemic uncertainty.

Comparison of output value distributions between Naive and Variational dropout across hidden layers.

The study compares two implementations: Naive Dropout, which changes the dropout mask at every time step, and Variational Dropout, which keeps the mask consistent across a sequence. While Variational Dropout is theoretically more robust, the authors found that Naive Dropout still converges effectively and provides actionable uncertainty metrics, likely due to the inherent memory characteristics of LSTMs.

Experimental Setup and Datasets

The approach was validated across five diverse datasets to ensure generalizability:

  • MIT-BIH Arrhythmia: ECG recordings for heartbeat classification.
  • Physionet 2016: Heart sound recordings (phonocardiograms) for abnormality detection.
  • Neonatal Intensive Care Unit (NICU): Multimodal vital signs (ECG, BP, SpO2) for infant health monitoring.
  • Traumatic Brain Injury (TBI): Longitudinal physiological variables recorded over several days.
  • MNIST: A standard handwritten digit baseline.

Results and Clinical Utility

Across all medical datasets, the Bayesian LSTM consistently outperformed standard LSTMs in raw classification accuracy. For instance, accuracy on the Physionet heart sound dataset rose from 0.778 to 0.798. More importantly, the model successfully quantified uncertainty in noisy or ambiguous signals.

Model predictions and uncertainty scores across MIT-BIH, Physionet, MNIST, NICU, and TBI datasets.

As shown in the results, the model can flag segments with high uncertainty (e.g., noisy heart sounds or atypical ECG patterns). In the Physionet challenge, the authors utilized a standard deviation threshold (0.13) to classify signals as "noisy," allowing the system to defer to human expertise when the model's confidence was low.

Discussion and Conclusion

Bayesian LSTMs offer a dual benefit: they act as an ensemble to improve predictive accuracy and provide a safety mechanism through uncertainty quantification. While the computational cost is higher due to multiple forward passes, the process is highly parallelizable. Future research aims to incorporate aleatoric uncertainty to better account for inherent noise in medical observations, further bridging the gap between deep learning research and safe clinical deployment.

Summary updated

BibTeX
@misc{westhuizen2017bayesian,
  author = {Jos van der Westhuizen and Joan Lasenby},
  title = {{Bayesian LSTMs in medicine}},
  year = {2017},
  eprint = {1706.01242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.01242},
}
Figure