
Scientists from the Technical University refine the algorithms so that the model "explains" why it reached a certain conclusion
How to create a sufficiently accurate sensor for measuring blood sugar? How to control the insulin pump for different patients with all their unimaginable characteristics, so that the device automatically delivers the required amount at the exact moment? This is one of the most labor-intensive tasks that various teams around the world have been working on for the past 60 years.
The problem is complicated by the fact that every organism is different - the specifics in children are one thing, in older people another, and for people with several accompanying diseases, this puzzle is even more complex, and when weight is added to all this, an equation with dozens of unknowns is obtained. Therefore, scientists in different parts of the world are trying to create some averaged models of the body's behavior, which, unfortunately, are not tailored to the individual characteristics of each person.
The team at the Technical University - Sofia chose the difficult path to the scientific Everest in 2018, ambitious to prove that it is no different from the best. But also to help the over 100 thousand diabetics in our country and those who still do not know that they are carriers of the disease, to lead a quality life.
The breakthrough was achieved thanks to a project dedicated to the sustainable development of universities, funded by the Operational Program "Science and Education for Smart Growth" within the project: No.: BG-RRP-2.004-0005 "Improving the research capacity and quality for international recognition and sustainability of TU - Sofia".
"When a person injects themselves, it is very difficult to maintain the required glucose concentration of 170 milligrams per deciliter. It is difficult because many factors affect blood sugar," says Associate Professor Yordan Kralev from the TU - Sofia team to "24 Chasa". The goal is to achieve a new level that far surpasses old methods, and this is exactly the challenge.
"There are no two people who react in the same way, who have the same resistance, time dynamics," Kralev explains. "The organism is a complex biochemical system with thousands of reactions, diverse metabolic chains, psychological factors, different physical activity, nutrition, and causes that we cannot control even under laboratory conditions."
When they begin to tackle this complex task, which requires in-depth knowledge in various sciences, they find that it is actually many times more complex. The reason is that if a subcutaneous measurement is made with a sensor, there is a discrepancy between the injection and the reaction in the plasma within 15-20 minutes, sometimes even more. "However, if a person is overweight and has more fat, then the delay becomes even greater," Kralev explains.
Therefore, the first task for the team is to build a mathematical model that covers all the variations and processes that need to be controlled. "There are many developments on this topic worldwide, and most work with standard models - explains Assoc. Prof. Tsonyo Slavov. - They belong to the class of nonlinear differential equations, but they lose accuracy." Therefore, the team rejects this approach and seeks a new one. In this approach, there must be uncertainty, and it must be able to represent the inaccuracy in the model as uncertainty, in order to cover the widest possible range of patients.
They create a model, then begin experimenting to assess whether it correctly reflects reality. The more inaccurate it is, the wider the uncertainty bounds are, and here the scientists from TU - Sofia play their strongest card - a powerful toolkit of linear algorithms for synthesizing robust controllers (controllers insensitive to model inaccuracies, disturbances, and signals), with which they guarantee the quality of the system. Of course, when the inaccuracy remains within the pre-defined limits. At the same time, they incorporate into the task the widest possible range of data acquisition delay, varying from 10 to 60 minutes. The reason is that it covers the entire spectrum of patients - from the smallest to the oldest, from the weakest to the heaviest.
"Subsequently, the developed control algorithm is tested with models of different patients - with the highest possible weight, the lowest, children, adults, etc. - noted Assoc. Prof. Asparuh Markovski. - The important thing is that good control of blood sugar levels is achieved for all of them, including during eating, exercise, etc."
"For this purpose, we are also looking for the most conservative model - that of the most difficult patient to maintain," added Assoc. Prof. Tsonyo Slavov.
Now the scientists are at the stage of computer simulations, after proving with the software of the American Food and Drug Administration (FDA) that the Bulgarian controller is good enough for the entire diversity of patients. That is, the model has been tested on a computer and it has already been proven that it correctly reflects real physics and the characteristics of different types of people.
"We need to validate it in a microcontroller - in a physical device, with an insulin pump; we have already established contacts with a Swiss company that will conduct the clinical trials," noted Assoc. Prof. Tsonyo Slavov.
The device includes a sensor with a built-in miniature needle, which is attached to the arm to monitor subcutaneous blood sugar levels, and the pump is mounted in the abdominal area. A mobile application allows data to be visualized and analyzed in real time. The sensor itself must be replaced every two weeks.
This is why our scientists have taken steps so that their algorithm, although much more complex and precise than existing ones, can be embedded in the automatic control system of the pump and tested in field conditions. According to them, from this stage onwards, this will be a technical task - a matter of programming, verification, and hardware simulation.
But scientists from the Faculty of Automation at TU - Sofia are also working on other projects with similar themes. Under the guidance of specialists from University Hospital "Tsaritsa Yoanna" and the Institute of Electronics of the Bulgarian Academy of Sciences, they created a device based on fluorescence spectroscopy for rapid initial diagnosis of various types of skin cancer. In it, images are not processed, as is the case with most AI models, but fluorescent and reflectance spectrograms, which detect chemical markers under low light. In this way, the collected data provide guidance to medical professionals on whether more in-depth examinations are necessary.
"We created a system with a model - a neural network, which performs classification for a given diagnosis - explained Assoc. Prof. Asparuh Markovski. - Currently, the necessary research and tests are being conducted at the Institute of Electronics and at the University Hospital "Tsaritsa Yoanna"."
According to medical professionals, in a small number of patients, there are several types of cancer, and some of them may be missed during biopsy, whereas the device detects them.
With the advancement of this type of development, scientists from TU - Sofia are becoming part of a new wave of specialists preparing the foundation for next-generation medicine, when AI models will perform rapid screening of the population for various diseases and enable timely measures to be taken.
"The major problem with contemporary AI models is that they often act as a black box - they provide a result, but it is unclear why - explained Assoc. Prof. Vladimir Hristov. - This is unacceptable in medicine. The doctor must know exactly what influenced the decision."
Therefore, scientists are working with so-called explainable artificial intelligence - algorithms that not only classify images but also visually show which areas were key to the decision made. This allows medical professionals to verify whether the algorithm is "looking" at the actual problem, rather than random noise or artifacts. Another important focus is the optimization of neural networks. Instead of increasingly larger and heavier models, the team is developing methods for "lightening" the algorithms, so that they remain accurate but operate faster and with fewer resources - something critical for embedding into real medical devices.
Similar technologies find application in industry - for example, in automated quality control in the production of optical elements, where even the smallest defect can compromise the entire product. Instead of subjective visual inspection, systems use digital analysis and AI aligned with international standards. The team also applies similar methods in a seemingly distant field - the observation of the Sun and so-called space weather. There, the problem is again dealing with extremely noisy, incomplete, and uneven data.
"We are working on hybrid models that combine deep neural networks with hidden Markov models - explains Assoc. Prof. Hristov. - The neural network recognizes complex patterns in the data, while the Markov model describes probabilistic transitions over time." A concrete example is type III solar radio bursts - short-lived but highly intense radio emissions, which are indicators of accelerated electrons and can affect communications, navigation systems, and satellites. They are rare, highly variable, and often "buried" in noise.
Therefore, scientists create synthetic spectrograms - artificially generated data that reproduce the real physics of the processes. This allows algorithms to train more reliably and not "learn" only from a limited and uneven real archive.
"The approach is universal - Hristov emphasizes. - It is about modeling rare events in time under high uncertainty - whether we are talking about medicine, industry, or space weather."
With the advancement of these developments, scientists from the Faculty of "Automation" at TU - Sofia are establishing themselves as part of the new generation of specialists who are preparing the technological foundation for the medicine and industry of the future. There, where artificial intelligence will not replace humans, but will help them make faster, more accurate, and more reliable decisions.
24chasa.bg
How to create a sufficiently accurate sensor for measuring blood sugar? How to control the insulin pump for different patients with all their unimaginable characteristics, so that the device automatically delivers the required amount at the exact moment? This is one of the most labor-intensive tasks that various teams around the world have been working on for the past 60 years.
The problem is complicated by the fact that every organism is different - the specifics in children are one thing, in older people another, and for people with several accompanying diseases, this puzzle is even more complex, and when weight is added to all this, an equation with dozens of unknowns is obtained. Therefore, scientists in different parts of the world are trying to create some averaged models of the body's behavior, which, unfortunately, are not tailored to the individual characteristics of each person.
The team at the Technical University - Sofia chose the difficult path to the scientific Everest in 2018, ambitious to prove that it is no different from the best. But also to help the over 100 thousand diabetics in our country and those who still do not know that they are carriers of the disease, to lead a quality life.
The breakthrough was achieved thanks to a project dedicated to the sustainable development of universities, funded by the Operational Program "Science and Education for Smart Growth" within the project: No.: BG-RRP-2.004-0005 "Improving the research capacity and quality for international recognition and sustainability of TU - Sofia".
"When a person injects themselves, it is very difficult to maintain the required glucose concentration of 170 milligrams per deciliter. It is difficult because many factors affect blood sugar," says Associate Professor Yordan Kralev from the TU - Sofia team to "24 Chasa". The goal is to achieve a new level that far surpasses old methods, and this is exactly the challenge.
"There are no two people who react in the same way, who have the same resistance, time dynamics," Kralev explains. "The organism is a complex biochemical system with thousands of reactions, diverse metabolic chains, psychological factors, different physical activity, nutrition, and causes that we cannot control even under laboratory conditions."
When they begin to tackle this complex task, which requires in-depth knowledge in various sciences, they find that it is actually many times more complex. The reason is that if a subcutaneous measurement is made with a sensor, there is a discrepancy between the injection and the reaction in the plasma within 15-20 minutes, sometimes even more. "However, if a person is overweight and has more fat, then the delay becomes even greater," Kralev explains.
Therefore, the first task for the team is to build a mathematical model that covers all the variations and processes that need to be controlled. "There are many developments on this topic worldwide, and most work with standard models - explains Assoc. Prof. Tsonyo Slavov. - They belong to the class of nonlinear differential equations, but they lose accuracy." Therefore, the team rejects this approach and seeks a new one. In this approach, there must be uncertainty, and it must be able to represent the inaccuracy in the model as uncertainty, in order to cover the widest possible range of patients.
They create a model, then begin experimenting to assess whether it correctly reflects reality. The more inaccurate it is, the wider the uncertainty bounds are, and here the scientists from TU - Sofia play their strongest card - a powerful toolkit of linear algorithms for synthesizing robust controllers (controllers insensitive to model inaccuracies, disturbances, and signals), with which they guarantee the quality of the system. Of course, when the inaccuracy remains within the pre-defined limits. At the same time, they incorporate into the task the widest possible range of data acquisition delay, varying from 10 to 60 minutes. The reason is that it covers the entire spectrum of patients - from the smallest to the oldest, from the weakest to the heaviest.
"Subsequently, the developed control algorithm is tested with models of different patients - with the highest possible weight, the lowest, children, adults, etc. - noted Assoc. Prof. Asparuh Markovski. - The important thing is that good control of blood sugar levels is achieved for all of them, including during eating, exercise, etc."
"For this purpose, we are also looking for the most conservative model - that of the most difficult patient to maintain," added Assoc. Prof. Tsonyo Slavov.
Now the scientists are at the stage of computer simulations, after proving with the software of the American Food and Drug Administration (FDA) that the Bulgarian controller is good enough for the entire diversity of patients. That is, the model has been tested on a computer and it has already been proven that it correctly reflects real physics and the characteristics of different types of people.
"We need to validate it in a microcontroller - in a physical device, with an insulin pump; we have already established contacts with a Swiss company that will conduct the clinical trials," noted Assoc. Prof. Tsonyo Slavov.
The device includes a sensor with a built-in miniature needle, which is attached to the arm to monitor subcutaneous blood sugar levels, and the pump is mounted in the abdominal area. A mobile application allows data to be visualized and analyzed in real time. The sensor itself must be replaced every two weeks.
This is why our scientists have taken steps so that their algorithm, although much more complex and precise than existing ones, can be embedded in the automatic control system of the pump and tested in field conditions. According to them, from this stage onwards, this will be a technical task - a matter of programming, verification, and hardware simulation.
But scientists from the Faculty of Automation at TU - Sofia are also working on other projects with similar themes. Under the guidance of specialists from University Hospital "Tsaritsa Yoanna" and the Institute of Electronics of the Bulgarian Academy of Sciences, they created a device based on fluorescence spectroscopy for rapid initial diagnosis of various types of skin cancer. In it, images are not processed, as is the case with most AI models, but fluorescent and reflectance spectrograms, which detect chemical markers under low light. In this way, the collected data provide guidance to medical professionals on whether more in-depth examinations are necessary.
"We created a system with a model - a neural network, which performs classification for a given diagnosis - explained Assoc. Prof. Asparuh Markovski. - Currently, the necessary research and tests are being conducted at the Institute of Electronics and at the University Hospital "Tsaritsa Yoanna"."
According to medical professionals, in a small number of patients, there are several types of cancer, and some of them may be missed during biopsy, whereas the device detects them.
With the advancement of this type of development, scientists from TU - Sofia are becoming part of a new wave of specialists preparing the foundation for next-generation medicine, when AI models will perform rapid screening of the population for various diseases and enable timely measures to be taken.
"The major problem with contemporary AI models is that they often act as a black box - they provide a result, but it is unclear why - explained Assoc. Prof. Vladimir Hristov. - This is unacceptable in medicine. The doctor must know exactly what influenced the decision."
Therefore, scientists are working with so-called explainable artificial intelligence - algorithms that not only classify images but also visually show which areas were key to the decision made. This allows medical professionals to verify whether the algorithm is "looking" at the actual problem, rather than random noise or artifacts. Another important focus is the optimization of neural networks. Instead of increasingly larger and heavier models, the team is developing methods for "lightening" the algorithms, so that they remain accurate but operate faster and with fewer resources - something critical for embedding into real medical devices.
Similar technologies find application in industry - for example, in automated quality control in the production of optical elements, where even the smallest defect can compromise the entire product. Instead of subjective visual inspection, systems use digital analysis and AI aligned with international standards. The team also applies similar methods in a seemingly distant field - the observation of the Sun and so-called space weather. There, the problem is again dealing with extremely noisy, incomplete, and uneven data.
"We are working on hybrid models that combine deep neural networks with hidden Markov models - explains Assoc. Prof. Hristov. - The neural network recognizes complex patterns in the data, while the Markov model describes probabilistic transitions over time." A concrete example is type III solar radio bursts - short-lived but highly intense radio emissions, which are indicators of accelerated electrons and can affect communications, navigation systems, and satellites. They are rare, highly variable, and often "buried" in noise.
Therefore, scientists create synthetic spectrograms - artificially generated data that reproduce the real physics of the processes. This allows algorithms to train more reliably and not "learn" only from a limited and uneven real archive.
"The approach is universal - Hristov emphasizes. - It is about modeling rare events in time under high uncertainty - whether we are talking about medicine, industry, or space weather."
With the advancement of these developments, scientists from the Faculty of "Automation" at TU - Sofia are establishing themselves as part of the new generation of specialists who are preparing the technological foundation for the medicine and industry of the future. There, where artificial intelligence will not replace humans, but will help them make faster, more accurate, and more reliable decisions.
24chasa.bg



