Accurate Prediction of Type 1 Diabetes Using a Novel Hybrid GRU-Transformer Model and Enhanced CGM Features
Abstract
Accurate prediction of Blood Glucose (BG) levels is essential for effective diabetes management and the prevention of adverse glycemic events. This study introduces a novel designed hybrid Gated Recurrent Unit-Transformer (GRU-Transformer) model tailored to forecast BG levels at 15, 30, 45, and 60 min horizons using only Continuous Glucose Monitoring (CGM) data as input. The proposed approach integrates advanced CGM feature extraction step. The extracted features are statistically the mean, the median, the maximum, the entropy, the autocorrelation and the Detrended Fluctuation Analysis (DFA). In addition, in order to define more enhanced and specific features, the custom 3-points monotonicity score, the sinusoidal time encoding, and the workday/weekend binary features are proposed in this work. This approach enables the model to capture physiological dynamics and contextual temporal patterns of Type 1 Diabetes (T1D) with great accuracy. To thoroughly assess the performance of the proposed method, we relied on several well-established metrics, including Root Mean Squared Error (RMSE), Coefficient of Determination (R2), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Squared Percentage Error (RMSPE). Experimental results demonstrate that the proposed method achieves superior predictive accuracy for both short-term (15–30 min) and long-term (45–60 min) forecasting. Specifically, the model attained the lowest average RMSE values, with 4.00 mg/dL, 6.65 mg/dL, 7.96 mg/dL, and 8.91 mg/dL and yielding consistently high R2 scores for the respective prediction horizons. This new method distinguishes itself by continuously exceeding current prediction models, reinforcing its potential for real-time CGM and clinical decision support. Its high accuracy and adaptability make it a favorable tool for improving diabetes management and personalized glycemic control.
Fields of Study & Subjects
Diabetes Management and Research
Artificial Intelligence in Healthcare
Time Series Analysis and Forecasting
Publication details
- Journal / source
- Algorithms
- Publisher
- MDPI AG
- Volume
- 19
- Issue
- 1
- Pages
- 52–52
- Publication date
- 6 January 2026
- Language
- EN