Lukasz Regulski

Research · Warwick

Frailty as context for breathing support

A one-minute frailty score made two different models better at predicting who fails non-invasive breathing support.

Same breathing, different frailty Two patients, a fit adult and a frail older adult, share an identical breathing trace but sit at 2 and 7 on the 9-point Clinical Frailty Scale. Adding the frailty score to the prediction model raised its AUC in all 50 cross-validation runs; the gains range from +0.021 to +0.049. 1 frailty 9 Same breathing, different reserve + frailty 0 +0.02 +0.04 +0.06 AUC gain, each run Better in all 50 runs

When a patient in acute respiratory failure is put on non-invasive support (high-flow oxygen through the nose, or a tight-fitting mask ventilator), the hard question is whether it will work. If it fails and the team escalates late, patients seem to do worse. The scores and models that exist today read the patient’s breathing at the start and in the first hour. They know nothing about who the patient was before they fell ill.

Two patients can have the same breathing rate and the same oxygen needs: a fit 45-year-old and an 80-year-old who needs help to walk. The Clinical Frailty Scale, a 1-to-9 score a clinician can fill in within a minute, records that difference.

We took 341 patients from centres in Italy and the UK and trained two unrelated machine-learning models (TabPFN and XGBoost) on age and early breathing measurements, once without the frailty score and once with it.

What it showed

  • On its own, frailty predicts little. AUC 0.58, where 0.5 is a coin toss and 1.0 is perfect.
  • Added to the breathing data, it helps. TabPFN rose from 0.77 to 0.80, XGBoost from 0.76 to 0.79. The gain held in all 50 repeats of the cross-validation, for both models.
  • It ranked second. Only the breathing rate an hour in mattered more. Age barely mattered: failure rates were flat across age groups, while average frailty climbed from 2.8 to 5.1.

Why it is interesting

The frailty score is a piece of the patient’s history, not a reading from today. It is cheap to collect and yet rarely recorded before intensive care. That is my PhD in small: measure a patient against their own trajectory, not against a population average.

The data are retrospective and the models have not been tested on an outside cohort, so this is a reason to record frailty and test it properly, not a finished tool.

How it was done

Cohort. 341 adults from seven prospective studies at the University Hospital of Modena (277) and the University Hospital of North Midlands (64): 192 on high-flow nasal oxygen, 149 on non-invasive ventilation, with both hypoxaemic and hypercapnic respiratory failure. Failure meant escalation, death within seven days, or pre-set physiological failure criteria; 137 patients (40.2%) failed.

Frailty. Scored retrospectively from pre-admission records by investigators who did not know the outcome, describing the patient before the acute illness. Unadjusted, each CFS point raised the odds of failure by 19% (odds ratio 1.19, 95% CI 1.05–1.34); age did not (0.99).

Inputs. Age, breathing rate and inspired oxygen fraction (FiO₂) within six hours before support started and one to two hours after, plus the change between the two; then the same with CFS added. Blood gases were left out on purpose: the UK centre did not record them, and the decision this model would support usually comes before an arterial sample. All inputs were complete, so nothing was imputed.

Models. TabPFN, a transformer pre-trained on synthetic tables that predicts in one forward pass (32 estimators), and XGBoost, a boosted tree ensemble (100 trees, learning rate 0.1, depth 4). Neither was tuned. They make very different assumptions, so agreement between them points at the data rather than the algorithm.

Validation. Stratified 10-fold cross-validation, repeated over 50 random partitions: 500 fits per model, each scored only on patients it never saw, with every model on the same folds so the comparisons are paired. The primary test is the Nadeau–Bengio corrected resampled t-test on the 500 per-fold differences, which widens the variance to allow for overlapping training sets. A paired bootstrap on the pooled out-of-fold predictions gives the intervals.

Without frailty With frailty Difference
TabPFN, AUC 0.767
(0.713–0.819)
0.804
(0.754–0.852)
+0.037
(0.008 to 0.067)
p = 0.018
XGBoost, AUC 0.759
(0.703–0.813)
0.794
(0.742–0.844)
+0.035
(0.001 to 0.070)
p = 0.043
TabPFN, Brier score 0.189 0.174 −0.015
XGBoost, Brier score 0.204 0.185 −0.019

AUC with 95% intervals. The Brier score measures how close the predicted probabilities are to what happened, so it rewards calibration as well as ranking; lower is better. At a threshold chosen on the other nine folds, TabPFN’s sensitivity rose from 0.67 to 0.76 with specificity roughly unchanged (0.75 to 0.72).

Explanations. SHAP splits each prediction into a contribution per input. For TabPFN we used Kernel SHAP (30 k-means background samples, 1,000 perturbations per patient); for XGBoost, Tree SHAP, which is exact for trees. Both were computed on held-out patients within each fold. Both models put the same three inputs on top: breathing rate an hour in, then frailty, then age. The chart shows what adding frailty does to TabPFN: age goes from fifth of seven to third. So age was not a stand-in for frailty: once the model knows how frail someone is, age carries information of its own.

How much each input moved TabPFN's predictions Mean absolute SHAP value per input for TabPFN without and with the frailty score. With frailty: breathing rate at one hour 0.134, frailty 0.104, age 0.074, oxygen at one hour 0.053, oxygen at start 0.037, breathing rate at start 0.036, change in breathing rate 0.013, change in oxygen 0.010. Without frailty, age is 0.019, fifth of seven. 0.00 0.05 0.10 0.15 Breathing rate, 1 h in Frailty (CFS) Age Oxygen (FiO₂), 1 h in Oxygen (FiO₂), at start Breathing rate, at start Change in breathing rate Change in oxygen without frailty with frailty mean |SHAP|, probability of failure
Mean absolute SHAP value per input for TabPFN, on held-out patients in the 10 folds of one cross-validation partition (seed 42), in units of predicted probability of failure. Open dot, model without frailty; filled dot, model with it. One partition only, so no interval is shown.