Source-linked AI summary
A New AFIB Detection Method with Deep Neural Networks
Sara Gjorgjieva, Ana Angjelevska, Dimitar Trajanov, Marjan Gusev
TL;DR
AFIB detection must identify irregular rhythms that lack patterns, while P-waves are difficult to detect. The paper combines engineered heartbeat and complexity features with clean-interval labeling, and its DNN achieved 95.18% F1 when trained on MITDB and tested on LTAFDB.
Problem
AFIB detection must distinguish irregular rhythms without patterns, while P-waves are difficult to detect because of their very low amplitude.
Source: §1 · p. 2Method
Results
95.18% F1: the DNN trained on MITDB and tested on the distinct LTAFDB dataset for AFIB detection.
Source: §4 · p. 6Takeaways & Limitations
The authors report that selecting the training subset with their labeling method improved performance, and that results outperform studies using the same evaluation methodology.
Source: §6 · p. 8
Abstract
from arXiv · showhide
Early detection of atrial fibrillation (AFIB), characterized by irregular heart rhythms, can potentially save thousands of lives annually [20]. Numerous studies have attempted to address this challenge using various algorithms and methodologies. This paper introduces a novel and robust method that enhances the precision of AFIB detection. Neural Networks (NN) are widely recognized for their ability to identify complex electrocardiogram (ECG) patterns, facilitating the accurate detection of irregular heart rhythms. This study explores multiple conventional machine learning algorithms alongside neural network approaches to develop a robust AFIB detection system. To evaluate the effective- ness and robustness of the proposed method, the MIT BIH arrhythmia database (MITDB) and the Long-term Atrial Fibrillation Database (LTAFDB), both available on the Physionet site. Our approach presents a novel feature engineering technique, employing specific features such as a time series of the differences in successive heart rates (dBPM) rather than traditional inter-beat intervals. The model analyzes inputs labeled into five distinct classes, using only clean intervals identified through a new labeling method for training while treating others as outliers. This strategy ensures a more accurate and reliable AFIB detection process. The best-performing model, a Deep Neural Network (DNN), achieved an F1 score of 95.18% for binary atrial fibrillation classification on a benchmark dataset distinct from the training set. Models trained using our approach have demonstrated superior performance than previously published models.
1 Introduction
AFIB can cause serious complications, and its ECG detection is difficult because P-waves are hard to detect and irregular rhythms may also follow patterns. The paper proposes a heart-rate-difference feature strategy and evaluates it using two ECG databases.
1 Introduction
- AFIB can lead to blood clots, stroke, heart failure, and other heart-related complications.It also reduces the heart muscle’s efficiency and can cause rapid heartbeat, weakness, and dizziness.Source: §1 · p. 1
- AFIB detection must distinguish irregular ECG rhythms without patterns from patterned irregular rhythms such as Bigeminy and Trigeminy.P-waves are difficult to detect because of their very low amplitude.Source: §1 · pp. 1–2
- The approach uses differences in heart rates between consecutive beats rather than the inter-beat intervals used by most neural-network approaches.The study uses MITDB and LTAFDB and includes cross-validation and an additional validation dataset.Source: §1 · p. 2
- The paper is organized into related work, methods, performance evaluation, discussion, and conclusions with future directions.Source: §1 · p. 2
2 Related Work
Prior AFIB-detection studies use varied signal-processing and machine-learning approaches, but same-dataset evaluation can obscure weak transfer to other patients. This work uses patient-wise splits and heart-rate differences instead of consecutive-beat intervals.
2 Related Work
- Same-dataset evaluations can report high F1 scores even though models may perform very poorly on a different patient.Examples include 98.97% F1 for an NN model and 98.35% for a recurrent NN–LSTM model tested with 10-fold cross-validation on MITDB.Source: §2 · p. 2
- The proposed approach uses patient-wise training and testing splits, unlike studies that train and test on the same patients.The paper identifies patient-wise splitting as a way to address robustness and applicability.Source: §2 · p. 2
- Unlike other NN solutions that use intervals between consecutive beats, this approach uses differences in rates from consecutive heartbeats.Source: §2 · p. 2
- The planned experiments compare same-dataset training and testing, separate ECG benchmark tests, and an equal split of MITDB.Many other papers use cross-validation splits.Source: §2 · p. 2
3 Methods
The methods use MITDB for training and a shortened portion of LTAFDB, with paced-patient records excluded. The databases contain varied rhythms and are imbalanced.
3.1 Datasets
- MITDB contains 30-minute ECG recordings from 48 patients, and this study uses it to train the new model.After excluding four paced-patient records, the analyzed total is 97,924 annotated heartbeats; only 10% of records contain AFIB episodes.Source: §3.1 · p. 2
- LTAFDB contains 24-to-25-hour ECG recordings from 83 patients diagnosed with AFIB, and the study uses a shortened version of 943,953 annotated heartbeats.The shortened version follows exclusion of two paced-patient records from the database.Source: §3.1 · p. 2
- Both databases contain predominantly normal sinus rhythm alongside several other arrhythmias, and the analysis excludes ventricular fibrillation and ventricular flutter.Source: §3.1 · pp. 2–3
- The databases are imbalanced, which the study identifies as a challenge for training and evaluating AFIB-detection models.Source: §3.1 · p. 3
3.2 Feature Engineering
The feature-engineering approach derives rhythm features from heartbeat intervals and time-series complexity measures. Training uses clean segments and a majority-rule label for AFIB.
3.2 Feature Engineering
- The feature set combines RR intervals with measures of irregularity and complexity derived from heartbeat data.Feature engineering is intended to capture differences between normal rhythms and AFIB episodes.Source: §3.2 · p. 3
- RR intervals measure the time between consecutive beats, while GZIP compression length measures the complexity and variability of a bucketed time series.Each time-series bucket is mapped to a UTF-8 character and concatenated into a 41-character string for compression.Source: §3.2 · p. 3
- Shannon entropy measures the unpredictability of bucketed time-series values, with higher entropy indicating greater irregularity characteristic of AFIB.The calculation uses the number of values in each bucket and the total number of intervals.Source: §3.2 · p. 3
- Sample entropy is computed with the TSFEL library from time-series buckets, with higher values suggesting more irregular and complex patterns typical of AFIB.Source: §3.2 · p. 3
- Training uses only clean segments, and intervals with more than 51% of heartbeats labeled 1 are classified as AFIB.Source: §3.2 · p. 3
3.3 Ensemble Machine Learning Models
The study applies ensemble machine-learning models to AFIB detection, using 10-fold cross-validation and hyperparameter tuning. It evaluates decision-tree, forest, and boosting approaches.
3.3 Ensemble Machine Learning Models
- The ensemble models are evaluated with 10-fold cross-validation and hyperparameter tuning to assess robustness and effectiveness.The study reuses ensemble models analyzed in earlier work.Source: §3.3 · p. 3
3.3.1 Decision Tree (DT)
- Decision Trees recursively split feature-based subsets to separate classes and serve as an interpretable baseline for AFIB model development.The study tunes tree depth, minimum samples per leaf, split criteria, feature selection, and pruning-related alpha.Source: §3.3.1 · p. 3
3.3.2 Random Forest (RF)
- Random Forest aggregates predictions from trees trained on random subsets of the training data to reduce overfitting and improve generalization.The approach is described as useful for noisy data and complex heart-rate variability patterns.Source: §3.3.2 · pp. 3–4
3.3.3 XGBoost (XGB)
- XGBoost builds trees in parallel and uses regularization to limit overfitting, with tuning across learning rate, tree count, depth, sampling, and regularization settings.Source: §3.3.3 · p. 4
3.3.4 AdaBoost (AB)
- AdaBoost sequentially reweights misclassified examples so later weak learners focus on difficult cases, including minority AFIB episodes.The number of estimators and learning rate are tuned.Source: §3.3.4 · p. 4
3.3.5 CatBoost (CB)
- CatBoost uses ordered boosting and incorporates categorical data directly, with Logloss and AUC selected for loss and evaluation.Learning rate and colsample by level are tuned.Source: §3.3.5 · p. 4
3.4 Deep Learning Model Development
The study applies deep-learning models to detect AFIB from ECG data, including recurrent, Siamese, and dense neural-network architectures. It also tunes model training configurations.
3.4 Deep Learning Model Development
- Deep-learning models are used to detect atrial fibrillation from ECG data.Source: §3.4 · p. 4
3.4.1 Recurrent Neural Network (RNN)
- The RNN processes ECG inputs as sequences and retains information across time steps to learn temporal dependencies between heartbeats [21, 22].Its architecture includes a SimpleRNN layer followed by six dense layers with Leaky ReLU, interspersed dropout, and L2 regularization; training uses Adam and binary cross-entropy.Source: §3.4.1 · p. 4
3.4.2 Siamese Neural Network (SNN)
- The SNN uses two identical, weight-sharing branches to process paired ECG signals and combine their outputs for AFIB-versus-NSR classification.The branches separately process AFIB and NSR signal pairs during training.Source: §3.4.2 · p. 5
3.4.3 Deep Neural Network (DNN)
- The DNN uses dense layers with Leaky ReLU to distinguish normal sinus rhythm from AFIB, while dropout is applied to reduce overfitting.Training uses Adam and binary cross-entropy.Source: §3.4.3 · p. 5
3.4.4 Hyperparemeter optimization
- Hyperparameter optimization searches dropout rates of 0.1–0.5, Adam or SGD, 5–50 epochs, batch sizes of 32–256, activation choices, and layer configurations of 3, 9, 12, or 18.Source: §3.4.4 · p. 5
3.5 Evaluation Methodology
The evaluation uses F1 to assess AFIB detection under class imbalance and adds a duration-based assessment of episode detection. Post-processing smooths interval labels to refine episode boundaries.
3.5 Evaluation Methodology
- F1 is used to evaluate performance in imbalanced AFIB datasets, balancing sensitivity and precision and accounting for false positives and false negatives.Sensitivity and positive predictive value are defined using true positives, false negatives, and false positives.Source: §3.5 · p. 5
3.5.1 Duration-Based Evaluation Method
- The duration-based method evaluates correctly identified AFIB episode duration, while smoothing alternating interval labels to refine episode boundaries and align detections with clinically meaningful patterns [5].The dual evaluation captures both AFIB case identification and episode recognition amid varying rhythms.Source: §3.5.1 · pp. 5–6
3.6 Experiments
The experiments compare training and testing setups designed to assess generalization, ranging from random sample splits to independent datasets and patient-wise partitions.
3.6.1 Experiment 1
- Experiment 1 randomly divides samples into 80/10/10 subsets, so the same patients can appear in training, validation, and testing and weaken generality.Experiment 1a uses MITDB and Experiment 1b uses LTAFDB.Source: §3.6.1 · p. 6
3.6.2 Experiment 2
- Experiment 2 trains and validates on one dataset and tests on the other, using MITDB-to-LTAFDB and LTAFDB-to-MITDB directions.The training dataset is split 80/20 for training and validation; the separate test dataset is intended to assess cross-dataset generalization.Source: §3.6.2 · p. 6
3.6.3 Experiment 3
- Experiment 3 uses a De Chazal interpatient MITDB split, with DS1 for training and DS2 for testing and no patients shared across the sets.The split is designed to address class imbalance and prevent data leakage and overfitting.Source: §3.6.3 · p. 6
4 Results
The results identify the MITDB-trained DNN tested on LTAFDB as the most effective model, reporting a 95.18% F1 score. The paper also describes the DNN as generalizing across datasets and presents results from five experiment settings.
4 Results
- Tables 1–5 cover MITDB/MITDB, LTAFDB/LTAFDB, MITDB/LTAFDB, LTAFDB/MITDB, and DS1/DS2 evaluations.The paper states that these tables report results for each evaluated model across the experiments.Source: Table 1 · p. 6, §4 · p. 6, Table 2 · p. 7
- The authors describe the DNN as generalizing across datasets and cite cross-validation and an additional validation dataset as part of the robustness evaluation.Source: §4 · p. 6
- 95.18% F1: the MITDB-trained DNN was the most effective model when tested on LTAFDB (Table 3).Source: §4 · p. 6, Table 3 · p. 7
5 Discussion
The discussion reports CatBoost’s 96.82% F1 as the best result in this study, while noting that the methods did not achieve the highest scores in related work. It also describes neural networks as effective and emphasizes robustness-oriented evaluation and model tuning.
5 Discussion
- The authors conclude that neural networks have proven effective for AFIB detection.Source: §5 · p. 7
- Because the datasets are imbalanced, the study uses F1; its ensemble evaluation also includes 10-fold cross-validation, performance mean and standard deviation, and hyperparameter tuning.Source: §5 · p. 7
- The authors say success hinges on parameter choice and NN structure; Table 7 lists optimal hyperparameters for each Table 6 train/test pairing.Source: §5 · pp. 7–8, Table 7 · p. 8
- 96.82% F1: CatBoost showed superior performance in this study, although the authors say their methods did not achieve the highest related-work scores.Source: Table 6 · p. 8, §5 · p. 8
6 Conclusion
The conclusion reports that the models outperform prior research using the same evaluation methodology and identifies feature engineering, especially training-subset selection, as an improvement to the process.
6 Conclusion
- The models outperform other research when compared using the same evaluation methodology.The conclusion particularly identifies training only on clean intervals as improving model performance.Source: §6 · p. 8
- The method combines newly derived features, including entropy measures and successive heart-rate differences, with special labeling into five classes.Binary AFIB classification uses the labeling to determine rhythm start and end for duration-based evaluation.Source: §6 · p. 8
- The conclusion identifies DNNs as promising for AFIB detection and emphasizes feature engineering, particularly selecting the training subset, as an improvement to the process.It presents further refinement of neural-network methods as a direction for potential progress.Source: §6 · p. 8