Intra-Subject Clustering of ECG Heartbeats from Wearable Devices Using Deep Learning and Feature Engineering - Digiacomo, Federico; Olmo, Gabriella; Gumiero, Alessandro (Proceedings / IEEE International Symposium on Computer-Based Medical Systems, 2025)
Cardiovascular diseases (CVDs) represent a significant global health concern, necessitating effective early detection methods. The advent of wearable electrocardiogram (ECG) devices offers the potential for enhanced portability and continuous monitoring. However, the substantial volume of data generated underscores the need for automated analysis techniques. This paper presents a framework for intra-subject clustering of ECG heartbeats, employing a robust P-QRS-T wave classifier based on a Multiscale Convolutional Neural Network (Multiscale CNN) combined with a Bidirectional Gated Recurrent Unit (biGRU). This is followed by heartbeat segmentation, feature engineering using both manual descriptors and the Time Series Feature Extraction Library (TSFEL), and subsequent clustering via a k-means algorithm. Furthermore, a novel ECG database, the Hi Database (HiDB), is introduced. It was acquired using the Hi 3-Leads ECG (Hi-ECG), a wearable three-lead device commercialised by CGM in collaboration with STMicroelectronics. The proposed wave classifier demonstrated strong performance, tested according to the ANSI/AAMI EC57 standard. It achieved an average sensitivity of 97.79 % and precision of 96 % for QRS detection across the MIT-BIH Arrhythmia Database (MITDB), the American Heart Association ECG Database (AHADB), and the MIT-BIH Noise Stress Test Database (NSTDB). Intra-subject clustering on the MITDB yielded a mean Adjusted Rand Index (ARI) of 0.78 ± 0.19 and a mean Silhouette score of 0.65 ± 0.14 . Application of the clustering approach to the HiDB resulted in an average Silhouette score of 0.74 ± 0.13 . The findings suggest that the presented framework can support clinicians in ECG beat annotation tasks. Its modular design enables adaptability to additional objectives, such as rhythm anomaly detection, by leveraging QRS information from the wave classifier. Both the wave classifier and the feature-based clustering model demonstrated the robustness of the approach across different ECG data sources. Moreover, the intra-subject setting highlights its potential for personalised cardiac monitoring.