A Deep Learning Framework Based on Denoising and 2D Image Encoding for Arrhythmia Classification
Abstract
1. Introduction
2. Related Work
3. Materials and Methods
3.1. Autoencoding for Denoising
3.2. Training Data for Denoising
3.3. Autoencoder Model for ECG Denoising
3.4. Image Encoding Using 1D Signal Data
3.5. ECG Arrhythmia Classification Model
3.6. Statistical Analysis
4. Experiments and Results
4.1. Evaluation Metrics for Denoising Performance
4.2. Results of Denoising Evaluation
4.3. Performance of the Image Encoding-Based Arrhythmia Classification Model
4.4. Mechanistic Analysis: Polarity Invariance of the Outer-Product Encoding
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Di Cesare, M.; Perel, P.; Taylor, S.; Kabudula, C.; Bixby, H.; Gaziano, T.A.; Vaca McGhie, D.; Mwangi, J.; Pervan, B.; Narula, J.; et al. The heart of the world. Glob. Heart 2024, 19, 11. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gour, A.; Gupta, M.; Wadhvani, R.; Shukla, S. ECG based heart disease classification: Advancement and review of techniques. Procedia Comput. Sci. 2024, 235, 1634–1648. [Google Scholar] [CrossRef] [Scilit]
- Yadav, O.P. ECG signal approximation using Lagrange–Chebyshev polynomials. J. Adv. Res. Dyn. Control Syst. 2018, 10, 718. [Google Scholar]
- de Chazal, P.; O’Dwyer, M.; Reilly, R.B. Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features. IEEE Trans. Biomed. Eng. 2004, 51, 1196–1206. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Limaye, H.; Deshmukh, V.V. ECG noise sources and various noise removal techniques: A survey. Int. J. Appl. Innov. Eng. Manag. 2016, 5, 86–92. [Google Scholar]
- Elgendi, M.; Jonkman, M.; De Boer, F. Frequency bands effects on QRS detection. In Proceedings of the BIOSIGNALS 2010—Third International Conference on Bio-inspired Systems and Signal Processing, Valencia, Spain, 20–23 January 2010; pp. 428–431. [Google Scholar]
- Gupta, V.; Mittal, M. Arrhythmia detection in ECG signal using fractional wavelet transform with principal component analysis. J. Inst. Eng. India Ser. B 2020, 101, 451–461. [Google Scholar] [CrossRef] [Scilit]
- Bhalerao, S.; Ansari, I.A.; Kumar, A. Performance comparison of SVM and ANN for reversible ECG data hiding. In Soft Computing: Theories and Applications; Springer: Singapore, 2020; pp. 197–207. [Google Scholar]
- Hesar, H.D.; Mohebbi, M. An adaptive Kalman filter bank for ECG denoising. IEEE J. Biomed. Health Inform. 2020, 25, 13–21. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kayikcioglu, I.; Akdeniz, F.; Köse, C.; Kayikcioglu, T. Time-frequency approach to ECG classification of myocardial infarction. Comput. Electr. Eng. 2020, 84, 106621. [Google Scholar] [CrossRef] [Scilit]
- Banerjee, S.; Mitra, M. Application of cross wavelet transform for ECG pattern analysis and classification. IEEE Trans. Instrum. Meas. 2013, 63, 326–333. [Google Scholar] [CrossRef] [Scilit]
- Chiang, H.-T.; Hsieh, Y.-Y.; Fu, S.-W.; Hung, K.-H.; Tsao, Y.; Chien, S.-Y. Noise reduction in ECG signals using fully convolutional denoising autoencoders. IEEE Access 2019, 7, 60806–60813. [Google Scholar] [CrossRef] [Scilit]
- Al-Shammary, D.; Kadhim, M.N.; Mahdi, A.M.; Ibaida, A.; Ahmed, K. Efficient ECG classification based on Chi-square distance for arrhythmia detection. J. Electron. Sci. Technol. 2024, 22, 100249. [Google Scholar] [CrossRef] [Scilit]
- Arif, N.H.; Faisal, M.R.; Farmadi, A.; Nugrahadi, D.; Abadi, F.; Ahmad, U.A. An approach to ECG-based gender recognition using random forest algorithm. J. Electron. Electromed. Eng. Med. Inform. 2024, 6, 107–115. [Google Scholar] [CrossRef] [Scilit]
- Alamatsaz, N.; Tabatabaei, L.; Yazdchi, M.; Payan, H.; Alamatsaz, N.; Nasimi, F. A lightweight hybrid CNN–LSTM explainable model for ECG-based arrhythmia detection. Biomed. Signal Process. Control 2024, 90, 105884. [Google Scholar] [CrossRef] [Scilit]
- Seoni, S.; Molinari, F.; Acharya, U.R.; Lih, O.S.; Barua, P.D.; García, S.; Salvi, M. Application of spatial uncertainty predictor in CNN–BiLSTM model using coronary artery disease ECG signals. Inf. Sci. 2024, 665, 120383. [Google Scholar] [CrossRef] [Scilit]
- Berrahou, N.; El Alami, A.; Mesbah, A.; El Alami, R.; Berrahou, A. Arrhythmia detection in inter-patient ECG signals using entropy rate features and RR intervals with CNN architecture. Comput. Methods Biomech. Biomed. Eng. 2026, 29, 103–122. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ullah, A.; Rehman, S.U.; Tu, S.; Mehmood, R.M.; Ehatisham-ul-Haq, M. A hybrid deep CNN model for abnormal arrhythmia detection based on cardiac ECG signal. Sensors 2021, 21, 951. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhao, C.-F.; Yao, W.-Y.; Yi, M.-J.; Wan, C.; Tian, Y.-L. Arrhythmia classification algorithm based on a two-dimensional image and modified EfficientNet. Comput. Intell. Neurosci. 2022, 2022, 8683855. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rezaee, K.; Khosravi, M.R.; Jeon, G.; Rajabi, M. Graph convolutional network-based deep feature learning for cardiovascular disease recognition from heart sound signals. Int. J. Intell. Syst. 2022, 37, 11509–11529. [Google Scholar] [CrossRef] [Scilit]
- Jabari, M.; Rezaee, K.; Zakeri, M. Fusing handcrafted and deep features for multi-class cardiac diagnostic decision support model based on heart sound signals. J. Ambient Intell. Humaniz. Comput. 2023, 14, 2873–2885. [Google Scholar] [CrossRef] [Scilit]
- Peng, H.; Chang, X.; Yao, Z.; Shi, D.; Chen, Y. A deep learning framework for ECG denoising and classification. Biomed. Signal Process. Control 2024, 94, 106441. [Google Scholar] [CrossRef] [Scilit]
- PhysioNet. MIT-BIH Arrhythmia Database. Available online: https://physionet.org/content/mitdb/1.0.0/ (accessed on 1 October 2025).
- PhysioNet. Noise Stress Test Database. Available online: https://physionet.org/content/nstdb/1.0.0/ (accessed on 1 October 2025).
- Kim, C.; Lee, W. Human activity recognition by the image type encoding method of 3-axial sensor data. Appl. Sci. 2023, 13, 4961. [Google Scholar] [CrossRef] [Scilit]
- Pan, J.; Tompkins, W.J. A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef] [Scilit] [PubMed]









| Type | Annotations |
|---|---|
| Normal (N) | Normal, L/R bundle branch block, Atrial escape, Nodal escape |
| Supraventricular ectopic beat (S) | Atrial premature, Aberrant atrial premature, Nodal premature, Supraventricular premature |
| Ventricular ectopic beat (V) | Premature ventricular contraction, Ventricular escape |
| Fusion beat (F) | Fusion of ventricular and normal |
| Unknown beat (Q) | Paced, Fusion of paced and normal, Unclassifiable |
| Split | Records | N | S | V | F | Q | Total |
|---|---|---|---|---|---|---|---|
| Train | 33 | 64,777 | 2047 | 5115 | 423 | 3899 | 76,261 |
| Validation | 7 | 12,515 | 447 | 1108 | 364 | 2080 | 16,514 |
| Test | 8 | 13,339 | 287 | 1013 | 16 | 2064 | 16,719 |
| Total | 48 | 90,631 | 2781 | 7236 | 803 | 8043 | 109,494 |
| Partition | SNR Improvement (dB) | RMSE | PRD (%) | Correlation |
|---|---|---|---|---|
| Validation | 6.71 | 0.205 | 40.24 | 0.870 |
| Test | 5.63 | 0.143 | 36.89 | 0.801 |
| (a) Overall | |||||
| Metric | Validation | Test | |||
| Noisy | Denoised | Noisy | Denoised | ||
| R-peak amplitude error | 1.142 | 0.430 | 0.720 | 0.390 | |
| R-peak redetection sensitivity | 0.830 | 0.887 | 0.812 | 0.834 | |
| R-peak redetection PPV | 0.450 | 0.628 | 0.372 | 0.547 | |
| RR-interval error (ms) | 18.66 | 10.84 | 20.23 | 17.98 | |
| T-wave correlation | 0.743 | 0.828 | 0.710 | 0.798 | |
| P-wave correlation | 0.586 | 0.487 | 0.647 | 0.535 | |
| QRS-width error (ms) | 39.00 | 14.92 | 62.63 | 80.65 | |
| (b) By noise type × SNR level (test partition). | |||||
| SNR Level | Noise Type | Metric | Noisy | Denoised | |
| −12 dB | BW | R-peak amplitude error | 1.3474 | 0.4315 | |
| −12 dB | BW | R-peak redetection sensitivity | 0.7688 | 0.7974 | |
| −12 dB | BW | R-peak redetection PPV | 0.4198 | 0.5453 | |
| −12 dB | EM | R-peak amplitude error | 1.6595 | 0.5877 | |
| −12 dB | EM | R-peak redetection sensitivity | 0.5555 | 0.7207 | |
| −12 dB | EM | R-peak redetection PPV | 0.2341 | 0.4334 | |
| −12 dB | MA | R-peak amplitude error | 1.7787 | 0.5505 | |
| −12 dB | MA | R-peak redetection sensitivity | 0.6056 | 0.7118 | |
| −12 dB | MA | R-peak redetection PPV | 0.2159 | 0.4482 | |
| 12 dB | BW | R-peak amplitude error | 0.1149 | 0.3122 | |
| 12 dB | BW | P-wave correlation | 0.9854 | 0.6461 | |
| 12 dB | EM | R-peak amplitude error | 0.1268 | 0.3193 | |
| 12 dB | EM | P-wave correlation | 0.8855 | 0.6182 | |
| 12 dB | MA | R-peak amplitude error | 0.1178 | 0.3173 | |
| 12 dB | MA | P-wave correlation | 0.9027 | 0.6386 | |
| Model | Input Representation | Accuracy | Macro-F1 | Balanced Accuracy | Record-Level Macro-F1 |
|---|---|---|---|---|---|
| 3D CNN baseline | Image encoding | 81.09 ± 0.50 | 27.94 ± 1.42 | 27.28 ± 1.29 | 20.00 ± 0.41 |
| ResNet-18 | Image encoding | 78.77 ± 1.03 | 29.82 ± 0.46 | 30.10 ± 1.36 | 20.67 ± 0.35 |
| GoogLeNet | Image encoding | 74.24 ± 4.37 | 27.72 ± 1.67 | 28.36 ± 2.94 | 19.84 ± 0.98 |
| DenseNet-121 | Image encoding | 77.93 ± 3.54 | 29.64 ± 2.04 | 30.41 ± 1.16 | 20.73 ± 0.71 |
| Proposed | Image encoding | 77.20 ± 1.77 | 32.52 ± 2.89 | 33.18 ± 3.33 | 21.05 ± 0.62 |
| 1D CNN | Raw denoised signal | 76.24 ± 2.97 | 39.58 ± 5.55 | 44.95 ± 4.97 | 22.97 ± 0.83 |
| LSTM | Raw denoised signal | 80.78 ± 4.77 | 37.32 ± 6.60 | 35.68 ± 4.52 | 21.97 ± 1.15 |
| GRU | Raw denoised signal | 77.76 ± 4.16 | 38.11 ± 5.17 | 41.12 ± 3.64 | 22.73 ± 0.93 |
| CRNN | Raw denoised signal | 79.40 ± 3.67 | 39.96 ± 3.76 | 42.65 ± 2.24 | 23.51 ± 0.39 |
| Comparator | Proposed − Comparator (pp) | 95% CI | Holm-Corrected p |
|---|---|---|---|
| 3D CNN baseline | +0.553 | −1.740 to 3.071 | 1.000 |
| ResNet-18 | +0.124 | −1.316 to 1.676 | 1.000 |
| GoogLeNet | +0.737 | −0.737 to 2.784 | 1.000 |
| DenseNet-121 | +0.172 | −1.335 to 1.739 | 1.000 |
| 1D CNN | −2.005 | −5.364 to 1.292 | 1.000 |
| LSTM | −0.954 | −2.816 to 0.555 | 1.000 |
| GRU | −1.593 | −4.641 to 1.176 | 1.000 |
| CRNN | −1.813 | −4.355 to 0.531 | 1.000 |
| Class | 3D CNN | ResNet-18 | GoogLeNet | DenseNet-121 | Proposed | 1D CNN | LSTM | GRU | CRNN |
|---|---|---|---|---|---|---|---|---|---|
| N | 98.44 ± 0.55 | 94.01 ± 1.49 | 88.69 ± 6.27 | 92.54 ± 5.24 | 89.31 ± 2.71 | 82.48 ± 1.52 | 91.58 ± 3.36 | 85.94 ± 3.52 | 87.50 ± 2.97 |
| S | 0.00 ± 0.00 | 0.17 ± 0.20 | 2.00 ± 3.78 | 0.00 ± 0.00 | 0.00 ± 0.00 | 18.99 ± 10.80 | 0.09 ± 0.17 | 7.84 ± 7.91 | 9.84 ± 7.81 |
| V | 33.86 ± 4.49 | 50.67 ± 8.88 | 45.58 ± 15.57 | 51.65 ± 7.42 | 55.80 ± 15.04 | 81.29 ± 2.68 | 47.63 ± 12.88 | 75.44 ± 6.35 | 74.75 ± 8.04 |
| F | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 | 1.56 ± 3.13 |
| Q | 4.11 ± 2.87 | 5.66 ± 2.49 | 5.50 ± 0.94 | 7.87 ± 3.76 | 20.81 ± 16.07 | 41.98 ± 25.79 | 39.12 ± 26.07 | 36.37 ± 16.13 | 39.61 ± 11.73 |
| SNR Level | N-Class Specificity (%) | S/V/F/Q-Class Specificity, Range (%) |
|---|---|---|
| −12 dB | 26.04 | 94.59–99.90 |
| −6 dB | 28.22 | 95.25–99.94 |
| 6 dB | 32.06 | 95.23–99.94 |
| 12 dB | 34.28 | 95.19–99.92 |
| Model | BW | EM | MA | All Noise |
|---|---|---|---|---|
| 3D CNN | 26.95 | 25.40 | 25.83 | 26.06 |
| ResNet-18 | 28.37 | 26.47 | 27.28 | 27.38 |
| GoogLeNet | 26.77 | 25.32 | 25.97 | 26.02 |
| DenseNet-121 | 28.10 | 26.30 | 26.86 | 27.09 |
| Proposed | 30.09 | 28.43 | 29.40 | 29.31 |
| 1D CNN | 37.85 | 34.55 | 37.00 | 36.47 |
| LSTM | 35.71 | 32.72 | 34.59 | 34.34 |
| GRU | 36.17 | 33.25 | 35.29 | 34.90 |
| CRNN | 37.33 | 33.82 | 35.99 | 35.72 |
| Model | −12 dB | −6 dB | 6 dB | 12 dB |
|---|---|---|---|---|
| 3D CNN baseline | 23.30 ± 1.77 | 25.25 ± 1.61 | 27.68 ± 1.22 | 28.01 ± 1.39 |
| ResNet-18 | 24.41 ± 2.00 | 26.53 ± 1.50 | 29.02 ± 0.65 | 29.52 ± 0.47 |
| GoogLeNet | 23.74 ± 1.87 | 25.57 ± 1.66 | 27.27 ± 1.12 | 27.51 ± 1.29 |
| DenseNet-121 | 24.18 ± 2.05 | 26.22 ± 1.67 | 28.54 ± 1.61 | 29.40 ± 1.77 |
| Proposed | 25.72 ± 2.66 | 28.33 ± 2.03 | 31.16 ± 2.27 | 32.04 ± 2.60 |
| 1D CNN | 31.55 ± 4.54 | 35.48 ± 4.18 | 39.19 ± 4.76 | 39.64 ± 4.90 |
| LSTM | 29.97 ± 3.73 | 33.27 ± 3.55 | 36.81 ± 5.37 | 37.30 ± 5.86 |
| GRU | 30.07 ± 3.70 | 34.17 ± 3.15 | 37.39 ± 3.97 | 37.97 ± 4.28 |
| CRNN | 30.27 ± 4.18 | 34.27 ± 3.03 | 38.66 ± 3.16 | 39.66 ± 3.36 |
| Encoding Variant | Record Macro-F1 | Test Clean (Pooled Macro-F1) | ||
|---|---|---|---|---|
| Validation Clean | Test Clean | Test All-Noise | ||
| Outer product only (no correction) | 0.3115 | 0.1984 | 0.1900 | 0.3481 |
| + Sorting | 0.2679 | 0.2141 | 0.2039 | 0.3409 |
| + Sorting + Flipping (proposed) | 0.3018 | 0.2029 | 0.1942 | 0.3523 |
| Model | Parameters | Test Clean (ms/Sample) |
|---|---|---|
| Proposed | 15,554,085 | ~4.2–4.4 |
| 1D CNN | 779,397 | ~4.0–4.2 |
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Seo, J.-Y.; Park, B.H.; Kim, C.M. A Deep Learning Framework Based on Denoising and 2D Image Encoding for Arrhythmia Classification. Sensors 2026, 26, 5183. https://doi.org/10.3390/s26165183
Seo J-Y, Park BH, Kim CM. A Deep Learning Framework Based on Denoising and 2D Image Encoding for Arrhythmia Classification. Sensors. 2026; 26(16):5183. https://doi.org/10.3390/s26165183
Chicago/Turabian StyleSeo, Ji-Yun, Byeong Ho Park, and Chang Min Kim. 2026. "A Deep Learning Framework Based on Denoising and 2D Image Encoding for Arrhythmia Classification" Sensors 26, no. 16: 5183. https://doi.org/10.3390/s26165183
APA StyleSeo, J.-Y., Park, B. H., & Kim, C. M. (2026). A Deep Learning Framework Based on Denoising and 2D Image Encoding for Arrhythmia Classification. Sensors, 26(16), 5183. https://doi.org/10.3390/s26165183

