An artificial intelligence-enabled ECG algorithm for identifying ventricular premature contraction during sinus rhythm
European Journal of Medical Research volume 27, Article number: 289 (2022)
Ventricular premature complex (VPC) is a common arrhythmia in clinical practice. VPC could trigger ventricular tachycardia/fibrillation or VPC-induced cardiomyopathy in susceptible patients. Existing screening methods require prolonged monitoring and are limited by cost and low yield when the frequency of VPC is low. Twelve-lead electrocardiogram (ECG) is low cost and widely used. We aimed to identify patients with VPC during normal sinus rhythm (NSR) using artificial intelligence (AI) and machine learning-based ECG reading.
We developed AI-enabled ECG algorithm using a convolutional neural network (CNN) to detect the ECG signature of VPC presented during NSR using standard 12-lead ECGs. A total of 2515 ECG records from 398 patients with VPC were collected. Among them, only ECG records of NSR without VPC (1617 ECG records) were parsed.
A total of 753 normal ECG records from 387 patients under NSR were used for comparison. Both image and time-series datasets were parsed for the training process by the CNN models. The computer architectures were optimized to select the best model for the training process. Both the single-input image model (InceptionV3, accuracy: 0.895, 95% confidence interval [CI] 0.683–0.937) and multi-input time-series model (ResNet50V2, accuracy: 0.880, 95% CI 0.646–0.943) yielded satisfactory results for VPC prediction, both of which were better than the single-input time-series model (ResNet50V2, accuracy: 0.840, 95% CI 0.629–0.952).
AI-enabled ECG acquired during NSR permits rapid identification at point of care of individuals with VPC and has the potential to predict VPC episodes automatically rather than traditional long-time monitoring.
Ventricular premature complex (VPC), also known as ventricular extrasystole, is a commonly encountered arrhythmia worldwide . According to the previous studies, the prevalence of VPC is around 1–4% in the general populations on standard 12-lead electrocardiography (ECG) . Additionally, increasing age, male gender, atherosclerosis, hypertension, and cardiomyopathy are related to higher occurrence of VPC . Clinically, VPC without any symptoms have been seemed to be benign. However, frequent VPC attacks are associated with cardiomyopathy and irreversible pathogenesis . Especially for those with structurally heart diseases, the incidence and complexity of VPC also increase, up to 90% in ischemic cardiomyopathy . Thence, VPC seems to be the signals for increasing risk of sudden death or the clues for underlying cardiomyopathy. Consequently, timely prediction and intervention of VPC attack might eliminate its arrhythmogenic source and reverse progressive cardiomyopathy.
Clinically, the conventional 12-lead electrocardiogram (ECG) has been used to monitor cardiac structure and physiological condition for decades. ECG is non-invasive, easy to use, rapid, low cost in the resource setting, and simple for interpretations . Due to these characteristics, several ECG monitoring systems are exploited to analyze the signals of ECG . In order to interpret these enormous amount data immediately, deep learning has been widely used to read ECG signals and artificial intelligence (AI) technique is suitable to process countless ECG signals without human intervention and offer accurate diagnoses automatically .
However, most of the patients present with intermittent VPC and occasionally all the ECG-related examinations or monitoring are negative for the definite diagnosis of VPC. We need a tool to identify patients with VPC using ECG during sinus rhythm. It has been shown that AI-enabled ECG algorithm can identify patients with paroxysmal atrial fibrillation using ECG during sinus rhythm. In this study, we used the automatic deep-learning neural network to identify the high-risk VPC populations using their ECGs during sinus rhythm for VPC attack to facilitate point of care and hope to prevent severe cardiovascular events in advance.
Data collection and parsing
The data were collected from patients with the diagnosis of VPC at the National Taiwan University Hospital, Taipei, Taiwan from Jan/2021 to Oct/2021. Initially, 398 patients were enrolled and 2515 ECG records were checked. Only ECG during sinus rhythm without the diagnoses of VPC was parsed and finally 1617 ECG records were double-checked by two cardiologists and labeled as sinus rhythm from patients with VPC. For the control group, 1053 patients with 2090 ECG records were collected and screened. Finally, 753 normal ECG records from 387 patients were picked up and marked as normal sinus rhythm (NSR). This study was approved by the ethics committee and institutional review board (IRB) on human research of the Medical Research Department of National Taiwan University Hospital, Taipei, Taiwan (IRB NO: 201705122RINC) and informed consent was waived because identification data on ECGs were removed before they were sent for analyses.
The datasets were divided into the training set, validation set, and test set. First, 50 ECG records were chosen randomly for the validation set and another 100 ECG records were selected for the test set. The rest of the data were assigned to the training set. Importantly, the data of the same patient could not belong to more than one dataset, otherwise, it would affect the credibility of the final results.
Data type and pre-process
The ECG records collected were in the format of standard 12-lead ECG images, including lead I, II, III, V1 ~ 6, aVR, aVL, aVF, and long lead II (MAC2000 resting ECG System, GE Healthcare). All the records were measured at the frequency of 500 Hz and duration was 2.5 s. Before data analysis, the red-grid backgrounds of the ECG images were removed and coped to make the whole images to be precisely focused on the ECG signals (Fig. 1).
After that, the ECG images were adjusted to be 512 × 256 × 3 pixels. The two-dimensional ECG images were converted into the one-dimensional and time-series data. The input data size was 1250 × 12 pixels for convolutional neural network (CNN) to perform the image recognition (Fig. 2).
We set up CNN models according to the dimensional characteristics of the data formats. For the 2-dimensional image data, we used five network computer architectures, including VGG16 , ResNet50V2 , InceptionV3 , InceptionResNetV2 , and Xception  to get the best image recognition with the Image Net part of CNN (Fig. 3a). After the features of the image data were extracted by CNN, the signals were flattened by Global Average Pooling (GAP)  and another dense layer was connected. Dropout was added to avoid overfitting later on (drop rate = 0.5) (Fig. 3b) . Finally, another dense layer with a size of two was added, which represented two-type results as output layer (VPC and NSR) (Fig. 3b). For the time-series data, we used single-input and multiple-input computer architectures for the models processing. Initially, we changed the convolutional kernel into a one-dimensional kernel and different kernel sizes were tried by the CNN. The stride was set to three and the moving window of the convolutional kernel spans three grids at once. Each convolutional block was composed of one-dimensional CNN activation by BatchNormalization  and ReLU . The setting of Maxpooling  was pooling size equal to 5 and stride equal to 3. After the signals of features were extracted through the CNN layers, they were flattened by GAP. The output features of the single-input model were directly connected to dropout (dropout rate = 0.5) to avoid overfitting (Fig. 3c). On the other hand, the multiple-input model merged twelve channels’ features together and connected to one dense layer (dense size = 2) to get the output result (Fig. 3c).
We used Google Colaboratory (Colab)  with high-Random Access Memory Graphics Processing Unit environment as the training platform. This Colab was supported by the Python 3.8 and Tensorflow package  for CNN training process. We also used the keras Application Programming Interface (API) (one deep-learning API written in Python) to build CNN models and ImageNet competition for transferring and learning. The settings of the APIs and the training parameters are shown in Table 1.
Optimal cut-points and measurements of diagnostic performance included accuracy, sensitivity, specificity, positive predictive value, negative predictive value, and area under the curve (AUC) of the receiver operating characteristic curve (ROC). All were reported with 2-sided 95% confidence interval. The data were analyzed by IBM SPSS (Version 25 for Windows, Armonk, New York) for statistical analysis.
Performance of the image-input model
Among all included patients, the mean age was 62.4 years (standard deviation 14.3) on the date of the first ECG, and 750 (52%) patients were men. In this study, we used different test sets to evaluate the different pre-trained CNN models with various sizes of the dense and the fully connected layers. The five network computer architectures including VGG16 , ResNet50V2 , InceptionV3 , InceptionResNetV2 , and Xception  were used to choose the best model with the highest accuracy for the following training process. Eventually, the InceptionV3  of the CNN model connected with the dense layer (size = 512) was chosen as the core CNN model for the image format datasets. The accuracy was the highest in comparison with the other combinations (accuracy = 0.895, sensitivity = 0.907, and specificity = 0.883, 95% CI) (Fig. 4). The AUC of the ROC for this model architecture was 0.941 (Fig. 5).
Performance of the time-series-input model
For the time-series data, we evaluated different sizes of convolution kernels to find the best combination. The best kernel size was 7 to perform the single-input model and 11 for the multi-input model (Table 2). In the multi-input model, the CNN channel needed to analyze the signals of all the twelve leads at the same time. The complexity was relatively higher than that of the single-input model which just needed to analyze one-lead signal. Additionally, the multi-input model used parallelization of analysis. Therefore, the accuracy of the multi-input model was 4% higher than the single-input model (single-input model: 0.840 and multi-input model: 0.880, 95% CI) (Table 3). The accuracy of the multi-input time-series model was still lower than but very close to that of the image-input model (0.880 vs. 0.895).
In this study, our AI model enabled to record ECG signals and detect the presence of VPC during normal sinus rhythm (AUC: 0.941). The accuracy was comparable with a previous study using AI-enable ECG to identify AF during normal sinus rhythm (AUC: 0.87; 95% CI: 0.86–0.88)  and were better with other medical screening tests such as CHADS2 score (AUC: 0.64; 95% CI: 0.56–0.72 and CHA2DS2-VASc score (AUC: 0.67; 95% CI, 0.60–0.74) for prediction of ischemic strokes .
The importance for VPC detection during sinus rhythm
Although VPC seems to be benign, it is associated with increasing cardiovascular events. From the Framingham Heart study , the Multiple Risk Factor Intervention Trial (MRFIT) , and the Atherosclerosis Risk in Communities Study (ARIC) studies , VPC has been demonstrated as an independent risk factor for mortalities of the patients without structural heart diseases . VPC is also recognized to trigger ventricular tachycardia/fibrillation and cause sudden cardiac death (SCD) or unexplained syncope in patients without ischemic cardiomyopathy . Additionally, patients with frequent VPCs (defined as > 1 VPC on a 10-s ECG or > 30 VPCs in an hour) are associated with incent heart failure and sudden cardiac death . Besides, patients with frequent VPCs are risky to suffer from VPC-induced cardiomyopathy even though they are asymptomatic .
The ability to identify undetected VPC with an inexpensive, widely available, point-of-care test—an ECG recorded during normal sinus rhythm—has important practical implications, particularly for VPC screening efforts or for the management of patients with unexplained syncope or chest discomfort, especially for those with a familial history of SCD. This study shows the power of leveraging modern computing technology, large datasets, non-linear models, and automated features extraction using convolution layers to potentially improve diagnosis and treatment of a disease with a life-threatening state. When VPC is found, treatment could be initiated early. Catheter ablation significantly improves the outcome . Several large, prospective, randomized studies have also shown that implantation of implantable cardioverter defibrillator (ICD) improves survivals for those with life-threatening ventricular arrhythmia [3, 23].
Prolonged ambulatory monitoring of patients with unexplained syncope or SCD may identify VPCs. Thus, short-term monitoring may under-detect VPC and leave a substantial proportion of patients unprotected from SCD until such time as VPC is detected. However, prolonged monitoring is expensive and can prove a burden to patients and clinical practices. Thus, identifying those patients who would most benefit from intensive monitoring would be valuable in patients with aborted. Our data indicate that a simple, inexpensive, non-invasive, 10-s test—the AI-enhanced standard ECG—might permit identification of patients with under-detected VPC. Further investigations will be necessary to confirm the diagnostic performance of AI-enabled ECG in specific populations, such as patients with SCD or unexplained syncope and chest tightness, to determine whether AI-enabled ECG could be used to refine the selection of candidates for prolonged ambulatory cardiac rhythm monitoring or to guide treatment in these patients.
The dimensionality of 12-lead ECG data
While applying CNN analysis in the 12-lead ECG, the one-dimensional approach treats the ECG data as a time-series format. On the other hand, CNN extracts all the features of 12-lead ECG with kernels during two-dimensional data processing. The CNN kernels could be activated by specific wave patterns and recognized by the neural network analysis subsequently . Therefore, two-dimensional analysis is taking the data as an image, more similar to the cardiologist’s way to interpret the 12-lead ECG. However, the two-dimensional data volume is gigantic and much complicated than the one-dimensional data format. Therefore, the general AI tools could not analyze the 12-lead ECG stored with images format . In order to encounter difficulties to analyze these large amounts and complicated two-dimensional data, we used several networks available and different computer architecture combinations to get the best accuracy of VPC prediction by the CNN model. The CNN-based model for VPC prediction from the two-dimensional data was the important feature of this study. This had not been performed successfully before. After optimizing the input model architecture, our two-dimensional CNN model could identify the abnormal ECG and classify the high-risk populations before VPC attacked by the automatic learning paradigm.
From the previous study, the AI-driven algorithms had been applied in automatic diagnosis for various diseases , such as myocardial infarction needing urgent revascularization , systolic heart failure , subtle potassium change among the high-risk populations , and atrial fibrillation [25,26,27]. However, most of these studies were based on the single-lead ECG or one-dimensional (time-series) datasets. From our results, the CNN model derived from the 12-lead ECG and two-dimensional data format was reliable to predict VPC attack automatically and the accuracy was even better than one-dimensional or time-series results (0.895 vs. 0.880). Our study demonstrated the possibility to implement CNN model to identify VPCs using either one-dimensional or two-dimensional data.
Mechanism by which AI could identify patients with VPC under normal sinus rhythm
The structural changes that underline VPC, which might include myocyte hypertrophy, fibrosis, and chamber enlargement, are likely to lead to subtle ECG changes, allowing for prediction of underlying VPC. This is very similar to using signal average ECG to detect late potentials that could not be observed by human eyes through a single ECG [28, 29]. Furthermore, although seldom reported on ECGs, subtle intraventricular block may correlate with both subtle myocardial fibrosis and risk of VPC or SCD . Thus, it is possible that wavelets on the ECG smaller than the readily observable wave might reflect regional conduction block in these patients. A neural network trained with exposure to plenty of ECGs and with sufficient depth to extract and recall subtle features not routinely appreciated or formally reported by human observers might be powerful enough to identify such features. Finally, it has been reported that AI-enabled ECG may predict left ventricular function , and lower left ventricular ejection fraction has been shown as a strong predictor of ventricular arrhythmia .
This is one-center study. The results of our observational study may justify future randomized clinical trials for this purpose.
In this study, the CNN neural network demonstrated as a promising tool for comprehensively human-like interpretation of the ECG. The deep-learning CNN model showed a satisfactory performance in the high-dimensional datasets for the VPC prediction. It will have a great potential deployment in the clinical arena and largely unpredictable implications in the future. However, a key limitation in existing neural networks is explainable. Identifying these features could be of importance because they might offer novel findings that could provide new therapeutic targets or allow for more certainty for clinicians who are otherwise trying to understand what drives the network’s interpretation. Finding ways to peer into this so-called black box is an area of active ongoing investigation.
Availability of data and materials
All data relevant to this study are included in this manuscript.
Luebbert J, Auberson D, Marchlinski F. Premature ventricular complexes in apparently normal hearts. Card Electrophysiol Clin. 2016;8:503–14. https://doi.org/10.1016/j.ccep.2016.04.001.
Gorenek B, et al. Premature ventricular complexes: diagnostic and therapeutic considerations in clinical practice: a state-of-the-art review by the American College of Cardiology Electrophysiology Council. J Interv Card Electrophysiol. 2020;57:5–26. https://doi.org/10.1007/s10840-019-00655-3.
Ip JE, Lerman BB. Idiopathic malignant premature ventricular contractions. Trends Cardiovasc Med. 2018;28:295–302. https://doi.org/10.1016/j.tcm.2017.11.004.
Rincon JA, Guerra-Ojeda S, Carrascosa C, Julian V. An IoT and Fog computing-based monitoring system for cardiovascular patients with automatic ECG classification using deep neural networks. Sensors (Basel). 2020. https://doi.org/10.3390/s20247353.
Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 2014.
He K, Zhang X, Ren S, Sun J. in European conference on computer vision. 630–645 (Springer).
Szegedy C, Vanhoucke V, Ioffe S, Shlens J, Wojna Z in Proceedings of the IEEE conference on computer vision and pattern recognition. 2818–2826.
Szegedy C, Ioffe S, Vanhoucke V, Alemi AA. in Thirty-first AAAI conference on artificial intelligence.
Chollet F. in Proceedings of the IEEE conference on computer vision and pattern recognition. 1251–1258.
Lin M, Chen Q, Yan S. Network in network. arXiv preprint arXiv:1312.4400 2013.
Hinton GE, Srivastava N, Krizhevsky A, Sutskever I, Salakhutdinov RR. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580 2012.
Ioffe S, Szegedy C. in International conference on machine learning. 448–456 (PMLR).
Xu B, Wang N, Chen T, Li M. Empirical evaluation of rectified activations in convolutional network. arXiv preprint arXiv:1505.00853 2015.
Graham B. Fractional max-pooling. arXiv preprint arXiv:1412.6071 2014.
Bisong E. Building machine learning and deep learning models on Google cloud platform: A comprehensive guide for beginners. 2019.
Abadi, M. et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467 2016.
Attia ZI, 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:861–7. https://doi.org/10.1016/s0140-6736(19)31721-0.
Wu JT, et al. CHADS(2) and CHA(2)DS(2)-VASc scores predict the risk of ischemic stroke outcome in patients with interatrial block without atrial fibrillation. J Atheroscler Thromb. 2017;24:176–84. https://doi.org/10.5551/jat.34900.
Bikkina M, Larson MG, Levy D. Prognostic implications of asymptomatic ventricular arrhythmias: the Framingham Heart Study. Ann Intern Med. 1992;117:990–6. https://doi.org/10.7326/0003-4819-117-12-990.
Cohen JD, Neaton JD, Prineas RJ, Daniels KA. Diuretics, serum potassium and ventricular arrhythmias in the Multiple Risk Factor Intervention Trial. Am J Cardiol. 1987;60:548–54. https://doi.org/10.1016/0002-9149(87)90303-1.
Agarwal SK, et al. Premature ventricular complexes and the risk of incident stroke: the Atherosclerosis Risk In Communities (ARIC) Study. Stroke. 2010;41:588–93. https://doi.org/10.1161/strokeaha.109.567800.
Akkaya M, et al. Efficacy and benefits of catheter ablation of ventricular premature complexes in patients younger and older than 65 years of age. Turk Kardiyol Dern Ars. 2013;41:497–504. https://doi.org/10.5543/tkda.2013.77503.
Cevik C, Perez-Verdia A, Nugent K. Implantable cardioverter defibrillators and their role in heart failure progression. Europace. 2009;11:710–5. https://doi.org/10.1093/europace/eup091.
Goto S, Goto S. Application of neural networks to 12-lead electrocardiography- current status and future directions. Circ Rep. 2019;1:481–6. https://doi.org/10.1253/circrep.CR-19-0096.
Siontis KC, Noseworthy PA, Attia ZI, Friedman PA. Artificial intelligence-enhanced electrocardiography in cardiovascular disease management. Nat Rev Cardiol. 2021;18:465–78. https://doi.org/10.1038/s41569-020-00503-2.
Feeny AK, et al. Artificial intelligence and machine learning in arrhythmias and cardiac electrophysiology. Circ Arrhythm Electrophysiol. 2020;13: e007952. https://doi.org/10.1161/circep.119.007952.
Ribeiro AH, et al. Automatic diagnosis of the 12-lead ECG using a deep neural network. Nat Commun. 2020;11:1760. https://doi.org/10.1038/s41467-020-15432-4.
Breithardt G, et al. The signal-averaged ECG: time-domain analysis. Eur Heart J. 1993;14(Suppl E):27–32. https://doi.org/10.1093/eurheartj/14.suppl_e.27.
Gatzoulis KA, et al. Signal-averaged electrocardiography: past, present, and future. J Arrhythm. 2018;34:222–9. https://doi.org/10.1002/joa3.12062.
Noureldin RA, et al. The diagnosis of hypertrophic cardiomyopathy by cardiovascular magnetic resonance. J Cardiovasc Magn Reson. 2012;14:17. https://doi.org/10.1186/1532-429x-14-17.
Adedinsewo D, et al. Artificial intelligence-enabled ECG algorithm to identify patients with left ventricular systolic dysfunction presenting to the emergency department with dyspnea. Circ Arrhythm Electrophysiol. 2020;13: e008437. https://doi.org/10.1161/circep.120.008437.
Santangeli P, Rame JE, Birati EY, Marchlinski FE. Management of ventricular arrhythmias in patients with advanced heart failure. J Am Coll Cardiol. 2017;69:1842–60. https://doi.org/10.1016/j.jacc.2017.01.047.
The authors thank all the participating individuals for their contribution to this study. The authors would like to express their thanks to the staff of Department of Medical Research for providing data from National Taiwan University Hospital-integrated Medical Database (NTUH-iMD).
This work was supported by Grant from the Ministry of Science and Technology (111-2218-E-002-043-; 109-2314-B-002-244-MY3; 110-2314-B-002-201-MY2 and 110-2314-B-002-198-MY3). No authors disclose any financial or personal relationships with other people or organizations that could inappropriately influence (bias) their work.
Ethics approval and consent to participate
This study has been conducted in accordance with the ethical standards in the 1964 Declaration of Helsinki. Ethics approval was granted by the ethics committee and institutional review board (IRB) on human research of the Medical Research Department of National Taiwan University Hospital, Taipei, Taiwan.
All the authors disclose no financial and personal relationships with other people or organizations that could inappropriately influence (bias) their work.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Chang, SN., Tseng, YH., Chen, JJ. et al. An artificial intelligence-enabled ECG algorithm for identifying ventricular premature contraction during sinus rhythm. Eur J Med Res 27, 289 (2022). https://doi.org/10.1186/s40001-022-00929-z
- Artificial intelligence
- Convolutional neural network
- 12-Lead electrocardiogram
- Ventricular premature complex