Every person's blood glucose reacts differently to the same meal. Two athletes eating an identical plate of pasta can show dramatically different glucose excursions: one barely budging, the other spiking 60 mg/dL in under 45 minutes. This is the challenge of personalized nutrition: understanding what drives these individual differences, and whether machine learning can predict them without invasive measurements.
This page presents the model from Zignoli et al. (2024), a machine-learning approach trained on 3,296 real-world meal events from 927 healthy individuals wearing continuous glucose monitors (CGM) in uncontrolled settings.

The study used data collected by Supersapiens, where participants self-reported meal timing and macronutrient content via a mobile app while wearing an Abbott Libre Sense biosensor. The CGM measured interstitial glucose every minute, capturing the full post-meal glycemic profile.
Key dataset characteristics:
The uncontrolled nature of this dataset is both a strength (real-world generalizability) and a limitation (self-reported meal data introduces noise). The study estimated the maximum attainable correlation for this approach is ~0.7, limited by intra-individual variability.
Rather than predicting a single number (e.g., AUC at 120 min), the authors fitted a bell-shaped curve to the 90-minute CGM trace after each meal. This captures the full shape of the response with just three parameters (amplitude, peak time, and width):
where
The three parameters describe the glycemic response completely:
| Parameter | Symbol | Meaning | Dataset median |
|---|---|---|---|
| Amplitude | A | Peak rise above baseline (mg/dL) | 31 mg/dL |
| Peak delay | δ | Time to glucose peak (min) | 50 min |
| Width | σ | Spread of the response (min) | 18 min |
Gaussian model of the post-meal glycemic response
Each meal event is described by three parameters: amplitude A, peak time δ, and width σ. The curve is fitted to the 90-minute CGM trace after the meal. Example shown with A = 42 mg/dL, δ = 45 min, σ = 18 min.
The baseline is the average glucose in the last 5 minutes before the meal, observed from CGM. The function is fitted to each meal trace using least-squares optimization (scipy, soft L1 loss).
So far we have a way to describe any glycemic response with three numbers (A, δ, σ). The next question is: can we predict those numbers for a new meal, before measuring anything?
This is where machine learning enters. The approach is the same input-output mapping covered in Module 5 on AI and machine learning models: select a set of measurable features, pass them through a trained model, and read off the predicted outputs.
Feature-to-parameter mapping: what goes in, what comes out
The ML model takes ~30 input features and predicts the three Gaussian shape parameters.
Meal
CHO, FAT, PRO (g)
Individual
Age, BMI, Sex
CGM · 24 h
Mean, SD, TIR, Skew, Glucotype…
CGM · 4 h
Mean, SD, TIR, Autocorr…
XGBoost
+ linear (A)
Amplitude
mg/dL
Peak delay
min
Width
min
The diagram above shows the full feature set. Notice that meal composition (CHO, FAT, PRO) accounts for only 3 of roughly 30 inputs. The dominant predictors turn out to be the pre-meal CGM history features: the 24-hour and 4-hour windows before eating capture the individual's current metabolic state far better than macronutrients alone. This is consistent with the low R² of macronutrient-only models and the stronger performance of the full XGBoost model.
Two models were trained, serving different purposes:
A gradient-boosted tree ensemble, one model per output (A, δ, σ), trained on all ~30 features listed above. Configuration: 200 trees, max depth 5, learning rate 0.01, subsampling 50%.
Performance on the held-out 20% test set:
| Output | Pearson r | RMSE |
|---|---|---|
| Amplitude A | 0.48 | 13.2 ± 9.5 mg/dL |
| Peak delay δ | 0.17 | 12.2 ± 9.2 min |
| Width σ | 0.19 | 3.5 ± 2.6 min |
To isolate the specific contribution of meal macronutrients to amplitude A, and to power the interactive tool below, a simpler model was also fitted using only meal composition as input:
Fitted coefficients (n = 3,926, R² = 0.14):
| Term | Coefficient | Interpretation |
|---|---|---|
| Intercept | +25.85 | Baseline amplitude at zero macronutrients |
| CHO | +0.263 | +1 g CHO → +0.26 mg/dL rise (at mean FAT, PRO) |
| FAT | −0.108 | +1 g FAT → −0.11 mg/dL rise (at mean CHO, PRO) |
| PRO | −0.005 | Not significant (p = 0.83) |
| CHO × PRO | −0.0014 | High PRO weakens the CHO-driven spike |
| CHO × FAT | −0.0009 | High FAT weakens the CHO-driven spike |
R² = 0.14 means macronutrients alone explain only 14% of the variance in glycemic amplitude. The remaining variance comes from individual biology, pre-meal glucose state (captured by CGM features), meal timing, exercise, stress, and other unmeasured factors.
The chart below shows how each macronutrient contributes to glycemic amplitude A (equivalent to Fig. 5 of Zignoli et al. 2024). Dots are binned means from the actual dataset with the other macronutrients' effects partialled out; the curve is a polynomial fit to those means.
Contribution of each macronutrient to glycemic amplitude A. Dots = actual dataset binned means (other macronutrients partialled out). Curves = polynomial fit to those means.
Carbohydrates (CHO)
Contribution becomes positive after ~35 g and saturates above ~70–80 g.
Fat (FAT)
Near-neutral below ~20 g; increasingly negative beyond 30 g.
Protein (PRO)
Positive at very low protein (<10 g), neutral at 10–30 g, gradually negative beyond 30 g.
Key patterns, consistent with the Shapley values reported in the paper:
Use the tool below to explore how changing meal composition and individual characteristics affects the predicted glycemic response curve. The amplitude A uses the full multi-linear regression model; peak time δ and width σ use simplified linear approximations from meal + individual features only.
Predicted glycemic response, 90 minutes post-meal
Shaded band = empirical 95% prediction interval (−26.5 / +37.5 mg/dL on amplitude). Asymmetric: the upper tail is wider because the model underpredicts large spikes more than it overpredicts small ones. Horizontal bracket at baseline = ±σ response width.
Total energy: 480 kcal
CHO share: 42%
Amplitude A: multi-linear regression (R²=0.14, RMSE=16.7 mg/dL). Shaded band: empirical 95% prediction interval (−26.5 / +37.5 mg/dL), computed from the 2.5th and 97.5th percentiles of training residuals (n=3,926). Asymmetric because residuals are right-skewed (skewness=0.58): the model tends to underpredict large spikes. Peak time δ and width σ: simplified linear approximations; their variance is dominated by 24h pre-meal CGM features not entered here. Curve: f(t) = A · exp(−(t−δ)² / 2σ²) + baseline (Zignoli et al. 2024).
The model presented here is educational more than clinical. Key limitations:
Despite these limitations, the model offers genuine insights:
Zignoli A., Skroce K., Lipman D.J., Zisser H.C. (2024). Personalized nutrition and machine-learning: Exploring the scope of continuous glucose monitoring in healthy individuals in uncontrolled settings. Biomedical Signal Processing and Control, 90, 105809. Read the paper →