Harnessing AI to Decode the Heart

Home page Description: 
UHN researchers develop new, publicly available AI model to analyze ECGs.
Posted On: December 10, 2025
Image Caption: 
Although AI models can help analyze electrocardiograms (ECG) data, most existing tools need large amounts of labeled data. An ECG AI foundation model eliminates this need by first learning ECG structure from many unlabeled recordings, then adapting to new tasks while needing fewer labels.

A new study from UHN unveils an AI model to analyze data from electrocardiograms (ECG)—quick, low-cost recordings of the heart’s electrical activity that are commonly used as an initial test for patients with cardiac symptoms. This model has been made publicly available and may enable faster, more consistent ECG interpretation for screening, assessing risks, and predicting the need for further testing—information that isn't readily available.

AI tools can help doctors interpret ECG results. However, most AI tools need large volumes of manually labelled data to learn general patterns. A foundation model—a type of AI trained on a very large dataset to learn patterns in the data—can get around this issue through its ability to learn the basic patterns in non-labelled ECGs. After that, it only needs a few labelled examples to work on new tasks.

A research team at UHN set out to create a publicly accessible foundation model capable of interpreting ECGs and assessing its performance on clinical tasks. Using data from 1.5 million ECG tests, they developed ECG-FM, a model designed to learn ECG patterns on its own. The team then evaluated its ability to interpret common ECG findings and predict changes in heart function indicators such as reduced left ventricular ejection fraction (LVEF)—an important measure of how effectively the heart pumps blood.

When tested, ECG-FM performed better than previous models and worked well across different datasets and with little labelled data. It was accurate in interpreting common ECG findings and identifying LVEF and heart rhythm irregularities such as atrial fibrillation.

Overall, ECG-FM is versatile, efficient, and accurate for tasks like heart screening, risk assessment, and monitoring and reduces the need for large, labelled datasets, providing a reproducible framework for ECG research. To support comparability and usage, the team has released their AI code along with tutorials and a public benchmark so that others can test, adapt, and improve it. This is especially beneficial for small ECG datasets geared toward a specific task. These details can be found here.

Kaden McKeen is a Doctoral Candidate in Dr. Bo Wang’s lab and the first and corresponding author of the study.

Dr. Sameer Masood is a Clinician Investigator at UHN and an Assistant Professor in the Department of Medicine at the University of Toronto. He is the clinical lead and co-author of this study.

Dr. Bo Wang is the Chief AI Scientist and a Senior Scientist at UHN, and an Associate Professor in the Departments of Laboratory Medicine & Pathology and Computer Science at the University of Toronto. He is the senior author of the study.

This work was supported by UHN Foundation.

McKeen K, Masood S, Toma A, Rubin B, Wang B. ECG-FM: an open electrocardiogram foundation model. JAMIA Open. 2025 Oct 16;8(5):ooaf122. doi: 10.1093/jamiaopen/ooaf122.