Short-Term Continuous Glucose Forecasting with Large-Language-Model-Derived Nutrient Estimates from Real-World Chinese Dietary Records
Related Experiment Videos
Leyao Ma1, Jie Hao1, Lin Yang1
1Institute of Medical Information, Chinese Academy of Medical Sciences & Peking Union Medical College, Beijing, China.
Abstract:
Background: Accurate short-term glucose forecasting is important for diabetes self-management, yet dietary information remains difficult to quantify and integrate into forecasting models in free-living settings, especially for complex Chinese meals. Methods: We investigated whether large language models (LLMs) can convert free-text Chinese dietary records into structured nutritional features for short-term continuous glucose forecasting. Five Chinese-capable LLMs were evaluated as nutrient estimators, and the resulting nutritional features were integrated with continuous glucose monitoring histories in a seasonal-patch transformer for glucose forecasting. Performance was assessed in 2 real-world cohorts (ShanghaiT1DM and ShanghaiT2DM) for both full-period and postprandial glucose forecasting. Results: LLM-derived nutrient estimates significantly outperformed semantic embeddings as dietary representations for glucose forecasting (P < 0.001). In the primary comparison setting, the best-performing LLM-based model achieved a postprandial 3-h root mean square error (RMSE) of 34.668 mg/dl, reducing the error by 1.967 mg/dl compared to non-LLM settings. In the full-period setting, the optimal LLM-based model achieved an RMSE of 27.035 mg/dl, reducing the error by 0.42 mg/dl relative to non-LLM settings. Across both forecasting tasks, direct nutrient estimation by DeepSeek-v3.1 achieved the best average RMSE. Forecasting gains were positively associated with nutrient-estimation quality, particularly for carbohydrate, dietary fiber, and fat. Architecture ablations further showed that patch-based encoding was the most influential component, with additional contributions from temporal decomposition and side branch design. Conclusion: These findings show that LLM-based nutrient estimation provides a practical and physiologically interpretable way to convert free-text dietary records into structured meal-related inputs for glucose forecasting.