Interpretable Multi-Horizon Glucose Forecasting for Assessing Nutritional Information Impact in Type 1 Diabetes Management: Model Development and Validation Study
ABSTRACT
Background:
Type 1 diabetes is characterized by absolute insulin deficiency, requiring exogenous insulin therapy to maintain blood glucose levels within safe ranges. Postprandial glucose control remains particularly challenging, and current meal-related strategies are mainly based on carbohydrate intake. However, other macronutrients, such as fats and proteins, may also influence the magnitude and timing of the glycemic response and are not usually incorporated into glucose forecasting models.
Objective:
This study aims to develop and evaluate multi-horizon blood glucose forecasting models to assess the impact of incorporating detailed nutritional information, with particular emphasis on the postprandial period, and analyze how the contribution of different nutrients varies across prediction horizons.
Methods:
We trained Temporal Fusion Transformer (TFT) models on continuous glucose monitoring, insulin, and meal data with different combinations of nutritional variables from 351 adults with type 1 diabetes (≈14 900 meals) to predict glucose values up to 4 hours ahead. Carbohydrates were used as the baseline nutritional input, and additional configurations included fats, proteins, sugars, and complex carbohydrates. Model performance was evaluated globally and in predictions initiated at meal intake. Prediction horizons were grouped into early and late intervals, corresponding to 0–2 hours and 2–4 hours, respectively. The interpretability mechanisms of the TFT were used to analyze the relative contribution of nutritional variables.
Results:
Models incorporating additional nutritional information generally outperformed the carbohydrate-only baseline. In the global analysis, the combination of carbohydrates, fats, and proteins achieved the best performance in the early prediction interval, reducing mean RMSE and MAE from 30.81 mg/dL and 20.58 mg/dL to 29.52 mg/dL and 19.72 mg/dL. At late intervals, distinguishing between complex carbohydrates and sugars, together with fats and proteins, provided the best performance, reducing mean RMSE and MAE from 46.65 mg/dL and 34.26 mg/dL to 44.61 mg/dL and 32.37 mg/dL. A similar temporal pattern was observed in the specific postprandial evaluation and was partially supported by the variable-importance analysis provided by the TFT.
Conclusions:
These findings suggest that postprandial glucose forecasting benefits from a more comprehensive representation of meal composition. The contribution of nutritional variables depends on the prediction horizon, supporting the relevance of fats, proteins, and carbohydrate subtype information for interpretable glucose prediction in type 1 diabetes. The multi-horizon blood glucose forecasting models proposed may inform the design of clinical decision-support systems for postprandial glucose management in routine care settings.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.