Abstract
Electrocardiogram (ECG) analysis plays a vital role in the early detection, monitoring, and management of various cardiovascular conditions. While existing models have achieved notable success in ECG interpretation, they fail to leverage the interrelated nature of various cardiac abnormalities. Conversely, developing a specific model capable of extracting all relevant features for multiple ECG tasks remains a significant challenge. Large-scale foundation models, though powerful, are not typically pretrained on ECG data, making full re-training or fine-tuning computationally expensive. To address these challenges, we propose EnECG (Mixture of Experts-based Ensemble Learning for ECG Multi-tasks), an ensemble-based framework that integrates multiple specialized foundation models, each excelling in different aspects of ECG interpretation. Instead of relying on a single model or single task, EnECG leverages the strengths of multiple specialized models to tackle a variety of ECG-based tasks. To mitigate the high computational cost of full re-training or fine-tuning, we introduce a lightweight adaptation strategy: attaching dedicated output layers to each foundation model and applying Low-Rank Adaptation (LoRA) only to these newly added parameters. We then adopt a Mixture of Experts (MoE) mechanism to learn ensemble weights, effectively combining the complementary expertise of individual models. Our experimental results demonstrate that by minimizing the scope of fine-tuning, EnECG can help reduce computational and memory costs while maintaining the strong representational power of foundation models. This framework not only enhances feature extraction and predictive performance but also ensures practical efficiency for real-world clinical applications.
Introduction
Electrocardiogram (ECG) analysis is a cornerstone of cardiac care, yet most current AI solutions are "specialists" designed for isolated tasks. This approach overlooks the inherent interrelationships between different cardiac conditions. While general-purpose time-series foundation models (FMs) offer significant potential, they are rarely optimized for ECG data, and full fine-tuning is often prohibitively expensive for clinical environments.
The authors identify a "no free lunch" problem in ECG modeling: different neural architectures naturally excel at capturing distinct signal features (e.g., the PR interval versus the QRS complex). Consequently, no single model currently captures the full complexity of the heart's electrical activity across all diagnostic tasks. EnECG addresses this by ensembling diverse foundation models using a parameter-efficient approach.
Methods
The EnECG framework is designed to be both powerful and efficient, consisting of three primary components:
- Diverse Foundation Model Ensemble: The system integrates several state-of-the-art models, including MOMENT, TEMPO, ECG-FM, TimesNet, and DLinear. Each model acts as an "expert" interpreting the ECG signal through its unique architectural lens.
- Lightweight Adaptation (LoRA): To maintain efficiency, the base foundation models are frozen. The framework attaches a dedicated Feed-Forward Network (FFN) to each and applies Low-Rank Adaptation (LoRA) only to these new parameters, significantly reducing memory overhead.
- Mixture of Experts (MoE) Gating: Rather than simple averaging, EnECG employs a gating network that dynamically assigns weights to each expert's prediction based on the specific characteristics of the input ECG signal.
Experimental Results
The framework was evaluated using the MIMIC-IV-ECG dataset, the largest public ECG repository with over 800,000 recordings. Testing spanned five diverse tasks: RR Interval Estimation, Age Estimation, Sex Classification, Potassium Abnormality Prediction, and Arrhythmia Detection.
Complementary Expertise
A core finding of the study is the complementary nature of the ensemble members. Using Integrated Gradient Saliency Maps, the researchers demonstrated that different models focus on distinct morphological features of the ECG wave. For instance, MOMENT emphasizes the PR interval, while ECG-FM focuses on the QRS complex, and TEMPO highlights the ST segment. By ensembling these models, EnECG achieves a more holistic interpretation of cardiac health.
Performance and Clinical Efficiency
EnECG consistently outperformed individual fine-tuned baselines across nearly all tasks. Notably, it achieved a 38% improvement in RR interval estimation over the next best baseline and reached a state-of-the-art accuracy of 0.76 in Arrhythmia Detection.
Beyond accuracy, EnECG meets critical clinical requirements for efficiency. By utilizing LoRA, the model maintains a GPU memory footprint under 10GB, allowing it to run on consumer-grade hardware. Furthermore, its high throughput (over 10 samples per second) ensures near-instantaneous analysis suitable for emergency room settings.
Conclusion
EnECG demonstrates that a sample-aware ensemble of foundation models can provide superior multi-task ECG analysis while remaining computationally efficient. This approach bridges the gap between powerful large-scale models and the practical constraints of clinical deployment. Future research will focus on more adaptive gating mechanisms and the development of native ECG foundation models.
Summary updated