Attention-enhanced bidirectional LSTM for multivariate ECG arrhythmia classification: a deep learning approach with clinical validation
Keywords:
ECG Classification, Bidirectional LSTM, Multi-Head Self-Attention, Arrhythmia Detection, Deep Learning Clinical AI.Abstract
Cardiovascular diseases (CVDs) are the top cause of death in the world, responsible for some 32% of all deaths. Despite the fact that electrocardiogram (ECG) is still the most commonly used non-invasive diagnostic tool for cardiac arrhythmia detection, automated classification of complex multivariate ECG signals remains a persistent challenge due to wave non-stationarity, inter-patient variability and severe class imbalance. We introduce a novel deep learning framework, called ATT-BiLSTM, for real-time ECG arrhythmia classification, combining bidirectional long short-term memory (BiLSTM) networks with a multi-head self-attention mechanism. The architecture consists of two BiLSTM encoder layers with residual connections, followed by a scaled dot-product attention module with eight heads, dynamically applied to P-wave, QRS complex and T-wave morphology features. The model was tested on the MIT-BIH Arrhythmia Database and the PTB-XL large-scale ECG database, achieving 96.4% classification accuracy, macro-averaged F1 score of 95.8% and AUC-ROC of 0.982. Comparative experiments with CNN-LSTM hybrid networks, Temporal Convolutional Networks (TCN), vanilla Transformer encoder, and standard BiLSTM further demonstrate the superiority of ATT-BiLSTM. Ablation studies confirm that multi-head self-attention contributes the greatest performance gain (+1.4% accuracy), with all improvements statistically significant (p < 0.01) via paired Wilcoxon signed-rank tests. This work advances scalable, AI-driven cardiovascular care by delivering clinical-grade diagnostic accuracy with real-time inference for automated cardiac monitoring.
Published
How to Cite
Issue
Section
Copyright (c) 2025 Nadira Tashtemirova

This work is licensed under a Creative Commons Attribution 4.0 International License.