Source-linked AI summary
CGM-JEPA: Learning Consistent Continuous Glucose Monitor Representations via Predictive Self-Supervised Pretraining
Hada Melino Muhammad, Zechen Li, Flora Salim, Ahmed A. Metwally
TL;DR
CGM subphenotype prediction needs representations that remain reliable across physiological views, cohorts, and deployment settings. CGM-JEPA predicts masked latent representations, while X-CGM-JEPA adds cross-view Glucodensity prediction; X-CGM-JEPA ranks first or second on AUROC across all three regimes, unlike the baselines.
Problem
Single-view CGM representations and existing baselines transfer inconsistently across modality, setting, and cohort shifts.
Method
CGM-JEPA predicts masked temporal representations in latent space, and X-CGM-JEPA adds masked cross-view Glucodensity prediction.
Results
X-CGM-JEPA ranks first or second on AUROC for both endpoints across all three regimes, while every baseline ranks third or worse in at least one cell.
Takeaways & Limitations
Cross-view guidance provides its clearest benefits under clinically relevant distribution shifts, particularly venous-supervised deployment using wearable CGM.
Takeaways & Limitations
Experiments remain tied to a specific data-collection pipeline and sensor modality, so additional real-world shifts may not be represented.
Abstract
from arXiv · showhide
Continuous Glucose Monitoring (CGM) can detect early metabolic subphenotypes (insulin resistance, IR; $β$-cell dysfunction), but population-scale deployment faces two coupled problems. First, the same physiological state appears through multiple views (CGM time series, venous OGTT, Glucodensity summaries), so single-view representations fail to transfer when deployment shifts the modality or setting. Second, baselines perform inconsistently across these shifts. Both problems point to one remedy: representations that abstract away from any single view to capture higher-level temporal and distributional structure. We propose CGM-JEPA, a self-supervised pretraining framework which predicts masked latent representations rather than raw values, yielding abstraction that transfers across modalities. X-CGM-JEPA adds a masked Glucodensity cross-view objective for complementary distributional information. We pretrain on $\sim$389k unlabeled CGM readings from 228 subjects and evaluate on two clinical cohorts ($N=27$ and $N=17$ public-release subsets) across three regimes (cohort generalization, venous-to-CGM transfer, home CGM) under 20-iteration $\times$ 2-fold cross-validation. X-CGM-JEPA ranks first or second on AUROC for both endpoints across all three regimes while no baseline does, exceeding the strongest baseline by up to $+6.5$ pp in cohort generalization and $+3.6$ pp in venous-to-CGM transfer (paired Wilcoxon, $p<0.001$). Under modality shift, it matches mean AUROC while redistributing toward weaker subgroups (ethnicity AUROC gap shrinks 25-54%); on sparse in-domain venous data, the distributional view lifts label-aware clustering (ARI $+39\%$, NMI $+40\%$). Code and weights: https://github.com/cruiseresearchgroup/CGM-JEPA
1. Introduction
CGM-JEPA addresses modality, setting, and cohort shifts by learning representations that capture invariant temporal and distributional structure rather than view-specific signal. Its cross-view extension, X-CGM-JEPA, is evaluated across clinically motivated deployment regimes and consistently ranks among the strongest methods.
- Motivation: CGM subphenotype prediction faces coupled multi-view and consistency problems under modality, setting, and cohort shifts.The same physiological state appears through CGM time series, sparse venous OGTT measurements, and Glucodensity summaries, while methods perform inconsistently across shifts.
- Motivation: View-invariant representations should abstract away from specific modalities and settings to capture higher-level temporal and distributional structure.This motivates moving beyond handcrafted single-view features that may be unstable under cohort and setting shifts.
- Evaluation: The study evaluates insulin resistance and β-cell dysfunction across cohort generalization, venous-to-CGM transfer, and real-world home CGM.The protocol uses two cohorts with complementary modality availability and 20-iteration × 2-fold subject-level cross-validation.
- Method: CGM-JEPA predicts masked temporal representations in latent space rather than reconstructing raw glucose values.The JEPA-style objective is designed to encourage abstraction that survives view changes instead of memorizing surface signal properties.
- Results: X-CGM-JEPA ranks first or second on AUROC for both endpoints across all three evaluation regimes, while no baseline remains in the top three throughout.Baselines span classical unsupervised projection, CGM-specific foundation models, and modern time-series foundation models.
2. Results
Across endpoint–regime evaluations, the JEPA family provides the most consistent performance, with X-CGM-JEPA usually ranking first or second and baselines showing isolated failures. Its cross-view objective is especially valuable under transfer and sparse venous data, improving stability and label-aware structure.
- Overall results: X-CGM-JEPA ranks first or second on AUROC in every endpoint–regime cell, while every baseline ranks third or worse in at least one cell.Across 108 paired comparisons, CGM-JEPA wins 101/108 and X-CGM-JEPA wins 103/108, with paired Wilcoxon p<0.001 for both.
- Venous-to-CGM transfer: +3.6 pp AUROC, +2.2 pp F1, and +4.0 pp PRAUC are the JEPA family’s gains over MOMENTSmall for insulin-resistance venous-to-CGM transfer.CGM-JEPA achieves the best AUROC (0.866), while X-CGM-JEPA achieves the best F1 (0.689) and tied-best PRAUC (0.892); the family has the lowest AUROC standard deviations in this cell.
- Cohort generalization: +6.5 pp AUROC is the JEPA family’s largest cohort-generalization gain over PCA, alongside +4.6 pp F1 and +3.7 pp PRAUC for β-cell dysfunction.X-CGM-JEPA is best on AUROC (0.855) and F1 (0.664), while CGM-JEPA is best on PRAUC.
- Representation structure: ARI 0.288 and NMI 0.249 for X-CGM-JEPA exceed CGM-JEPA’s ARI 0.208 and NMI 0.17 on the sparse Initial-cohort venous block.The cross-view objective contributes label-aligned structure precisely where the temporal view is data-thin, while the JEPA family remains geometrically stronger than baselines across cohort–modality blocks.
- Temporal localization: Divergence peaks at P1 (50–105 min) for insulin resistance but at P2 (110–165 min) for β-cell dysfunction across both encoders.These endpoint-specific windows indicate that the encoders extract label-relevant signal from clinically interpretable temporal regions.
4. Discussion
CGM-JEPA produces label-efficient representations, while X-CGM-JEPA provides the most consistent benefits under clinically relevant distribution shifts, especially venous-supervised wearable-CGM deployment. The study’s benchmark is high quality but limited by costly, invasive OGTT-based data, motivating richer signals, larger cohorts, and uncertainty-aware deployment.
- Limitations: The benchmark combines gold-standard venous OGTT sample collection with condition labels for insulin resistance and β-cell dysfunction, but such data are costly and invasive.These high-fidelity labels are rarely available at scale.
- Conclusion: X-CGM-JEPA provides the most consistent benefits under clinically relevant distribution shifts, particularly when venous supervision transfers to wearable CGM.CGM-JEPA uses predictive self-supervised pretraining for day-level CGM windows, while X-CGM-JEPA adds an auxiliary cross-view Glucodensity prediction objective.
- Conclusion: In-domain home CGM evaluation shows limited headroom over strong baselines, indicating that cross-view guidance primarily improves transferability rather than in-domain accuracy.
- Conclusion: Predictive self-supervision extracts clinically meaningful structure from consumer-grade CGM despite scarce gold-standard labels.
- Conclusion: Future work will extend cross-view objectives to richer physiological signals and larger cohorts while investigating uncertainty-aware deployment for individualized metabolic risk assessment.
Methods · M.2. Related Work
Related work spans supervised CGM-based prediction, functional glucodensity representations, self-supervised CGM modeling, and general time-series foundation models. These approaches respectively emphasize clinical subphenotype inference, distributional glucose dynamics, point-wise or individualized representations, and cross-domain transferability.
- M.2. Related Work: Supervised CGM features have been used to infer insulin resistance and β-cell dysfunction alongside gold-standard venous glucose measurements.The cited approach is clinically meaningful but relies on fully supervised learning and access to high-quality labels.
- M.2. Related Work: These supervised approaches require fully supervised learning and high-quality venous glucose measurements.
- M.2. Related Work: Glucodensity methods represent glucose trajectories through distributional profiles, capturing statistical structure over time rather than point-wise values.
- M.2. Related Work: Empirical evidence suggests glucodensity functional profiles can outperform traditional CGM metrics in downstream characterization.
- M.2. Related Work: GluFormer pretrains CGM models with autoregressive and reconstruction-style objectives that emphasize point-wise signal fidelity and short-term glucose dynamics.
- M.2. Related Work: CGMformer uses large-scale CGM pretraining to learn individualized glucose representations and reports improved downstream performance.
- M.2. Related Work: Time-series foundation models such as MOMENT, Mantis, TimesFM, and Chronos use large, multi-domain pretraining to support transferable downstream representations or forecasting.
M.3. Methodology · M.3.1. Problem Setup
The problem setup treats CGM representation learning as encoding subject-level glucose windows into fixed-dimensional embeddings for predicting insulin resistance and β-cell dysfunction with limited labels. The framework includes CGM-JEPA’s masked latent-prediction objective and X-CGM-JEPA’s auxiliary masked Glucodensity cross-view objective.
- M.3.1. Problem Setup: Each subject i is represented by a CGM time series X_i of glucose measurements g_it recorded across timestamps.
- M.3.1. Problem Setup: The encoder f_θ maps each CGM window X_i to a fixed-dimensional embedding z_i ∈ R^d.
- M.3.1. Problem Setup: A lightweight classifier h_ϕ uses the learned embedding to predict two binary metabolic outcomes under limited supervision.The outcomes are insulin resistance and β-cell dysfunction.
- M.3.1. Problem Setup: The target outcomes are insulin resistance and β-cell dysfunction, available as gold-standard metabolic labels for a subset of subjects.
- M.3. Methodology: CGM-JEPA learns representations by predicting masked CGM patch embeddings from visible context.
- M.3. Methodology: X-CGM-JEPA adds an auxiliary cross-view objective that predicts a masked Glucodensity embedding derived from the same day window.
M.3.2. CGM Windowing and Tokenization
CGM streams are divided into daily 5-minute windows and represented as hourly, non-overlapping patches. This patchified format standardizes temporal resolution and enables patch-level masking for predictive pretraining.
- Each CGM stream is segmented into daily windows containing 288 samples at 5-minute intervals.
- Each day is tokenized into P = 24 non-overlapping hourly patches, each containing 12 samples.
- The patchified representation standardizes temporal resolution and supports patch-level masking for predictive pretraining.
M.3.3. Predictive Pretraining on CGM: CGM-JEPA
CGM-JEPA is a JEPA-style predictive representation learner tailored to continuous glucose monitoring. It predicts masked latent representations from visible context instead of reconstructing raw glucose values, encouraging higher-level temporal structure.
- CGM-JEPA introduces a JEPA-style predictive representation learner tailored to CGM.
- Instead of reconstructing raw glucose values, it predicts masked patch representations from visible context.
- This masked representation prediction encourages the encoder to capture higher-level temporal structure.
M.3.3.1. Masked context–target construction.
The method masks patches from tokenized CGM days, encodes visible context and masked targets separately, and predicts target representations for the masked indices. Training minimizes an ℓ1 regression loss with gradients stopped on the target branch, enabling pretraining on unlabeled home CGM.
- Masked context–target construction: A patch mask M selects masked indices, while the context view retains only visible patches and the target view contains the masked patches.The input day is tokenized as x ∈ ℝ^P×12.
- Masked context–target construction: The context encoder f_θ encodes visible patches, whereas the target encoder f̄_θ encodes target representations z^(t)_j for j ∈ M.Target representations are defined over the masked indices used for prediction.
- Masked context–target construction: A predictor p_ϕ maps the context embedding to predicted representations corresponding to the masked indices.These predictions are compared with the target representations rather than raw CGM values.
- Masked context–target construction: The objective minimizes an ℓ1 (MAE) regression loss over masked patches while stopping gradients on the target branch.This predictive self-supervised objective can be trained using abundant unlabeled home CGM.
M.3.4. Cross-view Regularization: X-CGM-JEPA
X-CGM-JEPA extends CGM-JEPA beyond temporal trajectory structure by modeling clinically meaningful distributional patterns in CGM windows. It uses an auxiliary Glucodensity-based cross-view prediction objective to capture complementary structure under modality or setting shifts.
- CGM-JEPA focuses on temporal structure in the one-dimensional CGM trajectory.
- CGM windows exhibit clinically meaningful distributional patterns, including variability and density over time.
- X-CGM-JEPA augments CGM-JEPA with an auxiliary cross-view prediction objective based on a Glucodensity representation.The objective is designed to capture complementary distributional structure, especially under modality or setting shifts.
M.3.4.1. Glucodensity view. … M.6. Societal Impact
X-CGM-JEPA augments masked latent prediction with a masked Glucodensity cross-view objective, then evaluates frozen CGM representations with linear probes across clinical, cross-modality, and home-CGM settings. The study uses pooled public CGM data and emphasizes reproducibility, while noting that the prototype is not clinically validated and remains limited in cohort, device, label, and population breadth.
- M.3.4.1. Glucodensity view.: Glucodensity deterministically summarizes daily glucose dynamics, is patchified and masked, and provides an auxiliary distributional view for cross-view prediction.The representation captures joint structure among glucose level, velocity, and acceleration through KDE-based summaries.
- M.3.4.2. Asymmetric cross-view prediction.: X-CGM-JEPA predicts masked Glucodensity embeddings from CGM context, allows gradients into the Glucodensity encoder, and combines this loss with the CGM predictive loss using λ=1.Masking mitigates shortcuts from full-window summaries, while the CGM target branch remains stop-gradiented and the Glucodensity branch is jointly learned.
- M.4. Dataset Overview: 389k rows from 22 Stanford and 206 Colas subjects form the unlabeled pretraining stream, segmented into 24-hour windows and 24 hourly patches.The merged corpus contains 413 subject-days and approximately 389,365 five-minute readings; Glucodensity tensors are precomputed and cached.
- M.4.2. Downstream Datasets: Two labeled Stanford cohorts contain n=27 venous-only subjects and n=17 subjects with paired venous and home-CGM measurements for IR and β-cell dysfunction.The three pipelines are in-clinic venous, venous-to-home-CGM cross-modality transfer, and in-domain home CGM.
- M.4.3. Sampling Rates and Preprocessing: All streams are aligned to 39 five-minute positions and smoothed, although venous OGTT is sparse while CGM is natively five-minute aligned.Venous traces typically contain approximately 9 observed points and 30 sentinel-filled positions, whereas CGM has nearly all positions observed.
- M.6. Societal Impact: The work uses publicly released, de-identified data and size-matched SSL and frozen TSFM baselines, but CGM-JEPA remains a non-diagnostic prototype limited to two cohorts, one device, two labels, and small subgroup samples.The authors call for broader devices, longer windows, additional outcomes, and more diverse populations, and caution against medical use without regulatory approval and re-evaluation.
- M.5.1. Model Architecture: The lightweight Transformer uses 12-sample hourly patches, while pretraining masks 25% of patches with Adam at learning rate 10^-4 for 100 epochs.The target encoder is updated by EMA, and downstream embeddings are obtained by freezing the encoder and mean-pooling patch tokens.