Related Experiment Video
Updated: May 27, 2026

Real-Time Cardiac Mapping with a Noninvasive Imageless Electrocardiographic Imaging System
Published on: April 11, 2025
A multi-branch vision transformer with GA-optimized focal loss for ECG signal classification
1Computer Engineering Department, Faculty of Technology, Sakarya University of Applied Sciences, Sakarya, Turkey.
None:
Background The classification of electrocardiogram (ECG) signals is a critical task in detecting cardiac arrhythmias. However, challenges such as class imbalance and the need to capture both local and global temporal patterns make this problem complex.ObjectiveIn this study, a hybrid deep learning model, called MBViT-FocalGA, is proposed for the classification of electrocardiogram ECG signals.MethodsThe proposed model combines a Multi-branch Vision Transformer (MBViT) architecture with a Focal Loss function optimized via a Genetic Algorithm (GA) called as MBViT-FocalGA. Thanks to three independent ViT branches operating at different patch sizes, the model can effectively learn both local and global timing patterns from ECG signals. Furthermore, the class imbalance problem frequently encountered in arrhythmia data is mitigated by optimizing the hyperparameters of the Focal Loss function with GA, improving the recognition of minority classes. The model's performance was evaluated on the MIT-BIH Arrhythmia Database in two different scenarios: (i) a two-class scenario combined into normal (N) and others (O), and (ii) a five-class scenario consisting of N, L, R, A, and V.ResultsExperimental results demonstrate that the MBViT-FocalGA model achieves superior classification performance with 98% overall accuracy and a high F1 score, outperforming classical deep learning models for both scenarios.ConclusionThese findings demonstrate the strong potential of transformer-based architectures and adaptive loss function optimizations in ECG classification.
Related Concept Videos
Instrumentation Amplifier
To overcome this challenge, an ECG machine utilizes an instrumentation amplifier. This specialized amplifier is...
Energy Losses in Transformers
There are four main reasons for energy losses in transformers.
The first cause can be the high resistance of the copper windings...
Types Of Transformers
If the ratio of the number of turns in the secondary winding to that of the primary winding is greater than one, then the transformer is said to be a step-up transformer. In a step-up transformer, the voltage at the secondary winding is greater than the voltage applied at the primary winding.
However, if this ratio is less than one, the transformer is said to be a step-down...
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and the T...
Equivalent Circuits for Practical Transformers
In a practical transformer, each winding exhibits resistance and leakage reactance. The winding...
Three-Winding Transformers
In the per-unit equivalent circuit of a grounded Y-Y three-phase...