# Electrocardiogram (ECG)

> 12-lead ECG physiological time-series overview, common clinical datasets, and SciTS PHU01 results.

---

LLMS index: [llms.txt](/Sage-SciPerception/llms.txt)

---

## Overview

A standard 12-lead electrocardiogram (ECG) records cardiac depolarization and repolarization across twelve spatial projections simultaneously, capturing P-waves, QRS complexes, ST segments, and T-waves. Clinical interpretation relies on cross-lead morphology and timing rather than isolated single-channel amplitudes.

Sage-SciPerception resamples 500 Hz 12-lead recordings to 250 Hz (central 9 s, 0.67–40 Hz bandpass, per-record normalization), encodes lead-aligned patches into 360 states of width 768 using frozen **ST-MEM**, and projects them into GLM-5.3-Flash for multi-label diagnostic classification.

## Common datasets

| Dataset | Scope and characteristics | Usage in Sage-SciPerception |
| --- | --- | --- |
| **PTB-XL (1.0.3)** | 21,837 clinical 12-lead ECG recordings from PhysioNet with five diagnostic superclasses (`CD`, `HYP`, `MI`, `NORM`, `STTC`) | Supplies raw 12-lead waveforms for `scits-phu01` |
| **SciTS PHU01** | Standardized multi-label ECG classification benchmark split | `scits-phu01` (2,090 frozen test recordings) |
| **MIMIC-IV-ECG / Chapman-Shaoxing** | Large-scale clinical 12-lead ECG repositories | Compatible with 12-lead patch encoders |

## Sage-SciPerception capabilities & results

| Dimension | Details |
| --- | --- |
| Supported task | **Multi-label 5-superclass ECG classification** (`CD`, `HYP`, `MI`, `NORM`, `STTC`) |
| Benchmark result | **SciTS PHU01 Macro-F1 = 71.53%** (`glm-5.3-flash/ecg/phu01` v0.1.0 checkpoint) |
| Input channels | `[360, 768]` ST-MEM patch states ordered by lead |

- Checkpoint specification: [SciTS PHU01 task reference](/docs/tasks/ecg-phu01/)
- Inference example: [`examples/vllm_projector.py`](https://github.com/InternLM/Sage-SciPerception/blob/main/examples/vllm_projector.py)
- Public training slice: [`samples/ecg/phu01/`](https://huggingface.co/datasets/internlm/Sage-SciPerception-Training/tree/main/samples/ecg/phu01)
