A Lightweight CNN-Attention-BiLSTM Architecture for Multi-Class Arrhythmia Classification on Standard and Wearable ECGs
Vamsikrishna Thota, Hardik Prajapati, Yuvraj Joshi, Shubhangi Rathi
TL;DR
This work presents a lightweight CNN-Attention-BiLSTM architecture for multi-class arrhythmia classification from both 12-lead and single-lead ECGs, addressing class imbalance with a weighted loss and enabling edge deployment. By stacking Conv1D blocks for feature extraction, a compact attention module, and two BiLSTM layers, the model captures local morphology and long-range temporal dependencies while keeping parameter count under 1M. Evaluated on the CPSC 2018 dataset, it achieves competitive 12-lead performance (average F1 ~0.866, AUC ~0.969) and demonstrates robust generalization with 10-fold cross-validation (F1 ~0.839), while remaining viable for wearable devices (Lead-I) with an average F1 ~0.786 and AUC ~0.960. Edge deployment experiments on Raspberry Pi with TensorFlow Lite confirm real-time inference efficiency, highlighting practical applicability for wearable ECG monitoring and clinical workflows.
Abstract
Early and accurate detection of cardiac arrhythmias is vital for timely diagnosis and intervention. We propose a lightweight deep learning model combining 1D Convolutional Neural Networks (CNN), attention mechanisms, and Bidirectional Long Short-Term Memory (BiLSTM) for classifying arrhythmias from both 12-lead and single-lead ECGs. Evaluated on the CPSC 2018 dataset, the model addresses class imbalance using a class-weighted loss and demonstrates superior accuracy and F1- scores over baseline models. With only 0.945 million parameters, our model is well-suited for real-time deployment in wearable health monitoring systems.
