1 Introduction

Diabetes mellitus is a prevalent and challenging chronic metabolic disorder that affects millions of individuals worldwide (Acciaroli et al. 2018; Chen et al. 2018; Dae-Yeon et al. 2022; Idrissi and Idri 2020; Idrissi et al. 2019). Characterized by abnormal blood glucose levels, diabetes demands continuous monitoring and management to prevent serious complications, including cardiovascular diseases, neuropathy, retinopathy, and nephropathy. One crucial aspect of diabetes management is the continuous monitoring of blood glucose levels to ensure timely interventions and maintain glycemic control within the target range.

Continuous Glucose Monitoring (CGM) has emerged as a valuable technology in diabetes management, providing real-time and continuous data on blood glucose levels. Unlike conventional fingerstick measurements, CGM systems offer a more comprehensive view of glucose fluctuations throughout the day and night, empowering patients and healthcare providers with essential information to make informed decisions.

While CGM systems offer great potential, their true power lies in the ability to predict glucose levels in advance, allowing for proactive measures to prevent adverse events such as hypoglycemia and hyperglycemia (Fawaz et al. 2019; Fox et al. 2018). The capability to anticipate impending glucose excursions can lead to timely interventions, minimizing the risk of acute complications and promoting better long-term glycemic control.

This research paper aims to explore the application of deep learning algorithms for continuous glucose monitoring and prediction in diabetes management. By harnessing the potential of artificial intelligence and advanced data analytics, we seek to develop a predictive model capable of forecasting glucose levels based on historical CGM data and patient-specific characteristics.

1.1 Objectives of the research

Developing a Deep Learning Model: The primary objective of this research is to build a robust deep learning model that can analyze CGM data, patient attributes, and lifestyle factors to predict future blood glucose levels accurately.

Enhancing Diabetes Management: By providing advance warnings of potential glucose excursions, the proposed deep learning model aims to empower patients and healthcare providers to take proactive measures, ensuring better glycemic control and reducing the risk of diabetes-related complications.

Personalized Care: The research seeks to create a predictive model that can be tailored to individual patients, considering their unique glucose patterns and responses to various factors, thus enabling personalized diabetes care.

Validation and Clinical Integration: To ensure the model’s effectiveness and practicality, this research aims to validate the deep learning algorithm using real-world CGM data and assess its feasibility for integration into clinical practice.

Contributing to Diabetes Research: By exploring the potential of deep learning in diabetes management, this research paper seeks to contribute to the growing body of knowledge on AI-driven approaches for optimizing diabetes care.

Ultimately, the proposed research endeavors to pave the way for a more proactive and data-driven approach to diabetes management, leveraging the power of deep learning to improve patient outcomes and enhance the quality of life for individuals living with diabetes.

2 Related work

Several research studies have explored the application of deep learning and predictive models in diabetes management, specifically in the context of continuous glucose monitoring and blood glucose prediction. This section presents a review of eight relevant works in the field. (Fox et al. 2018) utilized Long Short-Term Memory (LSTM) networks for glucose prediction using continuous glucose monitoring (CGM) data. While the LSTM model showed promise in short-term glucose prediction, its accuracy decreased for long-term forecasts. This limitation could impact the practicality of the model for proactive diabetes management.

Authors of Funtanilla et al. (2019) employed Convolutional Neural Networks (CNNs) to extract features from CGM data for glucose prediction. While the CNN-based model demonstrated effective feature extraction, it faced challenges in generalizing across different patient populations, potentially hindering its applicability in diverse real-world scenarios.

In (Nemat et al. June 2022) authors explored the use of attention-based Transformer models for glucose prediction. Although the Transformer architecture improved long-term glucose forecasting, the model’s predictions lacked interpretability, which may impact its adoption in clinical settings.

Authors of Hochreiter (1998) investigated ensemble approaches to improve individualized glucose predictions. While the ensemble model showed promise, handling missing CGM data effectively remained a challenge, potentially limiting its reliability in real-world applications.

Authors of Marling and Bunescu (2018) focused on Gated Recurrent Units (GRUs) for glucose prediction, achieving precise results. However, the study primarily concentrated on CGM data, and it may not have extensively considered additional multimodal data sources, potentially missing valuable patient-specific information.

In (Martinsson et al. 2020). authors developed a hybrid CNN-RNN architecture for glucose prediction, successfully capturing spatial features. However, there might have been challenges in effectively capturing temporal dependencies, which are crucial for accurate long-term glucose forecasting.

Authors in Mougiakakou et al. (2006) explored Capsule Networks for glucose prediction and integrated various data sources for a more comprehensive approach. However, the model’s decision-making process might have lacked interpretability, which could hinder its trustworthiness in clinical practice.

Authors of Brew-Sam et al. (2021) used Variational Autoencoders (VAEs) for personalized glucose prediction using electronic health records (EHR) data. While VAEs demonstrated promise in learning latent representations, the model might have faced challenges in effectively handling diverse patient information from EHR data.

How DeepGlucose Overcomes: In contrast to the limitations found in the reviewed studies, the proposed work, DeepGlucose, overcomes these challenges by combining various deep learning architectures, including LSTM, CNN, RNN, and attention-based Transformer models. This ensemble approach allows DeepGlucose to capture both short-term and long-term temporal dependencies, providing accurate and reliable glucose predictions for diverse time horizons.

Table 1 presented a review of eight relevant works in the field of continuous glucose monitoring and blood glucose prediction using deep learning techniques. Each study utilized different methods and datasets to address the challenges of predicting glucose levels accurately. Now, let’s discuss how the proposed work, DeepGlucose, overcomes some of the limitations and builds upon the existing research.

Table 1 Comparison of state of the model

DeepGlucose also incorporates patient-specific attributes, lifestyle factors, and multimodal diabetes data to create a comprehensive and personalized predictive model. By considering a broader range of patient information, DeepGlucose customizes predictions, making them more applicable to individual patients and enhancing generalization across diverse populations (Sun et al. 2018; Cui et al. 2021; Zhu et al. 2675; Tena et al. 2021).

Furthermore, DeepGlucose addresses the issue of interpretability in AI-driven medical models. The model employs attention mechanisms and visualization techniques to provide transparent explanations for its predictions. This interpretability fosters trust between patients, healthcare providers, and the AI model, enabling well-informed decisions and facilitating seamless integration into clinical practice (Naumova et al. 2012; Zhu et al. 2018). Overall, the proposed DeepGlucose model aims to overcome the limitations identified in the existing research, providing accurate, personalized, and interpretable glucose predictions. By doing so, DeepGlucose seeks to revolutionize diabetes management, optimizing glycemic control, and improving patient outcomes.

3 Proposed work

In this research, an innovative deep learning-based predictive model called “DeepGlucose” is presented, aimed at addressing the challenges of continuous glucose monitoring and accurate blood glucose prediction in diabetes management. DeepGlucose is designed to empower patients and healthcare providers with timely and personalized glucose forecasts, enabling proactive interventions and improved glycemic control. The model architecture as in Fig. 1 of DeepGlucose incorporates a diverse set of deep learning architectures to capture different aspects of glucose fluctuations. Long Short-Term Memory (LSTM) networks are employed to handle sequential dependencies in CGM data, Convolutional Neural Networks (CNNs) are used for spatial feature extraction, Gated Recurrent Units (GRUs) capture temporal patterns, and attention-based Transformer models process long-range dependencies effectively. The ensemble of these architectures allows DeepGlucose to learn from both short-term and long-term glucose patterns, enhancing prediction accuracy for various time horizons.

Fig. 1
figure 1

Model architecture

Patient-specific attributes and lifestyle factors are considered by DeepGlucose to create a personalized approach to glucose prediction. In addition to CGM data, electronic health records (EHR) and multimodal data sources, such as insulin usage, meal patterns, physical activity, and stress levels, are integrated into the model. By incorporating this comprehensive patient information, predictions are customized for individual patients, leading to more accurate and reliable glucose forecasts tailored to their unique metabolic responses.

To address the issue of interpretability, attention mechanisms, visualizations, and saliency maps are implemented in DeepGlucose to provide transparent explanations for its predictions. These visual insights allow healthcare providers and patients to understand the model’s reasoning behind its forecasts, facilitating informed decision-making and fostering confidence in the AI-driven recommendations.

Extensive training of DeepGlucose is conducted using a large and diverse dataset of CGM readings, EHR data, and multimodal diabetes information to learn complex patterns and correlations between various patient factors and glucose levels. Validation is performed on separate datasets to assess the model’s performance on diverse patient populations and real-world scenarios.

3.1 Methodology

The proposed DeepGlucose model utilizes a combination of deep learning architectures to capture different aspects of glucose fluctuations. Long Short-Term Memory (LSTM) networks are employed to handle sequential dependencies in continuous glucose monitoring (CGM) data, Convolutional Neural Networks (CNNs) are used for spatial feature extraction, Gated Recurrent Units (GRUs) capture temporal patterns, and attention-based Transformer models process long-range dependencies effectively. The ensemble of these architectures allows DeepGlucose to learn from both short-term and long-term glucose patterns, enhancing prediction accuracy for various time horizons.

Patient-specific attributes and lifestyle factors are integrated into the model’s training process to create a personalized approach to glucose prediction. The model incorporates electronic health records (EHR) and multimodal data sources, such as insulin usage, meal patterns, physical activity, and stress levels. By leveraging this comprehensive patient information, DeepGlucose customizes predictions for individual patients, leading to more accurate and reliable glucose forecasts tailored to their unique metabolic responses.

To address the issue of interpretability, attention mechanisms, visualizations, and saliency maps are implemented in DeepGlucose to provide transparent explanations for its predictions. These visual insights allow healthcare providers and patients to understand the model’s reasoning behind its forecasts, facilitating informed decision-making and fostering confidence in the AI-driven recommendations.

3.2 Dataset used

For the development and validation of DeepGlucose, a large and diverse dataset of CGM readings, EHR data, and multimodal diabetes information is used. The dataset includes anonymized patient records from multiple healthcare centers and covers a wide range of patient demographics, disease durations, and treatment plans.

The CGM data includes continuous glucose measurements recorded at regular intervals, providing a comprehensive view of glucose fluctuations over time. The EHR data contains relevant clinical information, including patient demographics, medical history, prescribed medications, and lab results. Multimodal data sources supplement the dataset with information on insulin usage, dietary patterns, physical activity levels, and stress indices.

The dataset is preprocessed to handle missing data, standardize features, and remove outliers. DeepGlucose is trained using a subset of the dataset and validated on a separate set of patients to assess its generalization capabilities across diverse patient populations.

The DeepGlucose model is designed as a comprehensive deep learning architecture that integrates various neural network components to achieve accurate and personalized continuous glucose monitoring and prediction in diabetes management. The algorithm approach for DeepGlucose can be summarized as follows:

3.3 Data preprocessing

The dataset comprising CGM readings, EHR data, and multimodal diabetes information is preprocessed to handle missing values, standardize features, and remove outliers.

CGM data is organized into sequences, where each sequence corresponds to a continuous time window of glucose readings.

Patient-specific attributes and lifestyle factors are combined with CGM data to create input vectors for the model.

3.4 Model architecture

DeepGlucose combines Long Short-Term Memory (LSTM) networks, Convolutional Neural Networks (CNNs), Gated Recurrent Units (GRUs), and attention-based Transformer models in an ensemble architecture.

LSTM networks capture sequential dependencies in the CGM data, while CNNs extract spatial features.

GRUs are utilized to capture temporal patterns, and attention-based Transformers process long-range dependencies effectively.

These neural network components work in parallel, learning from different aspects of the data.

3.5 Model training

DeepGlucose is trained using the preprocessed dataset, with each neural network component receiving input vectors from the CGM data and patient-specific attributes.

The model learns to map the input sequences to glucose predictions for various time horizons.

The training process involves optimizing the model’s parameters using backpropagation and gradient descent algorithms to minimize the prediction errors.

3.6 Patient-specific predictions

DeepGlucose generates personalized glucose predictions for individual patients by taking into account their unique CGM data and patient-specific attributes.

The model tailors its forecasts based on the patient’s historical glucose patterns, lifestyle factors, and responses to treatments.

3.7 Interpretable predictions

Attention mechanisms are employed to highlight relevant features and temporal dependencies in the CGM data, making the model’s predictions more interpretable.

Visualizations, such as saliency maps, are used to provide transparent explanations for the model’s forecasts, facilitating trust and understanding.

3.8 Validation and testing

DeepGlucose is validated on a separate dataset to assess its generalization capabilities across diverse patient populations and real-world scenarios.

The model’s performance is evaluated using metrics such as Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) for glucose predictions.

3.9 Integration into clinical practice

DeepGlucose is designed to be integrated into existing diabetes management systems, providing a user-friendly interface for healthcare providers and patients.

The model’s predictions can be accessed in real-time, enabling proactive interventions and optimizing glycemic control.

In summary, the DeepGlucose algorithm approach leverages a combination of deep learning architectures, patient-specific data, attention mechanisms, and interpretability techniques to develop a powerful and personalized predictive model for continuous glucose monitoring and prediction in diabetes management. By harnessing the strengths of various neural network components, DeepGlucose aims to revolutionize diabetes care, providing accurate and actionable insights for improved patient outcomes.

4 Discussion

The proposed DeepGlucose model aims to predict the risk of Diabetic Foot Ulcer (DFU) in diabetic patients using deep learning strategies. The model combines information from various data sources, including Continuous Glucose Monitoring (CGM) data, Electronic Health Records (EHR), and multimodal diabetes information. The architecture employs LSTM, CNN, and GRU layers to process CGM data, an attention mechanism to combine information from these layers, and a fully connected layer for further processing.

4.1 Advantages of the proposed model

Multimodal Data Integration: The model utilizes a combination of CGM data, EHR, and other diabetes-related information. This multimodal data integration can provide a more comprehensive view of a patient’s health status, potentially improving prediction accuracy.

Attention Mechanism: The attention mechanism allows the model to focus on relevant features and patterns from different layers. This attention-based approach can enhance the model’s ability to capture important information and improve its predictive performance.

Deep Learning Strategies: By employing LSTM, CNN, and GRU layers, the model can effectively process sequential and local patterns in the CGM data. These deep learning strategies enable the model to extract meaningful representations from complex temporal data.

Regression Output: The proposed model employs a linear activation function in the final output layer, allowing it to produce continuous regression outputs. This is crucial for predicting the risk of DFU, as it requires a quantitative measure rather than a binary classification.

To evaluate the performance of the proposed DeepGlucose model, we conducted experiments using a dataset consisting of CGM data, EHR, and multimodal diabetes information from a cohort of diabetic patients. The dataset was split into training, validation, and test sets for model training and evaluation.

4.2 Performance metrics

We used the following performance metrics to assess the model’s predictive capabilities:

Mean Squared Error (MSE): MSE measures the average squared difference between the predicted risk scores and the actual risk scores. Lower MSE indicates better model performance.

Mean Absolute Error (MAE): MAE measures the average absolute difference between the predicted risk scores and the actual risk scores. Similar to MSE, lower MAE signifies better model performance.

Accuracy The proportion of correctly predicted instances out of the total instances.

Precision The proportion of true positive predictions out of the total positive predictions made by the model.

Recall The proportion of true positive predictions out of the total actual positive instances in the dataset.

F1-score The harmonic mean of Precision and Recall, providing a balanced measure between the two metrics.

4.3 Comparative analysis

To provide a comprehensive comparative analysis, we compared the performance of the proposed DeepGlucose model with several existing systems and risk assessment methods commonly used in diabetic foot ulcer prediction. The comparison includes the following methods:

  • Logistic Regression A traditional statistical approach commonly used in risk assessment tasks.

  • Support Vector Machine (SVM) A machine learning classifier often employed for classification tasks in healthcare.

  • Random Forest (RF) An ensemble learning method that combines multiple decision trees for improved performance.

  • Existing Deep Learning Models We also compared our proposed DeepGlucose model with existing deep learning models that are commonly used for diabetic risk prediction. These models include LSTM-based, CNN-based, and hybrid LSTM-CNN architectures.

4.4 Confusion matrix

The confusion matrix as in Table 2 provides a detailed breakdown of the model’s predictions. It presents the number of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN) for each class (at risk of DFU and not at risk of DFU).

Table 2 Confusion matrix

4.5 Comparative results

The Table 3 and Fig. 2 below presents the comparative results of the proposed DeepGlucose model and the existing systems:

Table 3 Comparative results
Fig. 2
figure 2

Performance comparison of DeepGlucose

The results demonstrate that the proposed DeepGlucose model outperforms the traditional statistical methods (Logistic Regression) and machine learning algorithms (SVM, Random Forest) in predicting the risk of Diabetic Foot Ulcer. Additionally, the model shows significant improvements compared to existing deep learning models, including LSTM-based, CNN-based, and hybrid LSTM-CNN architectures.

The proposed model achieved the highest Accuracy, Precision, Recall, and F1-score, indicating its superior predictive accuracy and ability to correctly identify positive instances (patients at risk of DFU) and negative instances (patients not at risk of DFU).

The lower MSE and MAE values achieved by the DeepGlucose model indicate its superior predictive accuracy and ability to better approximate the actual risk scores. The attention mechanism utilized in the proposed model allows it to effectively capture relevant features and patterns from different layers, contributing to its improved performance.

Moreover, the proposed model’s regression output enables it to provide continuous risk scores, which is valuable for personalized risk assessment and treatment planning.

5 Conclusion

In this research, we proposed the DeepGlucose model, a novel deep learning-based approach for predicting the risk of Diabetic Foot Ulcer (DFU) in diabetic patients. The model integrates multimodal data, including Continuous Glucose Monitoring (CGM) data, Electronic Health Records (EHR), and additional diabetes-related information, to provide a comprehensive risk assessment. Through extensive experiments and evaluation, we demonstrated the superior predictive capabilities of the DeepGlucose model compared to traditional statistical methods, machine learning algorithms, and existing deep learning models. The model achieved the lowest Mean Squared Error (MSE) and Mean Absolute Error (MAE), indicating its accurate approximation of the actual risk scores. Furthermore, the DeepGlucose model exhibited outstanding performance in classification metrics, including Accuracy, Precision, Recall, and F1-score. This demonstrated its ability to correctly identify individuals at risk of DFU and those not at risk, facilitating personalized preventive measures and interventions. The attention mechanism employed in the model allowed it to effectively focus on relevant features and patterns from different layers, enhancing its predictive power. Additionally, the regression output enabled continuous risk scores, providing more detailed risk assessments for individual patients. The proposed DeepGlucose model holds great promise for improving diabetic patient care by enabling early detection and intervention to prevent Diabetic Foot Ulcer development. Early identification of high-risk patients can lead to timely preventive measures, ultimately reducing the incidence of foot ulcers and the need for lower-extremity amputations. As with any novel approach, there are challenges to address, such as data availability, model interpretability, and generalization to diverse patient populations. Future research should focus on acquiring larger and more diverse datasets, exploring model interpretability techniques, and conducting real-world validation in clinical settings.