Frontiers in Artificial Intelligence · Jul 15, 2026

Machine learning algorithms for predicting glycemic control and weight loss outcomes in GLP-1 receptor agonist users

By Abegaz TM, Frietze G

INTRODUCTION: Glucagon-like peptide-1 receptor agonists (GLP-1 RAs) are widely used for the management of type 2 diabetes mellitus and obesity; however, substantial inter-individual variability in glycemic and weight loss outcomes remains. This study aimed to develop and validate machine learning (ML) models to predict glycemic control and weight loss outcomes following GLP-1 RA initiation using real-world data and to identify key features associated with treatment response. METHODS: We conducted a retrospective cohort study using data from the All of Us Research Program. Adult participants initiating GLP-1 RA therapy with available baseline and follow-up measurements were included. Two cohorts were constructed: a glycemic control cohort (n = 3,975) and a weight loss outcome cohort (n = 11,420). Glycemic control was defined as hemoglobin A1c (HbA1c) <7% at follow-up, and weight improvement was defined as achieving a body mass index (BMI) <30 kg/m². Multiple ML models, including logistic regression, random forest (RF), extreme gradient boosting (XGBoost), support vector machine, neural network, LightGBM, and CatBoost, were developed using 10-fold cross-validation. Model performance was evaluated using area under the receiver operating characteristic curve (AUC), accuracy, precision, recall, and precision-recall curves. SHapley Additive exPlanations (SHAP) were used to improve model interpretability. RESULTS: For weight loss outcome prediction, ensemble models demonstrated superior performance, with RF and XGBoost achieving the highest discrimination (AUC ≈ 0.94) and accuracy (0.89-0.90). For glycemic control prediction, RF and XGBoost achieved modest performance (accuracy ≈ 0.73; AUC ≈ 0.79). SHAP analysis identified baseline BMI and body weight as the most influential features of weight improvement, while duration of diabetes, baseline HbA1c, and use of sulfonylureas or insulin were among the most important features of glycemic control. DISCUSSION: Machine learning models, particularly tree-based ensemble methods, demonstrated strong potential for predicting treatment response to GLP-1 RA therapy. Integration of explainable ML approaches with real-world data may support personalized treatment strategies, and facilitate identification of patients most likely to benefit from GLP-1 RA therapy.

doi.org/10.3389/frai.2026.1861563Open accessPubMed 42529241Biomarkers

AgingResearch.News