Introduction
Electrocardiograms (ECGs) are the primary tool for monitoring cardiac health and identifying arrhythmias. However, the automated classification of heartbeats remains a significant challenge due to high morphological variability between patients and even within individual recordings. Traditional machine learning methods often rely on error-prone, hand-crafted feature extraction. While recent deep learning approaches have utilized 1D Convolutional Neural Networks (CNNs) to process raw signals, these models frequently struggle to distinguish between similar morphologies, such as Normal (N) and Supraventricular ectopic (S) beats, because 1D representations can obscure subtle structural differences.
Methodology: Feature Enrichment
To overcome the limitations of 1D signal processing, this research introduces a Feature Enrichment (FE) approach. Instead of compressing data, the method expands 1D ECG signals into a richer 2D format using a Short-Time Fourier Transform (STFT).
- Preprocessing: Raw signals are filtered using a 4th-order Chebyshev type I bandpass filter (6–18 Hz) to eliminate noise and baseline wander.
- 1D to 2D Transformation: Heartbeats are segmented around the R-peak. The STFT is then applied to generate a 224×224 pixel spectrogram, mapping frequency magnitude and phase over time.
- FE-CNN Architecture: The resulting 2D images are processed by a 31-layer deep CNN. This architecture incorporates "BasicBlocks" with residual (shortcut) connections, similar to ResNet, to prevent vanishing gradients and ensure effective information propagation through the deep network.
Experimental Results
The model was evaluated using the MIT-BIH Arrhythmia Database, adhering to the Association for the Advancement of Medical Instrumentation (AAMI) standards. The FE-CNN demonstrated state-of-the-art performance, particularly in identifying difficult-to-classify beats:
- S Beats (Supraventricular ectopic): Achieved an F1 score of 0.82, a significant improvement over the previous state-of-the-art (0.75). This was largely driven by a high Positive Predictive Rate (Ppr) of 90.1%, indicating a substantial reduction in false alarms.
- V Beats (Ventricular ectopic): Maintained high performance with an F1 score of 0.94.
- Overall Agreement: The model achieved a Kappa coefficient of 0.89, signifying excellent alignment with expert annotations.
Discussion and Conclusion
The core finding of this study is that 2D spectrograms provide a more separable visual and mathematical space for heartbeat classification than 1D waveforms. Feature enrichment exposes dependent structural patterns that 1D convolutions often miss. While S beat sensitivity (75.6%) still trails V beat detection due to data imbalance, the FE-CNN significantly advances the reliability of automated arrhythmia monitoring.
Future research will explore mapping time-series data to higher-dimensional manifolds and utilizing Explainable AI (XAI) techniques to further interpret the CNN's decision-making process in clinical settings.
Summary updated