Electrocardiography (ECG) serves as an indispensable diagnostic tool in clinical practice, yet existing multimodal large language models (MLLMs) remain unreliable for ECG interpretation, often producing plausible but clinically incorrect analyses. To address this, we propose ECG-R1, the first reasoning MLLM designed for reliable ECG interpretation via three innovations. First, we construct the interpretation corpus using Protocol-Guided Instruction Data Generation, grounding interpretation in measurable ECG features and monograph-defined quantitative thresholds and diagnostic logic. Second, we present a modality-decoupled architecture with Interleaved Modality Dropout to improve robustness and cross-modal consistency when either the ECG signal or ECG image is missing. Third, we present Reinforcement Learning with ECG Diagnostic Evidence Rewards to strengthen evidence-grounded ECG interpretation. Additionally, we systematically evaluate the ECG interpretation capabilities of proprietary, open-source, and medical MLLMs, and provide the first quantitative evidence that severe hallucinations are widespread, suggesting that the public should not directly trust these outputs without independent verification. Code and data are publicly available at Github and HuggingFace, and an online platform can be accessed at ECG-R1-Online-Platform.
- [May 2026] ECG-R1 has been accepted to ICML 2026.
- [Feb 2026] ECG-R1 Online Platform is now available, try it in http://ai.heartvoice.com.cn/ECG-R1.
- [Feb 2026] ECG-R1-8B and ECG-Protocol-Guided-Grounding-CoT-30k are now available.
Stay tuned for updates!
Paper: π Arxiv
Model: π€ ECG-R1-8B
Data: π€ ECG-Protocol-Guided-Grounding-CoT
git clone https://github.com/PKUDigitalHealth/ECG-R1
cd ECG-R1
conda create -n ecg_r1 python=3.10 -y
conda activate ecg_r1
pip install -e .
pip install -r requirements.txt
pip install -e ./ecg_r1 # ECG-R1 vLLM supportPlease download required data:
ECG:
Images:
- ECG-Grounding-Images (mimic_gen)
- ECG-Instruct
- ECG-Bench
After downloading all of them, organize the data as follows in ./data,
βββ ecg_timeseries
βββ champan-shaoxing
βββ code15
βββ cpsc2018
βββ ptbxl
βββ georgia
βββ mimic-iv
βββ ecg_images
βββ cod15_v4
βββ csn_aug_all_layout_papersize
βββ csn_ori_layout_papersize
βββ csn_part_noise_layout_papersize
βββ gen_images
βββ mimic_gen
βββ mimic
βββ mimic_v4
βββ ptb-xl
βββ ecg_bench
βββ ptb-test.jsonl
βββ cpsc-test.jsonl
βββ code15-test.jsonl
βββ csn-test-no-cot.jsonl
βββ g12-test-no-cot.jsonl
βββ ecg_jsons
βββ train_set
β βββ ECG-Protocol-Guided-Grounding-CoT-30k.jsonl
β βββ ECG-Protocol-Guided-Grounding-CoT-RL-4k.jsonl
β βββ ECGInstruct.jsonl
βββ test_set
βββ ecg-grounding-test-mimiciv_full.jsonl
βββ ecg-grounding-test-mimiciv_ecg_missing25.jsonl
βββ ...
βββ ecg-grounding-test-mimiciv_image_missing25.jsonl
βββ ...
Pretrained ECG Encoder:
- ECG-CoCa : download
cpt_wfep_epoch_20.pt, place it inecg_coca/open_clip/checkpoint
For SFT training from scratch:
- step 1. specify paths in
scripts/shells/sft_train.sh - step 2. run
bash scripts/shells/sft_train.sh
For RL training from scratch:
- step 1. specify paths in
scripts/shells/rl_train_rollout.shandscripts/shells/rl_train_dapo.sh - step 2. make sure you have installed ecg-r1 vllm support
- step 3. run
scripts/shells/rl_train_rollout.sh - step 4. run
scripts/shells/rl_train_dapo.sh
For ECG Interpretation:
- step 1. generate interpretations:
scripts/shells/inference.sh - step 2. generate evaluation reports:
scripts/evaluation/grounded_interpretation/generate_volcengine_evaluation_result_batch.py - step 3. process evaluation reports and get scores:
scripts/evaluation/grounded_interpretation/compute_metrics.py
For Modality Missing:
- step 1. generate image-only ECG interpretation by setting
--val_datasettoecg-grounding-test-mimiciv_ecg_missing100.jsonlinscripts/shells/inference.sh - step 2. generate signal-only ECG interpretation by setting
--val_datasettoecg-grounding-test-mimiciv_image_missing100.jsonlinscripts/shells/inference.sh - step 3. compute metrics:
scripts/evaluation/modality_missing/compute_score.py
For ECGBench:
- step 1. extract images from the .parquet files provided by ECGBench for each subset:
scripts/ecgbench/extract_img.py - step 2. generate the initial results by running the inference script:
scripts/shells/ecgbench_inference.sh - step 3. convert the initial results into the .jsonl format required by the evaluation scripts:
ecgbench_convert_scripts.sh - step 4. compute metrics:
scripts/evaluation/ecgbench/compute_metrics.py
Note
-
- You need to specify the result paths in all evaluation scripts.
-
- For a quick start, you can directly set --model PKUDigitalHealth/ECG-R1-8B-RL (from HuggingFace) to run the evaluation without additional local checkpoint preparation.
-
- You may slightly adapt the evaluation generation scripts to accommodate DeepSeek APIs from different providers.
If you find ECG-R1 helpful for your research and applications, please cite our paper:
@misc{jin2026ecgr1,
title={ECG-R1: Protocol-Guided and Modality-Agnostic MLLM for Reliable ECG Interpretation},
author={Jiarui Jin and Haoyu Wang and Xingliang Wu and Xiaocheng Fang and Xiang Lan and Zihan Wang and Deyun Zhang and Bo Liu and Yingying Zhang and Xian Wu and Hongyan Li and Shenda Hong},
year={2026},
eprint={2602.04279},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2602.04279},
}We thank the authors of PULSE, ECG-Chat, GEM, and Swift for their publicly released models, datasets, and training codes.

