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

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.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-10
DOI
https://doi.org/10.21203/rs.3.rs-11472796/v1
Primary Topic
ECG Monitoring and Analysis
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

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

Leila Cristina Carneiro Bergamasco, César Nogueira Silva
Research Square
ECG Monitoring and Analysis
preprint

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

Leila Cristina Carneiro Bergamasco, César Nogueira Silva
preprint en

Abstract

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.

Research Square
Centro Universitário FEI (BR)
ECG Monitoring and Analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon