---
title: ECG R1 Russian
emoji: β€οΈ
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 5.34.2
app_file: app.py
pinned: false
---
ECG-R1: Protocol-Guided and Modality-Agnostic MLLM for Reliable ECG Interpretation
If you find this project useful, please give us a starπ.
Jiarui Jin, Haoyu Wang, Xingliang Wu, Xiaocheng Fang, Xiang Lan, Zihan Wang
Deyun Zhang, Bo Liu, Yingying Zhang, Xian Wu, Hongyan Li, Shenda Hong
## Introduction
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](https://github.com/PKUDigitalHealth/ECG-R1) and [HuggingFace](https://huggingface.co/datasets/PKUDigitalHealth/ECG-Protocol-Guided-Grounding-CoT), and an online platform can be accessed at [ECG-R1-Online-Platform](http://ai.heartvoice.com.cn/ECG-R1/).
## π₯Updates
- **[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](https://huggingface.co/PKUDigitalHealth/ECG-R1-8B-RL) and [ECG-Protocol-Guided-Grounding-CoT-30k](https://huggingface.co/datasets/PKUDigitalHealth/ECG-Protocol-Guided-Grounding-CoT) are now available.
*Stay tuned for updates!*
## Resource
#### Paper: π [Arxiv](https://arxiv.org/pdf/2602.04279)
#### Model: π€ [ECG-R1-8B](https://huggingface.co/PKUDigitalHealth/ECG-R1-8B-RL)
#### Data: π€ [ECG-Protocol-Guided-Grounding-CoT](https://huggingface.co/datasets/PKUDigitalHealth/ECG-Protocol-Guided-Grounding-CoT)
## Setup
```shell
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 support
```
## Data Preparation
Please download required data:
ECG:
- [MIMIC-IV](https://physionet.org/content/mimic-iv-ecg/1.0/)
- [PTB-XL](https://physionet.org/content/ptb-xl/1.0.3/)
- [Code-15%](https://zenodo.org/records/4916206)
- [CPSC 2018](https://physionet.org/content/challenge-2020/1.0.2/training/cpsc_2018/)
- [CSN](https://physionet.org/content/ecg-arrhythmia/1.0.0/)
- [G12E](https://physionet.org/content/challenge-2020/1.0.2/training/georgia/)
Images:
- [ECG-Grounding-Images](https://huggingface.co/datasets/LANSG/ECG-Grounding) (mimic_gen)
- [ECG-Instruct](https://huggingface.co/datasets/PULSE-ECG/ECGInstruct/tree/main)
- [ECG-Bench](https://huggingface.co/datasets/PULSE-ECG/ECGBench)
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 Model Preparation
Pretrained ECG Encoder:
- [ECG-CoCa](https://drive.google.com/drive/folders/1-0lRJy7PAMZ7bflbOszwhy3_ZwfTlGYB?usp=sharing) : download ```cpt_wfep_epoch_20.pt```, place it in ```ecg_coca/open_clip/checkpoint```
## Train