There’s still a long road to AI-powered diabetes tech. Under both United States and United Kingdom medical device regulations, commercially available automated insulin delivery systems—without AI—fall in the highest risk class. AI-driven systems are in the early stages of development, so conversations about how they should be regulated are only just beginning.
Emerson’s experiment was entirely virtual—testing AI-assisted insulin delivery in people raises a host of safety concerns. In a life-or-death situation like insulin dosing, giving control to a machine could be dicey. “By the nature of learning, you could absolutely take a step in the wrong direction,” says 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 prior rule can create massive 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 (letting blood sugar get too high or low). Because the team couldn’t test on real patients, they used offline reinforcement learning, which draws on previously collected data, rather than learning on the fly.
Their 30 virtual patients (10 kids, 10 adolescents, and 10 adults) were synthesized by the UVA/Padova Type 1 Diabetes Simulator, a Food and Drug Administration-approved replacement for preclinical testing in animals. 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-life mistakes, they put it through a series of tests designed to mimic device faults (missing data, inaccurate readings) and human errors (miscalculating carbs, irregular mealtimes)—tests most researchers without diabetes wouldn’t think to run. “The majority of systems only consider two or three of these factors: their current blood glucose, insulin that’s been dosed previously, and carbohydrates,” says Emerson.
Offline RL successfully handled all of these challenging edge cases in the simulator, outperforming current state-of-the-art controllers. The biggest improvements appeared in situations where some data was missing or inaccurate, simulating situations like those when someone steps too far from their monitor or accidentally squashes their CGM.
In addition to cutting training time by 90 percent compared to other RL algorithms, the system kept virtual patients in their target blood glucose range an hour longer per day than commercial controllers. Next, Emerson plans to test offline RL on data previously collected from real patients. “A large percentage of people with diabetes [in the US and UK] have their data continuously recorded,” he says. “We have this great opportunity to take advantage of it.”
But translating academic research to commercial devices requires overcoming significant regulatory and corporate barriers. Breton says that while the study results show promise, they come from virtual patients—and a relatively small group of them. “That simulator, however awesome it is, represents a tiny sliver of our understanding of human metabolism,” he says. The gap between simulation studies and real-world application, Breton continues, “is not unbridgeable, but it’s large, and it’s necessary.”
The medical device development pipeline can feel maddeningly stalled, especially to those living with diabetes. Safety testing is a slow process, and even after new devices come to market, users don’t have much flexibility, thanks to a lack of code transparency, data access, or interoperability across manufacturers. There are only five compatible CGM-pump pairs on the US market, and they can be pricey, limiting access and usability for many people. “In an ideal world, there would be tons of systems,” letting people choose the pump, the CGM, and the algorithm that works for them, says Dana Lewis, founder of the open source artificial pancreas system movement (OpenAPS). “You’d be able to live your life without so much thinking about diabetes.”