Cookies on this website

We use cookies to ensure that we give you the best experience on our website. If you click 'Accept all cookies' we'll assume that you are happy to receive all cookies and you won't see this message again. If you click 'Reject all non-essential cookies' only necessary cookies providing core functionality such as security, network management, and accessibility will be enabled. Click 'Find out more' for information on how to change your cookie settings.

Heart failure (HF) patients have complex health profiles that existing risk models fail to capture. We developed TRisk, a Transformer-based artificial intelligence survival model for predicting mortality using routine electronic health records (EHR) in HF patients. Using UK data from 403,534 HF patients across 1418 English general practices, we trained and validated TRisk and compared it against MAGGIC-EHR, the MAGGIC model adapted for use on routine EHR by substituting variables (e.g. left-ventricular ejection fraction) that are not routinely available. External validation was conducted on 21,767 patients from USA hospitals. In the UK cohort, TRisk achieved a concordance index (C-index): 0.845 (95% CI: 0.841, 0.849), outperforming MAGGIC-EHR (C-index: 0.728 [0.723, 0.733]) for 36-month mortality prediction. In subgroup analyses, TRisk demonstrated less variability in predictive performance by sex, age, and baseline characteristics compared to MAGGIC-EHR, suggesting less biased modelling. Evaluating TRisk in USA data via transfer learning yielded a C-index of 0.802 (0.789, 0.816). Explainability analysis revealed TRisk captured established risk factors while identifying underappreciated ones, particularly cancers and hepatic failure, with cancers maintaining prognostic utility even a decade before baseline. TRisk provides more accurate, well-calibrated mortality prediction using routine data across international healthcare settings, demonstrating potential for improved risk stratification in patients with HF.

More information Original publication

DOI

10.1038/s41746-025-02296-5

Type

Journal article

Publication Date

2026-01-08T00:00:00+00:00