Machine learning models to identify patient and microbial genetic factors associated with carbapenem-resistant Klebsiella pneumoniae infection

Zena Lapp, Jennifer Han, Jenna Wiens, Ellie J. C. Goldstein, Ebbing Lautenbach, Evan S. SnitkinmedRxiv 2020 · DOI

Abstract

Background: Among patients colonized with carbapenem-resistant Klebsiella pneumoniae (CRKP), only a subset develop clinical infection. While patient characteristics may influence risk for infection, it remains unclear if the genetic background of CRKP strains contributes to this risk. We applied machine learning to quantify the capacity of patient characteristics and microbial genotypes to discriminate infection and colonization, and identified patient and microbial features associated with infection across multiple healthcare facilities.

Methods: Machine learning models were built using whole-genome sequences and clinical metadata from 331 patients colonized or infected with CRKP across 21 long-term acute care hospitals. To quantify variation in performance, we built models using 100 different train/test splits of the entire dataset, and urinary and respiratory site-specific subsets, and evaluated predictive performance on each test split using the area under the receiver operating characteristics curve (AUROC). Patient and microbial features predictive of infection were identified as those consistently important for predicting infection based on average change in AUROC when included in the model.

Findings: We found that patient and genomic features were only weakly predictive of clinical CRKP infection vs. colonization (AUROC IQRs: patient=0·59-0·68, genomic=0·55-0·61, combined=0·62-0·68), and that one feature set did not consistently outperform the other (genomic vs. patient p=0·4). Comparable model performances were observed for anatomic site-specific models (combined AUROC IQRs: respiratory=0·61-0·71, urinary=0·54-0·64). Strong genomic predictors of infection included the presence of the ICEKp10 mobile genetic element carrying an iron acquisition system (yersiniabactin) and a toxin (colibactin), along with disruption of an O-antigen biosynthetic gene in a sub-lineage of the epidemic ST258 clone. Teasing apart sequential evolutionary steps in the context of clinical metadata indicated that altered O-antigen biosynthesis increased association with the respiratory tract, and subsequent acquisition of ICEKp10 was associated with increased virulence.

Interpretation: Our results support the need for rigorous machine learning frameworks to gain realistic estimates of the performance of clinical models of infection. Moreover, integrating microbial genomic and clinical data using such a framework can help tease apart the contribution of microbial genetic variation to clinical outcomes.

Introduction

Carbapenem-resistant Klebsiella pneumoniae (CRKP) is a "critical-priority" pathogen that poses a severe threat in healthcare settings, particularly long-term acute care hospitals (LTACHs). While many patients become "colonized" with CRKP—carrying the bacteria without immediate symptoms—a subset develops life-threatening clinical infections. Determining whether this transition is driven by host health (patient factors) or specific bacterial genetic "weapons" (microbial factors) is a central challenge in infectious disease research. This study employs a rigorous machine learning framework to evaluate these factors across 21 healthcare facilities.

Methods

The researchers utilized a prospective dataset of 331 CRKP isolates, primarily from the dominant ST258 lineage, collected over one year. To distinguish between colonization and infection, they employed L2 regularized logistic regression.

A key strength of this study is its validation strategy. To prevent models from simply "memorizing" hospital-specific patterns, the team used facility-aware splitting, where 100 different train/test splits ensured that all data from a specific hospital remained together. They compared four feature sets: patient clinical variables (e.g., comorbidities, device use), uncurated genomic variants (SNPs/indels), uncurated grouped genomic variants (gene-level burden), and curated genomic features (known virulence/resistance genes).

Results

Predictive Performance

The study found that neither patient characteristics nor microbial genetics were highly predictive of clinical infection on their own. The Area Under the Receiver Operating Characteristic curve (AUROC) values were modest across all models, suggesting that the transition from colonization to infection is a complex, likely stochastic process.

Figure 1: Model performance (AUROC) across different feature sets and anatomic sites, showing modest and variable predictive power.

As shown in Figure 1, the combined models (patient + genomic) achieved a median AUROC of 0.62–0.68. Notably, model performance varied significantly depending on which hospitals were included in the test set, highlighting the impact of facility-level heterogeneity.

Key Predictors and Evolutionary Insights

Despite the modest overall accuracy, specific features emerged as consistent predictors. Strong clinical predictors included the presence of indwelling devices (e.g., central catheters), kidney disease, and length of hospital stay.

On the genomic side, the most significant finding involved a specific evolutionary trajectory within the ST258 lineage. The models identified the disruption of the kfoC gene (involved in O-antigen biosynthesis) and the acquisition of the ICEKp10 mobile genetic element as critical factors.

Figure 2: Phylogeny of ST258 isolates mapping the sequential acquisition of respiratory adaptation (kfoC disruption) and virulence factors (ICEKp10).

Phylogenetic analysis (Figure 2) revealed that kfoC disruption likely occurred first, aiding the bacteria's adaptation to the respiratory tract. Following this niche adaptation, the bacteria acquired ICEKp10—which carries the yersiniabactin iron acquisition system and the colibactin toxin—significantly increasing the risk of clinical infection.

Discussion and Conclusion

The results emphasize the need for rigorous, multi-center validation when developing clinical predictive models. The modest AUROC values suggest that predicting infection from a single snapshot of genomic and clinical data is inherently difficult. However, the integration of these data types allowed the researchers to tease apart a specific evolutionary path to virulence in the ST258 lineage.

While these models are not yet ready for bedside clinical use, they provide a foundation for future work. Future research should focus on larger cohorts and functional studies to confirm if the identified genetic changes, such as kfoC disruption, are causal drivers of infection or merely markers of successful bacterial lineages.

Summary updated

Abstract

Abstract Background Among patients colonized with carbapenem-resistant Klebsiella pneumoniae (CRKP), only a subset develop clinical infection. While patient characteristics may influence risk for infection, it remains unclear if the genetic background of CRKP strains contributes to this risk. We applied machine learning to quantify the capacity of patient characteristics and microbial genotypes to discriminate infection and colonization, and identified patient and microbial features associated with infection across multiple healthcare facilities. Methods Machine learning models were built using whole-genome sequences and clinical metadata from 331 patients colonized or infected with CRKP across 21 long-term acute care hospitals. To quantify variation in performance, we built models using 100 different train/test splits of the entire dataset, and urinary and respiratory site-specific subsets, and evaluated predictive performance on each test split using the area under the receiver operating characteristics curve (AUROC). Patient and microbial features predictive of infection were identified as those consistently important for predicting infection based on average change in AUROC when included in the model. Findings We found that patient and genomic features were only weakly predictive of clinical CRKP infection vs. colonization (AUROC IQRs: patient=0·59-0·68, genomic=0·55-0·61, combined=0·62-0·68), and that one feature set did not consistently outperform the other (genomic vs. patient p=0·4). Comparable model performances were observed for anatomic site-specific models (combined AUROC IQRs: respiratory=0·61-0·71, urinary=0·54-0·64). Strong genomic predictors of infection included the presence of the ICEKp10 mobile genetic element carrying an iron acquisition system (yersiniabactin) and a toxin (colibactin), along with disruption of an O-antigen biosynthetic gene in a sub-lineage of the epidemic ST258 clone. Teasing apart sequential evolutionary steps in the context of clinical metadata indicated that altered O-antigen biosynthesis increased association with the respiratory tract, and subsequent acquisition of ICEKp10 was associated with increased virulence. Interpretation Our results support the need for rigorous machine learning frameworks to gain realistic estimates of the performance of clinical models of infection. Moreover, integrating microbial genomic and clinical data using such a framework can help tease apart the contribution of microbial genetic variation to clinical outcomes. Funding Centers for Disease Control and Prevention, National Institutes of Health, National Science Foundation Research in context Evidence before this study We searched PubMed for “crkp” OR “carbapenem resistant klebsiella pneumoniae” AND “infection” AND “machine learning” for papers published up to April 14, 2020 and found no results. Substituting “machine learning” with “bacterial genome-wide association studies” produced one relevant paper investigating pathogenicity-associated loci in K. pneumoniae clinical isolates. When we searched for “infection” AND “machine learning” AND “genom*” AND “clinical”, there was one relevant result - a study that used clinical and bacterial genomic features in a machine learning model to identify clonal differences related to Staphylococcus aureus infection outcome. Added value of this study To our knowledge, this is the first study to integrate clinical and genomic data to study anatomic site-specific colonization and infection across multiple healthcare facilities. Using this method, we identified clinical features associated with CRKP infection, as well as a sub-lineage of CRKP with potentially altered niche-specific adaptation and virulence. This method could be used for other organisms and other clinical outcomes to evaluate performance of predictive models and identify features that are consistently associated with clinical outcomes of interest across facilities or geographic regions. Implications of all the available evidence Few studies have combined patient and microbial genomic data to study important clinical outcomes. However, those that have done this, including ours, have identified clinical and/or genomic features associated with the outcome of interest that provide a foundation for future epidemiological, clinical, and biological studies to better understand bacterial infections and clinical outcomes.
BibTeX
@misc{lapp2020machine,
  author = {Zena Lapp and Jennifer Han and Jenna Wiens and Ellie J. C. Goldstein and Ebbing Lautenbach and Evan S. Snitkin},
  title = {{Machine learning models to identify patient and microbial genetic factors associated with carbapenem-resistant <i>Klebsiella pneumoniae</i> infection}},
  year = {2020},
  doi = {10.1101/2020.07.06.20147306},
  howpublished = {medRxiv},
}
Figure