Predicting Treatment Failure With Sodium-Glucose Cotransporter-2 Inhibitors in People With Type 2 Diabetes: Novel Artificial Intelligence and Machine Learning Approach
Open Access
- 20 May 2026
- journal article
- Published by JMIR Publications Inc. in JMIR Diabetes
- Vol. 11 (1) , e85372
Abstract
Background: The rate of treatment failure with sodium-glucose cotransporter-2 inhibitors (SGLT2i) is high among individuals with type 2 diabetes (T2D). Accurately predicting SGLT2i treatment failure is important for improving the clinical management of T2D. Objective: The study aimed to use machine learning (ML) models to identify factors predicting treatment failure with SGLT2i in T2D and to evaluate model performance. Methods: This retrospective observational cohort study included adults with T2D treated with SGLT2i (2016-2024). The primary outcome was overall treatment failure with SGLT2i during follow-up (≥180 days after SGLT2i initiation). The secondary outcome was subtypes of treatment failure with SGLT2i (treatment discontinuation, failure with action, and inertial failure) or nonfailure, which was defined as not meeting the definition for one of the failure subtypes. Variables potentially associated with treatment failure were assessed during the year before SGLT2i treatment initiation (analysis 1) and the year before SGLT2i treatment failure (analysis 2). Using these variables, ML models—logistic regression (LR), multilayer perceptron (MLP), extreme gradient boosting (XGBoost), and Transformer—were used to identify significant predictors of the outcomes. Model performance metrics (accuracy, area under the curve, precision, recall, and F 1 -score) were calculated. Using Shapley Additive Explanations methodology, key features were identified based on their impact on model predictions. LR and Transformer models using key features were further evaluated for their potential to support the development of a risk score for predicting treatment failure with SGLT2i. Results: Among all individuals in the study (N=62,222), 71% (n=44,156) had treatment failure with SGLT2i. Across subtypes, failure with action (n=23,839, 38.3%) was more common than treatment discontinuation (n=16,449, 26.4%) and inertial failure (n=3868, 6.2%). Model performance was moderate in both analyses. In analysis 1, the accuracy ranged from 0.72 to 0.73 for predicting overall treatment failure and from 0.56 to 0.57 for predicting the subtype of treatment failure. In analysis 2, the accuracy ranged from 0.74 to 0.75 for predicting overall treatment failure and from 0.61 to 0.63 for predicting the subtype of treatment failure. XGBoost, MLP, and Transformer models showed small improvements compared with LR. Using the top 9 key features identified from the Shapley Additive Explanations analysis, the Transformer model performed similarly in accuracy and area under the curve to its counterpart using the full feature set. Conclusions: Performance across the LR, MLP, XGBoost, and Transformer models was moderate. The advanced ML models performed slightly better than LR. Overall, the results suggest that further model advancements and increased data availability are needed to better predict treatment failure with SGLT2i. The LR coefficients from the key features model may inform the development of a risk score to predict SGLT2i treatment failure. Accurate prediction could inform individualized treatment planning for individuals with T2D.Keywords
This publication has 33 references indexed in Scilit:
- Machine learning in clinical practice: prospects and pitfallsMedical Journal of Australia, 2019
- Charlson Comorbidity Index: ICD-9 Update and ICD-10 Translation2019
- Slow Titration and Delayed Intensification of Basal Insulin Among Patients with Type 2 DiabetesJournal of Managed Care & Specialty Pharmacy, 2018
- Long-term Trends in Antidiabetes Drug Usage in the U.S.: Real-world Evidence in Patients Newly Diagnosed With Type 2 DiabetesDiabetes Care, 2017
- Diabetes Complications Severity Index (DCSI)—Update and ICD-10 translationJournal of Diabetes and its Complications, 2017
- Using Machine Learning to Examine Medication Adherence Thresholds and Risk of HospitalizationMedical Care, 2015
- Receiver Operating Characteristic Curve in Diagnostic Test AssessmentJournal of Thoracic Oncology, 2010
- Multiple imputation for missing data in epidemiological and clinical research: potential and pitfallsBMJ, 2009
- Diabetes complications severity index and risk of mortality, hospitalization, and healthcare utilization.2008
- A new method of classifying prognostic comorbidity in longitudinal studies: Development and validationJournal of Chronic Diseases, 1987