Large Language Model-Informed ECG Dual Attention Network for Heart Failure Risk Prediction

Chen Chen, Lei Li, Marcel Beetz, Abhirup Banerjee, Ramneek Gupta, Vicente Grau

This paper, recently published by researchers from the University of Oxford and Sheffield, introduces a sophisticated deep learning approach to a critical medical challenge: predicting the future risk of Heart Failure (HF) using standard 12-lead electrocardiograms (ECGs).

TL;DR

The authors developed ECG-DAN, a lightweight dual-attention network that outperforms traditional clinical models by capturing both cross-lead interactions and local temporal dynamics. By pre-training the model to align ECG signals with expert medical reports using a Large Language Model (LLM), they significantly improved prediction accuracy and model interpretability for high-risk patient cohorts.

What Problem Does This Paper Address?

Heart Failure is a progressive condition where the heart cannot pump enough blood to meet the body's needs. While early detection can save lives, diagnosis often happens too late.

Current risk prediction relies on two main approaches, both with flaws:

  1. Traditional Clinical Markers: Doctors look for specific features like QRS duration or bundle-branch blocks. However, these simple linear models often miss subtle, non-linear patterns hidden in the raw ECG wave.
  2. Standard Deep Learning: While powerful, deep neural networks are notorious "black boxes" that require massive amounts of data and are prone to overfitting—essentially memorizing the training data rather than learning generalizable clinical features.

The authors sought to create a model that is both data-efficient (using LLM-informed pre-training) and transparent (using attention mechanisms).

Methods

The researchers introduced two major innovations:

1. The ECG-DAN Architecture

The "Dual Attention Network" processes the 12-lead ECG through two specialized modules:

  • Lead Attention (LA): This module treats each lead as a "token" (similar to words in a sentence) to capture how different leads interact spatially.
  • Temporal Attention (TA): This module looks within each lead to identify which specific moments in the heartbeat (e.g., the P-wave, QRS complex, or T-wave) are most indicative of risk.

2. LLM-Informed Pre-training

To prevent overfitting on small datasets, the authors used a two-stage training strategy. They first "taught" the model clinical knowledge by aligning ECG signals with expert-written text reports from the PTB-XL dataset. They used BioClinicalBERT (a medical LLM) to convert these reports into embeddings. By forcing the ECG encoder to "match" the text descriptions, the model learned to recognize pathological patterns (like "ST-T changes" or "Myocardial Infarction") before ever seeing a heart failure risk label.

Datasets

  • Pre-training: The PTB-XL dataset, containing 21,799 clinical 12-lead ECGs with accompanying expert-verified reports.
  • Fine-tuning & Evaluation: Two cohorts from the UK Biobank (UKB):
  • UKB-HYP: 11,581 patients with hypertension.
  • UKB-MI: 800 patients who had previously suffered a myocardial infarction (heart attack).

Key Insights and Ideas

  • Text as a Teacher: The most striking finding is that aligning signals with natural language reports is more effective than just using simple disease labels. The "nuance" in a doctor's report provides a richer supervisory signal for the neural network.
  • Learning Redundancy: The model's Lead Attention maps revealed that augmented leads (aVR, aVL, aVF) contributed the least to the prediction. This makes sense clinically, as these leads are mathematically derived from Leads I, II, and III, but it's impressive that the model "discovered" this redundancy on its own.
  • Interpretability via Grad-CAM: By applying Grad-CAM to the temporal attention maps, the authors could visualize exactly which parts of the ECG wave the model was "looking at." High-risk predictions were often triggered by clinically recognized markers like prolonged QT intervals or abnormal R-waves, validating the model's logic.

Key Results

The model was evaluated using the C-index (a standard metric for survival analysis where 0.5 is random and 1.0 is perfect):

  • Superior Performance: ECG-DAN achieved a C-index of 0.6349 for the hypertension cohort and 0.5805 for the MI cohort, outperforming traditional 15-biomarker linear models and heavier deep learning architectures like XResNet1D.
  • Ablation Success: Removing either the lead attention or the temporal attention modules led to a drop in performance, proving that both spatial and temporal context are necessary for accurate risk assessment.
  • Risk Stratification: Kaplan-Meier curves showed that the model could clearly separate patients into "low-risk" and "high-risk" groups, with the high-risk group showing significantly lower survival probability over an 80-month follow-up period.

Limitations and Future Work

  • ECG-Only Focus: The current model only looks at ECG data. The authors acknowledge that incorporating blood test results, genetics, and patient demographics (age, sex, smoking status) would likely create a more holistic and accurate risk profile.
  • Cohort Specificity: While the model performed well on hypertension and MI patients, its performance on the general, healthy population remains to be fully explored.
  • Generative Potential: The authors suggest that future versions could use the generative capabilities of LLMs to provide structured, text-based explanations alongside the numerical risk score, making the AI even more useful for clinicians.

Summary updated

BibTeX
@article{chen2025large,
  author = {Chen Chen and Lei Li and Marcel Beetz and Abhirup Banerjee and Ramneek Gupta and Vicente Grau},
  title = {{Large Language Model-Informed ECG Dual Attention Network for Heart Failure Risk Prediction}},
  journal = {IEEE Trans. Big Data},
  year = {2025},
  doi = {10.1109/tbdata.2025.3536922},
}
Figure