An artificially intelligent route to better prediction of diabetes risk

A neural network model developed at KAIMRC can identify patients at risk of diabetes with unprecedented accuracy


sanjeri/ E+/ Getty Images

The use of artificial intelligence (AI) to predict risk of certain diseases could not only save lives but also reduce the workload of over-burdened medical staff. Now, KAIMRC’s Riyad Alshammari and his co-workers have developed a highly accurate model to identify patients with diabetes based on simple test results and details about lifestyle.

Diabetes cases are on the rise worldwide, bringing associated risks of complications including heart disease and strokes. In Saudi Arabia alone, experts predict that there will be 2.5 million more diabetes patients by 2030. 

Genetic factors account for only a small fraction of diabetes risk, and the disease is more closely associated with obesity and other lifestyle parameters. This means that models based on personal data can be successful without the need for complex laboratory tests. 

“AI can help healthcare providers redefine their strategies to prevent and manage diabetes,” says Alshammari. “This will save medical expenses for both patients and healthcare authorities.”

Alshammari and a team at KAIMRC, King Saud Bin Abdulaziz University for Health Sciences, and Simon Fraser University, in Canada used a cloud computing service to build and test four algorithms based on machine learning. They also acquired data on more than 66,000 patients from Ministry of National Guard Hospital Affairs between 2013 and 2015 who had undergone hemoglobin A1c (HgbA1c) tests to determine whether they were diabetic. The dataset included 17 attributes per patient, such as age, body mass index, blood pressure, and  several lab tests.

To test each algorithm, the researchers used a 10-fold cross-validation process. “We divided the original data randomly into ten equal-sized sub-datasets,” Alshammari explains. “One of the ten was used to train the model, and the rest were used to validate the model. We repeated the process until every sub-dataset served as the training set.”

The most successful model was a neural network algorithm called Deepnet, which correctly identified 88.5% of patients as diabetic or non-diabetic. “Deepnets are an advanced form of AI that mimics the human brain. They can be trained to learn about data and pick out patterns,” says Alshammari.

The researchers are hopeful that such accurate predictions from routine health checks will lead to earlier detection and allow for improved initial management of the disease. If so, Deepnet could help healthcare authorities save some of the billions of dollars that are currently spent on managing diabetes. 

Alshammari plans to explore how models such as Deepnet could empower individuals to monitor their own health risks using the Internet of Things. “AI could be deployed in small devices attached to the body and connected to smart phones,” he says.


  1. Alshammari, R, Atiyah, N., et al. Improving Accuracy for Diabetes Mellitus Prediction by Using Deepnet. OJPHI 12(1):e11 (2020)  | article

Read this next

Preventing diabetes

Predicting a person’s risk of developing diabetes could save lives and conserve valuable medical resources for those in the greatest need

How a single mutation causes diabetes

A single mutation shifts the expression of several genes and induces hereditary diabetes in young children

Ramadan guidance for Muslims with diabetes

Researchers have published the first comprehensive guidelines for the clinical management of type-1 diabetes during Ramadan.