Ahmed A. Metwally,Google Research 资深研究科学家;Zechen Li,Google Research 学生研究员
GlucoFM 是一个轻量级、自监督的 CGM 基础模型,它在独立的数据流中分别建模较慢的血糖趋势和短期波动,从而产生可迁移的表征,并在多种代谢预测任务中树立了新的性能标杆,这些任务包括糖尿病风险评估、胰岛素抵抗、β细胞功能障碍以及餐后血糖反应。
快速链接
消费级可穿戴设备利用运动和生理传感器来估算活动量和睡眠,但这些信号只能提供对血糖调节的间接观察。持续葡萄糖监测(CGM)通过在皮下植入一个小型传感器,每隔几分钟追踪一次组织间液葡萄糖,从而补充了这些测量,捕捉空腹、夜间和餐后模式。然而,理解这些轨迹仍然具有挑战性,尤其是当有助于解读这些轨迹的高质量临床标签稀少且获取成本高昂时。
许多现有的 CGM 基础模型——包括 CGMformer、GluFormer 和 CGM-JEPA——通过单一表征流来处理血糖数据,而不是明确区分缓慢的基线和瞬态事件动态。但 CGM 并不是一个无差别的数据流:它包含相对缓慢的基线模式,其间穿插着可能反映进餐、活动或传感器伪影的短期波动。如果我们能够利用日常 CGM 数据,在有限标注数据的情况下估算糖尿病风险、胰岛素抵抗和β细胞功能障碍等指标,会怎样呢?
正因如此,我们构建了 GlucoFM——一个自监督基础模型,采用双流设计,将较缓慢的血糖变化趋势与短期波动分离开来,同时保留一天中的时刻信息与缺失情况。随后,潜在预测目标学习其日常背景与时间演变规律。我们在四个多样化队列上、针对七项临床预测任务对 GlucoFM 进行了评估——包括糖尿病风险、胰岛素抵抗、β细胞功能障碍、高脂血症、低血糖、肥胖和血糖类型——共计 14 项“队列-任务”评估。在这些评估中,GlucoFM 的 PR-AUC 平均比表现最佳的 GluFormer 变体高出 5.8 个百分点,且两者均在同一语料库上完成预训练。就 PR-AUC 而言,GlucoFM 在所有糖尿病风险和 β细胞功能障碍评估中均领先,并在四项胰岛素抵抗评估中领先三项。我们还评估了 GlucoFM 在餐后血糖反应(PPGR)预测上的表现。在输入与评估协议匹配的条件下,GlucoFM 在两种 CGM 设备(Dexcom 和 Libre)上取得了最低的平均绝对误差(MAE)。此外,GlucoFM 在跨数据集迁移方面取得了最佳整体表现,并展现出强大的少样本适应能力,即使新队列或带标签受试者的数据极为有限时也是如此。

GlucoFM 概览:一个用于连续血糖监测的轻量级双流基础模型。
训练 GlucoFM 理解代谢
我们在来自 Wear-CGM[1] 和四个已发表数据集的 109,066 小时无标签 CGM 数据上对 GlucoFM 进行了预训练,总计包含 477 条参与者/会话记录。
CGM 记录可能包含间隙、不同的采样间隔和传感器伪影。GlucoFM 将每条记录对齐到 24 小时、五分钟间隔的网格上,并保留一个观测掩码,使已测量位置与未观测位置保持区分。其双流编码器将较低频率的状态分量(代表较缓慢的血糖变化趋势)与残差事件分量(捕捉可能源于生理、行为或传感伪影的短期波动)分离开来。
与其重建可能受测量噪声和传感器伪影影响的原始血糖读数,GlucoFM 采用潜在预测预训练,包含两个互补任务:
- 上下文预测:我们掩码(即隐藏)每日血糖序列的部分内容,并让模型根据周围上下文预测其潜在表示。通过在潜在空间中进行预测,模型能够捕捉更广泛的每日血糖模式,而无需重建每一个传感器读数。
- 时间动态:我们还训练模型预测一个人的稳定基线和短期波动如何从一个小时过渡到下一个小时。这促使模型捕捉血糖动态的连续性特征,而不是将读数视为时间上孤立的快照。
最后,CGM 感知增强引入了基线漂移、类似压迫导致的骤降、更稀疏的采样以及短暂断连,使模型接触到真实 CGM 记录中遇到的变异性和数据缺失情况。

GlucoFM 的模型框架和预训练目标。
GlucoFM 能做什么
我们在四个队列(CGMacros、Stanford、Hall 和 ShanghaiT2DM)以及七项临床预测任务上评估了 GlucoFM,并另外对两小时餐后血糖反应预测进行了单独评估。具体而言,我们考察了其冻结表示是否能为来自未见参与者的单个 24 小时窗口提供有效信息;是否能为预测餐后血糖轨迹提供有用的历史上下文;将多天数据结合是否能改善个体层面的预测;这些表示迁移到新队列的效果如何;以及在标注数据有限时它们的适应能力有多强。
代谢任务上的准确性
首先,我们采用了受试者不相交的窗口级线性探测。我们冻结每个模型的编码器,在单个 24 小时表示上训练线性分类器,并确保任何参与者不会同时出现在训练集和测试集中。这用于检验单日表示是否对未见参与者具有表型信息性,同时保留逐日变异性。
GlucoFM 在所评估的方法中取得了最强的任务平均 PR-AUC。在 14 项队列-任务评估中,它将平均 PR-AUC 从使用相同数据重新训练的最强 CGM 专用基线的 54.7 提升至 58.8——绝对提升 4.1 个点,相对该基线提升约 7.5%。GlucoFM 在所有糖尿病风险和 β 细胞功能障碍评估中均取得最高 PR-AUC,并在四项胰岛素抵抗评估中的三项取得最高值。

代谢表型线性探针性能。
预测餐后血糖反应
为了在动态预测任务上测试 GlucoFM,我们利用每次记录餐前可获取的信息,预测相对于餐始值的完整两小时血糖变化轨迹。我们使用受试者不相交交叉验证评估了来自 34 名参与者的 874 次配对进餐事件,Dexcom 和 Libre(两种 CGM 设备)在相同划分下分别建模。
我们逐步将每个冻结模型表示与餐前一小时 CGM、膳食营养信息(包括能量、碳水化合物、脂肪、蛋白质和膳食纤维)以及参与者级别信息(如空腹血糖、BMI 和糖尿病状态)相结合。在完整上下文下,GlucoFM 在所评估模型中取得了最低的平均 MAE: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,其中斯坦福β细胞功能障碍数据集提升 9.6 个百分点,Hall 糖尿病预测数据集提升 14.0 个百分点。CGMacros 在 Dexcom、Libre 以及融合传感器数据上也大多呈现正向增益。上海 T2DM 胰岛素抵抗是简单平均法下的主要例外,这表明最优聚合策略可能因任务而异。总体而言,GlucoFM 冻结的每日表征可以组合使用,从而在不重新训练编码器的情况下强化受试者级别的预测能力。

𝐾 天 CGM 观测的影响。正值表示相对于 𝐾 = 1 有所提升。
跨越队列分界
接下来,我们想探究模型学到的生理模式是否具备泛化能力。如果我们利用一个临床队列的数据训练下游分类器来识别糖尿病风险,它能否在来自完全不同研究的患者身上依然有效?跨数据集迁移柱状图展示了 GlucoFM 如何应对这一挑战,具体刻画了它在糖尿病风险和胰岛素抵抗任务上相对于次优模型的直接提升幅度。
在下图中,正柱表示 GlucoFM 优于最强的竞品方法:它在 12 项评估中有 11 项领先 0.5–8.6 个 PR-AUC 百分点,仅有一次落后 0.6 个百分点。其绝对 PR-AUC 范围从两项 Stanford-to-Hall 任务的 61.6% 到 Hall-to-CGMacros 胰岛素抵抗任务的 90.0%,这表明对底层生理机制的关注有助于冻结表征穿透队列特有的噪声,找到普遍的代谢模式。

跨数据集迁移性能。GlucoFM 与最强基线之间的 ΔPR-AUC。
用更少的数据学习
标注临床数据获取成本高昂,因此我们还在两种少样本设置下测试了 GlucoFM:左图改变每个类别中已标注参与者的数量,右图改变每位参与者可用观测数据的比例。向右移动表示增加标注数据,更高的点表示任务平均 PR-AUC 更优。
橙色 GlucoFM 标记在每一个评估数据预算下都表现最佳,包括每个类别仅一个样本和仅 1% 观测值的最受限设置。当标注对象稀缺时,这一优势尤为明显,表明该模型即使只有少量示例,也能高效捕捉正确信号。

在标注对象有限且每个对象观测值有限的情况下的少样本适配。
在两个时间尺度上对葡萄糖动态进行建模
我们还仔细研究了将信号拆分为两条流是否真的能带来差异。我们将完整的双流设计与更简单的替代方案进行了比较:一种是直接处理原始葡萄糖的方案,一种是为强调较慢趋势而设计的方案,还有一种是为强调较快、短期偏差而设计的方案。
正如我们的编码器设计分析所示,“仅事件”版本表现最弱,证明仅凭瞬时波动不足以形成稳定的代谢图景。虽然原始输入和“仅状态”版本具有竞争力,但完整的双流模型始终表现最佳。这些结果支持将较慢和较快的葡萄糖动态作为互补流进行组织后再合并,而不是仅依赖其中任何一条流。

双流设计与单流设计的性能对比。
结论
我们的结果表明,CGM 模型可以从显式考虑葡萄糖动态的多尺度结构中获益,包括较慢的趋势、短期偏差、每日时序以及传感器缺失。通过从未标注的 CGM 数据中学习可复用的模式,GlucoFM 生成的表示在评估的预测、迁移和少样本设置中均表现强劲,为更好地利用有限的标注临床数据提供了一条途径。
代谢反应因人、人群和传感器设备而异,而我们目前的预训练人群规模仍然有限。我们的下一步计划是在更大、更多样化的人群上进行训练,并将 GlucoFM 从独立处理的 24 小时窗口扩展为原生多日建模,以捕捉数周或数月内呈现的趋势,同时探索这些表征如何处理实时变化。关于代谢健康,我们仍有太多需要探索的领域,我们也很期待看到这些工具将引领我们走向何方。
致谢
以下研究人员为本研究做出了贡献:Zechen Li、Keerthana Natarajan、Weizhi Zhang、Simon A. Lee、Yuwei Zhang、Maxwell A Xu、Menglian Zhou、Zeinab Esmaeilpour、Flora D. Salim(来自新南威尔士大学)、Mark Malhotra、Lindsey Sunden、Shwetak Patel、Yuzhe Yang 和 Ahmed A. Metwally。
我们衷心感谢 Bobak J. Mortazavi 和 Ricardo Gutierrez-Osuna(德克萨斯 A&M 大学)为本研究提供了 CGMacros 数据集。
- 标签:
- 健康与生物科学
- 机器智能
- 两项 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.
Quick links
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 (CGM) complement these measurements by tracking interstitial glucose 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, GluFormer, and CGM-JEPA — 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, insulin resistance, and beta-cell dysfunction using limited labeled data?
That's why we built GlucoFM, a self-supervised foundation model with a dual-stream design that separates slower glycemic trends from short-term deviations while preserving time-of-day and missingness. Latent-prediction objectives then learn their daily context and temporal evolution. We evaluated GlucoFM across four diverse cohorts on seven clinical prediction tasks — diabetes risk, insulin resistance, beta-cell dysfunction, hyperlipidemia, hypoglycemia, obesity, and glucotype — comprising 14 cohort–task evaluations. Across these evaluations, GlucoFM’s PR-AUC was 5.8 percentage points higher on average than that of the best-performing GluFormer variant evaluated, with both pre-trained on the same corpus. On PR-AUC, GlucoFM led all diabetes-risk and beta-cell-dysfunction evaluations and three of four insulin-resistance evaluations. We also evaluated GlucoFM onpostprandial glycemic response (PPGR) forecasting. Under matched inputs and evaluation protocols, GlucoFM achieved the lowest mean absolute error (MAE), averaged across two CGM devices (Dexcom and Libre). Moreover, GlucoFM achieved the best overall cross-dataset transfer performance and demonstrated strong few-shot adaptation, even when data from a new cohort or labeled subjects are extremely limited.

Overview of GlucoFM, a lightweight dual-stream foundation model for continuous glucose monitoring.
Training GlucoFM to understand metabolism
We pre-trained GlucoFM on 109,066 hours of unlabeled CGM data from Wear-CGM[1] 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:
- Contextual prediction: We mask (i.e., hide) parts of a daily glucose sequence and ask the model to predict their latent representations from the surrounding context. By predicting in latent space, the model captures broader daily glucose patterns without having to reconstruct every sensor reading.
- Temporal dynamics: We also train the model to predict how a person's steady baseline and short-term deviations will shift from one hour to the next. This encourages it to capture the continuous nature of glucose dynamics rather than treating readings as isolated snapshots in time.
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.
What GlucoFM can do
We evaluated GlucoFM across four cohorts (CGMacros, Stanford, Hall and ShanghaiT2DM) 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.
Accuracy across metabolic tasks
First, we used subject-disjoint window-level linear probing. 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 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.
Predicting postprandial glycemic responses
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, 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 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.
Looking beyond a single day
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 beta-cell dysfunction and 14.0 points for Hall diabetes prediction. CGMacros also showed mostly positive gains across Dexcom, Libre, and fused sensor data. ShanghaiT2DM 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.
Crossing the cohort divide
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-to-Hall tasks to 90.0% for Hall-to-CGMacros 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.
Learning with less data
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.
Modeling glucose dynamics at two timescales
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.
Conclusion
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.
Acknowledgements
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 theCGMacrosdataset 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.