Hybrid Multi-Domain ECG Feature Learning with mRMR and CNN–Transformer for Cardiac Disease Classification
Abstract
1. Introduction
- A robust ECG preprocessing and heartbeat segmentation pipeline incorporating Butterworth band-pass filtering, R-peak detection, and standardized heartbeat segmentation to improve the quality and consistency of biomedical signal representations.
- A multi-domain ECG feature-learning framework that integrates Variational Mode Decomposition with temporal, statistical, spectral, and nonlinear descriptors to capture complementary characteristics of cardiac electrical activity.
- An mRMR-based feature-selection strategy that identifies the most informative ECG characteristics while minimizing feature redundancy, thereby producing a compact and discriminative biomedical representation for downstream classification.
- A hybrid CNN–Transformer learning architecture that jointly captures local ECG morphological patterns and long-range dependencies for automated five-class cardiac disease classification.
- Comprehensive experiments are conducted on the PTB-XL biomedical ECG database, covering the five diagnostic superclasses NORM, MI, STTC, CD, and HYP. The effectiveness and robustness of the proposed framework are assessed using classification performance metrics, confusion-matrix analysis, receiver operating characteristic (ROC) analysis, comparative evaluation with existing approaches, and ablation experiments. The resulting findings demonstrate the potential of integrating multi-domain biomedical feature engineering with modern machine-learning and attention-based deep learning for accurate and robust automated ECG disease diagnosis, directly supporting the broader application of machine learning in biomedical data analysis and computer-aided clinical decision support.
2. Literature Review
Research Gap and Contribution of Current Study
3. Materials and Methods
3.1. System Methodology
3.2. ECG Signal Preprocessing
3.2.1. Butterworth Bandpass Filtering
3.2.2. Adaptive Symlet-8 Wavelet Denoising
3.3. Heartbeat Segmentation
3.3.1. R-Peak Detection
3.3.2. Heartbeat Window Extraction
3.4. Variational Mode Decomposition (VMD)
3.5. Multi-Domain Feature Extraction
3.6. Minimum Redundancy–Maximum Relevance Feature Selection
3.7. CNN–Transformer-Based ECG Classification
4. Experimental Results and Discussion
4.1. Experimental Setup
4.2. Model Training Performance
4.3. Classification Performance Evaluation
- True Positive (TP): Number of ECG samples correctly classified as belonging to the target class.
- True Negative (TN): Number of ECG samples correctly identified as not belonging to the target class.
- False Positive (FP): Number of ECG samples incorrectly assigned to the target class.
- False Negative (FN): Number of ECG samples belonging to the target class but incorrectly classified as another class.
Quantitative Performance Evaluation
4.4. Receiver Operating Characteristic (ROC) Analysis
4.5. Feature Space Visualization Using t-SNE
4.6. Comparative Performance Analysis
4.7. Ablation Study
4.8. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- World Health Organization. Cardiovascular Diseases (CVDs). Fact Sheet, 31 July 2025. Available online: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds) (accessed on 20 March 2026).
- WHO Regional Office for Europe. Cardiovascular Diseases Kill 10,000 People in the WHO European Region Every Day, with Men Dying More Frequently Than Women. 15 May 2024. Available online: https://www.who.int/europe/news/item/15-05-2024-cardiovascular-diseases-kill-10-000-people-in-the-who-european-region-every-day--with-men-dying-more-frequently-than-women (accessed on 5 March 2026).
- World Heart Federation. World Heart Report 2023: Confronting the World’s Number One Killer. Available online: https://world-heart-federation.org/wp-content/uploads/World-Heart-Report-2023.pdf (accessed on 14 March 2026).
- Nazar, F.; Jalal, A. Wearable Sensors-Based Activity Recognition for Intelligent Healthcare Monitoring. In Proceedings of the 2025 6th International Conference on Advancements in Computational Sciences (ICACS); IEEE: Piscataway, NJ, USA, 2025. [Google Scholar]
- Bulbul, A.A.-M.; Awal, M.A.; Mahendran, N.; Islam, S.M.S.; Pogrebna, G.; Ross, A.G.; Moni, M.A. Deep Learning for ECG-Based Cardiovascular Disease Diagnosis: A Systematic Review and Meta-Analysis. Artif. Intell. Rev. 2026, 59, 136. [Google Scholar] [CrossRef] [Scilit]
- Tahir, S.B.; Jalal, A.; Kim, K. IMU Sensor based Automatic-Features Descriptor for Healthcare Patient’s Daily Life-log Recognition. In Proceedings of the 2020 International Conference on Applied and Engineering Mathematics (ICAEM); IEEE: Piscataway, NJ, USA, 2020. [Google Scholar]
- Jalal, A.; Batool, M.; ud din Tahir, S.B. Markerless Sensors for Physical Health Monitoring System Using ECG and GMM Feature Extraction. In Proceedings of the 2021 International Bhurban Conference on Applied Sciences and Technologies (IBCAST); IEEE: Piscataway, NJ, USA, 2021. [Google Scholar] [CrossRef] [Scilit]
- Fira, M.; Goraș, L.; Fira, L.; Popa, R.F.; Costin, H.-N. Arrhythmia Classification with Single-Channel Features Extracted from “A Large-Scale 12-Lead ECG Database for Arrhythmia Study”. Sensors 2025, 25, 5621. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ameen, A.; Fattoh, I.E.; Abd El-Hafeez, T.; Ahmed, K. Advances in ECG and PCG-Based Cardiovascular Disease Classification: A Review of Deep Learning and Machine Learning Methods. J. Big Data 2024, 11, 159. [Google Scholar] [CrossRef] [Scilit]
- Abro, I.; Jalal, A. Hybrid Feature Learning with QDA and CNN for Wearable Activity Recognition. In Proceedings of the 2025 27th International Multitopic Conference (INMIC); IEEE: Piscataway, NJ, USA, 2025; pp. 1–6. [Google Scholar]
- Quaid, M.A.K.; Jalal, A. Wearable sensors based human behavioral pattern recognition using statistical features and reweighted genetic algorithm. Multimed. Tools Appl. 2020, 79, 6061–6083. [Google Scholar] [CrossRef] [Scilit]
- Tahir, S.B.u.d.; Jalal, A.; Kim, K. Wearable Inertial Sensors for Daily Activity Analysis Based on Adam Optimization and the Maximum Entropy Markov Model. Entropy 2020, 22, 579. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Narotamo, H.; Dias, M.; Santos, R.; Carreiro, A.V.; Gamboa, H.; Silveira, M. Deep learning for ECG classification: A comparative study of 1D and 2D representations and multimodal fusion approaches. Biomed. Signal Process. Control 2024, 93, 106141. [Google Scholar] [CrossRef] [Scilit]
- Hanzla, M.; Jalal, A. Recognizing Smart Home-Based Human Context In-the-Wild via Neural Network Over Smartwatches. In Proceedings of the 2025 4th International Conference on Communication, Computing and Digital Systems (C-CODE); IEEE: Piscataway, NJ, USA, 2025. [Google Scholar]
- Elyamani, H.A.; Salem, M.A.; Melgani, F.; Yhiea, N.M. Deep residual 2D convolutional neural network for cardiovascular disease classification. Sci. Rep. 2024, 14, 22040. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Śmigiel, S.; Pałczyński, K.; Ledziński, D. Deep learning techniques in the classification of ECG signals using R-peak detection based on the PTB-XL dataset. Sensors 2021, 21, 8174. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Pałczyński, K.; Śmigiel, S.; Ledziński, D.; Bujnowski, S. Study of the few-shot learning for ECG classification based on the PTB-XL dataset. Sensors 2022, 22, 904. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wagner, P.; Strodthoff, N.; Bousseljot, R.-D.; Kreiseler, D.; Lunze, F.I.; Samek, W.; Schaeffter, T. PTB-XL, a Large Publicly Available Electrocardiography Dataset. Sci. Data 2020, 7, 154. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Clifford, G.D.; Azuaje, F.; McSharry, P. Advanced Methods and Tools for ECG Data Analysis; Artech House: Boston, MA, USA, 2006. [Google Scholar]
- Butterworth, S. On the Theory of Filter Amplifiers. Wirel. Eng. 1930, 7, 536–541. [Google Scholar]
- Gualsaquí, M.; Vizcaíno, I.; Rosero, V.G.P.; Calero, M.J.F. ECG signal denoising using discrete wavelet transform: A comparative analysis of threshold values and functions. Maskana 2018, 9, 105–114. [Google Scholar] [CrossRef] [Scilit]
- Li, H.; Boulanger, P. An Automatic Method to Reduce Baseline Wander and Motion Artifacts on Ambulatory Electrocardiogram Signals. Sensors 2021, 21, 8169. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Dragomiretskiy, K.; Zosso, D. Variational Mode Decomposition. IEEE Trans. Signal Process. 2014, 62, 531–544. [Google Scholar] [CrossRef] [Scilit]
- Wang, L.; Bi, T.; Hao, J.; Zhou, T.H. Heart Diseases Recognition Model Based on HRV Feature Extraction over 12-Lead ECG Signals. Sensors 2024, 24, 5296. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Asif, M.S.; Faisal, M.S.; Dar, M.N.; Hamdi, M.; Elmannai, H.; Rizwan, A.; Abbas, M. Hybrid Deep Learning and Discrete Wavelet Transform-Based ECG Biometric Recognition for Arrhythmic Patients and Healthy Controls. Sensors 2023, 23, 4635. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Acharya, U.R.; Fujita, H.; Lih, O.S.; Hagiwara, Y.; Tan, J.H.; Adam, M. Automated Detection of Arrhythmias Using Different Intervals of Tachycardia ECG Segments with Convolutional Neural Network. Inf. Sci. 2017, 405, 81–90. [Google Scholar] [CrossRef] [Scilit]
- Han, Y.; Ding, C.; Yang, S.; Ge, Y.; Yin, J.; Zhao, Y.; Zhang, J. Comparison of Electrocardiogram between Dilated Cardiomyopathy and Ischemic Cardiomyopathy Based on Empirical Mode Decomposition and Variational Mode Decomposition. Bioengineering 2024, 11, 1012. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kłosowski, G.; Rymarczyk, T.; Wójcik, D.; Skowron, S.; Cieplak, T.; Adamkiewicz, P. The Use of Time-Frequency Moments as Inputs of LSTM Network for ECG Signal Classification. Electronics 2020, 9, 1452. [Google Scholar] [CrossRef] [Scilit]
- Bandt, C.; Pompe, B. Permutation Entropy: A Natural Complexity Measure for Time Series. Phys. Rev. Lett. 2002, 88, 174102. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Peng, H.; Long, F.; Ding, C. Feature Selection Based on Mutual Information: Criteria of Max-Dependency, Max-Relevance, and Min-Redundancy. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1226–1238. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kiranyaz, S.; Ince, T.; Gabbouj, M. Real-Time Patient-Specific ECG Classification by 1-D Convolutional Neural Networks. IEEE Trans. Biomed. Eng. 2016, 63, 664–675. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Xiong, N.; Wei, Z.; Wang, X.; Wang, Y.; Wang, Z. HCTG-Net: A hybrid CNN–transformer network with gated fusion for automatic ECG arrhythmia diagnosis. Bioengineering 2025, 12, 1268. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, Y.; Han, J.; Zhang, H.; Zhang, X.; Si, Y.; Zhang, Y.; Liu, Y.; Yang, H. Clinical Knowledge-Based ECG Abnormalities Detection Using Dual-View CNN–Transformer and External Attention Mechanism. Comput. Biol. Med. 2024, 178, 108751. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kacprzak, D.; Wojciechowski, A.; Chaczko, Z.C. ECG Signal Classification Using Deep Learning Techniques Based on the PTB-XL Dataset. Entropy 2021, 23, 1121. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bickmann, L.; Plagwitz, L.; Varghese, J. Benchmarking Approaches: Time Series Versus Feature-Based Machine Learning in ECG Analysis on the PTB-XL Dataset. In Digital Health and Informatics Innovations for Sustainable Health Care Systems; IOS Press: Amsterdam, The Netherlands, 2024. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. In Advances in Neural Information Processing Systems 30; Curran Associates, Inc.: Red Hook, NY, USA, 2017; Volume 30. [Google Scholar]
- Blanchard, P.; Higham, D.J.; Higham, N.J. Accurately computing the log-sum-exp and softmax functions. IMA J. Numer. Anal. 2021, 41, 2311–2330. [Google Scholar] [CrossRef] [Scilit]
- Mehdi, N.A.; Ali, A. ECG Classification on PTB-XL: A Data-Centric Approach with Simplified CNN–VAE. arXiv 2026, arXiv:2603.07558. [Google Scholar]












| Dataset Partition | PTB-XL Folds | Purpose | Class Balancing | Feature Selection (mRMR) |
|---|---|---|---|---|
| Training set | Folds 1–8 | Model training and parameter learning | Applied only to training data, if required | mRMR fitted using training data only |
| Validation set | Fold 9 | Model selection and best-checkpoint selection | Not applied | Training-selected feature subset applied unchanged |
| Independent test set | Fold 10 | Final unbiased performance evaluation | Not applied | Training-selected feature subset applied unchanged |
| Feature | NORM (Mean ± SD) | MI (Mean ± SD) | STTC (Mean ± SD) | CD (Mean ± SD) | HYP (Mean ± SD) |
|---|---|---|---|---|---|
| Standard Deviation | 0.1742 ± 0.0482 | 0.1901 ± 0.0633 | 0.1628 ± 0.0516 | 0.2103 ± 0.0604 | 0.1588 ± 0.0483 |
| RMS Amplitude | 0.1733 ± 0.0479 | 0.1891 ± 0.0630 | 0.1620 ± 0.0514 | 0.2092 ± 0.0601 | 0.1580 ± 0.0481 |
| Peak-to-Peak | 1.0112 ± 0.2312 | 1.0962 ± 0.2802 | 0.9829 ± 0.2504 | 1.1935 ± 0.2617 | 0.9645 ± 0.2325 |
| Skewness | 1.7309 ± 1.0534 | 1.3756 ± 1.2957 | 2.1914 ± 0.9408 | 0.1678 ± 1.7386 | 2.1719 ± 1.1802 |
| Kurtosis | 8.6600 ± 4.5480 | 8.4166 ± 4.7630 | 10.9607 ± 4.8669 | 7.9786 ± 3.7266 | 11.2918 ± 4.2982 |
| Signal Energy | 3.2332 ± 1.9460 | 3.9736 ± 3.0375 | 2.8862 ± 2.7354 | 4.7374 ± 2.8316 | 2.7285 ± 1.9698 |
| Zero-Crossing Rate | 0.1029 ± 0.0327 | 0.1143 ± 0.0487 | 0.1167 ± 0.0431 | 0.1075 ± 0.0382 | 0.1055 ± 0.0377 |
| Dominant Frequency | 3.9180 ± 2.4600 | 3.8380 ± 2.8404 | 4.7460 ± 2.5247 | 3.3260 ± 2.3329 | 4.4180 ± 2.4843 |
| Spectral Centroid | 7.3878 ± 1.6925 | 7.4410 ± 2.2918 | 7.8066 ± 1.8740 | 6.4031 ± 1.9425 | 7.6130 ± 1.7984 |
| Spectral Bandwidth | 4.9488 ± 1.3018 | 5.1522 ± 1.5469 | 4.6445 ± 1.3151 | 4.4631 ± 1.3336 | 4.6243 ± 1.3134 |
| Spectral Entropy | 0.6395 ± 0.0645 | 0.6280 ± 0.0816 | 0.6372 ± 0.0671 | 0.5912 ± 0.0739 | 0.6396 ± 0.0635 |
| Permutation Entropy | 0.7840 ± 0.0546 | 0.7982 ± 0.0650 | 0.7882 ± 0.0640 | 0.7633 ± 0.0650 | 0.7783 ± 0.0584 |
| Hjorth Mobility | 0.5220 ± 0.1022 | 0.5276 ± 0.1460 | 0.5333 ± 0.1180 | 0.4577 ± 0.1219 | 0.5226 ± 0.1119 |
| Hjorth Complexity | 1.5271 ± 0.2796 | 1.6501 ± 0.4985 | 1.4314 ± 0.2406 | 1.6421 ± 0.4436 | 1.4518 ± 0.2689 |
| Parameter | Value |
|---|---|
| Input Representation | 8 mRMR-selected ECG features |
| Input Shape | 1 × 8 |
| CNN Block 1 | Conv1D, 64 filters, kernel size 3 |
| CNN Block 2 | Conv1D, 128 filters, kernel size 3 |
| CNN Activation | ReLU |
| Normalization | Batch Normalization |
| Pooling | MaxPooling 1D |
| Transformer encoder block | 2 |
| Attention Heads | 4 |
| Embedding Dimensions | 128 |
| Feed-forward Dimension | 256 |
| Dropout | 0.5 |
| Total Trainable Parameters | 298,885 |
| Classifier | CNN Transformer |
| Optimizer | Adam |
| Loss Function | Categorical Cross-Entropy |
| Batch Size | 32 |
| Learning Rate | 0.001 |
| Epochs | 45 |
| Activation Function | ReLU |
| Output Layer | Softmax |
| Evaluation Metrics | Accuracy, Precision, Recall, F1-score, Specificity, ROC-AUC |
| Class | Precision | Recall | Sepecificity | F1-Score |
|---|---|---|---|---|
| NORM | 0.9216 | 0.94 | 0.980 | 0.9307 |
| MI | 0.9394 | 0.93 | 0.985 | 0.9347 |
| STTC | 0.9388 | 0.92 | 0.985 | 0.9293 |
| CD | 0.9394 | 0.93 | 0.985 | 0.9347 |
| HYP | 0.9412 | 0.96 | 0.985 | 0.9505 |
| Authors | Class | Data Points | Augmentation | Data Split | Evaluation Unit | Methods | Accuracy (%) |
|---|---|---|---|---|---|---|---|
| Kacprzak et al. [34] | 5 superclasses: NORM, MI, STTC, CD, HYP | 17,232 ECG recordings | Not explicitly reported | 70% train/15% validation/15% test | ECG recording | CNN with Entropy Features | 76.50 |
| Bickmann et al. [35] | 5 superclasses: NORM, MI, STTC, CD, HYP | 21,801+ ECG recordings in PTB-XL dataset; model-specific subsets used | Not explicitly reported | PTB-XL stratified folds; fold 10 used for final evaluation | ECG recording | Feature-based vs. Time-Series ML Benchmark | 83.90 |
| Strodthoff et al. [18] | PTB-XL diagnostic tasks, including 5 diagnostic superclasses | 21,837 ECG recordings | Not explicitly reported | Official folds 1–8 train, 9 validation, 10 test | ECG recording | ResNet/Inception Benchmark | 86.40 |
| Mehdi and Ali [38] | 5 classes: NORM, MI, STTC, CD, HYP | 21,834 ECG recordings before class balancing | Class balancing/oversampling applied | Folds 1–9 used for train/validation; fold 10 test | ECG recording | Simplified CNN–VAE | 87.01 |
| Elyamani et al. [15] | 5 classes: NORM, MI, STTC, CD, HYP | 21,799 ECG recordings | No | Folds 1–9 train; fold 10 test | ECG recording | Deep Residual 2D CNN | 89.90 |
| Proposed Method | 5 mutually exclusive classes: NORM, MI, STTC, CD, HYP | 21,837 original PTB-XL recordings; mutually exclusive five-class subset retained after filtering | No | Official patient-disjoint folds 1–8 train, 9 validation, 10 test | ECG-derived heartbeat/feature representation | mRMR + CNN–Transformer | 93.60 |
| Model Configuration | VMD | Temporal | Statistical | CNN | Transformer | mRMR Feature Selection | Accuracy (%) |
|---|---|---|---|---|---|---|---|
| CNN Baseline | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | 88.41 |
| CNN–Transformer | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | 91.82 |
| CNN + mRMR | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | 90.74 |
| Without VMD | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | 87.69 |
| Without Temporal | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | 90.34 |
| Without Statistical | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | 92.62 |
| Proposed CNN–Transformer + mRMR | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 93.60 |
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
Alnusayri, M.; Mumtaz, S.; Aldughayfiq, B.; Allahem, H.; Almashfi, N.; AlHammadi, D.A.; Jalal, A. Hybrid Multi-Domain ECG Feature Learning with mRMR and CNN–Transformer for Cardiac Disease Classification. Bioengineering 2026, 13, 1082. https://doi.org/10.3390/bioengineering13091082
Alnusayri M, Mumtaz S, Aldughayfiq B, Allahem H, Almashfi N, AlHammadi DA, Jalal A. Hybrid Multi-Domain ECG Feature Learning with mRMR and CNN–Transformer for Cardiac Disease Classification. Bioengineering. 2026; 13(9):1082. https://doi.org/10.3390/bioengineering13091082
Chicago/Turabian StyleAlnusayri, Mohammed, Sara Mumtaz, Bader Aldughayfiq, Hisham Allahem, Nabil Almashfi, Dina Abdulaziz AlHammadi, and Ahmad Jalal. 2026. "Hybrid Multi-Domain ECG Feature Learning with mRMR and CNN–Transformer for Cardiac Disease Classification" Bioengineering 13, no. 9: 1082. https://doi.org/10.3390/bioengineering13091082
APA StyleAlnusayri, M., Mumtaz, S., Aldughayfiq, B., Allahem, H., Almashfi, N., AlHammadi, D. A., & Jalal, A. (2026). Hybrid Multi-Domain ECG Feature Learning with mRMR and CNN–Transformer for Cardiac Disease Classification. Bioengineering, 13(9), 1082. https://doi.org/10.3390/bioengineering13091082

