Source-linked AI summary

Stacked LSTM Based Deep Recurrent Neural Network with Kalman Smoothing for Blood Glucose Prediction

Md Fazle Rabby, Yazhou Tu, Md Imran Hossen, Insup Le, Anthony S Maida, Xiali Hei

arXiv:2101.06850v1cs.LGcs.AI

TL;DR

Inaccurate CGM readings and differences between interstitial and blood glucose complicate reliable BG prediction. The paper combines Kalman-smoothed CGM data with a stacked LSTM deep RNN and physiological inputs, reporting lower RMSE ranges than raw-CGM modeling and more reliable forecasts.

  • Problem

    Sensor faults and interstitial-versus-blood glucose discrepancies make CGM-based BG prediction unreliable, even with effective prediction models.

  • Method

    A stacked LSTM-based deep RNN uses Kalman-smoothed CGM data alongside meal carbohydrates, bolus information, and step-count data to predict BG.

  • Results

    Processed-CGM models achieved patient RMSEs of 4.73 to 8.54, compared with 15.94 to 20.94 for raw-CGM models.

  • Takeaways & Limitations

    Kalman smoothing made BG prediction curves less uncertain and less fluctuating, supporting more reliable forecasting than traditional methods.

  • Takeaways & Limitations

    Evaluation assumes fingerstick BG readings are the ground truth despite documented discrepancies between interstitial and blood glucose measurements.

Abstract

from arXiv · show

Blood glucose (BG) management is crucial for type-1 diabetes patients resulting in the necessity of reliable artificial pancreas or insulin infusion systems. In recent years, deep learning techniques have been utilized for a more accurate BG level prediction system. However, continuous glucose monitoring (CGM) readings are susceptible to sensor errors. As a result, inaccurate CGM readings would affect BG prediction and make it unreliable, even if the most optimal machine learning model is used. In this work, we propose a novel approach to predicting blood glucose level with a stacked Long short-term memory (LSTM) based deep recurrent neural network (RNN) model considering sensor fault. We use the Kalman smoothing technique for the correction of the inaccurate CGM readings due to sensor error. For the OhioT1DM dataset, containing eight weeks' data from six different patients, we achieve an average RMSE of 6.45 and 17.24 mg/dl for 30 minutes and 60 minutes of prediction horizon (PH), respectively. To the best of our knowledge, this is the leading average prediction accuracy for the ohioT1DM dataset. Different physiological information, e.g., Kalman smoothed CGM data, carbohydrates from the meal, bolus insulin, and cumulative step counts in a fixed time interval, are crafted to represent meaningful features used as input to the model. The goal of our approach is to lower the difference between the predicted CGM values and the fingerstick blood glucose readings - the ground truth. Our results indicate that the proposed approach is feasible for more reliable BG forecasting that might improve the performance of the artificial pancreas and insulin infusion system for T1D diabetes management.

1. Introduction

Reliable blood glucose prediction is important for type-1 diabetes management, but CGM sensor faults and physiological discrepancies can undermine forecasting. The paper proposes a stacked LSTM deep RNN using Kalman-smoothed CGM and physiological inputs to improve prediction reliability.

  • Type-1 diabetes requires careful blood glucose management because prolonged hyperglycemia can cause severe complications.
  • Artificial pancreas systems use CGM and prediction mechanisms to support dynamic insulin delivery and reduce adverse glycemic events.
  • CGM sensor faults, interstitial-fluid measurement differences, and signal variability can make predicted BG values and insulin estimates erroneous.
  • The proposed system uses a stacked LSTM deep RNN with Kalman-smoothed CGM and additional physiological features for BG prediction.The additional inputs include meal carbohydrates, insulin information, and physical-activity-related data.
  • Kalman smoothing is introduced to mitigate CGM sensor faults and produce predictions closer to fingerstick BG readings than conventional prediction.
  • Step-count information from a fitness band is reported as useful for improving BG prediction accuracy, while the proposed methods provide more accurate RMSE-based forecasting.

2. Data Processing

The study preprocesses OhioT1DM data into four input channels combining glucose, meal, insulin, and activity information. Kalman smoothing is applied to CGM readings to reduce abrupt fluctuations and address sensor-related measurement issues.

  • Dataset: The OhioT1DM dataset contains eight weeks of data from six type-1 diabetes patients, including CGM, fingerstick glucose, insulin, and activity measurements.CGM readings were collected every five minutes, yielding 288 samples per day.
  • Feature selection: The selected four-channel feature set comprises CGM values, meal carbohydrates, bolus insulin, and step-count information.These attributes showed a positive effect on prediction accuracy, while basal insulin, sleep, heart rate, GSR, and skin temperature did not improve accuracy or sometimes had adverse effects.
  • Carbohydrate information: Effective meal carbohydrates model delayed glucose impact by ignoring the first 15 minutes and increasing the contribution until the 60-minute peak.The increasing factor is 0.111 per five-minute interval.
  • Carbohydrate information: Effective carbohydrates then decrease toward zero over approximately three hours, using a decreasing factor of 0.028 and clipping negative values at zero.The decreasing phase spans about 36 five-minute time indices.
  • Insulin and activity information: The preprocessing includes crafted bolus-insulin dynamics and a weighted step-count average over the previous 50 minutes.The step-count feature uses ten five-minute readings with greater weight assigned to more recent activity.
  • Kalman smoothing: Kalman smoothing produces glucose estimates with mean and variance and is used as preprocessing to correct CGM sensor faults.The smoothed series shows fewer abrupt changes or fluctuations than the original CGM readings.

3. Modeling

The model uses stacked LSTM layers to learn sequential glucose dynamics from multidimensional physiological inputs. Its output predicts blood glucose over 30- or 60-minute horizons, with uncertainty represented by a mean and variance.

  • LSTM motivation: Classical RNNs can struggle with long-term dependencies because of vanishing and exploding gradients, motivating the use of LSTM networks.LSTM cells use gates and internal memory to address this dependency problem.
  • Output network: The network adds dropout after the LSTM and uses fully connected layers with 512, 128, and one neurons before producing the final output.Dropout is intended to reduce overfitting and improve generalization.
  • Inputs and outputs: The model receives multidimensional sequences containing preprocessed CGM, meal carbohydrates, bolus carbohydrates, and step-count data.Its output is a blood-glucose prediction for a selected prediction horizon.
  • Training objective: The model is trained with negative log-likelihood, where the output is characterized by a mean and variance for each input.The paper uses Adam as the optimizer.
  • Stacked architecture: The proposed architecture stacks LSTM layers so the sequence output of the first layer feeds the LSTM layer above.The paper also compares LSTM and GRU cells and selects LSTM because it performs better in this application.

4. Experimental Setup

The experiments compare raw and Kalman-smoothed CGM inputs, evaluate LSTM depth and recurrent-cell type, and tune training settings on six patients. Stacked LSTM models outperform single-layer LSTM models across the tested cases.

  • Experimental design: The experiments compare two preprocessing setups: raw CGM readings and Kalman-smoothed CGM values for sensor-error correction.Both setups are evaluated within the proposed recurrent model.
  • Experimental design: The study evaluates 30- and 60-minute prediction horizons using data from six patients.The dataset is divided into training, validation, and testing portions, with 80% of each training file used for training.
  • Cell comparison: The LSTM network achieves better prediction accuracy than the GRU network in the tested experiments.Vanilla RNN cells are not evaluated because of their long-term dependency problem.
  • Training configuration: Training uses a learning rate of 10^-3, up to 6000 epochs, and early stopping with a patience threshold of 128 epochs.The training batch size is set to 128.

5. Evaluation Criteria and Results

The evaluation compares raw and Kalman-smoothed CGM inputs using MAE against fingerstick BG and RMSE for 30- and 60-minute forecasting. Stacked LSTM models outperform single-layer alternatives, while Kalman preprocessing improves prediction accuracy.

  • Evaluation Criteria: Fingerstick BG readings serve as ground truth, and MAE measures the difference between raw or smoothed CGM values and that reference.The analysis treats CGM and fingerstick measurements as differing because CGM samples interstitial fluid rather than blood.
  • Evaluation Criteria: Kalman-smoothed CGM values are closer to fingerstick BG readings than raw CGM values.The comparison uses MAE and supports selecting smoothed CGM inputs for subsequent forecasting.
  • Evaluation Criteria: RMSE evaluates the difference between predicted BG levels and reference CGM readings across the forecasting tasks.The study reports results for 30- and 60-minute prediction horizons on the OhioT1DM dataset.
  • Raw CGM Results: Stacked LSTM models outperform single-LSTM models for both 30- and 60-minute prediction horizons using raw CGM and three additional features.The compared architectures are a single-LSTM RNN and a stacked-LSTM deep RNN.
  • Raw CGM Results: 20.07 and 31.12 are the mean RMSE values for six patients at 30- and 60-minute horizons, respectively, in the raw-CGM comparison.Both single- and stacked-LSTM models perform better than the evaluated single-GRU model.
  • Kalman-Smoothed CGM Results: Kalman smoothing substantially improves prediction accuracy compared with raw-CGM training.The processed-CGM evaluation compares the final stacked-LSTM model under raw and smoothed inputs.

6. Analysis and Result Comparison

The analysis links forecasting differences to prediction horizon, patient data quality, CGM fluctuations, and sensor correction. Kalman smoothing narrows patient-level RMSE ranges and improves prediction-curve precision, while the proposed model compares favorably with prior OhioT1DM studies.

  • Model Comparison: Stacked LSTM layers provide advantages over a single LSTM layer particularly at higher prediction horizons.The authors select the deeper model for the final experiment as the horizon widens.
  • Patient-Level Analysis: 15.94 to 20.94 and 4.73 to 8.54 are the patient-level RMSE ranges for raw and processed CGM models, respectively.Patients #575 and #591 are comparatively less accurate, while #570 and #588 achieve better RMSE.
  • Patient-Level Analysis: Missing data, stronger CGM fluctuations, abrupt trajectory swings, and marginal prediction delay are associated with higher patient-level errors.The largest errors occur around spikes and turning regions of the CGM trajectory.
  • Effect of Sensor Correction: Kalman smoothing reduces abrupt CGM fluctuations and is reported to boost learning and prediction accuracy.The paper attributes the fluctuations to glucoregulatory dynamics or CGM sensor fault.
  • Effect of Sensor Correction: For patient #563, processed-data predictions have lower standard deviation and improved time delay than unprocessed-data predictions.The comparison uses a 12-hour window and presents the corrected-data model as forecasting with more confidence.
  • Comparison with Related Work: The proposed model with Kalman smoothing achieves the best accuracy for every patient among the compared OhioT1DM studies.Without Kalman smoothing, it achieves the top accuracy for four of six patients.

7. Conclusion

The study combines stacked-LSTM forecasting with Kalman-smoothed CGM and physiological features to improve BG prediction. Its conclusions emphasize closer agreement with fingerstick readings and less uncertain prediction curves.

  • Conclusions: Kalman smoothing makes BG prediction curves less uncertain and less fluctuating while improving robustness to CGM sensor error.The method also uses meal, insulin, step-count, and preprocessed CGM information.
  • Conclusions: Predictions using Kalman-smoothed CGM data are closer to fingerstick BG readings than predictions without the Kalman filter.Fingerstick BG readings are assumed to be the ground truth in the experiment.
  • Conclusions: The authors state that more accurate prediction can aid patients in avoiding adverse glycemic events.This conclusion is presented within the scope of diabetes management and BG forecasting.
Loading 2101.06850v1…