Temporal Dynamics of Diabetes Prediction: A Sensor-Based Time-Series Investigation

Monica Meduri, San Jose State University
Sayma Akther, San Jose State University

Abstract

Accurate blood glucose (BG) forecasting is vital for effective diabetes management, enabling timely interventions and reducing the risks of hypo- and hyperglycemia. While traditional machine learning techniques have been widely applied, recent transformer-based models such as the Temporal Fusion Transformer (TFT) offer distinct advantages in modeling temporal dependencies and handling multi-modal inputs.In this study, we present the first application of TFT for multi-horizon BG prediction that integrates continuous glucose monitoring (CGM) data with exogenous variables such as insulin dosage and meal intake. To improve generalization and address data scarcity, we adopt a transfer learning framework by pre-training TFT on the OhioT1DM dataset and fine-tuning it on the D1NAMO dataset. We evaluate the model for 15 - and 30-minute prediction horizons and compare it against LSTM, GRU, and Deep Recurrent Neural Network (DRNN) baselines. Experimental results show that TFT achieves the lowest RMSE and MAE across both datasets, significantly outperforming baseline models. These findings demonstrate TFT's effectiveness in capturing complex temporal dynamics in BG patterns and its promise as a clinically useful tool for personalized diabetes management.