Next Article in Journal
Comparison of Absolute and Individualized Physical Activity Intensity Thresholds Using Non-Dominant Wrist-Worn Accelerometry in Military Office Workers
Previous Article in Journal
Nighttime Image Dehazing for Urban Monitoring via a Mixed-Norm Variational Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Comprehensive Benchmark of Machine Learning Methods for Blood Glucose Prediction in Type 1 Diabetes: A Multi-Dataset Evaluation

1
Department of Mathematics, University of Architecture, Civil Engineering and Geodesy, 1 Hristo Smirnenski Blvd., 1164 Sofia, Bulgaria
2
Department of Applied Computer Science and Mathematical Modelling, Faculty of Mathematics and Computer Science, University of Warmia and Mazury in Olsztyn, 10-719 Olsztyn, Poland
3
Department of Statistics and Econometrics, Faculty of Economics and Business Administration, Sofia University St. Kliment Ohridski, 125 Tsarigradsko Shosse Blvd., bl. 3, 1113 Sofia, Bulgaria
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2026, 16(8), 3928; https://doi.org/10.3390/app16083928
Submission received: 6 March 2026 / Revised: 3 April 2026 / Accepted: 6 April 2026 / Published: 17 April 2026

Abstract

Managing blood glucose in type 1 diabetes (T1D) remains a daily clinical challenge, and accurate short-term prediction of glucose levels can meaningfully improve insulin dosing decisions while reducing the risk of dangerous hypoglycaemic episodes. Although numerous machine learning approaches have been proposed for this task, comparing their relative merits is difficult because published studies differ widely in datasets, preprocessing choices, and evaluation criteria. In this work, we address this research gap by benchmarking ten machine learning methods—from a naïve persistence baseline through classical linear regressors, gradient-boosted ensembles, and recurrent neural networks to a novel hybrid that couples LightGBM with stochastic differential equation (SDE)-based glucose–insulin simulation—on two multi-patient datasets comprising 34 T1D subjects, across prediction horizons of 15, 30, 60, and 120 min. Every method is trained and tested under identical preprocessing and temporal splitting conditions to ensure a fair comparison. The proposed Hybrid LightGBM-SDE model consistently outperforms all alternatives, recording RMSE values of 22.42 mg/dL at 15 min, 28.74 mg/dL at 30 min, 33.89 mg/dL at 60 min, and 37.22 mg/dL at 120 min—an improvement of between 13.6% and 27.0% relative to standalone LightGBM. At the clinically important 30 min horizon, 99.7% of predictions lie within the acceptable A and B zones of the Clarke Error Grid. Wilcoxon signed-rank tests confirm that performance differences are statistically significant (p < 10−10), and SHAP-based analysis shows that the SDE-derived simulation features are among the most influential predictors, especially at longer horizons. All source code and evaluation scripts are publicly released to support reproducibility. Due to temporary data access constraints, all experiments reported here use physics-based synthetic datasets generated from the Bergman minimal model, replicating the structural properties of the D1NAMO and HUPA-UCM collections; validation on the original clinical recordings is planned. Among the two synthetic datasets, the D1NAMO-equivalent cohort (nine patients) proves more challenging, with systematically higher per-patient RMSE variance. The clinically acceptable prediction accuracy at the 30 min horizon (99.7% in Clarke zones A + B) suggests potential for integration into insulin dosing decision-support systems.

1. Introduction

Type 1 diabetes (T1D) is a chronic autoimmune disease that destroys pancreatic beta cells, leaving affected individuals dependent on exogenous insulin for the rest of their lives. Current estimates place the global prevalence at approximately 8.75 million people [1], and maintaining glycaemic control in this population requires continuous glucose monitoring (CGM) combined with carefully timed insulin injections or pump infusions. When blood glucose drops below 70 mg/dL (hypoglycaemia) or rises above 180 mg/dL (hyperglycaemia), patients face serious immediate dangers ranging from confusion and seizures to long-term vascular complications [2]. Reliable short-term prediction of future glucose values would give patients and automated dosing systems a valuable window to act before these critical thresholds are breached.
The physiological dynamics underlying blood glucose regulation in T1D are inherently multi-timescale and non-linear, which poses distinct challenges for prediction models. Rapid-acting insulin analogues have an onset of approximately 15 min, peak action at 60–90 min, and a total duration of 4–5 h; the mismatch between the speed of glucose absorption from meals (peak glucose rise within 30–60 min) and the slower insulin pharmacokinetics creates a window of vulnerability to both postprandial hyperglycaemia and late-onset hypoglycaemia. Additional confounders include physical activity (which can lower blood glucose for 1–3 h post-exercise), the dawn phenomenon (a cortisol-driven rise in fasting glucose between 3:00 and 6:00 a.m.), stress-related hormonal fluctuations, and inter-day variability in insulin sensitivity. These multi-timescale dynamics—from minutes (meal absorption) through hours (insulin action) to circadian cycles—justify the use of time-series prediction models evaluated across multiple horizons spanning 15 to 120 min.
Over the past decade, machine learning has emerged as a promising tool for glucose forecasting, with published approaches spanning simple autoregressive models, support vector regressors, tree-based ensembles, and various deep neural architectures [3,4]. Yet a persistent obstacle to progress in this field is the absence of standardised benchmarking. Individual studies typically adopt different datasets, apply disparate preprocessing pipelines, report non-overlapping sets of metrics, and conduct evaluations at inconsistent prediction horizons—making it nearly impossible to draw robust conclusions about which class of method performs best under which circumstances [5]. Many evaluations, moreover, are limited to a single small cohort, raising questions about the generalisability of the results.
A separate line of research approaches glucose prediction from a physiological modelling perspective. Compartmental models of glucose–insulin dynamics, most notably the Bergman minimal model [6], describe the interplay between glucose absorption, insulin action, and endogenous glucose production through systems of ordinary differential equations. While these mechanistic models encode valuable domain knowledge, they are difficult to calibrate on noisy real-world data and tend to miss patient-specific patterns that data-driven methods can capture. A natural question, therefore, is whether the two paradigms can be combined so that each compensates for the weaknesses of the other.
When evaluating glucose prediction models, it is essential to distinguish between statistical accuracy and clinical safety. Standard error metrics such as the root mean squared error (RMSE) and mean absolute error (MAE) quantify the average numerical distance between predictions and observations, but they treat all errors equally regardless of the glucose range in which they occur. In clinical practice, however, a 20 mg/dL prediction error in the hypoglycaemic range (below 70 mg/dL) carries far greater risk than the same magnitude of error in the euglycaemic range (70–180 mg/dL), because the former may mask a life-threatening episode. The Clarke Error Grid [7] addresses this asymmetry by classifying each prediction–reference pair into one of five zones of clinical significance: zone A (clinically accurate), zone B (benign errors unlikely to affect treatment), and zones C through E (errors of increasing severity that could provoke unnecessary corrections, failure to detect dangerous glucose levels, or outright erroneous treatment). A comprehensive evaluation therefore requires both metric types: statistical measures to characterise average-case performance and the Clarke Error Grid to assess worst-case clinical risk.
We note at the outset that, due to temporary download constraints affecting both datasets at the time of this study, all experiments reported below were conducted on physics-based synthetic data generated from the Bergman minimal model. The synthetic generation process is described in detail in Section 3.1; validation on the original clinical recordings is planned as an immediate next step.

Research Gaps and Contributions

Despite the growing body of literature on ML-based glucose prediction, several critical gaps hinder progress toward clinical translation:
  • Inconsistent evaluation protocols: Studies use different datasets, preprocessing steps, and metrics, making cross-study comparison unreliable [5].
  • Single-dataset evaluations: Most studies validate on a single patient cohort, limiting generalisability claims.
  • Absence of clinical safety metrics: Few benchmarks report Clarke Error Grid zone distributions alongside statistical error measures.
  • Limited statistical testing: Pairwise significance tests between competing methods are rarely reported, making it difficult to distinguish genuine performance differences from noise.
  • Missing hybrid comparisons: Systematic evaluations of physiologically informed hybrid models against a comprehensive set of ML baselines remain scarce.
This study addresses each of these gaps through several contributions.
The present study makes five principal contributions. First, it provides a comprehensive benchmark that systematically evaluates ten machine learning methods—including baselines, classical regressors, gradient-boosted ensembles, recurrent neural networks, and a novel hybrid approach—under strictly identical experimental conditions with consistent preprocessing, feature engineering, and evaluation protocols. Second, all methods are assessed across two independent datasets (34 patients in total) and four clinically relevant prediction horizons (15, 30, 60, and 120 min), yielding a thorough picture of how performance varies with forecasting difficulty and patient diversity. Third, we introduce a Hybrid LightGBM-SDE model that enriches the gradient boosting feature space with summary statistics drawn from Monte Carlo simulations of a stochastic glucose–insulin differential equation system, achieving RMSE reductions of 13.6–27.0% over standalone LightGBM. Fourth, all performance claims are supported by per-patient analysis, pairwise Wilcoxon signed-rank tests, Clarke Error Grid evaluation, and SHAP-based feature importance—addressing methodological shortcomings that reviewers frequently identify in the existing literature. Finally, the complete benchmark pipeline—from raw data ingestion through model training to figure generation—is released as open-source software to encourage reproducibility.
The remainder of this paper is organised as follows. Section 2 surveys related work on data-driven and physiologically informed glucose prediction. Section 3 describes the datasets, the preprocessing pipeline, the feature engineering strategy, each of the ten prediction methods, and the evaluation protocol. Section 4 reports the experimental results, and Section 5 discusses the findings, their clinical relevance, and the limitations of the study. Concluding remarks and directions for future research are given in Section 6.

2. Related Work

2.1. Machine Learning for Blood Glucose Prediction

The earliest data-driven approaches to glucose prediction relied on autoregressive time-series models—AR, ARIMA, and their seasonal variants—that exploit the strong temporal autocorrelation present in CGM signals [8]. As richer feature sets became available, including lagged glucose readings, insulin dosing logs, and carbohydrate intake records, researchers turned to support vector regression and Random Forest, which are better suited to multi-variate inputs [9].
More recently, gradient boosting frameworks such as XGBoost [10] and LightGBM [11] have attracted considerable attention for tabular prediction tasks. These methods handle heterogeneous feature types naturally, capture complex non-linear interactions between predictors, and train efficiently on moderately sized datasets—qualities that make them well suited to the structured, mixed-type feature matrices typical of CGM-based prediction.
Deep learning has also been applied extensively to this problem. Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) networks can, in principle, learn sequential dependencies directly from raw or lightly processed CGM time series [12,13]. In practice, however, their advantage over simpler models depends heavily on the amount of training data available, and several comparative studies have reported that tree-based ensembles remain competitive when features are carefully engineered [14].

2.2. Physiologically Informed Models

Compartmental models of glucose–insulin dynamics have a long history in diabetes research. The Bergman minimal model [6] describes glucose disappearance, remote insulin action, and insulin kinetics through a small system of ordinary differential equations, while the UVA/Padova simulator [15] offers a more detailed, FDA-accepted representation that has become a standard tool for in silico trials of artificial pancreas algorithms. Stochastic extensions of these models, formulated as systems of SDEs, introduce Brownian-motion-driven noise terms that account for measurement error, unmodelled physiological variability, and day-to-day fluctuations in insulin sensitivity [16]. Running Monte Carlo simulations of such SDE systems yields not only point forecasts but also distributional information—an appealing property for clinical decision support, where quantifying uncertainty is as important as producing accurate mean predictions.

2.3. Hybrid Approaches and Existing Benchmarks

Several groups have explored combining mechanistic and data-driven components. Zhu et al. [17], for instance, used physiological model outputs as auxiliary inputs to a deep learning predictor. Nonetheless, systematic head-to-head comparisons of hybrid architectures against a broad suite of ML baselines, carried out under controlled conditions and with proper statistical testing, remain rare. Regarding benchmarking side, Xie and Wang [5] compared deep learning methods on the OhioT1DM dataset, and Martinsson et al. [14] evaluated several LSTM variants, but both studies were restricted to a narrow range of methods or a single cohort. The present work aims to bridge this gap by offering a wider comparison—including ten methods, two datasets, four horizons, and rigorous pairwise statistical tests.

3. Materials and Methods

3.1. Datasets

Important note: Due to temporary download constraints at the time of this study (the D1NAMO archive exceeds 10 GB and the HUPA-UCM server returned HTTP 403), all experiments reported in this paper were conducted on physics-based synthetic datasets generated from the Bergman minimal model [6]. The synthetic datasets replicate the structural and statistical properties of the original clinical collections. We plan to re-run the full benchmark on the real datasets when download access is restored.
The benchmark targets two well-known CGM datasets whose characteristics are summarised in Table 1. The D1NAMO dataset [18] is an openly available, multi-modal collection hosted on Zenodo (https://zenodo.org/records/1421616) under the Creative Commons Attribution 4.0 International licence (CC BY 4.0; accessed on 1 March 2026). It contains continuous glucose readings, insulin doses, and carbohydrate intake logs from nine T1D patients monitored over approximately 21 days each. The HUPA-UCM dataset [19], published on Mendeley Data (https://data.mendeley.com/datasets/3hbcscwz44/1) under the CC BY-NC-ND 4.0 licence (accessed on 1 March 2026) provides analogous modalities for a larger cohort of 25 T1D patients observed over roughly 14 days per subject. Together, the two datasets contribute 34 patients and more than 51,000 CGM records after resampling.

Synthetic Data Generation

Separate synthetic datasets were generated for D1NAMO and HUPA-UCM, preserving the per-dataset characteristics listed in Table 1 (number of patients, recording duration, sampling frequency, and data modalities). The generation process employs the Bergman minimal model [6] with stochastic noise, implemented as a minute-by-minute Euler–Maruyama simulation that is subsequently downsampled to 15 min CGM intervals.
Four patient archetypes capture the clinical diversity observed in T1D populations. The well-controlled archetype (basal glucose Gb = 110 mg/dL, noise σ = 3 mg/dL/√min) represents patients with tight glycaemic control; the moderate archetype (Gb = 130, σ = 5) and poorly controlled archetype (Gb = 160, σ = 7) model progressively worse regulation; and the variable archetype (Gb = 140, σ = 8) introduces high day-to-day variability. Patients are assigned to archetypes in round-robin fashion. For each patient, Bergman model parameters (p1, p2, p3, n, γ, h, Gb, and Ib) are individually randomised around the archetype means by adding Gaussian perturbations so that no two simulated patients share identical dynamics.
Each simulated patient receives 3–4 meals per day (breakfast, lunch, dinner, and a 50% probability snack) with randomised timing, and the carbohydrate content is within archetype-specific ranges. Bolus insulin doses are computed from a carbohydrate-to-insulin ratio that varies with archetype sensitivity, with random timing offsets of −10 to +15 min relative to the meal. A circadian dawn effect is modelled as a 5 mg/dL sinusoidal component peaking at 4:00 a.m.. CGM measurement noise (±5 mg/dL Gaussian) is added after downsampling, and sensor gaps (2–5% of readings) are injected randomly to mimic real-world data loss.
The D1NAMO-equivalent synthetic dataset comprises 9 patients × 21 days (18,142 CGM records), while the HUPA-UCM-equivalent dataset comprises 25 patients × 14 days (33,598 records). All synthetic data, generation codes, and parameter settings are provided as Supplementary Material to ensure full reproducibility.
Table 2 summarises the glycaemic statistics of the two synthetic datasets. The HUPA-UCM-equivalent cohort exhibits higher mean glucose (168.1 vs. 159.1 mg/dL) and more time spent above 180 mg/dL (31.3% vs. 26.3%), reflecting a greater proportion of poorly controlled and variable patient archetypes in the larger cohort. Both datasets show low hypoglycaemia rates (<1%), consistent with the bolus-adjusted insulin dosing model used in the simulation.

3.2. Preprocessing Pipeline

A standardised preprocessing pipeline was applied to both datasets to ensure a fair basis for comparison across all prediction methods. All time series were first resampled to a uniform 15 min grid: glucose values were interpolated to the nearest available reading, while insulin and carbohydrate events falling within the same interval were summed. Glucose readings outside the physiologically plausible range of 20–600 mg/dL were flagged as invalid and excluded from further processing.
Short gaps—defined as four or fewer consecutive missing values, corresponding to at most one hour—were filled by linear interpolation, whereas longer gaps were left as invalid to avoid injecting artificial trends into the signal. Any patient whose record contained fewer than 96 valid samples (equivalent to 24 h of continuous data) was excluded entirely.
To prevent data leakage, data were split chronologically within each patient: the first 80% of each time series served as training data and the remaining 20% served as the held-out test set. Feature scaling was performed with a standard z-score normaliser fitted exclusively on the training partition and then applied unchanged to the test partition so that no information from future observations could influence the fitted scaler.

3.3. Feature Engineering

Each sample presented to the prediction models is described by up to 45 features. The base feature set, common to all models except the persistence baseline, comprises 37 variables drawn from six categories. Twelve lag features record historical glucose concentrations at each of the preceding 15 min intervals, spanning a three-hour look-back window. Twelve rolling statistics—mean, standard deviation, minimum, and maximum—are computed over sliding windows of one, two, and three hours, capturing both the level and the volatility of recent glucose trends. Five rate-of-change features encode first-order derivatives at 15-minute, one-hour, and two-hour scales, together with a one-hour second-order derivative that reflects the acceleration or deceleration of glucose movement.
Circadian context is supplied by four features: sine and cosine encodings of the hour of day (sin(2πh/24) and cos(2πh/24)), a day-of-week indicator, and a binary weekend flag. A single insulin-on-board (IOB) feature estimates the residual active insulin via an exponential decay model with a rate constant of 0.02 min−1 and a five-hour action duration, while a carbs-on-board (COB) feature tracks unabsorbed carbohydrates using a linear absorption model (0.5 mg/min/g, four-hour window). Two interaction terms—glucose multiplied by IOB and glucose multiplied by the sine of time—round out the base set, allowing the learner to capture joint non-linear effects between metabolic state and circadian rhythm.
For the hybrid model alone, eight additional features are derived from Monte Carlo simulations of the stochastic glucose–insulin model described in Section 3.4.5. These comprise the mean; standard deviation; 10th, 25th, 50th, 75th, and 90th percentiles; and the interdecile range of the simulated terminal glucose distribution, bringing the total feature count to 45.

3.4. Prediction Methods

Ten prediction methods, spanning five broad categories, were included in the benchmark. The rationale for this selection is to cover the full spectrum from the simplest conceivable baseline through established statistical and machine learning approaches to a novel hybrid that integrates physiological simulation with gradient boosting.

3.4.1. Baseline: Persistence Model

The persistence model serves as a naïve lower-bound baseline. It simply predicts that the glucose concentration at time t + h will equal the most recent observed value at time t irrespective of the horizon h. Any model that cannot beat persistence is, by definition, not extracting useful information from the available features.

3.4.2. Linear Models

Three linear approaches are considered. Ordinary least-squares linear regression (scikit-learn 1.7.2, https://scikit-learn.org) provides an unregularised reference. Ridge regression adds an L2 penalty whose strength α is chosen from the set {0.01, 0.1, 1.0, 10.0, 100.0} by three-fold GroupKFold cross-validation with grouping by patient identifier, ensuring that data from the same individual never appear simultaneously in training and validation folds. Lasso regression imposes an L1 penalty instead, with α selected from {0.1, 1.0, 10.0} by the same grouped cross-validation procedure.

3.4.3. Ensemble Methods

Three tree-based ensemble methods are evaluated. A Random Forest aggregates predictions from 200 decision trees grown to a maximum depth of 20 with a minimum leaf size of 5, using all available CPU cores. XGBoost (version 3.1.2, https://xgboost.readthedocs.io) [10] trains 200 gradient-boosted trees with a maximum depth of 5 and a learning rate of 0.1, employing histogram-based splits for computational efficiency. LightGBM (version 4.6.0, https://lightgbm.readthedocs.io) [11], the fastest of the three, uses leaf-wise growth with 31 leaves per tree, no explicit depth limit, and otherwise the same number of estimators and learning rate as XGBoost.

3.4.4. Recurrent Neural Networks

Two recurrent architectures are compared. The LSTM network (PyTorch 2.9.1, https://pytorch.org) [20] consists of a single layer of 64 hidden units and is trained for 20 epochs with the Adam optimiser (learning rate 10−3), a batch size of 128, and input sequences of 12 time steps covering three hours. Gradient norms are clipped at 1.0 to stabilise training. The GRU network [21] mirrors this configuration exactly; its simpler gating mechanism (no separate cell state) results in fewer trainable parameters, which may be advantageous when data are limited.
These architectural choices follow configurations commonly adopted in the glucose prediction literature [12,13,14]. The sequence length of 12 time steps (3 h) was selected to encompass the typical duration of rapid-acting insulin action (4–5 h partially covered) and meal-driven glucose excursions (1–2 h). A single recurrent layer with 64 units provides sufficient capacity for the moderate dataset size (34 patients) while avoiding overfitting. Training was limited to 20 epochs on CPU, where convergence was typically observed by epoch 15. We note that more extensive hyperparameter optimisation (e.g., hidden sizes in {32, 64, 128}, 1–2 layers, and dropout rates of up to 0.2) and GPU-accelerated training could potentially improve RNN performance; this is noted as a limitation and direction for future work.

3.4.5. Proposed Hybrid LightGBM-SDE Model

The centrepiece of this study is a hybrid architecture that augments the 37 base features used by standalone LightGBM with 8 summary statistics derived from a stochastic physiological simulation, yielding 45 input features in total. The underlying physiological component is a stochastic extension of the Bergman minimal model [6], formulated as the following system of SDEs:
dG = [−p1(GGb) − X·G + D(t)] dt + σ dWt
dX = [−p2X + p3(IIb)] dt
dI = [−nI + γ max(Gh, 0) + u(t)] dt
In this formulation, G denotes plasma glucose concentration (mg/dL), X is the remote insulin action compartment, I represents plasma insulin (μU/mL), D(t) captures the rate of glucose appearance from ingested meals, u(t) is the exogenous insulin infusion rate, and W_t is a standard Wiener process that introduces stochastic variability. The model parameters are set to widely accepted population estimates from the original Bergman study [6]: p1 = 0.028 min−1, p2 = 0.025 min−1, p3 = 5.0 × 10−6 min−2 per μU/mL, n = 0.23 min−1, γ = 0.004 μU/mL per mg/dL per min, glucose threshold h = 80 mg/dL, basal glucose G_b = 120 mg/dL, basal insulin I_b = 10 μU/mL, and diffusion coefficient σ = 5.0 mg/dL/√min.
At each prediction time point, 20 independent realisations of the SDE system are propagated forward over the specified horizon using the Euler–Maruyama numerical scheme with a one-minute time step. All simulations are vectorised across realisations via NumPy (version 2.2.6, https://numpy.org) broadcasting to keep the computational overhead modest. From the resulting distribution of terminal glucose values, eight summary statistics are extracted—mean; standard deviation; and the 10th, 25th, 50th, 75th, and 90th percentiles, together with the interdecile range—and appended to the LightGBM feature vector. In this way, the hybrid model receives both backward-looking empirical features and forward-looking simulation-based features, combining data-driven pattern recognition with physiological prior knowledge.
The 12-step (3 h) look-back window used for lag and rolling features was chosen to balance temporal coverage against feature dimensionality. Shorter windows (e.g., 1 h/4 steps) may miss the tail of insulin action, while substantially longer windows (e.g., 4+ hours) provide diminishing returns for tree-based models and increase computational cost quadratically for RNN sequence processing. A systematic sensitivity analysis of window length is left for future work.

3.4.6. Considerations on Synthetic Data and GIM Features

Because the synthetic datasets used in this study are generated from the Bergman minimal model (Section Synthetic Data Generation) and the GIM features are derived from a stochastic extension of the same model (Equations (1)–(3)), a legitimate question arises: does the hybrid model benefit from a circular advantage?
We address this concern on several grounds. First, the data generation model and the GIM feature generator serve fundamentally different purposes and operate in different directions. The data generator simulates complete patient trajectories over weeks, incorporating patient-specific randomised parameters, meal schedules, and insulin dosing. The GIM, in contrast, performs short-horizon forward prediction from the current glucose state—a single initial condition—producing statistical summaries of possible future trajectories. It does not reconstruct or invert the data generation process.
Second, the parameterisations differ. The synthetic data generator uses per-patient randomised parameters (e.g., p1 ranges from 0.018 to 0.033 depending on archetype and individual perturbation), whereas the GIM uses fixed population-average parameters (p1 = 0.028, p2 = 0.025). The GIM has no access to the per-patient parameters used during data generation.
Third, the ablation study (Section 4.6) provides an empirical control: if the advantage were purely circular, one would expect the GIM features to add little beyond what the lagged features—which are also derived from the same synthetic data—already capture. In practice, the GIM features reduce the RMSE by 13.6–27.0% and rank among the top SHAP contributors, indicating genuinely complementary predictive signal.
Nevertheless, we acknowledge that definitive validation of the hybrid approach requires evaluation on real CGM data, where the underlying glucose dynamics are not generated by any model. This is the most immediate priority for future work.

3.5. Evaluation Protocol

All methods were evaluated at four clinically relevant prediction horizons: 15 min (one sample step), 30 min (two steps), 60 min (four steps), and 120 min (eight steps). For each horizon and each method, five performance measures were computed on a per-patient basis and then averaged across patients. The primary metric is the root mean squared error (RMSE, in mg/dL), while the mean absolute error (MAE, in mg/dL), the coefficient of determination (R2), and the mean absolute relative difference (MARD, in %) serve as complementary indicators. Clinical relevance is assessed through the Clarke Error Grid [7], which partitions prediction–reference pairs into five zones ranging from zone A (clinically accurate) to zone E (erroneous and potentially dangerous).
To determine whether observed performance differences are statistically meaningful, pairwise Wilcoxon signed-rank tests were applied to the per-patient RMSE vectors at a significance level of α = 0.05. Finally, SHAP TreeExplainer (version 0.46.0, https://shap.readthedocs.io) [22] was used to decompose the Hybrid LightGBM-SDE model predictions into additive feature contributions, providing a transparent view of which input variables—including the GIM-derived simulation statistics—drive the model’s decisions.
No data augmentation or oversampling techniques (such as SMOTE) were applied in this study. Blood glucose prediction is formulated as a regression task, making classification-based oversampling methods inapplicable. The natural concentration of predictions in Clarke zone A for well-performing models is a property of accurate prediction rather than a sampling artefact and is consistent with published results in the glucose prediction literature [3,4].

4. Results

4.1. Experimental Setup

All experiments were carried out on a standard desktop workstation equipped with an Intel multi-core CPU; no GPU acceleration was used. The software stack comprised Python 3.14, scikit-learn 1.7.2, XGBoost 3.1.2, LightGBM 4.6.0, and PyTorch 2.9.1. A global random seed of 42 was fixed throughout to ensure full reproducibility. The overall pipeline, from data ingestion through model evaluation, is illustrated schematically in Figure 1.

4.2. Main Results

Table 3 and Table 4 report, respectively, the RMSE and MAE achieved by each method at every prediction horizon, expressed as the mean ± standard deviation across the 34 patients. The Hybrid LightGBM-SDE model achieves the lowest error at every horizon. Among the remaining methods, the three gradient-boosted ensembles (LightGBM, XGBoost, and Random Forest) form a clearly separated second tier, followed by the linear regressors, while the recurrent neural networks and the persistence baseline trail behind.
Figure 2 provides a graphical view of how the RMSE evolves with an increasing prediction horizon for each method. The curves fan out as the horizon lengthens, reflecting the growing difficulty of prediction, but the Hybrid LightGBM-SDE model curve remains well below all others throughout.

4.3. Clarke Error Grid Analysis

From a clinical standpoint, the absolute magnitude of prediction error matters less than whether the error is likely to lead to a harmful treatment decision. The Clarke Error Grid addresses this question by classifying each predicted–actual glucose pair into one of five zones. Zone A predictions are clinically accurate, zone B predictions would lead to benign treatment decisions, and zones C through E represent errors of increasing clinical severity. Table 5 reports the zone distributions at the 30 min horizon.
The Hybrid LightGBM-SDE model places 77.73% of its predictions in zone A and a further 21.98% in zone B, for a combined A + B rate of 99.71%. Only 0.26% of predictions fall in zone D, which corresponds to a failure to detect clinically significant hypo- or hyperglycaemia. The scatter plot in Figure 3 illustrates this concentration of predictions around the diagonal.

4.4. Per-Patient Variability

An important consideration for any glucose prediction method is whether it performs consistently across patients with different glycaemic profiles, or whether a favourable average masks poor accuracy for certain individuals. Figure 4 addresses this question with box plots of per-patient RMSE at the 30 min horizon. The Hybrid LightGBM-SDE model not only achieves the lowest median error but also exhibits the most compact interquartile range, suggesting that the benefit of the GIM-derived features extends to patients with widely differing levels of glycaemic variability.

4.5. Statistical Significance

Table 6 reports selected pairwise Wilcoxon signed-rank test p-values at the 30 min horizon. The Hybrid LightGBM-SDE model differs significantly from every other method (p < 10−10 in all cases). Among the three gradient-boosted ensembles, three pairwise comparisons were performed. The raw p-values are: LightGBM vs. Random Forest p = 0.037, LightGBM vs. XGBoost p = 0.158, and XGBoost vs. Random Forest p = 0.270. After applying the Holm–Bonferroni correction for multiple comparisons (3 tests), the adjusted p-value for the LightGBM vs. Random Forest comparison becomes p_adj = 0.112, which does not reach significance at α = 0.05. Thus, none of the three ensemble methods differ significantly from one another after correction, confirming that they form a homogeneous performance group. A similar pattern holds for the two recurrent networks, whose mutual comparison gives p = 0.66.

4.6. Ablation Study: GIM Feature Contribution

To isolate the contribution of the stochastic simulation features, an ablation experiment compared standard LightGBM (37 base features) against the full Hybrid LightGBM-SDE model (37 base plus 8 GIM features). The results, presented in Table 7, show a consistent improvement at every horizon. At 15 min, the gain is a modest but meaningful 13.6%, rising to 26.2% at 30 min and plateauing near 27% at 60 min. This pattern makes intuitive sense: at very short horizons, the most recent glucose readings are already highly predictive, leaving little room for the simulation to add value, whereas at longer horizons, the forward-looking trajectory information encoded in the GIM statistics becomes increasingly difficult to infer from backward-looking lag features alone.

4.7. Feature Importance Analysis

SHAP TreeExplainer was applied to the trained Hybrid LightGBM-SDE model at the 30 min horizon, and the resulting feature importance ranking is shown in Figure 5. The most influential predictors are, as expected, the most recent glucose lags (bg_lag_1 and bg_lag_2), which carry direct information about the current metabolic state. Notably, however, three GIM-derived features—gim_mean, gim_p50 (the median of the simulated distribution), and gim_std—rank among the top ten, confirming that the stochastic simulation supplies complementary predictive signal that is not redundant with the empirical lag and rolling-statistics features. Insulin-on-board also appears prominently, reflecting the well-known clinical importance of residual active insulin in shaping short-term glucose trajectories.

4.8. Prediction Validation Cases

To get a qualitative sense of model behaviour, Figure 6 and Figure 7 overlay the Hybrid LightGBM-SDE model’s predictions on the actual glucose traces for two representative patients from the synthetic D1NAMO-equivalent dataset at the 30 min horizon. In both cases, the model tracks the overall trajectory well, including meal-related excursions and overnight drifts. Predictably, the largest deviations occur during rapid glucose transitions—steep postprandial rises or sharp insulin-induced drops—where even a small timing error translates into a large amplitude mismatch.

4.9. Computational Cost

Table 8 reports training and inference times at the 30 min horizon. The Hybrid LightGBM-SDE model trains in 2.3 s—comparable to standalone LightGBM (2.7 s) and orders of magnitude faster than both Random Forest (163.6 s, dominated by the cost of growing 200 deep trees) and recurrent networks (96–121 s of CPU-bound back-propagation). The training times reported in Table 8 do not include GIM feature pre-computation, which is performed once during the preprocessing phase. GIM pre-computation requires approximately 3–15 s per patient per horizon (scaling linearly with horizon length), totalling roughly 4.4 min for the D1NAMO-equivalent dataset (9 patients) and 12.2 min for the HUPA-UCM-equivalent dataset (25 patients) across all four horizons. For the full benchmark, the total GIM overhead is approximately 17 min. This cost is incurred only once and is amortised across all training runs. Inference is near-instantaneous for all methods (<0.01 s in every case except Random Forest), making any of them viable for real-time deployment on modern hardware.

5. Discussion

5.1. Key Findings

Perhaps the most striking outcome of this benchmark is the clear superiority of gradient-boosted ensemble methods over both classical linear models and recurrent neural networks. LightGBM, XGBoost, and Random Forest consistently outperform linear and ridge regression across every horizon, with the gap widening at longer look-ahead times. At the 120 min horizon, for example, LightGBM records an RMSE of 50.30 mg/dL against 56.55 mg/dL for linear regression—an 11% reduction that reflects the ability of tree ensembles to capture the non-linear interactions between insulin action, carbohydrate absorption, and circadian effects that linear models cannot represent.
The relatively poor performance of the LSTM and GRU networks was, at first glance, unexpected, given the sequential nature of CGM data and the success that recurrent architectures have enjoyed in natural-language and speech tasks. At the 15 min horizon, both RNN variants produce RMSE values near 46 mg/dL—almost double the 26 mg/dL value achieved by LightGBM. Several factors likely contribute to this result. The total sample size (34 patients) is modest by deep learning standards, limiting the capacity of the networks to generalise. The carefully engineered lag and rolling-statistics features already encode the temporal structure that the recurrent units would otherwise need to learn from raw sequences. And the restriction to CPU-only training constrained the number of epochs and the breadth of architecture search that could feasibly be explored.
The ablation experiment isolating the contribution of the GIM-derived features reveals that these eight simulation-based statistics reduce the RMSE by 13.6% at 15 min and by as much as 27% at 60 min. The mechanism behind this improvement is intuitive: at short horizons, the most recent glucose readings are inherently informative, so the marginal value of a physiological simulation is limited. As the prediction window stretches, however, the lagged features become increasingly stale, and the forward-looking trajectory information encoded in the SDE simulation fills a gap that no backward-looking statistic can bridge.
From a clinical safety perspective, the Hybrid LightGBM-SDE achieves a combined Clarke Error Grid A + B rate of 99.71% at the 30 min horizon. Critically, only 0.26% of predictions fall in zone D, which corresponds to a failure to flag a clinically significant glucose excursion. These figures suggest that the model’s errors, while non-zero, are overwhelmingly benign and unlikely to provoke harmful treatment decisions.

5.2. Comparison with the Literature

The RMSE values reported here are broadly in line with those found in the wider literature. Published studies typically report values of 15–30 mg/dL at the 15–30 min horizon and values of 30–50 mg/dL at the 60–120 min horizon [3,4]; the Hybrid LightGBM-SDE model sits comfortably within or below these ranges. The observation that gradient boosting outperforms deep recurrent networks on structured, tabular-style feature matrices is consistent with the findings of Grinsztajn et al. [23], who showed that tree-based models remain highly competitive with neural networks on typical tabular data, often matching or surpassing them when features are well engineered. For clinical deployment, gradient boosting carries the additional advantages of fast training, low memory footprint, and native support for interpretability tools like SHAP.
Recent work on Transformer architectures for tabular data—including TabNet [24], FT-Transformer [25], and TabTransformer [26]—has produced mixed results relative to gradient boosting. Grinsztajn et al. [23] demonstrated that tree-based methods consistently match or outperform deep learning on typical tabular datasets, a finding corroborated by our results. In the specific domain of glucose prediction, attention-based architectures have been explored [12,17], but their advantage tends to materialise only with large training sets and GPU resources—conditions not met in the present benchmark (34 patients, CPU-only). Including Transformer baselines—particularly temporal fusion Transformers designed for multi-horizon forecasting—is an important direction for future work, especially as larger open-access CGM datasets become available.
The computational cost analysis (Table 8) reveals a striking efficiency gap between ensemble methods and deep learning. XGBoost trains in 2.9 s and LightGBM in 2.7 s, compared to 95.8 s (LSTM) and 120.6 s (GRU)—approximately 35–45× faster. Critically, the faster ensemble methods also achieve substantially better RMSE: LightGBM achieves a value of 25.97 mg/dL at 15 min versus LSTM (46.64 mg/dL) and GRU (45.12 mg/dL). This combined accuracy-per-compute advantage makes tree-based ensembles strongly preferable for resource-constrained clinical environments, including edge devices integrated with CGM sensors, where both training speed (for periodic model updates with new patient data) and inference latency (for real-time glucose alerts) are critical constraints. The Hybrid LightGBM-SDE maintains this efficiency (2.3 s training) while achieving the best overall accuracy, though GIM feature pre-computation adds a one-time overhead of approximately 3–12 min per dataset depending on cohort size.
From the perspective of clinical trust and adoption, the interpretability of ensemble methods is a significant advantage. Tree-based models natively support feature importance via split gain and split frequency metrics, but more importantly, SHAP TreeExplainer [22] provides theoretically grounded, per-prediction feature attributions in polynomial time. As shown in Figure 5, the SHAP analysis reveals that the Hybrid LightGBM-SDE’s predictions are driven by a clinically intuitive combination of recent glucose values (bg_lag_1 and bg_lag_12), forward-looking GIM statistics (gim_p90, gim_p50, and gim_mean), rolling means (bg_mean_3h), and metabolic state indicators (carbs-on-board and insulin-on-board). This transparency enables clinicians to understand why the model predicts a future glucose drop—for instance, because insulin-on-board is high while the GIM forward simulation projects a declining trajectory. In contrast, LSTM and GRU networks operate as black boxes with no native mechanism for per-prediction explanations, which remains a significant barrier to their clinical adoption despite advances in post hoc RNN interpretability methods.

5.3. Limitations

Several limitations of this study should be borne in mind when interpreting the results. First, and most importantly, the benchmark was conducted on physics-based synthetic data rather than on the original clinical recordings. Although the synthetic generator incorporates realistic physiological dynamics, circadian variation, sensor noise, and data gaps, it cannot fully replicate the complexity and heterogeneity of real CGM time series. We plan to repeat the full experiment on the real D1NAMO and HUPA-UCM datasets once download access to the respective repositories is restored.
Second, the tree-based ensembles were trained with fixed, commonly used hyperparameters rather than with exhaustive grid or Bayesian search. While this choice was made to keep computation tractable and to reflect a realistic “out-of-the-box” usage scenario, it means that the reported performance of Random Forest, XGBoost, and LightGBM may not represent their theoretical ceiling. Third, the LSTM and GRU networks were explored with a single architecture and a limited training budget on CPU; GPU-accelerated training with broader architecture search might narrow or close the gap with the ensemble methods.
Fourth, the GIM parameters used in the stochastic simulation are population-level averages drawn from the original Bergman study. Estimating patient-specific parameters—for instance, by fitting the SDE system to each individual’s historical glucose and insulin data—could further sharpen the hybrid model’s predictions. Finally, each patient’s data were split only once (80/20 chronological); repeated splits or nested cross-validation would yield tighter confidence estimates around the reported metrics.

5.4. Practical Implications

From a deployment standpoint, the Hybrid LightGBM-SDE model presents a compelling profile. It trains in roughly two seconds on a standard CPU, making it feasible to retrain or fine-tune the model as new patient data accumulate. Inference is effectively instantaneous, well within the latency budget of a real-time CGM application running on a smartphone or insulin pump controller. The SHAP decomposition offers clinicians a transparent explanation of each prediction, which can support trust-building and regulatory review. And the GIM simulation component anchors the model in established physiology, offering a layer of interpretability that purely data-driven black-box approaches lack.

6. Conclusions

This paper has presented a systematic benchmark of ten machine learning methods for blood glucose prediction in type 1 diabetes, evaluated across two datasets encompassing 34 patients, four prediction horizons spanning 15 to 120 min, and a battery of error, clinical safety, and statistical significance metrics. The proposed Hybrid LightGBM-SDE model—which enriches a gradient-boosted decision tree with features drawn from Monte Carlo simulations of a stochastic glucose–insulin model—achieves the lowest error at every horizon, with RMSE values of 22.42, 28.74, 33.89, and 37.22 mg/dL at 15, 30, 60, and 120 min, respectively.
The experimental evidence supports several broader conclusions. Gradient-boosted ensembles consistently outperform both linear regressors and recurrent neural networks when applied to well-engineered tabular features derived from CGM data. Stochastic physiological simulation features provide meaningful and statistically significant improvements—ranging from 13.6% to 27.0%—with the largest gains appearing at longer horizons where backward-looking empirical features lose their predictive power. The hybrid model’s predictions are overwhelmingly clinically safe, with 99.71% of 30 min forecasts falling within the acceptable zones of the Clarke Error Grid. Training and inference are fast enough for real-time clinical use.

6.1. Clinical Decision Support Pathway

The benchmark results suggest a practical model selection strategy for different clinical scenarios. For short-horizon glucose alerts (15 min predictions, e.g., hypoglycaemia warnings), any of the three ensemble methods (LightGBM, XGBoost, and Random Forest) provides acceptable accuracy with fast training. For insulin dosing support (30–60 min predictions), the Hybrid LightGBM-SDE model is recommended due to its advantage of a 26–27% RMSE and its 99.71% clinical safety rate. For meal planning and longer-term trend forecasting (120 min horizon), the hybrid model’s advantage is most pronounced (26% improvement over standalone LightGBM), making it the clear choice.
A deployment pathway from benchmark to bedside would proceed as follows: (1) retrospective validation on real CGM datasets to confirm performance outside synthetic data; (2) prospective clinical study comparing model-assisted decisions with standard care; and (3) regulatory submission under the FDA’s guidance on AI/ML-based Software as a Medical Device (SaMD) [27]. The modular benchmark pipeline provided with this paper is designed to facilitate step (1) by accepting new datasets with minimal configuration. While addressing different engineering challenges, earlier contributions by Mitev [28,29,30] demonstrate how well-defined system architectures can support reliable and reproducible outcomes.
The benchmark establishes a foundation for developing autonomous glucose control systems (artificial pancreas). In such systems, optimising solely for RMSE is insufficient—clinical safety (minimising zone C–E predictions) must be jointly optimised. Future work should explore composite metrics that combine statistical accuracy with clinical safety through Pareto-optimal model selection. The Hybrid LightGBM-SDE model already achieves a favourable position on both axes (lowest RMSE and highest Zone A + B percentage), suggesting that it is a strong candidate for closed-loop control applications.

6.2. Future Directions

Validating the benchmark on the original D1NAMO and HUPA-UCM clinical recordings remains the most immediate priority. Beyond that, transfer learning offers a promising pathway to personalisation: a general model pre-trained on multi-patient data could be fine-tuned on a new patient’s limited CGM history (e.g., 3–7 days), enabling rapid adaptation without extensive per-patient training data. For tree-based models, incremental boosting allows efficient model updating; for deep learning models, standard fine-tuning of pre-trained RNN weights could enable few-shot adaptation to individual glucose dynamics.
Further directions include personalising the GIM parameters for individual patients, incorporating additional data streams such as physical activity and stress biomarkers, and conducting prospective trials within a closed-loop insulin delivery system. The full source code, evaluation scripts, and synthetic data generators accompanying this paper are publicly available to support reproducibility and to serve as a shared baseline for future work.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/app16083928/s1, Supplement S1: Configuration Utilities; Supplement S2: Data Loading and Preprocessing; Supplement S3: Features and GIM Model; Supplement S4: ML Models; Supplement S5: Evaluation and Visualization; Supplement S6: Pipeline and Results.

Author Contributions

Conceptualization, M.K. and M.M.; methodology, M.K. and I.N. (Irina Naskinova); software, M.K. and I.N. (Irina Naskinova); validation, I.N. (Irina Naskinova) and S.S.; formal analysis, M.K. and M.M.; investigation, I.N. (Irina Naskinova) and M.K.; resources, M.M.; data curation, I.N. (Irina Naskinova) and I.N. (Iveta Nikilova); writing—original draft preparation, M.K. and I.N. (Irina Naskinova); writing—review and editing, M.M., S.S. and I.N. (Iveta Nikilova); visualisation, I.N. (Irina Naskinova); supervision, M.K. and M.M.; project administration, M.K.; funding acquisition, M.K. and M.M. All authors have read and agreed to the published version of the manuscript.

Funding

The presentation and dissemination of these research results are supported by the National Science Fund Project KП-06-H85-7/05.12.2024, “Significance and Potential Risks of Artificial Intelligence for Healthcare”.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

This study draws on two publicly available CGM datasets. The D1NAMO dataset, described by Dubosson et al. [18], is hosted on Zenodo at https://zenodo.org/records/1421616 under a Creative Commons Attribution 4.0 International licence (CC BY 4.0; accessed on 1 March 2026) and comprises CGM, insulin, and meal records from nine T1D patients. The HUPA-UCM dataset, introduced by Hidalgo et al. [19], is available on Mendeley Data at https://data.mendeley.com/datasets/3hbcscwz44/1 under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International licence (CC BY-NC-ND 4.0; accessed on 1 March 2026) and covers 25 T1D patients. Because temporary access restrictions prevented downloading these repositories at the time of the experiments, physics-based synthetic datasets replicating their statistical properties were generated using the Bergman minimal model. The synthetic data generation code, the benchmark pipeline, and all evaluation scripts are provided as Supplementary Material.

Acknowledgments

The authors gratefully acknowledge the support of the Bulgarian National Science Fund through Project KП-06-H85-7/05.12.2024, “Significance and Potential Risks of Artificial Intelligence for Healthcare”.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Gregory, G.A.; Robinson, T.I.G.; Linklater, S.E.; Wang, F.; Colagiuri, S.; de Beaufort, C.; Donaghue, K.C.; Harding, J.L.; Wander, P.L.; Zhang, X.; et al. Global incidence, prevalence, and mortality of type 1 diabetes in 2021 with projection to 2040: A modelling study. Lancet Diabetes Endocrinol. 2022, 10, 741–760. [Google Scholar] [CrossRef]
  2. Battelino, T.; Danne, T.; Bergenstal, R.M.; Amiel, S.A.; Beck, R.; Biester, T.; Bosi, E.; Buckingham, B.A.; Cefalu, W.T.; Close, K.L.; et al. Clinical targets for continuous glucose monitoring data interpretation: Recommendations from the international consensus on time in range. Diabetes Care 2019, 42, 1593–1603. [Google Scholar] [CrossRef]
  3. Oviedo, S.; Vehi, J.; Calm, R.; Armengol, J. A review of personalized blood glucose prediction strategies for T1DM patients. Int. J. Numer. Methods Biomed. Eng. 2017, 33, e2833. [Google Scholar] [CrossRef]
  4. Woldaregay, A.Z.; Årsand, E.; Walderhaug, S.; Albers, D.; Mamykina, L.; Botsis, T.; Hartvigsen, G. Data-driven modeling and prediction of blood glucose dynamics: Machine learning applications in type 1 diabetes. Artif. Intell. Med. 2019, 98, 109–134. [Google Scholar] [CrossRef]
  5. Xie, J.; Wang, Q. Benchmarking machine learning algorithms on blood glucose prediction for type I diabetes in comparison with classical time-series models. IEEE Trans. Biomed. Eng. 2020, 67, 3101–3124. [Google Scholar] [CrossRef]
  6. Bergman, R.N.; Ider, Y.Z.; Bowden, C.R.; Cobelli, C. Quantitative estimation of insulin sensitivity. Am. J. Physiol. 1979, 236, E667–E677. [Google Scholar] [CrossRef] [PubMed]
  7. Clarke, W.L.; Cox, D.; Gonder-Frederick, L.A.; Carter, W.; Pohl, S.L. Evaluating clinical accuracy of systems for self-monitoring of blood glucose. Diabetes Care 1987, 10, 622–628. [Google Scholar] [CrossRef]
  8. Sparacino, G.; Zanderigo, F.; Corazza, S.; Maran, A.; Facchinetti, A.; Cobelli, C. Glucose concentration can be predicted ahead in time from continuous glucose monitoring sensor time-series. IEEE Trans. Biomed. Eng. 2007, 54, 931–937. [Google Scholar] [CrossRef]
  9. Georga, E.I.; Protopappas, V.C.; Ardigò, D.; Marina, M.; Zavaroni, I.; Polyzos, D.; Fotiadis, D.I. Multivariate prediction of subcutaneous glucose concentration in type 1 diabetes patients based on support vector regression. IEEE J. Biomed. Health Inform. 2013, 17, 71–81. [Google Scholar] [CrossRef] [PubMed]
  10. Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar] [CrossRef]
  11. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.-Y. LightGBM: A highly efficient gradient boosting decision tree. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NeurIPS), Long Beach, CA, USA, 4–9 December 2017; pp. 3146–3154. Available online: https://proceedings.neurips.cc/paper/6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree (accessed on 20 March 2026).
  12. Li, K.; Liu, C.; Zhu, T.; Herrero, P.; Georgiou, P. GluNet: A deep learning framework for accurate glucose forecasting. IEEE J. Biomed. Health Inform. 2020, 24, 414–423. [Google Scholar] [CrossRef] [PubMed]
  13. Sun, Q.; Jankovic, M.V.; Bally, L.; Mougiakakou, S.G. Predicting blood glucose with an LSTM and Bi-LSTM based deep neural network. In Proceedings of the 14th Symposium on Neural Networks and Applications (NEUREL), Belgrade, Serbia, 20–22 November 2018; pp. 1–5. [Google Scholar] [CrossRef]
  14. Martinsson, J.; Schliep, A.; Eliasson, B.; Mogren, O. Blood glucose prediction with variance estimation using recurrent neural networks. J. Healthc. Inform. Res. 2020, 4, 1–18. [Google Scholar] [CrossRef]
  15. Dalla Man, C.; Micheletto, F.; Lv, D.; Breton, M.; Kovatchev, B.; Cobelli, C. The UVA/PADOVA type 1 diabetes simulator: New features. J. Diabetes Sci. Technol. 2014, 8, 26–34. [Google Scholar] [CrossRef]
  16. Tornøe, C.W.; Jacobsen, J.L.; Pedersen, O.; Hansen, T.; Madsen, H. Grey-box modelling of pharmacokinetic/pharmacodynamic systems. J. Pharmacokinet. Pharmacodyn. 2004, 31, 401–417. [Google Scholar] [CrossRef] [PubMed]
  17. Zhu, T.; Li, K.; Herrero, P.; Georgiou, P. Deep learning for diabetes: A systematic review. IEEE J. Biomed. Health Inform. 2021, 25, 2744–2757. [Google Scholar] [CrossRef] [PubMed]
  18. Dubosson, F.; Ranvier, J.E.; Bromuri, S.; Calbimonte, J.P.; Ruiz, J.; Schumacher, M. The open D1NAMO dataset: A multi-modal dataset for research on non-invasive type 1 diabetes management. Inform. Med. Unlocked 2018, 13, 92–100. [Google Scholar] [CrossRef]
  19. Hidalgo, J.I.; Alvarado, J.; Botella, M.; Aramendi, A.; Velasco, J.M.; Garnica, O. HUPA-UCM Diabetes Dataset. Data Brief 2024, 55, 110559. [Google Scholar] [CrossRef]
  20. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  21. Cho, K.; van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1724–1734. [Google Scholar] [CrossRef]
  22. Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NeurIPS), Long Beach, CA, USA, 4–9 December 2017; pp. 4766–4777. Available online: https://proceedings.neurips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions (accessed on 20 March 2026).
  23. Grinsztajn, L.; Oyallon, E.; Varoquaux, G. Why do tree-based models still outperform deep learning on typical tabular data? In Proceedings of the 36th International Conference on Neural Information Processing Systems (NeurIPS), New Orleans, LA, USA, 28 November–9 December 2022; pp. 507–520. Available online: https://proceedings.neurips.cc/paper_files/paper/2022/hash/0378c7692da36807bdec87ab043cdadc-Abstract-Datasets_and_Benchmarks.html (accessed on 20 March 2026).
  24. Arik, S.Ö.; Pfister, T. TabNet: Attentive interpretable tabular learning. In Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, 2–9 February 2021; Volume 35, pp. 6679–6687. [Google Scholar] [CrossRef]
  25. Gorishniy, Y.; Rubachev, I.; Khrulkov, V.; Babenko, A. Revisiting deep learning models for tabular data. In Proceedings of the 35th International Conference on Neural Information Processing Systems (NeurIPS), Virtual, 6–14 December 2021; pp. 18932–18943. Available online: https://proceedings.neurips.cc/paper/2021/hash/9d86d83f925f2149e9edb0ac3b49229c-Abstract.html (accessed on 20 March 2026).
  26. Huang, X.; Khetan, A.; Cvitkovic, M.; Karnin, Z. TabTransformer: Tabular data modeling using contextual embeddings. arXiv 2020, arXiv:2012.06678. [Google Scholar] [CrossRef]
  27. U.S. Food and Drug Administration. Artificial Intelligence/Machine Learning (AI/ML)-Based Software as a Medical Device (SaMD) Action Plan; FDA: Silver Spring, MD, USA, 2021. Available online: https://www.fda.gov/media/145022/download (accessed on 20 March 2026).
  28. Mitev, P. Development of a System for Flexible Feeding of Parts with Robot and Machine Vision. Eng. Proc. 2025, 104, 84. [Google Scholar] [CrossRef]
  29. Mitev, P.; Malakov, I. Development of a system for automatic feeding and orientation of cylindrical parts. AIP Conf. Proc. 2024, 3063, 060017. [Google Scholar] [CrossRef]
  30. Mitev, P.; Tashev, A.; Stoyanov, Y. Design and Construction of an Engine Oil Viscosity Meter with Electronic Control. Eng. Proc. 2025, 100, 55. [Google Scholar] [CrossRef]
Figure 1. Schematic of the benchmark pipeline. Two datasets undergo unified preprocessing and feature engineering before being passed to ten prediction methods. Each method is evaluated at four horizons using a common set of metrics.
Figure 1. Schematic of the benchmark pipeline. Two datasets undergo unified preprocessing and feature engineering before being passed to ten prediction methods. Each method is evaluated at four horizons using a common set of metrics.
Applsci 16 03928 g001
Figure 2. The RMSE as a function of prediction horizon for all ten methods. The Hybrid LightGBM-SDE model (bottom curve) maintains the largest margin over competing approaches at every horizon. Each curve represents one of the ten prediction methods. The methods are distinguished by colour and line style as shown in the legend. Note: the Linear Regression and Ridge Regression curves overlap almost entirely because their RMSE values are nearly identical at every horizon, which may give the appearance that one line from the legend is missing from the plot.
Figure 2. The RMSE as a function of prediction horizon for all ten methods. The Hybrid LightGBM-SDE model (bottom curve) maintains the largest margin over competing approaches at every horizon. Each curve represents one of the ten prediction methods. The methods are distinguished by colour and line style as shown in the legend. Note: the Linear Regression and Ridge Regression curves overlap almost entirely because their RMSE values are nearly identical at every horizon, which may give the appearance that one line from the legend is missing from the plot.
Applsci 16 03928 g002
Figure 3. Clarke Error Grid scatter plot for the Hybrid LightGBM-SDE model at the 30 min horizon. Nearly all predictions (99.71%) lie within the clinically acceptable zones A and B. The grid is divided into five zones labelled A through E. Zone A (dark green region) contains clinically accurate predictions; zone B (light green) contains benign errors that would not lead to inappropriate treatment; zones C, D, and E (yellow, orange, and red regions, respectively) represent progressively more dangerous prediction errors. Each point represents a single predicted–actual glucose pair. The diagonal dashed line indicates perfect prediction (y = x). Point density near the diagonal confirms the model’s clinical accuracy.
Figure 3. Clarke Error Grid scatter plot for the Hybrid LightGBM-SDE model at the 30 min horizon. Nearly all predictions (99.71%) lie within the clinically acceptable zones A and B. The grid is divided into five zones labelled A through E. Zone A (dark green region) contains clinically accurate predictions; zone B (light green) contains benign errors that would not lead to inappropriate treatment; zones C, D, and E (yellow, orange, and red regions, respectively) represent progressively more dangerous prediction errors. Each point represents a single predicted–actual glucose pair. The diagonal dashed line indicates perfect prediction (y = x). Point density near the diagonal confirms the model’s clinical accuracy.
Applsci 16 03928 g003
Figure 4. Distribution of per-patient RMSE at the 30 min horizon. Each box summarises the spread across 34 patients. The Hybrid LightGBM-SDE model yields the lowest median and the tightest spread. In each box plot, the horizontal orange line indicates the median RMSE, the box spans the interquartile range (25th to 75th percentile), the whiskers extend to 1.5 times the interquartile range, and individual points beyond the whiskers represent outliers. The green triangle (or square) marks the mean RMSE for each method.
Figure 4. Distribution of per-patient RMSE at the 30 min horizon. Each box summarises the spread across 34 patients. The Hybrid LightGBM-SDE model yields the lowest median and the tightest spread. In each box plot, the horizontal orange line indicates the median RMSE, the box spans the interquartile range (25th to 75th percentile), the whiskers extend to 1.5 times the interquartile range, and individual points beyond the whiskers represent outliers. The green triangle (or square) marks the mean RMSE for each method.
Applsci 16 03928 g004
Figure 5. SHAP feature importance for the Hybrid LightGBM-SDE model at the 30 min horizon. GIM-derived simulation features (gim_mean, gim_p50, and gim_std) rank among the top predictors alongside empirical lag and rolling-statistics features.
Figure 5. SHAP feature importance for the Hybrid LightGBM-SDE model at the 30 min horizon. GIM-derived simulation features (gim_mean, gim_p50, and gim_std) rank among the top predictors alongside empirical lag and rolling-statistics features.
Applsci 16 03928 g005
Figure 6. Thirty-minute-ahead predictions (orange dashed) versus actual glucose (blue) for Patient 1 of the synthetic D1NAMO-equivalent dataset. The model captures the broad glucose trajectory, with the largest errors occurring during rapid postprandial excursions. The solid blue line shows the actual (ground-truth) glucose concentration over time. The orange dashed line shows the model’s 30-minute-ahead predicted values. Regions where the two lines diverge correspond to rapid glucose transitions (e.g., postprandial spikes), where prediction is inherently more difficult.
Figure 6. Thirty-minute-ahead predictions (orange dashed) versus actual glucose (blue) for Patient 1 of the synthetic D1NAMO-equivalent dataset. The model captures the broad glucose trajectory, with the largest errors occurring during rapid postprandial excursions. The solid blue line shows the actual (ground-truth) glucose concentration over time. The orange dashed line shows the model’s 30-minute-ahead predicted values. Regions where the two lines diverge correspond to rapid glucose transitions (e.g., postprandial spikes), where prediction is inherently more difficult.
Applsci 16 03928 g006
Figure 7. Thirty-minute-ahead predictions (orange dashed) versus actual glucose (blue) for Patient 2 of the synthetic D1NAMO-equivalent dataset. Performance degrades slightly during steep glucose transitions, as is typical for fixed-horizon predictors. As in Figure 6, the solid blue line represents actual glucose and the orange dashed line represents predicted values. The steeper glucose transitions in this patient produce slightly larger prediction errors, visible as wider gaps between the two curves.
Figure 7. Thirty-minute-ahead predictions (orange dashed) versus actual glucose (blue) for Patient 2 of the synthetic D1NAMO-equivalent dataset. Performance degrades slightly during steep glucose transitions, as is typical for fixed-horizon predictors. As in Figure 6, the solid blue line represents actual glucose and the orange dashed line represents predicted values. The steeper glucose transitions in this patient produce slightly larger prediction errors, visible as wider gaps between the two curves.
Applsci 16 03928 g007
Table 1. Dataset characteristics. CGM = continuous glucose monitor. All data resampled to 15 min intervals.
Table 1. Dataset characteristics. CGM = continuous glucose monitor. All data resampled to 15 min intervals.
CharacteristicD1NAMOHUPA-UCM
Number of patients925
Total CGM records18,14233,598
Valid records (%)100.0100.0
Duration per patient (days)~21~14
CGM interval (min)1515
Data modalitiesCGM, insulin, mealsCGM, insulin, meals
Table 2. Glycaemic statistics of the synthetic datasets. Values are computed across all patients and all valid CGM records within each dataset.
Table 2. Glycaemic statistics of the synthetic datasets. Values are computed across all patients and all valid CGM records within each dataset.
StatisticSynthetic D1NAMOSynthetic HUPA-UCM
Mean glucose (mg/dL)159.1168.1
SD glucose (mg/dL)64.868.3
Time in range 70–180 mg/dL (%)72.967.7
Time below 70 mg/dL (%)0.81.0
Time above 180 mg/dL (%)26.331.3
Table 3. RMSE (mg/dL, mean ± std across patients) for all methods and prediction horizons. Bold indicates best performance per horizon.
Table 3. RMSE (mg/dL, mean ± std across patients) for all methods and prediction horizons. Bold indicates best performance per horizon.
Method15 min30 min60 min120 min
Persistence55.75 ± 13.467.81 ± 16.880.08 ± 21.387.06 ± 25.3
Linear Reg.30.28 ± 7.645.96 ± 11.454.56 ± 14.956.55 ± 15.7
Ridge Reg.30.28 ± 7.645.97 ± 11.454.57 ± 14.956.55 ± 15.7
Lasso Reg.30.41 ± 7.646.07 ± 11.454.64 ± 14.756.57 ± 15.7
Random Forest26.88 ± 7.639.37 ± 10.746.56 ± 13.450.90 ± 15.3
XGBoost26.02 ± 7.539.11 ± 10.646.30 ± 13.150.53 ± 15.0
LightGBM25.97 ± 7.538.92 ± 10.546.43 ± 13.450.30 ± 15.3
LSTM46.64 ± 16.250.21 ± 16.552.53 ± 17.253.85 ± 18.1
GRU45.12 ± 14.150.11 ± 15.651.07 ± 16.953.02 ± 17.2
Hybrid LightGBM-SDE22.42 ± 6.828.74 ± 9.433.89 ± 10.637.22 ± 11.7
Table 4. MAE (mg/dL, mean ± std across patients) for all methods and prediction horizons. Bold indicates best performance per horizon.
Table 4. MAE (mg/dL, mean ± std across patients) for all methods and prediction horizons. Bold indicates best performance per horizon.
Method15 min30 min60 min120 min
Persistence37.24 ± 10.046.15 ± 12.757.23 ± 16.864.04 ± 21.4
Linear Reg.21.88 ± 5.731.76 ± 7.539.81 ± 10.142.13 ± 11.3
Ridge Reg.21.88 ± 5.731.75 ± 7.539.81 ± 10.142.13 ± 11.3
Lasso Reg.21.94 ± 5.631.74 ± 7.439.86 ± 10.042.11 ± 11.2
Random Forest19.49 ± 5.927.61 ± 8.133.59 ± 10.737.37 ± 12.0
XGBoost19.35 ± 5.927.74 ± 8.133.55 ± 10.437.17 ± 11.9
LightGBM19.26 ± 5.927.48 ± 8.033.53 ± 10.536.94 ± 12.0
LSTM32.06 ± 11.435.37 ± 12.137.86 ± 12.938.76 ± 13.9
GRU31.01 ± 10.435.25 ± 11.436.91 ± 12.838.51 ± 13.4
Hybrid LightGBM-SDE17.42 ± 5.522.16 ± 7.626.10 ± 8.928.48 ± 10.0
Table 5. Clarke Error Grid zone distribution (%) at the 30 min prediction horizon. Zones A + B are clinically acceptable; zones C–E represent clinically significant errors.
Table 5. Clarke Error Grid zone distribution (%) at the 30 min prediction horizon. Zones A + B are clinically acceptable; zones C–E represent clinically significant errors.
MethodZone AZone BZone CZone DZone E
Persistence51.7641.621.455.080.09
Linear Reg.63.6334.030.062.220.05
Ridge Reg.63.6933.980.082.210.05
Lasso Reg.63.6833.960.072.230.05
Random Forest70.3228.310.360.930.07
XGBoost69.6029.060.330.970.04
LightGBM70.1928.350.371.030.07
LSTM61.4136.760.461.300.06
GRU60.9536.950.651.420.02
Hybrid LightGBM-SDE77.7321.980.010.260.02
Table 6. Selected pairwise Wilcoxon signed-rank test p-values at the 30 min horizon. Values below 0.05 indicate statistically significant differences.
Table 6. Selected pairwise Wilcoxon signed-rank test p-values at the 30 min horizon. Values below 0.05 indicate statistically significant differences.
HybridLightGBMXGBoostRF
LightGBM<10−100.1580.037
XGBoost<10−100.1580.270
Random Forest<10−100.0370.270
Linear Reg.<10−10<10−10<10−10<10−10
LSTM<10−10<10−10<10−10<10−10
Persistence<10−10<10−10<10−10<10−10
Table 7. Ablation study: effect of GIM-derived features on LightGBM performance. RMSE is expressed in mg/dL.
Table 7. Ablation study: effect of GIM-derived features on LightGBM performance. RMSE is expressed in mg/dL.
HorizonLightGBMHybrid (+GIM)Improvement (%)
15 min25.9722.4213.6
30 min38.9228.7426.2
60 min46.4333.8927.0
120 min50.3037.2226.0
Table 8. Computational cost at the 30 min horizon. Training on ~40,900 samples, inference on ~10,200 samples. Times include hyperparameter selection where applicable.
Table 8. Computational cost at the 30 min horizon. Training on ~40,900 samples, inference on ~10,200 samples. Times include hyperparameter selection where applicable.
MethodTraining (s)Inference (s)
Persistence<0.01<0.01
Linear Regression0.07<0.01
Ridge Regression29.0<0.01
Lasso Regression23.4<0.01
Random Forest163.60.09
XGBoost2.9<0.01
LightGBM2.7<0.01
LSTM95.8<0.01
GRU120.6<0.01
Hybrid LightGBM-SDE2.3<0.01
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kolev, M.; Naskinova, I.; Milev, M.; Stoilova, S.; Nikolova, I. A Comprehensive Benchmark of Machine Learning Methods for Blood Glucose Prediction in Type 1 Diabetes: A Multi-Dataset Evaluation. Appl. Sci. 2026, 16, 3928. https://doi.org/10.3390/app16083928

AMA Style

Kolev M, Naskinova I, Milev M, Stoilova S, Nikolova I. A Comprehensive Benchmark of Machine Learning Methods for Blood Glucose Prediction in Type 1 Diabetes: A Multi-Dataset Evaluation. Applied Sciences. 2026; 16(8):3928. https://doi.org/10.3390/app16083928

Chicago/Turabian Style

Kolev, Mikhail, Irina Naskinova, Mariyan Milev, Stanislava Stoilova, and Iveta Nikolova. 2026. "A Comprehensive Benchmark of Machine Learning Methods for Blood Glucose Prediction in Type 1 Diabetes: A Multi-Dataset Evaluation" Applied Sciences 16, no. 8: 3928. https://doi.org/10.3390/app16083928

APA Style

Kolev, M., Naskinova, I., Milev, M., Stoilova, S., & Nikolova, I. (2026). A Comprehensive Benchmark of Machine Learning Methods for Blood Glucose Prediction in Type 1 Diabetes: A Multi-Dataset Evaluation. Applied Sciences, 16(8), 3928. https://doi.org/10.3390/app16083928

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop