Using Machine Learning Techniques to Develop Risk Prediction Models for the Risk of Incident Diabetic Retinopathy Among Patients With Type 2 Diabetes Mellitus: A Cohort Study

Yuedong Zhao, Xinyu Li, Li Shen, Mengxing Dong, Han Yu, Mengxian Zhang, Weidao Chen, Peihua Li, Qing Yu, Xuhan Liu, Zhengnan GaoFrontiers in Endocrinology 2022

Abstract

The proposed model achieved high performance in predicting the risk of diabetic retinopathy (DR) among patients with type 2 diabetes mellitus at each time point. This study established the potential of the XGBoost model to facilitate clinicians in identifying high-risk patients and making type 2 diabetes management-related decisions.

Introduction: The Challenge of Early DR Detection

Diabetic retinopathy (DR) is a leading cause of preventable blindness globally. While early detection is critical for saving sight, DR often lacks symptoms in its early stages. Most existing risk models are cross-sectional—meaning they can identify if a patient has DR currently, but they struggle to predict when a patient will develop it in the future.

This study aims to bridge that gap by building a longitudinal prediction tool. By using standard clinical data, the authors sought to create a model that helps clinicians risk-stratify patients and optimize screening intervals, potentially intervening years before irreversible damage occurs.

Methodology and Data Sources

The researchers conducted a retrospective cohort study using Electronic Health Record (EHR) data from the Dalian Municipal Central Hospital in China, covering 7,943 patients hospitalized between January 2010 and September 2018. The cohort was split into training (5,559) and testing (2,384) sets, with an additional longitudinal validation set of 829 multipoint data entries.

Five machine learning architectures were compared to determine the most effective predictive tool:

  • Random Forest (RF)
  • Extreme Gradient Boosting (XGBoost)
  • Logistic Regression (LR)
  • Support Vector Machine (SVM)
  • K-Nearest Neighbor (K-NN)

Models were tuned using GridSearchCV and validated via five-fold cross-validation.

Model Performance and Key Results

The XGBoost model significantly outperformed the other architectures. On the test data, it achieved an AUC of 0.913, a sensitivity of 90.2%, and a negative predictive value (NPV) of 96.7%.

ROC curves comparing the performance of five machine learning models in predicting diabetic retinopathy.

One of the most striking findings was the "lead time" advantage: the XGBoost model flagged patients as high-risk an average of 2.895 years before they received a clinical diagnosis of DR. Furthermore, the model maintained high performance (AUCs between 0.834 and 0.966) across various follow-up periods ranging from 1 to 11 years.

Key Insights and Clinical Predictors

Feature importance analysis revealed the primary drivers of the model's predictions. Beyond expected factors like blood sugar (HbA1c) and diabetes duration, the model highlighted Serum Uric Acid (SUA) and lipid profiles (LDL-C, TC, TG) as high-importance predictors. This suggests that DR risk is tied to broader metabolic health beyond just glycemic control.

Feature importance ranking based on F-score for the XGBoost model, highlighting HbA1c and disease duration as top predictors.

The top five predictors identified were:

  1. HbA1c
  2. Duration of diabetes
  3. Follow-up time
  4. Fasting blood glucose (FBG)
  5. Age

Limitations and Future Directions

While promising, the study is limited by its single-center design in Dalian, China. Future research should involve multi-center studies across diverse geographic and ethnic groups to ensure generalizability. Additionally, while the model is mathematically sound, future work must focus on how to integrate these machine learning predictions into standard clinical workflows and decision-making processes.

Conclusion

The XGBoost-based model provides a robust tool for long-term DR risk prediction, offering a significant early-warning window that could transform preventative ophthalmology for patients with type 2 diabetes.

Summary updated

BibTeX
@inproceedings{zhao2022using,
  author = {Yuedong Zhao and Xinyu Li and Li Shen and Mengxing Dong and Han Yu and Mengxian Zhang and Weidao Chen and Peihua Li and Qing Yu and Xuhan Liu and Zhengnan Gao},
  title = {{Using Machine Learning Techniques to Develop Risk Prediction Models for the Risk of Incident Diabetic Retinopathy Among Patients With Type 2 Diabetes Mellitus: A Cohort Study}},
  booktitle = {Frontiers in Endocrinology},
  year = {2022},
  doi = {10.3389/fendo.2022.876559},
}
Figure