在四个队列、七项临床预测任务的 14 项评估中,其 PR-AUC 较最优 GluFormer 变体平均高出 5.8 个百分点,并在 PPGR 预测中取得最低 MAE。 模型在 109,066 小时无标注 CGM 数据上预训练,具备跨数据集迁移与少样本适应能力。
Ahmed A. Metwally,谷歌研究部工作人员研究科学家,Zechen Li,学生研究员,谷歌研究部
GlucoFM 是一个轻量级、自监督的 CGM 基础模型,它将较慢的葡萄糖趋势和短期偏差分别建模,生成可迁移的表示,并在各种代谢预测任务中(包括糖尿病风险评估、胰岛素抵抗、β 细胞功能障碍和餐后血糖反应)设定新的性能标准。
消费类可穿戴设备利用运动和生理传感器来估计活动和睡眠,但这些信号只能提供对葡萄糖调节的间接观察。连续血糖监测仪(CGM):https://www.niddk.nih.gov/health-information/diabetes/overview/managing-diabetes/continuous-glucose-monitoring 补充了这些测量方法,通过在皮下插入的小型传感器每几分钟跟踪一次间质葡萄糖:https://my.clevelandclinic.org/health/articles/continuous-glucose-monitoring-cgm#:~:text=What%20is%20interstitial%20fluid%3F,捕捉空腹、夜间及餐后模式。然而,理解这些曲线仍然具有挑战性,尤其是在有助于解释它们的高质量临床标签稀缺且获取成本高的情况下。
许多现有的 CGM 基础模型——包括 CGMformer:https://doi.org/10.1093/nsr/nwaf039、GluFormer:https://www.nature.com/articles/s41586-025-09925-9 和 CGM-JEPA:https://arxiv.org/abs/2605.00933 ——通过单一表示流处理葡萄糖,而不是显式区分慢基线和短期事件动态。但 CGM 并非不可区分的数据流:它包含相对缓慢的基线模式,并被可能反映饮食、活动或传感器伪影的短期偏差打断。如果我们能利用每日 CGM 数据,用有限的标记数据来估计糖尿病风险:https://www.niddk.nih.gov/health-information/diabetes/overview/risk-factors-type-2-diabetes、胰岛素抵抗:https://www.niddk.nih.gov/health-information/diabetes/overview/what-is-diabetes/prediabetes-insulin-resistance 和 β 细胞功能障碍:https://www.niddk.nih.gov/health-information/diabetes/overview/symptoms-causes 会怎么样呢?
GlucoFM 概述——一个用于连续血糖监测的轻量级双流基础模型。
我们在来自 Wear-CGM [8e73d8] 的 109,066 小时未标注 CGM 数据以及四个已发布的数据集上对 GlucoFM 进行了预训练,总计 477 个参与者/会话记录。
CGM 记录可能包含间隙、不同的采样间隔和传感器伪影。GlucoFM 将每条记录对齐到 24 小时、五分钟网格,并保留观察掩码,使测量和未观察的位置保持区分。其双流编码器将低频状态组件(表示较慢的血糖趋势)与残差事件组件(捕获可能由生理、行为或传感伪影引起的短期偏差)分离开来。
GlucoFM 并不重建可能受测量噪声和传感器伪影影响的精确原始血糖值,而是利用潜在预测预训练进行两个互补任务:
最后,CGM 感知的数据增强引入基线漂移、类似压缩的下降、更稀疏的采样和短暂断连,使模型接触到真实 CGM 记录中遇到的变化和缺失情况。
GlucoFM 的模型框架和预训练目标。
我们在四个队列(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 和 ShanghaiT2DM:https://www.nature.com/articles/s41597-023-01940-7)和七个临床预测任务上评估了 GlucoFM,同时对两小时餐后血糖反应预测进行了单独评估。具体来说,我们探讨了其冻结表示是否对未见参与者的单个 24 小时窗口具有信息性;是否为预测餐后血糖轨迹提供有用的历史背景;多天数据结合是否能改善个体水平预测;这些表示在新队列中的迁移能力如何;以及在标注数据有限时,它们的适应效果如何。
首先,我们使用了受试者不重叠的窗口级线性探针:https://carpentries-incubator.github.io/fair-explainable-ml/5c-probes.html。我们冻结了每个模型的编码器,在单个 24 小时表示上训练了线性分类器,并确保没有参与者同时出现在训练集和测试集中。这可以测试单日表示对未见参与者的表型信息是否有用,同时保留每日的变异性。
在所评估的方法中,GlucoFM 实现了最强的任务平均 PR-AUC:https://developers.google.com/machine-learning/glossary/metrics。在 14 个队列-任务评估中,它将最强 CGM 专用基线在相同数据上重新训练的平均 PR-AUC 从 54.7 提升至 58.8 —— 绝对增益为 4.1 点,约为基线的 7.5% 相对增幅。GlucoFM 在所有糖尿病风险和 β 细胞功能异常评估中,以及四个胰岛素抵抗评估中的三个中,实现了最高的 PR-AUC。
代谢表型分析线性探针性能。
为了在动态预测任务中测试 GlucoFM,我们使用每次记录餐前可用的信息来预测相对于餐前起始值的完整两小时血糖变化轨迹。我们评估了来自 34 名参与者的 874 对餐事件,采用受试者不重叠的交叉验证:https://en.wikipedia.org/wiki/Cross-validation_(statistics),Dexcom 和 Libre(两种 CGM 设备)在相同分割下单独建模。
我们逐步将每个冻结模型的表示与餐前一小时的 CGM、餐饮营养信息——包括能量、碳水化合物、脂肪、蛋白质和膳食纤维——以及参与者水平信息如空腹血糖、BMI 和糖尿病状态结合。借助完整的上下文,GlucoFM 在所评估的模型中实现了最低的平均 MAE:https://developers.google.com/machine-learning/glossary/metrics,为 21.88 mg/dL,相比之下,最佳基线为 22.90 mg/dL,训练折均值基线为 27.69 mg/dL。这些结果表明,GlucoFM 为预测餐后血糖变化提供了互补的历史上下文。
渐进式上下文提高了2小时全轨迹餐后血糖反应预测。从每个冻结的模型表示开始,输入逐步累加:餐前1小时CGM、餐饮营养、空腹血糖,以及BMI加糖尿病状态。平均MAE(mg/dL;数值越低越好)在Dexcom和Libre的配对评估中取平均值。
单个24小时血糖轨迹可能无法完全捕捉一个人的血糖模式,因此我们测试了结合多天数据是否能改善个体水平的预测。GlucoFM对每一天分别进行编码,并对多达七天的表示进行平均,每个参与者的贡献相等。
如下面的图表所示,额外的天数在大多数数据集的大多数设置中提高了PR-AUC,包括斯坦福:https://www.nature.com/articles/s41551-024-01311-6 β细胞功能异常预测提升9.6点,以及Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143 糖尿病预测提升14.0点。CGMacros:https://www.nature.com/articles/s41597-025-05851-7 在Dexcom、Libre和融合传感器数据中也显示了大多数正向提升。ShanghaiT2DM:https://www.nature.com/articles/s41597-023-01940-7 胰岛素抵抗在简单平均下是主要例外,这表明最佳聚合策略可能因任务而异。总体而言,GlucoFM冻结的每日表示可以组合以增强个体水平预测,而无需重新训练编码器。
𝐾天CGM观察的效果。正值表示相对于𝐾 = 1的改进。
接下来,我们想知道模型学习的生理模式是否具有泛化能力。如果我们训练下游分类器使用一个临床队列的数据识别糖尿病风险,它在来自完全不同研究的患者上仍能有效吗?跨数据集迁移条形图突出了GlucoFM如何应对这一挑战,特别绘制了其在糖尿病风险和胰岛素抵抗上的相对于第二优模型的直接提升。
下图中,正柱表示GlucoFM表现优于最强竞争方法:在12项评估中,11项领先0.5至8.6个PR-AUC点,并一度落后0.6个百分点。其绝对PR-AUC在斯坦福的任务中均为61.6%:https://www.nature.com/articles/s41551-024-01311-6-to-Hall:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143,而霍尔则为90.0%:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005143-to-CGMacros:https://www.nature.com/articles/s41597-025-05851-7,表明关注潜在生理结构有助于冷冻表征超越群体特异性噪声,找到普遍代谢模式。
跨数据集传输性能。GlucoFM与最强基线之间的ΔPR-AUC。
带标记的临床数据获取成本较高,因此我们也在两种少样本设置下测试了GlucoFM:左图变化每组标记参与者数,右图变化每个参与者可获得的观察比例。向右移动会添加标记数据,点数越高表示任务平均PR-AUC越好。
橙色GlucoFM标记在所有评估数据预算中最高,包括最有限的每类一个标记和1%的观测值。当标记对象稀少时优势尤为明显,显示模型即使在少数样本中也能高效捕捉正确信号。
在有限标签受试者和有限的每个受试者观察下进行少量镜头改编。
我们还仔细研究了将信号分成两条流是否真的产生了差异。我们将完整的双流设计与更简单的替代方案进行了比较:一种直接处理原始葡萄糖,一种强调较慢趋势,另一种强调更快、短期偏离。
正如我们的编码器设计分析所示,“仅事件”版本是最弱的,这证明仅靠短暂波动不足以形成稳定的代谢图景。尽管原始输入和“仅状态”版本表现相当,但完整的双流模型始终表现最好。这些结果支持在合并之前将较慢和较快的葡萄糖动态组织为互补的流,而不是仅依赖任一单一流。
双流设计与单流设计的性能对比。
我们的结果表明,CGM模型可以通过显式考虑葡萄糖动态的多尺度结构获益,包括较慢的趋势、短期偏差、每日时间安排以及传感器缺失情况。通过从未标记的CGM学习可重复使用的模式,GlucoFM生成的表示在评估的预测、迁移和少样本设置中表现出色,为更好地利用有限标记的临床数据提供了一种途径。
代谢反应因人群、群体和传感器设备而异,而我们当前的预训练人群规模仍然有限。我们的下一步是对更大、更具多样性的人群进行训练,并将GlucoFM扩展到超越独立处理的24小时窗口,实现原生多日建模,以捕捉数周或数月展开的趋势,并探索这些表示如何处理实时变化。关于代谢健康还有很多需要学习的内容,我们很期待看到这些工具将我们带向何处。
以下研究人员为本工作做出了贡献:李泽晨、Keerthana Natarajan、张伟志、Simon A. Lee、张宇伟、Maxwell A Xu、周梦莲、Zeinab Esmaeilpour、Flora D. Salim(来自新南威尔士大学)、Mark Malhotra、Lindsey Sunden、Shwetak Patel、杨宇哲,以及Ahmed A. Metwally。
我们衷心感谢Bobak J. Mortazavi和Ricardo Gutierrez-Osuna(德克萨斯农工大学)提供本研究使用的CGMacros数据集:https://www.nature.com/articles/s41597-025-05851-7。
这两项Wear-CGM研究获得了Advarra的批准(IRB编号Pro00059582和Pro00069880),参与者提供了用于去标识二次研究和算法开发的书面知情同意。已发表的数据集均在各自的伦理批准和同意程序下收集。
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.