Extending Pretrained 10-Second ECG Foundation Models to Longer Horizons

Wei Tang, Jinpei Han, Kangning Cui, Mattia Carletti, Fredrik K. Gustafsson, Shreyank N Gowda, Patitapaban Palo, Anshul Thakur, Lei Clifton, Jean-michel Morel, Raymond H. Chan, David A. Clifton, Xiao Gu

TL;DR

Pretrained Electrocardiogram (ECG) foundation models are highly effective but typically restricted to short, 10-second "snapshot" windows, making them ill-suited for long-term continuous clinical monitoring. This paper introduces a parameter-efficient, plug-in framework that structurally and semantically extends these frozen 10-second models to longer, variable-length horizons without requiring expensive backbone retraining.

What Problem Does This Paper Address?

In clinical practice, standard diagnostic ECGs are brief 10-second recordings. Consequently, state-of-the-art ECG foundation models are pretrained exclusively on these short snapshots, biasing them toward local waveform morphology and short-term rhythms.

However, real-world conditions like paroxysmal atrial fibrillation, sleep apnea, or early-warning sepsis monitoring require continuous tracking over minutes, hours, or days. When applied to these longer horizons, existing models face two major hurdles:

  1. Structural Incompatibilities: Fixed positional encodings and tokenization schemes designed for 10-second inputs break down when given longer sequences.
  2. Semantic Challenges: Naive workarounds—like running a sliding window and averaging the outputs—fail to capture long-range temporal dependencies or isolate sparse, intermittent clinical events.

Retraining massive foundation models from scratch on long-duration data is computationally prohibitive. This paper tackles the challenge of adapting existing, frozen snapshot models to long-horizon, variable-length inputs efficiently.

Figure 1: Overview of the problem setting and extension strategies. ECG foundation models are typically pretrained on short, fixed-length recordings (e.g., 10 s), which makes direct use on long or variable-length recordings non-trivial. Naive extension strategies either run independent window-level predictions and aggregate the outputs as panel (a), or apply simple aggregation or sequential layers over window representations as panel (b). We propose a lightweight long-horizon extension for frozen 10-second ECG foundation models that supports variable-length longer recordings, by leveraging locality-aware inter-window similarity and dynamics-aware long-term learning, as illustrated in panel (c).

Methods

The authors propose a lightweight plug-in framework that leaves the pretrained foundation model backbone completely frozen, adapting it via two complementary components:

1. Structural Extension

Instead of interpolating positional embeddings (a common practice in computer vision that distorts physiological time scales in biosignals), the authors introduce a two-level hierarchical positional encoding scheme:

  • Local Component: Reuses and repeats the original pretrained 10-second positional embeddings to preserve fine-grained intra-segment structures (like P-QRS-T complexes).
  • Global Component: A learnable embedding matrix that models the coarse-grained relationships between consecutive 10-second blocks.

This is paired with soft prompt tuning, injecting learnable tokens into intermediate layers to capture long-range relationships parameter-efficiently.

2. Semantic Extension

To guide the model's long-term understanding, the framework uses a teacher-student paradigm where the frozen 10-second foundation model acts as the teacher:

  • Locality-Aware Representation Learning: Employs a rank-based soft contrastive loss to ensure the student model's segment-level representations remain aligned with the teacher's proven local semantics.
  • Dynamics-Aware Consistency Learning: Uses an affinity matrix generated by the teacher to partition segments into high- and low-affinity groups, ensuring the global representation remains robust even when dynamic or noisy segments are dropped.
Figure 2: Overview of our extension framework. The extension is divided into two complementary parts: a structural extension that enables compatibility with long-horizon recordings, and a semantic extension that supports coherent representation learning over extended temporal horizons. (a) Structural extension (Section 3.1) introduces additional learnable tokens, soft prompts and global positional embeddings, by freezing the original backbone model, to make it compatible with longer recordings. (b) Semantic extension (Section 3.2) leverages snapshot-level (10-second) representations derived from the frozen backbone as supervision, enforcing semantic consistency across segments and supporting coherent long-horizon understanding.

Datasets

The framework was evaluated across three distinct datasets spanning four downstream clinical tasks:

  • VTaC: A critical care benchmark focused on reducing false ventricular tachycardia alarms using the final 3 minutes of ECG data preceding an alarm.
  • MC-MED: Emergency department records used for two separate tasks: predicting ED disposition (Discharge vs. Admission) and triage acuity (5-class classification) using 3-minute lead-II ECG segments.
  • CPSC2021: A long-term Holter monitoring dataset targeting paroxysmal atrial fibrillation (AF) detection, segmented into non-overlapping 3-minute windows.

Key Insights and Ideas

  • Biosignals Aren't Images: Interpolating positional encodings works for images because it changes resolution, but in biosignals, it alters the perceived sampling rate and heart rate semantics. Repeating local blocks while layering a global timeline preserves physical reality.
  • Frozen Backbones Hold the Key: You don't need to update the core weights of a foundation model to change its temporal horizon. The local feature extraction capabilities are already mature; they just need an aggregation layer that respects their original training.
  • Cross-Model Distillation: If a snapshot model's internal representations are weak for a specific long-horizon task, the framework allows an external, stronger foundation model to act as the teacher, boosting the student model's performance.
  • Modality Agnostic: Though designed for ECGs, the framework successfully generalizes to Photoplethysmogram (PPG) data, demonstrating its broader utility for diverse physiological signals.

Key Results

The authors tested their framework against four prominent foundation model backbones: CSFM-Tiny, CSFM-Base, ECG-JEPA, and MERL.

  • Consistent Superiority: The proposed method consistently outperformed traditional snapshot aggregation (logit/token pooling) and standard lightweight adaptation techniques (like adapters or full fine-tuning) across almost all tasks.
  • CSFM-Base Performance: On the CSFM-Base backbone, the method achieved an overall average score of 81.11%, significantly outperforming token pooling (77.81%) and full fine-tuning (75.35%).
  • Robust Zero-Shot Generalization: Models were trained exclusively on 3-minute horizons but successfully evaluated on 10s, 30s, 1m, and 2m inputs without retraining, proving the framework handles highly variable inference lengths seamlessly.
Table 1: Main adaptation results across ECG foundation models and downstream tasks. For each task, we report performance at the longest evaluation horizon (180s) together with the average across five input lengths in the format Avg. (Std.). Best results are shown in bold and second-best results are underlined.

Limitations and Future Work

While the framework elegantly scales 10-second models to a 3-minute (180-second) horizon, scaling to ultra-long horizons (e.g., 24-hour Holter scans or multi-day ICU stays) remains an open challenge. Standard Transformer architectures hit severe memory and computational bottlenecks due to quadratic attention complexity over long sequences. The authors note that developing more inference-efficient mechanisms for ultra-long horizon adaptation is the vital next step for this research.

Summary updated

BibTeX
@inproceedings{tang2026extending,
  author = {Wei Tang and Jinpei Han and Kangning Cui and Mattia Carletti and Fredrik K. Gustafsson and Shreyank N Gowda and Patitapaban Palo and Anshul Thakur and Lei Clifton and Jean-michel Morel and Raymond H. Chan and David A. Clifton and Xiao Gu},
  title = {{Extending Pretrained 10-Second ECG Foundation Models to Longer Horizons}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=kk9jN1duEy},
}
Figure