CAMEL: An ECG Language Model for Forecasting Cardiac Events
Organizations: University of Pennsylvania
Abstract
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).
Figures & tables
| Tasks | Inputs | |||||
| Model | Input Classification | Report Generation | Forecasting | Modality | # ECGs | Duration (s) |
| ECGFounder ( 2025b ) | ✓ | ✗ | ✗ | waveform | single | 10 |
| ECG-FM ( 2025 ) | ✓ | ✗ | ✗ | waveform | single | 10 |
| MERL ( 2024a ) | ✓ | ✗ | ✗ | waveform | single | 10 |
| ECG-Byte ( 2025 ) | ✓ | ✗ | ✗ | waveform | single | 10 |
| MELP ( 2025 ) | ✓ | ✓ | ✗ | waveform | single | 10 |
| Classification | ECG-QA | Stat | Report | |||||||||
| PTB-XL | Code15 | CPSC | CSN | HEEDB | Icentia | Penn | Single | Multi | CPSC | PTB-XL | MIMIC | |
| Method | F1 | Accuracy | RMSE | LLM | ||||||||
| MERL | 19.22 | 19.72 | 24.86 | 6.38 | 16.33 | 15.80 | 2.53 | - | - | - | - | - |
| MELP | 18.62 | 26.07 | 20.75 | 5.00 | 19.03 | 10.80 | 2.53 | - | - | - | - | - |
| PULSE | 28.06 | 75.90 | 57.08 | 12.62 | 18.62 | 25.15 | 34.12 | 79.07 | 64.41 | 144148 | 18.40 | 22.05 |
| GEM | 29.82 | 80.83 | 61.06 | 8.19 | 19.40 | 18.70 | 33.33 | 80.80 | 65.89 | 304 | 20.45 | 44.65 |
| Methods | PTBXL-Rhythm | PTBXL-Sub | PTBXL-Form | PTBXL-Super | CPSC2018 | CSN | ||||||||||||
| Training Ratio | 1% | 10% | 100% | 1% | 10% | 100% | 1% | 10% | 100% | 1% | 10% | 100% | 1% | 10% | 100% | 1% | 10% | 100% |
| MERL ( 2024a ) | 53.33 | 82.88 | 88.34 | 64.90 | 80.56 | 84.72 | 58.70 | 72.43 | 79.65 | 82.39 | 86.27 | 88.67 | 70.33 | 85.22 | 90.57 | 66.60 | 82.74 | 87.95 |
| MELP ( 2025 ) | 88.83 | 94.65 | 96.91 | 79.22 | 84.40 | 87.46 | 63.44 | 76.71 | 83.30 | 85.82 | 87.61 | 87.87 | 88.54 | 91.75 | 94.32 | 78.25 | 84.83 | 90.17 |
| PULSE ( 2024b ) | 98.38 | 99.07 | 99.25 | 89.21 | 92.44 | 93.88 | 82.38 | 90.19 | 91.97 | 89.88 | 92.32 | 93.08 | 67.81 | 73.90 | 82.48 | 87.25 | 89.49 | 91.87 |
| GEM ( 2025 ) | 97.55 | 98.78 | 99.12 | 89.48 | 92.57 | 93.19 | 83.32 | 88.07 | 90.77 | 87.61 | 91.88 | 93.03 | 74.58 | 82.41 | 91.38 | 87.12 | 90.33 | 91.69 |
| CAMEL (ECGInstruct) | 97.74 | 98.98 | 99.07 | 90.07 | 92.38 | 93.75 | 81.28 | 89.47 | 92.17 | 87.59 | 91.58 | 92.33 | 78.54 | 93.37 | 98.52 | 90.00 | 95.05 | 97.11 |
| Method | PTBXL-Super | PTBXL-Sub | PTBXL-Rhythm | PTBXL-Form | Code15 | CPSC-2018 | CSN |
| No LoRA + Lead-aware masking | 0.00 | 0.00 | 0.00 | 0.00 | 27.35 | 1.18 | 0.00 |
| LoRA + Full masking | 54.39 | 17.22 | 21.34 | 16.98 | 75.13 | 46.69 | 10.15 |
| LoRA + Causal masking | 69.15 | 22.13 | 21.08 | 14.72 | 77.34 | 42.30 | 10.02 |
| LoRA + Lead-aware masking | 75.91 | 26.49 | 34.27 | 19.03 | 81.54 | 51.10 | 14.30 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Supervision | Dataset Name | Source/Collection | Records | Duration | Leads |
| Signal-only | MITDB ( 2001 ) | Beth Israel | 48 | 30 m | 2 |
| NTUH ( 2021 ) | National Taiwan University Hospital | 1,000 | 10 s | 12 | |
| PTB ( 2009 ) | University Clinic Benjamin Franklin | 549 | 30–120 s | 12 | |
| QTDB ( 1997 ) | Beth Israel, Multi-center Europe | 105 | 15 m | 2 | |
| SPH ( 2022 ) | Shandong Provincial Hospital | 25,770 | 10–60 s | 12 | |
| G12 ( 2020 ) | Emory University | 10,344 | 10 s | 12 |
| Stage | Learning Rate | Epochs | Batch Size | Warmup steps |
| Stage 2 | 1e-4 | 3 | 8 | 500 |
| Stage 3 | 1e-4 | 1 | 8 | 500 |
| Stage 4 | 1e-4 | 9 | 4 | 256 |
| Stage 5 | 1e-4 | 3 | 2 | 256 |
| Hyperparameter | Value |
| Total Gradient Accumulation Target | 4 |
| Gradient Clipping | 1.0 |
| Optimizer | AdamW |
| Learning rate scheduler | linear |
| LoRA Rank | 128 |
| Mask strategy | semantic |
| Method | 10 | 30 | 60 | 120 | 300 | 600 | 10 | 30 | 60 | 120 | 300 | 600 |
| XGB | 59.55 | 55.58 | 56.89 | 56.09 | 59.64 | 55.20 | 56.85 | 56.60 | 58.18 | 57.09 | 58.07 | 56.17 |
| CNN | 46.89 | 54.62 | 53.59 | 50.79 | 52.35 | 53.10 | 49.59 | 54.72 | 57.08 | 54.40 | 52.76 | 50.21 |
| CAMEL Probe | 69.83 | 72.52 | 69.43 | 74.30 | 72.56 | 75.14 | 69.81 | 67.38 | 69.91 | 69.85 | 75.46 | 74.64 |
| GPT-5.2 | 43.26 | 47.54 | 48.00 | 48.24 | 54.36 | 51.28 | 37.67 | 46.71 | 51.22 | 54.43 | 49.29 | 52.01 |
| PULSE | 43.21 | - | - | - | - | - | 40.50 | - | - | - | - | - |
| Method | PTBXL Super | PTBXL Sub | PTBXL Rhythm | PTBXL Form | Code15 Binary | Code15 Multi |
| MERL | 41.39 | 12.36 | 10.84 | 12.31 | 3.09 | 36.35 |
| MELP | 40.45 | 10.45 | 11.43 | 12.16 | 20.50 | 31.63 |
| PULSE | 73.47 | 8.11 | 18.07 | 12.59 | 62.28 | 89.52 |
| GEM | 75.77 | 8.01 | 20.87 | 14.64 | 71.12 | 90.53 |
| CAMEL | 67.75 | 28.89 | 39.29 | 25.54 | 69.45 | 86.95 |
| Method | 10 | 30 | 60 | 120 | 300 | 600 | 900 |
| CAMEL | 46.19 | 41.32 | 40.45 | 45.10 | 58.28 | 64.95 | 64.15 |
| Method | Single Choose | Single Query | Single Verify | Multi CQ | Multi CV | Multi IQ | Multi IV |
| PULSE | 82.22 | 78.07 | 76.91 | 67.96 | 53.75 | 84.71 | 51.21 |
| GEM | 83.67 | 78.19 | 80.54 | 67.94 | 57.36 | 84.61 | 53.64 |
| CAMEL | 70.69 | 72.38 | 75.89 | 67.83 | 56.85 | 84.17 | 68.06 |
Electrocardiogram Foundation Models
Electrocardiogram foundation models learn reusable representations from large ECG datasets for diagnosis, risk prediction, and transfer across clinical settings.
See all 28 papers