Enhancing ECG Classification Robustness with Lightweight Unsupervised Anomaly Detection Filters
Mustafa Fuad Rifet Ibrahim, Maurice Meijer, Alexander Schlaefer, Peer Stelldinger
TL;DR
This work tackles the reliability challenges of deploying deep learning ECG analysis on wearable devices in the presence of Out-of-Distribution (OOD) data and noise. It evaluates six lightweight, NAS-optimized Unsupervised Anomaly Detection (UAD) methods as upstream filters to reject unusable inputs, with Deep SVDD delivering the best balance of detection performance and computational efficiency under a 512k-parameter constraint. When integrated upstream of a ResNet1D classifier, the optimized Deep SVDD filter substantially boosts diagnostic robustness, achieving up to 21 percentage-point gains in realistic deployment scenarios that include unseen CVDs and ambient noise. The findings support deploying lightweight UAD filters to improve the safety and reliability of continuous cardiovascular monitoring on wearables, though hardware-level metrics and multimodal extensions remain for future work.
Abstract
Continuous electrocardiogram (ECG) monitoring via wearables offers significant potential for early cardiovascular disease (CVD) detection. However, deploying deep learning models for automated analysis in resource-constrained environments faces reliability challenges due to inevitable Out-of-Distribution (OOD) data. OOD inputs, such as unseen pathologies or noisecorrupted signals, often cause erroneous, high-confidence predictions by standard classifiers, compromising patient safety. Existing OOD detection methods either neglect computational constraints or address noise and unseen classes separately. This paper explores Unsupervised Anomaly Detection (UAD) as an independent, upstream filtering mechanism to improve robustness. We benchmark six UAD approaches, including Deep SVDD, reconstruction-based models, Masked Anomaly Detection, normalizing flows, and diffusion models, optimized via Neural Architecture Search (NAS) under strict resource constraints (at most 512k parameters). Evaluation on PTB-XL and BUT QDB datasets assessed detection of OOD CVD classes and signals unsuitable for analysis due to noise. Results show Deep SVDD consistently achieves the best trade-off between detection and efficiency. In a realistic deployment simulation, integrating the optimized Deep SVDD filter with a diagnostic classifier improved accuracy by up to 21 percentage points over a classifier-only baseline. This study demonstrates that optimized UAD filters can safeguard automated ECG analysis, enabling safer, more reliable continuous cardiovascular monitoring on wearables.
