Cancer treatment side effects: SPARC, a transformer trained on routine blood tests from 224,000 patients and tested in three large external datasets
A team from Memorial Sloan Kettering Cancer Center (MSK) and partners presents SPARC, a transformer model pre-trained on about 102 million laboratory and vital-sign measurements from roughly 224,000 patients with cancer, to predict seven outcomes: two mortality endpoints and five treatment toxicities. The authors report performance at or above the compared models on the development cohort, a prospective cohort from the same centre and several external datasets, with a clear weak spot for febrile neutropenia. The work is serious and better tested than most, but it is a preprint, per-cohort AUROCs are in figures and supplementary tables, and the licence forbids commercial use.
Context
Patients on chemotherapy or immunotherapy are monitored with repeated blood tests: complete blood count (CBC), metabolic panel (creatinine, bilirubin, liver enzymes) and vital signs. These data pile up in the record without being used systematically to anticipate side effects. Current tools are mostly nomograms, scores with a handful of variables built for one drug and one cancer, for instance for febrile neutropenia (low white cells with fever) or acute kidney injury under cisplatin.
The idea tested here is a foundation model: pre-train a large model on a generic task that needs no labels, then fine-tune it (light retraining) on each clinical task. The generic task is predicting a patient's next laboratory values from their history.
Method
SPARC is a transformer, an architecture using attention to weigh the relative importance of elements in a sequence; here the sequence is a patient trajectory of up to 20 time points. Time is encoded with learned Fourier features so the model can handle irregular gaps between draws. Missing values are handled explicitly: missingness indicators are inputs and each module is scaled by the fraction of observed variables. Final inputs are deliberately modest: CBC, comprehensive metabolic panel, vital signs, age in five-year bins and sex. Richer variables (MSK-IMPACT genomics, ECOG performance status, smoking, genetic ancestry, metastatic sites) were tested on 57,510 patients and dropped because they did not consistently help.
Pre-training predicts the last time point of a window from earlier ones, with mean squared error (MSE) computed on observed values only. Fine-tuning targets seven tasks: 180-day mortality after hospital discharge, 30-day mortality after ICU admission, grade 3 anemia (haemoglobin below 8 g/dL), grade 3 neutropenia (neutrophils below 1,000/µL), febrile neutropenia, acute kidney injury (KDIGO criteria) and grade 3 liver toxicity under immune checkpoint inhibitors. Infusions after a first event are excluded. Validation uses eleven folds, one held out for testing, and test predictions average ten models.
Comparators are solid: time-series models (DuETT, Raindrop), TabPFN v3 (a foundation model for tabular data), XGBoost and MLP, plus four published nomograms (Motwani for kidney injury, Aagaard's FENCE for febrile neutropenia, Lyman, Dranitsaris), both retrained on MSK and applied as published.
Results
On the pre-training task, SPARC reaches an MSE of 0.423 versus 0.451 for the best ridge regression on history, 0.590 for carrying the last value forward and 0.872 for the mean. On the MSK test set, SPARC matches or beats every model for both mortality tasks, kidney injury, anemia, liver toxicity and neutropenia; TabPFN is best for febrile neutropenia. Against nomograms, SPARC is significantly better for anemia and febrile neutropenia, equal for neutropenia, and for kidney injury the nomogram does no better than chance while SPARC does. Performance varies strongly by drug: AUROC 0.87 for kidney injury under bisphosphonates, 0.64 under cisplatin. (AUROC is the probability that a patient who had the event gets a higher score than one who did not; 0.5 is chance.)
On the prospective MSK cohort (23,126 patients), only febrile neutropenia loses more than 5% AUROC. In zero-shot external validation, the CAIA consortium (three centres, 562,620 patients) shows a maximal drop of about 10% AUROC, again for febrile neutropenia; other tasks stay near MSK or above. On INSIGHT (six hospitals, 206,840 patients), mortality, anemia, kidney injury and liver toxicity hold; the neutropenias are harder. On MIMIC-IV (25,466 patients) performance is weaker, which the authors attribute to ICU and emergency inclusion criteria, and on EHRSHOT (546 patients) it is comparable. Pooled multi-hospital fine-tuning improves 24 of 30 task-site pairs versus 15 of 30 for single-site fine-tuning (exact McNemar, p = 0.0117).
Clinical translation: the G-CSF analysis (G-CSF is a white-cell growth factor given to prevent neutropenia) stratifies patients by tertiles of predicted risk. With propensity-score weighting, G-CSF lowers neutropenia in the medium and high tertiles but not the low one, and the number needed to treat falls as predicted risk rises. The numerical NNT values are not in the text we read, so we do not reconstruct them, nor do we convert AUROCs into false positives per 1,000 patients, since per-cohort AUROCs and an operating threshold are not given in the main text.
What is good
First, the scale and diversity of validation: a prospective cohort of 23,126 patients, then more than 790,000 patients in external multi-hospital cohorts, plus two public datasets, initially without retraining. This goes well beyond cross-validation.
Second, the comparators: published nomograms, applied as is and retrained, plus recent generic models. Finding that the kidney-injury nomogram does no better than chance is the kind of result a weak comparator would hide.
Third, restraint and candour: routine inputs only, extra variables tried then discarded, and explicit limitations (prescribing bias, US academic centres, events defined by laboratory values alone). Code and preprocessing repository are on GitHub.
What is less good
First, population and context bias: all cohorts come from academic centres in large US cities with their own testing habits. Outcomes are also shaped by prescribing: cisplatin is avoided in patients with kidney impairment, so high-risk patients are under-represented exactly where prediction would matter. This is the classic treatment-selection bias.
Second, a metric hard to use for decisions: the text defers per-cohort AUROCs, calibration and decision-curve analysis to supplementary figures and tables. Calibration (agreement between predicted risk and observed frequency) conditions any action threshold, and a high AUROC on rare events can hide many false alerts. Febrile neutropenia, clinically central, is also the task that degrades most outside MSK.
Third, evidence and reproducibility limits: the G-CSF analysis is observational, weighting does not replace a randomised trial, and the causal effect is inferred; events are defined by laboratory thresholds only; and the text has inconsistencies (weights described both as already hosted and as released on formal publication, development period 2015 or 2016 depending on the section, loss described as Cox or cross-entropy). Weights and code are CC BY-NC-ND 4.0, non-commercial and no derivatives. On interests, several authors declare stock or ties to AstraZeneca, Pfizer, Tempus AI, Google, Microsoft or insitro and judge them unrelated to the work; funding is from the NCI (K08CA286842, P30 CA008748).
What it changes
For researchers, SPARC provides a public reference point for predicting toxicities from routine labs, and a concrete finding: for this data, multi-site fine-tuning helps more than single-site, and richer modalities did not help. The authors themselves note the model may be near its ceiling on several tasks.
For clinicians, nothing is usable today: it is neither a regulated device nor prospectively validated for decisions. The potential interest is targeting G-CSF prophylaxis to medium and high-risk patients, a hypothesis that needs a trial. For patients and the public, the lesson is that tests already ordered, with no extra procedure, might one day better protect people during treatment, provided calibration and fairness across institutions are shown.
Going further
Preprint: Fu C. et al., "Longitudinal AI Models Predict Cancer Adverse Events", medRxiv, 26 October 2026, DOI 10.64898/2026.10.22.26364879. Code: github.com/tommyfuu/SPARC. External datasets: MIMIC-IV (PhysioNet, credentialed access), EHRSHOT, INSIGHT Clinical Research Network. Figures above come from the version 1 text; calibration and per-cohort AUROCs are to be read in figures 2 and 4 and supplementary tables 5 and 6.