Peak-Preserving Limiters for Few-Step ECG Bridge Samplers

Generative denoisers now beat linear filters at removing noise that occupies the same frequencies as the signal. A standard example is muscle artifact riding on an ECG (electrocardiogram, the heart's electrical trace), which overlaps the sharp QRS complex. The problem is speed. These models produce a clean signal by numerically integrating a learned differential equation over many small steps. When you take fewer, larger steps, high-order integrators either blow up or flatten the sharp peaks that clinicians actually read. Computational fluid dynamics has fought the same battle for decades. There, a limiter is a rule that locally falls back to a cruder but stable update wherever the accurate update starts to oscillate. Its known failure is that it also flattens genuine smooth peaks, an effect called clipping.

We propose to carry that machinery over, with a specific twist that targets the clipping failure. At each sampler step we compute an accurate update and a robust low-order update. We then limit only the difference between them, along the signal's own time-sample axis, and only where that difference oscillates from sample to sample. A real R-peak is a smooth bump in this difference, so it passes through untouched. A numerical blow-up shows up as a sawtooth, so it is blended back toward the safe update. The accurate update comes from a two-stage fourth-order scheme borrowed from gas dynamics, which needs no stored history and offers a single natural point at which to apply the limiter. The core claim is that a correction-limited sampler of this kind recovers near-full-step diagnostic fidelity (R-peak amplitude, QRS duration, isoelectric baseline) on ECG denoising at 4 to 8 steps, where unlimited high-order solvers fail and classical limiters blunt the peaks.

What is missing in the literature

Three bodies of work each hold one piece. On the denoising side, NEAR-SSB builds a Schrödinger bridge, a generative model that learns to transport noisy signals into clean ones along a random path. It replaces white noise with a spectrally shaped noise process whose covariance is circulant and diagonalized by the FFT. It reports a 23.4% reduction in maximum absolute deviation and a 28.5% reduction in sum of squared errors relative to its white-noise version, QRS durations within 1 ms of ground truth, and isoelectric deviation under 0.02 mV. Its reverse process is still integrated with low-order steps. DeScoD-ECG runs a conditional score-based diffusion model, averages up to 10 sampled trajectories, and names inference latency as its main bottleneck. These papers motivate the work: they establish that the models are good and the sampling is slow. They do not touch the solver.

On the solver side, Diffusion Sampling with Momentum shows that higher-order diffusion solvers have smaller stability regions and that "divergence artifacts" are latents escaping those regions. Its fix is Generalized Heavy Ball, a damping parameter β that blends adjacent solver orders. On ADM ImageNet-256 it reaches FID 37.43 at 10 steps against 66.77 for DPM-Solver++. Splitting numerical methods isolates a stiff guidance term and gives it a cheap first-order step inside a fourth-order Strang splitting, reaching FID 4.49 at 20 steps. Both papers supply evidence that stability, not model quality, limits few-step sampling. Both also constrain our design. Heavy Ball momentum provably drops to first order, and GHVB acts as a single global damping knob with no notion of where in the signal the instability lives.

On the numerics side, Mabuza et al. document that standard limiters clip smooth extrema and build a linearity-preserving nodal limiter that leaves locally linear profiles untouched. LWFR pairs a single-stage multi-derivative scheme with a TVD limiter applied once per step and explicitly calls the limiter an accuracy bottleneck. MDRK-FR builds a two-stage fourth-order multi-derivative scheme with a subcell blending limiter that is admissibility-preserving while staying fourth order on smooth flows. The two-stage gas-kinetic scheme introduced the two-stage fourth-order time update itself. These supply the method. None of them has been applied to a learned vector field, and none distinguishes oscillatory corrections from smooth ones in the way we propose.

Core Claim

Consider a 1D signal sampler. Its state $X_t \in \mathbb{R}^D$ is a waveform indexed by sample position $n$, so it already has the "spatial grid" that limiters need. Let $X_L$ be a robust first-order bridge step and $X_H$ the fourth-order step. We write the update as $X_L + \theta \odot (X_H - X_L)$, where $\theta_n \in [0,1]$ is chosen per sample position and $\odot$ is elementwise multiplication.

Classical bound-based limiting chooses $\theta$ by forcing the result to stay within the local min and max of $X_L$. That clips R-peaks, because the low-order step blunts peaks and the high-order step legitimately exceeds them. Our rule instead inspects the correction field $d = X_H - X_L$. We set $\theta_n < 1$ only where $d$ has large discrete total variation relative to its magnitude over a short window, which is the sawtooth signature of an unstable step. Where $d$ is locally smooth, including at the apex of a QRS complex, $\theta_n = 1$. This is the analogue of linearity preservation in Mabuza et al.: smooth corrections are never touched. The hypothesis this rests on is that when both integrators are accurate, their difference is a smooth truncation error in $n$, and that stiffness from the learned score produces oscillatory differences instead. We test this hypothesis directly, before anything else.

The host integrator is the two-stage fourth-order scheme of Xu et al., applied to the deterministic (probability-flow) form of the bridge $dX/dt = v(X,t)$:

$$X^{*} = X^{k} + \tfrac{h}{2} v^{k} + \tfrac{h^{2}}{8} \dot v^{k}, \qquad X^{k+1} = X^{k} + h\, v^{k} + \tfrac{h^{2}}{6}\big(\dot v^{k} + 2\,\dot v^{*}\big).$$

Here $h$ is the step size, $X^k$ the state at step $k$, $v^k = v(X^k,t_k)$, and $\dot v = \partial_t v + (\nabla_X v)\,v$ is the derivative of the drift along the trajectory. For the network part of the drift, $\dot v$ is a single forward-mode Jacobian-vector product with tangent $(v, 1)$, so no Jacobian is ever materialized. For NEAR-SSB's linear circulant prior part, $\dot v$ is computed analytically in the Fourier domain at negligible cost.

We are explicit that a forward-mode product costs roughly two to three forward passes. The scheme is therefore not cheaper than RK4 in raw compute. It is chosen because it needs no history, which multistep solvers need and which limiting corrupts, and because it has only one intermediate state.

Research Program

The first phase is diagnostic. We train NEAR-SSB, reimplemented from its closed-form posterior since no released code appears in our sources, and DeScoD-ECG on QT Database signals corrupted with MIT-BIH Noise Stress Test noise. For fixed noise seeds we compute a 1000-step reference trajectory. We then measure, at 4 to 20 steps, how discretization error is distributed along the sample axis. Specifically, we check whether it concentrates at QRS complexes, and whether the correction $d$ is oscillatory there under muscle artifact at 0 to 5 dB input SNR. If divergence turns out to be smooth rather than sawtooth-like, the detector premise fails, and we would fall back to a curvature-based extremum test in the spirit of the nodal limiter.

The second phase builds the sampler and the limiter. We calibrate the oscillation threshold once on a validation split and fix it across noise types and step counts. The aim is for it to replace GHVB's per-schedule β search, not to reintroduce one.

The third phase measures the sampler's empirical order of convergence against the reference. We expect close to fourth order at moderate steps with the limiter mostly inactive, and we record the fraction of samples limited as a function of step count.

The fourth phase maps the full accuracy-versus-wall-clock frontier on GPU and on a laptop-class CPU, since bedside latency is the motivating constraint.

Baselines

The naive reference point is the model's native low-order bridge sampler run at its full published step count. This defines the fidelity we try to match at a fraction of the cost, and it is also run at matched low step counts to show how much quality is lost by doing nothing clever.

The strongest existing stabilizer is GHVB from Diffusion Sampling with Momentum. It is the only published method aimed squarely at keeping high order while suppressing divergence at low step counts, and it reports FID 37.43 versus 66.77 for DPM-Solver++ at 10 steps on ADM ImageNet-256. No reported result was found on Lacuna for GHVB or any accelerated solver on ECG bridges, and none for NEAR-SSB at reduced step counts. We therefore run GHVB ourselves on the same trained models and the same noise seeds, and give β a grid search with the same validation budget as our threshold calibration.

We also run DPM-Solver++ and RK4 as standard high-order solvers, plus 10-shot ensembling as in DeScoD-ECG as a quality ceiling at ten times the cost.

Three ablations isolate the ingredients. The first is the two-stage scheme without any limiter. The second is the two-stage scheme with a classical min/max bound limiter on the state, which should show clipping. The third is our correction limiter grafted onto RK4 and onto DPM-Solver++, which tests whether the host integrator matters at all.

Beating the field means two things. At equal wall-clock and 8 or fewer steps, we must achieve lower reference-trajectory error and lower R-peak amplitude error than tuned GHVB. We must also keep QRS duration error within the 1 ms and isoelectric deviation within the 0.02 mV that NEAR-SSB reports at full steps.

Why not just…?

Why not just run the native sampler with more steps? That is the baseline we must beat on latency. The stated motivation of DeScoD-ECG is that the full-step cost blocks deployment. If our frontier does not dominate this baseline at matched wall-clock, the project fails, and the frontier plot will show it plainly.

Why not just use RK4 or DPM-Solver++ with the same limiter? This is the most serious threat, and we treat it as a likely outcome. The limiter is the real contribution, and nothing prevents grafting it onto RK4. Multistep solvers have a structural problem: limiting a step alters the history they extrapolate from, and they cannot self-start, which the splitting paper notes as latency in the first steps. RK4 has no such problem. The host ablation settles the question. If RK4 plus the limiter matches the two-stage scheme at equal wall-clock, we report the limiter as a solver-agnostic module and drop the claim that the two-stage scheme matters.

Why not just tune GHVB? GHVB applies one global damping to the whole signal. Damping strong enough to stop a local blow-up at a QRS complex also slows convergence on the smooth baseline, and β must be searched per schedule. The per-sample $\theta$ map tests this directly: if instability is spatially concentrated, localized limiting should win. If GHVB with a tuned β matches us, locality is not buying anything.

Why not just clamp or smooth the final output? Post-hoc smoothing is a linear filter applied after the fact. Under spectral overlap it suffers exactly the morphological distortion that motivated generative denoisers in the first place, as NEAR-SSB and the ECA-Net CycleGAN work document. Amplitude clamping cannot undo errors that have already propagated through the trajectory. We include both as cheap baselines anyway.

Why not just distill the bridge into a few-step student? Distillation is orthogonal and may well reach lower step counts. It requires retraining for every model and every spectral prior, whereas a limiter works at inference time on any trained bridge. Our sources contain no distillation results to compare against, so we make no superiority claim. We note that a distilled student could host the same limiter.

Proposed Experiments

The main benchmark follows the DeepFilter-style protocol used by DeScoD-ECG. Clean signals come from the QT Database, with baseline wander, electrode motion and muscle artifact from the MIT-BIH Noise Stress Test at 0 to 15 dB. We report SSD, MAD, PRD and cosine similarity, plus three peak-specific measures: R-peak amplitude error, QRS duration error, and isoelectric deviation. We separate discretization error from model error by measuring distance to each model's own 1000-step reference trajectory.

The decisive checks are four. First, the correction field must actually be oscillatory where samplers fail; this is a falsifiable prerequisite. Second, the classical-bound ablation must show measurable R-peak blunting that our limiter avoids. Third, the empirical order must stay near four with the limiter mostly inactive. Fourth, the RK4-host ablation decides whether the two-stage scheme is part of the contribution or only the limiter is.

As a generality check outside ECG, we apply the same limiter over pixel neighborhoods for ADM on ImageNet-256 at 10 steps, where the target to beat is the reported GHVB 0.8 FID of 37.43. We regard this as secondary: an image has no single meaningful axis along which to test smoothness, so a null result there would not undermine the ECG claim.