ECG-MoE: Mixture-of-Expert Electrocardiogram Foundation Model
Authors: Yuhao Xu, Xiaoda Wang, Yi Wu, Wei Jin, Xiao Hu, Carl Yang
Organizations: Department of Computer Science, Emory University, Atlanta, GA 30307 · School of Computer Science, University of Oklahoma, Norman, OK 73019 · Center of Data Science, Emory University, Atlanta, GA 30307
Electrocardiography (ECG) analysis is crucial for cardiac diagnosis, yet existing foundation models often fail to capture the periodicity and diverse features required for varied clinical tasks. We propose ECG-MoE, a hybrid architecture that integrates multi-model temporal features with a cardiac period-aware expert module. Our approach uses a dual-path Mixture-of-Experts to separately model beat-level morphology and rhythm, combined with a hierarchical fusion network using LoRA for efficient inference. Evaluated on five public clinical tasks, ECG-MoE achieves state-of-the-art performance with 40% faster inference than multi-task baselines.
Figures & tables
Figure 1: Existing foundation models have limitations because different models capture distinct ECG features, hindering multi-task performance within a single model. Furthermore, despite the strong periodicity inherent in ECG signals, this characteristic is often overlooked by existing ECG foundation models. To address these issues, we propose an ensemble learning method based on Period MoE. The effectiveness of our approach is validated across five common downstream tasks.
Figure 2: ECG-MoE framework: ① Multi-model feature extraction with adaptive downsampling, ② Period-aware gating weight generation via specialized MoE, ③ Multi-Task fusion using LoRA.
TimesNet
DLinear
MOMENT
TEMPO
ECG-FM
Regression (MAE ↓ )
RR
817.0±2.5
816.4±2.9
816.6±2.1
816.3±1.9
816.3±1.9
Age
62.28±0.36
62.63±0.50
62.61±0.37
62.33±0.38
62.27±0.38
Binary Class (F1 ↑ )
Sex
0.60±0.00
0.51±0.08
0.34±0.00
0.42±0.00
0.33±0.00
Ka
0.06±0.00
0.05±0.00
0.02±0.00
0.18±0.00
0.35±0.00
15 Class (ACC ↑ )
AD
0.06±0.01
0.03±0.02
0.03±0.02
0.02±0.00
0.07±0.00
Table 1: Zero-shot performance of baseline models on ECG data. Highlighted are the top first and second results. RR Interval Estimation (RR), Age Estimation (Age), Sex Classification (Sex), Potassium Abnormality Prediction (Ka), Arrhythmia Detection (AD).
TimesNet
DLinear
MOMENT
TEMPO
ECG-FM
ECG-MoE
Regression (MAE ↓ )
RR
304.3±4.3
786.0±5.4
146.9±1.3
141.5±2.1
147.3±1.3
76.37 ± 4.7
Age
24.89±0.07
28.46±0.74
13.41±0.45
13.52±0.31
13.49±0.17
12.83 ± 0.42
Binary Class (F1 ↑ )
Sex
0.51±0.05
0.57±0.01
0.69 ± 0.02
0.54±0.01
0.52±0.05
0.69 ± 0.01
Ka
0.41±0.01
0.43±0.01
0.49±0.00
0.50±0.00
0.49±0.00
0.57 ± 0.00
15 Class (ACC ↑ )
AD
0.17±0.00
0.48±0.02
0.66±0.03
0.54±0.14
0.49±0.03
0.73 ± 0.01
Table 2: Performance of fine-tuned baseline models on five ECG downstream tasks. Bold values represent the best performance.
MoE
Time MoE
Self-Attn
Cross-Attn
ECG-MoE
Regression (MAE ↓ )
RR
103.47±2.4
78.64±1.4
117.46±3.2
86.71±5.8
76.37±4.7
Age
16.49±0.87
13.04±0.14
15.47±0.85
14.71±0.51
12.83±0.42
Binary Class (F1 ↑ )
Sex
0.53±0.13
0.61±0.10
0.54±0.01
0.61±0.02
0.69±0.01
Ka
0.39±0.17
0.50±0.10
0.48±0.00
0.48±0.00
0.57±0.00
15 Class (ACC ↑ )
AD
0.62±0.01
0.74±0.00
0.67±0.00
0.69±0.01
0.73±0.00
Table 3: Comprehensive performance comparison of various MoE and attention mechanisms against the proposed ECG-MoE on ECG tasks.
Figure 3: Comparative Attention Heatmaps for Different Attention Mechanisms: An Analysis Based on the RR Interval Task in the MIMIC-IV Dataset.
Electrocardiogram foundation models learn reusable representations from large ECG datasets for diagnosis, risk prediction, and transfer across clinical settings.
Electrocardiograms (ECG) are electrical recordings of the heart that are critical for diagnosing cardiovascular conditions. ECG language models (ELMs) have recently emerged as a promising framework for ECG classification accompanied by report generation. However, current models cannot forecast future cardiac events despite the immense clinical value for planning earlier intervention. To address this gap, we propose CAMEL, the first ELM that is capable of inference over longer signal durations which enables its forecasting capability. Our key insight is a specialized ECG encoder which enables cross-understanding of ECG signals with text. We train CAMEL using established LLM training procedures, combining LoRA adaptation with a curriculum learning pipeline. Our curriculum includes ECG classification, metrics calculations, and multi-turn conversations to elicit reasoning. CAMEL demonstrates strong zero-shot performance across 6 tasks and 9 datasets, including ECGForecastBench, a new benchmark that we introduce for forecasting arrhythmias. CAMEL is on par with or surpasses ELMs and fully supervised baselines both in- and out-of-distribution, achieving SOTA results on ECGBench (+7.0% absolute average gain) as well as ECGForecastBench (+12.4% over fully supervised models and +21.1% over zero-shot ELMs).
Electrocardiograms (ECGs) are among the most widely available clinical signals and play a central role in cardiovascular diagnosis. While recent foundation models (FMs) have shown promise for learning transferable ECG representations, most existing pretraining approaches treat leads as independent channels and fail to explicitly leverage their strong structural redundancy. We introduce the latent attention masked autoencoder (LAMAE) FM that directly exploits this structure by learning cross-lead connection mechanisms during self-supervised pretraining. Our approach models higher-order interactions across leads through latent attention, enabling permutation-invariant aggregation and adaptive weighting of lead-specific representations. We provide empirical evidence on the Mimic-IV-ECG database that leveraging the cross-lead connection constitutes an effective form of structural supervision, improving representation quality and transferability. Our method shows strong performance in predicting ICD-10 codes, outperforming independent-lead masked modeling and alignment-based baselines.
Moritz Vandenhirtz, Samuel Ruipérez-Campillo, Simon Böhi +6
Department of Computer Science, ETH Zurich, Switzerland · Department of Biomedical Engineering, University of Basel, Switzerland
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.
Robert A. Lewis, I-Min Chiu, Kyle Verrier +7
Massachusetts Institute of Technology (work done while at Apple). · Apple, Inc. · Division of Cardiology, Johns Hopkins Medicine. +1