CGM-JEPA-Downstream / README.md
hadamelino's picture
Add paper link, GitHub repository, and update metadata (#1)
a8312f6
|
Raw
History Blame Contribute Delete
8.54 kB
metadata
language:
  - en
license: mit
size_categories:
  - n<1K
task_categories:
  - time-series-forecasting
  - tabular-classification
  - feature-extraction
task_ids:
  - tabular-multi-class-classification
pretty_name: CGM-JEPA Downstream Evaluation Splits
modalities:
  - Time Series
  - Tabular
tags:
  - continuous-glucose-monitor
  - cgm
  - insulin-resistance
  - beta-cell-dysfunction
  - metabolic-subphenotype
  - ogtt
  - healthcare
  - time-series
  - subject-level-classification
configs:
  - config_name: default
    data_files:
      - split: train
        path: train.parquet
      - split: validation
        path: validation.parquet

CGM-JEPA Downstream Evaluation Splits

Paper | Code

Labeled cohort splits used to evaluate CGM encoders on two binary metabolic outcomes — insulin resistance and β-cell dysfunction — in the paper CGM-JEPA: Learning Consistent Continuous Glucose Monitor Representations via Predictive Self-Supervised Pretraining.

Downstream-only. For the unlabeled pretraining corpus (Stanford + Colas), see CRUISEResearchGroup/CGM-JEPA-Pretraining. For pretrained encoder weights, see CRUISEResearchGroup/CGM-JEPA.

Quick start

Option 1 — datasets library (recommended for analysis / fine-tuning)

from datasets import load_dataset
ds = load_dataset("CRUISEResearchGroup/CGM-JEPA-Downstream")
# DatasetDict({
#   train:      Dataset({features: ['subject', 'ctru_venous', 'ctru_cgm', ...,
#                                   'ir_class', 'ir_regression',
#                                   'beta_class', 'beta_regression'],
#                       num_rows: 27}),
#   validation: Dataset({..., num_rows: 17})
# })

The two splits share a canonical 11-column schema (subject + 6 modality Sequence(Value('float64')) + 4 label fields). Modalities the train cohort doesn't have are None rather than empty — only ctru_venous is populated in the train split.

Option 2 — original nested JSON (used by the code repo's eval pipeline)

huggingface-cli download CRUISEResearchGroup/CGM-JEPA-Downstream \
  --repo-type dataset --local-dir Dataset_Open

Then from the code repository:

# Reproduce all 3 evaluation regimes × 2 endpoints (Tables 1–6)
python scripts/run_all_eval.py

Files

File Subjects Size Role
train.parquet 27 ~30 KB Initial cohort in datasets-friendly tabular form (one row per subject).
validation.parquet 17 ~110 KB Validation cohort in datasets-friendly tabular form.
train_split.json 27 ~45 KB Same data as train.parquet, in the nested JSON layout the code repo's data_loaders/ expects.
validation_split.json 17 ~146 KB Same data as validation.parquet, nested JSON layout.

The two cohorts are subject-disjoint by construction: subjects appearing in both upstream groups were removed from the validation cohort during preprocessing.

Schema

Both files use the same nested-JSON structure:

{
  "S01": {                                  // subject identifier
    "x": {
      "ctru_venous":  [<float>, …],         // sequence of glucose values (mg/dL)
      "ctru_cgm":     [<float>, …],         //   (validation cohort only)
      "home_cgm_1":   [<float>, …],         //   "
      "home_cgm_2":   [<float>, …],         //   "
      "cgm_home_mean":[<float>, …],         //   mean of home_cgm_1 & home_cgm_2
      "cgm_all_mean": [<float>, …]          //   mean of ctru_cgm, home_cgm_1, home_cgm_2
    },
    "y": {
      "ir":   {"class": 0|1, "regression": <float>},   // SSPG-derived
      "beta": {"class": 0|1, "regression": <float>}    // DI-derived
    }
  },
  "S02": { ... },
  ...
}

Extract methods (x sub-keys)

Key Availability Description
ctru_venous train + validation In-clinic venous OGTT glucose trajectory
ctru_cgm validation only In-clinic CGM trajectory recorded during the same OGTT
home_cgm_1 validation only First free-living home-CGM window
home_cgm_2 validation only Second free-living home-CGM window
cgm_home_mean validation only Subject-level mean of home_cgm_1 and home_cgm_2
cgm_all_mean validation only Subject-level mean of all three CGM modalities

The initial cohort was defined to have OGTT venous data only (no matching CGM), so train_split.json contains a single ctru_venous field per subject.

Labels (y sub-keys)

Field Type Source Threshold
ir.class binary {0, 1} SSPG (Steady-State Plasma Glucose) 1 = insulin-resistant, 0 = insulin-sensitive
ir.regression float SSPG numeric value mg/dL
beta.class binary {0, 1} DI (Disposition Index) 1 = β-cell dysfunction, 0 = normal β-cell function
beta.regression float DI numeric value dimensionless

A class value of -1 indicates a missing or unannotated label. Threshold definitions follow Metwally et al. (2025).

Class distribution

Cohort n IR=1 (resistant) IR=0 (sensitive) β=1 (dysfunction) β=0 (normal)
Initial (train_split) 27 14 13 16 11
Validation (validation_split) 17 7 10 6 11

Both labels are reasonably balanced; the paper reports stratified 2-fold cross-validation over 20 random iterations (40 paired evaluations per cell).

Evaluation regimes (paper Tables 1–6)

The two splits support all three deployment regimes evaluated in the paper:

Regime Train on Test on
Cohort generalization (venous) train_split × ctru_venous validation_split × ctru_venous
Venous → home-CGM transfer validation_split × ctru_venous validation_split × cgm_home_mean
In-domain home CGM validation_split × cgm_home_mean validation_split × cgm_home_mean

All regimes are orchestrated by scripts/run_all_eval.py.

How this corpus was built

The splits were assembled by scripts/preprocess_dataset.py in the code repository, from a single upstream source:

  • Stanford CGM Study (Metwally et al. 2025, Nature Biomedical Engineering) — data distributed through the Metabolic_Subphenotype_Predictor repository under the MIT license.

Cohort assignment is based on the exp_type column in filtered_metabolic_tests.csv:

  • Subjects with exp_type = venous_without_matching_cgm_and_without_planned_athome_cgminitial cohort.
  • Subjects with exp_type = venous_with_matching_cgm_and_with_planned_athome_cgmvalidation cohort.
  • Subjects appearing in both groups are removed from the validation cohort to keep them subject-disjoint.

All glucose trajectories were smoothed onto a 5-min grid via cubic smoothing splines (scipy.interpolate.make_smoothing_spline(lam=0.35)); sensor "Low"/"High" strings were replaced with the empirical numeric min/max.

Intended use

  • Linear-probe / fine-tuning evaluation of CGM encoders on metabolic-subphenotype prediction.
  • Cross-cohort generalization and cross-modality transfer experiments.
  • Method comparison on a small but clinically labeled CGM corpus.

License & attribution

Released under the MIT license, inherited from the upstream Metabolic_Subphenotype_Predictor repository (Metwally et al. 2025, Nature Biomedical Engineering). Please cite both the original Stanford study and our CGM-JEPA paper when using these splits.

Citation

@article{muhammad2026cgm,
  title   = {CGM-JEPA: Learning Consistent Continuous Glucose Monitor Representations via Predictive Self-Supervised Pretraining},
  author  = {Muhammad, Hada Melino and Li, Zechen and Salim, Flora and Metwally, Ahmed A},
  journal = {arXiv preprint arXiv:2605.00933},
  year    = {2026}
}

Code repository

https://github.com/cruiseresearchgroup/CGM-JEPA

Free AI Image Generator No sign-up. Instant results. Open Now