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
. 2024 Dec 23;24(1):318.
doi: 10.1186/s12874-024-02421-0.

Identifying the presence of atrial fibrillation during sinus rhythm using a dual-input mixed neural network with ECG coloring technology

Affiliations

Identifying the presence of atrial fibrillation during sinus rhythm using a dual-input mixed neural network with ECG coloring technology

Wei-Wen Chen et al. BMC Med Res Methodol. .

Abstract

Background: Undetected atrial fibrillation (AF) poses a significant risk of stroke and cardiovascular mortality. However, diagnosing AF in real-time can be challenging as the arrhythmia is often not captured instantly. To address this issue, a deep-learning model was developed to diagnose AF even during periods of arrhythmia-free windows.

Methods: The proposed method introduces a novel approach that integrates clinical data and electrocardiograms (ECGs) using a colorization technique. This technique recolors ECG images based on patients' demographic information while preserving their original characteristics and incorporating color correlations from statistical data features. Our primary objective is to enhance atrial fibrillation (AF) detection by fusing ECG images with demographic data for colorization. To ensure the reliability of our dataset for training, validation, and testing, we rigorously maintained separation to prevent cross-contamination among these sets. We designed a Dual-input Mixed Neural Network (DMNN) that effectively handles different types of inputs, including demographic and image data, leveraging their mixed characteristics to optimize prediction performance. Unlike previous approaches, this method introduces demographic data through color transformation within ECG images, enriching the diversity of features for improved learning outcomes.

Results: The proposed approach yielded promising results on the independent test set, achieving an impressive AUC of 83.4%. This outperformed the AUC of 75.8% obtained when using only the original signal values as input for the CNN. The evaluation of performance improvement revealed significant enhancements, including a 7.6% increase in AUC, an 11.3% boost in accuracy, a 9.4% improvement in sensitivity, an 11.6% enhancement in specificity, and a substantial 25.1% increase in the F1 score. Notably, AI diagnosis of AF was associated with future cardiovascular mortality. For clinical application, over a median follow-up of 71.6 ± 29.1 months, high-risk AI-predicted AF patients exhibited significantly higher cardiovascular mortality (AF vs. non-AF; 47 [18.7%] vs. 34 [4.8%]) and all-cause mortality (176 [52.9%] vs. 216 [26.3%]) compared to non-AF patients. In the low-risk group, AI-predicted AF patients showed slightly elevated cardiovascular (7 [0.7%] vs. 1 [0.3%]) and all-cause mortality (103 [9.0%] vs. 26 [6.4%]) than AI-predicted non-AF patients during six-year follow-up. These findings underscore the potential clinical utility of the AI model in predicting AF-related outcomes.

Conclusions: This study introduces an ECG colorization approach to enhance atrial fibrillation (AF) detection using deep learning and demographic data, improving performance compared to ECG-only methods. This method is effective in identifying high-risk and low-risk populations, providing valuable features for future AF research and clinical applications, as well as benefiting ECG-based classification studies.

Keywords: Atrial fibrillation; Deep learning; Demographic information; Dual-input mixed neural network; ECG colorization; Sinus rhythm.

PubMed Disclaimer

Conflict of interest statement

Declarations. Ethics approval and consent to participate: This study was approved by the Institutional Review Board (2017–10-009BC) at Taipei Veterans General Hospital, Taipei, Taiwan. All methods were carried out following the regulations of the Institutional Review Board. The Internal Review Board of Taipei Veterans General Hospital granted an exemption from the need to secure informed consent due to the thorough de-identification of patient data. Consent for publication: Not applicable. Competing interests: The authors declare no competing interests.

Figures

Fig. 1
Fig. 1
Program flow diagram
Fig. 2
Fig. 2
Patient flow diagram. A separate dataset was taken out of 2018 (B data) for extra validation, and data before 2018 (A data) was split into training, validation, and test sets. ECG = electrocardiograph
Fig. 3
Fig. 3
Ensure that training, validation, and test data sets are kept free of cross-contamination. The goal is to ensure a robust and reliable data set for the network’s training, validation, and testing. Once a patient’s data is placed in one of the datasets, that patient’s data is only used in that set, thus avoiding “cross-contamination” between training, validation, and testing datasets. A list of four patients (P1, P2, P3, and P4) and P1-D1, P1-D2, and P1-D3 represent three different ECGs taken by patient1 at different dates and times
Fig. 4
Fig. 4
The ECG coloring mechanism converts to rainbow color distribution according to age-feature values. A maximum age range is set as the color distribution range, and each patient’s age is mapped to a color (HTML color) in #RRGGBB format. The patient’s ECG was recolored with updated R, G, and B values converted from HTML color to (R, G, B) tuples. By age-coding ECG coloring, a simple single feature value is amplified and strengthened while maintaining a correlation between age and disease
Fig. 5
Fig. 5
The architecture of a Dual-input Mixed Neural Network with ECG coloring technology (a) generates colored ECG based on the patient’s demographic information. The conversion mechanism is illustrated in Fig. 4. The demographic information (b) in the original numerical format is treated as another input data and put into (c) together with (a). Xception is used as the backbone for model training. The final prediction of AF and Non-AF prediction models are obtained
Fig. 6
Fig. 6
Integrating Clinical Risk Scoring with AI Prediction in the Clinical Workflow. An ECG from a specific patient, captured using a 12-lead system, is initially categorized based on the CHA2DS2-VASc score: men with a score ≥ 2 and women with a score ≥ 3 are classified as high-risk. Conversely, men with a score of 0 or 1 and women with scores of 0, 1, or 2 are deemed low-risk. This classification is based on the presence of associated comorbidities. Upon classification, the ECG is processed through the AI model, which predicts the risk as either AF or non-AF for both the high-risk and low-risk groups. The resultant cardiovascular and all-cause mortality risks are represented in blue, green, orange, and red, corresponding to the survival curves illustrated in Fig. 8. Of paramount concern is the high-risk group where AI predicts AF. Individuals within this category require intensive monitoring due to the significantly elevated cardiovascular and all-cause mortality rates. Conversely, the remaining populations necessitate regular follow-ups, which are deemed adequate
Fig. 7
Fig. 7
Dual-input Mixed Neural Network with varying threshold models for (a) optimized AUC split validation, (b) testing data ranging from 2009 to 2018, and (c) individual testing data in 2018
Fig. 8
Fig. 8
Kaplan–Meier survival curves for AI-classified AF or non-AF patients. AI-predicted AF: patients classified by the AI model as having AF. AI-predicted non-AF: patients classified by the AI model as having non-AF. a Cardiovascular mortality. b All-cause mortality. AF, atrial fibrillation; AI, artificial intelligence

Similar articles

References

    1. Attia ZI, Noseworthy PA, Lopez-Jimenez F, Asirvatham SJ, Deshmukh AJ, Gersh BJ, et al. An artificial intelligence-enabled ECG algorithm for the identification of patients with atrial fibrillation during sinus rhythm: a retrospective analysis of outcome prediction. Lancet. 2019;394(10201):861–7. 10.1016/S0140-6736(19)31721-0. - PubMed
    1. Baek YS, Lee SC, Choi W, Kim DH. A new deep learning algorithm of 12-lead electrocardiogram for identifying atrial fibrillation during sinus rhythm. Sci Rep. 2021;11(1):12818. 10.1038/s41598-021-92172-5. - PMC - PubMed
    1. Liaqat S, Dashtipour K, Zahid A, Assaleh K, Arshad K, Ramzan N. Detection of atrial fibrillation using a machine learning approach. Information. 2020;11(12):549. 10.3390/info11120549.
    1. Tseng AS, Noseworthy PA. Prediction of atrial fibrillation using machine learning: a review. Front Physiol. 2021;12:1873. 10.3389/fphys.2021.752317. - PMC - PubMed
    1. Noseworthy PA, Attia ZI, Behnken EM, Giblon RE, Bews KA, Liu S, et al. Artificial intelligence-guided screening for atrial fibrillation using electrocardiogram during sinus rhythm: a prospective non-randomised interventional trial. Lancet. 2022;400(10359):1206–12. 10.1016/S0140-6736(22)01637-3. - PubMed

LinkOut - more resources