Back to news

IMPA helps doctors calculate the risk of death in surgery.

Reproduction from Folha de S. Paulo / Reporting by Gabriel Alves
Fatigue and weakness are some of the symptoms of rheumatic fever, an inflammatory disease that can have particularly damaging effects on the heart valves. In addition to medication, treatment may include surgery, which is necessary in about a third of patients. But there's a big catch.

Generally, candidates for the surgery are seriously ill patients, sometimes with one or more previous heart surgeries. Asthma and diabetes can also be complications. How do we distinguish those who can truly benefit from the surgery from those who have a high chance of dying during the procedure?

Read also: The crisis of the foundations of mathematics
Thematic programs can receive up to R$ 200,000.
Innovative ways of communicating science.

Researchers affiliated with the Heart Institute of the Hospital das Clínicas of USP (Incor), the University of Coimbra (Portugal), and IMPA (Institute of Pure and Applied Mathematics) in Rio de Janeiro, have developed a risk calculator that answers this question.

The main conclusion of a study, based on data from nearly 3,000 patients operated on between 2010 and 2015, is that the factors that most interfere with the chance of surgical success are the size of the left atrium (one of the heart chambers), the level of creatinine (a metabolite present in the blood whose level increases when there are kidney problems), previous procedures performed on the heart valves, and the presence of pulmonary hypertension.

The scientific article was published in July of this year in the journal Plos One .

Omar Mejia, a surgeon at InCor responsible for the institution's surgical quality and safety unit and one of the study's authors, explains that rheumatic fever and rheumatic heart disease originate from infections, such as throat infections, that were not properly resolved. In fighting the bacteria, the immune system cells form complexes that deposit on the heart valves, which then suffer attacks from the body, accumulating lesions and losing function.

The disease is more prevalent in underdeveloped countries because of greater difficulty in accessing adequate antibiotic treatment. Worldwide, it is estimated that 300,000 new cases arise each year and that 200,000 people die annually from the disease.

When surgery is necessary—and the origin is rheumatic—valve repair (valve plasty) is the ideal treatment, but also the most difficult. The valves can also be replaced with biological or metallic prostheses.

By establishing an effective way to measure the risk of the operation, it is possible to make more informed decisions, such as scheduling surgery early to take advantage of favorable conditions or even not performing it, given the risk of the patient dying during the procedure. "It's important to discuss this with the patient and their family in order to clarify what could happen if they undergo the procedure," says the doctor.

The problem is that it's not so simple to know who is at greater risk.

A simpler assessment scale could assign a certain number of points to each important variable. For example, if the person is over 50, they get one point; if they are over 70, two; and over 80, three; if they are diabetic, they get two more points; if they have asthma, one more; kidney problems, two more. In the end, the total gives an idea of how serious the case is.

However, the situation cannot always be assessed with a simple addition calculation. This is because the interaction between variables can drastically change the patient's prognosis. In a hypothetical example, two conditions that would individually worsen the situation could, together, have an even more serious effect than a mere sum.

There is also the possibility of mitigating some variables. "Age is impossible to correct, but the presence of kidney problems, if not eliminated, can at least be mitigated. In emergencies, there isn't always time, but in scheduled surgeries it's possible to improve the risk," says Mejia. To do this, it's important to know which of these are truly important.

Considering that dozens of variables can influence the prognosis and that the combinations can be far more difficult than in the example above, there is a clear limitation in the human capacity to handle this amount of information.

That's where Jorge Zubelli comes in, a researcher at IMPA who coordinates a group that seeks to apply mathematical knowledge to areas ranging from health to the financial sector.

To solve this medical problem, data science and neural network tools were used. “These are relatively recent technologies that have been used in the context of artificial intelligence. Essentially, they are mathematical techniques for making a validation or prediction in a complex situation,” says Zubelli.

“There is a natural movement to incorporate these tools into medicine, as in the case of diagnostic imaging. The area can also integrate knowledge from different types of tests, such as blood and bacteriological tests, by making this cross-correlation to obtain the best of the quantitative world,” says the researcher from IMPA.

He exemplifies: “Computed tomography was only possible because there were sophisticated mathematical algorithms to generate the images. The data is complex; it's not a mere projection, as in the case of X-rays. Reconstructing the interior of an individual based solely on shadows is not an obvious thing.”

Among the various approaches to solving the problem of patients with rheumatic fever who have valve problems, two stood out: the random forest and the neural network.

One way to explain neural networks is to think of the brain, an organ formed by the connection of various neurons. In essence, parameters are given to the input neurons (entities capable of receiving, processing, and relaying information) in the model, and the information is retrieved by the output neurons.

However, a lot happens along the way. For each layer of neurons that the information passes through, it is distributed to several others, with different intensities. The weight is readjusted at each stage, generating a kind of refinement of the information. The more intermediate layers, the more calculations, and the more accurate the final result.

In the case of so-called random forests, the first step is to randomly select a handful of potentially important characteristics (such as weight and history of asthma, for example) and calculate, based on them, the probability of the person surviving or not surviving surgery. This is a decision tree.

Other trees are based on different factors, and therefore may make different decisions. What matters is that the randomness in the "shape" of the trees and their large number reduces biases.

Each tree has one vote, and the final result is chosen by the forest. From this, it's possible to learn which factors are important for predicting mortality risk.

In this case, the random forest performed best among the models used—scoring 98.2 on a scale that goes up to 100. The neural network came next, with 97.3.

The Brazilian calculator, based on this study, had better predictive power than other foreign calculators—the best of which scores 87.6 on the same scale. One explanation for the success of RheScore (the calculator's name) is the training of the algorithm with Brazilian data (specifically from the city of São Paulo), something unprecedented until then.

These calculators are based on machine learning (a field of knowledge correlated to artificial intelligence), and they identify which interactions between variables are related to each problem.

“We can’t see the algorithm from the inside, but we know it works. We can’t forget, however, that the calculated risk indices are valid exactly for that type of patient — you can’t use RheScore to assess the risk of other surgeries, such as coronary artery bypass grafting. Even though the risk factors are similar, the weightings can be very different,” says Mejia.

The doctor states that these calculators "are practical and objective tools to help specialists make better decisions." The next steps involve improving the calculator with data from other large hospitals, making it more useful and comprehensive.

Read also: IMPA's YouTube channel reaches 30,000 subscribers.
IMPA opens applications for scholarships for the 2019 Summer Course.