
After studying this material, you should be able to:
A Continuous Glucose Monitor (CGM) is a small sensor inserted under the skin that measures glucose levels in interstitial fluid every few minutes, 24 hours a day.
Think of it like a weather station for your body โ instead of temperature every hour, it records blood sugar every 5 minutes.
| Pattern Type | Example |
|---|---|
| Fasting glucose | Overnight baseline levels |
| Post-meal spikes | Sharp rise after eating carbohydrates |
| Activity response | Drop during exercise |
| Sensor artifacts | Noise, gaps, compression drops |
Raw CGM Data
โ
Thousands of data points per day
โ
Sparse, expensive clinical labels
โ
How do we extract meaningful health insights?
Key Insight: Getting clinical labels (e.g., "this person has insulin resistance") requires expensive lab tests and doctor visits. CGM data itself is abundant, but labels are scarce.
Previous CGM models like CGMformer, GluFormer, and CGM-JEPA treated glucose as a single undifferentiated data stream.
The problem with this approach:
Single Stream Model sees:
[flat baseline] + [meal spike] + [exercise dip] + [sensor noise]
โ
All treated the same way
โ
Important physiological signals get mixed with noise
CGM data actually has two distinct types of signals:
| Signal Type | Description | Example |
|---|---|---|
| Slow/Baseline trends | Gradual changes over hours | Overnight fasting pattern |
| Short-term deviations | Rapid fluctuations | Post-meal glucose spike |
Mixing these together is like trying to understand both the tide (slow) and waves (fast) in the ocean by looking at only one combined measurement.
GlucoFM separates the two signal types into two parallel processing streams:
Raw CGM Signal (5-min intervals, 24-hour grid)
โ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Preprocessing โ
โ โข Align to 24h grid โ
โ โข Mark missing data โ
โ โข Keep observation โ
โ mask โ
โโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DUAL-STREAM ENCODER โ
โ โ
โ Stream 1: STATE (slow trends) โ
โ โ Captures baseline glucose level โ
โ โ Fasting patterns, daily rhythms โ
โ โ
โ Stream 2: EVENT (fast deviations) โ
โ โ Captures short-term changes โ
โ โ Meal spikes, activity dips โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ
Combined Representation
โ
Downstream Tasks
CGM recordings often have gaps due to:
GlucoFM keeps track of where data is missing rather than ignoring it. This is important because missingness itself can be informative (e.g., a person removed their sensor during a specific activity).
Instead of needing expensive labels, the model learns from the structure of the data itself.
Analogy: Imagine learning to read by predicting the next word in a sentence, without anyone telling you what words mean. You learn language patterns from context alone.
Objective 1: Daily Context Learning
Given: Parts of a 24-hour glucose trace
Task: Predict the latent representation of missing parts
Goal: Learn what a "normal day" looks like for different people
Objective 2: Temporal Evolution Learning
Given: Previous days' glucose patterns
Task: Predict how patterns evolve over time
Goal: Learn how glucose behavior changes day-to-day
Important: GlucoFM predicts latent representations (abstract patterns), NOT raw glucose values. This makes it more robust to sensor noise.
During training, the model is exposed to artificial variations that mimic real-world CGM problems:
| Augmentation | What It Simulates |
|---|---|
| Baseline drift | Sensor calibration shifts |
| Compression drops | Sensor pressed against body |
| Sparser sampling | Missed readings |
| Short disconnections | Sensor removal |
GlucoFM was tested on data from four independent studies:
This diversity is crucial โ a model that only works on one population is not clinically useful.
Metabolic Health Tasks:
โโโ Diabetes Risk
โโโ Insulin Resistance
โโโ Beta-Cell Dysfunction
โโโ Hyperlipidemia (high cholesterol)
โโโ Hypoglycemia (low blood sugar episodes)
โโโ Obesity
โโโ Glucotype (glucose response pattern)
PR-AUC = Precision-Recall Area Under the Curve
Why not just use accuracy? If only 5% of people have a condition, a model that always says "no" gets 95% accuracy but is useless. PR-AUC captures performance on the rare positive cases.
| Model | Average PR-AUC |
|---|---|
| Best previous baseline | 54.7% |
| GlucoFM | 58.8% |
| Improvement | +4.1 points (~7.5% relative gain) |
GlucoFM led in:
When predicting the 2-hour glucose trajectory after a meal:
Train-fold mean baseline: 27.69 mg/dL error
Best previous model: 22.90 mg/dL error
GlucoFM: 21.88 mg/dL error โ Best
Adding more context progressively improved predictions:
Frozen representation
+ 1-hour pre-meal CGM
+ Meal nutrition (carbs, fat, protein, fiber)
+ Fasting glucose
+ BMI + diabetes status
โ
Best performance
Using multiple days of CGM data improved predictions:
| Task | Improvement with 7 days vs. 1 day |
|---|---|
| Stanford beta-cell dysfunction | +9.6 PR-AUC points |
| Hall diabetes prediction | +14.0 PR-AUC points |
Why? A single day might be atypical. Multiple days reveal consistent patterns.
When training on one cohort and testing on another:
GlucoFM outperformed the best competing model in:
11 out of 12 cross-dataset evaluations
by 0.5 to 8.6 PR-AUC points
This means GlucoFM learns universal metabolic patterns, not just cohort-specific quirks.
With very limited labeled data:
Even with just 1 labeled example per class...
GlucoFM still outperformed all other models
This is critical for healthcare, where labeled data is expensive and rare.
An ablation study removes parts of a model to test their contribution.
| Model Variant | Description | Performance |
|---|---|---|
| Event-only | Only short-term deviations | Weakest |
| Raw-input | No stream separation | Competitive |
| State-only | Only slow trends | Competitive |
| Full dual-stream | Both streams combined | Best |
Short-term deviations alone โ Not enough (too noisy)
Slow trends alone โ Good but incomplete
Both together โ Best performance
This validates the core design hypothesis: glucose dynamics are multiscale, and both scales matter.
Traditional approach:
Patient โ Expensive lab tests โ Clinical diagnosis
(Requires blood draws, doctor visits, weeks of waiting)
GlucoFM approach:
Patient wears CGM โ AI analyzes patterns โ Early risk signals
(Continuous, non-invasive, scalable)
| Current Limitation | Future Direction |
|---|---|
| Modest pre-training population | Train on larger, more diverse populations |
| Independent 24-hour windows | Native multi-day modeling |
| Static representations | Real-time adaptation |
1. CGM DATA IS MULTISCALE
โ Slow trends + fast deviations require separate treatment
2. SELF-SUPERVISED LEARNING
โ Learn from unlabeled data using prediction tasks
3. DUAL-STREAM ARCHITECTURE
โ State stream (slow) + Event stream (fast) = Better representations
4. LATENT PREDICTION > RAW RECONSTRUCTION
โ More robust to sensor noise and artifacts
5. TRANSFERABILITY IS KEY
โ Good representations work across cohorts and tasks
6. FEW-SHOT EFFICIENCY
โ Strong performance even with minimal labeled data