Re-implementation of Convolutional Neural Network for Arrhythmia Detection

Muhammad Ilham Rizqyawan, Yahdi Siradj, M Faizal Amri, Agus Pratondo


Arrhythmia is an irregular heartbeat that may cause serious problems such as cardiac arrest and heart failure if left untreated. A dozen of studies have been conducted to make an automated arrhythmia detector. The classification approach uses a simple rule-based model, traditional machine learning, to a modern deep-learning technique. However, comparing an arrhythmia classifier performance is not an easy task. There are several different datasets, classification standards, data splitting schemes, and metrics. To assess the real performance of the developed models, it is important to train and evaluate the model in a standardized method such as the result score can become standard too. In this study, a set of CNN models from Acharya were re-implemented by re-training and re-evaluating it in a more standardized method. The model uses a raw ECG waveform with 260 samples around the QRS peaks and classifies it into five arrhythmia classes. The experiment was conducted using three configurations, using both intra-patient and inter-patient schemes. The experimental results show good performance for the intra-patient scheme but not for the inter-patient. There is a reduction of sensitivity and precision in the intra-patient scheme using a standardized method in this study compared to the original paper. This result indicates biased results caused by the oversampled test data in the original paper. In addition to the intra-patient result, the inter-patient result is also provided for a standardized comparison to other works in the future.


Arrhythmia classification; convolutional neural network; electrocardiography; heartbeat classification.

Full Text:



G. B. Moody and R. G. Mark, “The impact of the MIT-BIH arrhythmia database,†IEEE Eng. Med. Biol. Mag., vol. 20, no. 3, pp. 45–50, 2001, doi: 10.1109/51.932724.

D. Pandit, L. Zhang, C. Liu, S. Chattopadhyay, N. Aslam, and C. P. Lim, “A lightweight QRS detector for single lead ECG signals using a max-min difference algorithm,†Comput. Methods Programs Biomed., vol. 144, pp. 61–75, Jun. 2017, doi: 10.1016/j.cmpb.2017.02.028.

M. Rakshit and S. Das, “An efficient wavelet-based automated R-peaks detection method using Hilbert transform,†Biocybern. Biomed. Eng., vol. 37, no. 3, pp. 566–577, Jan. 2017, doi: 10.1016/j.bbe.2017.02.002.

D. Berwal, A. Kumar, and Y. Kumar, “Design of high performance QRS complex detector for wearable healthcare devices using biorthogonal spline wavelet transform,†ISA Trans., vol. 81, pp. 222–230, Oct. 2018, doi: 10.1016/j.isatra.2018.08.002.

A. Sharma, S. Patidar, A. Upadhyay, and U. Rajendra Acharya, “Accurate tunable-Q wavelet transform based method for QRS complex detection,†Comput. Electr. Eng., vol. 75, pp. 101–111, May 2019, doi: 10.1016/j.compeleceng.2019.01.025.

J. S. Lee, S. J. Lee, M. Choi, M. Seo, and S. W. Kim, “QRS detection method based on fully convolutional networks for capacitive electrocardiogram,†Expert Syst. Appl., vol. 134, pp. 66–78, Nov. 2019, doi: 10.1016/j.eswa.2019.05.033.

A. A. Suárez-León, C. Varon, R. Willems, S. Van Huffel, and C. R. Vázquez-Seisdedos, “T-wave end detection using neural networks and Support Vector Machines,†Comput. Biol. Med., vol. 96, pp. 116–127, May 2018, doi: 10.1016/j.compbiomed.2018.02.020.

A. Malali, S. Hiriyannaiah, G. M. Siddesh, K. G. Srinivasa, and N. T. Sanjay, “Supervised ECG wave segmentation using convolutional LSTM,†ICT Express, vol. 6, no. 3, pp. 166–169, Sep. 2020, doi: 10.1016/j.icte.2020.04.004.

E. J. da S. Luz, W. R. Schwartz, G. Cámara-Chávez, and D. Menotti, “ECG-based heartbeat classification for arrhythmia detection: A survey,†Comput. Methods Programs Biomed., vol. 127, pp. 144–164, 2016, doi: 10.1016/j.cmpb.2015.12.008.

F. Ma, J. Zhang, W. Liang, and J. Xue, “Automated Classification of Atrial Fibrillation Using Artificial Neural Network for Wearable Devices,†Math. Probl. Eng., vol. 2020, 2020, doi: 10.1155/2020/9159158.

G. Sannino and G. De Pietro, “A deep learning approach for ECG-based heartbeat classification for arrhythmia detection,†Futur. Gener. Comput. Syst., vol. 86, pp. 446–455, Sep. 2018, doi: 10.1016/j.future.2018.03.057.

Y. Jung and H. Kim, “Detection of PVC by using a wavelet-based statistical ECG monitoring procedure,†Biomed. Signal Process. Control, vol. 36, pp. 176–182, Jul. 2017, doi: 10.1016/j.bspc.2017.03.023.

M. Sharma, R. S. Tan, and U. R. Acharya, “Automated heartbeat classification and detection of arrhythmia using optimal orthogonal wavelet filters,†Informatics Med. Unlocked, vol. 16, p. 100221, Jan. 2019, doi: 10.1016/j.imu.2019.100221.

N. Sinha and A. Das, “Automatic diagnosis of cardiac arrhythmias based on three stage feature fusion and classification model using DWT,†Biomed. Signal Process. Control, vol. 62, p. 102066, Sep. 2020, doi: 10.1016/j.bspc.2020.102066.

R. Arvanaghi, S. Daneshvar, H. Seyedarabi, and A. Goshvarpour, “Fusion of ECG and ABP signals based on wavelet transform for cardiac arrhythmias classification,†Comput. Methods Programs Biomed., vol. 151, pp. 71–78, Nov. 2017, doi: 10.1016/j.cmpb.2017.08.013.

C. K. Jha and M. H. Kolekar, “Cardiac arrhythmia classification using tunable Q-wavelet transform based features and support vector machine classifier,†Biomed. Signal Process. Control, vol. 59, p. 101875, May 2020, doi: 10.1016/j.bspc.2020.101875.

H. Zhou et al., “A Novel Cardiac Arrhythmias Detection Approach for Real-Time Ambulatory ECG Diagnosis,†Int. J. Pattern Recognit. Artif. Intell., vol. 31, no. 10, Oct. 2017, doi: 10.1142/S0218001417580046.

E. Ramirez, P. Melin, and G. Prado-Arechiga, “Hybrid model based on neural networks, type-1 and type-2 fuzzy systems for 2-lead cardiac arrhythmia classification,†Expert Syst. Appl., vol. 126, pp. 295–307, Jul. 2019, doi: 10.1016/j.eswa.2019.02.035.

P. Kora, K. Meenakshi, K. Swaraja, A. Rajani, and M. Kafiul Islam, “Detection of Cardiac arrhythmia using fuzzy logic,†Informatics Med. Unlocked, vol. 17, p. 100257, Jan. 2019, doi: 10.1016/j.imu.2019.100257.

M. Lee, T. G. Song, and J. H. Lee, “Heartbeat classification using local transform pattern feature and hybrid neural fuzzy-logic system based on self-organizing map,†Biomed. Signal Process. Control, vol. 57, p. 101690, Mar. 2020, doi: 10.1016/j.bspc.2019.101690.

M. Mohanty, S. Sahoo, P. Biswal, and S. Sabut, “Efficient classification of ventricular arrhythmias using feature selection and C4.5 classifier,†Biomed. Signal Process. Control, vol. 44, pp. 200–208, Jul. 2018, doi: 10.1016/j.bspc.2018.04.005.

K. Gajowniczek, I. Grzegorczyk, and T. Ząbkowski, “Reducing false arrhythmia alarms using different methods of probability and class assignment in random forest learning methods,†Sensors (Switzerland), vol. 19, no. 7, p. 1588, Apr. 2019, doi: 10.3390/s19071588.

K. Gajowniczek, I. Grzegorczyk, T. Ząbkowski, and C. Bajaj, “Weighted random forests to improve arrhythmia classification,†Electron., vol. 9, no. 1, p. 99, Jan. 2020, doi: 10.3390/electronics9010099.

W. Yang, Y. Si, D. Wang, and B. Guo, “Automatic recognition of arrhythmia based on principal component analysis network and linear support vector machine,†Comput. Biol. Med., vol. 101, pp. 22–32, Oct. 2018, doi: 10.1016/j.compbiomed.2018.08.003.

K. N. V. P. S. Rajesh and R. Dhuli, “Classification of ECG heartbeats using nonlinear decomposition methods and support vector machine,†Comput. Biol. Med., vol. 87, pp. 271–284, Aug. 2017, doi: 10.1016/j.compbiomed.2017.06.006.

M. A. Escalona-Morán, M. C. Soriano, I. Fischer, and C. R. Mirasso, “Electrocardiogram classification using reservoir computing with logistic regression,†IEEE J. Biomed. Heal. Informatics, vol. 19, no. 3, pp. 892–898, 2015, doi: 10.1109/JBHI.2014.2332001.

U. R. Acharya et al., “A deep convolutional neural network model to classify heartbeats,†Comput. Biol. Med., vol. 89, pp. 389–396, Oct. 2017, doi: 10.1016/j.compbiomed.2017.08.022.

S. Mousavi and F. Afghah, “Inter- and Intra- Patient ECG Heartbeat Classification for Arrhythmia Detection: A Sequence to Sequence Deep Learning Approach,†in ICASSP, IEEE International Conference on Acoustics, Speech and Signal Processing - Proceedings, May 2019, vol. 2019-May, pp. 1308–1312, doi: 10.1109/ICASSP.2019.8683140.

A. Y. Hannun et al., “Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network,†Nat. Med., vol. 25, no. 1, pp. 65–69, 2019, doi: 10.1038/s41591-018-0268-3.

L. Guo, G. Sim, and B. Matuszewski, “Inter-patient ECG classification with convolutional and recurrent neural networks,†Biocybern. Biomed. Eng., vol. 39, no. 3, pp. 868–879, Jul. 2019, doi: 10.1016/j.bbe.2019.06.001.

S. Saadatnejad, M. Oveisi, and M. Hashemi, “LSTM-Based ECG Classification for Continuous Monitoring on Personal Wearable Devices,†IEEE J. Biomed. Heal. Informatics, vol. 24, no. 2, pp. 515–523, Feb. 2020, doi: 10.1109/JBHI.2019.2911367.

M. Alfaras, M. C. Soriano, and S. Ortín, “A Fast Machine Learning Model for ECG-Based Heartbeat Classification and Arrhythmia Detection,†Front. Phys., vol. 7, p. 103, Jul. 2019, doi: 10.3389/fphy.2019.00103.

J. P. Allam, S. Samantray, and S. Ari, “SpEC: A system for patient specific ECG beat classification using deep residual network,†Biocybern. Biomed. Eng., vol. 40, no. 4, pp. 1446–1457, Oct. 2020, doi: 10.1016/j.bbe.2020.08.001.

P. De Chazal, M. O’Dwyer, and R. B. Reilly, “Automatic classification of heartbeats using ECG morphology and heartbeat interval features,†IEEE Trans. Biomed. Eng., vol. 51, no. 7, pp. 1196–1206, Jul. 2004, doi: 10.1109/TBME.2004.827359.

ISO/ANSI/AAMI, “ANSI/AAMI/ISO EC57: Testing and reporting performance results of cardiac rhythm and ST-segment measurement algorithms,†2008.

G. De Lannoy, D. François, J. Delbeke, and M. Verleysen, “Weighted conditional random fields for supervised interpatient heartbeat classification,†IEEE Trans. Biomed. Eng., vol. 59, no. 1, pp. 241–247, Jan. 2012, doi: 10.1109/TBME.2011.2171037.

N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic minority over-sampling technique,†J. Artif. Intell. Res., vol. 16, pp. 321–357, 2002, doi: 10.1613/jair.953.

A. S. Glas, J. G. Lijmer, M. H. Prins, G. J. Bonsel, and P. M. M. Bossuyt, “The diagnostic odds ratio: A single indicator of test performance,†J. Clin. Epidemiol., vol. 56, no. 11, pp. 1129–1135, Nov. 2003, doi: 10.1016/S0895-4356(03)00177-X.

J. Cohen, “A Coefficient of Agreement for Nominal Scales,†Educ. Psychol. Meas., vol. 20, no. 1, pp. 37–46, Apr. 1960, doi: 10.1177/001316446002000104.

J. R. Landis and G. G. Koch, “The Measurement of Observer Agreement for Categorical Data,†Biometrics, vol. 33, no. 1, p. 159, Mar. 1977, doi: 10.2307/2529310.

M. I. Rizqyawan, A. Munandar, M. F. Amri, R. Korio Utoro, and A. Pratondo, “Quantized Convolutional Neural Network toward Real-time Arrhythmia Detection in Edge Device,†in Proceeding - 2020 International Conference on Radar, Antenna, Microwave, Electronics and Telecommunications, ICRAMET 2020, Nov. 2020, pp. 234–239, doi: 10.1109/ICRAMET51080.2020.9298667.



  • There are currently no refbacks.

Published by INSIGHT - Indonesian Society for Knowledge and Human Development