Authors: Jiawei Li, Fabio Bonassi, Ming Jin, Stefan Gustafsson, Johan Sundström, Thomas B. Schön, Antônio H. Ribeiro
Organizations: Uppsala University · Griffith University
Abstract
While scaling laws have established a fundamental framework for foundation models in natural language processing, their applicability to electrocardiogram (ECG) models remains poorly characterized. Indeed, recent studies do not always yield consistent downstream gains as one increases the model size or pre-training dataset size of ECG models, leaving the exact roles of architectural inductive biases, pre-training paradigms, and expected improvements with size largely unanswered. In this work, we systematically investigate neural and loss-to-loss scaling laws within the ECG domain. By pre-training over 120 models (ranging from 20K to 200M parameters) on the large-scale CODE dataset (2.3M records), we decouple the effects of model architecture (ResNet vs. Transformer) and pre-training paradigm, namely supervised learning (SL) versus self-supervised learning (SSL). We found that (i) SL models are data-bottlenecked in-distribution, whereas SSL models scale robustly across both model and data sizes; (ii) for out-of-distribution (OOD) generalization, ResNets are 1.3 to 2.5 times more parameter-efficient than Transformers, while SSL is up to 16 times more data-efficient and achieves up to 7.6 times higher transfer efficiency than SL on unseen clinical tasks; (iii) across the observed scales, ResNet-based models generally achieve the lowest OOD loss, with SSL dominating on unseen clinical tasks and self-supervised Transformers overtaking at very large model sizes. Our results suggest that the path to effective ECG foundation models lies in the strategic alignment of architecture and paradigm rather than brute-force scaling.
Specialized foundation models are beginning to emerge in various medical subdomains, but pretraining methodologies and parametric scaling with the size of the pretraining dataset are rarely assessed systematically and in a like-for-like manner. This work focuses on foundation models for electrocardiography (ECG) data, one of the most widely captured physiological time series world-wide. We present a comprehensive assessment of pretraining methodologies, covering five different contrastive and non-contrastive self-supervised learning objectives for ECG foundation models, and investigate their scaling behavior with pretraining dataset sizes up to 11M input samples, exclusively from publicly available sources. Pretraining strategy has a meaningful and consistent impact on downstream performance, with contrastive predictive coding (slightly ahead of JEPA) yielding the most transferable representations across diverse clinical tasks. Scaling pretraining data continues to yield meaningful improvements up to 11M samples for most objectives. We also compare model architectures across all pretraining methodologies and find evidence for a clear superiority of structured state space models compared to transformers and CNN models. We hypothesize that the strong inductive biases of structured state space models, rather than pretraining scale alone, are the primary driver of effective ECG representation learning, with important implications for future foundation model development in this and potentially other physiological signal domains.
Background: Foundation models (FMs) trained on large-scale unlabeled physiological data have emerged as a promising paradigm for medical artificial intelligence. Their ability to capture clinically meaningful, transferable representations for rare diseases remains largely unproven. This study investigates whether FM pre-training provides genuine clinical generalization benefits beyond improved optimization for rare electrocardiographic (ECG) phenotypes. Methods: We systematically evaluated nine publicly available ECG FMs for Brugada syndrome detection on the BrSwiss cohort (294 patients, 87 cases) and the independent external HUCA cohort (363 patients, 76 cases), under three strategies (from-scratch training, linear probing, full fine-tuning) across several configurations, including a 3% data ablation and zero-shot cross-site transfers. Results: Pre-training was necessary for high-capacity architectures unable to converge from scratch (AUC gain up to 0.411, p < 0.05), but gave no significant gain for compact architectures already converged on labeled data alone. On full BrSwiss, the best fine-tuned FM (ECG-CPC, AUC = 0.962) only marginally exceeded the strongest supervised baseline (ECG-CPC from scratch, AUC = 0.932; p = 0.091). At matched training-set size, the data-efficiency advantage on BrSwiss-3% (AUC gain = 0.055, p < 0.01) did not replicate on HUCA. Under zero-shot cross-site transfer, FM-based pipelines did not generalize better than supervised baselines, all approaching chance-level performance. Conclusion: For Brugada syndrome detection, FM pre-training is mechanical rather than semantic, providing optimization stability rather than transferable clinical knowledge. These findings challenge the assumption that large-scale pre-training inherently encodes clinically meaningful representations, highlighting the central role of model architecture and data-domain alignment.
Beatrice Zanchi, Giuliana Monachino, Alvise Dei Rossi +4
Electrocardiogram (ECG) foundation models pretrained on typical diagnostic 10-second ECG segments, have demonstrated strong transferability across a range of clinical applications. However, many real-world applications produce recordings that are typically longer, and are varied in duration during inference time. These 10-second models have no built-in way to combine information across time. Extending them to longer horizons introduces two challenges: structural incompatibilities arising from input-length disparities, and semantic challenges that limit meaningful temporal aggregation. We propose a parameter-efficient framework that extends pretrained ECG foundation models to longer and variable-length ECGs without retraining the backbone. Guided by a frozen pretrained 10-second model, we introduce a lightweight plug-in module that extends the model in two complementary ways: (i) structurally compatible long-sequence processing and (ii) semantically informed temporal modeling. Experiments on multiple long-horizon ECG tasks, datasets, and foundation model backbones demonstrate that our method enables robust long-horizon extension from pretrained snapshot models, consistently outperforming sliding-window and pooling-based baselines with strong parameter efficiency.