X-Beat: An Explainable Framework for ECG Image Classification
Organizations: AI-Based Autonomous System Research Lab Department of Electrical Engineering and Computer Science Texas A&M University-Kingsville (TAMUK) Kingsville, TX, USA
Abstract
Accurate automated interpretation of electrocardio- grams (ECGs) is essential for early detection of cardiac condi- tions such as myocardial infarction and rhythm abnormalities. However, many high-performing deep learning models remain difficult to deploy in clinical settings due to limited transparency and lack of reliability validation. In this work, we present X- Beat, an explainable and reliability-aware benchmark framework for ECG image classification designed to support trustworthy AI systems in healthcare. The proposed framework combines transfer learning with post-hoc explainability and systematic reliability evaluation across four cardiac classes: Abnormal Heartbeat, History of Myocardial Infarction, Myocardial In- farction, and Normal Heartbeat. Multiple ImageNet-pretrained CNN backbones, including EfficientNet-B0, ResNet-50, DenseNet- 121, and MobileNetV3-Large, are evaluated under a unified training protocol. Beyond standard performance metrics, we incorporate Grad-CAM-based visual explanations together with additional analyses, including explanation stability, regional sen- sitivity, and confidence-based reliability assessment, to examine whether model predictions are supported by clinically meaningful evidence. Experimental results show that ResNet-50 achieves the best performance, reaching 91.94% accuracy and a macro F1- score of 0.9098, with strong class separability (AUC up to 0.995). Explanation analyses indicate that the model primarily focuses on waveform-relevant regions, while reliability evaluation suggests that most incorrect predictions occur with lower confidence. Overall, this work provides a structured and reproducible bench- mark for evaluating both predictive performance and explanation reliability in ECG image classification, contributing toward the development of trustworthy and interpretable AI components for clinical decision support systems.
Figures & tables
| Model | Class | Precision | Recall | F1-score | Macro Precision | Macro Recall | Macro F1 Score | Accuracy |
|---|---|---|---|---|---|---|---|---|
| ResNet-50 | Abnormal Heartbeat | 1.0000 | 0.8511 | 0.9195 | 0.9241 | 0.9039 | 0.9098 | 0.9194 |
| History of Myocardial Infarction | 0.8966 | 0.7647 | 0.8254 | |||||
| Myocardial Infarction | 0.9231 | 1.0000 | 0.9600 | |||||
| Normal Heartbeat | 0.8769 | 1.0000 | 0.9344 | |||||
| DenseNet-121 | Abnormal Heartbeat | 1.0000 | 0.7234 | 0.8395 | 0.9052 | 0.8941 | 0.8925 | 0.9032 |
| History of Myocardial Infarction | 0.8286 | 0.8529 | 0.8406 |
| Category | Metric | Value |
|---|---|---|
| Explanation stability | Corr. / IoU@20% | / |
| Regional sensitivity | Border / center drop | / |
| Transfer learning | Pretrained ResNet-50 acc. / F1 | / |
| Transfer learning | SimpleECGCNN acc. / F1 | / |
| Transfer learning | ResNet-50 scratch acc. / F1 | / |
| Confidence reliability | Mean conf. corr. / incorr. | / |
Electrocardiogram Classification
Electrocardiogram classification uses machine learning to identify heart rhythms and cardiac conditions from ECG waveforms for screening, diagnosis, and monitoring.
See all 106 papers