Work

MobileViTv2 with a normalised cosine-similarity classification head and synthetic data balancing for ECG arrhythmia classification on the MIT-BIH Arrhythmia Database

Year: 2026
Type: preprint
Abstract: Purpose To classify heartbeats from the MIT-BIH Arrhythmia Database into the five AAMI classes with a lightweight hybrid convolution–transformer network, while mitigating class imbalance and examining the model’s errors. Methods Beats were segmented around the R peak, converted to continuous wavelet transform (CWT) images and used to train MobileViTv2 with its linear classifier replaced by a normalised cosine-similarity head (NormHead). The training set was balanced to 4,000 beats per class using beats synthesised by a Wasserstein GAN with gradient penalty (WGAN-GP) and a convolutional autoencoder; the test set (7,712 beats) contained only real beats. Grad-CAM was used for qualitative error analysis. Results On a stratified, beat-level hold-out set the model reached an accuracy of 0.9793 and a macro F1-score of 0.9538 (0.9795 and 0.9515 in a second run), against 0.9745 and 0.9418 for the same backbone with a standard head. Classes F and SVE remained the hardest (F1-scores of 0.8812 and 0.9267). Synthetic beats were highly similar to real beats in time and frequency for most classes. Conclusion The cosine-similarity head gave a modest improvement over a standard head in this setting. Because training and test beats were split at the beat level and not by patient, the results describe intra-patient performance and are not evidence of generalisation to unseen patients; patient-independent and cross-database validation are still required.
Language: English
Field: Medicine
Open Access status: green
OpenAlex ID: W7225746676
Cites: 15
Cited by:
Related to: