Optimising antibiotic switching via forecasting of patient physiology
Authors: Magnus Ross, Nel Swanepoel, Akish Luintel, Emma McGuire, Ingemar J. Cox, Steve Harris, Vasileios Lampos
Organizations: Department of Computer Science, Centre for AI, UCL, UK · Institute of Health Informatics, UCL, UK · Department of Medical Microbiology, Infection Division, University College Hospital London, UK · Department of Computer Science, University of Copenhagen, Denmark
Timely transition from intravenous (IV) to oral antibiotic therapy shortens hospital stays, reduces catheter-related infections, and lowers healthcare costs, yet one in five patients in England remain on IV antibiotics despite meeting switching criteria. Clinical decision support systems can improve switching rates, but approaches that learn from historical decisions reproduce the delays and inconsistencies of routine practice. We propose using neural processes to model vital sign trajectories probabilistically, predicting switch-readiness by comparing forecasts against clinical guidelines rather than learning from past actions, and ranking patients to prioritise clinical review. The design yields interpretable outputs, adapts to updated guidelines without retraining, and preserves clinical judgement. Validated on MIMIC-IV (US intensive care, 6,333 encounters) and UCLH (a large urban academic UK hospital group, 10,584 encounters), the system selects 2.2-3.2× more relevant patients than random. Our results demonstrate that forecasting patient physiology offers a principled foundation for decision support in antibiotic stewardship.
Figures & tables
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.
Statistic
MIMIC
UCLH
Number of admissions
6,333
10,584
Unique subjects
5,850
8,701
Age (years)
65.70 ± 15.29
55.98 ± 19.24
Length of stay (days)
17.69 ± 17.07
14.23 ± 14.42
Sex
Female
2,579 (40.7%)
5,564 (52.6%)
Table 1: Comparison of the evaluation set cohorts for MIMIC-IV and UCLH datasets. Categorical variables are reported as count (percentage of admissions). Continuous variables are reported as mean ± standard deviation. MIMIC-IV records race while UCLH records ethnicity, reflecting the coding systems used in each source database; “Other White Bg” denotes Other White Background. Antibiotic frequencies may sum to more than 100% as patients can receive multiple antibiotics during an admission. The bottom section shows the mean number of vital sign measurements recorded per admission for each variable. Abbreviations: Pip.-Taz. (Piperacillin-Tazobactam), Sulfameth/Trimeth (Sulfamethoxazole-Trimethoprim), IV (Intravenous), SpO 2 (Oxygen Saturation), BP (Blood Pressure).
Dataset
Model
Variable
HR
RR
SpO 2
SBP
Temp.
(bpm)
(bpm)
(%)
(mmHg)
( ∘ F)
UCLH
Repeat
8.79 [8.76-8.82]
1.97 [1.96-1.98]
1.51 [1.51-1.52]
12.86 [12.81-12.91]
0.69 [0.69-0.70]
GBDT
7.94 [7.92-7.96]
1.76 [1.76-1.77]
1.31 [1.30-1.31]
10.86 [10.83-10.89]
0.58 [0.58-0.58]
NP
7.58 [7.56-7.60]
1.71 [1.70-1.72]
1.30 [1.30-1.31]
10.71 [10.67-10.75]
0.57 [0.57-0.57]
MIMIC
Repeat
9.17 [9.14-9.19]
4.09 [4.08-4.11]
2.05 [2.04-2.05]
14.29 [14.24-14.34]
0.63 [0.62-0.63]
Table 2: Mean absolute error of model forecasts for 12 hour prediction horizon. The 95% confidence intervals are shown, computed by a bootstrap resampling of the mean error over each of the windows in the test set. Bold values indicate the best performing model(s) (p ≥ 0.05). Variable abbreviations: HR (Heart Rate), RR (Respiratory Rate), SpO2 (Oxygen Saturation), SBP (Systolic Blood Pressure), Temp. (Temperature). Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Figure 2: Forecasting performance on the MIMIC data for each variable with increasing forecast horizon for NP model and baselines. Note horizontal axis scale is logarithmic. Error bars show 95% confidence. Variable Abbreviations: HR (Heart Rate), RR (Respiratory Rate), SpO2 (Oxygen Saturation), SBP (Systolic Blood Pressure), Temp. (Temperature). Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Dataset
Model
Metric
AUROC
AP
Brier Score
Precision@5
UCLH
Logistic
0.827 [0.823-0.831]
0.740 [0.732-0.747]
0.167 [0.165-0.169]
0.836 [0.823-0.850]
GBDT
0.862 [0.858-0.865]
0.794 [0.787-0.800]
0.149 [0.147-0.151]
0.899 [0.888-0.910]
NP
0.858 [0.854-0.861]
0.785 [0.779-0.792]
0.216 [0.212-0.219]
0.883 [0.871-0.894]
NP-tuned
0.867 [0.864-0.871]
0.800 [0.793-0.807]
0.146 [0.144-0.148]
0.901 [0.890-0.912]
MIMIC
Logistic
0.759 [0.749-0.767]
0.300 [0.284-0.315]
0.098 [0.095-0.100]
0.280 [0.263-0.297]
Table 3: Comparison of model performance for switch-readiness prediction. Higher values are better for all metrics except the Brier score. Bold values indicate the best performing model(s) (p ≥ 0.05). Metric abbreviations: AUROC (Area under the Receiver Operating Characteristic), AP (Average Precision). Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Figure 3: Comparison of model performance curves for both datasets. From left to right the plots show Receiver Operating Characteristic, precision-recall, and calibration curves. For the former two the dashed line shows the performance of a chance model, for the latter it shows a perfect model. For the calibration curve, aggregation bins are the quantiles of the distribution of predicted probabilities; the small proportion of positive examples in MIMIC means the curves do not span the full range of the plot. The shaded region indicates 95% confidence. Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Figure 4: Ranking performance on the MIMIC data for each variable with increasing forecast horizon for NP models and baselines. Horizontal axis scale is logarithmic. Error bars show 95% confidence. Note that the classes become more imbalanced as the forecast horizon increases, with 20.1%, 12.2%, and 7.8% of the instances being positive for the 6, 12, and 24 hour horizons respectively. Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Dataset
Model
Metric
F1 Score
Accuracy
Precision
Recall
UCLH
Repeat
0.704 [0.699-0.709]
0.700 [0.696-0.704]
0.587 [0.581-0.594]
0.879 [0.874-0.884]
Logistic
0.719 [0.714-0.724]
0.736 [0.732-0.740]
0.634 [0.627-0.640]
0.832 [0.827-0.838]
GBDT
0.744 [0.740-0.749]
0.765 [0.761-0.769]
0.667 [0.661-0.673]
0.843 [0.837-0.848]
NP
0.741 [0.736-0.746]
0.754 [0.751-0.759]
0.649 [0.643-0.655]
0.863 [0.857-0.868]
NP-tuned
0.748 [0.744-0.754]
0.764 [0.760-0.768]
0.660 [0.654-0.666]
0.864 [0.859-0.870]
Table 4: Comparison of model performance for binary classification, with the positive class representing a patient that is ready to be switched. The proportion of positive instances is 40.2% and 12.2% for UCLH and MIMIC respectively, indicating predicting the majority class could achieve an accuracy of 59.8% and 87.8% in each case. Decision thresholds were chosen to maximise the F1 score on the validation set. 95% confidence intervals are shown in brackets. Bold values indicate the best performing model(s) (p ≥ 0.05). A higher value is better for all metrics. Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Figure 5: Example encounter from the MIMIC test set illustrating the intended functioning of the system. The panels show (from top to bottom): predicted switch-readiness probabilities from the NP-tuned model; labels indicating oral (PO) and IV antibiotic prescriptions and whether clinical criteria are satisfied in each forecast window; measured vital signs with clinical thresholds for switch-readiness overlaid; and antibiotic prescription timelines, with colour and pattern indicating administration route. Grey vertical lines demarcate daily 12-hour forecast windows. Forecasts begin 48 hours after admission to ensure sufficient historical data for prediction. Variable Abbreviations: HR (Heart Rate), RR (Respiratory Rate), SpO2 (Oxygen Saturation), SBP (Systolic Blood Pressure), Temp. (Temperature). Antibiotic Abbreviations: Sulfameth/Trimeth (Sulfamethoxazole-Trimethoprim).
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure S1 : Left plot shows calibration curve for the forecasting model’s predicted uncertainty. For each confidence level (e.g., 80%), we generate a prediction interval that should contain the true value with that probability using the Normal predictive distribution. The x-axis shows the chosen confidence level while the y-axis shows the actual proportion of test observations that fell within the intervals. Perfect calibration follows the diagonal: an 80% interval should contain 80% of observations. Points above the diagonal indicate underconfident predictions. Right shows relationship between predicted uncertainty and absolute prediction error. Individual predictions are shown as scatter points, with binned averages over 1st to 99th percentiles (red line) summarising the trend. The diagonal represents ideal calibration where predicted uncertainty magnitude matches actual error magnitude. In this case, an underconfident model has binned average error below the diagonal; where the predicted uncertainty is higher than the actual error.
Variable
Range
Units
Heart Rate
10 – 400
bpm
Systolic Blood Pressure
0 – 400
mmHg
Oxygen Saturation
0 – 100
%
Respiration Rate
0 – 120
bpm
Temperature
50 – 120
°F
Appendix
Table S1 : Ranges of plausible values used for data cleaning.
MIMIC-IV
UCLH
Partition
Forecasting
Switch-readiness
Forecasting
Switch-readiness
Train
167,923
79,148
344,133
76,586
Val.
18,804
8,902
38,864
8,885
Test
52,537
22,615
186,759
41,053
Appendix
Table S2 : Number of tasks in each dataset partition for the forecasting and switch-readiness prediction tasks.
Measurement
Switch Criterion
Temperature ( ∘ F)
96.8 – 100.4
Heart Rate (bpm)
41 – 90
Respiratory Rate (breaths/min)
9 – 20
Systolic BP (mmHg)
101 – 219
SpO2 (%)
>94
Appendix
Table S3 : Physiological criteria for switch readiness.
Parameter
Value
Architecture
Number of layers
4
Number of channels ∗
{64, 128, 256, 512}
Lengthscale
1.0 hour
Training
Learning rate ∗
{ 10−5 , 5×10−5 , 10−4 , 5×10−4 , 10−3 }
Appendix
Table S4 : Neural process model hyperparameters. Parameters marked with ∗ were selected via grid search, with the search space shown in parentheses.
Parameter
Value
Architecture
Hidden layer 1 size
256
Hidden layer 2 size
128
Dropout rate
{0.0, 0.1, 0.5}
Training
Learning rate
{ 5×10−5 , 10−4 , 5×10−4 , 10−3 }
Appendix
Table S5 : NP-tuned classification head hyperparameters. The classification head is trained with the base forecasting model weights frozen.
Parameter
Value
GBDT
Number of estimators
{5, 10, 50, 100, 200}
Maximum depth
{3, 4, 5, 6}
Learning rate
{0.001, 0.005, 0.05, 0.1, 0.5}
Logistic Regression
Inverse regularization strength (C)
{0.1, 1.0, 10.0, 100.0, 1000.0}
Appendix
Table S6 : Baseline model hyperparameters. A grid search was performed over the sets of hyperparameters. The model with the highest average precision on the validation set was selected for evaluation on the test set.
Measurement
Switch Criterion
Temperature ( ∘ F)
96.8 – 100.58
Heart Rate (bpm)
40 – 131
Respiratory Rate (breaths/min)
8 – 24
Systolic BP (mmHg)
90 – 229
SpO2 (%)
>91
Appendix
Table S7 : Alternative, loose criteria for switch readiness.
Dataset
Model
Metric
AUROC
AP
Brier Score
Precision@5
MIMIC-loose
Logistic
0.676 [0.669-0.682]
0.650 [0.640-0.660]
0.229 [0.228-0.231]
0.680 [0.663-0.696]
GBDT
0.829 [0.824-0.834]
0.809 [0.801-0.817]
0.168 [0.165-0.170]
0.835 [0.821-0.849]
NP
0.836 [0.831-0.841]
0.810 [0.802-0.817]
0.239 [0.235-0.243]
0.841 [0.827-0.855]
NP-tuned
0.814 [0.809-0.820]
0.792 [0.783-0.800]
0.175 [0.172-0.177]
0.822 [0.808-0.838]
Appendix
Table S8 : Model performance for switch-readiness prediction on the MIMIC dataset with looser clinical criteria (switch rate 50.0%). Bold values indicate the best performing model(s) (p ≥ 0.05). Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Dataset
Model
Metric
F1 Score
Accuracy
Precision
Recall
MIMIC-loose
Repeat
0.739 [0.733-0.745]
0.700 [0.695-0.706]
0.654 [0.647-0.662]
0.849 [0.842-0.856]
Logistic
0.684 [0.678-0.690]
0.560 [0.554-0.567]
0.534 [0.527-0.541]
0.950 [0.946-0.954]
GBDT
0.772 [0.766-0.777]
0.741 [0.736-0.747]
0.690 [0.683-0.697]
0.875 [0.869-0.881]
NP
0.779 [0.773-0.784]
0.753 [0.748-0.759]
0.707 [0.699-0.714]
0.867 [0.861-0.872]
NP-tuned
0.762 [0.756-0.768]
0.730 [0.724-0.736]
0.681 [0.674-0.689]
0.865 [0.859-0.872]
Appendix
Table S9 : Model performance for binary switch-readiness prediction on the MIMIC dataset with looser clinical criteria (switch rate 50.0%). Bold values indicate the best performing model(s) (p ≥ 0.05). Model abbreviations: GBDT (Gradient Boosted Decision Trees), NP (Neural Process).
Figure S2 : Example encounter from the MIMIC test set illustrating a case in which the system’s prediction is less clearly beneficial. The system recommends an earlier switch, but then the patient becomes more unwell as they are switched. In this encounter the test days only span around half of the full stay, since the IV prescription is halted after 150 hours. Panels show the same information as those in the figure in the main text. Variable Abbreviations: HR (Heart Rate), RR (Respiratory Rate), SpO2 (Oxygen Saturation), SBP (Systolic Blood Pressure), Temp. (Temperature). Antibiotic Abbreviations: Pip.-Taz., Piperacillin-Tazobactam; Sulfameth/Trimeth, Sulfamethoxazole-Trimethoprim
Figure S3 : Example encounter from the MIMIC test set. In this example the patient is unwell at the very start of the encounter, but their vitals are stable for most of the remainder, aside from a few spikes. The model becomes more confident the patient is ready to be switched as the encounter progresses, although no switch occurs. Panels show the same information as those in the figure in the main text. Variable Abbreviations: HR (Heart Rate), RR (Respiratory Rate), SpO2 (Oxygen Saturation), SBP (Systolic Blood Pressure), Temp. (Temperature).
Antimicrobial stewardship (AMS) is critical in pediatric intensive care units (PICUs), where diagnostic uncertainty often drives broad-spectrum antibiotic use, increasing antimicrobial resistance and potential long-term harms. Machine learning offers a promising approach for identifying patient-level opportunities for stewardship interventions from electronic health record data, yet prior work has focused largely on adult populations and static tabular representations. We present a systematic benchmarking study of AMS intervention prediction in the PICU across the public Paediatric Intensive Care database a private cohort from the University Children's Hospital Zurich, Switzerland. We define four clinically relevant proxy targets for reducing antibiotic exposure: intravenous-to-oral switching, de-escalation, discontinuation, and short-course therapy. Under a unified evaluation framework, we compare tabular, sequence-based, and graph-based temporal models at multiple temporal resolutions. We find that predictive performance is driven primarily by target prevalence and dataset characteristics rather than model complexity. Sequence models improve the precision-recall trade-off over tabular approaches at coarse (24-hour) resolution, while finer temporal modeling provides limited additional benefit. However, these gains come at the cost of poorer calibration, with simpler tabular models yielding more reliable probability estimates. Our findings highlight the importance of target design, temporal representation, and calibration in clinical machine learning, and provide practical guidance for developing reliable decision support systems for pediatric AMS.
Niklas Raehse, Luregn J. Schlapbach, Daphné Chopard
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
Clinical prediction models in intensive care degrade as data shift, and regulators such as the FDA ask developers to specify bounded update protocols in advance. Evaluations of such protocols assume that apparent drift reflects clinical practice rather than changes in how the database records care. We test whether update strategies can be evaluated on unaudited ICU data, and whether a parameter-bounded update gives up accuracy or attribution stability relative to full fine-tuning once the data are audited. We audit MIMIC-IV 3.1 (2008-2022) for recording artifacts and define a cleaning protocol. On the cleaned cohort, a label-free classifier two-sample test gates updates across three eras. We compare a bounded update, which retrains only treatment-context and fusion parameters, with full fine-tuning for two model families and two targets under a pre-specified non-inferiority margin of 0.015 AUROC, and measure attribution stability against the source model. In 2020-2022 about half of ICU stays have no input or procedure-event records, and a vasopressor ItemID migration makes the 2017-2019 label rate appear to fall when it actually rises. On the cleaned cohort, the gate detects drift in every era, including in physiology-only features, with no false alarms on null data. Bounded updating is non-inferior or superior in 10 of 12 primary cells, but this depends on the target, the model family and learning-rate tuning, and adaptation gains over never updating are small. At a shared learning rate, bounded updates keep physiological attributions more stable in neural models, clearly for vasopressor and less clearly for intubation; with separately tuned rates, full updates are more stable. Audits should precede update evaluation, and the update boundary should be chosen per target.
Fatema Ferdous Tamanna, K. M. Merajul Arefin, Md. Abdul Masud
Dept. of Computer Science and IT, Patuakhali Science and Technology University, Bangladesh · Dept. of Computer Science and Engineering, University of Dhaka, Bangladesh
Many time-series forecasts depend not only on prior observations but also on actions specified during the forecast period. In intensive care units (ICUs), future vital signs and laboratory values are influenced by treatments such as vasopressors. However, models that predict the full future sequence all at once make little use of these treatments, whereas autoregressive models can accumulate errors. We introduce DRIFT, a hybrid framework in which a direct model produces the primary forecast and a recursive, action-conditioned model contributes constrained corrections. We evaluate DRIFT on 6,046 admissions from MIMIC-IV and 8,345 admissions from eICU-CRD. Averaged across the 8-, 24-, and 48-hour forecast endpoints, DRIFT reduces mean absolute error for mean arterial pressure (MAP) by 0.673% relative to an action-conditioned Temporal Fusion Transformer (TFT-action) on MIMIC-IV and achieves the lowest corresponding error among the compared models on eICU-CRD. Although the overall accuracy improvement is modest, a MIMIC-IV audit restricted to windows in which the supplied treatment sequence was altered showed that DRIFT achieved lower observed-target MAP error than TFT-action at 8 and 24 hours. Treatment-sequence alteration increased DRIFT's MAP error by 0.21-0.26 mmHg more than it increased TFT-action's error, with prediction changes occurring primarily after the supplied paths diverged. In a separate robustness experiment, the MAP advantage persisted under three shared checkpoint-selection rules emphasizing overall endpoint error, MAP error, or both equally.
Weixin Liu, Juming Xiong, Congning Ni +4
Vanderbilt University, Nashville, Tennessee, USA · Vanderbilt University Medical Center, Nashville, Tennessee, USA