Abstract
Automated electrocardiogram (ECG) classification is critical for timely cardiac diagnosis but faces challenges in feature engineering and multi-scale temporal pattern recognition. This paper presents a novel framework that transforms 1D ECG signals into 2D spectrograms using Short-Time Fourier Transform (STFT), followed by classification via a suite of lightweight, scale-specific Convolutional Neural Networks (CNNs). By progressively fusing decisions from models trained on varying signal lengths, the system achieves near-perfect accuracy (99% on synthetic data, 100% F1 on PhysioNet) while maintaining high computational efficiency suitable for real-time embedded deployment.
Introduction
Electrocardiograms (ECG) serve as the primary tool for diagnosing cardiac conditions. However, manual interpretation is resource-intensive and prone to human error. Existing automated systems often struggle with two main issues: the need for expert-driven "hand-crafted" feature engineering and the difficulty of capturing heart rhythm abnormalities that occur across different temporal scales—from single-beat anomalies to long-term patterns. This research proposes an end-to-end system that automatically learns features from raw data and effectively integrates information across multiple time scales.
Methodology
The proposed pipeline consists of three primary stages: time-frequency transformation, scale-specific feature extraction, and progressive decision fusion.
Time-Frequency Representation
To leverage the strengths of 2D Convolutional Neural Networks (CNNs), the researchers first convert 1D ECG waves into 2D spectrograms using the Short-Time Fourier Transform (STFT). This transformation captures how the frequency content of the heart's electrical activity evolves over time, making complex patterns like fibrillation more distinguishable for the model.
Scale-Specific CNNs and Online Fusion
The architecture employs a lightweight CNN (approximately 19,000 parameters) trained at six different "levels," each corresponding to a different signal duration ranging from a single beat to 32 seconds. As data is recorded, the system progressively fuses the predictions from these models. This "expert ensemble" approach allows the system to combine quick local insights with broader global context, enhancing stability against noise.
Experimental Results
The framework was evaluated on a 20-category synthetic dataset and the real-world PhysioNet 2017 Challenge dataset.
- High Accuracy: The fusion method achieved 99% accuracy on the complex synthetic dataset and a perfect 1.0 F1 score on the PhysioNet validation subset, significantly outperforming traditional SVM-based and 1D CNN methods.
- Real-Time Efficiency: The model's small footprint allows for exceptional real-time performance. Processing a sequence takes only 0.33ms on a desktop GPU and approximately 2.7ms on an NVIDIA Jetson TX2 embedded board, making it ideal for wearable medical devices.
Conclusion and Future Work
This research demonstrates that 2D time-frequency representations combined with multi-scale decision fusion can significantly improve ECG classification performance and reliability. Future work will explore feature-level fusion to extract deeper insights and test the robustness of these compact networks in diverse clinical environments with varying noise profiles.
Summary updated