News Research Glucose Monitoring & Insulin Delivery Predictive Risk Models Research and Evidence

Machine learning maps exercise-related dysglycemia thresholds in children with T1D

August 18, 2026 By Matthew Solan 7 min read
Share Share via Email Share on Facebook Share on LinkedIn Share on Twitter

Machine learning models applied to free-living glucose, exercise, insulin, and dietary data from children with type 1 diabetes (T1D) identified model-derived, phase-specific thresholds associated with hypoglycemia and hyperglycemia during physical activity, the first two hours of recovery, and overnight, according to a study published in Diabetes, Obesity and Metabolism

Investigators analyzed data collected from 2016 through 2022 within a non-interventional educational program at Lille University Hospital in Lille, France. The cohort included 36 children with a mean age of 11.9 years (range, 6 to 18 years). Twenty-one used multiple daily injections and 15 used open-loop insulin pump therapy. Analyses included 109 self-reported physical activity sessions for the exercise and early-recovery phases and 74 for the overnight phase.  

During seven free-living observation days, participants recorded physical activity timing, duration, and perceived intensity while wearing hip-mounted accelerometers. Continuous glucose monitoring (CGM) was used to assess glucose around exercise. Participants also recorded food type, quantity, and timing, with dietary records subsequently analyzed by dietitians, as well as insulin doses and administration times. The investigators classified hypoglycemia as glucose below 70 mg/dL and hyperglycemia as glucose above 180 mg/dL during exercise, the two-hour period immediately after exercise, and the subsequent night. Only periods with at least 70% valid CGM measurements were retained. 

Investigators evaluated five ensemble classifiers, including random forest, extreme gradient boosting, and repeated-measures random forest. Candidate features included physical activity characteristics, pre-exercise glucose measurements, insulin and dietary exposures, and participant characteristics. Shapley additive explanation values were used to estimate how individual features influenced model predictions and to identify values corresponding to higher or lower modeled risk. Features rated as important or very important by at least three models were used to derive consensus thresholds.

Model performance varied across outcomes and phases, with AUROC values ranging from 0.65 to 0.99 and F1 scores from 0.62 to 0.95. In the standard random forest model, AUROC values ranged from 0.78 to 0.83 for hypoglycemia and 0.81 to 0.98 for hyperglycemia. 

A cumulative bolus exceeding 11% of total daily insulin dose during the 4 hours before exercise corresponded to higher modeled hypoglycemia risk during activity. Insulin on board exceeding 8% of total daily dose at exercise onset also corresponded to higher modeled risk. During early recovery, the model identified cumulative bolus insulin exceeding 17% of total daily dose as a marker of higher hypoglycemia risk, whereas cumulative bolus insulin exceeding 10% corresponded to lower modeled hyperglycemia risk.

Pre-exercise glucose also had phase-dependent associations. A pre-exercise glucose level above 165 mg/dL was associated with protection from hypoglycemia during exercise, while a starting glucose below 165 mg/dL was associated with protection from hyperglycemia. For early recovery, pre-exercise glucose above 170 mg/dL was associated with hypoglycemia protection and below 155 mg/dL with hyperglycemia protection. Overnight, glucose of 100 to 115 mg/dL measured two hours after dinner was associated with protection from both hypoglycemia and hyperglycemia. These thresholds reflected model-derived associations rather than recommended treatment targets. 

Exercise characteristics also showed nonlinear associations. Self-reported sessions longer than 80 minutes were associated with increased hypoglycemia risk during exercise, whereas durations shorter than 55 minutes were associated with protection. During early recovery, modeled hypoglycemia risk increased progressively with 2 to 10 minutes of vigorous activity accumulated within a session, then decreased and became protective above 15 minutes. Multiple daily physical activity sessions were associated with protection from hyperglycemia during exercise and overnight. 

The dietary findings were harder to separate from insulin exposure. Higher carbohydrate intake or glycemic load before exercise or during early recovery appeared protective against hyperglycemia, but the investigators reported strong collinearity between carbohydrate intake and insulin dosing. Higher carbohydrate intake generally coincided with higher insulin doses, making it difficult for the models to clearly disentangle their respective effects. 

Several patient characteristics showed phase-specific associations rather than uniform effects. Female sex was associated with protection from early-recovery hypoglycemia, and a body mass index z score below −1.3 was associated with increased early-recovery hypoglycemia risk. Habitual physical activity exceeding 67 minutes per day was associated with protection from hyperglycemia during exercise. Age younger than 10 years, glycated hemoglobin below 8%, and daily insulin dose below 0.8 U/kg/day were associated with increased hypoglycemia risk and/or hyperglycemia protection during exercise or early recovery, but the same characteristics were also associated with hypoglycemia protection and hyperglycemic risk overnight. 

The study’s small cohort limits generalizability. In addition, session-level cross-validation allowed observations from the same participant to appear in both training and testing folds, potentially inflating performance estimates through residual within-participant correlation. Participant-level splitting yielded broadly similar model-performance estimates but greater variability because only 36 participants were available.

Additional limitations include possible effects from psychological stress, unrecorded snacks, CGM variability, and pubertal stage. Accelerometer measurements may have underestimated some forms of multidirectional activity, and habitual activity may not accurately reflect physical fitness. Insulin on board was calculated using a simplified linear-decay model. The insulin thresholds were derived from children using injections or open-loop pumps and require validation in users of hybrid closed-loop system

The investigators called for prospective validation of the model-derived associations before clinical implementation. They also said larger studies using narrower exercise-timing windows are needed to examine age-specific circadian variation in insulin sensitivity. Future models should also incorporate more sophisticated insulin pharmacodynamics, refine thresholds for hybrid closed-loop systems, and better distinguish carbohydrate effects from accompanying insulin doses. 

Researcher Elodie Lespagnol's postdoctoral position was supported by a donation from Linde Homecare France, and Angéline Melin's doctoral position was funded by Lille University. The authors stated that the funders had no role in study design, data collection, analysis, interpretation, report preparation, or publication restrictions. They declared no conflicts of interest.

Expert Insight

AACE Endocrine AI invited corresponding author Asif Iqbal, of the University of Lille in France, to elaborate on the study's findings.  

Asif Iqbal
Asif Iqbal

Why does this study matter? 

This study goes beyond controlled laboratory conditions and tackles the messy, unpredictable reality of free-living exercise in children with T1D. While previous real-world studies often relied on linear statistics and overlooked key factors like diet, we are the first, to our knowledge, to simultaneously integrate accurate dietary records, precise insulin dosing, and objective accelerometry into explainable machine learning models covering the complete exercise, recovery, and overnight cycle.  

 What data surprised you? 

Two findings genuinely surprised us. First, vigorous intensity exercise of greater than 15 minutes accumulated within a session actually protected against hypoglycemia during early recovery. This runs counter to the common clinical assumption that "harder exercise equals higher risk." We suspect this is driven by acute counter-regulatory hormone surges, like growth hormone, which can transiently inhibit muscle glucose uptake. Second, we observed a reversal of the "mass effect" during recovery. While starting exercise with higher glucose (>165 mg/dL) protected against hypoglycemia during the session, it unexpectedly promoted a glucose increase during early recovery (from >150 mg/dL). This highlights a difficult clinical trade-off: preventing an immediate low may inadvertently set the stage for post-exercise hyperglycemia. 

 Is there anything else you'd like to say about this work? 

We would emphasize the phase-specific nature of our findings. The drivers of dysglycemia differ profoundly across the exercise session, early recovery, and overnight periods, so management strategies must be similarly phase-dependent and not one-size-fits-all. We also want to be transparent about a key limitation: the collinearity between carbohydrate intake and insulin dosing. Because families naturally give more insulin when they eat more carbs, our models struggled to fully disentangle the independent effect of diet. Rather than a flaw, this reflects real-life human behavior and underscores that the insulin-carbohydrate intake interaction remains the central, complex puzzle in T1D management. Nevertheless, the strong consensus across our five different algorithmic approaches gives us confidence that the thresholds we identified are robust and clinically useful. 

 

AACE Endocrine AI is published by Conexiant under a license arrangement with the American Association of Clinical Endocrinology, Inc. (AACE®). The ideas and opinions expressed in AACE Endocrine AI do not necessarily reflect those of Conexiant or AACE. For more information, see Policies.

Related Content