Scope of Artificial Intelligence in Type 2 Diabetic Care

Alinnavas
15 min readDec 3, 2022

ABSTRACT

Artificial intelligence (AI) is a rapidly-developing field with a variety of applications in medicine. This paper attempts to enumerate the multiple advancements of artificial intelligence in the prognosis, diagnosis and management of diabetes, a chronic condition that affects a significant proportion of the global population. The paper also examines the impact, requirements and hurdles faced during its implementation.

1. Introduction

The global prevalence of diabetes mellitus in 2019 was around 9.3% which is estimated to rise to 10.2% by 2030 and 10.9% by 2045. One in two people living with diabetes does not know that they have diabetes.[1] Uncontrolled diabetes mellitus may lead to serious complications such as cardiovascular disease (CVD), blindness, kidney failure, and amputation of lower limbs etc. that can lead to unnecessary economic and social pressure on the society. Timely diagnosis and treatment of diabetes thus assume significance.

However, the traditional approaches used for the diagnosis and treatment of diabetes are lacking in many aspects. First, the complex nature of the pathophysiology means that the treatment modalities employed need to account for multiple factors like age, metabolic rates, activity patterns, stress levels, dietary habits, and serum glucose levels. This level of granularity and precision can only be achieved by incorporating AI tools in diabetic care.

Secondly, the growing gap between the number of healthcare professionals and diabetic patients necessitates the development of AI powered tools that can be incorporated into patient care. This will help decrease the burden on physicians and thereby allow them to handle more complex cases.

Thirdly, traditional management of diabetic patients is resource intensive, whereas AI powered tools are more cost effective as they help reduce the number of doctor consultations and laboratory investigations.

This paper, therefore, examines developments in the field of artificial intelligence and the recent trends in diabetes management, more specifically, the application of artificial intelligence in diabetes management

As we move on, section 2 shall help the reader develop a basic understanding of the pathophysiology, progression and management of diabetes mellitus. Section 3 outlines a few frequently used AI/ machine learning models. Section 4 examines how artificial intelligence techniques can be applied in the management of diabetes. Section 5 is about the requirements and limitations of AI in diabetic care and finally section 6 concludes this article.

Materials and Methods

This review was conducted by electronic search of PubMed, MEDLINE, Scopus, Cochrane Collaboration Database, Google Scholar, and references of searched articles with keywords like ‘artificial intelligence diabetes,’ ‘machine learning diabetes,’ ‘data science diabetes,’ ‘prediction diabetes,’ ‘digital health diabetes’. Inclusion criteria of the review were studies of different study designs relating to the application of artificial intelligence in diabetes prediction, diagnosis and management that were published up to May 2022. Published articles in the English language were included, and other language studies and reviews were excluded from the review.

2.Diabetes Mellitus

2.1 Pathophysiology

Patients initially develop insulin resistance which is a decreased biological response to normal concentrations of circulating insulin. This results in the functioning beta cells in the pancreas producing more insulin to achieve glycaemic control. But the insulin resistance keeps increasing over time, and after a certain point, the beta cells can no longer secrete enough insulin to overcome the insulin resistance. This manifests as a persistently increased serum glucose, which is when the patient gets diagnosed with type 2 diabetes mellitus.

2.2 Clinical Progression

Uncontrolled diabetes mellitus may lead to cardiovascular disease (CVD), blindness, kidney failure, and amputation of lower limbs. Based on the time of onset, these complications can be classified as acute and chronic complications. Acute complications include hypoglycaemia, diabetic ketoacidosis and hyperglycaemic diabetic coma. The chronic complications are further divided into chronic microvascular and chronic macrovascular complications. The chronic microvascular complications are diabetic nephropathy, diabetic neuropathy, and diabetic retinopathy, whereas chronic macrovascular complications are coronary artery disease (CAD), peripheral artery disease (PAD), and cerebrovascular disease. [2]

2.3 Management

While diabetic patients can initially attain glycaemic control via exercise and dietary control, the progressive nature of the disease will require constant modifications in patient management. This includes increasing the duration and intensity of exercise, consumption of fewer calories or food articles with lower glycaemic index, increasing the dosage of current oral drugs, adding a new drug to the regimen, removing less effective drugs, changing the insulin dosage, etc. This means that each diabetic patient will require regular consultations for the rest of their lives.

3.Artificial Intelligence

Artificial intelligence (AI), the ability of a digital computer or computer-controlled robot to perform tasks commonly associated with intelligent beings. [3] Machine learning (ML) is a type of artificial intelligence (AI) that allows algorithms to become more accurate at predicting outcomes without being explicitly programmed. These machine learning algorithms go through millions of data points in the electronic medical records, insurance claims, and fitness data to find patterns in the data and can then predict the outcomes of patients. This ability to find complex associations and process massive amounts of data is what sets apart the ML models. These algorithms can be broadly classified into: supervised learning and unsupervised learning. Supervised ML algorithms like Support Vector Machines, K- Nearest Neighbour, Decision Trees, Regression Trees and Logistic Regression are used for classification problems like predicting the presence or absence of diabetes. Unsupervised ML algorithms like, Kmeans, Principal component analysis are respectively used for clustering and dimensionality reduction in medical datasets. Deep learning algorithms, which are a subset of supervised machine learning algorithms, have been especially useful in challenging computer vision problems like the diagnosis of diabetic retinopathy and diabetic foot ulcers.

4. Applications AI in diabetic care

Application of artificial intelligence in diabetes care can be broadly grouped into three groups.

4.1 Prognostic

ML models can be used to identify individuals who are at high risk of developing type 2 DM. Multiple clinical studies have successfully quantified insulin resistance, a key indicator of prediabetes, using Triglyceride-glucose (TyG) index. By exploiting this relationship between TyG index and prediabetes, a multiple instance learning boosting algorithm (MIL-Boost) was used to build a model capable of early prediction of Type2 DM. MIL-Boost is different from other forms of supervised learning as labels are assigned to a set of inputs (bags) rather than providing an individual label to each input. The algorithm then tries to either (i) understand the fundamental relationships and then try to label individual instances correctly or (ii) learn how to label sets of inputs (bags) without understanding the underlying mechanisms. The MIL-Boost algorithm is able to perform better than the other state-of-the-art ML models, even in the absence of Triglyceride(TyG) data. This is made possible via the ability of the MIL-boost algorithm to extract hidden patterns from past EHR data. The algorithm has not only found associations with well-established factors like cholesterol but also with non-traditional factors like leukocyte count and protein profile. This provides hints for further investigation in clinical studies. [4]

4.2 Diagnostic

4.2.1 Diagnosis of Diabetic Retinopathy

A study was able to diagnose early-stage diabetic retinopathy from retinal fundal images using a deep learning model that was a re-trained Inception V3 image classification model. The widely used EYEPacs retinal fundus image dataset consists of 45,000 retinal fundus images and their grading. [5] The American academy of ophthalmology classifies non-proliferative diabetic retinopathy into mild, moderate or severe stages based upon the presence or absence of retinal bleeding, abnormal beading of the venous wall (venous beading) or abnormal vascular findings (intraretinal microvascular anomalies or IRMA). In mild cases, only microaneurysms may be seen, but in moderate cases there will be an increase in the number of microaneurysms and other signs like dot blot haemorrhages, hard exudates and cotton wool spots may be seen. In severe cases, there will be retinal haemorrhage in all 4 quadrants, venous beading in 2 or more quadrants or intraretinal microvascular anomalies in one or more quadrants. So, the model can safely categorize all but the blood vessels as “noise” for the identification of diabetic retinopathy. Automatic vessel segmentation was then used to simplify the input data and remove this “noise”. [5] The use of such technologies in healthcare has become more mainstream over the past few years. This is exemplified by the marketing approval of AI-based detection of diabetes-related ophthalmic pathology by the US FDA. Yet another application of deep learning in diabetic care is its use in tracking the progress of diabetic foot ulcers, thereby improving the quality and access to follow up.

A deep convolutional neural network was trained using a retrospective development data set of 128,175 retinal images, which were graded 3 to 7 times for diabetic retinopathy, diabetic macular edema. The resultant algorithm was validated in two separate data sets, both graded by at least 7 US board-certified ophthalmologists. The algorithm was found to have high sensitivity and specificity for detecting referable diabetic retinopathy. [6]

4.2.2 Diagnosis of Type 2 Diabetes mellitus

Multiple supervised machine learning models like the random forest (RF) model, support vector machine (SVM) model, and a custom-designed twice-growth deep neural network (2GDNN) model were used for the diagnosis of type 2 diabetes mellitus. The performance of the different classifier models in the decreasing order of accuracy are: optimized random forest, random forest, optimized designed twice-growth deep neural network, support vector machine, optimized support vector machine and finally the twice-growth deep neural. Not only did the optimized random forest (ORF) and random forest manage to achieve higher training accuracies when compared to the other classifiers, but they also had high test accuracies. There was only a 0% and 0.68% difference between the train and test accuracies, respectively. However, in a broader context, the optimized designed twice-growth deep neural network performs better when the number of data points is large, whereas optimized random forest is only stable with small amounts of data. [7]

Similar attempts were made to predict the onset of type 2 diabetes mellitus from anonymized electronic health records using a deep learning model that combines the strength of a generalized linear model with various features and a deep feed-forward neural network to improve the predictive capability. [8]

Another study used Logistic Regression with stepwise feature selection to predict the onset of retinopathy, neuropathy, or nephropathy, at different time scenarios, at 3, 5, and 7 years from the first visit to the hospital. [9]

4.3 Therapeutic

Machine learning algorithms can also be used in the management of diabetes mellitus. This includes both the selection of drugs as well as estimating the dosage of drugs like insulin.

4.3.1 Predicting prescription efficacy

Prediction models were implemented using recurrent neural networks that use the sequence of all the previous records as inputs to predict the prescription efficacy at the time the current prescription is provided for each patient. In the overall comparison through the regression analysis, the forward neural network and recurrent neural network yielded a root mean squared value (RMSE) value of 0.652 and 0.624, respectively, meaning that the recurrent neural network demonstrated a higher performance compared with the forward neural network. The input variables include personal characteristics, prescribed anti glycaemic drugs and other prescribed drugs. While the output variable was HbA1c 2–6m after prescription. A data-driven clinical decision support system can be created for type 2 diabetes mellitus patients to help provide useful insights for assisting in clinical decisions. [10]

4.3.2 Optimal insulin dose calculation

Multiple algorithms have been developed with the aim of providing a more precise insulin administration regimen. The optimal insulin dose was found in a study via Reinforcement Learning. This level of precision can help prevent or decrease the episodes of hypoglycaemia, minimize duration of hyperglycaemia and thereby decrease the risk of chronic complications. The main deficiency of the traditional formulaic methods used by clinicians is that it cannot incorporate the patient’s unique metabolic rates, activity patterns, stress levels and dietary habits into insulin dose calculation but is instead based on average values. However, in closed-loop systems, the basal glucose level is controlled by bringing its values to target blood glucose range by repeating small boluses of insulin via an insulin pump. While this system can function with data collected by continuous glucose monitors, fitness bands and insulin pumps, additional data regarding dietary intake will help provide more precise control .In clinical practice, diabetic control was assessed via quarterly HbA1c testing, which determines mean blood glucose levels over the preceding 8 to 12 weeks. The chief issue with this approach is that HbA1c fails to provide a more granular picture of the patients past glycaemic control. In order to overcome this limitation, the GRADE measure (Glycaemic Assessment Diabetes Equation) was proposed. This measure describes the percentage of time the patient is in a hyperglycaemic, euglycemic or hypoglycaemic state. GRADE can be calculated through regular assessments via a glucometer, but Continuous Glucose Monitoring (CGM) is a much superior and easier option. A health reward function was defined by incorporating the patients’ target serum glucose range i.e. the hypo and hyperglycaemia thresholds. This function constitutes a heuristically defined mapping which converts the measured blood glucose level into numerical values in a way that a positive reward is obtained for the optimal blood glucose level while negative rewards are given for the suboptimal blood glucose levels. This function was designed to include individualized non-linear components which penalize dangerous states, e.g. hyperglycaemia or hypoglycaemia. The health reward function was used to build a Markov Decision Process. Once the Markov Decision Process was defined, Reinforcement Learning was used to find the solution to the MDP which is expressed by the optimal policy. Over time, as the algorithm acquires more data, the model becomes increasingly accurate. [11]

4.3.3 Monitoring complications like diabetic foot ulcer

Foot pathology is a common complication among patients suffering from diabetes mellitus. Uncontrolled diabetes mellitus contributes to the development of neuropathy and peripheral arterial disease by complex metabolic pathways. The loss of sensation combined with the peripheral artery disease leads to the development foot ulcers as the patients may not notice foot wounds because of decreased peripheral sensation, and the peripheral artery disease will result in decreased blood supply which makes healing more difficult thus resulting in chronic ulceration. [12] Diabetic foot ulcerations develop as a result of incremental changes over time. These changes can be tracked by advanced computer vision algorithms in order to help in the early detection and monitoring of the ulcer. This approach requires capturing standardized plantar foot photographs in specific conditions.

An automated foot detection computer vision algorithm was developed to recognize and isolate the foot region from the photograph. Then, k-means clustering was applied where squared Euclidean distance was computed for each pixel to the centroid cluster and the shortest distance was selected. Clustering was repeated three times to avoid local minima, each with a new set of initial cluster centroid positions. Finally, the largest cluster was segmented and was used for further analysis. To quantify intraoperator and interoperator reliability from images acquired using the algorithm, the Jaccard similarity index (JSI), a statistical approach to determine the degree of similarity of two datasets. High reliability was demonstrated in diabetic (JSI value: 0.90) and control (JSI value: 0.94) feet. [13]

4.4 Digital Health

Machine learning algorithms can also be used to power digital interventions by providing relevant education and motivational content at the appropriate time. The patient may be educated on topics such as; importance of drug adherence, proper insulin administration technique, stress management techniques, coping with disease, risk reduction steps, dietary modifications , and exercise duration. It can also provide graphical analytics to the patient, so that they have a better grasp of their health status. The main methods of delivery include via mobile apps, text messages and social media. Mobile apps can be used to record patients’ fitness, dietary and medical data, then calculate recommended medicine doses based on the input parameters.

Attempts have been made to provide dietary recommendations for diabetic individuals through the use of recommender systems.

The recommender system can provide personalized meals using metrics such as the user’s BMI, gender, age and activity levels to calculate the optimal daily caloric intake. K nearest neighbour algorithm has also been used to select appropriate meals from a library of pre-defined healthy meal options by finding the meals with the least euclidean distance from the patients’ nutritional requirements.

d(meal, nutrient) =sqrt[(mc-nc)² + (mca-nca)² + (mp-np)² + (mf-nf)²]

where,

mc = calories in meals

nc = required calories for patient

mca = carbohydrate in meals

nca = required carbohydrates for patient

mp = protein in meals

nc = required protein for patient

mf = fats in meals

nf = required fats for patient

The top 5 meals selected by the above method is then arranged in ascending order of euclidean distance and then the patients are allowed to choose their preferred option.

Another option for dietary support is to provide patients with mobile apps that are powered by deep learning algorithms that have the ability to gauge the calorie count, glycaemic index and nutritional quality from a picture of the meal. This can be achieved via neural networks like Google’s inception neural network. Neural networks involve the usage of multiple processing layers that performs different transformations on an input image. This helps summarize the information to a point where classification can be successfully performed. The model used in this scenario was trained using a food dataset that contained over 20 classes with nearly 300 images in each class. [14]

5. Requirements and Limitations

5.1 Requirements

While the potential of ML in diabetic care is immense, there is a lot of legwork required before we can achieve these lofty goals. A massive amount of clean and accessible data is required to train the machine learning models so that it can provide accurate predictions. This data can be obtained from EMRs (electronic medical records) or insurance claims, but this leads to potential privacy risks and violations of the fundamental principles of the HIPPA act. Therefore, strong privacy laws are required that ensure the anonymization, protection and ethical usage of clinical data while still maintaining accessibility for research initiatives.

The next step would be training highly competent medical data scientists who are well versed in both medicine and data science. This will allow them to create AI/ML ecosystems that can integrate with and enhance current treatment protocols. Once we have built the tools required, it is crucial that it is accepted by the medical community. We need to make sure that they understand that these advancements are meant to support and not replace them. Regulatory approval is also a key requirement for the deployment and commercialization of these algorithms.

5.2 Limitations

Currently most AIs in development are narrow AIs and require clearly defined parameters (inputs and outputs) to function. This restricts them to performing very limited tasks. The model parameters also have to be updated regularly, in response to new data, to provide optimal predictive performance. A significant issue faced by the health data science community is the limited access to usable structured data, presence of multiple fragmented data sources and high level of noise which makes it difficult to find high quality data to train the ML models. Another limitation is that most studies in medical data science use retrospective validation, we need to focus more on prospective studies as well.

6. Conclusion

As society becomes more health-centric, the massive amount of data collected by fitness trackers and Bluetooth enabled continuous glucometers can be utilized to provide a more personalized form of care by incorporating factors like dietary habits and activity levels along with continuous serum glucose monitoring to estimate the optimal drug dosages. It can also provide physicians with risk scores for potential development of diseases or complications based on patient behaviour and other metrics. It can help in the early diagnosis and treatment of diseases. This will allow the healthcare system to transition from reactive care to preventive care, thereby decreasing patient morbidity and healthcare costs. Artificial Intelligence can also be used to analyze electronic medical record (EMR) data and insurance claims data to compare different treatment protocols and their outcomes. This insight can be used to refine the current treatment protocol.

Financial support and sponsorship

None

Conflicts of interest

None

Bibliography

1. Saeedi P, Petersohn I, Salpea P, Malanda B, Karuranga S, Unwin N, et al. Global and regional diabetes prevalence estimates for 2019 and projections for 2030 and 2045: Results from the International Diabetes Federation Diabetes Atlas, 9th edition. Diabetes Res Clin Pract. 2019 Nov;157:107843.

2. Goyal R, Jialal I. Diabetes Mellitus Type 2. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 [cited 2022 Jun 26]. Available from: http://www.ncbi.nlm.nih.gov/books/NBK513253/

3. artificial intelligence | Definition, Examples, Types, Applications, Companies, & Facts | Britannica [Internet]. [cited 2022 Jul 18]. Available from: https://www.britannica.com/technology/artificial-intelligence

4. Bernardini M, Morettini M, Romeo L, Frontoni E, Burattini L. Early temporal prediction of Type 2 Diabetes Risk Condition from a General Practitioner Electronic Health Record: A Multiple Instance Boosting Approach. Artificial Intelligence in Medicine. 2020 May 1;105:101847.

5. Chakravadhanula K. A smartphone-based test and predictive models for rapid, non-invasive, and point-of-care monitoring of ocular and cardiovascular complications related to diabetes. Informatics in Medicine Unlocked. 2021 Jan 1;24:100485

6. Gulshan V, Peng L, Coram M, Stumpe MC, Wu D, Narayanaswamy A, et al. Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs. JAMA. 2016 Dec 13;316(22):2402–10.

7. Olisah CC, Smith L, Smith M. Diabetes mellitus prediction and diagnosis from a data preprocessing and machine learning perspective. Computer Methods and Programs in Biomedicine. 2022 Jun 1;220:106773.

8. Nguyen BP, Pham HN, Tran H, Nghiem N, Nguyen QH, Do TTT, et al. Predicting the onset of type 2 diabetes using wide and deep learning with electronic health records. Computer Methods and Programs in Biomedicine. 2019 Dec 1;182:105055.

9. Dagliati A, Marini S, Sacchi L, Cogni G, Teliti M, et al. Machine Learning Methods to Predict Diabetes Complications. J Diabetes Sci Technol. 2018 Mar 1;12(2):295–302.

10. Kang S. Personalized prediction of drug efficacy for diabetes treatment via patient-level sequential modeling with neural networks. Artificial Intelligence in Medicine. 2018 Apr 1;85:1–6.

11. Shifrin M, Siegelmann H. Near-optimal insulin treatment for diabetes patients: A machine learning approach. Artificial Intelligence in Medicine. 2020 Jul 1;107:101917.

12. Aumiller WD, Dollahite HA. Pathogenesis and management of diabetic foot ulcers. JAAPA. 2015 May;28(5):28–34.

13. Yap MH, Chatwin KE, Ng CC, Abbott CA, Bowling FL, Rajbhandari S, et al. A New Mobile Application for Standardizing Diabetic Foot Images. J Diabetes Sci Technol. 2018 Jan 1;12(1):169–73.

14. Sowah RA, Bampoe-Addo AA, Armoo SK, Saalia FK, Gatsi F, Sarkodie-Mensah B. Design and Development of Diabetes Management System Using Machine Learning. International Journal of Telemedicine and Applications. 2020 Jul 16;2020:e8870141.

--

--