CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models
56
stars
63
commits
Python
primary language
Dec 11, 2025
updated
The electrocardiogram~(ECG) is a key diagnostic tool in cardiovascular health. Single-lead ECG recording is integrated into both clinical-grade and consumer wearables. We propose CLEF, the first foundation model for single-lead ECG, leveraging metadataβderived risk scores for each patient as guided supervisory signals. CLEF was pretrained on 161K patients from MIMIC-IV-ECG using 12-lead ECGs. We evaluated on 18 clinical classification and regression tasks across 7 held-out datasets, and benchmarked against 5 foundation model baselines and 3 self-supervised learning algorithms. Overall, out method achieves an β₯ 2.6% improvement in average AUROC for classification, and β₯ 3.2% reduction in MAE for regression, outperforming all self-supervised foundation model baselines. Beyond accuracy, CLEF advances multifacet and robust single-lead ECG analysis, enabling next-generation remote health monitoring and wearable intelligence.
CLEF is an ECG foundation model trained with clinically-guided contrastive learning. This repository contains the implementation for our paper "CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models".
Key features:
notebooks/clef_quickstart.ipynbWe gratefully acknowledge the contributions of the following projects, which were instrumental in the evaluation of CLEF:
If you use CLEF in your research, please cite:
@article{clef2024,
title={CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models},
author={Yuxuan Shu, Peter Charlton, Fahim Kawsar, Jussi Hernesniemi, Mohammad Malekzadeh},
journal={arXiv preprint arXiv:2512.02180},
year={2025}
}
Python
97.8%
Jupyter Notebook
1.2%
CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models
56
stars
63
commits
Python
primary language
Dec 11, 2025
updated
The electrocardiogram~(ECG) is a key diagnostic tool in cardiovascular health. Single-lead ECG recording is integrated into both clinical-grade and consumer wearables. We propose CLEF, the first foundation model for single-lead ECG, leveraging metadataβderived risk scores for each patient as guided supervisory signals. CLEF was pretrained on 161K patients from MIMIC-IV-ECG using 12-lead ECGs. We evaluated on 18 clinical classification and regression tasks across 7 held-out datasets, and benchmarked against 5 foundation model baselines and 3 self-supervised learning algorithms. Overall, out method achieves an β₯ 2.6% improvement in average AUROC for classification, and β₯ 3.2% reduction in MAE for regression, outperforming all self-supervised foundation model baselines. Beyond accuracy, CLEF advances multifacet and robust single-lead ECG analysis, enabling next-generation remote health monitoring and wearable intelligence.
CLEF is an ECG foundation model trained with clinically-guided contrastive learning. This repository contains the implementation for our paper "CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models".
Key features:
notebooks/clef_quickstart.ipynbWe gratefully acknowledge the contributions of the following projects, which were instrumental in the evaluation of CLEF:
If you use CLEF in your research, please cite:
@article{clef2024,
title={CLEF: Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models},
author={Yuxuan Shu, Peter Charlton, Fahim Kawsar, Jussi Hernesniemi, Mohammad Malekzadeh},
journal={arXiv preprint arXiv:2512.02180},
year={2025}
}
Python
97.8%
Jupyter Notebook
1.2%