Abstract
This paper presents a high-precision, ultra-compressed 1-D Convolutional Neural Network (CNN) for arrhythmia classification, specifically designed for deployment on low-power wearable devices. The proposed 17-layer architecture, ECGNet, identifies 17 distinct heart rhythm types from raw ECG signals. To overcome the memory constraints of mobile hardware, an Adaptive Loss-aware Quantization (ALQ) method was employed. This strategy achieved a 23.36x compression rate, reducing the model size to a mere 13.54 KB while simultaneously improving classification accuracy to 95.84% on the MIT-BIH Arrhythmia database. These results demonstrate the feasibility of sophisticated deep learning diagnostics on resource-constrained microcontrollers.
Introduction
Cardiovascular diseases (CVDs) remain a leading global cause of mortality, necessitating continuous monitoring for early detection. While wearable heart monitors offer a solution for capturing transient arrhythmias, a significant "hardware gap" exists. Modern deep learning models, particularly CNNs, provide high diagnostic accuracy but are typically too memory-intensive for the low-power microcontrollers found in smartwatches. Traditional compression techniques often incur a "precision tax," sacrificing accuracy for reduced size. This research addresses this gap by introducing a hardware-friendly model that maintains high performance through specialized architecture and a novel quantization strategy.
Methods
The researchers developed a two-pronged approach involving a custom network architecture and a specialized compression strategy.
ECGNet Architecture
The model is a 17-layer 1-D CNN designed for 10-second ECG fragments sampled at 360 Hz. The network features seven "basic blocks," each comprising a 1-D convolution layer, ReLU activation, and max-pooling. This is followed by a dense layer and a softmax output for classification. Unlike traditional methods that require manual feature extraction (such as identifying P-waves), this 1-D CNN works directly on raw ECG signals.
Adaptive Loss-aware Quantization (ALQ)
The core innovation is the ALQ method, which differs from standard quantization by minimizing error relative to the loss function rather than weight reconstruction error. ALQ employs an adaptive bitwidth strategy, identifying layers most sensitive to precision and allocating more bits accordingly. The process involves three primary steps: pruning insignificant coordinates in the $\alpha$ domain, searching for optimal binary bases, and adjusting group sizes to balance compression and accuracy.
Datasets
The model was evaluated using the MIT-BIH Arrhythmia database. The dataset consisted of 1,000 ECG fragments (10 seconds each), split 80% for training and 20% for testing across 17 rhythm classes, representing a more complex task than standard binary classification.
Results
The quantized model achieved an overall accuracy (OA) of 95.84%, notably outperforming the full-precision version (93.5%). This "accuracy paradox" suggests that adaptive quantization acts as a form of regularization, pruning parameters that might otherwise lead to overfitting.
As shown in the layer analysis, the ALQ method achieved a 23.36x compression rate, bringing the model size down from 316.3 KB to 13.54 KB. The average bitwidth across the network was reduced to 1.3696 bits. Analysis confirmed that the second convolutional layer and the final Softmax layer were most critical for maintaining accuracy, receiving higher bitwidths (up to 2.0) while other layers were compressed significantly further.
Discussion and Conclusion
The proposed method demonstrates that high-level cardiac diagnostics can be performed with extremely low-precision math. By working directly on raw ECG signals, the model eliminates the need for manual feature extraction, simplifying the preprocessing pipeline for wearable hardware.
While successful, the authors note that future work is required to quantize activation layers—this study focused primarily on weight quantization. Additionally, the researchers plan to implement this algorithm on a dedicated low-power arrhythmia detection ASIC (Application-Specific Integrated Circuit) to validate its efficacy in physical wearable devices.
Summary updated