# Ecg Linear Zero Shot Eval

> Evaluates the quality of self-supervised ECG image representations by measuring classification performance under linear probing and zero-shot settings across multiple clinical ECG datasets. Use when the user wants to benchmark on PTB-XL, CSN, CPSC2018, CODE-test, or asks about evaluating this task. Reports AUC (in %).

- Skill: `qhjqhj00/ecg-linear-zero-shot-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/ecg-linear-zero-shot-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/ecg-linear-zero-shot-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/ecg-linear-zero-shot-eval

---


# ecg-linear-zero-shot-eval

> Learning ECG Image Representations via Dual Physiological-Aware Alignments — Pham et al. (2026) (arXiv:2604.01526, 2026)

## What this evaluates

Evaluates the quality of self-supervised ECG image representations by measuring classification performance under linear probing and zero-shot settings across multiple clinical ECG datasets.

## Datasets

- **PTB-XL** — total ?; splits: test (-1)
- **CSN** — total ?; splits: test (-1)
- **CPSC2018** — total ?; splits: test (-1)
- **CODE-test** — total ?; splits: test (-1)

## Metrics

- `AUC (in %)` **(primary)** — range: percent
  - Area under the Receiver Operating Characteristic curve. Computed per diagnostic category and averaged across classes for multi-label classification.

## Input / output format

**Input**: 12-lead ECG images (10 seconds at 500 Hz, pre-generated from signals with varying layouts/resolutions/noise) and corresponding diagnostic labels.

**Output**: Classification predictions (multi-label probabilities) for linear probing, or similarity scores between image and text embeddings for zero-shot classification.

## Scoring recipe

```python
def compute_auc(y_true, y_pred):
    auc_scores = []
    for i in range(y_true.shape[1]):
        auc_scores.append(roc_auc_score(y_true[:, i], y_pred[:, i]))
    return np.mean(auc_scores) * 100
```

## Common pitfalls

- PTB-XL contains four independent label types (super-class, sub-class, form, rhythm) that must be evaluated separately.
- Linear probing results are highly sensitive to the specified training set sizes (1%, 10%, 100%), requiring strict data splitting.
- Zero-shot evaluation requires matching image embeddings to text embeddings of diagnostic categories, which depends on prompt construction.

## Evidence (verbatim from paper)

> performance is reported using AUC (in %) under different training sizes (1%, 10%, and 100%) on PTB-XL, CSN, and CPSC2018. we also assess zero-shot classification (using AUC in %) on PTB-XL, CSN, CPSC2018, and CODE-test

## Citation

```bibtex
@misc{pham2026ecgscan,
  title={Learning ECG Image Representations via Dual Physiological-Aware Alignments},
  author={Pham et al. (2026)},
  year={2026},
  note={arXiv:2604.01526}
}
```

- arXiv: 2604.01526

