ecg-fm-athletes-hubert-ecg-small
26-pathology ECG diagnosis
2 min readupdated
The model analyzes 5-second 12-lead electrocardiogram (ECG) segments to detect 26 different abnormalities and heart rhythms. It is built upon the compact base model Edoardo-BS/hubert-ecg-small, fine-tuned by the AIBAT-LMU team for cardiovascular screening research in athletes. Unlike standard pretrained bases, this checkpoint is tailored for multi-label classification (the model can detect multiple features simultaneously) following the PhysioNet/CinC 2021 challenge standards. This development will benefit biomedical AI researchers studying automated ECG interpretation and cross-population model transfer.
Key features
- Recognizes 26 diagnostic labels, including atrial fibrillation (AF), bradycardia, bundle branch blocks, and extrasystoles.
- Accepts a 5-second, 100 Hz input signal after bandpass filtering and scaling.
- Outputs 26 logits — apply the sigmoid function to the output to get probabilities for each diagnosis.
- Partial fine-tuning: the convolutional feature extractor is frozen, with only the last 8 transformer blocks and the classifier trained.
What you can do
- Reproduce experiments from the npj Digital Medicine research paper on cardiovascular risk assessment in young athletes.
- Compare the accuracy of
HuBERT-ECG (small)with two other checkpoints from the same release —ECG-FMandECGFounder. - Use the weights as a starting point for domain shift experiments (when a model trained on elderly patients is tested on healthy athletes).
Example
import torch
from huggingface_hub import hf_hub_download
from ecgath import models
checkpoint = hf_hub_download("AIBAT-LMU/ecg-fm-athletes-hubert-ecg-small", "best_model_hubertecgsmall.pth")
model = models.hubert_ecg.build_classifier(model_store="models/", size="small", num_labels=26)
model.load_state_dict(torch.load(checkpoint, map_location="cpu"))
model.eval()
Read more
DetailsMetrics: on the PhysioNet/CinC 2021 test set — AUROC 0.94, AUPRC 0.48, sensitivity 0.81, specificity 0.93; on the athlete sample (43 subjects) — AUROC 0.73.
Training: 87,662 records from the PhysioNet/CinC Challenge 2021, best checkpoint from epoch 28.
Limitations: for research use only (not a medical device); accuracy drops on young athletes due to physiological characteristics of their ECGs.
License: CC BY-NC 4.0 (non-commercial use only).










Comments