Optimising antibiotic switching via forecasting of patient physiology

Magnus Ross, Nel Swanepoel, Akish Luintel, Emma McGuire, Ingemar J. Cox, Steve Harris, Vasileios LamposarXiv 2026

TL;DR

In hospital settings, delaying the switch from intravenous (IV) to oral antibiotics prolongs patient stays and increases infection risks. Instead of training AI to mimic historically delayed clinical decisions, this paper introduces a system that forecasts patient vital signs using Neural Processes and evaluates those forecasts against clinical guidelines. The resulting system successfully prioritizes "switch-ready" patients for review, identifying 2.2–3.2× more relevant candidates than random selection while remaining fully adaptable to changing medical guidelines without retraining.

What Problem Does This Paper Address?

The timely transition from intravenous (IV) to oral antibiotic therapy—known as the IV-to-oral switch (IVOS)—is a cornerstone of hospital antibiotic stewardship. Done correctly, it reduces catheter-related bloodstream infections, shortens hospital stays, and lowers healthcare costs. Despite these clear benefits, roughly one in five patients in England remain on IV antibiotics even after meeting the criteria to switch, often because busy clinical teams miss the window for review.

While Clinical Decision Support Systems (CDSSs) can help, existing machine learning approaches suffer from a fundamental flaw: they are trained on historical Electronic Health Record (EHR) data to predict when a clinician will make the switch. Because routine clinical practice is plagued by delays and inconsistencies, these models simply learn to replicate suboptimal human behavior. They cannot improve practice against an objective clinical standard.

Methods

To bypass the trap of learning bad historical habits, the authors flip the problem on its head: forecast patient physiology, not clinical actions.

The proposed architecture consists of a two-step pipeline:

  1. Probabilistic Forecasting: The system uses Convolutional Conditional Neural Processes (ConvCNPs) to model and predict five key vital signs: heart rate, respiratory rate, oxygen saturation ($\text{SpO}_2$), systolic blood pressure, and temperature over a 12-hour future window. Neural Processes are uniquely suited for this because they naturally handle the irregular sampling intervals and missing data inherent to EHRs, while providing a full probability distribution (uncertainty estimation) rather than a single point estimate.
  2. Guideline Application: Instead of outputting a black-box decision, the system passes the forecasted vital sign distributions through standard, transparent clinical guidelines. A patient is flagged as "switch-ready" if their predicted vitals have a high probability of remaining within normal ranges.
Figure 1: The proposed AI-enabled IVOS system. A) Training a probabilistic neural process model to forecast patient trajectories. B) Using the trained model to generate likely trajectories over the following day and applying clinical criteria to determine the proportion of samples ready to be switched. C) Presentation of switch-readiness probabilities as a ranked list of patients for review.

Because outliers and measurement errors in EHR data can cause standard Neural Processes to overestimate uncertainty (leading to underconfident predictions), the authors also introduced an NP-tuned variant. This version appends a classification head to the frozen forecasting layers to output well-calibrated switch probabilities.

Datasets

The model was rigorously validated across two distinct, large-scale EHR datasets representing different countries, clinical environments, and monitoring intensities:

  • MIMIC-IV (v3.1): A publicly available dataset containing intensive care unit (ICU) admissions from Boston, USA. The evaluation cohort included 6,333 encounters, characterized by highly unwell patients and high-frequency vital sign monitoring.
  • UCLH: A non-public dataset from University College London Hospitals, UK, representing a general hospital group. This cohort included 10,584 encounters with lower monitoring frequencies.

Both datasets were split temporally to prevent look-ahead bias and simulate a realistic deployment scenario.

Key Insights and Ideas

  • Decoupling Forecasting from Logic: By separating the physiological forecasting from the clinical decision logic, the system gains immense flexibility. If a hospital updates its IVOS guidelines, the thresholds can be adjusted instantly in the software without retraining the underlying deep learning model.
  • Handling Non-Standard Contexts: This separation also allows clinicians to easily override or discount specific variables on a case-by-case basis. For instance, if a patient is on mechanical ventilation, their respiratory rate is artificially controlled; a clinician can simply exclude respiratory rate from the switch-readiness calculation without breaking the model.
  • Built-in Explainability: Instead of trusting a opaque risk score, clinicians can directly inspect the predicted vital sign trajectories and the model's confidence intervals, making the tool highly interpretable and trustworthy at the bedside.

Key Results

The Neural Process (NP) models consistently outperformed standard baselines, including Gradient Boosted Decision Trees (GBDT) and simple repeat baselines, in point forecasting accuracy across almost all vital signs.

Forecasting performance (MAE) on MIMIC data across different time horizons.

When evaluated on its primary task—ranking patients by their readiness to switch—the system demonstrated strong clinical utility:

  • AUROC Performance: The models achieved high discriminative performance, with AUROC scores reaching 0.867 on the UCLH dataset and 0.882 on the MIMIC dataset.
  • Clinical Efficiency (Precision@5): In a simulated daily deployment, the NP model selected 2.2× more relevant patients than random selection for general wards (UCLH) and 3.2× more relevant patients in the ICU environment (MIMIC). This effectively filters out stable patients, allowing antimicrobial stewardship teams to focus their limited time on the patients most likely to benefit from a review.

Limitations and Future Work

  • Retrospective Evaluation: The primary limitation is the lack of prospective clinical trials. While the model accurately ranks patients retrospectively, future work must evaluate its actual impact on clinician behavior, total IV therapy days, and patient outcomes in real-world wards.
  • Limited Feature Set: The model relies exclusively on five vital signs. Incorporating laboratory markers of inflammation (like C-reactive protein or white blood cell counts) could potentially improve forecasting accuracy.
  • Assumption of Continuity: The model assumes the recent past is predictive of the near future, meaning it could experience a lag in detecting sudden, rapid clinical deteriorations or improvements.

Summary updated

BibTeX
@misc{ross2026optimising,
  author = {Magnus Ross and Nel Swanepoel and Akish Luintel and Emma McGuire and Ingemar J. Cox and Steve Harris and Vasileios Lampos},
  title = {{Optimising antibiotic switching via forecasting of patient physiology}},
  year = {2026},
  eprint = {2603.08242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.08242},
}
Figure