Machine Learning Sharpened Forecasts of Persistent Fever After Antibiotics in Cancer Care

Persistent fever after intravenous antibiotics is a familiar and costly problem on oncology wards. In this study, investigators built and externally validated machine learning models to estimate whether hospitalized adults with cancer would still have fever 48–72 hours after antibiotic initiation, using routine electronic health record data from two academic centers. The target was not the cause of fever itself, but the short-term fever trajectory that often drives repeat imaging, additional antimicrobial coverage, and bedside uncertainty.

The cohort was large enough to test the idea across distinct hospital settings. At University Medicine Essen, 36,881 cancer-related admissions produced 9,408 antibiotic-treated cases, and fever during the first 24–48 hours after treatment appeared in 1,282 of them. After restricting the analysis to adults with at least one documented temperature between 48 and 72 hours after antibiotic start, the final Essen dataset included 987 hospital stays among 794 unique patients. The external cohort from Brigham and Women’s Hospital was much larger, with 7,409 hospital stays among 6,256 unique patients. Persistent fever was present in 54.0% of the Essen cohort and 46.5% of the Boston cohort, a difference that immediately set up a realistic test of transportability across sites.

Routine Temperature Data Carried the Strongest Signal

Temperature patterns did most of the predictive work. Across the feature set, temperature-related variables emerged as the dominant predictors, outranking demographics, comorbidities, laboratory values, and vital signs. In practical terms, the model learned from the fever curve already unfolding at the bedside rather than from a broad abstraction of cancer illness.

The model family was broad: regularized logistic regression, random forest, XGBoost, CatBoost, and TabPFN were all tested against a naïve baseline. In internal validation using nested 5-fold cross-validation, the baseline AUROC was 0.66, while the stronger models clustered in the 0.76 to 0.80 range. TabPFN produced the highest point estimate at 0.82, with a 95% confidence interval of 0.79 to 0.84. Confidence intervals overlapped across the leading models, so the point estimate alone should not be read as a decisive separation between algorithms.

The external cohort showed that the signal was not confined to one institution. TabPFN again posted the highest point estimate, with an AUROC of 0.78, while the other machine learning models landed between 0.75 and 0.77. The generalized linear model also improved on the naïve baseline, reaching 0.71 externally. Performance dropped slightly outside the development center, but the decline was modest enough to suggest genuine portability rather than brittle overfitting.

Net Benefit Persisted, but Recalibration Would Be Needed

Decision curve analysis added a more clinically grounded view of performance. Across both hospitals, model-based strategies delivered positive net benefit across much of the tested threshold range. The gain over a treat-all strategy was small at lower thresholds, which means the models are unlikely to replace bedside judgment when clinicians are already highly inclined to escalate care. Even so, the curves supported a real, if modest, decision-support role for a prediction tool that helps sort patients with persistent fever from those whose temperature is likely to settle.

Calibration told a more cautious story. In the Essen cohort, most models aligned reasonably well between predicted and observed risk, with calibration-in-the-large values near zero. In the external Boston cohort, all but the generalized linear model drifted toward overprediction, matching the lower prevalence of persistent fever there. This kind of shift is not surprising in clinical prediction work, but it does matter. A model that travels across institutions without recalibration can preserve ranking ability while misestimating absolute risk, which weakens its usefulness for threshold-based decisions.

Threshold-dependent results reinforced the same theme. In both cohorts, machine learning models outperformed the baseline models, which achieved reasonably high specificity but low sensitivity. TabPFN’s internal estimates were particularly strong: specificity 0.78, sensitivity 0.70, and F1 score 0.74. In the external cohort, those values remained fairly stable at 0.76 specificity, 0.69 sensitivity, and 0.70 F1 score. XGBoost and CatBoost also held up well across settings, suggesting that several algorithmic approaches could support the same clinical task.

A Forecast That Could Reduce Some Escalations, Not Replace Clinical Judgment

The most clinically provocative finding came from the retrospective assessment of downstream actions. Roughly one quarter of antibiotic escalations and chest CT scans occurred in patients whom the model correctly classified as unlikely to remain febrile. In other words, the tool may have been able to identify a meaningful subset of cases where fever persistence was not going to drive the next bedside step, even though the study did not test whether clinicians could safely act on that information in real time.

The model would still need guardrails. At operating points designed to capture very high sensitivity in the Essen cohort, specificity fell sharply and fewer patients were labeled low risk. For example, at sensitivity thresholds of at least 90%, 95%, and 98%, the XGBoost model produced negative predictive values of 0.77, 0.80, and 0.82, respectively, but specificity dropped from 0.38 to 0.16. Sensitivity can be bought, but only by classifying far fewer patients as low risk. That tradeoff is central in oncology, where missing a clinically important infection trajectory carries real consequences.

The feature comparisons also hinted at how these systems might be improved. Adding the continuous forecasted temperature increased discriminative performance in the Essen cohort, with TabPFN improving from an AUC of 0.79 to 0.82 and a paired DeLong p value of 0.001. In contrast, using dichotomized forecasted values from Chronos-2 as a binary fever indicator did not perform as well. Continuous temperature trajectories appear to contain more usable information than a simple yes-or-no forecast of fever persistence.

What This Means at the Bedside

The study supports a narrow but useful conclusion: persistent fever in hospitalized cancer patients can be predicted with clinically meaningful accuracy using routine data already present in the electronic record. The strongest signal came from temperature history itself, and the best models maintained reasonable external performance in a different health system with a different case mix, including a heavier burden of solid tumors at Brigham and Women’s Hospital and a more hematologic population at Essen.

The limitations are just as important as the gains. The work was retrospective, relied on documented temperature measurements, and excluded hospital stays without outcome-window temperatures, leaving room for selection effects tied to discharge, transfer, death, or monitoring gaps. The model also does not identify fever etiology, so it cannot distinguish bacterial infection from viral, fungal, or noninfectious causes. Most importantly, it has not yet been tested prospectively to determine whether clinicians would trust it, whether it would change antibiotic or imaging decisions, or whether that change would improve outcomes.

For now, the practical role is adjunctive. A model that estimates short-term fever persistence may help frame reassessment at 48–72 hours, but it should sit beside clinical judgment rather than replace it.


Reporting by Dr. Revathy Mohan V.R., MBBS for Medicine World Foundation, with additional data provided by Nature Medical Research.