A swiss knife: can neural networks for ECG segmentation generalize to multiple classification tasks?
European Heart Journal - Digital Health

Abstract
One-dimensional (1D) signal segmentation networks decompose electrocardiograms (ECG) into their waveform components [1]. Classification networks integrate the raw ECG signal and the outcome to predict classes, such as arrhythmia types [2]. Whether an ECG-based segmentation network can be extended to various classification tasks is yet to be demonstrated. This could remove the need to develop a separate network for each classification task.
Our objective is to broaden the use of ECG segmentation networks to various classification tasks. We prove this possibility by applying a segmentation network to classify patient sex, detect the presence of antiarrhythmic drug (AAD) treatment, and predict atrial fibrillation recurrence following catheter ablation.
A 1D ECG segmentation UNet network was trained on the MediBeat database, comprising 10917 ECGs [3]. The UNet was then applied on 114 sinus rhythm ECG signals from patients who underwent first-time pulmonary vein isolation (PVI) at three Swiss University Hospitals. The cohort included 87 males and 26 females, with 30 patients ON AAD during ablation and 83 patients OFF AAD. Over a mean follow-up of 35±10 months, 62 patients remained in sinus rhythm, while 26 presented with AF recurrence after PVI. The UNet-based decomposition process generated 48 series vectors per patient. These series vectors were used as features for three distinct classifiers: logistic regression, support vector machine (SVM) and random forest (RF). For the task of predicting AF recurrence—a future outcome with significant class imbalance—AdaBoost was additionally employed. AdaBoost re-trained the models by focusing on the most difficult-to-predict class, adjusting weights to address the imbalance. The top model was selected based on its best feature and its accuracy was reported.
Despite weight adjustments proportional to class imbalance, RF performed the poorest as it predicted only the major class in each classification task. The task of predicting AF recurrence following PVI was the most challenging, with the best model being AdaBoost (73% accuracy). The first time series was used to achieve this accuracy (Figure Panel A). The task of detecting AAD presence was best accomplished with SVM (75% accuracy - Figure Panel B), using the second feature. SVM predicted sex the best (73% accuracy - Figure Panel C).
Neural networks for ECG segmentation show promise as part of machine learning workflows for classification. This was evidenced by good accuracies on the three illustrative tasks.

