← Projects Machine learning Personal project · 2026

When the measurement schedule predicts the outcome

Do recurrent networks reading the raw, irregular first 48 hours of an ICU stay predict in-hospital death better than a tree on summary statistics? On the PhysioNet 2012 challenge data, XGBoost wasn't beaten, and the timing of measurements alone carried much of the signal.

  • Python
  • PyTorch
  • XGBoost
  • scikit-learn
  • Optuna
  • TreeSHAP
  • MLflow
0.882
XGBoost AUROC, hidden test set
0.791
AUROC from measurement timing alone
0.871
Best GRU AUROC
0.533 vs 0.5353
Event 1, XGBoost vs 2012 winner

Architecture

  1. 01 PhysioNet 2012 12,000 stays, sets A / B / C
  2. 02 Cleaning implausible values dropped
  3. 03 Features 341 summaries or hourly bins + mask + gaps
  4. 04 Models XGBoost, LR, LSTM, GRU, GRU-D
  5. 05 Set C test paired bootstrap, Holm
  6. 06 Checks calibration, subgroups, SHAP

The problem

ICU vital signs arrive irregularly. A heart rate might be charted every hour and a lactate once, or never. A common pitch for recurrent networks is that they can read that raw, uneven sequence directly, where a tree needs it flattened into summary statistics first.

I wanted to test that pitch honestly, and to measure a second question along the way: how much of the signal is in when things were measured rather than in the values?

This is a methodological comparison on public research data. Nothing here is validated for clinical use.

The constraint

The PhysioNet/Computing in Cardiology Challenge 2012 has 12,000 adult ICU stays in three sets of 4,000. I kept the organisers’ split: models were developed on sets A and B and tested once on set C, the hidden test set that decided the challenge. Every decision (hyperparameters, early stopping, thresholds, which recurrent model is best) used validation stays only.

A clinical risk model is judged on more than AUROC, so I also measured calibration, subgroup behaviour and what each model relies on. Before claiming anything I checked the data. 18 of 20 published statistics were reproduced, and the two misses trace to inconsistencies in the sources.

What I built

  • Tabular models. Each stay becomes 341 features: six value statistics and three measurement-process statistics (count, first hour, last hour) for each of 37 variables, plus demographics. XGBoost, tuned with Optuna, and logistic regression.
  • Recurrent models. Each stay becomes 48 hourly bins with the value, a mask of which bins were measured, and the hours since the last measurement. LSTM, GRU, and GRU-D, which learns to decay a missing input toward the mean.
  • Baselines. The SAPS-I and SOFA severity scores, recalibrated.

Results

Trees on summary statistics weren’t beaten. XGBoost reached AUROC 0.882 on set C. The GRU trailed by 0.011, which wasn’t significant after correction over 33 paired tests. GRU-D and the LSTM were significantly behind. Averaging XGBoost and the GRU added nothing. SAPS-I reached only 0.652.

When a variable was measured is itself predictive. With only the number and timing of measurements (no values, no age, sex or ICU type), XGBoost reached 0.791 and a GRU 0.748. Mortality was 18.1% when lactate was measured in the first 48 hours and 9.0% when it wasn’t. Giving the GRU mask and time-gap inputs raised its AUPRC by 0.020. GRU-D’s learned decay added nothing on top.

XGBoost matched the 2012 winners on Event 1. It scored 0.533 against the winner’s 0.5353, and would have placed third. The challenge’s calibration score, Event 2, turned out too noisy to rank models: single seeds of the same GRU ranged from 29.6 to 84.8.

The risks are calibrated. Calibration slopes were 0.94-1.07 for every main model. The learned models predicted a little low, most for patients aged 80 and over.

Both families read the same physiology. The Glasgow Coma Score dominated for both. Variable rankings by grouped permutation importance agreed with a Spearman correlation of 0.80.

What this doesn’t show

  • One hospital system. All stays come from MIMIC II. Set C tests new patients, not new hospitals or charting habits. The measurement-timing signal depends on local ordering practice.
  • Informative missingness cuts both ways. Part of the signal is which tests clinicians chose to order, which already reflects their judgement. A model leaning on that can change behaviour when ordering practice changes.
  • Modest recurrent tuning. One shared configuration, small networks, no attention or continuous-time models. The result is that standard recurrent nets didn’t beat a tuned tree here, not that no sequence model can.
  • Not the participants’ conditions. Challenge entries had set A labels only. Developed on set A alone, XGBoost scored 0.523 on Event 1, so the comparison is a reference point, not a ranking.
  • Subgroups travel less well. At a single threshold XGBoost flagged 62% of deaths among ventilated patients but 29% among non-ventilated ones. Any real use would need subgroup-aware thresholds or recalibration.

Contact

Want the longer version?

Happy to walk through any of this in detail — the parts that broke are usually the interesting bit.