End-to-end Risk Prediction of Atrial Fibrillation from the 12-Lead ECG by Deep Neural Networks

Theogene Habineza, Antônio H. Ribeiro, Daniel Gedon, Joachim A. Behar, Thomas B. SchönJournal of Electrocardiology 2023 · DOI · OpenReview

TL;DR

This paper presents a deep neural network (DNN) model that predicts the risk of developing atrial fibrillation (AF) directly from raw 12-lead ECG signals. By combining DNN-based risk assessment with survival analysis, the model offers valuable insights into patient prognosis and can aid clinical decision-making for AF management.

What Problem Does This Paper Address?

Atrial fibrillation (AF) is a common cardiac arrhythmia linked to serious health issues like stroke and heart failure. Early detection and risk assessment are crucial for timely intervention and better patient outcomes. While deep learning has shown promise in detecting AF from ECGs, there's a need for models that can predict the risk of developing AF in individuals who currently do not have the condition, and importantly, estimate when this might occur. Existing approaches often focus on detecting AF in the present or use pre-extracted features, leaving a gap in end-to-end, future-oriented risk prediction directly from raw ECG data.

Methods

The core of this work is an end-to-end deep neural network, specifically a residual neural network architecture, trained to classify ECGs into three categories: NoAF (no AF and no future AF), WithAF (current AF), and FutureAF (no current AF but will develop it later). This DNN is trained to output class probabilities.

Crucially, these probabilities are then fed into survival analysis models:

  • Cox Proportional Hazards (PH) Model: A semi-parametric model used to estimate hazard ratios, indicating how much the risk of developing AF increases for different probability groups.
  • Kaplan-Meier Estimator: A non-parametric method used to estimate survival probabilities over time, visualized as survival curves.

This combination allows for both classifying current and future AF risk and estimating the time until AF onset.

Datasets

The study utilizes the CODE (Clinical Outcomes in Digital Electrocardiology) dataset. This is a large dataset comprising:

  • 2,322,465 12-lead ECG records.
  • From 1,558,748 different patients.
  • Collected in Minas Gerais, Brazil, between 2010 and 2017 via a public telehealth system.

This dataset is notable for its size and its focus on raw ECG recordings.

Key Insights and Ideas

  • End-to-End Prediction: The model directly learns predictive features from raw ECG signals, bypassing the need for manual feature engineering or pre-defined digital biomarkers. This simplifies the pipeline and potentially uncovers novel predictive patterns.
  • Bridging Detection and Prediction: The DNN can not only detect current AF but also predict future AF development, addressing a critical gap in proactive cardiac care.
  • Survival Analysis for Temporal Risk: Integrating DNN outputs with survival models provides a more nuanced understanding of AF risk, moving beyond simple classification to estimating the timeline of potential events.
  • High Specificity in Risk Prediction: While sensitivity and PPV for predicting future AF were moderate, the model achieved very high specificity, meaning it's good at correctly identifying individuals who are unlikely to develop AF. This is valuable for large-scale screening.

Key Results

  • AF Risk Prediction: The DNN model achieved an AUC-ROC score of 0.845 for predicting future AF (FutureAF class vs. NoAF class).
  • Temporal Risk Estimation:
    • Patients in the highest risk group (DNN probability > 0.7) were 50% more likely to develop AF within 40 weeks (less than a year).
  • Patients in the minimal risk group (DNN probability ≤ 0.1) had over 85% chance of remaining AF-free for up to seven years.
  • Model Performance: The model demonstrated high specificity (0.981) in distinguishing between future AF and no AF, though sensitivity and PPV were lower (0.322 and 0.247 respectively) due to class imbalance.

Limitations and Future Work

  • Dataset Bias: The CODE dataset is from Brazil, and external validation on diverse populations is needed to confirm the model's generalizability.
  • Labeling Accuracy: AF labels are based on expert interpretation of ECG reports, which may contain errors or missed cases.
  • Proportional Hazards Assumption: The Cox PH model's proportional hazards assumption was violated for some covariates, suggesting that while useful for prediction, it might not fully capture the underlying hazard dynamics.
  • Future Directions: The authors suggest external validation, exploring the model's potential in predicting AF-related stroke, and extending the approach to other arrhythmias and cardiovascular diseases. They also highlight the potential for this AI-augmented ECG analysis to aid clinical decision-making.

Summary updated

Abstract

Background: Atrial fibrillation (AF) is one of the most common cardiac arrhythmias that affects millions of people each year worldwide and it is closely linked to increased risk of cardiovascular diseases such as stroke and heart failure. Machine learning methods have shown promising results in evaluating the risk of developing atrial fibrillation from the electrocardiogram. We aim to develop and evaluate one such algorithm on a large CODE dataset collected in Brazil. Results: The deep neural network model identified patients without indication of AF in the presented ECG but who will develop AF in the future with an AUC score of 0.845. From our survival model, we obtain that patients in the high-risk group (i.e. with the probability of a future AF case being greater than 0.7) are 50% more likely to develop AF within 40 weeks, while patients belonging to the minimal-risk group (i.e. with the probability of a future AF case being less than or equal to 0.1) have more than 85% chance of remaining AF free up until after seven years. Conclusion: We developed and validated a model for AF risk prediction. If applied in clinical practice, the model possesses the potential of providing valuable and useful information in decision-making and patient management processes.
BibTeX
@article{habineza2023end,
  author = {Theogene Habineza and Antônio H. Ribeiro and Daniel Gedon and Joachim A. Behar and Antônio Luiz Pinho Ribeiro and Thomas B. Schön},
  title = {{End-to-end Risk Prediction of Atrial Fibrillation from the 12-Lead ECG by Deep Neural Networks}},
  journal = {Journal of Electrocardiology},
  year = {2023},
  doi = {10.1016/j.jelectrocard.2023.09.011},
}
Figure