
AI Model Detects Diabetes and Sorts Records Into Four Diagnostic Categories
Key Takeaways:
- Researchers have built a machine learning framework that first detects diabetes and then assigns positive records to one of four categories: prediabetes, type 1 diabetes, type 2 diabetes, or diabetes arising from pancreatic disease.
- XGBoost was the authors’ preferred classifier, though the paper reports inconsistent performance rankings across its own tables, with random forest outperforming it in one comparison.
- The framework is a proof-of-concept only. It has not been externally validated, its two stages were trained on separate datasets, and it is not ready for clinical use.
Why diabetes subtyping is a difficult problem
Diabetes is among the most common metabolic conditions worldwide, and its prevalence continues to rise. People living with diabetes typically experience raised blood glucose levels caused by insufficient insulin secretion, insulin resistance, or a combination of the two. Where hyperglycaemia persists, it can lead to serious complications affecting the eyes, heart, kidneys and nerves.
That burden has prompted interest in new strategies for detecting and classifying diabetes using clinical data that is already routinely available. If such tools were externally validated, they could in principle help clinicians identify individuals who warrant further diagnostic assessment, and support decisions about dietary, lifestyle or pharmacological management.
A study accepted for publication in Scientific Reports sets out one such approach: a machine learning (ML) model built on common clinical variables and a derived pancreatic-health index, designed both to detect diabetes and to classify it. The authors are explicit that clinical utility, patient outcomes and quality of life were not assessed.
About the study
The researchers presented an integrated, ML-based approach with two stages. Binary classification was used to determine diabetes status, and multiclass classification was then used to assign records to one of four dataset classes: prediabetes (PD), type 1 diabetes (T1D), type 2 diabetes (T2D), and diabetes from pancreatic disease, also known as pancreatogenic or type 3c diabetes (T3cD).
Two publicly available datasets were used. For the binary task, the team drew on the Pima Indians Diabetes Database, maintained by the National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK), to separate records into diabetic and non-diabetic. For the multiclass task, they used a dataset from the Kaggle repository. The curated multiclass dataset comprised 21,539 samples, split 60% for training and 40% for testing.
How the models were built and tested
Inputs to the multiclass model included age, body mass index (BMI), waist circumference, cholesterol levels, blood glucose levels, insulin levels, and a derived pancreatic-health index.
Several ML algorithms were compared to identify the most effective approach for each classification task: logistic regression, decision trees, random forests, K-nearest neighbours (KNN), naive Bayes, and XGBoost.
To correct class imbalances, the team applied the Synthetic Minority Oversampling Technique (SMOTE) to the training data only. Hyperparameter tuning was then carried out to identify the best-performing parameter combinations, and the models were retrained using those selected parameters. Finally, the researchers ran a Local Interpretable Model-agnostic Explanations (LIME) analysis on their preferred classifier to examine how individual features contributed to model predictions.
What the models achieved
The authors selected XGBoost as their preferred classifier, although the paper’s reported performance rankings are not consistent across tables. Table 2 gives a value of 0.97 for every evaluation parameter, covering accuracy, precision, recall and F1 score. Table 7, however, reports an accuracy of 95.67% for XGBoost against 96.67% for random forest, with random forest also achieving a marginally higher macro-average ROC-AUC, a measure of how well a model discriminates across the four classes.
The researchers attributed XGBoost’s performance to its capacity to capture complex, non-linear associations between features. In the reported test results, XGBoost correctly classified all prediabetes and T1D records, though some confusion persisted between the T2D and T3cD groups. KNN was the least accurate of the algorithms tested.
This kind of discrepancy between a paper’s headline claim and its own supporting tables is exactly the sort of detail clinicians are increasingly expected to spot for themselves. CCH’s CPD-accredited short course AI Essentials for Primary Care covers structured appraisal of AI tools, including the SAFER Evaluation Framework and how to judge AI output against NHS standards.
Which features drove the predictions
General feature-importance analysis pointed to blood glucose levels, insulin and BMI as the most influential variables. The LIME analysis told a slightly different story, indicating that glucose dominated the model’s predictions, with age and cholesterol making secondary contributions in some classes. BMI, waist circumference, insulin and pancreatic health had comparatively lower influence in the LIME results.
Blood glucose levels showed the strongest reported correlation with the class label, at a Pearson’s correlation of 0.86, while insulin showed a correlation of 0.59. These correlations should be treated with caution, since numerical values were assigned to what are, in fact, nominal disease classes.
Age, BMI and waist circumference showed moderate to strong intercorrelations, ranging from 0.63 to 0.68. Their respective correlations with the target were 0.41, 0.46 and 0.56. Pancreatic health showed a negligible negative correlation of -0.06.
In practice, the model primarily learned blood glucose-based decision patterns, which are consistent with the clinical diagnosis of diabetes. The authors interpreted these patterns as broadly concordant with diabetes pathophysiology and existing clinical knowledge, though that interpretation was not independently validated in clinical practice. On the evidence presented, the model is not ready for clinical use and would require considerably more evaluation before it could support, rather than replace, clinical judgement.
Conclusions and future directions
The study demonstrates an ML framework capable of classifying diabetes status and assigning positive cases to four labels: prediabetes, T1D, T2D and T3cD. The authors suggest the framework could eventually assist with diabetes screening and help guide further diagnostic investigation. Crucially, the study did not establish whether using the model improves care, treatment outcomes, quality of life, or the wider global burden of diabetes.
The varying influence of lipid, pancreatic and body measurements may reflect genuine subtype-related biological differences. Equally, it may be an artefact of dataset construction, class coding, correlated predictors, or the absence of clinically verified biomarkers. The authors recommend that these patterns be investigated in clinically characterised datasets before any mechanistic conclusions are drawn.
The framework should currently be regarded as a modular proof-of-concept, because its binary and multiclass stages were trained on separate datasets that may differ in population, variables and collection methods.
Future work, the authors suggest, should use a single training dataset containing both diabetes status and clinically adjudicated subtype labels, including verified pancreatic and autoimmune markers rather than derived variables. External validation in larger and more diverse clinical cohorts would be needed to improve generalisability. Ethical and data privacy concerns would also need to be addressed before any AI-based model of this type could be translated into clinical screening or decision-support settings.
CCH insight
Studies like this one arrive faster than most clinicians can appraise them, and the gap between a promising accuracy figure and a tool that is safe to use in practice is wide. Knowing how to interrogate that gap is now a core professional skill.
AI Essentials for Primary Care is a 100% online, CPD-accredited short course providing 3.5 CPD hours and a Certificate of Completion. It equips the whole primary care team to evaluate AI tools against NHS standards, recognise when AI output should be questioned, and apply the SAFER Evaluation Framework in day-to-day practice. No technical background is required.
Explore AI Essentials for Primary Care →
Read More
AI Tool Creates ‘Digital Twins’ of Patients to Forecast Future Health
Key Takeaways:
- New DT-GPT model creates virtual patient replicas to predict individual health trajectories with notable accuracy.
- The model outperformed 14 leading machine learning systems and demonstrated effective zero-shot predictions.
- Technology could accelerate drug development and shift healthcare towards more predictive and personalised practice.
Digital twins to forecast patient health
A new artificial intelligence model capable of generating virtual patient representations and forecasting future health outcomes has been described as a potential breakthrough for clinical research. The system, developed by researchers at the University of Melbourne, uses large language model (LLM) techniques to create personalised digital twins that mirror each individual’s clinical profile.
How the DT-GPT model was developed
The research team trained an existing large language model on three extensive datasets containing thousands of electronic health records. These datasets included information on people living with Alzheimer’s disease, people with non-small cell lung cancer, and people admitted to intensive care units. The aim was to equip the model with sufficient breadth of clinical data to enable it to generate detailed patient-level predictions.
The resulting tool, named DT-GPT, analysed each person’s medical history, such as laboratory values, diagnoses, and treatments. Using this information, it constructed a virtual counterpart for every individual and projected how their condition might evolve under ongoing clinical care.
Predictive performance and validation
Crucially, the model was not shown any actual health outcomes during training. This allowed researchers to rigorously assess the accuracy of its predictions once the model generated forecasts.
Associate Professor Michael Menden, lead researcher, explained the approach:
“For each patient, we created a virtual replica by initialising the model with their individual clinical profile.”
He added:
“For example, we created virtual twins of 35,131 intensive care unit (ICU) patients and accurately predicted what would happen to their magnesium levels, oxygen saturation and their respiratory rate over a 24 hour period, based on their laboratory results from the previous day.”
When benchmarked against 14 state-of-the-art machine learning models, DT-GPT consistently outperformed them in predictive accuracy.
Implications for clinical trials and personalised medicine
Researchers believe the tool has significant implications for the future of clinical trials. Because the model can simulate potential outcomes for large groups of virtual participants, it may help streamline drug development processes by reducing time and cost associated with early-stage testing.
Associate Professor Menden said:
“This technology paves the way for a shift from reactive to predictive and personalised medicine.”
He continued:
“It could enable doctors to anticipate if their patient’s health will deteriorate so they can intervene earlier.
“It could also be used to predict negative side effects of medications, allowing doctors to tailor treatment plans to suit each patient’s unique characteristics and medical history, ultimately increasing the chances of a positive health outcome.”
Conversational interface and handling of complex data
One of DT-GPT’s strengths is its ability to interpret large volumes of complex, unstructured clinical data. The system also includes a conversational interface that functions similarly to a chatbot, enabling clinicians and researchers to query the model directly and explore the reasoning behind specific predictions.
Zero-shot predictions: an advanced capability
Because DT-GPT is based on generative AI, it can also perform zero-shot predictions. These are informed estimates of clinical values that the model has not been explicitly trained to predict.
Associate Professor Menden illustrated this:
“To use an analogy, it’s like asking the model to predict how tall someone will grow without providing the person’s height records and only giving their previous weight and shoe sizes.”
He noted a key finding:
“Our model accurately predicted how lactate dehydrogenase (LDH) levels changed in non-small cell lung cancer patients 13 weeks after they started therapy, despite not training the model for this purpose.
“We compared it to traditional machine learning models, which were specifically trained for 69 clinical variables, including LDH, which we in comparison only educated guessed.
“Very surprisingly, the DT-GPT’s zero-shot predictions, its untrained guesses, were more accurate in 18 percent of cases.”
The study was recently published in NPJ Digital Medicine.
Next steps: expanding to other conditions
The team responsible for developing DT-GPT, in collaboration with the Royal Melbourne Women’s Hospital, have now established the foundation for a new company that will apply digital twin technology to support people living with endometriosis. This work highlights the potential wider applicability of the model across different medical conditions.
CCH insight
Digital twins are one of the more striking illustrations of where healthcare AI is heading: from reactive treatment towards prediction and personalisation. Whether or not tools like DT-GPT reach routine practice, the direction of travel makes AI literacy increasingly important for healthcare professionals – understanding what these systems can and cannot do, and how to interpret their outputs. CCH’s CPD-accredited digital health short courses are designed to help practitioners build that understanding and practical judgement, quickly and flexibly around a clinical schedule.
Explore CCH’s Digital Health courses →
Read More