Zing Forum

Reading

ResPredAI: Using Machine Learning to Predict Antibiotic Resistance in Gram-Negative Bloodstream Infections

ResPredAI is an open-source machine learning framework that can predict antibiotic resistance in Gram-negative bloodstream infections based on patients' clinical data and MALDI-TOF pathogen identification results, providing clinicians with timely medication guidance.

机器学习抗生素耐药性血流感染革兰氏阴性菌临床决策支持医疗AI精准医疗
Published 2026-06-16 19:14Recent activity 2026-06-16 19:19Estimated read 7 min
ResPredAI: Using Machine Learning to Predict Antibiotic Resistance in Gram-Negative Bloodstream Infections
1

Section 01

ResPredAI: ML Framework for Predicting Antibiotic Resistance in Gram-Negative Bloodstream Infections

ResPredAI is an open-source machine learning framework that predicts antibiotic resistance of Gram-negative bloodstream infection (GN-BSI) based on patient clinical data and MALDI-TOF pathogen identification results. It aims to provide timely guidance for clinicians in empirical antibiotic selection, addressing the critical gap between pathogen identification and traditional antimicrobial susceptibility test results. Key info: Published in npj Digit. Med. 2025, maintained by Ettore Rocchi, source on GitHub (https://github.com/EttoreRocchi/ResPredAI) and project website (https://ettorerocchi.github.io/respredai-website/).

2

Section 02

Clinical Challenges of Antibiotic Resistance in GN-BSI

GN-BSI is a severe hospital-acquired infection with high morbidity and mortality. Timely and correct empirical antibiotic treatment is crucial—delays of over 12 hours increase the risk of death. However, traditional antimicrobial susceptibility tests take 48-72 hours, forcing clinicians to use empirical treatment: a too-narrow spectrum may fail, while a too-broad spectrum accelerates resistance and adverse effects. The key problem is predicting resistance patterns between pathogen identification and antimicrobial susceptibility test results.

3

Section 03

ResPredAI Overview & Target Antibiotic Categories

ResPredAI is a reproducible ML framework predicting resistance to 4 common antibiotics: Fluoroquinolones, 3rd generation cephalosporins, β-lactam/β-lactamase inhibitors (BL/BLI), Carbapenems. It's based on a 2025 study with 2552 GN-BSI patient data.

4

Section 04

Core Technology & Model Performance Metrics

Tech Architecture: Uses nested cross-validation for robust evaluation. Supports multiple models: Logistic Regression (interpretable), Random Forest (nonlinear), XGBoost (structured data), CatBoost (category-friendly), TabPFN (Transformer-based, optional).

Key Predictors: Positive rectal swab (strongest for carbapenem/fluoroquinolone/BL/BLI resistance), bacterial species (Klebsiella pneumoniae linked to resistance; E. coli/Proteus spp. often carbapenem-sensitive), patient clinical features (comorbidities, infection severity, prior antibiotic exposure).

Performance: 10-fold external CV results:

Antibiotic AUROC F1 (Resistant) False Negative Rate
Carbapenems 0.921±0.013 0.626 0.035
BL/BLI 0.786±0.033 0.560 0.156
3rd Gen Cephalosporins 0.737±0.022 - 0.262
Fluoroquinolones 0.732±0.029 0.639 0.341

Notably, carbapenem resistance prediction has best AUROC (0.921) and low false negative rate (3.5%).

5

Section 05

How to Use ResPredAI: Installation & Features

Installation:

  • PyPI: pip install respredai
  • Source: git clone https://github.com/EttoreRocchi/ResPredAI.git && cd ResPredAI && pip install -e ".[dev]"

Configuration: Use INI file (e.g., data path, models, folds).

Advanced Features: Probability calibration (sigmoid/isotonic), threshold optimization (Youden index/F1/cost-sensitive), uncertainty quantification (conformal prediction), subgroup analysis (ward/gender), temporal validation (prospective simulation).

6

Section 06

Clinical Value & Application Scenarios

Optimize Empirical Treatment: After MALDI-TOF identification (12 hours post blood culture positivity), ResPredAI provides resistance risk information to help: identify high-risk patients needing antibiotic escalation, avoid overusing broad-spectrum antibiotics for low-risk cases, and make informed decisions while waiting for antimicrobial susceptibility test results.

Complement Rapid Tests: Supplements genotypic tests (which can't explain phenotype expression, have limitations in non-fermenters like Pseudomonas aeruginosa).

Support Antibiotic Stewardship: Helps centers without 24/7 microbiologist/infectious disease expert access, implement precise stewardship, reduce unnecessary broad-spectrum use.

7

Section 07

Limitations & Future Directions

Limitations: 1. Regional specificity (trained on Italian single-center data; needs local validation in other epidemiological settings). 2. Time drift (resistance patterns change over time; model needs regular updates).3. Data dependency (relies on accurate MALDI-TOF and complete clinical data).

Future: Open-source workflow encourages other institutions to validate with local data; aim to improve model adaptability and maintain accuracy over time.