HybridXAI-ECG: A Statistically Validated Hybrid Model with Balanced Learning for Multi-Class Cardiac Arrhythmia
Abstract
Cardiac arrhythmias contribute disproportionately to sudden cardiac death, yet expert manual review of Holter recordings remains impractical at clinical scale. Despite strong benchmark accuracy, contemporary deep learning classifiers share three persistent limitations: most exploit only one representational strategy in isolation, missing the combined strength of morphological encoding, temporal rhythm modelling, and adaptive feature weighting; severe class imbalance Normal beats outnumber PVCs by 39:1 in MIT-BIH remains poorly addressed; and transparency requirements demanded by clinical regulators go largely unmet. HybridXAI-ECG is introduced to resolve all three shortcomings concurrently. Three cascaded one-dimensional convolutional blocks extract multi-scale morphological features, a two-layer Bidirectional GRU captures inter-beat temporal context, and an eight-head Multi-Head Self-Attention module produces content-adaptive beat representations. A two-stage oversampling pipeline combining SMOTE with random replication, reinforced by class-weighted loss, reduces the imbalance ratio from 39:1 to 1.14:1. Model transparency is delivered through global Shapley-value attribution, per-instance LIME explanations, and attention-weight waveform overlays. Evaluated on the MIT-BIH benchmark, HybridXAI-ECG achieves 98.92% accuracy, 98.31% macro F1-score, and 99.87% mean AUC-ROC, outperforming fourteen recently published methods by 1.73 to 6.44 percentage points in F1. All gains are statistically confirmed via Bonferroni corrected Wilcoxon signed-rank testing at p < 0.001.