Continuous glucose monitoring foundation model, a masked transformer that embeds a day of CGM for diabetes screening and pre-diabetes subtyping.
No providers recorded yet. Browse all providers
Two people can share the same HbA1c and the same fasting glucose and still live very different glycemic days: one flat and steady, the other spiking after every meal and dipping overnight. The clinical indices that define diabetes compress a day of glucose into a single average or a single time point, and summary metrics from continuous glucose monitoring (CGM), such as time in range, each capture one facet at a time. CGMformer, developed by Yong Wang's group at the Academy of Mathematics and Systems Science, CAS with Weiping Jia and Huating Li at Shanghai Sixth People's Hospital and Luonan Chen at the Shanghai Institute of Biochemistry and Cell Biology, instead learns a single representation of a whole day's glucose trajectory.
The approach borrows from language modeling: each 24-hour CGM record is treated as a sentence of 288 five-minute readings, each reading discretized into one of 260 glucose "words" between 40 and 300 mg/dL. A BERT-style encoder learns the grammar of those sentences by recovering masked readings from their context, and the mean of its final-layer token vectors becomes an embedding for the day. Averaging days gives an embedding for the person.
CGMformer was first posted on Research Square in February 2024 and published in National Science Review in February 2025. It is one of a small set of CGM foundation models, alongside GluFormer, CGM-LSM and GlucoFM.
CGMformer is an encoder-only transformer with four layers, eight attention heads per layer, sinusoidal positional encoding and a 128-dimensional latent space, trained with a cross-entropy masked-token objective. It was pretrained on two corpora. The Nationwide Multicenter CGM study enrolled 964 Chinese participants from 11 hospitals in 2007–2009 (450 with normal glucose tolerance, 169 with impaired glucose regulation, 345 with type 2 diabetes), who each wore a CGM for three days, giving 1,917 complete CGM days. The National Real-World CGM data, provided by Sibionics, covers 58,847 users in 2022 and 1,310,548 CGM days. The authors found that the larger corpus benefited from larger models, with gains rising from 0.8 million to 10 million parameters.
Without retraining, the pretrained model imputes masked glucose across five external datasets with a mean absolute error of 3.7 mg/dL, outperforming linear interpolation and KNN. For fine-tuning, a task-specific transformer layer and classification head are added to the pretrained weights. Fine-tuned CGMformer reaches an AUROC of 0.914 for type 2 diabetes screening and 0.741 for complication screening, exceeds 0.9 accuracy distinguishing type 1 from type 2 diabetes in 125 patients, and separates low- and high-risk groups for incident diabetes over a median 33-month follow-up in the Colas cohort. CGMformer_Diet combines the individual embedding with pre-meal glucose and meal macronutrients to predict two-hour postprandial curves, with a Pearson correlation of 0.763.
The model suits diabetes researchers and clinicians who hold CGM recordings but limited labels. Its embeddings can screen for type 2 diabetes and its micro- and macrovascular complications, and they can stratify people who are still non-diabetic. Hierarchical clustering of normoglycemic and prediabetic participants yields six subtypes, one normal and five prediabetic, including a lean-bodied group at high metabolic risk that standard glucose measurements miss. The subtypes were checked against the Colas longitudinal cohort and the Israeli CGMap cohort. CGMformer_Diet supports personalized dietary advice by predicting how a given person's glucose will respond to a planned meal.
CGMformer carried the pretrain-then-fine-tune recipe of language and single-cell foundation models over to continuous glucose monitoring. A compact encoder trained on unlabeled daily glucose profiles yielded representations reusable for screening, subtyping and diet modeling. Pretraining, fine-tuning and analysis code is released under the MIT license, and a pretrained checkpoint is distributed through Google Drive. The clinical CGM corpora are available only on request from the corresponding authors. The main limitations are that the model reads one day at a time, and its pretraining populations are Chinese, so transfer to other populations and devices rests on the external validation cohorts. Later CGM foundation models, GlucoFM among them, name it as one of their predecessors.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.