Exploratory insights into prefrontal cortex activity in continuous glucose monitoring: findings from a portable wearable functional near-infrared spectroscopy system

The escalating global prevalence of diabetes highlights an urgent need for advancements in continuous glucose monitoring (CGM) technologies that are non-invasive, accurate, and user-friendly. Here, we introduce a groundbreaking portable wearable functional near-infrared spectroscopy (fNIRS) system designed to monitor glucose levels by assessing prefrontal cortex (PFC) activity. Our study delineates the development and application of this novel fNIRS system, emphasizing its potential to revolutionize diabetes management by providing a non-invasive, real-time monitoring solution. Fifteen healthy university students participated in a controlled study, where we monitored their PFC activity and blood glucose levels under fasting and glucose-loaded conditions. Our findings reveal a significant correlation between PFC activity, as measured by our fNIRS system, and blood glucose levels, suggesting the feasibility of fNIRS technology for CGM. The portable nature of our system overcomes the mobility limitations of traditional setups, enabling continuous, real-time monitoring in everyday settings. We identified 10 critical features related to blood glucose levels from extensive fNIRS data and successfully correlated PFC function with blood glucose levels by constructing predictive models. Results show a positive association between fNIRS data and blood glucose levels, with the PFC exhibiting a clear response to blood glucose. Furthermore, the improved regressive rule principal component analysis (PCA) method outperforms traditional PCA in model prediction. We propose a model validation approach based on leave-one-out cross-validation, demonstrating the unique advantages of K-nearest neighbor (KNN) models. Comparative analysis with existing CGM methods reveals that our paper’s KNN model exhibits lower RMSE and MARD at 0.11 and 8.96%, respectively, and the fNIRS data were highly significant positive correlation with actual blood glucose levels (r = 0.995, p < 0.000). This study provides valuable insights into the relationship between metabolic states and brain activity, laying the foundation for innovative CGM solutions. Our portable wearable fNIRS system represents a significant advancement in effective diabetes management, offering a promising alternative to current technologies and paving the way for future advancements in health monitoring and personalized medicine.


Introduction
The escalating prevalence of diabetes globally accentuates the critical need for effective management strategies, central to which is the monitoring of blood glucose levels (Phillip et al., 2023).Continuous glucose monitoring (CGM) systems have revolutionized diabetes care, offering real-time insights into glucose dynamics, facilitating tighter glucose control, and reducing the risk of complications (Lee et al., 2021).Despite significant advancements, the quest for non-invasive, accurate, and patient-friendly CGM technologies remains at the forefront of diabetes research.
Presently, prevailing methodologies for glucose monitoring encompass approaches like blood sampling through puncture, subcutaneous implantable glucose monitors, cumulative assays, and optical continuous tracking.Regrettably, these approaches have limitations-ranging from invasiveness and discomfort to inadequate sampling frequency, inability to sustain continuous monitoring, and prohibitive costs (Butler et al., 2023).In this context, functional nearinfrared spectroscopy (fNIRS) emerges as a promising tool 4. fNIRS, a non-invasive optical imaging technique, measures hemodynamic responses associated with neuronal activity, providing insights into the underlying mechanisms of various physiological and pathological conditions (Rebelos et al., 2023).Its application in cognitive neuroscience has been particularly noteworthy, enabling researchers to explore the neural correlates of a wide range of cognitive functions (Pinti et al., 2020).The potential of fNIRS to investigate the neural basis of glucose metabolism and its regulation presents an exciting avenue for research, especially in the context of diabetes and metabolic disorders.
The prefrontal cortex (PFC) plays a pivotal role in cognitive functions, including decision-making, impulse control, and the regulation of emotional responses (Ngetich et al., 2020).Functionally connected to the hypothalamus and brainstem, the PFC intricately participates in the human system's endocrine, metabolic, and appetite regulation, thereby assuming a critical mantle in maintaining stable blood glucose levels (de Lima et al., 2022).Furthermore, the PFC extends its influence on blood glucose levels by engaging in intricate neural networks with other cerebral regions.This dynamic interplay significantly shapes higher-order mental activities like cognition, emotion, and behavior (Micha et al., 2011;Lucas et al., 2019).Previous studies have highlighted the PFC's role in inhibiting food intake and its sensitivity to changes in glucose levels, suggesting a complex interplay between cognitive functions and metabolic states (Tataranni et al., 1999;Page et al., 2011).In addition, related studies have demonstrated the PFC's response to hypoglycemia and its role in the counterregulatory response to low blood glucose levels (Choudhary et al., 2018;Nwokolo et al., 2019), underscoring the significance of understanding PFC activity in the context of glucose monitoring.The rationale for focusing on the PFC stems from its critical role in executive functions directly relevant to dietary behavior and glucose regulation (Dohle et al., 2018).The PFC's ability to integrate various types of sensory information, including metabolic signals, and its involvement in complex decision-making processes makes it an ideal candidate for studying the neural basis of CGM.Furthermore, during fasting, blood glucose levels naturally decline, a shift influenced by dietary intake and the intricate mechanisms governing blood glucose regulation within the body (Kumar et al., 2023).Hypoglycemia, characterized by inattention, dizziness, rapid heart rate, cognitive impairment, and mood fluctuations, profoundly impacts the PFC's functionality (McCrimmon, 2021;Zaremba et al., 2023).In the transition to the glucose state, the relevant characteristics are improved, which further affects PFC function.This physiological modulation is intricately tied to the adjustments within the optical properties of the PFC, an interplay that underscores the dynamic influence of blood glucose levels on cerebral dynamics.The complex interplay between hemoglobin levels and blood glucose concentrations within the PFC is a multifaceted orchestration involving an array of interconnected mechanisms, all subject to regulation by various influential factors.Notably, alterations in blood glucose levels directly impact the functional dynamics of the PFC, thereby rippling across domains like cognition, emotion, and decision-making, encapsulating diverse dimensions of brain activity (Deco et al., 2023).Reciprocally, the activity and function of the PFC loop back to exert a feedback influence on blood glucose regulation and HbO.This intricate and bidirectional dance underscores how fluctuations in blood glucose levels directly affect hemoglobin concentrations within the PFC, subsequently imprinting their mark on the response of fNIR light regarding hemoglobin's absorption and scattering properties.It is imperative to highlight that the PFC's role in blood glucose regulation is a realm of enduring interest within neuroscience.
It is noteworthy that the current fNIRS system gathers data via wired connections.The cumbersome nature of this connection method and the stationary desktop setup impede the system's flexibility, constraining the practical application of fNIRS technology (Torricelli et al., 2014).Moreover, optimizing several critical aspects in the design of fNIRS systems is imperative: firstly, refining the layout design of electrodes and optodes is necessary; secondly, embracing a lightweight, highly integrated design is essential to enhance user experience; ensuring the acquisition of high-quality signals is pivotal; adopting an ergonomic design is crucial to provide comfortable wearing experience; developing portable, wearable, lightweight, and flexible devices is imperative; cost reduction, enhancing equipment complexity and reliability, as well as advancing resolution and functionality, are also vital considerations.Hence, developing a novel integrated portable fNIRS system for monitoring blood glucose is essential.
This study utilizes a novel wearable portable fNIRS imaging system to explore the activity of the PFC in CGM.Our lightweight modular design addresses the mobility limitations of previously fixed setups, with critical technical parameters outlined in Table 1.By integrating fNIRS technology with CGM data, we aim to elucidate the role of the PFC in glucose regulation and evaluate fNIRS as a potential tool for monitoring the link between metabolic status and neural activity.However, despite the enormous potential of utilizing fNIRS to explore PFC activity in CGM, our research is currently still in its exploratory and conceptual validation stage.This means that further studies are needed to confirm its feasibility and accuracy, as well as to validate the reproducibility and robustness of the results obtained.This stage requires continuous experimental design and data validation to ensure that the methods and techniques employed can be robustly applied in various real-world settings and study populations.Additionally, a deeper understanding of the relationship between PFC activity and blood glucose dynamics is required, along with exploring its potential role in diabetes management and treatment.Therefore, for research in this field, we still need to conduct more experiments and clinical studies to comprehensively assess its prospects and potential benefits in clinical practice.
2 Materials and methods

Participants
In this study, we enrolled 15 healthy university students (eight males and seven females, ranging in age from 19 to 28 years, with a mean age of 23.35 ± 2.3 and a mean body mass index of 23.17 kg/m 2 ).All participants were affiliated with University of Shanghai for Science and Technology and demonstrated a strong willingness to collaborate.We excluded individuals with acute physical conditions, neurological disorders, history of drug abuse, or chronic or acute diseases that impair brain function, including but not limited to diabetes, renal failure, arrhythmias, and other cardiovascular diseases.The study protocol was approved by the Medical Ethics Committee of Peking University's Sixth Hospital and University of Shanghai for Science and Technology Affiliated Shidong Hospital (approval number 2022371), adhering to the Declaration of Helsinki's guidelines (Stockhausen, 2000) as stipulated by the World Medical Association.Before the experiment, all participants provided written informed consent and were fully briefed on their right to discontinue participation at any point.

Experimental design
To initiate, before the experimental proceedings, meticulous health assessments and psychological orientation were administered to the participants by certified medical professionals, safeguarding their physiological and psychological suitability for active engagement in the study.Before the start of the experiment, participants wore a near-infrared brain function meter and were observed for 5 min to ensure that the blood flow signals in the fNIRS channel were at a steady state.Throughout the experimental protocol, participants sat in a comfortable chair.They were instructed to relax, not to move, speak, or blink too much to avoid noise and stabilize the blood flow in fNIRS channels.The experimental schema was bifurcated into two discernible phases: fasting and the glucose states.
All participants underwent a fasting regimen during the fasting phase, observing a minimum fasting duration of 5 h before the experiment's initiation.Subsequently, the participants' PFC was subjected to continuous monitoring via the fNIRS imager, spanning 10 min.Simultaneously, participants underwent a fingertip blood collection operation, culminating in the acquisition of congruent glucose measurements to serve as a control cohort for validation.
The second stage was the glucose state.All participants drank 50 mL of glucose solution based on their fasting state.Then, the fNIRS imager continuously monitored the participants' PFC for 60 min to obtain their fNIRS data in the glucose state.Participants underwent fingertip blood collection as a control group to get the corresponding blood glucose values.
In this study, we implemented a unique experimental design where each participant served in dual roles as both the experimental subject and their control.The control condition involved monitoring blood glucose levels through fingertip blood sampling, facilitating a direct comparison between the precision and effectiveness of fNIRS technology and conventional blood glucose monitoring techniques while accounting for individual differences.We obtained fNIRS data and blood glucose levels in fasting and glucose-drinking states using fNIRS imager and a blood collection device, further validating the feasibility of using fNIRS to monitor blood glucose levels in PFC.

Overview of the new portable wearable fNIRS system
Our independently designed system comprises custom-made fullhead caps, light sources, photodetectors, integrated miniaturized fNIRS host modules, and components.The entire equipment weighs ≤300 g, with a built-in rechargeable lithium battery, adopting a lightweight, integrated design that places the whole system on the head without needing a backpack.This achieves true portability, is suitable for indoor and outdoor experiments, and ensures participant comfort during activities, as shown in Figure 1.Additionally, the fNIRS experimental setup used in this study comprises 10 emitting light sources (wavelengths 760 nm and 830 nm), eight detectors, and an integrated miniaturized fNIRS host module (dimensions: 8.5 × 8.5 × 3.5 cm, weight ≤300 g), totaling 21 channels, as illustrated in Figures 1B,D,E,H.The system's light source section adopts an LED ring pin design (weight <12 g) and integrates a custom ring buckle fixator to shield ambient light, as depicted in Figure 1G.The light source employs transistor-driven circuits, with control using dualwavelength LEDs employing time-division multiplexing technology.The system's photodetectors utilize a photodiode ring pin design (weight <12 g) and feature a custom ring buckle bracket for convenient light reception, as shown in Figure 1F.These detectors integrate avalanche photodiode operational amplifiers on the same chip, enabling direct conversion of light signals into voltage signal outputs, achieving high-gain, low-noise amplification of weak signals.Moreover, we employ synchronous modulation technology between LED light sources, photodetectors, and digital smoothing algorithms to stabilize detector operation under solid ambient light interference.We integrate light source drive circuits, amplification and filtering circuits, I/V conversion circuits, A/D circuits, wireless communication circuits, ARM processing circuits, and power circuits in the fNIRS host module using low-temperature co-fired ceramic technology, encapsulated in a 3D-printed plastic shell.This process adheres to the principles of a minor, portable, comprehensive system featuring stable and efficiently designed circuits.It controls units such as near-infrared spectrum signal acquisition, light source drive, power supply, and data transmission, as shown in Figures 1B,H.The system employs a flexible fiber cap as a foundation, with perforations fixing the fNIRS light source-detector brackets in specific positions.The spatial range is adjusted via elastic joints to maintain a distance of 30 mm between the light source and detector, carefully positioned uniformly over the PFC (10-20 system), enveloping the PFC surface for near-infrared spectrum data collection, as illustrated in Figure 1C.
The upper computer processing platform plays a crucial role in the system, encompassing tasks such as data communication, data processing, display interface design, and brain function recognition analysis.This section is integrated using Python 3.8 and Visual Studio 2022, with Visual Studio handling tasks such as data communication, data processing, and display interface design.Python handles data Subsequent data processing involves a systematic sequence, including preprocessing, feature analysis and selection, feature extraction, and finally, the construction of prediction models, as depicted in Figure 1B.Additionally, fingertip blood glucose values were obtained from the control group, as shown in Figure 1I.

Data preprocessing
In the fNIRS system, the most fundamental electrical signal is the change in optical intensity measured by photodetectors in brain tissue, reflecting the absorption and scattering of nearinfrared light by brain tissue, which can be used to reveal changes in cerebral blood flow and the oxygenation status of hemoglobin (Liu et al., 2022).Preprocessing this data is a crucial step in nearinfrared calibration, aimed at suppressing various noise and artifacts, enhancing the signal-to-noise ratio, and more accurately estimating the hemodynamic response induced by functional activities (Patashov et al., 2023).This study employs wavelet transformation for data processing, which features a timefrequency window, allowing for more precise analysis of local information, especially effective in handling sharp peak artifact noise and drift trends (Duan et al., 2018).Through multiscale decomposition, wavelet transformation provides more comprehensive information in both time and frequency domains, eliminating motion artifacts (Perpetuini et al., 2021).
We utilized the MATLAB-based graphical user interface program Homer 2 (Huppert et al., 2009) toolkit for analyzing and processing fNIRS data, as depicted in Figure 2. We conducted an automated data quality check (initial trimming) using the enprunchannels function.During this process, channels with excessively weak or solid signals or large standard deviations were removed from the measurement list to ensure data quality.Subsequently, we defined the data extraction parameters [dRange: (1 × 10 −2 to 1 × 10 0 ), signal-to-noise ratio: SNRthresh = 2], obtaining average data for the raw wavelengths of all participants under 21 channels is shown in Figure 3.
Next, we converted the raw wavelength average data into raw optical density (OD) average data using the hmRintensity2OD function, which characterizes light intensity in brain tissue, reflecting changes in cerebral oxygenation levels and blood flow (Wang et al., 2018).Then, the mrMotionArtifactByChannel function was employed to detect and label artifacts on all channels systematically.Based on these labeled artifacts, we performed motion artifact correction using the hmrMotionCorrectWavelet function and statistical dispersion based on the wavelet transform domain, followed by the application of a bandpass filter (0.01-0.1 Hz) to remove random noise induced by instrumentation and physiological noise caused by heart rate/respiration (Bizzego et al., 2020), thereby obtaining pure OD average data.Subsequently, we employed the modified Beer-Lambert law (Nikzad-Langerodi et al., 2020) to convert the filtered pure OD average data into changes in the average concentrations of hemoglobin oxygenation (HbO) and deoxyhemoglobin (HbR), reflecting cerebral oxygenation levels and serving as indicators of PFC functional activity.To further enhance data quality, we utilized the hmrMotionCorrectCbsi function.We employed a correlationbased signal enhancement method to process changes in HbO and HbR concentrations for further motion artifact correction, resulting in pure HbO and HbR signals (Chen et al., 2024).Also, based on relevant studies, HbO is more sensitive to brain activity, and its signal sensitivity and reliability are higher than HbR (Swethasri et al., 2017).Therefore, this study analyzes the average HbO signal of all participants (see Figure 4).
To screen the channels of interest more accurately from the 21 channels, we performed t-tests on the change in mean HbO  concentration in two independent samples from all participants in fasting and glucose states, and the results are shown in Table 2.
Observing Table 2, it becomes evident that instances where p < 0.05 indicates a noteworthy discrepancy in the alteration of mean HbO concentration between the fasting and glucose states within the specific channel.Among the 21 initially considered channels, 7 possessed significant differentials.These channels, specifically the 7th, 12th, 15th, 18th, and 19th, stood out as contributors to notable variations in mean HbO concentration dynamics.By harnessing the insights garnered from these significant channels, it is anticipated that a refined data extraction process minimizes experimental error while optimizing experimental efficiency.

Feature analysis
Following completion of the data processing, this study extracted 10 critical characteristic features of mean HbO concentration variations from seven notable channels in the fasting and glucose states, which include mean (λ 1 ), standard deviation (λ 2 ), mean (λ 3 ), and standard deviation (λ 4 ) of the first-order difference, mean (λ 5 ) and standard deviation (λ 6 ) of the secondorder difference, peak (λ 7 ), peak-to-peak (λ 8 ), energy (λ 9 ), and energy entropy (λ 10 ).λ 1 represents the mean of the change in mean HbO concentration over the monitoring time, and this feature reflects the average activity level profile of the PFC in the fasting and glucose states.
where T is the number of time points, and x i represents the change in mean HbO concentration within the first time point.A measure of the degree of change in mean HbO concentration can be obtained as the standard deviation λ 2 .This feature reflects the fluctuations in mean HbO concentration in the PFC in the fasting and glucose states.
λ 3 is the mean of the first-order difference, which represents the average rate of change of mean HbO concentration in the fasting and glucose states and is used to characterize the dynamics of activity in the PFC.

(
) where ∅x is the difference in mean HbO concentration between adjacent periods.The standard deviation λ 4 of the first-order difference series can be obtained, which reflects the dynamic range of mean HbO concentrations in the PFC in the fasting and glucose states.
We obtain λ 6 , the standard deviation of the second-order difference, a feature that reflects the degree of fluctuation in the rate of change of mean HbO concentration in the PFC in the fasting and glucose states.
λ 7 is the maximum value of the mean HbO concentration change, and this feature reflects the strongest response and the significant response of the PFC activity in the fasting and glucose states.
where ψ max is the maximum value of mean HbO concentration during the monitoring time.The difference between the peak and the minimum value of the HbO concentration, i.e., the peak-to-peak value λ 8 is obtained, and this feature reflects the maximum fluctuation amplitude of the mean HbO concentration of the PFC in the fasting and glucose states.
where ψ min is the minimum value of mean HbO concentration during the monitoring time.λ 9 represents the total energy of the mean HbO concentration, a feature used to characterize the intensity of the PFC activity in the fasting and glucose states.The primary objective of this study is to employ principal component analysis (PCA) techniques for feature extraction from mean HbO levels in both fasting and glucose states of fNIRS data, resulting in a novel set of feature sets exhibiting significant outcomes (Fujiwara et al., 2022).This approach offers a distinct advantage by significantly reducing the data's complexity, thereby enhancing the efficiency of subsequent analyses.However, it is essential to note that there is a potential trade-off, as some critical feature information may need to be recovered during the dimensionality reduction process.Thus, in this study, our approach extends beyond applying the traditional PCA algorithm; we conduct in-depth refinements and optimizations to ensure that the new feature vectors possess more comprehensive and accurate information expression capabilities.
We  )( ) where x k is the number of the k th training set and Φ is the matrix device.it can be obtained by effective feature decomposition of the training matrix: where C 1 , C 2 , C 3 … C a are a set of eigenvectors, and λ 1 , λ 2 , λ 3 … λ a are the corresponding eigenvectors.According to the result of eigen decomposition, we can obtain the intraclass scattering matrix: where n is the total number of classes in the dataset and x i a i ( ) is the jth training set in the ith class.Based on this setting, we can obtain the inter-class scattering matrix: where a i is the number of datasets of class ith, K i is the mean value of datasets of class ith, and K is the mean value of datasets, we can get the ξ C k ( ) value of the feature vector.
( ) where C k is the feature vector of the k th training set.We perform a decreasing rule on the ξ C k ( ) values to effectively order the feature vectors C 1 , C 2 , C 3 … C a to obtain a new set of feature vectors ϑ .
[ ] where the ϑ 1 eigenvector corresponds to the maximum value of ξ C k ( ).By projecting the k th training set x k and test set z k onto the feature vector ϑ, the following can be obtained: where θ k is the projection of the training set counts on the feature vector ϑ and ω k is the projection of the test set count on the feature vector ϑ.By employing the decreasing-rule principal component analysis (DR-PCA), we could derive a new set of eigenvectors with higher explanatory power.This enhancement facilitated a more accurate breakdown of the changes in mean HbO levels during fasting and glucose states in fNIRS data.Additionally, we implemented an advanced time series feature selection technique to optimize the model's performance further.This involved employing a learning algorithm for feature search, which refined the selection of features based on the retention of the most optimal ones.Through this dual feature selection strategy, we could accurately identify the crucial components of the brain's activity state, as depicted in Figure 5.
To optimize the learning algorithm even further and control its parameters effectively, a flexible weighting pattern was employed to adjust the degree of influence of different features on the model, whose feature contributions are shown in Figure 6.With this weighting scheme, it is possible to regulate the flexibility and robustness of the model more precisely, thus making its performance optimal.
As depicted in Figure 6, once the cumulative contribution rate surpasses a significant threshold of 90%, it is reasonable to infer that these principal components have effectively preserved the essential information, rendering the contribution of the remaining features marginal and inconsequential.This approach facilitates data reduction and extraction of crucial parts, thereby furnishing efficient and precise foundational elements for subsequent data analysis and model development.

fNIRS data and blood glucose correlation analysis
In this study, a Pearson correlation analysis (Hasan et al., 2020) was performed on the relationship between 10 features (λ 1 to λ 10 ) of fNIRS data and proper blood glucose levels in 15 subjects in fasting and glucose states.The aim was to investigate the potential relationship between fNIRS and blood glucose levels during glucose monitoring.Assume that the fNIRS data is matrix X , dimension n m × , with each row representing a participant and each column representing a feature, n for samples and m for fNIRS data features.The blood glucose data matrix is G and dimension n ×1.from this, we calculate the mean vector as where X i and G i denote the fNIRS data and blood glucose value of the ith sample, respectively.Then we obtained the centered data matrix where 1 is an all-1 vector of size n ×1.We then compute the covariance matrix Next, we can obtain the self-covariance We calculated the Pearson correlation coefficients of the 10 features (λ 1 to λ 10 ) of the fNIRS data with blood glucose values as

R S S S xy xx yy
= By analyzing the correlation coefficient R, we can understand the degree of association between fNIRS data and blood glucose levels.In addition, to facilitate the comparison between fNIRS data and blood glucose levels, we normalized data x(n) using z-score zero-mean normalization to reduce individual differences (Xu et al., 2022).
Flow chart of feature extraction.where x is the mean of this data, σ is the standard deviation of this data, and the processed data y n ( ) conforms to a standard normal distribution, resulting in the results of the correlation test between the fNIRS data and the blood glucose levels.

Predictive modeling
This study thoroughly explored a series of machine-learning techniques through optimal strategies to establish a reliable model for predicting blood glucose levels.These techniques include Random Forest (RF), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and XGBoost (Khan et al., 2021;Aouedi et al., 2022;Maher et al., 2023).We conducted a comprehensive evaluation of the effectiveness of each method in the context of this study.Through systematic exploration and comparison, we ultimately identified a meticulously tailored and effective model capable of reliably predicting blood glucose levels.
The training process for all models was carried out using nested leave-one-subject-out (LOSO) cross-validation, which incorporates both hyperparameter tuning and model evaluation (Blume et al., 2021;Wainer and Cawley, 2021).We divided the data collected from 15 participants into 15 datasets, each containing mean HbO concentration variations from a single participant.During each training iteration, the data from one participant (i.e., 1 fold) was retained as the test set, while the data from the remaining individuals (i.e., 14 folds) were used for model training.This process was repeated 15 times, with different participants tested each iteration.Additionally, we extensively exploit predictive error values to compute the mean, variance, and statistical distributions, thereby comprehensively understanding the model's performance.We evaluate the model's adaptability from both fitting error and prediction error perspectives, enabling a comprehensive assessment of the model's performance across various aspects.
3 Results and analysis

Correlation of fNIRS data from the prefrontal cortex with blood glucose levels
This study involved a comparison between the continuously monitored fNIRS mean data (from the 19th channel, which showed significant relevance) of all participants throughout the process and the mean blood glucose data of the control group, as illustrated in Figure 7.
As shown in Figure 7, the mean blood glucose level and fNIRS mean data maintained relatively low levels during the fasting state and displayed a stable trend.However, upon transitioning to the glucose state, both parameters experienced a rapid increase, reaching a peak within a specific timeframe, followed by a subsequent decrease to a certain range before stabilizing.This observed pattern underscores a correlation between blood glucose levels and fNIRS data.
To precisely quantify the correlation between fNIRS data and blood glucose levels, we performed Pearson correlation analysis, with the results presented in Table 3.
When analyzing the Pearson correlation results between the nearinfrared features (λ 1 to λ 10 ) and blood glucose levels (G), we found that   Frontiers in Neuroscience 12 frontiersin.orgλ 8 , λ 9 , and λ 10 displayed strong positive correlations (with respective r values of 0.463, 0.572, and 0.692) and highly significant statistical significance (all p-values were 0.000), indicating that they may be reliable indicators for monitoring or predicting changes in blood glucose.λ 1 and λ 7 also exhibited moderate positive correlations (with r values of 0.401 and 0.324, respectively) and statistical significance (with p-values of 0.015 and 0.003, respectively), while the correlations of other features (λ 2 , λ 3 , λ 4 , λ 5 , and λ 6 ) were weaker and not statistically significant, implying that their association with blood glucose levels may not be as apparent or may require further research to determine their relevance.Based on experimental research involving continuous monitoring of blood glucose levels in the PFC using near-infrared spectroscopic imaging, we have preliminarily confirmed the feasibility of this technique in the field of blood glucose monitoring.

Mechanisms correlating changes in prefrontal hemoglobin concentration and blood glucose levels
Our investigation focused on elucidating the mechanisms underlying the relationship between changes in prefrontal hemoglobin concentration and blood glucose levels, as depicted in Figure 8.Our analysis revealed dynamic fluctuations in prefrontal hemoglobin concentration in response to variations in blood glucose levels.Specifically, participants exhibited relatively stable prefrontal hemoglobin levels during the fasting state, indicating a baseline metabolic state.However, upon transitioning to the glucose state, a rapid increase in prefrontal hemoglobin concentration was observed, reaching peak levels within a specific timeframe.This surge in prefrontal hemoglobin levels suggests heightened metabolic activity in the PFC following glucose intake (Bini et al., 2022;Schwartz et al., 2023).Furthermore, this aligns with the results of the previous correlation analysis, indicating a direct relationship between cerebral metabolic activity and systemic glucose availability.Although we have proposed several possible mechanisms at this stage, further experimental research is needed to delve deeper into and validate the specific mechanisms.These findings provide new insights into understanding the effects of blood glucose changes on brain function and also offer a theoretical basis for utilizing fNIRS technology for glucose monitoring and management.

Impact of feature vectors of PCA and DR-PCA on the accuracy of prediction results
We conducted a series of comparison experiments to evaluate our proposed algorithm's advancement and performance advantages in depth.First, we used the traditional PCA and DR-PCA algorithms as a control group and extracted 1 to 6 feature vectors, respectively (Ho et al., 2019).Subsequently, the extracted feature vectors were input into the KNN model for further processing, and finally, the respective forecast accuracies were obtained, as shown in Table 4.
As indicated in Table 4, our proposed DR-PCA algorithm performs well with a different number of features.Compared to the traditional PCA method, the optimized algorithm exhibits superior performance and stability in feature extraction, leading to enhanced accuracy in subsequent forecast glucose levels.Furthermore, by incorporating the KNN model for further processing, we effectively integrate the critical aspects of feature extraction and forecast, improving algorithm performance.Specifically, we observe a progressive enhancement in forecast accuracy with the increase in the number of features, affirming the reliability and efficacy of our algorithm.Additionally, upon thorough analysis and application of the newly generated features, significant distinctions were observed in discerning brain activities in the fasting and glucose states, underscoring the effectiveness and precision of the feature selection method.

Prediction model accuracy and reliability analysis
A series of validation trials were executed to validate the accuracy and stability of the constructed model fully.In these experiments, PFC spectral data was collected from the participants in real-time, and these data were inputted into the prediction model for real-time prediction of blood glucose levels.Simultaneously, the actual blood glucose values of the participants were calculated using the fingertip blood collection method to compare and analyze the prediction results with the exact values shown in Figure 9.
As evident from Figure 9, the KNN model shows significant advantages.Compared to the other three models, the KNN model showed lower root mean square error (RMSE) and mean absolute relative deviation (MARD) of 0.11 and 8.96%, respectively, and a highly significant positive correlation with actual blood glucose levels (r = 0.995, p < 0.000).By introducing advanced data processing techniques and model construction methods, we successfully broke through the limitations of traditional methods and realized more accurate and reliable prediction results.Through comparative experiments and practical validation, we verified that the prediction model we constructed is theoretically superior and achieves remarkable results in practical application, providing strong technical support for the accurate prediction of blood glucose levels.
To gain deeper insights into the performance of the selected model, we employ a comprehensive approach for its evaluation, the results of which are illustrated in Figure 10.
As depicted in Figure 10, our approach is grounded in data-driven methodologies, employing a mathematical model to distill critical features from the dataset.The cross-validation method consistently refines the structure and parameters of the KNN model, ultimately designating it as the optimal choice.Furthermore, the model boasts non-invasiveness, precision, stability, continuous monitoring, and real-time alerts, ushering in new prospects for blood glucose monitoring and managing diabetic patients.Simultaneously, it provides a valuable reference for crafting personalized treatment regimens.

Results and discussion
Our study presents a groundbreaking approach to monitoring blood glucose levels using a portable, wearable fNIRS system.The correlation analysis between fNIRS data from PFC and blood glucose levels revealed significant insights.During fasting states, the average blood glucose levels and fNIRS data exhibited a stable trend, rapidly increasing upon transition to glucose states, peaking within a specific timeframe before stabilizing.This pattern underscores the potential of fNIRS technology in tracking glucose fluctuations, offering a non-invasive alternative to traditional blood glucose monitoring methods.
Furthermore, it is noteworthy that the strong correlation between λ 8 , λ 9 , and λ 10 with blood glucose levels suggests that they may serve as reliable biomarkers for monitoring or predicting changes in blood glucose.Additionally, λ 1 and λ 7 also exhibit a certain degree of positive correlation and significance, indicating they may also hold research value.Conversely, other features (λ 2 -λ 6 ) demonstrate weaker or non-significant correlations, suggesting their relationship with blood glucose levels may not be sufficiently close or may require further investigation with larger sample sizes.These findings are consistent with previous research, indicating the sensitivity of specific fNIRS data to changes in blood glucose concentration.However, our study extends these findings and confirms the feasibility of real-time monitoring using wearable fNIRS systems, representing a significant advancement compared to previous fixed-system approaches.
Our study delves into the complex interplay between PFC hemoglobin and blood glucose levels.It highlights how hypoglycemia affects PFC functionality and elucidates the body's metabolic adjustments to maintain normal function.Through glucose intake, blood glucose levels rise, triggering increased metabolic activity in the PFC.This leads to changes in HbO and HbR concentrations, reflecting   Flowchart of leave-one-out cross-validation method.The design of our portable wearable fNIRS system represents a significant leap forward in the field of non-invasive glucose monitoring.Weighing ≤300 g and integrating a rechargeable lithium battery, the system offers true portability and comfort for indoor and outdoor experiments.This design overcomes the limitations of traditional, cumbersome fNIRS systems and ensures high-quality data acquisition by maintaining consistent contact with the scalp without restricting participants' movements.In addition, we conducted a thorough comparative analysis of the critical technical parameters between existing fNIRS systems and our innovative engineered system, highlighting the latter's significant advantages across various critical dimensions (see Table 5).Our system adopts the dualwavelength near-infrared technology established in previous studies (Güven et al., 2020).We have expanded the number of channels, resulting in more intricate signal acquisition and higher resolution, thereby enhancing the sensitivity of biological signals.In our system, the higher fNIRS sampling rate adeptly captures the rapid dynamics of biological signals, offering unique benefits for real-time monitoring.Furthermore, optimizing photodetector spacing through multidistance measurements enhances the accuracy of subcortical process monitoring.Our contemporary data transmission infrastructure ensures seamless real-time processing of extensive datasets, bolstering our capacity to conduct comprehensive, large-scale studies.The highdensity measurement layout enables precise spatial mapping of biological signals and facilitates detailed examination of subtle changes between brain regions.Our system's modular structure and intuitive interface significantly reduce operational complexity, allowing researchers to devote more attention to experimental design and data interpretation.Moreover, its compact, portable configuration is ideally suited for laboratory use and sets the stage for practical implementation in domains such as personalized healthcare and realtime emotion tracking.Our system exhibits significant performance enhancements through thorough comparative evaluation and innovative design and establishes a robust foundation for future research in brain-machine interfaces.
In addition, our study employed a series of comparative experiments to assess the performance of our proposed algorithm.The results indicate that the optimized algorithm demonstrates improved performance and stability in feature extraction, thereby enhancing the accuracy of subsequent blood glucose level predictions.We effectively enhanced the algorithm's performance by integrating key feature extraction and prediction aspects via the KNN model.As the number of features increased, predictive accuracy gradually improved, affirming the reliability and effectiveness of our algorithm.Additionally, identifying brain activity differences between fasting and glucose states underscores the efficacy and precision of feature selection methods.
Our predictive modeling approach, utilizing RF, SVM, KNN, and XGBoost techniques, enabled us to construct a model for predicting blood glucose levels, and we evaluated the accuracy and stability of the model through nested leave-one-out cross-validation.The results indicate that the KNN model exhibited significant advantages in predicting blood glucose levels.This approach surpassed traditional predictive models by combining dual feature selection strategies, allowing for more precise identification of brain activity features associated with glucose levels.Specifically, our model demonstrated lower RMSE and MARD, at 0.11 and 8.96%, respectively.Compared to other non-invasive blood glucose monitoring systems, our system provides more accurate predictions that are closer to observed values (see Table 6).Furthermore, our system exhibited a highly significant positive correlation with actual blood glucose levels (r = 0.995, While our study provides innovative insights into the use of fNIRS technology in the field of blood glucose monitoring, it is essential to acknowledge its limitations.These include a relatively small sample size (only 15 participants), lack of diversity and representativeness in the sample, reliance on a single technical device, limited types of controlled variables, and absence of long-term monitoring data.These factors may affect the generalizability and depth of the results.Additionally, our research utilized a portable wearable fNIRS system for blood glucose monitoring.Although this system offers many advantages, its measurement accuracy and precision may not match traditional clinical standards.Future studies should focus on enhancing the system's accuracy, exploring the use of advanced algorithms for data analysis, and conducting large-scale clinical trials to validate the effectiveness of this technology across different populations.

Conclusion
In this pioneering study, we have introduced and investigated a novel portable wearable fNIRS system for CGM, marking a significant advancement in the non-invasive tracking of glucose levels.Our research demonstrates the system's efficacy in PFC activity with blood glucose levels, providing a promising new avenue for diabetes management and metabolic research.Through meticulous experimentation involving both fasting and glucose-loaded states among participants, we have established a robust correlation between PFC activity and blood glucose levels, as captured by our fNIRS system.This correlation, underscored by the KNN model that surpasses traditional CGM methods, highlights the potential of fNIRS technology in revolutionizing glucose monitoring by offering a non-invasive, real-time, and user-friendly alternative.Our findings underscore the feasibility of utilizing fNIRS for CGM and illuminate the intricate relationship between metabolic states and brain activity.Furthermore, developing a lightweight, portable, and highly accurate fNIRS system addresses the critical need for more adaptable and less intrusive CGM solutions.By overcoming the limitations of current technologies-such as invasiveness, the need for frequent calibration, and limited mobility-our system paves the way for enhanced patient compliance and broader applicability in daily life scenarios.
However, despite the potential significant connection between PFC and blood glucose regulation, the exploration of PFC activity during the CGM process using fNIRS remains in the preliminary exploratory and conceptual validation stage.This implies that, so far, the research community has not fully utilized fNIRS technology to systematically study this neurophysiological phenomenon.In the existing literature, reports on the real-time monitoring of brain activity related to glucose using fNIRS are relatively scarce and mostly confined to theoretical speculation or initial experimental stages.Therefore, this study aims to conduct a series of experiments to systematically apply fNIRS technology for the first time to explore PFC activity associated with changes in blood glucose levels, attempting to reveal how cognitive function interacts with glucose regulation.Through this pilot study with a limited sample size, we have preliminarily validated the feasibility of fNIRS application in this field and laid the groundwork for subsequent larger-scale and more in-depth research.Our goal is to evaluate whether fNIRS measurements of brain activity indices can reflect changes in blood glucose levels and explore its potential as a non-invasive CGM tool.Through this conceptual validation stage of research, we hope to provide scientific evidence and innovative insights for achieving more efficient and personalized blood glucose monitoring for future diabetic patients.

FIGURE 1
FIGURE 1 Schematic diagram of the portable wearable fNIRS system and visualization of the experimental process.(A) fNIRS experimental principle.(B) Flowchart of the experimental setup and data processing.(C) Layout of the number of channels in the PFC.(D) Layout of the number of channels in the sourceprobe-channel.(E) Source-probe device.(F) Photoelectric detector.(G) Light source.(H) fNIRS host module.(I) Fingertip glucose test.
FIGURE 4 Changes in average HbO concentration across all participants at 21 channels.(A) Changes in average HbO concentration in channels 1-5.(B) Changes in average HbO concentration in channels 6-10.(C) Changes in average HbO concentration in channels 11-15.(D) Changes in average HbO concentration in channels 16-21.
HbO denotes the change in concentration over the period; t denotes the length of the period.The energy entropy λ 10 represents a measure of uncertainty in the energy distribution of the signal.It is used to characterize the complexity and stochasticity of the mean HbO concentration in the PFC in the fasting and glucose states.
.2 Feature extraction and selection have succeeded in effectively dividing the corresponding dataset into training and testing sets based on the corresponding dataset, and further set up a training matrix Γ , based on the training set, which can be obtained: Γ ∈ Η a b × where a is the number of training sets and b is the dimension of the training sets.Based on this setting, we can derive the average value of the number of training sets: is the j th training set.We can get the covariance matrix of this training set:

(
FIGURE 7Comparative analysis of fasting and glucose states blood glucose levels and fNIRS spectral data trends.(A) Fasting and glucose states blood glucose levels.(B) Fasting and glucose states fNIRS spectral data in channel 19.

FIGURE 8
FIGURE 8Visualization of PFC blood glucose-HbO-HbR correlation in the fasting and glucose states.
FIGURE 9 Comparison of the results of the prediction model with the measured blood glucose values.(A) RF prediction model results.(B) SVM prediction model results.(C) KNN prediction model results.(D) XGB prediction model results.

FIGURE 10
FIGURE 10 TABLE 1 fNIRS system main technical specifications.

TABLE 2 t
-test and variance results for 21 channels for all participants based on predefined conditions.

TABLE 3
Pearson correlation analysis.

TABLE 4
Forecast accuracy of PCA and DR-PCA feature vectors.

TABLE 5
Comparison of main parameters of fNIRS systems.