Electrocardiography (ECG) is one of the most widely used and cost-effective tools for detecting cardiovascular disease. However, most existing machine learning models for ECG are trained on limited, homogeneous datasets. They generalize poorly across populations, lead configurations, recording lengths, and acquisition settings. This project addresses these limitations by developing and benchmarking ECG foundation models. These are large neural networks pretrained on diverse ECG corpora to provide general-purpose representations of cardiac signals that transfer to new and uncommon diseases. We made good progress during the previous allocation period using our NAISS resources. We: (i) conducted a PROSPERO-registered systematic review and benchmark of ECG foundation models; (ii) systematically studied the role of tokenization and scaling laws of ECG Transformer models; and (iii) produced several papers that are currently accepted, under review, or in preparation.
In coming periods, the project pursues three objectives. First, we will complete the systematic review and extend the scaling-law study in response to reviewer feedback before submitting it to the next conference. Second, in collaboration with the University of Oxford, we will pretrain new ECG foundation models on large, heterogeneous datasets and evaluate their transferability across diverse downstream tasks and cohorts. The main datasets will include recently released Harvard-Emory ECG Database [1] and the CODE-II dataset [2], which together comprise around 3 million patients and more than 13 million recordings. Third, we will investigate the image modality of the ECG (paper or printed ECGs). We will develop a paper-ECG foundation model that remains robust under realistic stress conditions: heterogeneous layouts, artifacts, label imbalance, and image degradation.
Expected outcomes include: (i) an open benchmarking codebase and a systematic review that improve transparency and reproducibility in ECG foundation model research; (ii) foundation models for both ECG signals and paper-ECG images that generalize better than current approaches; and (iii) the publication of manuscripts from the previous period that are currently under review or in preparation, alongside the initiation of at least two new papers targeting major machine learning and computer vision venues.
This project is carried out by doctoral student Jiawei Li, Uppsala University, under the main supervision of Dr. Antônio H. Ribeiro, Division of Systems and Control, Department of Information Technology, Uppsala University.
[1] Koscova, Z., et al. "The Harvard-Emory ECG Database." Scientific Data 13.1 (2026): 516.
[2] Abreu, P. E. O. G. B., et al. "CODE-II: A large-scale dataset for artificial intelligence in ECG analysis." npj Digital Medicine (2026).