Preprint
Article

Achieving Real-time Prediction of Paroxysmal Atrial Fibrillation Onset by Convolutional Neural Network and Sliding Window on R-R Interval Sequences

Altmetrics

Downloads

84

Views

20

Comments

0

A peer-reviewed article of this preprint also exists.

Submitted:

15 August 2024

Posted:

15 August 2024

You are already at the latest version

Alerts
Abstract
Early diagnosis of paroxysmal atrial fibrillation (PAF) could suggest patients to receive timely interventions in clinical practice. Various PAF onset prediction algorithms might benefit from accurate heart rate variability (HRV) analysis and machine learning classification but to be challenged in real-time monitoring scenarios. The aim of this study is to present an end-to-end deep learning based PAFNet model that integrates a sliding window technique on raw R-R interval of electrocardiogram (ECG) segments to achieve a real-time prediction of PAF onsets. This integration enable the deep convolutional neural network (CNN) to be customized as a light-weight architecture that accommodates the size of sliding windows simply by altering the input layer, specifically its effectiveness in making a new prediction with each new heartbeat. Catering to potential influence of input sizes, three CNN models were trained using 50, 100, and 200 R-R intervals, respectively. For each model, the performance of automated algorithms was evaluated for PAF prediction using a ten-fold cross-validation. As a results, a total of 56,381 PAFN-type and 56,900 N-type R-R interval segments was collected from publicly accessible ECG databases, and a promising prediction performance of the automated algorithm with a 100 R-R intervals was achieved in terms of the sensitivity of 97.12%, the specificity of 97.77%, and the accuracy of 97.45%, respectively. Importantly, the automated algorithm with a sliding windows step of 1 could process one sample in only 23.1 milliseconds and identify the onset of PAF at least 45 minutes in advance. The present results suggest that the sliding window technique on raw R-R interval sequences along by deep learning based algorithms may offers the possibility of providing an accurate, real-time, and end-to-end clinical tool for mass monitoring of PAF.
Keywords: 
Subject: Engineering  -   Bioengineering

1. Introduction

Atrial fibrillation (AF) is a common sustained arrhythmia in clinical practice and can significantly impair quality of life and increase the risk of serious medical conditions, including stroke and heart attack [1]. The prevalence of AF increases with age [2], therefore, as the aging population problem becomes increasingly prominent, the threat of atrial fibrillation to human health becomes increasingly severe. When AF occurs, the disorganized fibrillation of the atrium will reduce the cardiac output and accelerate the formation of a thrombus, which may cause blood vessel block and further lead to life-threatening diseases such as ischemic stroke [3] and myocardial infarction [4].
To evaluate the risk of AF during different phases and take the intervention and treatment in time, AF is commonly divided into different types. Currently, the AF classification according to the presentation, duration, and spontaneous of AF episodes has become a consensus in authoritative guidelines [5], the corresponding five AF types are: first-diagnosed AF, paroxysmal AF (PAF), persistent AF, long-standing persistent AF, and permanent AF. AF usually manifests as PAF at the beginning, which is defined as the AF that terminates spontaneously or with intervention within 7 days of onset. There are many ways to manage and treat AF, including drug therapy, implanted medical instruments, and radio-frequency ablation, but all these methods carry potential risks. For example, drug therapy has been shown to be effective in patients with newly diagnosed AF with a treatment success rate of about 50% [6,7], but in the case of patients with persistent AF, it may not only be less effective but also cause other arrhythmias and even fatal complications. So, to prevent irreversible atrial lesions and prevent the further deterioration of AF, early diagnosis of AF has become particularly important.
Electrocardiogram (ECG) is a commonly used tool that could assist cardiologists to diagnose AF in clinical practice, the development of accurate predictors based on ECG is important for designing high-performance models [5]. Three types of ECG episodes from both normal and PAF subjects are divided as (A) ECG episode of a normal subject under rest state, (B) ECG episode of a PAF subject when AF doesn’t occur, and (C) ECG episode of a PAF subject when AF occurs. Compared with the ECG episode from a normal subject, (B) have occasionally premature beats and subtle changes of R-R interval in the ECG episode from PAF subjects when AF doesn’t occur, which could be used as predictors of the onset of PAF. As such, developing a PAF onset prediction model would be significant for several reasons. First, when AF doesn’t occur, it's difficult to distinguish the ECG of PAF subjects from that of normal subjects. An automatic PAF onset prediction model could assist clinicians in the risk assessment of patients with PAF. Second, the positive prediction result could suggest patients to receive timely interventions, like drug therapy, which could effectively avoid the deterioration of AF in PAF subjects. Third, during postoperative follow-up of radio-frequency ablation surgery, the model is also helpful for assessing the surgical effect [7].
In past decades, many PAF onset prediction algorithms based on machine learning methods have been proposed, with most of these studies based on the extracted heart rate variability (HRV) features including time domain, frequency, nonlinear and time-frequency domain features. In March 2001, the PhysioNet Computing in Cardiology Challenge 2001 was held [8], during which researchers proposed various methods to predict the onset of PAF, such as methods based on HRV features [9,10,11,12], atrial premature contraction numbers [13,14], Rhythm-based heartbeat duration normalization [15] and P-wave morphology [16]. The publicly accessible PAF prediction challenge database (AFPDB) was also provided in this competition, which could be used to train and test the classification model. Recently, Mohebbi [17] extracted spectrum, bispectrum and non-linear features from the 30-minute HRV signal and used a support vector machine (SVM)-based classifier to predict the onset of PAF, achieving a sensitivity of 96.3%. Boon [18] used genetic algorithm to optimize the features extracted from 15 minutes HRV signal and also used SVM classifier to predict the onset of PAF, achieving an accuracy of 79.3%. In another study, they used a shorter 5-minute HRV signal and achieved an accuracy of 87.7% [19]. Narin [20] also used 5 minutes HRV signal for the linear and non-linear features extraction, they used the k-nearest neighbors (KNN) classifier and further discussed the performance of the model for data segments in different time windows. Wang [21] improved the speed of SVM algorithm and gained 92.5% accuracy for the test set of different databases but the required length of the signal was 5 minutes long and the generalization ability (87.0% accuracy) on clinical tests was unsatisfying. Sutton [22] proposed the PhysOnline, an open-source streaming physiological signal analysis platform, and demonstrated the effective online prediction of PAF. Although the HRV analysis commonly used in such studies on the topic of PAF prediction could be well compatible with the feature selection methods and machine learning classifiers, their extraction and selection of hand-crafted features would be inevitably subjective as well as a time consuming and labor-intensive processes. Most recently, couple studies have reported on developing AF detection algorithms using deep learning methods [23,24,25,26,27], showing better performance compared with feature extraction [28,29,30] and machine learning methods [31,32,33]. However, few studies on the topic of PAF prediction based on deep learning methods were presented so far, and a prominent limitation in these machine learning based methods is a poor real-time performance since the time duration of the ECG signal used for HRV analysis is commonly at least couple minutes, which doesn’t meet the requirements of the real-time monitoring scenarios [34].
To address these challenges, this paper proposes a novel deep learning based method for real-time predicting PAF onset, named the PAFNet model. This automated algorithm integrates a sliding window technique on raw R-R interval of ECG segments with an end-to-end convolutional neural network (CNN). This integration enable the CNN model to accommodate the size of sliding windows by only altering the input layer, specifically its effectiveness in making a new prediction with each new heartbeat. This algorithm aims to mitigate traditional PAF prediction methods’ limitations: vulnerability to subjective and poor real-time performance and limited contextual understanding. Our experiments on a variety of publicly accessible ECG databases show that our algorithm improved the prediction accuracy and real-time performance of PAF. The contributions of this paper are:
(1) We propose a novel automated algorithm for real-time predicting PAF onset, which integrates a sliding window on raw R-R interval of ECG segments. This mechanism allows the model to easily adjust the sliding step to meet different application scenarios. We set the sliding step to 1 in this study to meet the real-time monitoring requirements.
(2) We also introduce the CNN model for an end-to-end PAF prediction and classification with only raw R-R interval segments as input samples, which allow the whole system to automatically emphasize important information of input data and avoid inevitable subjective in using machine learning methods.
(3) By comparing the results produced with different input sizes of the model, we found that 100 R-R intervals were the overall improvement in the prediction performance, and 50 and 200 R-R intervals were a relatively lower efficiency in terms of testing time of each sample.
(4) We carried out comprehensive comparative experiments using public datasets to validate the effectiveness of our model. The results demonstrate that our approach performs exceptionally well in PAF prediction tasks and holds promise for real-time applications.
The rest of the article is structured as follows. In Section 2, the databases and the detailed methods both are presented. The methods are evaluated in Section 3. Section 4 discusses the analysis and results. Finally, Section 5 concludes this article by summarizing the achievements and stating possible future applications.

2. Materials and Methods

2.1. Databases

Table 1 shows that we used AFPDB for training and validating PAFNet, while the MIT-BIH Atrial Fibrillation Database (AFDB) and the MIT-BIH Normal Sinus Rhythm Database (NSRDB) were used to test the model's performance and generalization ability. These publicly accessible databases are available from PhysioNet [34] and contain two ECG channels each. As all channels were collected simultaneously and possess the same RR interval information, we used only single-lead ECG to derive the RR interval sequence.
Figure 1 (A) shows the learning set of AFPDB, which contains three types of labeled ECG records: PAF normal (PAFN) type, which is at least 45 minutes away from any AF episodes; PAF onset (PAFO) type, which is just near the onset of AF; and normal (N) type, with each record lasting 30 minutes. To predict the onset of PAF at least 45 minutes in advance, we used 25 PAFN-type ECG records and 25 N-type ECG records.
For the test databases, AFDB includes 25 long-term ECG records from subjects with AF (mostly PAF), and NSRDB includes 18 long-term ECG records from subjects with no significant arrhythmia. We extracted PAFN-type records from AFDB using the same protocol as AFPDB, excluding AF segments less than 5 minutes, atrial flutter segments, and atrial ventricular junction rhythm segments. As a result, we extracted 12 PAFN-type ECG records and 18 N-type ECG records from these two databases, with each record lasting 30 minutes.

2.2. R-R Intervals of ECG Segments

Pre-processing of ECG records through filtering is crucial for improving signal quality and R-wave location accuracy. To reduce different types of noise interferences, we adopted a series of digital filters. First, we used a band-pass filter with a cutoff frequency of 0.1 Hz to 100 Hz to filter out noise beyond the useful frequency range. Next, we removed the baseline drift using a median filter with a window size set to 0.85 of the sampling frequencies. Finally, we used a fourth-order low-pass filter to further eliminate high-frequency noise.
Figures 1 (B) and (C) demonstrate the data segmentation procedure. The R-R interval sequence of PAFN subjects is more fluctuant than that of normal subjects. After pre-processing, we accurately located the R-waves of each ECG record using the difference threshold algorithm, and derived the R-R interval sequence using this equation:
R R i = R i + 1 R i
where R-Ri represents the value of the i-th RR interval, Ri represents the time index of the i-th R-wave, and the index i ranges from 1 to M when the ECG record contains (M+1) R-waves.
We then adopted a sliding window with a size of N on each R-R interval sequence. This window continuously moved from one side to another, and derived a segment containing N R-R intervals during each move. The sliding step could be adjusted according to different application scenarios. In this study, we set the sliding step to 1 to meet the real-time processing requirements and the massive amount of data required for training deep learning models. With a sliding step of 1, we derived (M-N+1) RR interval segments from the whole RR interval sequence.

2.3. Architecture of the PAFNet Model

In this study, we explored a real-time and accurate method for predicting the onset of PAF at least 45 minutes in advance by developing a 1D CNN model. Unlike methods that rely on manually extracted HRV features and traditional machine learning classifiers, end-to-end deep learning techniques avoid the need for hand-crafted feature extraction, thus reducing the loss of ECG information and the limitations of prior knowledge. Among these techniques, CNN is well-suited for image processing and automatic feature extraction, making it ideal for image classification and identification [35]. Similarly, the ECG signal and RR interval sequence contain abundant overall and partial information that can be automatically extracted using CNN to identify specific diseases. The CNN model can extract high-level feature maps from 1D signal, enabling accurate identification of specific patterns related to the onset of PAF.
As shown in Figure 2, PAFNet consisted of 26 layers, including 5 convolutional layers. The input size is the same as the sliding window, with each sample represented by a matrix of one row and N columns, where the column number is the index of the RR interval, and the value is the corresponding RR interval duration in seconds. The 1D convolutional layer, batch normalization layer, activation layer, and 1D maximum pooling layer were abstracted as a block, CBAP layer. The convolutional layer automatically extracted feature maps using kernel techniques, while the batch normalization layer accelerated training and improved accuracy. The activation layer increased the non-linearity of the model, and the pooling layer reduced the scale of the feature map. The flatten layer converted all feature maps into one row as input to the dense layer for the final prediction. The output represents the binary prediction result of PAFNet.
Table 2 displays the details of the PAFNet's architecture, including hyperparameters and activation functions used. The size of the input layer depends on the size of the sliding window, and the size of the output layer is set to 1, which represents the probability that the corresponding sample is PAFN. For the CBAP layer, a convolutional kernel size of 100 and a stride of 16 were selected, and the padding method was set to 'valid'. The ReLU function was used as the activation function. A pooling kernel size of 2 and a stride of 2 were selected to halve the scale of each feature map. The number of output feature maps was set to 16, 32, 64, and 128 for the four CBAP layers, respectively. The size of the flatten layer also depends on the size of the sliding window, and the node number of the first dense layer is set to 2,048. A dropout ratio of 0.5 was used to randomly deactivate half of the nodes during each iteration. The training epoch was set to 9, and the batch size was set to 512.

2.4. Training and Optimization of the PAFNet Model

After determining the model's structure, the next step was to optimize the size of the sliding window. Three types of evaluation metrics were used to assess the model's performance with different input sizes, including testing time per batch. A small input size may result in decreased performance due to insufficient ECG information captured by the sliding window, while a larger input size includes more details but may require more testing time per batch.
The limited total sample number of the databases necessitated the use of a stratified ten-fold cross-validation strategy to optimize and evaluate the performance of the PAFNet model during the training and testing procedures. The training dataset, with a sliding window size of 100, yielded 113,281 RR interval segments, consisting of 56,381 PAFN type and 56,900 N type R-R interval segments. To train PAFNet, all segments were randomly divided into ten parts, with nine parts used for training and one part used for validation. This resulted in ten CNN models being trained and saved, with the prediction result of PAFNet during the testing procedure obtained by averaging the prediction result of these models. The model's performance was evaluated using the receiver operator characteristic (ROC) curve, which compared the prediction results obtained when using samples of different spans before the onset of PAF as input.

2.4. Evaluation Protocols

The ability of PAFNet to predict the onset of PAF was evaluated quantitatively using sensitivity (Sen), specificity (Spe), and accuracy (Acc). The total number of true positive (TP), false negative (FN), true negative (TN), and false positive (FP) were counted for PAFN type as positive and N type as negative, and Sen, Spe, and Acc were calculated based on these statistical parameters.
Finally, based on these statistical parameters, Sen, Spe and Acc were calculated as follows:
S e n = T P T P + F N
S p e = T N T N + F P
A c c = T P + T N T P + F N + T N + F P

3. Results

In this study, the training and testing of the PAFNet model were conducted using the TensorFlow 2.3.0 deep learning framework on a desktop computer equipped with an Intel(R)Core(TM)i9-10900KF CPU@3.70GHz and 64 GB memory. To accelerate processing and reduce training and testing time, an NVIDIA GeForce RTX 3080 GPU with 10 GB memory was also utilized.
Table 3 summarizes the results of the model input size optimization, where three models were trained using input sizes of 50, 100, and 200 R-R intervals, denoted as M1, M2, and M3, respectively. The total parameter count is in the range of millions. The testing results of these models showed that M2 achieved the highest Sen, Spe, and Acc, with values of 89.92%, 93.24%, and 91.96%, respectively. Notably, M2 exhibited a 4% increase in Sen and nearly 1% increase in Spe compared to M1 and M3. Accordingly, the Acc of M2 increased by nearly 2%, indicating an overall improvement in the model performance. In terms of testing time, M2 was the most efficient, taking only 9.3 milliseconds to process one input sample, whereas M1 and M3 took 13.8 milliseconds and nearly 30 milliseconds, respectively, to process a batch of data (i.e., 512 samples). Based on these results, the input size of 100 was selected, and M2 was identified as the optimized model.
Table 4 presents the results of ten-fold cross-validation of the PAFNet model using 100 R-R intervals as input (M2 in Table 3). The sliding window size is set to 100, with a sliding step of 1 as mentioned in section 2. During the ten-fold cross-validation, the 113,281 training and validation samples are randomly shuffled and divided into 10 parts, with each part used once for validation and nine times for training. The fifth and seventh folds show the highest accuracy of 100.00%, while the first fold shows the lowest accuracy of 87.16%, indicating significant variability. Notably, the average validation results are substantially higher than the testing results of Sen, Spe, and Acc for M2 in Table 3, at 97.12%, 97.77%, and 97.45%, respectively.
Figure 3 and Figure 4 present the results of database-level testing to evaluate the generalization ability of the PAFNet model, where the. Figure 3 shows the prediction accuracy of the trained PAFNet using AFPDB, tested using the databases AFDB and NSRDB. Additionally, the evaluation includes input samples of different spans before the onset of PAF. The horizontal axis represents the different spans, which started 75 minutes before the PAF onset, while the vertical axis represents the prediction accuracy. The resultant curve indicates that the accuracy fluctuates around 85% and does not significantly change when the span of the sample varies. Figure 4 depicts the receiver operator characteristic (ROC) curves of the ten models during the ten folds of the stratified ten-fold cross-validation. The bold blue curve denotes the ROC curve of the average prediction results. The proposed PAFNet achieved high performance for both positive and negative samples, and the mean area under the curve (AUC) was about 0.93, with AUC values ranging from 0.91 to 0.97 in each fold.

4. Discussions

4.1. Real-Time PAF Onset Prediction

The HRV analysis was commonly used in studies on the topic of PAF prediction, the extracted HRV features including time domain, frequency, nonlinear and time-frequency domain features could reflect the variability of RR intervals and indirectly reflect the influence of premature beats and other heart rhythms. This kind of method have a relatively mature theoretical system and implementation, and could be well compatible with the feature selection methods and machine learning classifiers, but the time duration of the ECG signal used for HRV analysis is at least 5 minutes which doesn’t meet the requirements of the real-time monitoring scenarios [36].
Unlike the HRV analysis, we proposed a real-time PAF onset prediction method based on the raw RR interval sequence and sliding window technique, which effectively solves the problem of poor real-time performance in traditional PAF prediction methods. Compared with the commonly used HRV analysis, which requires at least a 5-minute ECG signal, our method allows for real-time monitoring scenarios such as ICU PAF monitoring. The sliding window technique enables the capture of RR intervals in a fixed number as the window moves on the RR interval sequence, updating with each new R wave detected by the R wave location algorithm. The highly effective PAF prediction algorithm, which processes one sample in only 23.1 milliseconds, allows for the whole system to make a new prediction with each new heartbeat, meeting the requirements of real-time PAF onset prediction scenarios. This method offers a promising approach for real-time PAF prediction, with potential for further development and application in clinical settings. To explore the scalability of the model, we change the number of blocks. As Table V shows, when the number of blocks increases, the total parameters and testing time increase, and the ten-fold average ACC is higher. However, when we change the number to 5, the performance doesn’t improve much with double parameters. As a result, we choose 4 blocks.

4.2. Performance Compared with Other Methods

Our proposed method for predicting PAF offers several advantages, including the use of deep learning to improve prediction accuracy. We used the CNN technique to achieve end-to-end prediction and classification, with raw RR interval segments as input samples to preserve ECG information. PAF prediction requires longer ECG signals than AF detection or classification, as shown in Table 3. When the input size was set to 50 (approximately 30-50 seconds ECG signal), the prediction accuracy was 89.74%. Increasing the input size to 100 didn't significantly improve accuracy, which was 91.42%, approximately equal to the accuracy achieved with an input size of 200. However, increasing the input size results in a smaller total number of samples, which is why deep learning is rarely used in related studies. To address this issue, we adopted a sliding window with a step of 1 RR interval, generating a sufficient training database. Using this methodology, we achieved high accuracy in predicting PAF and demonstrated the effectiveness of our approach.
Table 4 shows the benchmarking results of our proposed method against other previous studies. Our PAFNet performed better than most studies using machine learning methods. These studies used input sizes varying from 5 to 30 minutes to extract different HRV features and employed classifiers such as SVM and KNN to predict PAF. Compared to these studies, our proposed PAFNet achieved higher Sen, Spe, and Acc than studies using input sizes of 5 and 15 minutes [3,5,6]. However, the study by Mohebbi [1] showed better performance than ours, likely due to their use of the whole 30 minutes ECG from each record, which sacrificed real-time performance for improved prediction accuracy. Additionally, their studies didn’t conduct database-level tests. Wang [8] developed models with competitive performance on testing, but their model requires a 5-minute input and hand-crafted P wave, which is significantly longer than the input length required for our proposed method. Overall, our proposed PAFNet demonstrates the effectiveness of deep learning approach, outperforming most previous studies using machine learning methods.

4.3. Study Limitations and Future Works

Although this study proposed a real-time PAF prediction model that outperformed many previous studies, there are still some limitations. Firstly, while the total number of R-R intervals samples is enough for training the PAFNet model and the demonstrated competitive performance outperforms most previous studies validated in the same publicly accessible database of AFPDB, the number of ECG records of patients is limited, resulting in insufficient variation in the ECG signals and a fluctuation in the performance in the inter-database testing. It indicates that the generalization ability of the PAFNet could to be further improved with a larger scale of patients in the future. Secondly, all the programs were deployed on a desktop computer with an efficient GPU in this study. Future studies could focus on hardware implementation to test the real-time performance of the model on embedded systems with limited resources and processing performance. Making the PAFNet lighter could be achieved by reducing the number of blocks, the size of the sliding window, and increasing the step length. These limitations highlight opportunities for further research to improve the performance and applicability of the PAF prediction model.

5. Conclusions

The ability to predict PAF at least 45 minutes in advance can help clinicians assess the risk of PAF events and provide timely intervention for patients. However, previous PAF prediction studies based on HRV analysis and traditional machine learning methods have had limitations such as unsatisfactory real-time processing speed and prediction performance. This study proposes a novel deep learning based PAFNet model that integrates the sliding window to achieve a real-time PAF onset prediction. This integration enable the CNN model to accommodate the size of sliding windows by only altering the input layer, specifically its effectiveness in making a new prediction with each new heartbeat. Meanwhile, the model requires only a single-lead ECG signal as input to extract the R-R interval sequence, making it suitable for clinical application even in scenarios with limited medical resources and conditions. Our results suggest that the customized lightweight 26-layer CNN, with five weighted layers paired with a sliding window of length 100 R-R intervals, can achieve relatively high performance and may offer a real-time, accurate, and inexpensive clinical tool for predicting PAF events. In conclusion, the PAFNet provides a promising approach to improve PAF prediction performance and has the potential to be a valuable tool for clinicians in identifying and treating PAF events.

Author Contributions

Conceptualization, W.C. and P.Z.; methodology, W.C. and Y. B; data curation, W.C., and Y. X.; formal analysis, W.C. and P. Z; writing—original draft preparation, W.C., P. Z.; writing—review and editing, Y. X. and D. L.; Funding, Y. X., All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China under Grant No. 61771100.

Data Availability Statement

the MIT-BIH Atrial Fibrillation Database (AFDB) and the MIT-BIH Normal Sinus Rhythm Database (NSRDB) are publicly accessible from PhysioNet.

Acknowledgments

In this section, you can acknowledge any support given which is not covered by the author contribution or funding sections. This may include administrative and technical support, or donations in kind (e.g., materials used for experiments).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Calkins H., Hindricks G., Cappato R., et al. 2017 HRS/EHRA/ECAS/APHRS/SOLAECE expert consensus statement on catheter and surgical ablation of atrial fibrillation. Heart Rhythm, vol. 14, no. 10, pp. e275-e444, 2017.
  2. Colilla S, Crow A, Petkun W, Singer DE, Simon T, Liu XC, et al. Estimates of Current and Future Incidence and Prevalence of Atrial Fibrillation in the US Adult Population. American Journal of Cardiology 2013; 112(8):1142-1147. [CrossRef]
  3. Boon KH, Khalil-Hani M, Malarvili MB, and Sia CW. Paroxysmal atrial fibrillation prediction method with shorter HRV sequences. Computer Methods and Programs in Biomedicine 2016; 134:187-196. [CrossRef]
  4. Chiang CE, Okumura K, Zhang S, Chao TF, Siu C, Wei L, et al. 2017 consensus of the Asia Pacific Heart Rhythm Society on stroke prevention in atrial fibrillation. Journal of Arrhythmia 2017; 33(4):345-367. [CrossRef]
  5. Boon KH, Khalil-Hani M, and Malarvili MB. Paroxysmal atrial fibrillation prediction based on HRV analysis and non-dominated sorting genetic algorithm III. Computer Methods and Programs in Biomedicine 2017; 153:171-184. [CrossRef]
  6. Narin A, Isler Y, Ozer M, and Perc M. Early prediction of paroxysmal atrial fibrillation based on short-term heart rate variability. Physica A 2018;509:56-65. [CrossRef]
  7. Soliman EZ, Safford MM, Muntner P, Khodneva Y, Dawood FZ, Zakai NA, et al.. Atrial Fibrillation and the Risk of Myocardial Infarction. JAMA Internal Medicine 2014;174(1): E107-E114. [CrossRef]
  8. Wang LH, Yan ZH, Yang YT, Chen JY, Yang T, Kuo IC, et al. A Classification and Prediction Hybrid Model Construction with the IQPSO-SVM Algorithm for Atrial Fibrillation Arrhythmia. Sensors-Basel 2021; 21(15). [CrossRef]
  9. Hindricks G, Potpara T, Dagres N, Arbelo E, Bax JJ, Blomstrom-Lundqvist C, et al. 2020 ESC Guidelines for the diagnosis and management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS). European Heart Journal 2021;42(5):373-498. [CrossRef]
  10. Chen WS, Gao BR, Chen WQ, Li ZZ, Xu ZY, Zhang YH, et al. Comparison of pharmacological and electrical cardioversion in permanent atrial fibrillation after prosthetic cardiac valve replacement: A prospective randomized trial. Journal of Medical Internet Research 2013;41(4):1067-1073. [CrossRef]
  11. Gitt AK, Smolka W, Michailov G, Bernhardt A, Pittrow D, Lewalter T, et al. Types and outcomes of cardioversion in patients admitted to hospital for atrial fibrillation: results of the German RHYTHM-AF Study. Clinical Research in Cardiology 2013;102(10):713-723. [CrossRef]
  12. Moody GB, Goldberger AL, McClennen S, and Swiryn SP. Predicting the onset of paroxysmal atrial fibrillation. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online]. Available: <Go to ISI>://WOS:000173806400029.
  13. de Chazal P and Heneghan, C. Automated assessment of atrial fibrillation. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400030.
  14. Lynn KS and Chiang, HD. A two-stage solution algorithm for paroxysmal atrial fibrillation prediction. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400103.
  15. Krstacic G, Gamberger D, Smuc T, and Krstacic A. Some important R-R interval based paroxysmal atrial fibrillation predictors. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400104.
  16. Maier C, Bauch M, and Dickhaus H. Screening and prediction of paroxysmal atrial fibrillation by analysis of heart rate variability parameters. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400033.
  17. Yang ACC and Yin, HW. Prediction of paroxysmal atrial fibrillation by footprint analysis. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400102.
  18. Langley P, di Bernardo D, Allen J, Bowers E, Smith FE, Vecchietti S, et al. Can paroxysmal atrial fibrillation be predicted? In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400031.
  19. Zong W, Mukkamala R, and Mark RG. A methodology for predicting paroxysmal atrial fibrillation based on ECG arrhythmia feature analysis. In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online]. Available: <Go to ISI>://WOS:000173806400032.
  20. Islam MS, Ammour N, Alajlan N, and Aboalsamh H. Rhythm-based heartbeat duration normalization for atrial fibrillation detection. Computers in Biology and Medicine 2016; 72:160-9. [CrossRef]
  21. Schreier G, Kastner P, and Marko W. An automatic ECG processing algorithm to identify patients prone to paroxysmal atrial fibrillation In: Proc. The Computers in Cardiology Challenge 2001, Rotterdam, Netherlands, 2001. [Online] Available: <Go to ISI>://WOS:000173806400034.
  22. Sutton JR, Mahajan R, Akbilgic O, and Kamaleswaran R. PhysOnline: An Open Source Machine Learning Pipeline for Real-Time Analysis of Stream Physiological Waveform. IEEE Journal of Biomedical and Health Informatics 2019; 23(1): 59-65. [CrossRef]
  23. Acharya UR, Fujita H, Lih OS, Hagiwara Y, Tan JH, Adam M, et al. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Information Sciences 2017; 405: 81-90. [CrossRef]
  24. Fan X, Yao Q, Cai Y, Miao F, Sun F, Li Y, et al. Multiscaled Fusion of Deep Convolutional Neural Networks for Screening Atrial Fibrillation From Single Lead Short ECG Recordings. IEEE Journal of Biomedical and Health Informatics 2018; 22 (60:pp. 1744-1753. [CrossRef]
  25. Hannun AY, Rajpurkar P, Haghpanahi M, Tison GH, Bourn C, Turakhia MP, et al. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nature Medicine 2019; 25(1):65-72. [CrossRef]
  26. Kamaleswaran R, Mahajan R, and Akbilgic O. A robust deep convolutional neural network for the classification of abnormal cardiac rhythm using single lead electrocardiograms of variable length. Physiological Measurement 2018; 39(3):035006. [CrossRef]
  27. Rubin J, Parvaneh S, Rahman A, Conroy B, and Babaeizadeh S. Densely connected convolutional networks for detection of atrial fibrillation from short single-lead ECG recordings. Journal of Electrocardiology 2018; 51(6):S18-S21. [CrossRef]
  28. Lian J, Wang L, and Muessig D. A Simple Method to Detect Atrial Fibrillation Using RR Intervals. American Journal of Cardiology 2011; 107(10):1494-1497. [CrossRef]
  29. Stridh M, Sornmo L, Meurling CJ, and Olsson SB. Sequential characterization of atrial tachyarrhythmias based on ECG time-frequency analysis. IEEE Transactions on Biomedical Engineering 2004; 51(1):100-114. [CrossRef]
  30. Roonizi EK and Sassi, R. An Extended Bayesian Framework for Atrial and Ventricular Activity Separation in Atrial Fibrillation. IEEE Journal of Biomedical and Health Informatics 2017; 21(6):1573-1580. [CrossRef]
  31. Mehta S, Lingayat N, and Sanghvi S. Detection and delineation of P and T waves in 12-lead electrocardiograms. Expert Systems 2009; 26(1):125-143. [CrossRef]
  32. Ladavich S and Ghoraani, B. Developing An Atrial Activity-Based Algorithm For Detection Of Atrial Fibrillation. In: Proc. the IEEE 2014 36th Annual International Conference of the Ieee Engineering in Medicine and Biology Society, Chicago, IL, USA, 2014. [Online] Available: <Go to ISI>://WOS:000350044700014.
  33. Kennedy A, Finlay DD, Guldenring D, Bond RR, Moran K, McLaughlin J, et al. Automated detection of atrial fibrillation using R-R intervals and multivariate-based classification. Journal of Electrocardiology 2016; 49(6):871-876. [CrossRef]
  34. Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PC, Mark RG, et al. PhysioBank, PhysioToolkit, and PhysioNet-Components of a new research resource for complex physiologic signals. Circulation 2000; 101(23):E215-E220. [CrossRef]
  35. LeCun Y, Bengio Y, and Hinton G. Deep learning. Nature 2015; 521(7553):436-444. [CrossRef]
  36. Camm AJ, Malik M, Bigger JT, Briethardt G, Cerutti S, Cohen RJ, et al. Heart rate variability-Standards of measurement, physiological interpretation, and clinical use. Circulation 1996; 93(5):1043-1065. [CrossRef]
Figure 1. Demonstration of the data segmentation used for training PAFNet. (A) Two types of 30-minute ECG records before the onset of AF are shown: PAF normal (PAFN) type, which is at least 45 minutes away from any AF episodes, and PAF onset (PAFO) type, which is just before the onset of AF. (B) An example of the RR interval sequence derived from a PAFN record and the corresponding data segmentation based on the sliding window technique. (C) An example of the RR interval sequence derived from a normal sinus record.
Figure 1. Demonstration of the data segmentation used for training PAFNet. (A) Two types of 30-minute ECG records before the onset of AF are shown: PAF normal (PAFN) type, which is at least 45 minutes away from any AF episodes, and PAF onset (PAFO) type, which is just before the onset of AF. (B) An example of the RR interval sequence derived from a PAFN record and the corresponding data segmentation based on the sliding window technique. (C) An example of the RR interval sequence derived from a normal sinus record.
Preprints 115331 g001
Figure 2. Illustration of the model structure of the proposed CNN model, named as PAFNet in this study. The 1D convolutional layer, batch normalization layer, activation layer and 1D max pooling layer are abstracted as CBAP layer.
Figure 2. Illustration of the model structure of the proposed CNN model, named as PAFNet in this study. The 1D convolutional layer, batch normalization layer, activation layer and 1D max pooling layer are abstracted as CBAP layer.
Preprints 115331 g002
Figure 3. Comparison of the model classification accuracy using the ECG signals in different time periods before the onset of AF as the input data of PAFNet.
Figure 3. Comparison of the model classification accuracy using the ECG signals in different time periods before the onset of AF as the input data of PAFNet.
Preprints 115331 g003
Figure 4. Receiver operating characteristic (ROC) curves of the ten folds during the model test.
Figure 4. Receiver operating characteristic (ROC) curves of the ten folds during the model test.
Preprints 115331 g004
Table 1. ECG Datasets.
Table 1. ECG Datasets.
Database Number of Records (n) Number of
R-R intervals (n)
Training and validation AFPDB (PAFN) 25 56,381
AFPDB (N) 25 56,900
Testing AFDB (PAFN) 12 27,836
NSRDB (N) 18 44,087
Table 2. The architecture of the proposed PAFNet.
Table 2. The architecture of the proposed PAFNet.
Number Layer type Number of feature maps or nodes Parameters Number Layer type Number of feature maps or nodes Parameters
1 input changing with the size of the sliding window N 14 BN * - -
2 convolutional 16 size: N, kernel: 8, padding="same" 15 activation - ReLU
3 BN - - 16 pooling - size: 2
4 activation - ReLU 17 convolutional 256 size: N/16, kernel: 8, padding="same"
5 convolutional 32 size: N/2, kernel: 8, padding="same" 18 BN - -
6 BN - - 19 activation - ReLU
7 activation - ReLU 20 pooling - size: 2
8 pooling - size: 2 21 Flatten - -
9 convolutional 64 size: N/4, kernel: 8, padding="same" 22 Dense 512 -
10 BN - - 23 BN - -
11 activation - ReLU 24 activation - ReLU
12 pooling - size: 2 25 dropout - 0.25
13 convolutional 128 size: N/8, kernel: 8, padding="same" 26 Dense output 1 activation function: Sigmoid
* BN = Batch Normalization.
Table 3. Results of three models with different input sizes of R-R intervals.
Table 3. Results of three models with different input sizes of R-R intervals.
Model Input size(n) Sen (%) Spe (%) Acc (%) Testing time
(ms / batch)
Totalparams
M1 50 85.44 92.45 89.74 13.8 878,017
M2 100 89.92 93.24 91.96 23.1 1,271,233
M3 200 88.17 93.47 91.42 43.0 2,057,665
Table 4. Results of ten-fold cross validation using 100 R-R intervals overlapped window as input.
Table 4. Results of ten-fold cross validation using 100 R-R intervals overlapped window as input.
Fold Training data (rows) Validation data(rows) Sen (%) Spe (%) Acc (%)
1 11329-113281 1-11328 82.11 92.09 87.16
2 1-11328,22656-113281 11328-22656 95.34 87.84 91.63
3 1-22656, 33984-113281 22656-33984 98.74 98.86 98.80
4 1-33984, 45312-113281 33984-45312 99.39 99.39 99.39
5 1-45312, 56640-113281 45312-56640 100.00 100.00 100.00
6 1-56640, 67968-113281 56640-67968 98.76 99.95 99.35
7 1-67968, 79296-113281 67968-79296 100.00 100.00 100.00
8 1-79296, 90624-113281 79296-90624 98.47 100.00 99.21
9 1-90624, 101952-113281 90624-101952 98.43 99.54 98.98
10 1-101952 101952-113281 100.00 100.00 100.00
Mean - - 97.12 97.77 97.45
Var * 0.0030 0.0018 0.0019
* Var = variance.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated