Organizations: Dept. of Biomedical Engineering and Informatics, Luddy School of Informatics, Computing, and Engineering, Indiana University Indianapolis, IN
Empiric antibiotic therapy for suspected ESBL-producing Enterobacteriaceae must be selected 48-72 hours before culture results, forcing clinicians to choose between undertreating resistant infections and overusing carbapenems that drive further resistance. We developed a cost-sensitive XGBoost model predicting an ESBL phenotype (resistance to ceftriaxone, ceftazidime, cefepime or piperacillin-tazobactam) at culture ordering using 45 pre-culture EHR features across 132,955 cultures from 72,217 patients at 12 hospitals (14.41% with the ESBL phenotype). Cultures were partitioned at the patient level. At 90% sensitivity, the model achieved 95.8% NPV, reducing post-test ESBL probability to 4.2%, a threshold that may support safe carbapenem-sparing in non-ICU settings, while sparing 307 of every 1,000 cultures an unnecessary broad-spectrum course at the cost of 14 missed ESBL cases per 1,000. SHAP analysis identified prior ESBL colonization as the dominant predictor, ahead of prior organism burden and neighborhood deprivation; removing deprivation features caused minimal performance loss (ΔAUROC=−0.020), enabling equitable bedside deployment. Discrimination was unchanged under a strict IDSA ESBL-E definition (AUROC 0.766), with specimen type added as a predictor (0.764) and without any class-imbalance correction (0.762), and ranged from 0.71 to 0.78 across organism strata.
Figures & tables
Characteristic
All
ESBL+
ESBL −
SMD
Characteristic
All
ESBL+
ESBL −
SMD
N (cultures)
132,955
19,159
113,796
–
Prior ESBL
16.6
40.4
12.5
+0.67
ESBL prevalence
14.41
100
0
–
Prior CRE
3.1
6.4
2.5
+0.19
Age ≥ 65
56.2
59.0
55.7
+0.07
Prior MRSA
3.2
6.1
2.7
+0.17
Male sex
24.2
36.2
22.2
+0.31
Prior VRE
2.4
5.9
1.8
+0.21
Inpatient
31.0
47.7
28.1
+0.41
No. prior orgs (median)
1
1
1
+0.31
Outpatient
46.0
32.9
48.2
− 0.32
Fluoroquinolone (90d)
11.8
20.9
10.2
+0.30
Table 1: Cohort characteristics overall and by ESBL-phenotype status (n = 132,955). ESBL+/ESBL − denote presence/absence of the ESBL phenotype. Values are % unless noted; SMD = standardized mean difference (SMD > 0.1 = meaningful imbalance). ADI is the median among geocoded cultures.
Figure 1: CONSORT/TRIPOD-style cohort selection flowchart. Starting from the ARMD-MGB repository (225,000+ patients, 12 hospitals, 2015-2024), cultures were filtered to Enterobacteriaceae with documented organism and AST results, yielding 132,955 analyzable cultures (14.41% ESBL-phenotype positive), partitioned at the patient level into derivation and held-out test sets.
Model
AUROC (95% CI)
AUPRC (95% CI)
Brier
Logistic Regression
0.730 (0.717–0.743)
0.383 (0.354–0.413)
0.197
Random Forest
0.740 (0.726–0.754)
0.403 (0.373–0.434)
0.194
XGBoost
0.760 (0.747–0.772)
0.430 (0.399–0.459)
0.175
XGBoost (tuned)
0.763 (0.750–0.775)
0.435 (0.405–0.465)
0.182
Table 2: Performance on the patient-disjoint test set (26,369 cultures, 14,475 patients; prevalence 13.74%). Cost-sensitive learning; patient-clustered bootstrap CIs; Brier for raw scores (tuned model recalibrates to 0.098).
Figure 2: Calibration reliability diagram (tuned XGBoost, n = 26,369). Platt-recalibrated probabilities (green) track the diagonal; raw cost-weighted scores (red) overestimate risk throughout.
Threshold
Calibrated p
Sens (%)
Spec (%)
PPV (%)
NPV (%)
Alert ( ≥ 90% Sens)
0.068
90.1
35.6
18.2
95.8
Balanced (max F 1 )
0.227
45.6
89.4
40.8
91.2
Conservative ( ≥ 80% Spec)
0.165
57.0
80.0
31.2
92.1
Table 3: Clinical operating points for tuned XGBoost on the patient-disjoint test set (n = 26,369). Cutoffs are on the Platt-recalibrated probability scale; the alert threshold mirrors the ≥ 90% susceptibility standard from institutional antibiograms.
Figure 3: SHAP beeswarm plot for the tuned XGBoost model (n = 2,000 held-out test samples). Each point represents one patient’s feature contribution to ESBL risk prediction. Prior ESBL colonization is the dominant predictor, followed by prior organism burden and Area Deprivation Index, with all remaining features ranking substantially lower.
Department of Intensive Care and Neonatology and Children’s Research Center, University of Zurich, University Children’s Hospital Zurich, Zurich, Switzerland · Department of Computer Science, ETH Zurich, Zurich, Switzerland
BioHealth Informatics Indiana University Indianapolis Indianapolis, USA · Department of Anesthesiology Indiana University School of Medicine Indianapolis, USA