Ahmed A. Metwally, Staff Research Scientist, and Zechen Li, Student Researcher, Google Research
GlucoFM is a lightweight, self-supervised CGM foundation model that models slower glucose trends and short-term deviations in separate streams, producing transferable representations and setting new performance standards across diverse metabolic prediction tasks, including diabetes risk assessment, insulin resistance, beta-cell dysfunction, and post-prandial glycemic response.
Consumer wearables use motion and physiological sensors to estimate activity and sleep, but these signals provide only an indirect view of glucose regulation. Continuous glucose monitors:https://www.niddk.nih.gov/health-information/diabetes/overview/managing-diabetes/continuous-glucose-monitoring (CGM) complement these measurements by tracking interstitial glucose:https://my.clevelandclinic.org/health/articles/continuous-glucose-monitoring-cgm#:~:text=What%20is%20interstitial%20fluid%3F every few minutes through a small sensor inserted under the skin, capturing fasting, overnight, and post-meal patterns. Yet making sense of these traces remains challenging, especially when high-quality clinical labels that help interpret them are sparse and costly to obtain.
Many existing CGM foundation models — including CGMformer:https://doi.org/10.1093/nsr/nwaf039, GluFormer:https://www.nature.com/articles/s41586-025-09925-9, and CGM-JEPA:https://arxiv.org/abs/2605.00933 — process glucose through a single representation stream rather than explicitly separating slow baseline and transient event dynamics. But CGM is not an undifferentiated data stream: it contains relatively slow baseline patterns punctuated by short-term deviations that may reflect meals, activity, or sensor artifacts. What if we could leverage daily CGM data to estimate things like diabetes risk:https://www.niddk.nih.gov/health-information/diabetes/overview/risk-factors-type-2-diabetes, insulin resistance:https://www.niddk.nih.gov/health-information/diabetes/overview/what-is-diabetes/prediabetes-insulin-resistance, and beta-cell dysfunction:https://www.niddk.nih.gov/health-information/diabetes/overview/symptoms-causes using limited labeled data?
Overview of GlucoFM, a lightweight dual-stream foundation model for continuous glucose monitoring.
We pre-trained GlucoFM on 109,066 hours of unlabeled CGM data from Wear-CGM [8e73d8] and four published datasets, totaling 477 participant/session records.
CGM recordings can contain gaps, different sampling intervals, and sensor artifacts. GlucoFM aligns each recording to a 24-hour, five-minute grid and retains an observation mask, keeping measured and unobserved positions distinct. Its dual-stream encoder separates a lower-frequency state component, representing slower glycemic trends, from a residual event component capturing short-term deviations that may arise from physiology, behavior, or sensing artifacts.
Rather than reconstructing exact raw glucose readings, which can be affected by measurement noise and sensor artifacts, GlucoFM uses latent predictive pre-training with two complementary tasks:
Finally, CGM-aware augmentations introduce baseline drift, compression-like drops, sparser sampling, and short disconnections, exposing the model to variation and missingness encountered in real CGM recordings.
The model framework and pre-training objectives of GlucoFM.
We evaluated GlucoFM across four cohorts (CGMacros:https://www.nature.com/articles/s41597-025-05851-7, Stanford:https://www.nature.com/articles/s41551-024-01311-6, Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143 and ShanghaiT2DM:https://www.nature.com/articles/s41597-023-01940-7) and seven clinical prediction tasks, alongside a separate assessment of two-hour postprandial glycemic response prediction. Specifically, we asked whether its frozen representations are informative for individual 24-hour windows from unseen participants; whether they provide useful historical context for predicting postprandial glucose trajectories; whether combining multiple days improves subject-level prediction; how well the representations transfer to new cohorts; and how effectively they adapt when labeled data are limited.
First, we used subject-disjoint window-level linear probing:https://carpentries-incubator.github.io/fair-explainable-ml/5c-probes.html. We froze each model’s encoder, trained a linear classifier on individual 24-hour representations, and ensured that no participant appeared in both the training and test folds. This tests whether a single-day representation is phenotype-informative for unseen participants while retaining day-to-day variability.
GlucoFM achieved the strongest task-averaged PR-AUC:https://developers.google.com/machine-learning/glossary/metrics among the evaluated methods. Across 14 cohort–task evaluations, it increased average PR-AUC from 54.7 for the strongest CGM-specific baseline retrained on the same data to 58.8 — an absolute gain of 4.1 points, or approximately 7.5% relative to that baseline. GlucoFM achieved the highest PR-AUC in all diabetes-risk and beta-cell-dysfunction evaluations and in three of four insulin-resistance evaluations.
Metabolic phenotyping linear-probe performance.
To test GlucoFM on a dynamic prediction task, we used information available before each logged meal to predict the complete two-hour glucose-change trajectory relative to the meal-start value. We evaluated 874 paired meal events from 34 participants using subject-disjoint cross-validation:https://en.wikipedia.org/wiki/Cross-validation_(statistics), with Dexcom and Libre (two CGM devices) modeled separately under identical splits.
We progressively combined each frozen model representation with one hour of pre-meal CGM, meal nutrition — including energy, carbohydrate, fat, protein, and dietary fiber — and participant-level information such as fasting glucose, BMI, and diabetes status. With the full context, GlucoFM achieved the lowest mean MAE:https://developers.google.com/machine-learning/glossary/metrics among the evaluated models: 21.88 mg/dL, compared with 22.90 mg/dL for the best baseline and 27.69 mg/dL for the train-fold mean baseline. These results suggest that GlucoFM provides complementary historical context for predicting postprandial glucose changes.
Progressive context improves 2-h full-trajectory postprandial glucose response prediction. Starting from each frozen model representation, inputs are added cumulatively: 1-h pre-meal CGM, meal nutrition, fasting glucose, and BMI plus diabetes status. Mean MAE (mg/dL; lower is better) is averaged across paired Dexcom and Libre evaluations.
A single 24-hour trace may not fully capture a person’s glucose patterns, so we tested whether combining multiple days improves subject-level prediction. GlucoFM encoded each day separately and averaged representations across up to seven days, with each participant contributing equally.
As the chart below shows, additional days improved PR-AUC in most settings across most datasets, including gains of 9.6 points for Stanford:https://www.nature.com/articles/s41551-024-01311-6 beta-cell dysfunction and 14.0 points for Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143 diabetes prediction. CGMacros:https://www.nature.com/articles/s41597-025-05851-7 also showed mostly positive gains across Dexcom, Libre, and fused sensor data. ShanghaiT2DM:https://www.nature.com/articles/s41597-023-01940-7 insulin resistance was the main exception under simple averaging, indicating that the best aggregation strategy can vary by task. Overall, GlucoFM’s frozen daily representations can be combined to strengthen subject-level prediction without retraining the encoder.
Effect of 𝐾-day CGM observation. Positive values indicate improvement over 𝐾 = 1.
Next, we wanted to know if the physiological patterns our model learns can generalize. If we train a downstream classifier to spot diabetes risk using data from one clinical cohort, will it still work on patients from an entirely different study? The cross-dataset transfer bar chart highlights how GlucoFM handles this challenge, specifically plotting its direct improvement over the second-best model for diabetes risk and insulin resistance.
In the chart below, positive bars indicate that GlucoFM outperformed the strongest competing method: it led in 11 of 12 evaluations by 0.5 – 8.6 PR-AUC points and trailed once by 0.6 points. Its absolute PR-AUC ranged from 61.6% for both Stanford:https://www.nature.com/articles/s41551-024-01311-6-to-Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143 tasks to 90.0% for Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143-to-CGMacros:https://www.nature.com/articles/s41597-025-05851-7 insulin resistance, showing that focus on underlying physiology helps the frozen representations look past cohort-specific noise to find universal metabolic patterns.
Cross-dataset transfer performance. ΔPR-AUC between GlucoFM and the strongest baseline.
Labeled clinical data are expensive to obtain, so we also tested GlucoFM under two few-shot settings: the left plot varies the number of labeled participants per class, while the right varies the fraction of observations available from each participant. Moving right adds labeled data, and higher points indicate better task-averaged PR-AUC.
The orange GlucoFM markers are highest at every evaluated data budget, including the most limited settings of one per class and 1% of observations. The advantage is especially clear when labeled subjects are scarce, showing the model is highly efficient at picking up the right signals even with just a handful of examples.
Few-shot adaptation under limited labeled subjects and limited per-subject observations.
We also looked closely at whether splitting the signal into two streams actually made a difference. We compared the full dual-stream design with simpler alternatives: one that processes raw glucose directly, one designed to emphasize slower trends, and one designed to emphasize faster, short-term deviations.
As our encoder design analysis showed, the "event-only" version was the weakest, proving that transient fluctuations alone are not enough for a stable metabolic picture. While the raw-input and "state-only" versions were competitive, the full dual-stream model consistently came out on top. These results support organizing slower and faster glucose dynamics as complementary streams before combining them, rather than relying on either stream alone.
Performance of dual stream vs. single stream designs.
Our results suggest that CGM models can benefit from explicitly accounting for the multiscale structure of glucose dynamics, including slower trends, short-term deviations, daily timing, and sensor missingness. By learning reusable patterns from unlabeled CGM, GlucoFM produced representations that performed strongly across the evaluated prediction, transfer, and few-shot settings, offering a way to make better use of limited labeled clinical data.
Metabolic responses vary across people, cohorts, and sensor devices, while our current pre-training population remains modest. Our next steps are to train on larger and more diverse populations and extend GlucoFM beyond independently processed 24-hour windows toward native multi-day modeling to capture trends that unfold over weeks or months, and explore how these representations handle real-time changes. There is still so much to learn about metabolic health, and we are excited to see where these tools take us next.
The following researchers contributed to this work: Zechen Li, Keerthana Natarajan, Weizhi Zhang, Simon A. Lee, Yuwei Zhang, Maxwell A Xu, Menglian Zhou, Zeinab Esmaeilpour, Flora D. Salim (from the University of New South Wales), Mark Malhotra, Lindsey Sunden, Shwetak Patel, Yuzhe Yang, and Ahmed A. Metwally.
We gratefully acknowledge Bobak J. Mortazavi and Ricardo Gutierrez-Osuna (Texas A&M University) for providing the CGMacros :https://www.nature.com/articles/s41597-025-05851-7 dataset used in this study.
The two Wear-CGM studies were approved by Advarra (IRB nos. Pro00059582 and Pro00069880), and participants provided written informed consent for de-identified secondary research and algorithm development. The published datasets were collected under their respective ethics approvals and consent procedures.
