Introduction

It is well-established that diabetes has become a global public health problem in the 21st century, with the main causes being the consumption of nutrient-poor and calorie-rich foods and an increasingly sedentary lifestyle due to the Western pattern of lifestyle [1]. The increasing prevalence of diabetes is followed by high morbidity and mortality due to diabetic complications, and it is related with a high economic burden, making diabetes a significant health challenge [2]. Despite the novel antidiabetic agents with several benefits (except glycaemic control), several challenges still exist in preventing and managing diabetes, especially in the era of technological achievements. Prevention and early diagnosis of diabetes and its complications [3], and regular follow-up of patients, and, most significantly, diabetes remains a chronic disease that demands the patient’s active, continuous role in its management [4]. The emergence of digital health technologies, especially artificial intelligence (AI), might help to address the above challenges and reduce the disease burden of diabetes in the future.

AI is a general term that refers to a variety of techniques that enable computers to mimic human intelligence. AI includes various subdomains like machine learning and deep learning, and approaches like logistic regressions and random forest [5]. Machine learning (ML) is a subset of AI focused on programs that improve over time with experience, and deep learning (DL) is a subset of ML that uses artificial neural networks and large data sets to tackle computationally complex problems [6, 7]. AI has many implications in healthcare, and diabetes especially. The use of AI has the potential to improve screening and diagnosis, provide earlier, more targeted therapies, predict complications, reduce morbidity and mortality, improve quality of life, and decrease healthcare costs. The combination of AI approaches and digital health technologies (DHTs), such as medical devices, wearable devices, and sensor technologies, could enable the development and implementation of better chronic disease management services.

Therefore, in this paper we summarise the existing literature data on the impact of AI on diabetes management as well the early prediction and follow-up of diabetic complications. In addition, we examine the most recent developments in the use of AI in clinical diabetes treatment, taking into account the current context and the potential difficulties associated with this field of study.

What is AI?

In the future, patients with diabetes might experience less disease burden due to the development of DHTs, particularly AI. AI-based DHTs in diabetes care could help develop better preventive strategies for high-risk populations, manage patients unable to attend in-person appointments, provide real-time health, encourage self-management, and save time and money by minimising travel to in-person appointments [8]. ML [9] is a subfield of AI, based on statistical methods that can automatically learn and enhance its performance, such as accuracy, via supervised or unsupervised methods. Thanks to its exceptional feature extraction and pattern recognition capabilities, which use multiple processing layers (artificial neurons) to learn representations of data with different levels of abstraction so that it associates the input with a diagnostic output, DL [10], which employs advanced machine learning techniques, has achieved significant success in computer vision and natural language processing tasks. Depending on the kind of tasks that need to be solved, ML algorithms can be broadly divided into 2 groups: supervised and unsupervised [11]. Several “training” examples, containing inputs (like fundus photos) and the desired output labels (such the presence or absence of diabetic retinopathy), are gathered in supervised ML approaches. The algorithm learns to provide the proper output for a given input in new circumstances by examining the patterns in all the labelled input-output pairs [12].

Unsupervised ML techniques deduce the underlying patterns in unlabelled data to discover outliers in the data, create low-dimensional representations of the data, or depict images and videos. Examples of these uses include finding sub clusters of the original data [13, 14]. Other forms of machine learning exist as well, including reinforcement learning and semi-supervised learning [1517]. A subfield of ML known as semi-supervised learning makes use of both labelled and unlabelled data to carry out specific learning tasks. It also makes extensive use of unlabelled data that is readily available in conjunction with usually smaller volumes of labelled data [15].

Given that supervised information, such as annotations of retinal lesions in fundus photographs, is lacking in a large body of health-care data related to diabetes management and costs a lot of money to label or score, semi-supervised learning could use unlabelled or unscored data in conjunction with a small number of supervised data to enhance the performance of AI models [7]. The technique known as reinforcement learning can be used to infer the best course of action from data and is intended to identify the best course of action that maximises total rewards [17]. It has been used to create flexible treatment plans and give diabetic patients the right amount of insulin in response to their urgent demands [16].

AI and diabetes

Prevention and early diagnosis

Prediction and early diagnosis of type 2 diabetes (T2D) is essential because it allows a person at risk to take actions that can prevent onset or delay the progression of the disease as well as its complications. During the last decade a lot of models based on Ml have been developed to predict the development of T2D. To date, lots of diabetes onset prediction models have been created using statistics with known risk factors of diabetes in large cohorts.

A study developed a ML model to predict T2D occurrence in the following year by means of variables in the current year using electronic health records from 2013 to 2018 in the Korean population. The model used the following variables: fasting plasma glucose (FPG), HbA1c, triglycerides, BMI, gamma-glutamyl transferase, age, uric acid, sex, smoking, drinking, physical activity, and family history, to predict the outcome as normal (non-diabetic), prediabetes, or diabetes. Based on the experimental results, the performance of the prediction model proved to be reasonably good at forecasting the occurrence of T2D [18]. Another study using the National Health and Nutrition Examination Survey (NHANES) dataset developed models for cardiovascular, prediabetes, and diabetes detection. The developed ensemble model for cardiovascular disease (based on 131 variables) achieved an area under – receiver operating characteristics (AU-ROC) score of 83.1% using no laboratory results, and 83.9% accuracy with laboratory results. For pre-diabetic patients, the ensemble model had AU-ROC score of 73.7% without laboratory data, and for laboratory-based data 84.4%. The main predictors in diabetes patients were waist size, age, self-reported weight, leg length, and sodium intake [19]. A study by Zueger et al. developed a (ML model predicting the risk of T2D in people with prediabetes. They analysed data of 13,943 individuals with prediabetes and built a ML model to predict the risk of transition from prediabetes to T2D, integrating information about demographics, biomarkers, medications, and comorbidities defined by disease codes. For a forecast horizon of 5 years, the AU-ROC was 0.753 for the full ML model and 0.752 for a simplified model with 8 parameters [20]. Another AI model focused on early detection of prediabetes and T2DM using wearable technology and internet-of-things-based monitoring applications. The key contributing factors to the proposed model include heart rate, heart rate variability, breathing rate, breathing volume, and activity data (steps, cadence, and calories). The data were collected using an advanced wearable body vest and combined with manual recordings of blood glucose, height, weight, age, and sex. The proposed model was tested and validated using Kappa analysis, and it achieved an overall agreement of 91%. Moreover, the diabetic profile of a participant using M-health applications and a wearable vest (smart shirt) improved when compared to the traditional/routine practice [21].

A digital machine learning-based method to estimate the risk of diabetes based on retinal images has been developed and validated using both Asian and Caucasian data. Two separate data sets were used for external validation. The Hong Kong testing data contain 734 controls without diabetes and 660 subjects with diabetes, and the UK testing data have 1682 subjects with diabetes. The 10-fold cross-validation using the support vector machine approach has a sensitivity of 92% and a specificity of 96.2%. The separate testing data from Hong Kong provided a sensitivity of 99.5% and a specificity of 91.1%. For the UK testing data, the sensitivity was 98.0%. Those with diabetes complications in both Hong Kong and UK data had a higher probability of risk of diabetes compared with diabetes subjects without complications. The accuracy of the Caucasian retinal images was comparable with that of the Asian data. It implies that the digital method can be applied globally [22]. Using ML techniques, another study in China examined a noninvasive diabetic’s risk prediction model based on tongue features fusion, and it predicted the risk of prediabetes and diabetes using a classical ML algorithm and DL algorithm. The results of the study showed that tongue image information is a potential marker that facilitates effective early diagnosis of prediabetes and diabetes [23].

While there are still issues with using ML models for clinical practice to predict new-onset diabetes, these issues could potentially be resolved and the accuracy of new-onset diabetes further improved with more advanced ML models and additional data as an omics database (e.g. genomics, proteomics, metabolomics, microbiome) in addition to the aforementioned cohort datasets or electronic health records [24].

AI and managing diabetes

AI systems that regulate insulin delivery via an insulin pump based on continuous glucose monitoring (CGM) values are already in use in type 1 diabetes (T1D). The prediction of blood glucose (BG) is an ongoing study area because it can help with diabetes control. Even though BG prediction can be integrated into particular treatment-related applications (such as AI systems), it is typical for the scientific literature to merely present the general BG predictors’ raw performance. One important component of contextual information is meal information. It has been demonstrated in [25] that accurate meal time and content ground truth can be obtained using qualitative trend analysis based on CGM. Finally, because hypoglycaemic occurrences can have immediate negative implications, hypoglycaemia prediction via CGM is of special importance and another field in which AI has beneficial implications. Thanks to the outstanding development of DL technology and advancements in clinical applications, the number of approved AI-based medical devices has dramatically increased in the past few years [25].

Rather than only providing support for diabetes diagnosis, AI solutions that imitate the “hidden tips of treatments by a specialist” – such as adjusting insulin dosage – are now being explored. Advisor Pro, made by DreaMed Diabetes, Ltd., is one such product, which the FDA authorised in 2018. This device uses AI to determine and suggest whether remote insulin dose adjustments are necessary. It does this by sending data from the CGM and self-monitoring BG to a cloud server. Following that, doctors can assess the recommendations and let patients know [26]. A total of 108 T1D patients were randomised in a non-inferiority research, to be placed in one of two groups: manually managed, receiving insulin treatments from a diabetes specialist, or AI managed, and receiving insulin treatments via the AI system. When compared to the expert manual managed group, the outcomes showed that the AI-guided group’s targeted blood glucose concentration maintenance and hypoglycaemia rates were not worse [27].

An example of an AI system based on CGM that is paired with a smartphone application is the Medtronic Guardian Connect System, which received FDA certification in 2018. It is typified by the AI’s use of CGM data to forecast a hypoglycaemia attack one hour ahead of time and notify the patient. The product data indicates that the alert’s accuracy is 98.5%, occurring just 30 min prior to the beginning of hypoglycaemia. With this technology, patients receive alerts for hypoglycaemia based on their biometric data, which might be challenging to interpret at times. The patient can then take medication, such as glucose pills, to avoid hypoglycaemia and its related consequences [27].

Treatment of diabetes is mostly dependent on self-management. With the development of AI, patients may now create data for their own parameters, manage their diabetes, and act as their own health professionals. Web-based programs, smartphone applications, and mobile phone applications have made eating habits and exercise patterns more widely known [28].

Numerous applications have been developed that offer personalised eating schedules and dietary regimens, as well as recommendations for changing food intake to fit a person’s lifestyle. Wearables that track step counts, time, and intensity of other activities can be used to track daily activity levels [29]. Wearable technology is a powerful tool for encouraging behavioural changes related to health [30]. These gadgets make it possible to track daily activity and can encourage someone to include a specific exercise into their routine to prevent chronic illnesses like T2D.

Several applications are also made to examine food images and provide information on the dish’s calorie and nutritional content. These applications can aid in controlling body weight and preventing obesity, which is known to be a risk factor for T2D [29]. Diabetes patients can now make everyday decisions about their food and exercise thanks to AI. Patients can evaluate the caloric content and quality of the food they consume thanks to apps. Patients who take a picture of their food and rate their intake are more accountable for their diabetes treatment [31]. Web-based programs offer information on nutrition and exercise, and patients can register in daily consumption and activity data to receive ongoing feedback [28].

Diabetes control has been studied with digital therapies. In a 12-week interventional study, 118 persons with T2D used a digital intervention through an app called FairyWell as well as a digitally delivered human assistance every 2 weeks via phone coaching. Evaluating a durable switch to a plant-based diet and frequent exercise was the goal of the intervention. By the end of the study, 28% of patients had achieved glycated hemoglobin (HbA1c) < 6.5%, compared to all patients who had HbA1c > 6.5% at baseline. Over 86% of participants were still using the app after 12 weeks, and 57% of them had reduced their HbA1c, their use of diabetes medications, or both. Patients responded well to the app, with 92% saying they felt more confident in the management of their diabetes compared to that prior to participating in the study [32]. The One Drop | Mobile app was created to assist patients with T1D and T2D in setting objectives, tracking health outcomes, scheduling medication reminders, seeing statistics, and gaining data-driven insights. Over the course of a median of 4 months, 1288 patients reported an absolute reduction in HbA1c ranging from 1.07% to 1.27%. Patients with diabetes who used the One Drop Mobile app to track their self-care were found to have improved HbA1c [33].

AI and diabetes complications

AI and diabetic retinopathy

Preventing vision loss in persons with diabetes requires early detection and treatment of diabetic retinopathy (RD). There are numerous AI-based screening technologies available that have excellent sensitivity and specificity.

A popular system that integrates data from several, partially dependent biomarker detectors – some of which make use of convolutional neural networks – is the IDx-DR system [34, 35]. Previous iterations of IDx-DR were examined as a component of the Iowa Detection Programme (IDP), incorporating distinct algorithms to measure picture quality and identify abnormal lesions, exudates, cotton wool patches, haemorrhages, and neovascularization. In Caucasian, North African, and Sub-Saharan groups, IDP has demonstrated positive outcomes [36]. By adding DL features, the IDX-DR system outperformed the IDP. There was a noticeable improvement in specificity – IDX-DR was able to achieve 87% specificity for rDR, significantly lowering the percentage of false-positive examinations [34], while the previously excellent sensitivity of IDP (96.8%) remained constant.

The AI algorithm used in EyeArt, a deep learning-based categorisation tool created by Eyenuk, was able to identify both more-than-mild DR and vision-threatening DR in 2 prospective trials conducted in the U.K. with over 30,000 patients and in the U.S. with 893 patients. According to the study’s findings, EyeArt could identify more-than-mild DR with a sensitivity of 95.5% and a specificity of 85.0% [37, 38]. With patients from China, Hong Kong, Singapore, Mexico, Australia, the United States, and Zambia, among other ethnic groups, SELENA was retrospectively validated [39] and demonstrated a sensitivity of 92.25% and a specificity of 89.04% for referable DR, which was defined as more-than-mild DR. Among the first deep learning-based screening AI algorithms was a system that Google created and called DR detection. It was assessed using data from the EyePACS and Messidor-2 data sets as well as data from a national DR screening program in Thailand. It was trained using a mixed data set from several sites in the U.S. and India [4042]. For DR that posed a threat to vision, the algorithm’s sensitivity was 91.4%, and its specificity was 95.4%. Interviewees did admit, though, that the extra steps needed to upload photographs could make using the algorithm difficult at times. Furthermore, certain photos would be considered ungradable by the system, necessitating repeated imaging or human interpretation [43].

An unnamed AI algorithm was created by Li et al. [44]. It was first trained using a set of 106,244 retinal pictures of Indigenous Australians, Caucasian Australians, and Malays. For referable DR, this approach has been demonstrated to have a sensitivity of 96.9% and a specificity of 87.7% [45]. One of the AI algorithms included in the VoxelCloud software suite is VoxelCloud Retina. When it came to identifying referable DR – which is defined as more than mild DR – the algorithm’s sensitivity was 83.3% and its specificity was 92.5% [46]. A Chinese AI algorithm called the AIDRScreening system was prospectively assessed in a group of 1001 patients from 3 Chinese institutions. For referable DR, the algorithm’s sensitivity was 86.72% and its specificity was 96.09% [47].

AI and diabetic foot

The outcomes of using AI-based methods to diagnose and evaluate diabetic wounds are quite promising. Infrared thermography is the primary tool used in computer-aided diagnosis (CAD) to identify ulcers in diabetic patients by displaying the plantar foot’s temperature distribution. Data mining, machine learning, and deep learning processes can be employed to examine and evaluate the acquired temperature distribution patterns. CAD systems have demonstrated efficacy in identifying areas susceptible to ulcers by means of mathematical modelling of the underlying patterns [4853].

AI has potential use also in wound protection and prevention. The correlation and probability of several known and unknown risk factors can be examined using DL. An artificial neural network was employed by Singh et al. [48] in one of the first studies to assess T2D patients’ likelihood of developing a diabetic foot ulcer (DFU) in relation to 5 single nucleotide polymorphisms in the TLR4 gene. The study involved the enrolment of 255 T2D patients, 130 of whom did not have DFU and 125 of whom did. 83% of the validation set (or 25% of the dataset) could be correctly predicted by the final model as to whether DFU will be present or not. Thermograms were utilised in 2 recent investigations [49, 50] to detect diabetic foot abnormalities early on (and maybe estimate the risk of DFU). In Khandakar’s work [49], ML algorithms were trained on data from 45 healthy controls and 122 diabetic patients. The data included each subject’s age, gender, height, weight, and thermograms of a pair of feet to identify the diabetic and control subjects. Arteaga-Marrero et al. [51] utilized a U-net-based deep learning strategy in a different study to segment the sole of the foot, which can be used as a thermographic tool for foot care procedures.

AI-based technologies can be used to suggest tailored treatment plans for diabetic wounds because they vary in condition, severity, covariates, and linked factors. An additional crucial aspect that computer scientists tackle is the optimal design of shoes for individuals with diabetes. For these patients, computer-assisted shoe moulds have been created [52, 53]. Because the structure, form, and design of the human foot vary greatly, custom shoe insoles are necessary. Computer systems with AI capabilities can personalise these insoles.

Conclusions

AI seeks to provide sophisticated and accurate predictions for a vast quantity of knowledge data. AI-based medical devices are currently available in other countries and have already received FDA approval for the diagnosis and treatment of diabetes. Currently, ML is being utilised in numerous studies to control diabetes and its consequences as well as to anticipate when diabetes would develop. By utilising vast amounts of organised data and plentiful computational resources, ongoing machine learning research and efforts toward practical application will optimise AI’s predictive performance and significantly raise the predictive accuracy of diabetes diagnosis, prevention, and treatment.