There is still a long way to go to AI-powered diabetes technology. Under both United States And United Kingdom medical device regulations, commercially available automated insulin delivery systems – without AI – are in the highest risk class. AI-driven systems are in the early stages of development, so conversations about how to regulate them are just beginning.
Emerson’s experiment was entirely virtual — testing AI-assisted insulin delivery in humans raises numerous safety concerns. In a life-or-death situation, such as dosing insulin, relinquishing control of a machine can be unpredictable. “By the nature of learning, you could definitely take a step in the wrong direction,” said Marc Breton, a professor at the University of Virginia’s Center for Diabetes Technology, who was not involved in this project. “A small deviation from the previous rule can cause huge differences in the output. That’s the beauty of it, but it’s also dangerous.”
Emerson focused on Reinforcement Learning, or RL, a machine learning technique based on trial and error. In this case, the algorithm was “rewarded” for good behavior (meeting a blood glucose target) and “punished” for bad behavior (allowing blood sugar to get too high or too low). Because the team couldn’t test on real patients, they used offline reinforcement learning, which used previously collected data, rather than direct learning.
Their 30 virtual patients (10 children, 10 adolescents and 10 adults) were synthesized by the UVA/Padova type 1 diabetes simulator, a Food and Drug Administration-approved replacement for preclinical animal testing. After training offline on the equivalent of seven months of data, they let RL take over the virtual patients’ insulin dosing.
To see how it handled real-world errors, they put it through a series of tests designed to mimic device errors (missing data, inaccurate readings) and human errors (carbohydrate miscalculation, irregular meals) — tests that most researchers wouldn’t think to run without diabetes. “Most systems only take into account two or three of these factors: their current blood glucose, past insulin, and carbohydrates,” says Emerson.
Offline RL successfully handled all of these challenging edge cases in the simulator and outperformed today’s state-of-the-art controllers. The biggest improvements came in situations where some data was missing or inaccurate, simulating situations such as someone stepping too far from their monitor or accidentally squashing their CGM.
In addition to reducing training time by 90 percent compared to other RL algorithms, the system kept virtual patients within their blood glucose target range an hour longer per day than commercial controllers. Next, Emerson plans to test offline RL on previously collected data from Real patients. “A large percentage of people with diabetes [in the US and UK] have their data recorded continuously,” he says. “We have this great opportunity to take advantage of this.”
But translating academic research into commercial devices requires overcoming significant regulatory and business barriers. Breton says that while the research results are promising, they come from virtual patients — and a relatively small group of them. “That simulator, amazing as it is, represents a small piece of our understanding of human metabolism,” he says. The gap between simulation studies and practical application, continues Breton, “is not unbridgeable, but large and necessary.”
The medical device development pipeline can be maddeningly bogged down, especially for people with diabetes. Security testing is a slow process, and even after new devices hit the market, users don’t have much flexibility, due to a lack of code transparency, data access, or interoperability between manufacturers. There are only five compatible CGM pump pairs on the US market, and they can be pricey, limiting access and utility for many people. “In an ideal world, there would be a lot of systems,” where people can choose the pump, the CGM, and the algorithm that works for them, says Dana Lewis, founder of the open source artificial pancreatic system movement (OpenAPS). “You could live your life without thinking too much about diabetes.”