Source-linked AI summary
MS-ECG-FM: Towards a More Universal Electrocardiogram Foundation Model for Health Monitoring using Multi-source Contrastive Learning
Robert A. Lewis, I-Min Chiu, Kyle Verrier, Karthik Jayaraman Raghuram, Francoise Marvel, Salar Abbaspourazad, Anshuman Mishra, Guillermo Sapiro, Andrew C. Miller, Joseph Futoma
TL;DR
ECG foundation models have relied on interpretation reports that cover only a limited subset of diagnostic information. MS-ECG-FM aligns ECGs with multiple clinical note types, and the paper reports consistently useful representations across a wider range of tasks, including structural heart disease detection.
Problem
Reliance on machine-generated ECG interpretation reports limits ECG foundation-model supervision to a restricted set of waveform features and conditions.
Source: §1 · p. 2Method
MS-ECG-FM uses contrastive alignment between ECG waveforms and multiple clinical report types, with the paired report stochastically selected from those available for each instance.
Source: Contrastive multi-source alignment… · p. 16Results
Joint learning from multiple clinical sources yields representations useful across a wider range of downstream tasks than models trained primarily from ECG machine reports, including improved structural heart disease detection.
Source: §3 · p. 11Takeaways & Limitations
The clinical information used during pre-training shapes what ECG foundation models learn, and the paper identifies which clinical notes inform different conditions.
Source: §3 · pp. 10, 14Pre-training data come from an older, sicker population at one health system, and performance in new systems may attenuate with distribution shift.
Source: §3 · p. 13
Abstract
from arXiv · showhide
Electrocardiography (ECG) records the electrical activity of the heart, aiding diagnosis by detecting abnormalities in cardiac function. ECG foundation models have demonstrated promising results, but are limited by a reliance on ECG interpretation reports as their sole supervision. Because interpretation reports only capture the subset of waveform information routinely recognized by clinicians, this constrains representation learning to overlook the broader diagnostic signals present in ECG. We introduce a new ECG foundation model --- MS-ECG-FM --- that is trained through contrastive alignment to multiple distinct clinical note types, including ECG, echocardiography, radiology, and discharge reports. We evaluate MS-ECG-FM on an extended set of ECG detection benchmarks, showing that it comprehensively outperforms existing methods on the full span of conditions that ECG can detect, including in reduced-lead configurations. Different reports improve representations for different diagnostic domains, while multi-source alignment captures their complementary information and produces consistently strong representations across clinically diverse tasks.
1 Introduction
ECG foundation models learn from clinical reports, but reliance on ECG interpretation reports alone limits their supervision to a subset of diagnostic information. MS-ECG-FM aligns ECGs with multiple clinical note types and is reported to outperform existing models across a broader range of detection tasks.
1 Introduction
- Contemporary ECG foundation models rely exclusively on machine-generated ECG interpretation reports, which describe only a limited set of waveform features and conditions.The paper argues that contrastive learning can favor shared features that are not discriminative of downstream outcomes.Source: §1 · pp. 2–3
- ECGs have exploratory detection evidence for conditions beyond routine ECG diagnoses, including structural heart disease, kidney disease, pulmonary conditions, and sleep apnea.Examples include low ejection fraction, aortic stenosis, chronic kidney disease, and obstructive sleep apnea.Source: §1 · p. 3
- Notes from other diagnostic tests and broader clinical encounters may jointly provide ECG models with broader and more nuanced diagnostic supervision.The proposed sources include ECG, echocardiography, chest X-rays, and discharge summaries, which may be sparsely and asynchronously available.Source: §1 · p. 3
- MS-ECG-FM outperforms existing ECG foundation models across benchmark tasks and addresses prior blind spots in structural heart disease detection.Figure 2 reports universal outperformance across 98 downstream labels.Source: §1 · p. 3, Figure 2 · p. 4
- The paper also extends ECG-foundation-model evaluation with more labels, reduced-lead evaluations, performance profiles, and grouped condition tasks.Its stated goal is to provide reusable insights and artifacts for clinical research.Source: §1 · pp. 3–4
2 Results
MS-ECG-FM performs strongly across standard and reduced-lead ECG benchmarks, while different clinical report types contribute different diagnostic strengths. Multi-source alignment captures much of their combined information, yielding consistently strong representations across diverse tasks.
MS-ECG-FM universally outperforms contemporary ECG foundation models at disease detection
- 93.6 macro-averaged AUROC for MS-ECG-FM exceeded 91.5 for ECGFounder and 91.2 for MELP, while it was frequently strongest on standard benchmarks.Where it was not strongest, including PTBXL-Rhythm and some lower-label-fraction results, it was often not significantly different from the strongest model.Source: MS-ECG-FM universally outperforms… · p. 5, Table 1 · p. 6
MS-ECG-FM also supports reduced-lead ECG configurations
- With reduced leads, MS-ECG-FM significantly surpassed baselines on average and generally led diagnostic groups, except for arrhythmias and ECG-HYP detected from single lead V2.Subsets spanning anterior, inferior, and lateral heart views had only mild performance reductions versus 12 leads.Source: MS-ECG-FM also supports reduced-lead… · p. 7, Table 2 · p. 8
Alignment to multiple types of clinical report grants MS-ECG-FM universally strong performance
- MS-ECG-FM’s multi-source alignment produces a performance distribution similar to an oracle selecting the best single source for each label, capturing much of the information across five report types.The random encoder was not significantly different from the best only for RVH, HCM, and cardiac amyloidosis among the individual conditions reported.Source: Alignment to multiple types of… · pp. 9–10, Figure 3 · p. 9
- Different report types favor different tasks: ECG reports are strong for arrhythmias, conduction, ischemia/ST-T changes, and voltage criteria, while discharge summaries and chest X-rays favor structural and exploratory conditions.ECHO and chest X-ray reports also contribute to myocardial-infarction detection; the authors suggest this may reflect documentation of prior infarction.Source: Alignment to multiple types of… · pp. 9–10, Figure 3 · p. 9
- An ECG-machine-report model using MS-ECG-FM’s architecture and recipe also outperformed MERL, D-BETA, and MELP, so the gains are not attributable to multi-source alignment alone.The authors point to additional design choices, including text-model embeddings, preserved amplitude information, and a different backbone and pre-training recipe.Source: Alignment to multiple types of… · p. 10
3 Discussion
MS-ECG-FM achieves state-of-the-art detection across conditions with strong or emerging evidence of ECG detection, while clinical note sources contribute complementary supervision. The discussion also notes population, evaluation, and interpretability boundaries on the findings.
3 Discussion
- Table 3 reports linear-probe evaluations and generally shows conditions only when test sets contain at least 10 positive and 10 negative cases.Cardiac amyloidosis is shown but excluded from the MIMIC-EXP aggregate because of low prevalence.Source: §3 · pp. 10–11
- MS-ECG-FM achieves state-of-the-art detection across the full spectrum of diseases with strong or emerging evidence of ECG detection, addressing prior blind spots such as structural heart disease.Its representations are consistently useful across a wider range of downstream tasks than models trained primarily from ECG machine reports.Source: §3 · p. 11
- 38.28M parameters and 720k pre-training ECGs accompany gains over D-BETA, MELP, and ECGFounder, respectively, suggesting supervision diversity may matter alongside model and dataset size.D-BETA and MELP have 63.20M and 62.55M parameters; ECGFounder used 10.7M pre-training ECGs.Source: §3 · p. 12
- Clinical report types provide complementary supervision: ECG reports support conventional diagnoses, while discharge summaries and chest X-rays help with structural and broader disease phenotypes.Echocardiography reports provided weaker supervision in these experiments, which may partly reflect their smaller sample size.Source: §3 · pp. 10, 12, Table 3 · p. 11
- ECG machine reports remain useful pre-training supervision despite errors and cardiologist corrections, and are the second-strongest alignment source overall on the evaluated tasks.ECG-CR performed slightly better for inferior and anterior MI, while the two sources tied on ischemia/ST-T and voltage-criteria groups.Source: §3 · p. 12
- MS-ECG-FM detects echocardiographically verified structural conditions favorably against the EchoNext-Mini baseline and improves over a random encoder on broad exploratory disease endpoints.The exploratory endpoints include sleep apnea and pulmonary, metabolic, and electrolyte-imbalance codes.Source: §3 · p. 13
- Representations learned from clinically rich 12-lead ECG encounters perform well on many reduced-lead tasks, but evaluations derived from 12-lead recordings need validation on native wearable or ambulatory data.Large differences in ECG collection or diagnosis protocols may attenuate performance in new systems.Source: §3 · p. 13
- The pre-training cohort comes from one health system and skews older and sicker; some acute low-prevalence conditions are also inadequately represented in evaluation datasets.Foundation models are not inherently interpretable and therefore do not by themselves solve the adoption gap.Source: §3 · pp. 13–14
4 Methods
MS-ECG-FM is pre-trained on MIMIC-IV-ECG using a lead-aware waveform encoder and contrastive alignment to multiple clinical report types. Its evaluation extends benchmark coverage and uses diagnostic groupings, performance profiles, and paired statistical tests to compare ECG foundation models.
Pre-training with MIMIC-IV ECG and clinical report dataset
- MIMIC-IV-ECG supplies 800,035 recordings and multiple report types, linked to ECGs through report-specific matching rules.The report sources include ECG, echocardiography, chest X-ray, and discharge reports.Source: Pre-training with MIMIC-IV ECG and… · pp. 14–15
ECG waveform encoder architecture
- The encoder uses lead-specific tokens, shared tokenizer weights, and transformer layers, while preserving input amplitude for voltage-based diagnoses.A 10-second, 12-lead recording becomes 240 tokens; batch normalization follows tokenizer convolutions.Source: ECG waveform encoder architecture · p. 15
Contrastive multi-source alignment objective
- For each training instance, one available report is stochastically selected to pair with its ECG in an InfoNCE-based contrastive objective.Report availability is sparse, and the authors propose stochastic selection to encourage learning a broader feature set.Source: Contrastive multi-source alignment… · p. 16
Alignment to pre-computed text embeddings to stabilize and simplify computation
- Pre-computed MedGemma-27B report embeddings keep the text encoder fixed during ECG alignment, reducing training memory and runtime.The authors also motivate frozen embeddings as preserving encoded disease semantics and avoiding instability from jointly updating both encoders.Source: Alignment to pre-computed text… · pp. 16–17
Pre-training recipe
- Pre-training uses MIMIC-IV-ECG folds 0–17, selects checkpoints on fold 18 using RankMe, and fully holds out fold 19.Training runs for 75,000 optimization steps with random lead masking and stochastic time-shift augmentation.Source: Pre-training recipe · p. 17
4.2 Extended evaluation of ECG foundation models
- The evaluation extends standard benchmarks with datasets covering structural heart disease and broader disease categories, including out-of-distribution and in-distribution tests.Frozen-backbone linear probes use AUROC as the primary metric; dataset splits are reused and baseline evaluations are rerun for comparability.Source: §4.2 · p. 18, Downstream evaluation protocol and… · p. 18, Extended downstream datasets… · pp. 18–19
More informative evaluation of ECG foundation models using diagnostic task groupings and performance profiles
- Diagnostic groupings and AUROC performance profiles complement mean benchmark scores by exposing condition-level strengths, weaknesses, and performance distributions.The profiles treat diagnostic labels as tasks and are designed to be robust to outliers.Source: More informative evaluation of ECG… · pp. 19–20
Formally testing differences in foundation model performance
- Paired patient-level bootstrap tests compare model scores using 2,000 resamples and a 95% percentile interval.A difference is significant at α = 0.05 when the interval of paired score differences excludes zero.Source: Formally testing differences in… · p. 20
Competing interests.
The authors disclose employment and stock ownership affiliations. The appendix also summarizes contemporary ECG foundation models and their use of MIMIC-IV-ECG data.
Competing interests.
- All authors were employed by Apple or owned Apple stock during the work; J.F. is now employed by Ouraring.J.F.’s contributions and expressed views are stated to be his responsibility, not Ouraring’s official views.Source: Competing interests · p. 21
A.1 Contemporary ECG foundation model methods
- Among reviewed models using MIMIC-IV-ECG, none use its clinical notes beyond ECG machine interpretation reports during pre-training.Source: §A.1 · p. 22
- Table A1 reviews prominent ECG foundation models from 2024–2025 and marks models selected for experiments with †.The table uses ‡ for models that pooled MIMIC-IV-ECG with other pre-training datasets.Source: Table A1 · p. 22
A.2 Reported foundation model benchmark results in original literature
This appendix documents the sources and evaluation context for reported ECG foundation model results, along with benchmark corrections and reference tables for model capacity and diagnostic coverage.
A.2 Reported foundation model benchmark results in original literature
- Baseline models were rerun under the same evaluation protocol to support comparable results and paired bootstrap tests.Source: §A.2 · p. 23
- Correcting label-column lookup by name improved reported PTBXL-Sub performance for all methods on three codes.Prior files ordered AVB, RAO/RAE, and ISC differently between training and validation/test splits.Source: §A.2 · p. 23
- Table A2 compiles linear-probe results reported in the original papers at 1%, 10%, and 100% of available training labels.The appendix identifies the source papers for the listed methods.Source: Table A2 · p. 23, §A.2 · p. 23
A.3 Comparison of ECG foundation model capacity
- Table A3 counts only ECG encoder modules on the frozen-embedding forward path, excluding text encoders and unused heads.For transformer encoders, it also separates tokenizer and transformer parameter counts.Source: §A.3 · pp. 23–24, Table A3 · p. 24
Review of clinical ECG machine learning work
- Table B1 summarizes diagnostic categories and clinical outcomes, with symbols indicating strong, promising, or exploratory evidence for ECG detection or prediction.Source: Review of clinical ECG machine… · p. 25, Table B1 · p. 26
C.1 Grouping of labels into logical diagnostic groups
- Tables C1 and C2 document diagnostic-group membership and condition-code definitions used in the evaluations.Source: §C.1 · p. 27, §C.2 · p. 27
C.3 Disease coverage by dataset
The appendix documents how evaluation datasets cover conditions detectable from ECG and provides supporting references for diagnosis groups and condition codes.
C.3 Disease coverage by dataset
- Table C1 lists the diagnosis groups used for aggregated evaluation.Source: Table C1 · p. 28
- Table C2 provides a glossary of condition codes used in the evaluations.Source: Table C2 · p. 29
- Table C3 summarizes which evaluation datasets support each disease condition and marks full, absent, or partial coverage.It includes EchoNext-Mini and MIMIC-IV-ECG-Ext-ICD in the expanded evaluation suite.Source: §C.3 · p. 27, Table C3 · p. 30
D.1 Label-level results for MS-ECG-FM by reduced-lead configuration
The label-level results report linear-probe performance across single-, reduced-, and 12-lead configurations. Cardiac amyloidosis is excluded from the MIMIC-EXP aggregate score because of low prevalence.
D.1 Label-level results for MS-ECG-FM by reduced-lead configuration
- Linear-probe AUROC is reported for individual labels across single-, reduced-, and 12-lead configurations.Source: §D.1 · p. 31, Table D1 · p. 32
- Cardiac amyloidosis is excluded from the MIMIC-EXP aggregate score because of low prevalence.Source: §D.1 · p. 32
- Linear-probe AUPRC is reported for individual labels across single-, reduced-, and 12-lead configurations.Source: §D.1 · p. 31, Table D2 · p. 33
D.2 Label-level results for MS-ECG-FM by clinical report supervision source
The section reports label-level AUPRC by clinical report source and examines design ablations and comparisons with ECG-machine-report baselines. Stochastic pairing is described as marginally strongest among the tested multi-source objectives.
D.2 Label-level results for MS-ECG-FM by clinical report supervision source
- Table D3 reports label-level AUPRC for different clinical note supervision sources.Source: Table D3 · p. 34, §D.2 · p. 34
E.1 Ablation of other key components in MS-ECG-FM
- The design preserves amplitude information for voltage-criterion diagnoses and uses a deep convolutional tokenizer, lead-level tokens, shared tokenizer weights, and random lead masking.Source: §E.1 · p. 35, Table E1 · p. 35
E.2 Ablation of multi-source alignment objectives for MS-ECG-FM
- Stochastic pairing is marginally the strongest of the tested multi-source alignment objectives.Source: §E.2 · p. 35, Table E2 · p. 36
E.3 Comparison of ECG machine report (ECG-MR) performance to external baselines pre-trained with same reports
- Figure E1 compares an ECG-machine-report-only model with contemporary foundation models pretrained on the same reports for 12-lead diagnostic tasks using linear probes.Source: Figure E1 · p. 36, §E.3 · p. 36
E.4 Ablation of ECG machine report (ECG-MR) pre-training methods
For ECG-machine-report-only pretraining, the strongest representations use a frozen text encoder and RankMe checkpoint selection; online text encoders, especially zero-shot selection, degrade performance. The report inventory describes which clinical reports were joined to ECG recordings.
E.4 Ablation of ECG machine report (ECG-MR) pre-training methods
- The frozen text encoder with RankMe checkpoint selection yields the strongest representations; online text encoders, especially with zero-shot selection, degrade performance.Source: Table E3 · p. 37, §E.4 · p. 37
- Zero-shot checkpoint selection uses validation data from some out-of-distribution datasets, which the authors do not advocate because they want pretraining to be OOD-data-agnostic for less biased evaluation.Source: §E.4 · p. 37
F.1 MIMIC-IV-ECG clinical reports
- The report inventory covers clinical notes joined to 800,035 ECG recordings, including 720,102 in the training set, and marks report types excluded after preliminary validation experiments.Source: Table F1 · p. 38, §F.1 · p. 38
F.2 Single source performance of all report types
Single-source validation experiments found chest CT and CTA reports were not useful supervision and excluded them from further analysis. The methods describe waveform harmonization, a lead-level convolutional tokenizer, joint lead-time transformer processing, and report-embedding projectors.
F.2 Single source performance of all report types
- Chest CT and CTA reports did not provide good single-source supervision and were excluded; Table F2 reports preliminary validation results from an earlier model.The authors suggest low mutual information with paired ECGs or small joined training sets may explain the weak performance.Source: §F.2 · p. 39, Table F2 · p. 39
F.3 MIMIC-IV-ECG and downstream ECG waveform pre-processing
- Pretraining records retain physical units and replace missing samples with zero; downstream waveforms are remapped to canonical lead order, standardized to 10 seconds at 500 Hz, and converted to millivolts.Source: §F.3 · p. 39
G.1.1 Lead-level tokenizer
- Each lead is tokenized independently by four shared-weight convolutional blocks, producing 512-dimensional tokens summarizing 250 samples each.Source: §G.1.1 · p. 40
G.1.2 Transformer layers
- The transformer processes flattened lead-time tokens jointly, enabling cross-lead attention; global average pooling produces the final ECG representation.Source: §G.1.2 · p. 40
G.2 Contrastive multi-source alignment objective
- The ECG and text projector heads map representations into a shared 256-dimensional alignment space and are discarded after pretraining.Source: §G.2 · pp. 40–41
G.3 MedGemma-27B embedding extraction
- Report-level text embeddings are formed by mean-pooling MedGemma-27B report tokens, yielding 5,376-dimensional embeddings.Source: §G.3 · p. 41
G.4 Pre-training recipe
The pre-training recipe is summarized in Table G1, and pre-training used a single NVIDIA H200 GPU.
G.4 Pre-training recipe
- Pre-training used a single NVIDIA H200 GPU.Source: §G.4 · p. 41
- The supplied passage identifies Table G1 as the summary of the pre-training configuration.Source: §G.4 · p. 41, Table G1 · p. 41
- Table G1 summarizes pre-training settings for MS-ECG-FM and the single-source models.Source: Table G1 · p. 41
H.1 Downstream evaluation settings
The downstream evaluation settings describe linear probing, a random-encoder baseline, statistical testing, and performance-profile uncertainty and interpretation.
H.1.1 Linear probing
- Table H1 summarizes linear-probe training settings for all ECG foundation models.Source: Table H1 · p. 42, §H.1.1 · p. 42
H.1.2 Random encoder baseline
- The random encoder shares MS-ECG-FM’s encoder architecture and is included because randomly initialized ECG encoders can be competitive with pretrained models.Each feature is standardized to zero mean and unit variance with non-affine batch normalization before linear classification.Source: §H.1.2 · p. 42
H.2 More details on statistical testing
- Aggregate analyses retain labels with at least 10 positives and 10 negatives, then exclude resamples with any undefined retained-label AUROC using the same replicates across comparisons.This leaves 1999 of 2000 resamples; the loss is due to a low-prevalence CSN label.Source: §H.2 · pp. 42–43
- Table 1 averages across every dataset label, including low-prevalence labels, while paired tests average label-wise differences over labels non-degenerate in each replicate.A degenerate label drops out of both models simultaneously.Source: §H.2 · p. 43
H.3 More details on performance profiles
- Performance-profile confidence bands use the pointwise 2.5th and 97.5th percentiles across effective bootstrap replicates.The estimator is computed for each bootstrap resample.Source: §H.3 · p. 43
- The single-source oracle profile uses each label’s best score among single-source models to characterize whether MS-ECG-FM captures benefits across report types.It is not deployable because it selects the best method per label using test-set information.Source: §H.3 · p. 43