Clear Sky Science · en

Predicting complications and mortality in myocardial infarction patients using a graph neural network model

· Back to index

Why predicting heart attack trouble early matters

Surviving a heart attack is only the beginning. In the first few days after a heart attack, patients can suddenly develop dangerous problems such as abnormal heart rhythms, fluid in the lungs, or even a tear in the heart wall. These crises often arrive with little warning, yet they are frequently preceded by small changes in blood tests, blood pressure, or medications. This study explores whether an advanced form of artificial intelligence can sift through hospital records in real time to flag which patients are heading for trouble, giving doctors a chance to step in before it is too late.

A new way to read the hospital record

Most current prediction tools for heart attack patients look at a handful of numbers recorded at admission and try to answer one blunt question: will the patient die or not? They ignore how a patient’s condition evolves over hours and days, and they treat each patient as an isolated case. The team behind this paper took a different tack. They built a model that treats each patient’s electronic health record as a rich story, combining age, medical history, lab tests, heart tracings, and treatments across the first 72 hours in the hospital. Instead of predicting just one outcome, the model aims to forecast 12 different complications, plus the risk of dying before discharge.

Figure 1
Figure 1.

Letting similar patients “talk” to each other

The heart of the approach is a method called a graph neural network, which can be thought of as a way to let similar patients “share” information. Each patient is a point in a network, and connections are drawn between patients whose records look alike. The model does not fix these connections in stone; it adapts how many neighbors each patient has depending on how common or rare their pattern is in the data. This is especially important for unusual but deadly problems, such as a rupture of the heart wall, where any extra clues from similar past patients can improve risk estimates.

Watching both quick swings and slow drifts

Beyond linking patients, the model pays close attention to how their condition changes over time. One branch focuses on short-term ups and downs in measurements such as sodium levels or vital signs over the first three days. Another branch looks at slower trends, like whether a lab value is steadily climbing or falling. A special “attention” mechanism then decides how to blend these two views into a single picture of the patient’s current trajectory. This combined portrait, along with the patient’s background information, is passed through the patient network to produce separate risk scores for each potential complication and for death.

Figure 2
Figure 2.

How well the system works

The researchers tested their model on records from 1,700 people treated for heart attack, using repeated cross-checks to avoid overfitting. On average, its ability to distinguish between patients who would and would not develop each complication was moderate, and notably better than two strong comparison methods. It was particularly accurate for predicting in-hospital death, achieving a performance level (AUC 0.88) that compares favorably with earlier studies based on more traditional machine-learning techniques. The system struggled more with rare or subtle conditions, where there are fewer examples to learn from and where the signal in the data is faint, leading to lower scores for some complications and a modest overall balance between true and false alarms.

Opening the black box for doctors

To help clinicians trust and understand the system, the authors probed which factors the model relied on most. Age emerged as a major driver of risk, as did sodium levels in the blood and patterns in certain drugs, such as blood thinners and medications that steady the heartbeat—findings that fit well with existing medical knowledge. By examining internal “attention maps,” they showed how the model highlights particular days and lab trends in high-risk patients, offering a visual explanation for its warnings. At the same time, the study acknowledges important limits: all data came from a single hospital, some complications were rare, and only structured record data—not raw heart tracings or images—were used.

What this means for patients

In plain terms, this work demonstrates that an AI system can scan the detailed hospital record of a heart attack patient, track how their condition is shifting hour by hour, and provide an early warning for a range of dangerous complications, especially death. While the tool is not perfect and needs to be tested in other hospitals and improved for rarer problems, it moves beyond one-size-fits-all scores toward personalized, outcome-specific risk alerts. If refined and safely integrated into hospital systems, such models could help care teams focus attention and preventive treatments on the patients who need them most during the critical first days after a heart attack.

Citation: Guo, D., Zhang, Z., Zhou, D. et al. Predicting complications and mortality in myocardial infarction patients using a graph neural network model. Sci Rep 16, 5886 (2026). https://doi.org/10.1038/s41598-026-36798-3

Keywords: myocardial infarction, complication prediction, graph neural network, electronic health records, mortality risk