Cardiovascular diseases are one of the main causes of death globally. According to the WHO, they account for as much as 17.9 million deaths every year, more than half of which are related to heart attacks. This pathology is caused by a disturbance in blood supply to the cardiac muscle. After a heart attack, every minute is important, which is why it is crucial to call for an ambulance at its first symptoms.
Heart attacks can be diagnosed with an ECG or electrocardiogram that can detect bloodflow-related changes to the cardiac function. An ECG can be used to detect different types of heart attacks.
However, an ECG often has to be complemented with several more tests, including those processed at a lab, to issue a final diagnosis. During emergencies, there is no time to wait for the results of additional tests, meaning that clinicians have to work with the data they have on hand.
A plethora of AI methods that provide assistance during ECG-based diagnostics are currently in development. For instance, several years ago a group of researchers from Stanford University and University of California, San Francisco presented a deep neural network that can automatically detect and classify arrhythmia. Their model was trained on 91,232 single-lead ECGs from 53,549 patients (“single-lead” denotes the placement of electrodes used to record an ECG. There are 12 common leads typically used to record an ECG – Ed.).
In 2020, researchers from South Korean Sejong Medical Research Institute came up with an algorithm that can detect a heart attack in a six-lead ECG.
A solution from ITMO
The team at ITMO’s Research Center “Strong AI in Industry” is working on their own algorithm that will assist clinicians in diagnosing heart based on ECG data.
For this project, the researchers relied on the classification of QRS complexes performed by scientists from Birla Institute of Technology & Science (India). One QRS complex registers a single heart cycle, during which the ventricles contract and the blood is pumped into the aorta. The team from ITMO has updated the model, training it on the entire ECG recording (not just data from selected leads). Now, the algorithm can detect patterns characteristic of a heart attack in an ECG, whereas before it could predict only specific properties of QRS complexes.
In order to achieve that, the researchers wrote a piece of software in PyTorch (a machine learning framework based on the Torch library) and used a Siamese neural network. Then, the algorithm was trained to detect heart attacks on data from a dataset containing equal amounts of information on ECGs of healthy patients and those with heart attacks. This data was then used to test the model, which demonstrated accurate results in 85% of cases. Moreover, the algorithm requires just one second to make its decision on an ECG sample.
Additionally, the researchers added the Grad-CAM tool to the model, which is a machine learning approach that interprets a model and visualizes the results it provides. Thanks to this addition, the new algorithm can produce an ECG graph, highlighting the sections that contain patterns characteristic of a heart attack.
According to Natalia Gusarova, the head of the project, an associate professor at the Faculty of Infocommunication Technologies, the algorithm can make a decision based on ECG data from about five heartbeats. This means that now a five-second-long recording would be enough to provide a diagnosis, compared to the 20-second-long one in the regular procedure.
Vladimir Shilonosov, one of the algorithm’s developers and a student at the Faculty of Software Engineering and Computer Systems, adds that another advantage of the new solution is that it uses FewShot, a technology that makes it possible to additionally train the model on specific data (e.g., ECGs from patients of a certain hospital) to increase its accuracy.
This also means that the model can be specifically adapted for use at a given hospital – usually, the data parameters are slightly different between the medical institutions because they rely on different ECG devices and work with varying patient groups. Thanks to this feature, the model can be used to diagnose heart attacks in selected groups, i.e., the elderly or people with cardiovascular diseases.
What’s next
As per the team’s ideas, the algorithm can be used as a support system for faster and more accurate heart attack diagnostics. The developers have already planned clinical trials at the Almazov National Medical Research Center. Importantly, the algorithm is not meant to replace healthcare professionals but rather draw their attention to specific areas of an ECG.
In the future, the group is planning to train the model to detect other cardiovascular diseases, such as stenocardia and coronary heart disease.
“Even though there are a number of big data-based AI decision support systems for ECG diagnostics, these models are not readily used in practice. That is because they are non-transparent: clinicians can’t follow their analysis step-by-step and therefore don’t trust their results. In our algorithm, we used the concept of explainable AI and tried to make its inner processes transparent. That’s why our model offers a highlighted ECG graph as a basis for its decision,” adds Vladimir Shilonosov.