TL;DR
Wearable ECG monitors face a messy reality: everyday movement creates noise that mimics or masks critical heart signals, and cleaning that signal aggressively can erase the very clinical clues doctors need. CLEAR is a tiny (28,330-parameter), causal neural network that doesn't just clean ECG waveforms on the fly—it shows its work by outputting noise masks, classifying the interference, and deciding whether a signal should be passed through untouched, denoised, or flagged for human review. Instead of chasing leaderboard-topping reconstruction scores at any cost, it demonstrates how to build a transparent, resource-friendly medical AI with strict guardrails against data leakage.
What Problem Does This Paper Address?
Recording an electrocardiogram (ECG) in a quiet clinic is straightforward; recording one on a wearable armband while someone jogs or types is a nightmare of overlapping interference. Muscle artifacts (MA), electrode motion (EM), and breathing-induced baseline wander (BW) constantly corrupt the signal.
Traditional filters struggle because motion artifacts overlap in frequency with the heart's actual electrical spikes (like the QRS complex). Meanwhile, heavy-duty deep learning denoisers—such as bidirectional networks, Transformers, or diffusion models—introduce three practical headaches for wearables:
- They peek into the future: Non-causal (bidirectional) models require future samples to clean the current moment, adding latency or violating causal processing constraints.
- They are black boxes: If a neural network hallucinates a healthy heartbeat over a noisy arrhythmia, a clinician has no way of knowing where or how the model intervened.
- Evaluation leakage: Many existing benchmarks split data by recording rather than by patient, or reuse the same background noise snippets across training and testing, inflating performance claims.
Methods
CLEAR tackles these issues with a compact, multitask architecture that processes 10-second single-lead ECG windows (at 360 Hz) strictly forward in time.
- Causal Backbone: It pairs a 4-layer dilated Temporal Convolutional Network (TCN) using left-only padding with a single-layer unidirectional Gated Recurrent Unit (GRU). No future samples are ever touched during sequence modeling.
- Residual Prediction & Auditing: Rather than generating a synthetic clean ECG from scratch, CLEAR predicts the residual noise ($\widehat{\mathbf{n}}$) and subtracts it from the input ($\widehat{\mathbf{s}} = \mathbf{x} - \widehat{\mathbf{n}}$). Alongside the noise, shared representations feed lightweight heads that predict a sample-by-sample local artifact mask, noise types (MA/EM/BW), global artifacts (BW/power-line), and overall signal quality.
- Quality-Guided Triage: Based on its 3-state quality prediction, CLEAR routes the window: good signals bypass denoising entirely to avoid unnecessary distortion; noisy signals get cleaned; discard signals (e.g., sensor saturation or packet loss) are withheld for manual review rather than silently outputting garbage.
Datasets
The authors enforce a strict "zero-leakage" benchmark protocol:
- Training & Primary Testing: Clean Lead-II waveforms from PTB-XL (21,799 records from 18,869 patients, strictly split by patient—fixing a flaw where record-level splits leak 165 patients across sets) mixed with chronologically isolated noise segments from the MIT-BIH Noise Stress Test Database plus synthetic device glitches (pops, packet loss, power-line hum).
- Zero-Shot Transfer: Evaluated without fine-tuning on QTDB, MITDB, and ECG-ID.
- Human Quality Adaptation: The Brno University of Technology ECG Quality Database (BUT QDB) is used to test adapting only the tiny quality-classification head to real human annotations.
Key Insights and Ideas
- Honest trade-offs beat universal superiority: Explaining your work costs capacity. An ablation stripping away CLEAR's auxiliary explanation heads ("denoise-only") actually lowered reconstruction error by 7.19%. Furthermore, a larger bidirectional GRU and a similarly sized non-causal 1D U-Net beat CLEAR on overall reconstruction error. CLEAR's value isn't raw pixel-perfect supremacy—it's integrating causal denoising, localization, and triage in a tiny footprint.
- Where causality shines (and where it doesn't): While the 1D U-Net smoothed out local muscle and electrode glitches slightly better, CLEAR consistently outperformed the U-Net whenever full-window baseline wander (BW) was present, especially at moderate-to-high signal-to-noise ratios.
- Plug-and-play human alignment: Simulation rules for "signal quality" rarely match what human experts think. By freezing 99% of the network and retraining just the 291 parameters in the quality head on BUT QDB, human-agreement quality macro F1 jumped from 0.2444 to 0.8176 without altering a single denoising weight.
- Detecting a problem $\neq$ fixing it: In a dedicated 50/60 Hz power-line stress test on nearly clean signals, CLEAR detected the power-line hum accurately (0.9417 F1) and suppressed the target frequencies, yet worsened overall signal SNR by $-6.66$ dB due to broadband off-band distortion.
Key Results
- Main Benchmark: Across three seeds on the 3,316 fixed test windows, CLEAR reduced noisy RMSE by 63.92% (to $0.3799 \pm 0.0008$), boosted SNR by $8.46 \pm 0.03$ dB, improved R-peak heart-rate detection F1 to $0.9636$, and localized artifacts with a pointwise mask F1 of $0.8573$.
- Selective Inference: Quality-guided routing retained 77.0% of test windows (achieving $0.3395$ RMSE vs. $0.8408$ if left noisy) and passed 99.98% of clean control signals untouched.
- Zero-Shot Transfer: Without fine-tuning, external R-peak F1 reached 0.9565 (QTDB), 0.9616 (MITDB), and 0.9852 (ECG-ID), beating the U-Net on QTDB and MITDB.
- Footprint: Quantized to dynamic INT8, CLEAR takes up just 82.65 KiB of storage and runs in ~62 ms per 10-second window on a standard x86 CPU.
Limitations and Future Work
The authors are refreshingly candid about the boundaries of their work:
- Simulated mixtures & segment pooling: Contamination is synthetically mixed rather than prospectively recorded from live wearables. Moreover, while the backbone is causal, global mean/std pooling for quality decisions still requires waiting for a full 10-second window rather than sample-by-sample streaming.
- Coarse event boundaries & noisy recall: While pointwise mask F1 is high ($0.8573$), strict event-boundary F1 drops to $0.3647$. On human quality adaptation, recall for the middle "noisy" class remained weak ($0.4405$) across a small five-subject test split.
- Future directions: Testing on real-world wearable motion artifacts, expanding human-annotated cohorts, adding a conservative fallback filter for power-line interference, and profiling actual energy consumption on embedded microcontroller hardware.
Summary updated