Skip to main content
QUICK REVIEW

[Paper Review] An explainable Transformer-based deep learning model for the prediction of incident heart failure

Shishir Rao, Yikuan Li|arXiv (Cornell University)|Jan 27, 2021
Machine Learning in HealthcareComputer Science7 citations
TL;DR

This study presents a novel, explainable Transformer-based deep learning model that predicts incident heart failure using longitudinal electronic health records from 100,071 UK patients. The model achieves AUC-ROC of 0.93 internally and 0.93 externally, outperforming existing models while identifying both known and novel risk factors through a perturbation-based explainability method.

ABSTRACT

Predicting the incidence of complex chronic conditions such as heart failure is challenging. Deep learning models applied to rich electronic health records may improve prediction but remain unexplainable hampering their wider use in medical practice. We developed a novel Transformer deep-learning model for more accurate and yet explainable prediction of incident heart failure involving 100,071 patients from longitudinal linked electronic health records across the UK. On internal 5-fold cross validation and held-out external validation, our model achieved 0.93 and 0.93 area under the receiver operator curve and 0.69 and 0.70 area under the precision-recall curve, respectively and outperformed existing deep learning models. Predictor groups included all community and hospital diagnoses and medications contextualised within the age and calendar year for each patient's clinical encounter. The importance of contextualised medical information was revealed in a number of sensitivity analyses, and our perturbation method provided a way of identifying factors contributing to risk. Many of the identified risk factors were consistent with existing knowledge from clinical and epidemiological research but several new associations were revealed which had not been considered in expert-driven risk prediction models.

Motivation & Objective

  • To improve prediction accuracy of incident heart failure using deep learning on rich electronic health record (EHR) data.
  • To develop a model that is both highly accurate and inherently interpretable for clinical adoption.
  • To identify clinically meaningful risk factors—both known and novel—by leveraging contextualized medical information in EHRs.
  • To overcome the limitations of black-box deep learning models in healthcare by introducing a perturbation-based explanation method.
  • To validate the model’s performance across internal and external datasets using rigorous cross-validation and hold-out testing.

Proposed method

  • A Transformer-based deep learning architecture is trained on longitudinal EHR data, including diagnoses, medications, age, and calendar year for each clinical encounter.
  • All patient data is embedded with contextual features, encoding temporal and demographic context for each medical event.
  • A perturbation-based explanation method is applied to assess feature importance by systematically altering input tokens and measuring prediction shifts.
  • The model uses multi-head self-attention to capture long-range dependencies across time-stamped clinical events.
  • Performance is evaluated using 5-fold cross-validation and a held-out external dataset to ensure robustness.
  • The model is compared against existing deep learning baselines to demonstrate superior predictive performance.

Experimental results

Research questions

  • RQ1Can a Transformer-based deep learning model achieve higher predictive performance for incident heart failure than existing models using EHR data?
  • RQ2To what extent does incorporating contextualized clinical information (e.g., age, year, diagnosis sequence) improve prediction accuracy?
  • RQ3Can the model provide reliable, human-interpretable explanations of its predictions through a perturbation-based method?
  • RQ4What novel risk factors for heart failure are identified by the model that are not captured in traditional expert-driven risk scores?
  • RQ5How generalizable is the model’s performance across different patient populations when evaluated on an external, held-out dataset?

Key findings

  • The model achieved an area under the receiver operating characteristic curve (AUC-ROC) of 0.93 in internal 5-fold cross-validation and 0.93 in external hold-out validation.
  • The model achieved an area under the precision-recall curve (AUC-PR) of 0.69 internally and 0.70 externally, indicating strong performance on imbalanced data.
  • The perturbation-based explanation method successfully identified clinically relevant risk factors, including both established and previously unrecognized associations.
  • Sensitivity analyses confirmed the importance of contextualized medical information, such as age and calendar year, in improving prediction accuracy.
  • Several novel risk associations were discovered that had not been previously considered in expert-driven risk prediction models.
  • The model outperformed existing deep learning baselines in both AUC-ROC and AUC-PR metrics, demonstrating superior predictive capability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.