Real-time machine learning model to predict in-hospital cardiac arrest using heart rate variability in ICU

Hyeonhoon Lee, Hyun-Lim Yang, Ho Geol Ryu, Chul-Woo Jung, Youn Joung Cho, Soo Bin Yoon, Hyun-Kyu Yoon, Hyung-Chul LeeNpj Digit. Medicine 2023

Abstract

In-hospital cardiac arrest (IHCA) remains a significant challenge in intensive care units (ICUs), with high mortality rates despite advanced monitoring. Traditional prediction models often rely on intermittent electronic medical record (EMR) data, leading to delayed warnings. This study presents a real-time machine learning model using only heart rate variability (HRV) data from continuous ECG monitoring. By analyzing 5-minute windows, the model predicts IHCA 0.5 to 24 hours in advance with high accuracy (AUROC 0.881), offering a portable and automated early warning system.

Introduction

In-hospital cardiac arrest (IHCA) occurs in up to 7.8% of ICU patients. Early detection is paramount for survival, yet current risk scores often suffer from "data lag" due to the intermittent nature of laboratory tests and vital sign recordings in EMRs. Conversely, continuous ECG monitoring is standard for all ICU patients. This research leverages this ubiquitous data stream, specifically heart rate variability (HRV), to develop a real-time, automated early warning system capable of identifying physiological deterioration before a catastrophic event occurs.

Methodology

The researchers developed a predictive model using the Light Gradient Boosting Machine (LGBM) algorithm. The process involved several sophisticated steps:

  • Signal Processing: ECG signals were downsampled to 250 Hz and filtered to isolate clean RR intervals.
  • Feature Engineering: 74 HRV measures (time-domain, frequency-domain, and nonlinear) were extracted from 5-minute epochs.
  • Feature Selection: The BorutaShap algorithm identified the 33 most predictive features, reducing noise and preventing overfitting.
  • Explainability: SHAP values were used to interpret the model's decisions, highlighting the importance of nonlinear dynamics like TINN (triangular interpolation of RR interval histogram).

Study Population and Data

The study utilized a retrospective cohort from Seoul National University Hospital (SNUH) covering patients admitted between March 2020 and August 2022.

Patient selection and data split flowchart for the development and validation sets.

As shown in the flowchart, after excluding patients under 18 or those with insufficient records, 4,821 patients (5,679 ICU stays) were analyzed. The data was split into a development set (80%) and a validation set (20%), maintaining an IHCA incidence rate of approximately 1.88%.

Results and Key Insights

The HRV-only model demonstrated robust performance across various lead times. The primary analysis focused on a prediction window of 0.5 to 24 hours before an event.

Performance metrics including ROC (a) and Precision-Recall (b) curves for different lead times.

Performance Metrics

  • AUROC: The model achieved an Area Under the Receiver Operating Characteristic curve of 0.881 (95% CI: 0.875–0.887), significantly outperforming traditional clinical parameter-based models (AUROC 0.735).
  • AUPRC: The Area Under the Precision-Recall Curve was 0.104. While seemingly low, this is a significant result given the extreme class imbalance inherent in cardiac arrest data.
  • Consistency: Performance remained stable across different ICU types (medical vs. surgical) and different monitoring hardware (Philips vs. GE).

Physiological Indicators

A key finding was the importance of nonlinear heart rate dynamics. Features like TINN and the HRV triangular index (HTI) were more sensitive indicators of autonomic nervous system failure than simple heart rate averages. The model identifies subtle shifts in these measures that begin up to 24 hours before the arrest.

Discussion and Limitations

The study proves that HRV data alone provides sufficient discriminative power for IHCA prediction, making the model highly portable as it does not require complex EMR integration. However, several limitations remain:

  • Generalizability: As a single-center study, multi-center validation is required.
  • Temporal Precision: The model predicts the likelihood of an event within a 24-hour window but cannot yet pinpoint the exact minute of onset.
  • Clinical Context: The impact of medical interventions (e.g., vasopressors) on HRV measures was not explicitly modeled.

Future work will focus on developing "survival models" to provide specific time-to-event estimates and validating the system in diverse clinical environments.

Summary updated

BibTeX
@article{lee2023real,
  author = {Hyeonhoon Lee and Hyun-Lim Yang and Ho Geol Ryu and Chul-Woo Jung and Youn Joung Cho and Soo Bin Yoon and Hyun-Kyu Yoon and Hyung-Chul Lee},
  title = {{Real-time machine learning model to predict in-hospital cardiac arrest using heart rate variability in ICU}},
  journal = {Npj Digit. Medicine},
  year = {2023},
  doi = {10.1038/s41746-023-00960-2},
}
Figure