Abstract
Atrial Fibrillation (AF) is an abnormal heart rhythm which can trigger cardiac arrest and sudden death. Nevertheless, its interpretation is mostly done by medical experts due to high error rates of computerized interpretation. One study found that only about 66% of AF were correctly recognized from noisy ECGs. This is in part due to insufficient training data, class skewness, as well as semantical ambiguities caused by noisy segments in an ECG record. In this paper, we propose a K-margin-based Residual-Convolution-Recurrent neural network (K-margin-based RCR-net) for AF detection from noisy ECGs. In detail, a skewness-driven dynamic augmentation method is employed to handle the problems of data inadequacy and class imbalance. A novel RCR-net is proposed to automatically extract both long-term rhythm-level and local heartbeat-level characters. Finally, we present a K-margin-based diagnosis model to automatically focus on the most important parts of an ECG record and handle noise by naturally exploiting expected consistency among the segments associated for each record. The experimental results demonstrate that the proposed method with 0.8125 F1NAOP score outperforms all state-of-the-art deep learning methods for AF detection task by 6.8%.
Introduction
Atrial Fibrillation (AF) is a common heart rhythm disorder that can lead to stroke or cardiac arrest. While ECGs are the gold standard for diagnosis, automated interpretation is notoriously difficult. Current computerized systems often fail when faced with "noisy" data—signals distorted by movement, poor sensor contact, or muscle interference.
The authors identify three primary hurdles in the field:
- Data Inadequacy and Class Skewness: AF is relatively rare compared to normal rhythms, leading to imbalanced datasets where models struggle to learn the "minority" disease class.
- Feature Complexity: Detecting AF requires looking at both individual heartbeats (local features) and the overall pattern over time (rhythm-level features).
- Semantic Ambiguity: A single long ECG recording might contain a few seconds of clean, diagnostic signal buried among segments of useless noise. Standard models often get "confused" by trying to learn from these noisy parts.
Proposed Methodology
The proposed framework, the K-margin-based RCR-net, integrates three key components to address these challenges:
Skewness-driven Dynamic Data Augmentation
To mitigate class imbalance, a "slide-and-cut" method generates short ECG segments. A dynamic stride is employed: for rare classes like AF, a smaller stride generates more overlapping segments, effectively oversampling the minority classes and providing the model with multiple temporal perspectives.
Residual-Convolution-Recurrent Network (RCR-net)
Detecting AF requires capturing both local morphology and global rhythm. The RCR-net architecture utilizes a 33-layer ResNet to extract local heartbeat features and a Bi-directional LSTM (Long Short-Term Memory) layer to capture long-term temporal trends. This hybrid approach mirrors the clinical practice of analyzing both individual QRS complexes and R-R interval regularity.
K-margin-based Diagnosis Model
This novel component handles semantic ambiguity by treating model uncertainty as a filter. Instead of training on every segment, the "K-margin" logic calculates an uncertainty score for each segment based on the margin between the top two predicted class probabilities. It then selects the top-K most confident segments to make the final diagnosis, effectively ignoring segments that are too noisy to classify reliably.
Experimental Results
The study utilized the PhysioNet/Computing in Cardiology Challenge 2017 Dataset, containing 8,528 single-lead ECG records categorized into Normal (N), AF (A), Other (O), and Noisy (P).
The K-margin-based RCR-net achieved an $F_{1NAOP}$ score of 0.8125, representing a 6.8% improvement over previous state-of-the-art deep learning methods. Key findings include:
- Robustness to Noise: The model demonstrated significantly lower Hamming Loss, particularly in the "Too Noisy to Classify" category.
- AF Precision: The system was highly effective at distinguishing AF from other irregular rhythms.
- Optimal K Selection: Experimental results indicated that $K=3$ (selecting the three most confident segments) provided the optimal balance between accuracy and noise rejection.
Conclusion
The K-margin-based RCR-net framework offers a robust solution for AF detection in real-world, noisy ECG data. By combining local and global feature extraction with a confidence-based filtering mechanism, it significantly outperforms existing methods. Future work will explore multi-modal data integration and finer-grained arrhythmia classification to further enhance clinical utility.
Summary updated