Table of Contents
Fetching ...

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.

Enhancing ECG Classification Robustness with Lightweight Unsupervised Anomaly Detection Filters

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.

Paper Structure

This paper contains 20 sections, 4 figures, 2 tables.

Figures (4)

  • Figure 1: Schematic overview of the proposed robust ECG monitoring architecture. An independent UAD filter is deployed upstream of the diagnostic classifier. The filter assesses incoming ECG signals. If they are deemed anomalous (OOD or unsuitable for analysis due to noise), the signal is rejected, thereby protecting the classifier from unreliable inputs and improving overall system robustness.
  • Figure 2: Visualization of the realistic noise injection process applied to the PTB-XL dataset. A clean ECG signal (bottom left) is corrupted by adding calibrated noise (top center), sourced from the MIT-BIH noise stress test database. The resulting noisy ECG signal (bottom right) simulates real-world ambulatory conditions where the signal quality is unsuitable for analysis.
  • Figure 3: Performance-efficiency trade-offs (Pareto fronts) resulting from the NAS in Experiment 1 across five anomaly detection scenarios. Each panel illustrates the trade-off between detection performance, measured by AUC (higher is better), and computational efficiency, measured by parameter count (lower is better). The upper-left region represents the optimal trade-off. Deep SVDD, NF and MAD consistently demonstrate superior efficiency compared to AE, VAE and DDPM in OOD CVD detection tasks. All methods achieve very high AUC for the detection of ECG signals unsuitable for analysis due to noise (rightmost panel).
  • Figure 4: System performance (custom accuracy) as a function of the rejection rate across the four OOD scenarios. The rejection rate (x-axis) is controlled by varying the decision threshold of the Deep SVDD filter. A stricter threshold yields a higher rejection rate. Dashed horizontal lines represent the baseline accuracy of the classifier-only system (0% rejection rate). The curves demonstrate a critical trade-off. Accuracy initially increases as anomalies are correctly filtered out, peaks at an optimal operating point and subsequently declines as the filter becomes overly aggressive and rejects in-distribution data.