A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data

Continuous glucose monitoring (CGM) technology has grown rapidly to track real-time blood glucose levels and trends with improved sensor accuracy. The ease of use and wide availability of CGM will facilitate safe and effective decision making for diabetes management. Here, we developed an attention-based deep learning model, CGMformer, pretrained on a well-controlled and diverse corpus of CGM data to represent individual's intrinsic metabolic state and enable clinical applications. During pretraining, CGMformer encodes glucose dynamics including glucose level, fluctuation, hyperglycemia, and hypoglycemia into latent space with self-supervised learning. It shows generalizability in imputing glucose value across five external datasets with different populations and metabolic states (MAE = 3.7 mg/dL). We then fine-tuned CGMformer towards a diverse panel of downstream tasks in the screening of diabetes and its complications using task-specific data, which demonstrated a consistently boosted predictive accuracy over direct fine-tuning on a single task (AUROC = 0.914 for type 2 diabetes (T2D) screening and 0.741 for complication screening). By learning an intrinsic representation of an individual's glucose dynamics, CGMformer classifies non-diabetic individuals into six clusters with elevated T2D risks, and identifies a specific cluster with lean body-shape but high risk of glucose metabolism disorders, which is overlooked by traditional glucose measurements. Furthermore, CGMformer achieves high accuracy in predicting an individual's postprandial glucose response with dietary modelling (Pearson correlation coefficient = 0.763) and helps personalized dietary recommendations. Overall, CGMformer pretrains a transformer neural network architecture to learn an intrinsic representation by borrowing information from a large amount of daily glucose profiles, and demonstrates predictive capabilities fine-tuned towards a broad range of downstream applications, holding promise for the early warning of T2D and recommendations for lifestyle modification in diabetes management.

Authors

Institutions

Publication Details

Journal
National Science Review
Published
2025-02-07
DOI
https://doi.org/10.1093/nsr/nwaf039
Citations
12
Primary Topic
Diabetes Management and Research
Type
article
Field-Weighted Citation Impact
15.54

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data

Weiping Jia, Bin Sheng, Luonan Chen, Huating Li et al.
12 citations
National Science Review
Diabetes Management and Research
15.54
article

A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data

Weiping Jia, Bin Sheng, Luonan Chen, Huating Li, Lei M. Li, Yurun Lu, Zhanying Feng, Pei Chen, Dan Liu, Jiachen Li, Rui Liu, Yitong Liu, Zhongming Liang, Yong Wang
article en
12 citations

Abstract

Continuous glucose monitoring (CGM) technology has grown rapidly to track real-time blood glucose levels and trends with improved sensor accuracy. The ease of use and wide availability of CGM will facilitate safe and effective decision making for diabetes management. Here, we developed an attention-based deep learning model, CGMformer, pretrained on a well-controlled and diverse corpus of CGM data to represent individual's intrinsic metabolic state and enable clinical applications. During pretraining, CGMformer encodes glucose dynamics including glucose level, fluctuation, hyperglycemia, and hypoglycemia into latent space with self-supervised learning. It shows generalizability in imputing glucose value across five external datasets with different populations and metabolic states (MAE = 3.7 mg/dL). We then fine-tuned CGMformer towards a diverse panel of downstream tasks in the screening of diabetes and its complications using task-specific data, which demonstrated a consistently boosted predictive accuracy over direct fine-tuning on a single task (AUROC = 0.914 for type 2 diabetes (T2D) screening and 0.741 for complication screening). By learning an intrinsic representation of an individual's glucose dynamics, CGMformer classifies non-diabetic individuals into six clusters with elevated T2D risks, and identifies a specific cluster with lean body-shape but high risk of glucose metabolism disorders, which is overlooked by traditional glucose measurements. Furthermore, CGMformer achieves high accuracy in predicting an individual's postprandial glucose response with dietary modelling (Pearson correlation coefficient = 0.763) and helps personalized dietary recommendations. Overall, CGMformer pretrains a transformer neural network architecture to learn an intrinsic representation by borrowing information from a large amount of daily glucose profiles, and demonstrates predictive capabilities fine-tuned towards a broad range of downstream applications, holding promise for the early warning of T2D and recommendations for lifestyle modification in diabetes management.

National Science ReviewVol. 12(5)
Shanghai Jiao Tong University (CN), Chinese Academy of Sciences (CN), Guangdong Polytechnic of Science and Technology (CN), Huzhou Vocational and Technical College (CN), National Center for Mathematics and Interdisciplinary Sciences (CN), Academy of Mathematics and Systems Science (CN), Center for Excellence in Molecular Cell Science (CN), Botswana Geoscience Institute (BW), Shanghai Sixth People's Hospital (CN), University of Chinese Academy of Sciences (CN), South China University of Technology (CN), Stanford University (US)
National Natural Science Foundation of China, National Key Research and Development Program of China, Moonshot Research and Development Program
Openalex Percentile: Top 1%
Diabetes Management and Research
15.54
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.