Deep learning model for personalized prediction of positive MRSA culture using time-series electronic health records

Masayuki Nigo, Laila Rasmy, Bingyu Mao, Bijun S. Kannadath, Ziqian Xie, Degui ZhiNature Communications 2024

Abstract

Methicillin-resistant Staphylococcus aureus (MRSA) poses significant morbidity and mortality in hospitals. Rapid, accurate risk stratification of MRSA is crucial for optimizing antibiotic therapy. Our study introduced a deep learning model, PyTorch_EHR, which leverages electronic health record (EHR) time-series data, including wide-variety patient specific data, to predict MRSA culture positivity within two weeks. 8,164 MRSA and 22,393 non-MRSA patient events from Memorial Hermann Hospital System (MHHS), Houston, Texas are used for model development. PyTorch_EHR outperforms logistic regression (LR) and light gradient boost machine (LGBM) models in accuracy (AUROC<sup>PyTorch_EHR</sup> = 0.911, AUROC<sup>LR</sup> = 0.857, AUROC<sup>LGBM</sup> = 0.892). External validation with 393,713 patient events from the Medical Information Mart for Intensive Care (MIMIC)-IV dataset in Boston confirms its superior accuracy (AUROC<sup>PyTorch_EHR</sup> = 0.859, AUROC<sup>LR</sup> = 0.816, AUROC<sup>LGBM</sup> = 0.838). Our model effectively stratifies patients into high-, medium-, and low-risk categories, potentially optimizing antimicrobial therapy and reducing unnecessary MRSA-specific antimicrobials. This highlights the advantage of deep learning models in predicting MRSA positive cultures, surpassing traditional machine learning models and supporting clinicians' judgments.

Introduction

Methicillin-resistant Staphylococcus aureus (MRSA) is a primary driver of hospital-acquired infections, often resulting in severe clinical outcomes. Due to its resistance to standard beta-lactam antibiotics, clinicians frequently resort to empiric treatments—prescribing potent antibiotics like vancomycin—while awaiting culture results. However, the absolute benefit of this "just in case" approach is estimated to be as low as 0.1%. Over-prescription not only risks toxic side effects, such as acute kidney injury, but also accelerates the development of antimicrobial resistance. Existing risk-stratification tools often rely on static clinical snapshots, failing to account for the complex, longitudinal history documented in a patient's electronic health record (EHR).

Methods

We developed PyTorch_EHR, a deep learning framework utilizing Gated Recurrent Units (GRU), a type of Recurrent Neural Network (RNN) specifically designed for sequential data. Unlike traditional models that treat hospital encounters as independent events, the GRU architecture maintains a "memory" of the sequence and timing of clinical events, capturing the patient's health trajectory.

Workflow of the PyTorch_EHR model for predicting MRSA culture positivity over a two-week window.

The model integrates diverse time-series data, including demographics, admission details, diagnostic codes, and historical antibiotic exposure. Categorical medical codes are processed through embedding layers that map them into a continuous vector space, enabling the model to identify latent relationships between clinical events. PyTorch_EHR was benchmarked against static models, including Logistic Regression (LR) and Light Gradient Boosted Machine (LGBM), using two large datasets: the internal Memorial Hermann Hospital System (MHHS) dataset and the external MIMIC-IV dataset for validation of generalizability.

Results and Clinical Impact

PyTorch_EHR consistently outperformed traditional models across both datasets. In the MHHS development cohort, the model achieved an AUROC of 0.911, significantly higher than LR (0.857) and LGBM (0.892). This performance was robustly maintained in external validation (AUROC 0.859), indicating that the model successfully learned generalizable clinical patterns rather than overfitting to local data.

Cumulative incidence of positive MRSA cultures in the MHHS dataset, stratified by model-predicted risk levels.

A critical finding is the model's high Negative Predictive Value (NPV) of over 98%. This metric is vital for antibiotic stewardship; if the model classifies a patient as "low risk," clinicians can withhold MRSA-specific antibiotics with high confidence. In the MHHS low-risk group alone, the model identified 7,949 doses of MRSA-specific antibiotics that were administered to patients who ultimately tested negative, highlighting a significant opportunity for reducing unnecessary drug exposure.

Discussion

By looking ahead two weeks rather than just predicting current status, PyTorch_EHR aligns with the clinical reality of hospital admissions where infections may manifest shortly after arrival. While the model currently relies on categorical codes, future iterations could incorporate numerical vitals and laboratory results to further enhance accuracy. Furthermore, while the model predicts the presence of MRSA (colonization), future work will focus on distinguishing between colonization and active infection. Prospective clinical trials are necessary to evaluate how real-time model suggestions influence physician decision-making and patient outcomes.

Summary updated

BibTeX
@inproceedings{nigo2024deep,
  author = {Masayuki Nigo and Laila Rasmy and Bingyu Mao and Bijun S. Kannadath and Ziqian Xie and Degui Zhi},
  title = {{Deep learning model for personalized prediction of positive MRSA culture using time-series electronic health records}},
  booktitle = {Nature Communications},
  year = {2024},
  doi = {10.1038/s41467-024-46211-0},
}
Figure