ArrhythmiaVision: Resource-Conscious Deep Learning Models with Visual Explanations for ECG Arrhythmia Classification
Zuraiz Baig, Sidra Nasir, Rizwan Ahmed Khan, Muhammad Zeeshan Ul Haque
TL;DR
This work tackles the need for accurate, real-time ECG arrhythmia detection on edge devices by introducing ArrhythmiNet V1 and V2, two lightweight 1D CNNs inspired by MobileNet that achieve high classification performance with minimal memory footprints. It pairs compact architectures with wavelet-based denoising and normalization to preserve critical ECG morphologies, and couples Grad-CAM and SHAP to provide both local and global explanations of model decisions. On the MIT-BIH Arrhythmia Dataset, V1 attains 0.99 and V2 0.98 accuracy across five classes, while maintaining small footprints suitable for wearable and embedded deployment. The integration of XAI methods ensures clinically meaningful interpretations aligned with ECG waveforms, supporting trust and adoption in real-world monitoring, though future work is needed to extend validation to multi-lead data and external datasets.
Abstract
Cardiac arrhythmias are a leading cause of life-threatening cardiac events, highlighting the urgent need for accurate and timely detection. Electrocardiography (ECG) remains the clinical gold standard for arrhythmia diagnosis; however, manual interpretation is time-consuming, dependent on clinical expertise, and prone to human error. Although deep learning has advanced automated ECG analysis, many existing models abstract away the signal's intrinsic temporal and morphological features, lack interpretability, and are computationally intensive-hindering their deployment on resource-constrained platforms. In this work, we propose two novel lightweight 1D convolutional neural networks, ArrhythmiNet V1 and V2, optimized for efficient, real-time arrhythmia classification on edge devices. Inspired by MobileNet's depthwise separable convolutional design, these models maintain memory footprints of just 302.18 KB and 157.76 KB, respectively, while achieving classification accuracies of 0.99 (V1) and 0.98 (V2) on the MIT-BIH Arrhythmia Dataset across five classes: Normal Sinus Rhythm, Left Bundle Branch Block, Right Bundle Branch Block, Atrial Premature Contraction, and Premature Ventricular Contraction. In order to ensure clinical transparency and relevance, we integrate Shapley Additive Explanations and Gradient-weighted Class Activation Mapping, enabling both local and global interpretability. These techniques highlight physiologically meaningful patterns such as the QRS complex and T-wave that contribute to the model's predictions. We also discuss performance-efficiency trade-offs and address current limitations related to dataset diversity and generalizability. Overall, our findings demonstrate the feasibility of combining interpretability, predictive accuracy, and computational efficiency in practical, wearable, and embedded ECG monitoring systems.
