Architecture or Objective? Iso-Capacity Pretraining for Label-Scarce ECG

When a clinic has thousands of unlabeled heart recordings and only a few hundred labeled by a cardiologist, the usual recipe is to pretrain a model on the unlabeled recordings and then fine-tune it on the few labels. The recipe works. A recent benchmark of eight electrocardiogram (ECG) foundation models found they need 3.3× to 9× fewer labels than models trained from scratch. What nobody can say is why one foundation model beats another. In that benchmark a 3.8M-parameter state space model, a sequence model that carries a compact running memory of the signal, beat models 25 times larger. A Transformer won once fewer than 1,000 labels were available. The released models differ at once in architecture, size, training objective, and pretraining data, so these rankings cannot be traced to any one cause.

We propose a fully crossed experiment that removes those confounds. Convolutional networks, Transformers, and state space models are each pretrained on the same unlabeled ECG corpus, at matched parameter budgets, under each of two pretraining objectives. All of them are then fine-tuned at label fractions from 1% to 100%. The specific question is whether the label-scarce advantages credited to architectures are really architectural, or whether they belong to the pretraining objective and to model size. Our leading hypothesis is that the Transformer's low-label win reported for ECG-JEPA follows the JEPA-style objective rather than the attention mechanism. Here JEPA means a joint-embedding predictive objective, which predicts the hidden representation of masked signal regions. If that holds, the field has been choosing backbones for the wrong reason.

Core Claim

Benchmarking ECG FMs: A Reality Check Across Clinical Tasks motivates this work. It evaluates eight released ECG foundation models on 26 tasks and reports three facts without being able to explain them. First, ECG-CPC, a 3.8M-parameter state space model, dominates 5 of 7 task categories. Second, ECG-JEPA, a Transformer, is the most label-efficient model below 1,000 samples. Third, a supervised S4 model trained from scratch is often competitive with much larger pretrained models. The authors say directly that differing pretraining datasets make it hard to isolate architecture from data.

The capacity-normalization literature explains why this matters. Comparisons made at matched hidden width hide large differences in parameter count. Once budgets are equalized, apparent architectural wins often disappear, as shown for graph networks in Benchmarking Graph Neural Networks and for gated recurrent cells in the work summarized in our file.

Our claim is that the label-efficiency curve of a pretrained ECG model is jointly determined by three factors, and that these can be separated: the parameter budget, the pretraining objective, and the architecture. We expect the objective and the budget to explain more of the downstream variance in the low-label regime than the architecture does. The study is built so that it can also refute this.

The headline quantity is the label-efficiency multiplier at a target accuracy, written

$$m(a) = \frac{n_{\text{scratch}}(a)}{n_{\text{pre}}(a)},$$

where $n_{\text{pre}}(a)$ is the number of labels a pretrained model needs to reach macro AUC $a$, and $n_{\text{scratch}}(a)$ is the number the same architecture, at the same parameter budget and trained from scratch, needs to reach that AUC. Both are read off interpolated learning curves. Al-Masud et al. report this multiplier across mismatched models. We report it at matched capacity, separately for each architecture and objective.

Research Program

The pretraining corpus is the union of the training splits of the public ECG datasets in the Al-Masud benchmark, with labels discarded and every evaluation test split held out. This choice puts every model on identical data, which neither the released foundation models nor Self-supervised representation learning from 12-lead ECG data provide. The latter study compared pretraining objectives but fixed a single convolutional backbone, xresnet1d. We reuse that backbone as our convolutional family, which gives us its finding that CPC beats instance-discrimination methods as a direct anchor.

The three architecture families are an xresnet1d-style one-dimensional CNN, a patch-based Transformer, and a state space model. For the state space model we use both S4-style layers and bidirectional Mamba, taking the bidirectional variant from the Bi-Mamba codebase. Each family is sized to three parameter budgets: about 4M, matching ECG-CPC; about 20M; and about 100M, matching the larger released models. We adjust depth and width, plus the expansion factor for Mamba, following the parameter-matching procedure of Audio Mamba. That paper matched a 4.8M Mamba against a 5.4M SSAST and a 69.3M against a 73.1M, but only varied pretraining data volume, never the downstream label budget.

Parameter matching alone does not equalize compute or memory. We therefore log FLOPs per sample, peak activation memory, and recurrent state size for every model. In the spirit of the iso-state control introduced in Mechanistic Design and Scaling of Hybrid Architectures, we also run the 4M budget a second time under matched FLOPs. That way any architectural conclusion can be checked against the charge that it is really a compute effect.

The two objectives are CPC-style latent forecasting, which predicts representations of future windows from past context, and JEPA-style masked latent prediction. Both are implemented for all three families. CPC uses a causal context network on top of each encoder, and JEPA uses a bidirectional encoder with masked target regions. This crossing is the core of the design. In the released models, the objective and the architecture always come bundled, CPC with a state space model and JEPA with a Transformer, so the observed crossover cannot be attributed to either.

Every pretrained model is evaluated by linear probing and by full fine-tuning at label fractions of 1%, 2%, 5%, 10%, 20%, and 100%, with three seeds and stratified subsampling. Each architecture at each budget is also trained from scratch on the same fractions, which supplies the denominator of $m(a)$. The primary analysis is a variance decomposition of downstream macro AUC at each label fraction. It reports what share is attributable to architecture, budget, objective, and their interactions, and shows how those shares move as labels become scarce.

Baselines

The naive reference point is supervised training from scratch at matched capacity, with S4 as the strongest such model because Al-Masud et al. found it "surprisingly competitive" against large foundation models. It receives the same hyperparameter search budget as fine-tuning: an equal number of trials over learning rate, weight decay, and dropout, using the same validation split. Pretraining has to beat it at matched capacity by a margin exceeding seed variance, at 10% labels or fewer, to count as earning its cost. On full PTB-XL, the best supervised baseline in Self-supervised representation learning from 12-lead ECG data reports a macro AUC of 0.9318, and Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL reports about 0.939 for a CNN ensemble on diagnostic statements. Our scratch runs at 100% labels should land near these values. If they do not, the pipeline is suspect.

The strongest existing method is CPC pretraining with fine-tuning. On the convolutional backbone, Mehari and Strodthoff report a PTB-XL macro AUC of 0.9418, and 0.927 with a frozen linear probe. ECG-CPC is the state space version that dominated the Al-Masud benchmark. We run the released ECG-CPC checkpoint under our identical fine-tuning protocol as an external reference. We also include our own retrained 4M state space model with CPC, which differs from the released checkpoint only in pretraining data. Any other configuration beats this baseline if it exceeds the retrained model's macro AUC at a matched label fraction across seeds, or reaches the 100%-label AUC with fewer labels. A retrained model that falls short of the released checkpoint would itself be evidence that pretraining data, not architecture, drove the original result.

Two ablations isolate the key ingredient, which is the normalization itself. The first is a hidden-width-aligned grid, with all families at the same width and depth, which reproduces conventional practice. Comparing its rankings with those from the parameter-matched grid measures how much capacity confounding distorts conclusions on this task. The second is the objective swap, in which each architecture is trained with the other objective. It directly tests whether the low-label crossover travels with the architecture or with the objective.

Why not just…?

Why not just use the largest available foundation model? Al-Masud et al. found the 3.8M ECG-CPC beating models 25 times larger, so scale alone is not a safe guide in this domain. Our budget axis tests this directly within each architecture and objective. If returns grow monotonically with parameters across all families, we will report that the simple answer is right, and that most of the released-model ranking is a size effect in the opposite direction from what the benchmark suggested.

Why not just train a supervised S4 from scratch and skip pretraining? This is a real threat, given the reported competitiveness of S4. It is answered by the per-architecture multiplier $m(a)$ at matched capacity. If the multiplier for state space models falls close to 1 while it stays large for Transformers, the conclusion is that pretraining mainly compensates for weak inductive bias. For practitioners who already use state space models, that would be a useful negative result.

Why not just reanalyze the existing benchmark, regressing performance on parameter count? Only eight released models exist. In them the objective, architecture, size, and pretraining data are almost perfectly confounded, with CPC always paired with a state space model and JEPA always with a Transformer. No regression can separate factors that never vary independently. Only retraining on a common corpus with crossed factors can.

Why not just ensemble several small pretrained models? Theoretical Limitations of Ensembles in the Age of Overparameterization proves, and confirms empirically on California Housing, that an ensemble of $M$ models with $D$ parameters each behaves like one model with $M \times D$ parameters in the overparameterized regime. This agrees with Deep Ensembles Work, But Are They Necessary?. Whether that equivalence survives pretraining at 1% labels is untested. As a secondary check, we compare five 4M models against one 20M model in the best family.

Proposed Experiments

The evaluation suite is PTB-XL, for comparability with the reported 0.9418 and 0.9318 numbers, plus the task categories of the Al-Masud benchmark. We use the adult and pediatric interpretation tasks, where pretrained models do well, and the cardiac-structure and outcome tasks, where Al-Masud et al. report that they degrade. Including the latter tests whether conclusions hold beyond in-distribution classification.

Three results are decisive. First, at the 4M budget on identical data, either the state space model with CPC still beats the CNN and Transformer with CPC, so architecture matters, or its lead shrinks to within seed variance, so the original result reflected data or objective. Second, below 1,000 labels, the winner is determined either by the objective, so JEPA wins on any backbone, or by the architecture, so the Transformer wins under either objective. Our hypothesis predicts the former. Third, the variance decomposition shows whether the architecture's share of explained variance grows or shrinks as labels become scarce. The FLOP-matched rerun must agree with the parameter-matched conclusions before any architectural claim is stated.

If compute allows, a smaller replication on AudioSet pretraining with HEAR evaluation would test whether the pattern generalizes beyond ECG. For that comparison, we found no reported low-label HEAR result on Lacuna. Its only reference figures are aggregate scores, 89.7 for SSAM-Base against 73.1 for SSAST-Base, both at full labels.