Domain-Adaptive Arrhythmia Classification Using a Hybrid Transformer on Wearable Heart Signals
Toosi, Maedeh H., Mohammadi, Siamak
–arXiv.org Artificial Intelligence
Domain-Adaptive Arrhythmia Classification Using a Hybrid Transformer on Wearable Heart Signals Maedeh H. Toosi, Siamak Mohammadi A hybrid Transformer model is proposed for domain-adaptive arrhythmia classification. The model synergistically processes raw ECG signals and derived Heart Rate Variability (HRV) features. Domain adaptation using Maximum Mean Discrepancy improves cross-dataset generalization. Abstract Cardiovascular disease remains the leading cause of death globally, underscoring the need for effective, accessible monitoring solutions, particularly through wearable devices that enable continuous, real-time tracking of heart rhythms in home settings. However, deploying deep learning models trained on clinical electrocardiogram (ECG) datasets to wearable devices remains challenging, as differences in recording equipment, signal quality, and patient populations introduce domain shifts that degrade model performance. We propose a hybrid transformer model that processes continuous ECG signals alongside seven heart rate variability (HRV) features, where the raw signal path captures beat-level morphological patterns and the HRV path encodes rhythm regularity statistics, allowing the model to jointly leverage complementary information from both representations. To enhance the model's ability to generalize across domains, we employ representation learning techniques, including Maximum Mean Discrepancy (MMD), a non-parametric kernel-based metric that quantifies the distance between feature distributions of different domains, to align feature distributions between source and target domains, addressing the challenge of domain shifts between public datasets and wearable device data. By leveraging five public ECG datasets for training, the model learns robust, generalized representations that mitigate domain-specific biases. When tested on wearable device data with an unseen domain, the model achieved an F1-macro 95% and balanced accuracy of 96.15%.
arXiv.org Artificial Intelligence
May-12-2026