GlucoFM: A Dual-Stream Foundation Model for Continuous Glucose Monitoring

Zechen Li, Keerthana Natarajan, Weizhi Zhang, Menglian Zhou, Simon A. Lee, Yuwei Zhang, Maxwell A Xu, Zeinab Esmaeilpour, Flora D. Salim, Mark Malhotra, Lindsey Sunden, Shwetak Patel, Yuzhe Yang, Ahmed MetwallyNeurIPS 2026

TL;DR

Blood sugar curves are messy, multi-layered signals where slow circadian rhythms collide with sudden meal spikes and sensor glitches. GlucoFM is a tiny (0.72M-parameter) foundation model for Continuous Glucose Monitoring (CGM) that explicitly untangles these dynamics into two separate streams—slow metabolic states and fast transient events—before learning from them. Pretrained on over 109,000 hours of unlabeled glucose data, its frozen representations outperform much larger models at both diagnosing metabolic conditions (like insulin resistance) and predicting how an individual's blood sugar will spike after a meal.

What Problem Does This Paper Address?

Continuous Glucose Monitors (CGMs) give us a high-definition movie of human metabolism, capturing everything from overnight fasting baselines to post-lunch sugar rushes. While these signals hold clues to early diabetes risk, insulin resistance, and $\beta$-cell dysfunction, getting high-quality clinical labels is expensive and rare. Self-supervised foundation models—trained on vast amounts of unlabeled sensor traces—offer an obvious way forward.

However, existing time-series and CGM foundation models usually treat glucose traces as a single, entangled sequence. Physiologically, glucose operates on multiple timescales simultaneously: slow-moving baselines coexist with rapid fluctuations triggered by food, exercise, or stress. Furthermore, real-world sensors are messy—they sample at different rates (5 vs. 15 minutes), drift over time, and suffer from compression artifacts (like rolling onto a sensor while sleeping) or physical dropouts. Simply interpolating missing values and reconstructing raw numbers forces a model to memorize sensor noise rather than underlying human physiology.

Figure 1: Overview of GlucoFM, a lightweight foundation model for continuous glucose monitoring.

Methods

GlucoFM tackles these challenges with a sensing-aware, dual-stream architecture (~0.72M trainable parameters) built around four core design choices:

  • Mask-Preserving Chronological Alignment: Instead of interpolating missing data, irregular recordings are snapped to a fixed 24-hour grid (288 five-minute slots) anchored to the actual time of day, paired with a binary observation mask tracking which readings were physically measured.
  • CGM-Aware Augmentations: During pretraining, the authors inject realistic sensor quirks on the fly—simulating baseline wander, sleep-compression drops, sensor disconnections, and downsampling 5-minute traces to mimic 15-minute devices.
  • Dual-Stream State–Event Decomposition: Using a learnable, mask-aware causal Gaussian filter, GlucoFM splits the daily trace into a low-frequency State stream (slow glycemic trends over 10–60 minutes) and a high-frequency Event residual stream (rapid deviations and rates of change). Both streams are broken into 24 one-hour patches, tagged with circular time-of-day encodings, and fused via a compact 3-layer Transformer.
  • Latent Predictive Pretraining (JEPA-style): Rather than reconstructing noisy raw glucose values, GlucoFM predicts representations in latent space using an Exponential Moving Average (EMA) target network. It combines two objectives: Masked Contextual Representation Learning (predicting 50–60% masked hourly patches from surrounding daily context) and Temporal Dynamics Modeling (explicitly predicting the next hour's state and event tokens from the current ones).
Figure 2: Model framework and pretraining objectives of GlucoFM.

Datasets

The authors strictly separate subjects between pretraining and downstream testing—no new benchmarks are introduced, though existing cohorts are standardized into a rigorous subject-disjoint evaluation suite:

  • Pretraining (109,066 hours, 477 subjects): Aggregated from five cohorts spanning 5-minute and 15-minute sampling rates: Wear-CGM, ShanghaiT2DM, Stanford, BIG IDEAs, and Colas.
  • Downstream Evaluation (71,669 hours, 203 subjects): Evaluated across four cohorts (CGMacros, ShanghaiT2DM, Stanford, and Hall) covering seven clinical phenotyping tasks (diabetes risk, insulin resistance, $\beta$-cell dysfunction, glucotype, hyperlipidemia, hypoglycemia, and obesity), plus paired Dexcom/Libre meal-response forecasting on CGMacros.

Key Insights and Ideas

  • Inductive bias beats parameter count: At 0.72M parameters, GlucoFM outperforms general time-series models up to 500x its size (like 385M-parameter MOMENT and 135M-parameter GluFormer-base). Even when trained on just 20% of the pretraining corpus, GlucoFM matches baseline CGM foundation models trained on 100% of the data.
  • True timescale separation: Probing the frozen tokens before fusion proves the dual streams do what they claim: state tokens capture hourly glucose levels ($R^2 = 0.962$ vs. $0.401$ for event tokens), while event tokens better capture 5-minute rapid changes ($R^2 = 0.888$ vs. $0.832$). Combining both beats single-stream ablations.
  • Interpolation hurts: Ablations show that filling in missing data with dense interpolation underperforms GlucoFM's mask-aware approach—confirming that knowing when data is missing is preferable to guessing values.
  • One frozen encoder, two distinct clinical worlds: Without any encoder fine-tuning, the exact same daily representation supports both static, person-level metabolic screening and dynamic, meal-by-meal glucose trajectory forecasting.

Key Results

  • Subject-Disjoint Linear Probing: Across 14 dataset–task pairs, a simple logistic regression classifier on frozen GlucoFM embeddings achieves the highest average PR-AUC (58.8%), ROC-AUC (66.7%), and Macro-F1 (59.9%). It beats the strongest retrained CGM baseline (CGM-JEPA) by +4.11 PR-AUC points and externally pretrained CGMformer (trained on nearly twice as many subjects) by +4.74 points.
  • Postprandial Glycemic Response (PPGR): Predicting 2-hour blood sugar curves after 874 logged meals (combining frozen 24h pre-meal embeddings with 1h recent CGM, meal nutrition, fasting glucose, BMI, and diabetes status), GlucoFM achieves the lowest Mean Absolute Error across all four metrics—trajectory (21.88 mg/dL), positive incremental area under the curve, peak rise, and peak timing—reducing errors by 2.2% to 5.8% over CGM-JEPA.
  • Transfer & Few-Shot Learning: In zero-retraining cross-cohort transfer (training a linear probe on one dataset and testing on another), GlucoFM ranks first on 21 of 24 evaluations. It also leads across all few-shot regimes, even with just 1–2 labeled subjects per class or 1% of a subject's daily windows.

Limitations and Future Work

The authors note that their pretraining dataset (477 subjects) is still relatively modest and has fewer real 15-minute FreeStyle Libre recordings, which likely explains why GlucoFM did not lead on the Libre-based ShanghaiT2DM cohort. Additionally, GlucoFM processes 24-hour windows independently; while averaging embeddings across multiple days boosts accuracy, the model lacks native multi-day or multi-week context. Finally, GlucoFM is strictly a retrospective research prototype—not a cleared medical device—and future work aims to scale up device diversity, model multi-day longitudinal trajectories natively, and handle messy free-living prediction where meal times, insulin doses, and exercise aren't neatly logged.

Summary updated

Abstract

Continuous glucose monitoring (CGM) provides a dense view of daily metabolic physiology, yet existing generic time-series and CGM-specific foundation models often encode glucose traces as entangled single-stream sequences, leaving their multiscale temporal structure only implicitly modeled. We present GlucoFM, a lightweight CGM foundation model that aligns irregular recordings to a 24-hour chronological grid, preserves observation masks, and decomposes glucose dynamics into slow-varying glycemic trend and short-term deviation streams. GlucoFM is pretrained on 109,066 hours of unlabeled CGM recordings from 477 subjects with masked contextual latent prediction over fused daily representations and temporal dynamics prediction over the two streams. Across four diverse cohorts and seven phenotype-classification tasks, GlucoFM achieves the strongest subject-disjoint linear-probing performance among evaluated baselines, improving average PR-AUC by 4.1 points over the best CGM-specific foundation model, while also supporting strong cross-dataset transfer and few-shot adaptation. Beyond phenotyping, when combined with recent CGM, meal nutrition, and subject context, the same frozen encoder achieves the lowest two-hour postprandial glycemic response errors among evaluated methods for trajectory, incremental area under the curve, peak rise, and peak timing. Together, these results demonstrate that GlucoFM learns reusable frozen CGM representations spanning metabolic phenotyping and context-conditioned glucose-response prediction.
BibTeX
@inproceedings{li2026glucofm,
  author = {Zechen Li and Keerthana Natarajan and Weizhi Zhang and Menglian Zhou and Simon A. Lee and Yuwei Zhang and Maxwell A Xu and Zeinab Esmaeilpour and Flora D. Salim and Mark Malhotra and Lindsey Sunden and Shwetak Patel and Yuzhe Yang and Ahmed Metwally},
  title = {{GlucoFM: A Dual-Stream Foundation Model for Continuous Glucose Monitoring}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=SxWZ7KJ3KP},
}

Loading related content...

Figure