Related Experiment Video
Updated: Jul 29, 2025

Estimating Bilateral Atrial Function by Cardiovascular Magnetic Resonance Feature Tracking in Patients with Paroxysmal Atrial Fibrillation
Published on: July 20, 2022
Detection of Paroxysmal Atrial Fibrillation from Dynamic ECG Recordings Based on a Deep Learning Model
Yating Hu1, Tengfei Feng2, Miao Wang1
1School of Biomedical Engineering, Dalian University of Technology, Dalian 116024, China.
Insights
A novel deep learning model accurately detects atrial fibrillation (AF) from ECGs, identifying its onset and offset. This advancement offers improved diagnosis for this common arrhythmia, especially in aging populations.
Area of Science:
- Cardiology
- Artificial Intelligence
- Biomedical Engineering
Background:
- Atrial fibrillation (AF) is a common clinical arrhythmia, with risk increasing with age.
- AF often co-occurs with comorbidities like coronary artery disease (CAD) and heart failure (HF).
- Accurate AF detection is challenging due to its intermittent and unpredictable nature.
Purpose of the Study:
- To develop and validate a deep learning model for precise atrial fibrillation detection.
- To enable the identification of AF onset and offset from electrocardiogram (ECG) data.
- To improve diagnostic accuracy and reduce false alarms in AF monitoring.
Main Methods:
- A deep learning model incorporating residual blocks and a Transformer encoder was developed.
- The model was trained on dynamic ECG data from the CPSC2021 Challenge.
- The method did not distinguish between atrial fibrillation (AF) and atrial flutter (AFL).
Main Results:
- The model achieved high accuracy (98.67%), sensitivity (87.69%), and specificity (98.56%) in AF rhythm testing.
- Onset and offset detection showed high sensitivity (95.90% and 87.70%, respectively).
- A low false positive rate (FPR) of 0.46% minimized false alarms. Noise stress tests confirmed robustness.
Conclusions:
- The deep learning model effectively discriminates AF from normal heart rhythms.
- The model accurately detects the onset and offset of AF episodes.
- Feature visualization confirmed the model's interpretability, focusing on key ECG waveform characteristics.
Background And Objectives:
Atrial fibrillation (AF) is one of the most common arrhythmias clinically. Aging tends to increase the risk of AF, which also increases the burden of other comorbidities, including coronary artery disease (CAD), and even heart failure (HF). The precise detection of AF is a challenge due to its intermittence and unpredictability. A method for the accurate detection of AF is still needed.
Methods:
A deep learning model was used to detect atrial fibrillation. Here, a distinction was not made between AF and atrial flutter (AFL), both of which manifest as a similar pattern on an electrocardiogram (ECG). This method not only discriminated AF from normal rhythm of the heart, but also detected its onset and offset. The proposed model involved residual blocks and a Transformer encoder.
Results And Conclusions:
The data used for training were obtained from the CPSC2021 Challenge, and were collected using dynamic ECG devices. Tests on four public datasets validated the availability of the proposed method. The best performance for AF rhythm testing attained an accuracy of 98.67%, a sensitivity of 87.69%, and a specificity of 98.56%. In onset and offset detection, it obtained a sensitivity of 95.90% and 87.70%, respectively. The algorithm with a low FPR of 0.46% was able to reduce troubling false alarms. The model had a great capability to discriminate AF from normal rhythm and to detect its onset and offset. Noise stress tests were conducted after mixing three types of noise. We visualized the model's features using a heatmap and illustrated its interpretability. The model focused directly on the crucial ECG waveform where showed obvious characteristics of AF.
More Related Videos
Related Concept Videos
ECG Interpretation of Arrhythmias II: Atrial, Junctional and Ventricular Arrhythmias
Pulse rhythm
Conversely, an irregular pulse pattern is termed dysrhythmia, stemming from disruptions in cardiac...
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and...
Dysrhythmias III: Characteristics of Dysrhythmias
Correlation between ECG and Cardiac Cycle
A cardiac action potential originates in the SA node and spreads throughout the atria and the AV node in approximately 0.03 seconds. This results in the P wave in an ECG and triggers atrial contraction. The action potential is then briefly slowed at the AV node, allowing the atria to contract and fill the ventricles with blood before...
Dysrhythmias V: Evaluating Dysrhythmias

