Related Experiment Videos
HAT-ECG: Hybrid autoencoder-transformer architecture for ECG arrhythmia classification
Shahin Sharbaf Movassaghpour1, Masoud Kargar1, Ali Bayani1
1Department of Computer Engineering, Ta.C., Islamic Azad University, Tabriz, Iran.
Abstract:
Accurate and efficient analysis of electrocardiogram (ECG) signals is essential for early detection of cardiac arrhythmias. However, many deep learning models suffer from limited generalization to unseen patients, reduced interpretability, and high computational demands. To address these challenges, we propose HAT-ECG, a hybrid Autoencoder-Transformer architecture that integrates unsupervised feature learning with attention-based temporal modeling. The convolutional autoencoder extracts compact, noise-robust latent representations of ECG beats, while the Transformer's Multi-Head Attention mechanism adaptively focuses on diagnostically relevant waveform segments. The model was evaluated on three public datasets: MIT-BIH, INCART, and the independent PTB Diagnostic ECG Dataset (290 subjects, entirely outside the original datasets). Under standard beat-wise splitting for benchmarking, HAT-ECG achieved state-of-the-art accuracies of 99.91% (MIT-BIH 5-class), 99.69% (MIT-BIH AAMI), 99.15% (INCART 3-class AAMI), and 98.45% (PTB 2-class). Critically, under strict patient-wise splitting on MIT-BIH (completely disjoint training and test patients), the model maintained a realistic accuracy of 90.81% (F1-score 92.61%), with strong generalization to new patients. With only 0.021 GFLOPs, HAT-ECG offers an excellent balance of high performance, interpretability, and efficiency, making it highly suitable for real-time wearable and edge-device cardiac monitoring. This work advances deep learning for intelligent and deployable arrhythmia classification by combining accuracy, cross-patient generalization, and computational minimalism.
Related Concept Videos
Instrumentation Amplifier
To overcome this challenge, an ECG machine utilizes an instrumentation amplifier. This specialized amplifier is...
Correlation between ECG and Cardiac Cycle
A cardiac action potential originates in the SA node and spreads throughout the atria and the AV node in approximately 0.03 seconds. This results in the P wave in an ECG and triggers atrial contraction. The action potential is then briefly slowed at the AV node, allowing the atria to contract and fill the ventricles with blood before...
Electrocardiogram Fundamentals
An electrocardiogram (ECG) is a diagnostic tool for identifying cardiac conditions such as arrhythmias, conduction abnormalities, and myocardial ischemia.
Definition
An electrocardiogram (ECG) visualizes the heart's electrical activity by tracing the electrical movement associated with each heartbeat on a graph or monitor. As the heart beats, an electrical wave passes through it, correlating with the cardiac cycle events.
Parts of an ECG
An ECG utilizes electrodes on the skin to...
Holter Monitor: 24-Hour Monitoring
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and the T...