# A transformer-based survival model for prediction of all-cause mortality in patients with heart failure: a multi-cohort study

**Authors:** Shishir Rao, Nouman Ahmed, Gholamreza Salimi-Khorshidi, Christopher Yau, Huimin Su, Nathalie Conrad, Folkert W. Asselbergs, Mark Woodward, Rod Jackson, John GF Cleland, Kazem Rahimi

PMC · DOI: 10.1038/s41746-025-02296-5 · NPJ Digital Medicine · 2026-01-08

## TL;DR

A new AI model called TRisk improves mortality prediction for heart failure patients using electronic health records, outperforming existing models and showing consistent performance across different populations.

## Contribution

TRisk is a novel Transformer-based survival model that leverages routine EHR data to predict mortality in heart failure patients more accurately and with less bias than existing models.

## Key findings

- TRisk achieved a C-index of 0.845 in UK data, significantly outperforming MAGGIC-EHR (C-index: 0.728).
- TRisk showed less variability in performance across subgroups like sex and age compared to MAGGIC-EHR.
- External validation in the USA yielded a C-index of 0.802, demonstrating robust generalizability.

## Abstract

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.

## Linked entities

- **Diseases:** heart failure (MONDO:0005252), hepatic failure (MONDO:0100192)

## Full-text entities

- **Genes:** TRDN (triadin) [NCBI Gene 10345] {aka CARDAR, CPVT5, TDN, TRISK}
- **Diseases:** HF (MESH:D006333), hepatic failure (MESH:D017093), cancers (MESH:D009369)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12868603/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12868603/full.md

## References

15 references — full list in the complete paper: https://tomesphere.com/paper/PMC12868603/full.md

---
Source: https://tomesphere.com/paper/PMC12868603