Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jun;11(3):948-960.
doi: 10.1109/TBDATA.2025.3536922.

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

Affiliations

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

Chen Chen et al. IEEE Trans Big Data. 2025 Jun.

Abstract

Heart failure (HF) poses a significant public health challenge, with a rising global mortality rate. Early detection and prevention of HF could significantly reduce its impact. We introduce a novel methodology for predicting HF risk using 12-lead electrocardiograms (ECGs). We present a novel, lightweight dual attention ECG network designed to capture complex ECG features essential for early HF risk prediction, despite the notable imbalance between low and high-risk groups. This network incorporates a cross-lead attention module and 12 lead-specific temporal attention modules, focusing on cross-lead interactions and each lead's local dynamics. To further alleviate model overfitting, we leverage a large language model (LLM) with a public ECG-Report dataset for pretraining on an ECG-Report alignment task. The network is then fine-tuned for HF risk prediction using two specific cohorts from the UK Biobank study, focusing on patients with hypertension (UKB-HYP) and those who have had a myocardial infarction (UKB-MI). The results reveal that LLM-informed pre-training substantially enhances HF risk prediction in these cohorts. The dual attention design not only improves interpretability but also predictive accuracy, outperforming existing competitive methods with C-index scores of 0.6349 for UKB-HYP and 0.5805 for UKB-MI. This demonstrates our method's potential in advancing HF risk assessment with clinical complex ECG data.

Keywords: Large language model; electrocardiogram; heart failure; interpretable artificial intelligence; multi-modal learning; risk prediction.

PubMed Disclaimer

Conflict of interest statement

The authors express no conflict of interest.

Figures

Fig. 1
Fig. 1
(a) Overview of the ECG dual attention encoder-based risk prediction network (ECG-DAN). A 12-lead ECG recording x is sent to the ECG dual attention encoder, which is capable of simultaneously extracting both cross-lead relationships as well as temporal dynamic patterns within each lead, for better feature aggregation. Then, features from two routes are added and then sent to a max-average pooling layer, producing a flattened feature vector zecg. Finally, we employ a multi-layer perceptron (MLP) module to map from a high-dimensional feature space into a risk score (scalar) r for heart failure. (b) Overview of the core attention module used in lead attention and temporal attention modules. See Sec. IIIB for more details.
Fig. 2
Fig. 2
Training overview. Our model is (a) first pretrained on the ECG-Report alignment task and the signal reconstruction task on a large-scale public dataset (PTB-XL [39, 40]), and then (b) finetuned on the heart failure risk prediction task with two specific cohorts from the UK Biobank where the future HF event data is available. Here, in PTB-XL dataset, each report has been abstracted to a set of SCP codes with SCP-ECG statement description and confidence score (annotated by human experts). We construct a structured report based on SCP-ECG protocol [39] and then send it to a frozen LLM to extract clinical knowledge for better representation learning guidance. As one ECG may have multiple SCP-code relavant statements, we extract text features separately and then use confidence-based reweighting to aggregate features for feature summation. See below texts for more details.
Fig. 3
Fig. 3
Kaplan-Meier risk curves for a) conventional model using a composite of 15 predefined ECG parameters/measurements, and b) the proposed ECG dual attention risk prediction model with the language-informed pretraining. For both models, patients were divided into low- and high-risk groups with a cutoff value referenced from the top 98th percentile (for UKB-HYP) or top 96th percentile (UKB-MI) risk scores predicted by the model, reflecting the statistics of the datasets in Table I
Fig. 4
Fig. 4
3D visualization of the last 3-dim hidden feature learned in the risk prediction subnetwork along with the visualization of input ECG waves with lowest predicted risk score (dark purple) and highest predicted risk score (light yellow) on the (a) UKB-HYP and (b) UKB-MI datasets.
Fig. 5
Fig. 5
Visualization of lead attention patterns and differences between low-risk and high-risk groups across two, different populations: UKB-HYP and UKB-MI.
Fig. 6
Fig. 6
Visualization of cross-lead (a,b) and 12-lead temporal attention maps (d,e) obtained from a high HF risk ECG with HYP (a,d) and a high HF risk ECGs with MI (b,e). (c) is a schematic standard ECG for illustrative purpose. Source: Wikimedia Commons.
Fig. 7
Fig. 7
U-map visualization of latent code embeddings zSCP from the large language model using different structured SCP statements. Different colors represent the categorization of statements with disease labels.

Similar articles

Cited by

  • Large language models for disease diagnosis: a scoping review.
    Zhou S, Xu Z, Zhang M, Xu C, Guo Y, Zhan Z, Fang Y, Ding S, Wang J, Xu K, Xia L, Yeung J, Zha D, Cai D, Melton GB, Lin M, Zhang R. Zhou S, et al. NPJ Artif Intell. 2025;1(1):9. doi: 10.1038/s44387-025-00011-z. Epub 2025 Jun 9. NPJ Artif Intell. 2025. PMID: 40607112 Free PMC article. Review.

References

    1. British Heart Foundation. [Accessed on Oct, 2023];Heart failure hospital admissions rise by a third in five years. 2019
    1. Tomaselli GF, Zipes DP. What causes sudden death in heart failure? Circulation Research. 2004;95(8):754–763. - PubMed
    1. Lane RE, Cowie MR, Chow AW. Prediction and prevention of sudden cardiac death in heart failure. Heart. 2005;91(5):674–680. doi: 10.1136/hrt.2003.025254. - DOI - PMC - PubMed
    1. Yancy CW, et al. Clinical presentation, management, and in-hospital outcomes of patients admitted with acute decompensated heart failure with preserved systolic function: A report from the acute decompensated heart failure national registry (ADHERE) database. Journal of the American College of Cardiology. 2006;47(1):76–84. - PubMed
    1. Thompson BS, Yancy CW. Immediate vs delayed diagnosis of heart failure: Is there a difference in outcomes? results of a harris interactive® patient survey. Journal of Cardiac Failure. 2004;10(4):S125

LinkOut - more resources