Enhancing Wearable based Real-Time Glucose Monitoring via Phasic Image Representation Learning based Deep Learning

1 Yidong Zhu, 1 Nadia B Aimandi, 1, 2, 3 Mohammad Arif Ul Alam 1Computer Science, University of Massachusetts Lowell 2Medicine, University of Massachusetts Chan Medical School 3National Institute on Aging, National Institute of Health
Abstract

In the U.S., over a third of adults are pre-diabetic, with 80% unaware of their status. This underlines the need for better glucose monitoring to prevent type 2 diabetes and related heart diseases. Existing wearable glucose monitors are limited by the lack of models trained on small datasets, as collecting extensive glucose data is often costly and impractical. Our study introduces a novel machine learning method using modified recurrence plots in the frequency domain to improve glucose level prediction accuracy from wearable device data, even with limited datasets. This technique combines advanced signal processing with machine learning to extract more meaningful features. We tested our method against existing models using historical data, showing that our approach surpasses the current 87% accuracy benchmark in predicting real-time interstitial glucose levels.

Index Terms:
modified recurrent plot, image representation, pre-diabetics, interstitial glucose levels.

I Introduction

In the United States, approximately 34.5% of adults aged 18 years or older, equating to 88 million individuals, are estimated to have pre-diabetes, with a staggering 90% of them being unaware of their condition [8]. This state of unawareness is particularly concerning given that pre-diabetes, a precursor to more severe health conditions like type 2 diabetes, can often be mitigated or reversed through early lifestyle interventions such as dietary changes, regular physical activity, and maintaining a healthy weight [9]. Despite this potential for reversal, studies indicate that without these interventions, 15-30% of people with pre-diabetes will progress to type 2 diabetes within five years [9]. The annual conversion rate from pre-diabetes to diabetes is alarmingly high, estimated at around 10%, underscoring the urgent need for effective and continuous monitoring mechanisms [8]. This transition not only poses significant health risks but also contributes to the increasing healthcare burden associated with diabetes management.

The healthcare industry currently grapples with the significant challenge of the absence of non-invasive, easily accessible methods for glucose monitoring, a key factor in the effective self-management of pre-diabetes. Traditional tools such as blood glucose meters and continuous glucose monitors, while useful, often involve invasive procedures and can be cost-prohibitive, limiting their widespread adoption [10]. In recent years, there has been a notable rise in the popularity of wearable technologies, particularly wrist-worn biometric devices [11, 13, 17]. These devices have seen remarkable market penetration, with over 117 million units currently in use, and projections suggest a potential doubling in the next few years [11]. These wearables are evolving to track more than just basic health metrics, positioning themselves as pivotal in the discovery of digital biomarkers, which are crucial in transforming extensive health data into actionable insights [13]. The role of such biomarkers is becoming increasingly significant in healthcare, particularly in their potential to significantly reduce the incidence of pre-diabetes through early detection and management [17].

In our study, we present a novel approach that involves generating RGB images from wearable signal data, including skin temperature, electrodermal activity, and blood volume pulse, using modified recurrence plots in phasic domain, and then employing deep learning algorithms pre-trained on extensive image datasets to enhance blood glucose level detection.

Our key contributions:

Refer to caption
Figure 1: The schematic diagram of proposed work
  • Our research introduces the Phasic Recurrent Plot (PRP), a new technique for transforming multi-modal wearable signals into Recurrence Plot (RP) Images. This method replaces existing ‘temporal’ RPs that represent time-sequenced data patterns, while proposed ’phasic’ RPs emphasize frequency variations in these multi-modal signals.

  • Our study implemented a pre-trained deep learning model for image processing to analyze RP images of heart rate, electrodermal activity, and temperature data collected from 16 individuals over 8-10 days, exceeding existing accuracy benchmarks in real-time interstitial glucose level prediction.

II Related Works

II-A Recurrent Plot for Wearable Signal Representation

Previous research in the field of wearable technology has made significant strides in utilizing Recurrence Plots (RPs) for the analysis of nonlinear dynamical systems, as highlighted in the tutorials for behavioral sciences by Webber and Zbilut [19]. Gao and Cai [20] further developed RP techniques by integrating them with machine learning algorithms, enhancing pattern recognition capabilities in wearable data. Li et al. [22] applied RPs in real-time analysis of electrocardiogram (ECG) signals, demonstrating their utility in wearable health monitoring. However, these studies primarily focused on temporal domain analysis and single-modal data, as evidenced in the works of Romano et al. [23] and Silva and Hidalgo [24], respectively. Our proposed method, in contrast, innovatively fuses three-modal data in the phasic domain, overcoming the limitations of previous systems by offering a more comprehensive and accurate analysis for wearable sensor data, marking a significant advancement in wearable technology and health monitoring.

II-B Non-Invasive Glucose Monitoring

The predictive potential of noninvasive wearable technologies for blood glucose levels has been extensively explored through various biological signals and parameters, including photoplethysmography (PPG) signal [4], sleep and physical activity data [5], and techniques like infrared spectroscopy[21], ultrasound [15], and fluorescence [16]. However, these methods face challenges such as lack of specificity, skin irritation, and significant time lags in interstitial fluid glucose measurement, coupled with poor correlation with actual blood glucose levels and instability due to external factors. The success of non-invasive glucose estimation hinges on sophisticated signal processing and noise reduction, requiring extensive datasets for machine learning and deep learning algorithm development. A notable instance is the Duke University Health System’s study, which combined food diaries with noninvasive wearables, including an invasive Dexcom 6 CGM and an Empatica E4 wristband, worn by participants aged 35-65. This study generated a dataset of 25,000 concurrent readings from glucose monitors and smartwatches [2], employing traditional feature extraction and machine learning techniques but faced limitations in achieving high accuracy. Utilizing a combination of domain-driven and data- driven feature engineering, the study crafted 69 variables that incorporated multiple factors influencing glucose levels, including diet, stress, physical activity, and circadian rhythm. A decision tree classifier, leveraging this rich feature set, exhibited a balanced accuracy of 84.3% in detecting personalized glucose deviations [1]. In our paper, we introduce the Phasic Recurrent Plot (PRP) technique, which converts multi-modal wearable sensor data into ’phasic’ Recurrence Plot (RP) Images, leveraging pre-trained computer vision models to boost the accuracy of wearable-based glucose estimation. This novel approach effectively transforms frequency-variant data from wearable sensors into an image format suitable for advanced image processing.

III Frequency Domain Information Encoding in Image

III-A Visualization via Recurrence Plots

A Recurrence Plot (RP) serves as a graphical tool to analyze complex dynamic systems, effectively capturing phase space trajectories of nonlinear data [18]. This visualization technique plots small-scale features as dots and lines and large-scale patterns like homogeneity and drift. Formally, the RP is defined as a matrix 𝐑𝐑\mathbf{R}bold_R, derived from a set of trajectory data 𝐱𝐱\mathbf{x}bold_x, where each matrix element Ri,j(ε)subscript𝑅𝑖𝑗𝜀R_{i,j}(\varepsilon)italic_R start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_ε ) is the L2 norm of the difference between the trajectory points 𝐱isubscript𝐱𝑖\mathbf{x}_{i}bold_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and 𝐱jsubscript𝐱𝑗\mathbf{x}_{j}bold_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. This method is adept at transforming 3-axis signal data into the RGB channels of an image. We represent states in the phase space as sj=(xj,xj+1)subscript𝑠𝑗subscript𝑥𝑗subscript𝑥𝑗1s_{j}=(x_{j},x_{j+1})italic_s start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = ( italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT ), with sj2subscript𝑠𝑗superscript2s_{j}\in\mathbb{R}^{2}italic_s start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∈ blackboard_R start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. The RP is constructed using a matrix R𝑅Ritalic_R, where R(N1)×(N1)𝑅superscript𝑁1𝑁1R\in\mathbb{R}^{(N-1)\times(N-1)}italic_R ∈ blackboard_R start_POSTSUPERSCRIPT ( italic_N - 1 ) × ( italic_N - 1 ) end_POSTSUPERSCRIPT, and each element reflects the L2 norm of the difference between states. The RP matrix is articulated as:

Rm,n=sisjsubscript𝑅𝑚𝑛normsubscript𝑠𝑖subscript𝑠𝑗R_{m,n}=||s_{i}-s_{j}||italic_R start_POSTSUBSCRIPT italic_m , italic_n end_POSTSUBSCRIPT = | | italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT - italic_s start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT | | (1)

III-B Temporal Adjustment in Recurrent Plots

The inherent symmetry of the recurrence matrix around its principal diagonal can obscure signal tendencies. To address this, we employ a modified recurrent plot technique for the temporal domain [3]. This involves computing the angle between a reference vector and the temporal state difference vector smsnsubscript𝑠𝑚subscript𝑠𝑛s_{m}-s_{n}italic_s start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT - italic_s start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT, aiding in determining the sign of the recurrence plot in Equation 1:

Rm,n=sign(m,n)sisjsubscript𝑅𝑚𝑛𝑠𝑖𝑔𝑛𝑚𝑛normsubscript𝑠𝑖subscript𝑠𝑗R_{m,n}=sign(m,n)||s_{i}-s_{j}||italic_R start_POSTSUBSCRIPT italic_m , italic_n end_POSTSUBSCRIPT = italic_s italic_i italic_g italic_n ( italic_m , italic_n ) | | italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT - italic_s start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT | | (2)

III-C Frequency Domain Enhancement in Recurrent Plots

Building upon this, we integrate frequency domain data into the recurrent plot. We commence by postulating that state difference vectors in upward frequency phases predominantly lie in the first quadrant, while downward phases are in the third quadrant. After performing a Fourier transform on the temporal phases, we derive complex-valued frequency spectra, denoting each frequency component’s phase as pisubscript𝑝𝑖p_{i}italic_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and pjsubscript𝑝𝑗p_{j}italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. We then calculate the angle between a base vector v𝑣vitalic_v and the phase difference vector, utilizing a sign function for gradient direction differentiation. The sign function is defined as:

sign(m,n)={1,if (pipj).vpipj.v<cos(3π4)1,otherwisesign𝑚𝑛cases1if formulae-sequencesuperscript𝑝𝑖superscript𝑝𝑗𝑣formulae-sequencenormsuperscript𝑝𝑖superscript𝑝𝑗norm𝑣3𝜋41otherwise\text{sign}(m,n)=\begin{cases}-1,&\text{if }\frac{(p^{i}-p^{j}).v}{||p^{i}-p^{% j}||.||v||}<\cos(\frac{3\pi}{4})\\ 1,&\text{otherwise}\end{cases}sign ( italic_m , italic_n ) = { start_ROW start_CELL - 1 , end_CELL start_CELL if divide start_ARG ( italic_p start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT - italic_p start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT ) . italic_v end_ARG start_ARG | | italic_p start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT - italic_p start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT | | . | | italic_v | | end_ARG < roman_cos ( divide start_ARG 3 italic_π end_ARG start_ARG 4 end_ARG ) end_CELL end_ROW start_ROW start_CELL 1 , end_CELL start_CELL otherwise end_CELL end_ROW (3)

where v=[1,1]𝑣11v=[1,1]italic_v = [ 1 , 1 ]. This results in the frequency domain-adapted recurrence plot:

Rm,n=sign(m,n)pipjsubscript𝑅𝑚𝑛𝑠𝑖𝑔𝑛𝑚𝑛normsubscript𝑝𝑖subscript𝑝𝑗R_{m,n}=sign(m,n)||p_{i}-p_{j}||italic_R start_POSTSUBSCRIPT italic_m , italic_n end_POSTSUBSCRIPT = italic_s italic_i italic_g italic_n ( italic_m , italic_n ) | | italic_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT - italic_p start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT | | (4)

For each target sensor channel (TEMP, EDA, and BVP), we apply Equation 4, creating three distinct RP images. These images are then merged into a single matrix M𝑀Mitalic_M (M(N1)×(N1)×3𝑀superscript𝑁1𝑁13M\in\mathbb{R}^{(N-1)\times(N-1)\times 3}italic_M ∈ blackboard_R start_POSTSUPERSCRIPT ( italic_N - 1 ) × ( italic_N - 1 ) × 3 end_POSTSUPERSCRIPT), which is normalized and encoded as an RGB image.

IV Experimental Evaluation

IV-A Dataset

Our study leveraged a real-time data collected from 16 participants monitored over 8-10 days using invasive Dexcom G6 Continuous Glucose Monitors (CGM) and Empatica E4 wrist-worn devices [2]. The Dexcom G6, an invasive needle incorporated glucose measuring device provided interstitial glucose readings every 5 minutes, while the Empatica E4 recorded multiple metrics including blood volume pulse (BVP), electrodermal activity (EDA), and skin temperature (TEMP) [2]. As per the latest correlation study on blood glucose level with health vital features [12], we selected TEMP, EDA, and BVP features from the wearable sensor readings they are sampled at 4Hz, 64Hz and 1Hz respectively.

IV-B Preprocessing

First, we combined the TEMP, BVP, and EDA sensor data into a three-dimensional structure, aligning them as x, y, and z dimensions respectively, and resampled the BVP data from 64Hz to match the 4Hz sampling rate of TEMP and EDA. We then extracted key information from the Dexcom CGP reading and synchronized these glucose readings with the 5-minute intervals of the biometric data. Finally, the biometric data was reshaped into a three-dimensional matrix with dimensions corresponding to the number of 5-minute samples, the number of readings per sample (1200, based on a 4Hz sampling rate), and the three biometric measurements, providing a comprehensive dataset for subsequent analysis.

IV-C Encoding using Proposed RP

In the next stage of our study, we concentrated on generating Recurrence Plots (RPs) from the structured data, utilizing these plots to visualize recurring patterns and analyze the dynamics within the time series data. For every 5-minute segment extracted from each participant’s 3D matrix, we produced three separate RPs, each corresponding to one of the biometric indicators: TEMP, BVP, and EDA. Our approach encompassed phasic dimensions for the construction of these RPs. Subsequently, we normalized the RPs to standardize their matrix values within a predefined range. In the final step, we merged the individual RPs for TEMP, BVP, and EDA into a unified RGB image, assigning a distinct color channel in the RGB spectrum to each biometric reading. This process resulted in a collection of RGB images equivalent to the total count of 5-minute periods present in each participant’s 3D matrix of TEMP, BVP and EDA readings, effectively capturing the composite biometric dynamics.

IV-D Baselines Algorithms

Our baseline for glucose prediction was established using methodologies from a study conducted by Duke University, which encompassed two distinct approaches: a gradient-boosted model for population-level analysis using leave-one-person-out cross-validation (LOPOCV), and a personalized gradient-boosted model tailored to individual data [2]. In our study, we expanded the scope by incorporating two baseline methods: Lu et. al. proposed a modified temporal domain Recurrence Plot plot combined with a ResNet architecture (MTRP+ResNet) [3], and our proposed novel frequency domain Recurrence Plot plot also integrated with ResNet (MFRP+ResNet).

TABLE I: Baseline algorithms’ performance comparisons with our method
Method RMSE MAPE Accuracy(%)
Population Model 21.22 0.1433 85.67
Personalized Model 21.10 0.1326 86.74
Our Method 18.17 0.1235 87.65

IV-E Results Analysis

In our study, we leveraged the capabilities of the ResNet-18 model, a renowned deep convolutional neural network with proven efficacy in image classification tasks. Our model’s performance was rigorously evaluated using three distinct metrics: Mean Absolute Percentage Error (MAPE), Root Mean Squared Error (RMSE), and a bespoke accuracy metric calculated as (100 - MAPE)%. To train the model, we adopted a composite loss function combining RMSE and MAPE. The training phase commenced with two varied datasets (Temporal and Phasic images) to probe the influence of different image representations on our predictive model’s effectiveness. We partitioned the dataset into training and validation subsets in a 70:30 ratio. This division was crucial to maintain the integrity of the relationship between each Recurrence Plot image and its corresponding glucose level. Leveraging Dexcom datasets for individual participants, we meticulously mapped each image to its exact glucose measurement, ensuring precise data alignment.

The comparative analysis between our method and the Duke study is presented in Table 2. While both methodologies have their own merits, it’s evident from the data that our method demonstrates superior performance in all three metrics evaluated. Specifically, our method achieved an RMSE of 18.17, which is a significant improvement over the Duke Study’s 21.10. Additionally, our MAPE value was recorded at 0.1235, substantially better than the Duke Study’s 0.1326. In terms of accuracy, our model, with an accuracy of 87.65%, also marginally surpassed the Duke Study’s accuracy of 86.74%. These improvements signify the effectiveness of our proposed model and its potential in real-world applications.

IV-F Conclusion and Limitations

In the face of rising global diabetes prevalence, the necessity for accurate and non-invasive glucose monitoring becomes crucial. Our research demonstrated the potential of utilizing wearables in conjunction with innovative data transformation techniques to surpass existing accuracy benchmarks in real-time glucose level prediction.

Our exploration into the generation of Recurrence Plot (RP) Images in both temporal and phasic dimensions,has laid a solid foundation for further investigations in this domain. The process of converting raw biometric data into visual representations, specifically RGB images, has shown its merit in improving the data interpretability for deep learning models.

While our results are promising and outperform the benchmarks set by previous studies, it’s essential to recognize the need for continued research. Future endeavors should focus on enhancing the model’s robustness, expanding the dataset to include a more diverse demographic, and testing the model in real-world scenarios. Furthermore, an exploration into other potential biometrics and their integration could lead to even more accurate predictions.

References

  • [1] Bent, B., Cho, P.J., Henriquez, M. et al. Engineering digital biomarkers of interstitial glucose from noninvasive smartwatches. npj Digit. Med. 4, 89 (2021). https://doi.org/10.1038/s41746-021-00465-w.
  • [2] Cho, Peter, et al. ”BIG IDEAs Lab Glycemic Variability and Wearable Device Data” (version 1.1.1). PhysioNet (2023), https://doi.org/10.13026/73s9-cw03.
  • [3] Lu et al., ”Robust Single Accelerometer-Based Activity Recognition Using Modified Recurrence Plot,” in IEEE Sensors Journal, vol. 19, no. 15, pp. 6317-6324, 1 Aug.1, 2019, doi: 10.1109/JSEN.2019.2911204.
  • [4] S. Hossain, B. Debnath, S. Biswas, M. J. Al-Hossain, A. Anika and S. K. Zaman Navid, ”Estimation of Blood Glucose from PPG Signal Using Convolutional Neural Network,” 2019 IEEE International Conference on Biomedical Engineering, Computer and Information Technology for Health (BECITHCON), Dhaka, Bangladesh, 2019, pp. 53-58, doi: 10.1109/BECITHCON48839.2019.9063187.
  • [5] van den Brink, W. J., van den Broek, T. J., Palmisano, S., Wopereis, S., & de Hoogh, I. M. (2022). Digital Biomarkers for Personalized Nutrition: Predicting Meal Moments and Interstitial Glucose with Non-Invasive, Wearable Technologies. Nutrients, 14(21), 4465. https://doi.org/10.3390/nu14214465
  • [6] Wang and Oates, ”Encoding time series as images for visual inspection and classification using tiled convolutional neural networks,” in Proc. AAAI Conference on Artificial Intelligence, 2015, pp. 40-46.
  • [7] Zhu, Y., Rahman, M. M., & Alam, M. A. (2023, July 3). Augmenting deep learning adaptation for wearable sensor data through combined temporal-frequency image encoding. Retrieved from https://arxiv.longhoe.net/abs/2307.00883
  • [8] Centers for Disease Control and Prevention. (2020). National Diabetes Statistics Report, 2020. Atlanta, GA: Centers for Disease Control and Prevention, U.S. Dept of Health and Human Services.
  • [9] American Diabetes Association. (2019). Classification and diagnosis of diabetes: Standards of medical care in diabetes—2019. Diabetes Care, 42(Supplement 1), S13-S28.
  • [10] Zhang, Y. (2019). Non-invasive glucose monitoring technology in diabetes management: A review. Analytica Chimica Acta, 1044, 16-40. https://doi.org/10.1016/j.aca.2018.09.037
  • [11] Statista. (2021). Number of wearable devices in use in the United States from 2016 to 2022. Statista Research Department. https://www.statista.com/statistics/610447/number-wearable-devices-in-use-usa/
  • [12] Bogue-Jimenez B, Huang X, Powell D, Doblas A. Selection of Noninvasive Features in Wrist-Based Wearable Sensors to Predict Blood Glucose Concentrations Using Machine Learning Algorithms. Sensors (Basel). 2022 May 6;22(9):3534.
  • [13] Patel, S., Park, H., Bonato, P., Chan, L., & Rodgers, M. (2015). A review of wearable sensors and systems with application in rehabilitation. Journal of NeuroEngineering and Rehabilitation, 9(1), 21.
  • [14] Sieg, A., Guy, R. H. & Delgado-Charro, M. B. Noninvasive glucose monitoring by reverse iontophoresis in vivo: Application of the internal standard concept. Clin. Chem. 50, 1383–1390 (2004).
  • [15] Lee, S., Nayak, V., Dodds, J., Pishko, M. & Smith, N. B. Glucose measurements with sensors and ultrasound. Ultrasound Med. Biol. 31, 971–977 (2005).
  • [16] Evans, N. D., Gnudi, L., Rolinski, O. J., Birch, D. J. S. & Pickup, J. C. Non-invasive glucose monitoring by NAD (P) H autofluorescence spectroscopy in fibroblasts and adipocytes: A model for skin glucose sensing. Diabetes Technol. Ther. 5, 807–816 (2003).
  • [17] Li, X., Dunn, J., Salins, D., Zhou, G., Zhou, W., Schüssler-Fiorenza Rose, S. M.,… Snyder, M. (2020). Digital health: Tracking physiomes and activity using wearable biosensors reveals useful health-related information. PLOS Biology, 18(1), e3000615.
  • [18] Eckmann, J. P., Kamphorst, S. O., & Ruelle, D. (1987). Recurrence plots of dynamical systems. Europhysics Letters, 4(9), 973.
  • [19] Webber, C. L., & Zbilut, J. P. (2005). Recurrence quantification analysis of nonlinear dynamical systems. Tutorials in Contemporary Nonlinear Methods for the Behavioral Sciences, 26-94.
  • [20] Gao, J., & Cai, H. (2013). On the structures and quantification of recurrence plots. Physics Letters A, 377(34-36), 2005-2020.
  • [21] Hina et. al. Noninvasive Blood Glucose Monitoring Systems Using Near-Infrared Technology-A Review. Sensors (Basel). 2022
  • [22] Li, X., Ouyang, G., & Richards, D. A. (2019). Prediction of heart rate variability on cardiac disease using recurrence plot analysis. IEEE Access, 7, 54076-54085.
  • [23] Romano, M. C., Thiel, M., Kurths, J., & Kiss, I. Z. (2007). Multivariate recurrence plots. Physics Letters A, 360(3), 330-335.
  • [24] Silva, L. E. V., & Hidalgo, C. A. (2015). Exploring the dynamics of collective social behavior in a very large dataset. Journal of Computational Science, 6, 57-65.