Request access to the HARVI-ECG weights
The weights are available upon reasonable request for non-commercial research. Each request is reviewed individually by the authors; access is granted only after approval, and you will be notified by e-mail.
HARVI-ECG was trained on credentialed-access clinical data (MIMIC-IV-ECG, PhysioNet) and evaluated on data used under data-use agreements. By requesting access you agree to: (1) use the weights for non-commercial research only; (2) not use them for clinical decision-making or as a medical device; (3) not attempt to re-identify individuals or to extract training data; (4) not redistribute the weights or derived weights; (5) cite the technical report in any publication. These terms are set out in the HARVI-ECG Model Weights Research Licence v1.0, publicly readable at https://github.com/CellularSyntax/harvi-ecg-eval/blob/main/LICENSE_WEIGHTS.md
Log in or Sign Up to review the conditions and access this model content.
HARVI-ECG
Heart-failure readouts from a standard 10-second 12-lead ECG.
HARVI-ECG is built on an ECG foundation encoder (FairECG; xLSTM-based, self-supervised pretraining on 6,009,279 ECGs from 3,257,195 patients) and provides two readouts:
- NT-proBNP readout: an NT-proBNP estimate (pg/mL) and probabilities for guideline rule-out (< 300 pg/mL), age-adjusted rule-in (> 450 / 900 / 1,800 pg/mL for < 50 / 50β75 / > 75 years) and severe (> 3,000 pg/mL). Uses the ECG plus age and sex. Five fold models; the prediction is their mean.
- Structural heart disease (SHD) module: probability of an echocardiographic endpoint (structural heart disease composite, LVEF β€ 45 %, LV wall thickness β₯ 13 mm). ECG only. Three seeds per endpoint; the prediction is their mean.
Research use only. Not a medical device. HARVI-ECG has not been prospectively validated and must not be used for diagnosis or treatment decisions.
Access
The weights are available upon reasonable request. The model page is public, but no files can be downloaded without approval: submit the access form above, and the authors review each request individually.
Performance
AUROC with 95 % patient-bootstrap CI (2,000 draws). Full results, methods and pre-specifications are in the technical report.
NT-proBNP readout
| Cohort | Endpoint | ECGs | AUROC |
|---|---|---|---|
| MIMIC-IV, 5-fold out-of-fold | Rule-out < 300 pg/mL | 18,036 | 0.920 (0.914β0.925) |
| Rule-in (age-adjusted) | 18,036 | 0.868 (0.862β0.874) | |
| Severe > 3,000 pg/mL | 18,036 | 0.848 (0.841β0.855) | |
| Emory (unseen hospital, zero-shot) | HFrEF vs age/sex-matched controls | 28,135 | 0.810 (0.803β0.816) |
| HFpEF vs age/sex-matched controls | 25,225 | 0.727 (0.719β0.735) | |
| EchoNext (unseen hospital, zero-shot) | Reduced EF (LVEF β€ 40 % vs β₯ 50 %)β | 4,492 | 0.834 (0.819β0.849) |
SHD module (adapted on EchoNext echo labels; held-out EchoNext test patients, n = 5,442)
| Endpoint | Cases | AUROC |
|---|---|---|
| Structural heart disease (composite) | 2,318 | 0.850 (0.840β0.860) |
| LVEF β€ 45 % | 962 | 0.918 (0.907β0.928) |
| LV wall thickness β₯ 13 mm | 1,061 | 0.785 (0.771β0.799) |
| Reduced EF (LVEF β€ 40 % vs β₯ 50 %)β , LVEF β€ 45 % model | 761 | 0.929 (0.917β0.940) |
β Post hoc endpoint. Emory labels are ICD-10 coded. EchoNext records echo findings but not symptoms, so its positives include symptomatic heart failure as well as asymptomatic structural disease. Emory and EchoNext were used neither in pretraining nor in developing the NT-proBNP readout; EchoNext training and validation patients were used to adapt the SHD module. The fixed 300 pg/mL rule-out cut-off needs recalibration at a new site; in this evaluation, the age-adjusted rule-in cut-offs transferred to Emory without it.
Usage
pip install -r requirements.txt # torch, xlstm==2.0.4, safetensors, numpy
from huggingface_hub import snapshot_download
from harvi_ecg import NTproBNPReadout, SHDModule
repo = snapshot_download("maxhaberbusch/HARVI-ECG") # requires approved access and `huggingface-cli login`
ntp = NTproBNPReadout(repo, device="cuda") # or "cpu" (slower)
out = ntp.predict(ecg, age=age_years, female=is_female) # ecg: [batch, 12, 5000] in mV at 500 Hz
out["ntprobnp_pg_ml"], out["p_rule_out"], out["p_rule_in"], out["p_severe"]
shd = SHDModule(repo, endpoint="shd", device="cuda") # "shd" | "lvef45" | "lvwt13"
p = shd.predict(ecg)
Input: 12 leads in the order I, II, III, aVR, aVL, aVF, V1βV6, 10 s. Any sampling rate can be given via
fs=; the encoder resamples to 250 Hz and normalises each lead itself. On GPU the sLSTM blocks use xlstm's
CUDA kernel (compiled on first use); on CPU its pure-PyTorch backend is used with the same weights.
Files
| File | Content |
|---|---|
encoder.safetensors, encoder_config.json |
ECG foundation encoder |
ntprobnp_fold{0-4}.safetensors, ntprobnp_readout.json |
NT-proBNP readout: LoRA adapters + head per fold, training-set normalisation |
shd_{shd,lvef45,lvwt13}_seed{0-2}.safetensors, shd_module.json |
SHD module: LoRA adapters + head per endpoint and seed |
harvi_ecg/ |
standalone inference code |
verification.json |
check that this code reproduces the original evaluation outputs |
Training data
- Encoder pretraining (no labels): CODE, MGH and MIMIC-IV-ECG waveforms.
- NT-proBNP readout: MIMIC-IV-ECG matched to measured NT-proBNP (18,036 ECGs, 11,929 patients), patient-grouped 5-fold cross-validation; epoch selection on an inner 10 % of training patients.
- SHD module: EchoNext training split (26,218 patients), patient-disjoint from the test split.
Licence and citation
Weights: HARVI-ECG Model Weights Research Licence v1.0 (full text, publicly readable): non-commercial research only, no clinical use, no redistribution; each user requests access individually. Code in harvi_ecg/: MIT.
Medical University of Vienna, Center for Medical Physics and Biomedical Engineering. HARVI-ECG: heart-failure readouts from a 10-second 12-lead ECG. Technical report v1.3, 2026. DOI: 10.5281/zenodo.23367346.