Table of Contents
Fetching ...

Glycemic-Aware and Architecture-Agnostic Training Framework for Blood Glucose Forecasting in Type 1 Diabetes

Saman Khamesian, Asiful Arefeen, Maria Adela Grando, Bithika M. Thompson, Hassan Ghasemzadeh

TL;DR

GLIMMER is introduced, a modular and architecture-agnostic training framework for glucose forecasting that combines structured preprocessing, a region-aware loss formulation, and genetic algorithm-based weight optimization to emphasize prediction accuracy in dysglycemic regions and attains comparable accuracy while using only 10K parameters.

Abstract

Managing Type 1 Diabetes (T1D) demands constant vigilance as individuals strive to regulate their blood glucose levels and avoid dysglycemia, including hyperglycemia and hypoglycemia. Despite advances in automated insulin delivery (AID) systems, achieving optimal glycemic control remains challenging. These systems integrate data from wearable devices such as insulin pumps and continuous glucose monitors (CGMs), helping reduce variability and improve time in range. However, they often fail to prevent dysglycemia due to limitations in prediction algorithms that cannot accurately anticipate glycemic excursions. This limitation highlights the need for more advanced glucose forecasting methods. To address this need, we introduce GLIMMER (Glucose Level Indicator Model with Modified Error Rate), a modular and architecture-agnostic training framework for glucose forecasting. GLIMMER combines structured preprocessing, a region-aware loss formulation, and genetic algorithm-based weight optimization to emphasize prediction accuracy in dysglycemic regions. We evaluate GLIMMER using two datasets: the publicly available OhioT1DM dataset and a newly collected AZT1D dataset consisting of data from 25 individuals with T1D. Our analyses demonstrate that GLIMMER consistently improves forecasting performance across baseline architectures, reducing RMSE and MAE by up to 24.6% and 29.6%, respectively. Additionally, GLIMMER achieves a recall of 98.4% and an F1-score of 86.8% for dysglycemia prediction, highlighting strong performance in clinically high-risk regions. Compared with state-of-the-art models containing millions of parameters-such as TimesNet (18.7M), BG-BERT (2.1M), and Gluformer (11.2M)-GLIMMER attains comparable accuracy while using only 10K parameters, demonstrating its efficiency as a lightweight and architecture-agnostic solution for glycemic forecasting.

Glycemic-Aware and Architecture-Agnostic Training Framework for Blood Glucose Forecasting in Type 1 Diabetes

TL;DR

GLIMMER is introduced, a modular and architecture-agnostic training framework for glucose forecasting that combines structured preprocessing, a region-aware loss formulation, and genetic algorithm-based weight optimization to emphasize prediction accuracy in dysglycemic regions and attains comparable accuracy while using only 10K parameters.

Abstract

Managing Type 1 Diabetes (T1D) demands constant vigilance as individuals strive to regulate their blood glucose levels and avoid dysglycemia, including hyperglycemia and hypoglycemia. Despite advances in automated insulin delivery (AID) systems, achieving optimal glycemic control remains challenging. These systems integrate data from wearable devices such as insulin pumps and continuous glucose monitors (CGMs), helping reduce variability and improve time in range. However, they often fail to prevent dysglycemia due to limitations in prediction algorithms that cannot accurately anticipate glycemic excursions. This limitation highlights the need for more advanced glucose forecasting methods. To address this need, we introduce GLIMMER (Glucose Level Indicator Model with Modified Error Rate), a modular and architecture-agnostic training framework for glucose forecasting. GLIMMER combines structured preprocessing, a region-aware loss formulation, and genetic algorithm-based weight optimization to emphasize prediction accuracy in dysglycemic regions. We evaluate GLIMMER using two datasets: the publicly available OhioT1DM dataset and a newly collected AZT1D dataset consisting of data from 25 individuals with T1D. Our analyses demonstrate that GLIMMER consistently improves forecasting performance across baseline architectures, reducing RMSE and MAE by up to 24.6% and 29.6%, respectively. Additionally, GLIMMER achieves a recall of 98.4% and an F1-score of 86.8% for dysglycemia prediction, highlighting strong performance in clinically high-risk regions. Compared with state-of-the-art models containing millions of parameters-such as TimesNet (18.7M), BG-BERT (2.1M), and Gluformer (11.2M)-GLIMMER attains comparable accuracy while using only 10K parameters, demonstrating its efficiency as a lightweight and architecture-agnostic solution for glycemic forecasting.

Paper Structure

This paper contains 25 sections, 7 equations, 4 figures, 6 tables, 1 algorithm.

Figures (4)

  • Figure 1: Blood glucose readings captured every 5 minutes. Regions are labeled as follows: (1) Hypoglycemia (below 70 mg/dL, blue), (2) Normal range, and (3) Hyperglycemia (above 180 mg/dL, red). Dashed lines indicate hypoglycemia (blue) and hyperglycemia (red) thresholds.
  • Figure 2: The proposed GLIMMER methodology for predicting blood glucose levels in patients with T1D. CGM data undergo preprocessing and feature extraction before being split for training and testing. A genetic algorithm optimizes a custom loss function used to train an architecture-agnostic prediction model (e.g., CNN-LSTM, Transformer), which is then evaluated on the test data using the finalized parameters.
  • Figure 3: Forecasting comparison between baseline models and their GLIMMER-enhanced versions for patient 552 from the OhioT1DM test dataset. The solid black line represents the real CGM values. Dashed black and gray lines mark the hyperglycemia and hypoglycemia thresholds. The black circles highlight dysglycemic events that were correctly detected by GLIMMER but missed by the respective baseline models.
  • Figure 4: Clarke Error Grid for CNN-LSTM and Transformer models, with and without GLIMMER, across both datasets. Subfigures (a)–(d) correspond to the OhioT1DM and AZT1D datasets using the CNN-LSTM baseline model and its GLIMMER-enhanced version, respectively. Subfigures (e)–(h) show the same comparison using the Transformer architecture. In each case, GLIMMER improves the clustering of predictions near the x=y line.