Optimizing beat-wise input for arrhythmia detection using 1-D convolutional neural networks: A real-world ECG study

Comput Methods Programs Biomed. 2025 Jun 18:269:108898. doi: 10.1016/j.cmpb.2025.108898. Online ahead of print.

Abstract

Backgrounds and objectives: Cardiac arrhythmias, characterized by irregular heartbeats, are difficult to diagnose in real-world scenarios. Machine learning has advanced arrhythmia detection; however, the optimal number of heartbeats for precise classification remains understudied. This study addresses this using machine learning while assessing the performance of arrhythmia detection across inter-patient and intra-patient conditions. Furthermore, the performance-resource trade-offs are evaluated for practical deployment in mobile health (mHealth) applications.

Methods: Beat-wise segmentation and resampling techniques were utilized for preprocessing electrocardiography (ECG) signals to ensure consistent input lengths. A 1-D convolutional neural network was used to classify the eight multi-labeled arrhythmias. The dataset comprised real-world ECG recordings from the HiCardi wireless device alongside data from the MIT-BIH Arrhythmia database. Model performance was assessed through fivefold cross-validation under both inter-patient and intra-patient conditions.

Results: The proposed model demonstrated peak accuracy at four beats under inter-patient conditions, with minimal improvements beyond this point. This configuration achieved a balance between performance (94.82% accuracy) and resource consumption (training time: 72.27 s per epoch; prediction time: 155 μs per segment). Real-world simulations validated the feasibility of real-time arrhythmia detection for approximately 5000 patients.

Conclusion: Utilizing four heartbeats as the input size for arrhythmia classification results in a trade-off between accuracy and computational efficiency. This discovery has significant implications for real-time wearable ECG devices, where both performance and resource constraints are crucial considerations. This insight is expected to serve as a valuable reference for enhancing the design and implementation of arrhythmia detection systems for scalable and efficient mHealth applications.

Keywords: Arrhythmia detection; Beat-wise processing; Biosignal; Convolutional neural network (CNN); Electrocardiography (ECG).