
Hungarian researchers are working on a mathematical model that could make artificial intelligence serving the healthcare system more accurate. The winner of the development could be the patient, who could receive better diagnoses and more effective treatment.
What is a mathematician doing in a family doctor's office if he has no complaints? Scientists from the Alfréd Rényi Mathematics Research Institute of the Hun-Ren research network, together with colleagues from the Health Management Training Center of Semmelweis University, are building a comprehensive health life-course analysis data platform. When completed, it will enable the early detection of diseases, the development of individualized treatment plans, and at the same time support the more efficient operation of the health care system. Perhaps it goes without saying today: with the help of artificial intelligence (AI).
Currently, patient data is collected in many places in Hungarian healthcare: at GPs, outpatient clinics, clinics, hospitals, ambulance services, pharmacies. Data relevant to the financier from the specialist clinics and hospital IT systems is transferred to the database of the National Health Insurance Fund (NEAK), while the results of examinations and health documentation related to the services are transferred to the Electronic Health Services Space (EESZT). “In the EESZT, you can see everything from laboratory results to the final report, but these data are not utilized enough,” says Miklós Dezső, Deputy Director of the Alfréd Rényi Mathematical Research Institute.
According to the expert, although the data is digital, it is often stored in PDF format. This is easy to read with the naked eye, but it is not exactly beneficial from the point of view of digitalized patient care, as these documents have to be reviewed one by one, and decisions about treatment can only be made after that. This is where the mathematicians of the research institute come into play.
They are building an AI-based solution that can read and analyze data contained in PDF documents. This creates the technical possibility for even previously unstructured data found in the EESZT to become part of a unified data platform.
The group's goal is to have all relevant health information available about a person - whether it's previous illnesses, interventions, lab results, final reports, medication substitutions, or drug sensitivities - appear on the doctor's screen.
The doctor can then access a comprehensive medical history with a single click in the family doctor's office, as well as in the specialist's office, or even on the ambulance doctor's tablet in the right front seat of an ambulance that is dispatched to a case.
According to Dezső Miklós, artificial intelligence can also recommend treatment methods to doctors based on known patient data, but it can also show in which areas it sees increased risk factors and whether serious health deterioration is expected in the coming months or years.
Such a system cannot be wrong, because it could cost a person their life. This is exactly what the scientists at the research institute are working on, based on mathematics.
According to the deputy director, neural networks perform very well in certain tasks, but how they work is still a mystery. What is certain is that engineers have tried to copy the connections between cells and neurons in the human brain and have created a model that resembles them. This is what they are trying to train for certain tasks with a training set. “We take a set of elements, all the details of which are already known. For example, the fact that the patient eventually died in 2024.
"We show the artificial intelligence all the data recorded up to 2023, and then ask it whether the person will die in 2024. If the answer is yes, it will receive a reward, otherwise it will receive a punishment," says Dezső Miklós, explaining the system's training methodology.
The aforementioned “reward” and “punishment” are actually adjustments to a setting that show the artificial intelligence whether it was thinking correctly or wrong. The more such adjustments are made, the more precise the AI will become. At the Alfréd Rényi Mathematical Research Institute, some scientists are looking for answers to what mathematical processes each such setting generates in this neural network, while other members of the team are working to discover how to optimize the setting and avoid the system from hallucinating, i.e. creatively inventing details that do not fit reality. “The system we developed focuses not only on minimizing hallucinations, but also on ensuring that the answers it gives are backed by easily graspable, verifiable and traceable factual data, and we can present this to the user,” explains Adrián Csiszárik, a researcher at the institute. “In mathematical terms, what happens is that artificial neural networks break their inputs into parts and then form these parts into a so-called high-dimensional space. If the input to the neural network is text, then every element of the text, if an image, then every small detail of the image, becomes a long sequence of numbers, a vector in a high-dimensional space.” -– the expert provides insight into the mathematics of artificial neural networks. – This mathematical space is home to the inner workings of neural networks, and it is in this space that the complex pattern recognition ability develops, which is very useful in practice. The user, of course, does not see this inner workings, but is surprised by how well ChatGPT responds or how skillfully the phone collects pictures of his child.” The institute previously created a system for the Historical Archives of the State Security Services that used optical character recognition technology to help digitize documents stored there. The experience gained at that time is now also useful in innovating the EESZT – the system, which has been perfected for a long time, may be useful for processing text documents found in the EESZT. AI can also recognize that doctors describe a certain condition or medication in different ways, or perhaps abbreviate it; it learns what is behind which expression when. In this way, it can create a unified data structure.
If this is achieved, then with the help of AI, the doctor will be able to tell earlier and with greater accuracy than before how much the expected risk of the aforementioned serious health deterioration has increased. According to Miklós Dezső, there will be cases where this cannot provide help – for example, in a terminal cancer patient – but in the majority of cases, AI can detect a pattern in due time that flesh-and-blood doctors have overlooked.
The work is now at a point where a general system engine has been completed – for now as a prototype; this should be imagined as a healthcare ChatGPT. The doctor asks a relevant question about the patient and receives an answer in natural language. A more visual form is also conceivable; Dezső Miklós would consider it a good idea to use a system similar to the health insurance lamp that currently indicates social security status in the EESZT, which would indicate to the doctor who is currently entering the system how the patient's risk indicators are developing, based on the always up-to-date data.
The tool can also be used to support health policy decision-making. Based on the huge data set, more accurate predictions can be made based on patterns for the expected number of patients, the care load, and resource requirements, helping to prepare for future challenges and make healthcare systems operate more efficiently.