Skip to main content
Back to timeline
researchsquare.comSource publication:

ECG models break on filter phase, not filtering: a causal all-pass shift drops conduction-block AUROC from 0.91 to 0.62

Synopsis

Real-time ECG monitoring must use causal filters, whose nonlinear phase misaligns the frequency components of the cardiac waveform. Across 36,583 twelve-lead records from three independent clinical databases, changing phase alone while holding spectral magnitude fixed cut ResNet-18 macro-AUROC by 0.1244 on PTB-XL, with conduction-block detection falling from above 0.91 to about 0.62. A training-time regularizer that randomly applies all-pass phase perturbations recovered 86.9% to 90.9% of that loss across cohorts without changing the architecture.

AI-generated editorial illustration: Causal Filter Phase Sensitivity in Deep Electrocardiographic Classifiers: Multi-Cohort Evaluation, Confound Decoupling, and Phase Augmentation

Interpretation

The phase response of a causal filter alone can markedly degrade a deep ECG classifier even when the filtered spectral magnitude is unchanged. Benchmark pipelines typically apply one fixed Butterworth bandpass filter and rarely test whether learned representations generalize across alternative filter topologies or phase characteristics. An all-pass cascade decoupled phase dispersion from magnitude attenuation, with magnitude deviation at most 3.66×10⁻¹⁵; ResNet-18 macro-AUROC fell by 0.1244 on PTB-XL, 0.0278 on CPSC-2018 and 0.0574 on Chapman-Shaoxing, with 95% bootstrap intervals excluding zero.

The loss concentrates in conduction-abnormality classes that depend on high-frequency QRS notches, indicating the models learn the training filter's phase signature. The same models score highest on Butterworth inputs, and a fourth-order Chebyshev Type I filter barely changes accuracy (0.9138 versus 0.9144), so nonzero group delay alone does not cause failure. Right bundle branch block AUROC fell from 0.9967 to 0.6186 on Chapman-Shaoxing and from 0.9894 to 0.9344 on CPSC-2018, while the PTB-XL conduction-defect class dropped from above 0.91 to about 0.62.

Random all-pass phase perturbation during training (AP-Aug) restores most of the performance without modifying the network. Conventional augmentations such as additive noise or time jittering change signal-to-noise ratio or shift the whole waveform, leaving relative harmonic phase inside the waveform untouched. Each sample passes through a random all-pass section with probability 0.5, with pole radius drawn from 0.65 to 0.90 and center frequency from 5 to 30 hertz; relative recovery was 90.92%, 86.93% and 90.82% across the three cohorts, with clean baseline accuracy comparable to standard training (0.9133 versus 0.9144).

Perspective

The findings rest on causal digital filters simulated in software, with signals downsampled to 100 hertz, and evaluation limited to a 1D CNN and ResNet-18. Models were trained and evaluated separately within each cohort to test reproducibility across independent clinical repositories rather than zero-shot transfer of one locked model across hospitals. AP-Aug draws its parameters from the rational all-pass family, and the evaluation probe lies within the support of that training distribution.

Augmentation was validated only within the rational all-pass family, not against non-rational continuous hardware filters, and only 42.5% of the loss was recovered on the delay-aligned FIR, so phase augmentation does not resolve out-of-family magnitude mismatch. All configurations were trained with a single random initialization seed, and the bootstrap intervals quantify test-sampling uncertainty for fixed models rather than inter-seed training variability. Continuous phase shifts, component tolerances and temperature drift from physical analog front ends still need hardware-in-the-loop validation, as does behavior at native 500-hertz sampling. Vision Transformers and state-space models were not benchmarked.