Improving Generalization of ECG Arrhythmia Detection Using Cross-Domain Meta-learning AI
摘要
Domain shift is a challenge in electrocardiogram (ECG)–based arrhythmia detection across datasets, recording devices, and patient populations. An all-in-one cross-domain meta-learning framework was proposed that unifies downloading, preprocessing, label harmonization, and episodic training for robust arrhythmia classification. This approach combines a CNN + multi-head self-attention encoder with a MAML-style adaptation loop, enhanced by domain-contrastive alignment and CORAL regularization. Two major public datasets (MIT-BIH, PTB-XL) were harmonized into a six-class unified label space and evaluated under both in-domain and cross-domain conditions. In in-domain settings, 85.2% accuracy with 0.84 macro-F1 and 0.93 AUROC was achieved with MIT-BIH, followed by 82.7% accuracy with 0.81 macro-F1 and 0.91 AUROC with PTB-XL. The cross-domain evaluation indicates the generalization ability of the proposed method. It showed 71–74% accuracy and 0.70–0.72 macro-F1 when trained on one dataset and tested on another, significantly outperforming the supervised CNN baselines by 12 percentage points. In addition, cross-domain meta-learning provides domain-invariant ECG representations that generalize beyond dataset boundaries. The proposed pipeline built a reproducible and extendable foundation for real-world arrhythmia detection, where models need adaptation to heterogeneous acquisition conditions.