Decoder Design Matters for ECG Delineation

Joseph Scharpf, William Han, Chaojing Duan, Michael A. Rosenberg, Emerson Liu, Ding ZhaoarXiv 2026

TL;DR

When developing machine learning models for ECG delineation, we often focus heavily on advanced training algorithms like semi-supervised learning (SSL). This paper demonstrates that a simpler, often overlooked factor—the design of the decoder architecture—actually drives the majority of performance gains, with a U-Net style decoder vastly outperforming standard fully convolutional network (FCN) heads.

What Problem Does This Paper Address?

ECG delineation is the task of segmenting an electrocardiogram signal into its structural components: the P wave, QRS complex, and T wave. Accurate delineation is crucial for automated cardiac feature extraction and guiding downstream AI models. However, training these models requires precise, sample-level manual annotations, which are notoriously scarce and time-consuming to produce.

To bypass this data bottleneck, recent research has leaned heavily into semi-supervised learning (SSL) frameworks. However, these benchmarks typically pair complex SSL algorithms with a basic, lightweight Fully Convolutional Network (FCN) decoder head attached to a standard encoder (like ResNet or ViT). The authors of this paper noticed a glaring gap: no one was checking whether this default decoder choice was actually holding the models back.

Methods

The authors introduce R-U-Net, a model that shifts the focus back to structural architecture.

Fig. 1. A high-level architectural overview of R-U-Net.

Instead of using a simple FCN head, R-U-Net pairs a standard 1D ResNet-18 encoder with a multi-stage 1D U-Net decoder. The decoder progressively upsamples deep feature representations and fuses them with high-resolution features from the encoder via skip connections.

To maximize performance in low-data regimes, they also introduce a Boundary-Aware Mean Teacher framework. This semi-supervised training method uses a student-teacher setup but adds a specialized loss term that penalizes uncertainty and emphasizes the sharp transitions (onsets and offsets) between different ECG waveforms.

Datasets

The model was rigorously evaluated using the SemiSegECG benchmark, which consists of four public, annotated ECG datasets:

  • LUDB (Zhejiang University)
  • QTDB
  • ISP
  • Zhejiang

For cross-domain evaluation, the authors used the massive PTB-XL dataset as an external, completely unlabeled data source to test how well the model generalizes to entirely new data distributions.

Key Insights and Ideas

  • Architecture Trumps Algorithm: The most surprising finding is that upgrading the decoder architecture yields significantly higher performance gains than implementing complex SSL training recipes. Training a U-Net decoder from scratch (fully supervised) beats an FCN decoder trained with advanced SSL techniques by a wide margin.
  • It’s Not About Parameter Count: To prove that the U-Net's success wasn't just due to having more parameters, the authors tested a "Wide FCN" with an identical parameter count (~1.03M). The Wide FCN showed zero improvement over the baseline FCN, confirming that U-Net’s hierarchical structure and skip connections are what truly matter for processing spatial/temporal waveform boundaries.
  • Skip Connections Provide the Polish: While the U-Net structure itself provides the massive initial performance leap (+12.7 mIoU over FCN), adding skip connections refines the boundaries further, contributing an additional 1.8 mIoU improvement.

Key Results

R-U-Net achieved state-of-the-art results across the entire SemiSegECG benchmark:

  • In-Domain Performance: Across all 16 evaluation settings (varying fractions of labeled data from 1/16 to 1/2 across 4 datasets), R-U-Net consistently outperformed the strongest ResNet-18 + FCN baselines by 3.3 to 13.0 mIoU. The gains were most pronounced in the ultra-low data settings (1/16 labels).
  • Cross-Domain Generalization: When trained on a mix of datasets and tested against an external distribution, R-U-Net achieved 82.6 mIoU, outperforming the best baseline by 8.1 mIoU, demonstrating robust generalization.
Fig. 3. Cross-domain test mIoU on the merged in-domain test set. Baselines use an FCN decoder [3].

Qualitatively, the model demonstrates near-perfect alignment with expert human annotations, cleanly isolating wave boundaries even in noisy signals.

Example of successful ECG delineation by R-U-Net compared with the ground truth.

Limitations and Future Work

While the paper convincingly isolates the impact of the decoder, it primarily focuses on a single encoder backbone (ResNet-18). It remains to be seen if these exact decoder-level advantages hold true when paired with more modern, heavy-duty backbones like Vision Transformers (ViTs) or state-space models (Mamba). Additionally, the authors note that future work should focus on designing new SSL algorithms specifically optimized to exploit these stronger, multi-scale decoder architectures.

Summary updated

BibTeX
@misc{scharpf2026decoder,
  author = {Joseph Scharpf and William Han and Chaojing Duan and Michael A. Rosenberg and Emerson Liu and Ding Zhao},
  title = {{Decoder Design Matters for ECG Delineation}},
  year = {2026},
  eprint = {2609.16489},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.16489},
}
Figure