Can a Machine Learning Model Predict T2D?

April 9, 2021
Larry Hanover

A machine learning model using the gut microbiome may serve as a successful predictive measure for type 2 diabetes development.

Researchers were able to develop a machine learning model using the gut microbiome as a predictive measure for type 2 diabetes (T2D) development.

The study, published in mSystems, showed that including the microbiome helped predict various metabolic traits related to T2D and supported improved assessment of risk from diabetes. The results hold promise for using the microbiome in the future for personalized medicine.

Although recent studies have demonstrated a link between gut microbiota and T2D, the new study is the first to aim at assessing the gut microbiome as a predictive measure for several T2D-associated parameters in a longitudinal study setting. The need for such studies has multiplied as the number of cases has, with the prevalence of T2D doubling since 1980, creating a high burden on health care systems.

Researchers used prospective data from 608 Finnish men collected from a national database of those with metabolic syndrome. They sought to build machine learning models for predicting glucose and insulin measures both in a shorter term (18 months) and a longer term (4 years). The inclusion of the identified gut microbiome markers improved prediction accuracy for models of T2D-associated parameters such as glycosylated hemoglobin (A1C) and machine learning measures, they said.

Machine learning is a type of artificial intelligence that enables computers to learn without being explicitly programmed. As a program is exposed to more data, it becomes better able to recognize patterns over time.

Previous studies have shown that the amounts of bacteria such as Roseburia and Bifidobacteria are altered in patients with T2D, but most of the work has been on cross-sectional findings instead of prospective data, not allowing for assessment of the microbiome as a prognostic tool.

In the current study, random forest models were trained to predict metabolic outcomes, including fasting glucose and fasting insulin, by using the baseline microbiome, metabolic outcomes, and additional covariates. The model training was repeated 200 times with different initial splits. Features were extracted to identify biomarkers, and a local effects methodology was used to plot their effect for predicting a corresponding metabolic trait.

Results suggest that for the 18-month timeframe, microbiome as a predictor can improve the accuracy for secretion index, A1C, and 2-hour (h) insulin levels. For secretion index, models including microbial predictors outperformed simpler models in 61% of cases, for 2-h insulin in 70.5% of cases, and for A1C in 64.5% of cases.

For a 4-year timeframe, the model improved the accuracy for secretion index, fasting insulin, and 2-h insulin. For secretion index, models including the microbiome outperformed simpler models in 69% of cases, for 2-h insulin in 61% of cases, and for fasting insulin in 68.5% of cases.

However, the variation in differences in the root mean square error between models with and without microbial predictors was large, meaning the potential for improving predictive accuracy when microbiome data are used is unclear.

The study also identified novel microbial biomarkers that helped predictive accuracy. In the 18-month follow-up, unclassified Muribaculaceae was a significant predictor for secretion index and A1C; in mice, the bacteria have shown to be protective against T2D.

For the 48-month period, Family XIII AD3011 group was an important predictor for secretion index and 2-h insulin, and uncultured Rhodospirillales was a key predictor for secretion index and 2-h insulin. Rhodospirillales consists of bacteria known to produce acetic acid, which has been shown to improve insulin sensitivity.

“Our results suggest that bacteria provide a means for predicting changes in insulin secretion and insulin response to glucose intake,” the authors said.


Aasmets O, Lüll K, Lang JM, et al. Machine learning reveals time-varying microbial predictors with complex effects on glucose regulation. mSystems. 2021;6(1). doi:10.1128/mSystems.01191-20