Development of Insulin Bolus Calculators in Type 1 Diabetes using A Framework Based on Real-world Data, Digital Twins and Machine Learning.

Pellizzari, Elisa; Cappon, Giacomo; Nicolis, Giulia; Sparacino, Giovanni; Facchinetti, Andrea · IEEE Trans Biomed Eng · 2025

basic_science · Level V

Where this comes from

Abstract

Precise mealtime insulin bolus (MIB) dosing is essential in type 1 diabetes (T1D) to minimize glucose excursions from carbohydrate intake. Traditional MIB formulas, based on glucose concentration at mealtime, are suboptimal and do not exploit real-time data from continuous glucose monitoring (CGM). Existing methods that incorporate CGM data often rely on empirical rules or are developed in-silico, limiting their applicability to real-world conditions. This work investigates a framework combining machine learning (ML) algorithms, digital twins (DTs) and real-world data, to improve the assessment, tuning, and development of MIB dosing algorithms. We utilized ReplayBG, a DT for T1D, to: i) evaluate a published linear ML model (Noaro et al.), originally developed in-silico, on real-world data from 30 free-living subjects; ii) recalibrate this model to fit the real-world dataset; and iii) train and test nonlinear gradient-boosting models (XGBoost, LightGBM) developed entirely on real data through DT simulations. Progressing to DT-enhanced models, we observed improvements in glucose control. The recalibrated linear and nonlinear models increased time-in-range (up to 80.6% with LightGBM vs. 75.6% for Noaro et al.) and reduced time-above-range. Risk metrics reflecting hypo/hyperglycemia also improved. These findings demonstrate that a DT-based framework grounded in real-world data supports both the refinement and development of bolus calculators, achieving performance gains beyond the original in-silico model. DTs allow the use real-world data to develop, validate and extend the domain of validity of new MIB formulas, paving the way to practical applications of ML tailored solutions for T1D.