- 1Jinzhou Medical University,The Third Clinical Medical College, Jinzhou, Liaoning, China
- 2Department of Respiratory and Critical Care Medicine, First Affiliated Hospital of Xi’an Jiaotong University, Xi’an, Shanxi, China
- 3Department of International Medical Center, First People’s Hospital of Foshan, Foshan, Guangdong, China
- 4Department of Neurology, Xiamen Humanity Hospital, Fujian Medical University, Xiamen, Fujian, China
Background: Glycemic variability (GV), typically quantified by the coefficient of variation (CV) and the root mean square of successive differences (rMSSD), has been recognized as a potential predictor of poor outcomes in critically ill patients. However, its prognostic value in neurosurgical populations remains unclear. This study investigated the association between postoperative GV and mortality following craniotomy.
Methods: We retrospectively analyzed 1,969 adult ICU patients who underwent cranial surgery. GV was measured using both CV and rMSSD calculated from blood glucose values during the ICU stay. The primary outcome was 28-day all-cause mortality; the secondary outcome was 90-day mortality. Multivariable Cox regression, restricted cubic splines, threshold effect analysis, and mediation analysis via blood urea nitrogen (BUN) were conducted. A Random Survival Forest (RSF) model was developed using machine learning and interpreted with SHAP values.
Results: Higher GV, as reflected by both elevated CV and rMSSD, was independently associated with increased 28-day and 90-day mortality (CV per 10-unit HR: 1.20; rMSSD per 10-unit HR: 1.02; all P < 0.01). BUN partially mediated the association between GV and mortality. GV outperformed traditional clinical scores (SOFA, GCS, CCI) in ROC analysis (CV AUC = 0.72). The RSF model achieved an AUC of 0.841 and identified GV metrics as top predictors.
Conclusions: Postoperative glycemic variability, assessed by CV and rMSSD, is an independent and modifiable predictor of short- and mid-term mortality following craniotomy. These findings highlight the clinical importance of GV in postoperative risk stratification and support its integration into neurosurgical critical care.
1 Introduction
Neurosurgical procedures are among the most complex and resource-intensive interventions in modern medicine, frequently employed to treat acute neurological emergencies such as traumatic brain injury, intracerebral hemorrhage, and space-occupying lesions (1, 2). Globally, an estimated 22.6 million individuals require neurosurgical care annually due to neurological conditions or injuries, with approximately 13.8 million necessitating surgical intervention (3). Among these procedures, craniotomies are considered particularly hazardous and impose a substantial economic burden (4). A study of high-risk craniotomy patients reported a 6-month mortality rate of 21%, with 43% experiencing poor outcomes—including death and severe disability (2, 5). The early postoperative period following craniotomy is particularly hazardous, characterized by rapid physiological changes and a significantly increased risk of mortality due to secondary brain injury caused by metabolic and inflammatory disturbances (6, 7). The development of cost-effective and simple biomarkers and mortality risk assessment models is urgently needed to improve postoperative management and outcomes.
Significant glycemic fluctuations are frequently observed in patients following neurosurgical procedures (8), primarily driven by neuroendocrine stress responses, perioperative inflammation, and iatrogenic factors such as glucose-containing infusions (9, 10). Increasing evidence suggests that such glycemic variability (GV) may exacerbate secondary brain injury through mechanisms including oxidative stress, endothelial dysfunction, mitochondrial impairment, and activation of neuroinflammatory cascades (11, 12). Both in vitro and human studies have demonstrated that GV induces more pronounced oxidative and endothelial injury than sustained hyperglycemia (13, 14). Notably, a large multicenter study found that GV was a stronger predictor of ICU mortality than mean glucose levels (15). Recent investigations have also linked GV to increased mortality in patients with atrial fibrillation and coronary artery disease (16, 17). However, its prognostic value in patients undergoing neurosurgical procedures remains poorly defined.
To quantify postoperative GV, we employed two complementary metrics: the coefficient of variation (CV) and the root mean square of successive differences (rMSSD) between consecutive glucose measurements (16). In this study, we aimed to evaluate the association between postoperative GV—measured by CV and rMSSD—and short-term and mid-term mortality in patients undergoing craniotomy. By characterizing the prognostic implications of GV in this high-risk population, we sought to identify modifiable risk markers that could inform postoperative management, improve clinical outcomes, and support the development of a mortality prediction model for neurosurgical patients that may be used in routine clinical practice.
2 Materials and methods
2.1 Research design
The MIMIC-IV v3.1 database is a freely accessible critical care database that includes de-identified data from ICU patients. This version was released on October 11, 2024, it contains ICU admission records spanning from 2008 to 2022, which is the full period currently available with structured clinical data. The database includes detailed information on demographics, vital signs, laboratory results, medications, diagnoses, and clinical outcomes, enabling large-scale retrospective clinical research. For this study, author Ge (ID: 13547277) followed the required data use protocols and was responsible for extracting the data from the MIMIC-IV v3.1 database, ensuring compliance with privacy and ethical guidelines.
The patient inclusion flow for this study is outlined as follows. Initially, 2,743 patients who were admitted to the ICU for the first time following cranial surgery were identified. After applying the inclusion criteria, 774 patients were excluded. Exclusion criteria included age under 18 years (n=0), ICU stay duration of less than 24 hours (n=380), and fewer than 3 blood glucose measurements (n=394). The remaining 1,969 patients constituted the final analysis cohort. This cohort was then subdivided into two groups based on survival status at 28 days: 1,713 patients survived, and 256 patients did not survive (Supplementary Figure S1).
2.2 Data gathering
Data were extracted from the MIMIC-IV v3.1 database using PostgreSQL software, focusing on first-day ICU admission data from patients who underwent cranial surgery, identified by ICD-coded procedures including craniotomy, cerebral or meningeal tissue resection, ventricular drainage or shunting, dural repair or replacement, and other major intracranial operations performed via open or percutaneous approaches. The collected data included patient demographics, vital signs, clinical scores, comorbidities, laboratory test results, treatments, and clinical events. Specifically, demographic information such as age, gender, race, and weight were recorded, along with vital signs including heart rate, blood pressure, respiratory rate, temperature, and oxygen saturation (SpO2). Clinical scores such as Sequential Organ Failure Assessment (SOFA), Glasgow Coma Scale (GCS), and Charlson Comorbidity Index (CCI) were also included, alongside information on comorbidities including myocardial infarction, heart failure, chronic pulmonary disease, cancer, acute kidney injury (AKI), sepsis, hyperlipidemia, diabetes, and hypertension. Laboratory results recorded included red blood cell count (RBC), white blood cell count (WBC), platelet count, sodium, potassium, calcium, international normalized ratio (INR), prothrombin time (PT), activated partial thromboplastin time (PTT), blood urea nitrogen (BUN), creatinine, and urine output. Treatment data comprised the use of epinephrine, norepinephrine, neuroblockers, insulin, statins, ondansetron, Proton Pump Inhibitors (PPI), propofol, and mannitol. Clinical events, such as length of hospital stay, ICU stay, hospital mortality, ICU mortality, and 90-day hospital mortality, were also collected.
2.3 Calculated variables and clinical outcomes
GV was assessed using two complementary metrics calculated over the entire ICU stay: the CV and the rMSSD. CV reflects overall glucose dispersion and is calculated using the formula: CV = (σ/μ)×100. where σ is the standard deviation of all blood glucose measurements and μ is the mean blood glucose level, expressed as a percentage. To evaluate short-term glycemic fluctuations, we also calculated rMSSD, which captures dynamic changes between consecutive glucose values. The formula is: rMSSD = sqrt[(1/(N–1))×Σ(BGi–BGi−1)²]. where BGi–BGi−1 represent two consecutive blood glucose readings, and N is the total number of measurements. This approach provides a time-sensitive indicator of short-term glycemic variability.
The primary outcome of this study was 28-day all-cause mortality, and the secondary outcome was 90-day all-cause mortality during the hospital stay.
2.4 Statistical methods
Descriptive statistics were performed for all participants. Continuous variables were expressed as either mean ± standard deviation (SD) for data following a normal distribution, or as median and interquartile range (IQR) for data with skewed distributions. To assess group differences, categorical variables were analyzed using the chi-squared test. For continuous data, the Student’s t-test was applied for normally distributed variables, while the Mann–Whitney U test was utilized for variables with skewed distributions. Variables with more than 15% missing data were excluded from the analysis. For variables with less than 15% missingness, multiple imputation was performed to handle missing values (Supplementary Table S1).
2.5 Analysis of the association between GV and clinical outcomes
Kaplan-Meier (KM) curves were used to explore the relationship between CV, rMSSD, and clinical outcomes, based on quartiles of CV and rMSSD. The log-rank test was used for group comparisons. Multivariable Cox proportional hazards regression was conducted to investigate the association between CV, rMSSD, and clinical outcomes, adjusting for demographic factors, comorbidities, and treatment measures. Restricted cubic splines (RCS) with three knots were employed to explore potential non-linear relationships between CV, rMSSD, and clinical outcomes. Threshold effect analysis was performed to identify inflection points for CV and rMSSD, determining the values that may represent turning points in the association with clinical outcomes. Interaction tests were conducted to evaluate potential interactions between CV, rMSSD, and other clinical variables, including demographic characteristics, comorbidities, and treatments. Mediation analysis was performed to investigate whether BUN acted as a mediator in the relationship between CV, rMSSD, and clinical outcomes. Receiver operating characteristic (ROC) curves were constructed to assess the diagnostic performance of CV and rMSSD in predicting clinical outcomes, with area under the curve (AUC) used to quantify accuracy.
2.6 Prediction model methodology
The original dataset was split into a 70% training set and a 30% validation set. All variables in the training set were included in feature selection using both Lasso and Boruta methods for clinical outcomes. However, for the sake of model simplicity, only the SOFA and CCI were considered as clinical scores in the feature selection process, while other clinical scores were excluded. This decision was made to ensure the predictive model remained simple and interpretable. The important features identified by LASSO and Boruta were then intersected to form a final set of features for model training. The models, including Cox Proportional Hazards Model (CoxPH), Classification and Regression Trees (CART), Gradient Boosting Machine (GBM), Ridge Regression (Ridge), Elastic Net (ENet), Neural Network (NN), Random Survival Forest (RSF), and Extreme Gradient Boosting (XGBoost), were trained using these selected features.
During the training process, grid search was employed to optimize model parameters. After training, the model’s performance was evaluated on the validation set using performance metrics such as the ROC curve, decision curve analysis, and calibration curve. The optimal model was further interpreted using SHAP values to explain the contributions of individual features. Finally, the best-performing model was deployed on a web platform for practical use.
The statistical analyses were conducted using R software (version 4.4.2), and statistical significance was set at a two-sided P-value of less than 0.05.
3 Results
3.1 Baseline characteristics
Table 1 shows significant differences between the 28-day survival and non-survival groups for several variables with P-values < 0.05. CV and rMSSD were particularly noteworthy, with both showing significant differences between the two groups. Additionally, respiratory rate, temperature, SOFA score, GCS, CCI, and urine output also demonstrated significant variations. Comorbidities such as congestive heart failure, malignant cancer, AKI, sepsis, diabetes, and hypertension had p-values < 0.05. Laboratory results for INR, PT, PTT, BUN, creatinine, and platelet count also showed significant differences. Treatment use, including epinephrine, norepinephrine, insulin, ondansetron, propofol, and mannitol, was significantly higher in the non-survival group with P-values < 0.05.
3.2 Association between GV and 28-day and 90-day all-cause mortality
Table 2 presents the multivariable Cox regression analysis for CV and rMSSD with 28-day and 90-day all-cause mortality in Model 3, which is fully adjusted for age, gender, race, weight, CCI, diabetes, respiratory rate, WBC, platelet, INR, insulin, and propofol use. The variables selected for this multivariable Cox regression model were based on univariate Cox regression (Supplementary Table S2), the Boruta algorithm, and clinical expert recommendations.
For 28-day hospital mortality, CV per 10 units was significantly associated with increased mortality risk (HR: 1.20, 95% CI: 1.14–1.27, P < 0.001). The highest quantile of CV (Q4) showed a strong association with mortality when compared to the lowest quantile (Q1) (HR: 7.72, 95% CI: 4.32–13.81, P < 0.001). For rMSSD, each 10-unit increase was significantly associated with increased mortality risk (HR: 1.02, 95% CI: 1.01–1.03, P = 0.004). The highest quantile of rMSSD (Q4) also showed a strong association with mortality when compared to Q1 (HR: 4.64, 95% CI: 2.86–7.54, P < 0.001).
For 90-day hospital mortality, CV per 10 units remained significantly associated with an increased risk (HR: 1.19, 95% CI: 1.13–1.25, P < 0.001). The highest quantile of CV (Q4) showed a strong association with mortality when compared to Q1 (HR: 4.41, 95% CI: 2.97–6.56, P < 0.001). Similarly, each 10-unit increase in rMSSD was significantly associated with higher mortality risk (HR: 1.02, 95% CI: 1.01–1.03, P = 0.002). The highest quantile of rMSSD (Q4) showed a strong association with mortality compared to Q1 (HR: 3.27, 95% CI: 2.24–4.76, P < 0.001).
In the Kaplan-Meier curve analysis, the highest quantile (Q4) for both CV and rMSSD showed the highest mortality rates compared to Q1, and the log-rank P-value for both variables was < 0.001, indicating that with the increase in blood glucose fluctuations, the risk of mortality significantly rises (Figure 1).

Figure 1. Kaplan–Meier survival curves for 28-day and 90-day mortality stratified by glycemic variability quartiles. (a) CV and 28-day mortality. (b) CV and 90-day mortality. (c) rMSSD and 28-day mortality. (d) rMSSD and 90-day mortality. CV, coefficient of variation; rMSSD, root mean square of successive differences.
3.3 Nonlinear relationship between GV and 28-day and 90-day all-cause mortality
After adjusting for all covariates, RCS analysis revealed a significant overall association between both CV and rMSSD with clinical outcomes (P for overall < 0.001 for both). The analysis also identified significant nonlinear relationships between both CV and rMSSD with clinical outcomes (P for nonlinear < 0.001 for both) (Figure 2).

Figure 2. RCS analysis of glycemic variability and mortality in postoperative craniotomy patients. (a) 28-day mortality with glucose CV; (b) 90-day mortality with CV; (c) 28-day mortality with rMSSD; (d) 90-day mortality with rMSSD. RCS, Restricted cubic spline; CV, coefficient of variation; rMSSD, root mean square of successive differences.
Table 3 presents the threshold effect analysis for CV and rMSSD. For 28-day mortality, each 10-unit increase in CV was associated with a HR of 1.20 (P < 0.001), with an inflection point at 20.5: hazard increased significantly below this threshold (HR 3.56, P < 0.001), but not above (HR 1.03, P = 0.547). For rMSSD, each 10-unit increase was associated with an HR of 1.02 (P = 0.004), with a significant increase below 43.8 (HR 1.57, P < 0.001), but not above (HR 0.99, P = 0.446). All likelihood ratio tests were significant (P < 0.001). For 90-day mortality, each 10-unit increase in CV was associated with an HR of 1.19 (P < 0.001), with an inflection point at 22.1: hazard increased significantly below (HR 2.50, P < 0.001), but not above (HR 1.02, P = 0.755). For rMSSD, the HR per 10-unit increase was 1.02 (P = 0.002), with a significant increase below 44.1 (HR 1.44, P < 0.001), and no difference above (HR 0.99, P = 0.619). All likelihood tests remained significant (P < 0.001).
3.4 Interaction analysis of GV and clinical variables on mortality risk
After adjusting for all covariates, interaction analysis was performed based on the following subgroups: gender (female, male), myocardial infarction (yes, no), congestive heart failure (yes, no), sepsis (yes, no), diabetes (yes, no), hypertension (yes, no), and statin use (yes, no). The results showed that none of the interaction p-values were significant (Figure 3).

Figure 3. Subgroup analysis of the association between glycemic variability and mortality in postoperative craniotomy patients. (a) CV and 28-day all-cause mortality. (b) CV and 90-day all-cause mortality. (c) rMSSD and 28-day all-cause mortality. (d) rMSSD and 90-day all-cause mortality. CV, coefficient of variation; rMSSD, root mean square of successive differences.
3.5 Mediation analysis of GV on mortality risk through BUN
After adjusting for confounding variables, the mediation analysis of blood CV and glucose rMSSD with 28-day and 90-day all-cause mortality revealed significant results. For the 28-day non-survival outcome, the mediated proportion for CV was 4.49%, and for rMSSD, it was 13.79%. For 90-day non-survival, the mediated proportion for CV was 4.21%, and for rMSSD, it was 12.58% (Figure 4).

Figure 4. Mediation analysis of the association between glycemic variability and mortality via BUN. (a) Mediation of the association between glucose CV and 28-day mortality. (b) Mediation of the association between glucose CV and 90-day mortality. (c) Mediation of the association between glucose rMSSD and 28-day mortality. (d) Mediation of the association between glucose rMSSD and 90-day mortality. CV, coefficient of variation; rMSSD, root mean square of successive differences; BUN, blood urea nitrogen.
3.6 ROC curve analysis of predictors for mortality
The ROC curve analysis for 28-day mortality showed the following AUC values: CCI (AUC = 0.63, 95% CI: 0.60–0.67), GCS (AUC = 0.53, 95% CI: 0.50–0.56), glucose CV (AUC = 0.72, 95% CI: 0.68–0.74), glucose rMSSD (AUC = 0.68, 95% CI: 0.65–0.71), and SOFA (AUC = 0.61, 95% CI: 0.67–0.65). Among these, glucose CV and glucose rMSSD demonstrated the highest predictive ability for 28-day mortality (Figure 5).

Figure 5. ROC curve for 28-day mortality. ROC, Receiver Operating Characteristic; SOFA, Sequential organ failure assessment; GCS, Glasgow Coma Scale; CCI, Charlson Comorbidity Inde; CV, coefficient of variation; rMSSD, root mean square of successive differences.
3.7 Feature selection for machine learning models in predicting 28-day all-cause mortality risk
The data were split into training (N = 1,378) and test sets (N = 591) based on predefined criteria. Feature testing was performed between the two groups, and all P-values were greater than 0.05, indicating no significant differences in baseline characteristics between the training and test sets. The number of positive cases for 28-day hospital mortality was 179 (13%) in the training set and 77 (13%) in the test set (Supplementary Table S3). Kaplan-Meier curves were generated for both sets, and log-rank tests yielded a P-value of 1 (Supplementary Figure S2), suggesting no significant difference between the groups in terms of survival.
Based on the predefined feature selection criteria, 24 variables were included in the Lasso model. After applying the Boruta method, 22 variables were selected, with glucose CV and glucose rMSSD being the 3rd and 4th most important variables, respectively, outperforming SOFA and CCI. The final set of 16 variables was derived by taking the intersection of the two methods. These variables include: age, body temperature, SOFA score, CCI, RBC, WBC, sodium, calcium, INR, BUN, norepinephrine, sepsis, propofol, mannitol, glucose CV, and glucose rMSSD (Figure 6).

Figure 6. Feature selection for 28-day mortality prediction model. (a) Five-fold cross-validation for LASSO logistic regression identifying the optimal value of the regularization parameter (lambda), (b) LASSO coefficient profiles of candidate predictors as a function of log(lambda), (c) Variable importance ranking based on the Boruta algorithm; green bars represent confirmed important features, red bars indicate rejected ones, (d) Venn diagram showing the intersection of features selected by both LASSO and Boruta methods; 16 features were identified by both approaches. SOFA, Sequential organ failure assessment; GCS, Glasgow Coma Scale; CCI, Charlson Comorbidity Index; SpO2, Oxygen saturation; SBP, Systolic blood pressure; DBP, Diastolic blood pressure; AKI, Acute kidney injury; WBC, White blood cell count; RBC, Red blood cell count; Platelet, Platelet count; CV, coefficient of variation; rMSSD, root mean square of successive differences; BUN, blood urea nitrogen; INR, International normalized ratio; PPI, Proton Pump Inhibitor; MV, Mechanical Ventilation; CRRT, Continuous renal replacement therapy.
3.8 Development of a machine learning prediction model for 28-day all-cause mortality
The training set includes 179 positive cases. After feature selection, 16 variables were identified, which meet the criteria of the Event per Variable principle. We trained the models based on the selected features, including CoxPH, CART, GBM, Ridge, ENet, NN, RSF, and XGBoost, and performed grid search for hyperparameter tuning during the training process.
On the test set, RSF achieved the highest AUROC of 0.841, outperforming all other models, including Ridge (0.836) and CoxPH (0.825). Other models, such as GBM (0.824), XGBoost (0.788), CART (0.771), ENet (0.775), and NN (0.768), performed relatively lower (Figure 7). Further evaluation with decision curve analysis and calibration curves confirmed that RSF was the optimal model, showing the highest net benefit and well-calibrated predicted probabilities, making it the best model for predicting 28-day all-cause mortality (Supplementary Figure S3).

Figure 7. ROC curves of different prediction models for 28-day mortality in the test set. ROC, Receiver Operating Characteristic; RSF, Random Survival Forest; Ridge, Ridge regression; CoxPH, Cox proportional hazards model; GBM, Gradient Boosting Machine; XGBoost, Extreme Gradient Boosting; CART, Classification and Regression Trees; Enet, Elastic Net; NN, Neural Network.
3.9 SHAP interpretation of the RSF model
The SHAP summary plot of the RSF model reveals that glucose CV and glucose rMSSD are the two most important variables influencing mortality risk in post-brain surgery patients (Figure 8). Both features show a strong positive association with SHAP values, indicating that higher glucose variability increases the predicted risk of death. To enhance clinical usability, we deployed the RSF model on a publicly accessible web platform (https://docterge.shinyapps.io/Craniotomy/.). This tool allows users to input individual patient data and receive a personalized prediction of 28-day mortality risk. In addition to the probability output, the tool provides individualized SHAP visualizations to help interpret which clinical features contributed most to the prediction. An example of the prediction interface and interpretability output is provided in Supplementary Figure S4.

Figure 8. SHAP analysis for interpretation of the RSF model predicting 28-day mortality. (a) SHAP summary plot showing the importance ranking of selected features based on their mean absolute SHAP values. (b) SHAP dependence plot displaying the distribution of SHAP values for each feature. Colors represent feature values, with red indicating high values and blue indicating low values. WBC, White blood cell count; RBC, Red blood cell count; Platelet, Platelet count; CV, coefficient of variation; rMSSD, root mean square of successive differences; INR, International normalized ratio.
4 Discussion
This study examined the association between blood glucose fluctuations and mortality risk in post-craniotomy patients. glucose CV and glucose rMSSD were significantly associated with both 28-day and 90-day mortality, with the highest quantiles of both variables showing the strongest associations. Glucose CV achieved an AUC of 0.72, significantly outperforming SOFA, GCS, and CCI. In addition, the mortality prediction model incorporating glucose variability demonstrated strong discriminative performance, with the RSF model reaching an AUC of 0.841. SHAP interpretation indicated that glucose CV and glucose rMSSD were the most important predictors of 28-day mortality. The RSF model has been successfully deployed on a web platform, providing a convenient tool for real-time risk prediction and valuable insights for glucose management in clinical practice.
Previous studies have consistently demonstrated that glycemic abnormalities are associated with poor outcomes in critically ill patients. In a large cohort of septic patients, stress hyperglycemia was independently linked to increased mortality, highlighting the detrimental impact of acute glucose dysregulation in inflammatory states (18). Similarly, in patients with coronary artery disease, higher GV was significantly associated with adverse cardiovascular events and all-cause mortality (17). GV has also been implicated in the development of ventricular arrhythmias in ICU patients, further supporting its role as a marker of physiological instability (19). In surgical populations, several studies have identified GV as a predictor of postoperative complications and mortality. For example, GV was associated with increased mortality in patients undergoing aortic valve replacement and linked to postoperative atrial fibrillation in cardiac surgery patients (20, 21). Despite this growing body of evidence, neurosurgical patients remain underrepresented in the literature. Given their heightened vulnerability to secondary brain injury and distinct neuroendocrine responses to surgical stress, this population warrants targeted investigation (22). Our study addresses this gap by evaluating both CV and rMSSD in relation to postoperative mortality in cranial surgery patients, offering a novel perspective on the prognostic implications of short- and mid-term glycemic variability in neurocritical care.
Patients undergoing cranial surgery represent a high-risk subgroup in critical care, characterized by disrupted cerebral autoregulation, compromised blood–brain barrier (BBB), and reduced tolerance to secondary systemic insults (23). In this context, blood glucose fluctuations—rapid oscillations beyond physiological ranges—may function not merely as markers of stress, but as active pathophysiological drivers of poor outcomes (24). At the cerebral level, the postoperative brain is highly sensitive to osmotic shifts due to surgical disruption of the BBB (25). Abrupt glucose changes alter serum osmolality, promoting fluid shifts that exacerbate cerebral edema (26). In neurosurgical patients, where intracranial compliance is often reduced, even modest volume increases may elevate intracranial pressure, reduce cerebral perfusion pressure, and restrict oxygen and substrate delivery to metabolically vulnerable brain regions (27, 28). Moreover, the brain’s near-exclusive dependence on glucose renders it highly vulnerable to both hyperglycemia and hypoglycemia (29). Hyperglycemia promotes mitochondrial dysfunction, reactive oxygen species generation, anaerobic glycolysis, and lactic acidosis—worsening neuronal injury in peri-infarct zones (30, 31). Hypoglycemia, conversely, deprives neurons of ATP, resulting in ion pump failure, glutamate excitotoxicity, and calcium-mediated apoptosis (32). When such extremes occur in close proximity, they may trigger recurrent ischemia-reperfusion cycles that amplify neuronal death (33). Glucose fluctuations also provoke endothelial activation and systemic inflammation (34). Oscillating glucose levels stimulate NF-κB signaling, elevate cytokines (e.g., IL-6, TNF-α), and impair nitric oxide-mediated vasodilation (34, 35). This proinflammatory, vasoconstrictive milieu promotes microthrombosis, capillary leakage, and impaired cerebral microcirculation (35). Beyond the CNS, blood glucose fluctuations are associated with multi-organ stress responses. In patients undergoing major surgery, blood glucose fluctuations are independently associated with acute kidney injury, cardiac dysfunction, and sepsis, each of which may compromise systemic perfusion and exacerbate cerebral hypoxia (36). Together, these mechanisms support blood glucose fluctuations as not passive markers, but active contributors to mortality in post-craniotomy patients.
An intriguing finding in this study was the identification of BUN as a partial mediator in the relationship between blood glucose fluctuations and mortality following craniotomy. Mediation analysis revealed that BUN accounted for 4.49% of the association between glucose CV and 28-day mortality, and 13.79% for glucose rMSSD. Similar trends were observed for 90-day outcomes, with mediated proportions of 4.21% and 12.58%, respectively. Although the proportion mediated was modest, the consistency and statistical significance across time points suggest a biologically plausible pathway linking glycemic instability to adverse outcomes through renal dysfunction. BUN, a marker of nitrogen metabolism and renal perfusion, may reflect subclinical renal injury triggered by glucose fluctuations. Repeated episodes of hyperglycemia can induce glomerular hyperfiltration, oxidative stress, and endothelial damage (37). Furthermore, glucose variability has been associated with systemic inflammation and sympathetic activation, both of which can impair renal autoregulation and contribute to elevated BUN (34). In critically ill neurosurgical patients, elevated BUN may serve as both a marker and mediator of physiological stress. However, given the relatively low mediated proportions, particularly for CV (4.21–4.49%), these findings should be interpreted with caution, and BUN should be regarded as a secondary rather than a primary mechanistic pathway.
The findings of this study have important implications for the postoperative management of patients undergoing cranial surgery. Glycemic fluctuations, traditionally viewed as an epiphenomenon of critical illness, should be reconsidered as modifiable contributors to poor neurological outcomes. Their independent association with both short-term and long-term mortality, along with mechanistic links involving cerebral, renal, and systemic pathways, argue for a more proactive and structured therapeutic approach. First, these data highlight the limitations of relying solely on single-point glucose values or mean glycemic indices, which may obscure clinically significant variability. Continuous glucose monitoring (CGM) systems, now increasingly available in critical care settings, may offer real-time visibility into dynamic glucose trends, facilitating earlier detection of deleterious fluctuations and more precise glycemic control. Second, our results suggest that maintaining glycemic stability—rather than pursuing tight control—may be more beneficial in neurosurgical patients. Protocols that minimize glucose variability, such as structured insulin titration algorithms and threshold-based interventions, could reduce the risk of secondary brain injury while avoiding hypoglycemia. Third, the identification of BUN as a partial mediator suggests the utility of integrated organ monitoring. Early rises in BUN, particularly in patients with marked glycemic variability, may serve as early warning indicators of physiological decompensation. Finally, these findings support the development of multidisciplinary care pathways that engage endocrinology, nephrology, and neurocritical care teams. Such pathways should include practical components like early CGM initiation post-craniotomy, predefined thresholds for intervention, and the integration of GV metrics (e.g., CV, rMSSD) into ICU monitoring dashboards or alert systems. Future prospective studies are needed to validate these approaches and assess whether interventions targeting GV can lead to improved clinical outcomes in this high-risk population.
This study has several limitations. First, it was based on data from a single academic medical center, which may limit the generalizability of the findings to other settings. Second, as a retrospective observational study, causal inference cannot be established, and residual confounding remains possible—particularly from unmeasured factors such as preoperative glucose control and nutritional status. Furthermore, the absence of a standardized glucose monitoring protocol in the ICU may have introduced heterogeneity in the timing and frequency of glucose measurements, potentially affecting the accuracy of glycemic variability estimates. For instance, patients receiving more frequent glucose checks—often due to clinical instability or active insulin titration—may have artificially inflated GV metrics due to closer monitoring. Conversely, less frequent testing in more stable patients could lead to underestimation of variability. Additionally, although insulin use was adjusted for in the multivariable analysis, detailed information on insulin administration protocols, including dosage, delivery mode (e.g., bolus vs. infusion), and responsiveness to glycemic excursions, was unavailable. These therapeutic factors may themselves influence both the degree of GV and the associated clinical outcomes, representing an important source of residual confounding. Future prospective studies with standardized glucose monitoring schedules and detailed insulin management data are warranted to address these limitations.
5 Conclusion
This study is the first to systematically assess the prognostic relevance of blood glucose fluctuations in patients following craniotomy. Both glucose CV and glucose rMSSD were independently associated with 28-day and 90-day mortality, exhibited non-linear relationships, and were partially mediated through BUN. GV outperformed traditional clinical scores such as SOFA and CCI in mortality risk prediction. A machine learning model incorporating glucose variability demonstrated high discriminative performance and has been successfully deployed on a clinical web-based platform. These findings support GV as a modifiable risk factor and underscore its potential role in postoperative risk stratification and management for neurosurgical patients. Further prospective, multicenter studies are warranted to validate these findings and explore whether targeted interventions on GV can improve clinical outcomes.
Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material. Further inquiries can be directed to the corresponding author.
Ethics statement
The data used in this study were extracted from the publicly available MIMIC-IV (Medical Information Mart for Intensive Care IV) database, which is a collaborative project between the Massachusetts Institute of Technology (MIT) and Beth Israel Deaconess Medical Center (BIDMC). Access to the database requires completion of the "Data or Specimens Only Research" course and certification through the Collaborative Institutional Training Initiative (CITI) program. All data are de-identified in compliance with the Health Insurance Portability and Accountability Act (HIPAA), and therefore, the requirement for individual patient consent and institutional ethical approval was waived.
Author contributions
YG: Conceptualization, Data curation, Formal analysis, Investigation, Writing – original draft. GW: Data curation, Methodology, Project administration, Resources, Writing – original draft. YH: Conceptualization, Investigation, Methodology, Writing – review & editing. YZ: Project administration, Resources, Software, Supervision, Validation, Visualization, Writing – review & editing.
Funding
The author(s) declare that no financial support was received for the research and/or publication of this article.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fendo.2025.1613662/full#supplementary-material
References
1. Cooper DJ, Rosenfeld JV, Murray L, Arabi YM, Davies AR, D’Urso P, et al. Decompressive craniectomy in diffuse traumatic brain injury. N Engl J Med. (2011) 364:1493–502. doi: 10.1056/NEJMoa1102077
2. Ikwuegbuenyi CA, Zolo Y, and Abu-Bonsrah N. Strengthening neurosurgical care for patients with severe traumatic brain injury. Lancet Neurol. (2022) 21:870. doi: 10.1016/s1474-4422(22)00344-1
3. Garcia RM, Shlobin NA, Baticulon RE, Ghotme KA, Lippa L, Borba LA, et al. Global neurosurgery: an overview. Neurosurgery. (2024) 95:501–8. doi: 10.1227/neu.0000000000003109
4. Maas AIR, Menon DK, Adelson PD, Andelic N, Bell MJ, Belli A, et al. Traumatic brain injury: integrated approaches to improve prevention, clinical care, and research. Lancet Neurol. (2017) 16:987–1048. doi: 10.1016/s1474-4422(17)30371-x
5. Maas AIR, Menon DK, Manley GT, Abrams M, Åkerlund C, Andelic N, et al. Traumatic brain injury: progress and challenges in prevention, clinical care, and research. Lancet Neurol. (2022) 21:1004–60. doi: 10.1016/s1474-4422(22)00309-x
6. Cole DJ and Kharasch ED. Postoperative brain function: toward a better understanding and the american society of anesthesiologists perioperative brain health initiative. Anesthesiology. (2018) 129:861–3. doi: 10.1097/aln.0000000000002085
7. Banoei MM, Hutchison J, Panenka W, Wong A, Wishart DS, and Winston BW. Metabolomic in severe traumatic brain injury: exploring primary, secondary injuries, diagnosis, and severity. Crit Care. (2025) 29:26. doi: 10.1186/s13054-025-05258-1
8. He J, Zhang Y, Cheng X, Tian Y, Hao P, Li T, et al. Association of postoperative hypoglycemia with mortality after elective craniotomy. Neurosurgery. (2024) 95:682–91. doi: 10.1227/neu.0000000000002938
9. Lyu Z, Ji Y, and Ji Y. Association between stress hyperglycemia ratio and postoperative major adverse cardiovascular and cerebrovascular events in noncardiac surgeries: A large perioperative cohort study. Cardiovasc Diabetol. (2024) 23:392. doi: 10.1186/s12933-024-02467-w
10. Lamanna DL, McDonnell ME, Chen AF, and Gallagher JM. Perioperative identification and management of hyperglycemia in orthopaedic surgery. J Bone Joint Surg Am. (2022) 104:2117–26. doi: 10.2106/jbjs.22.00149
11. Klimontov VV, Saik OV, and Korbut AI. Glucose variability: how does it work? Int J Mol Sci. (2021) 22:7783. doi: 10.3390/ijms22157783
12. Watt C, Sanchez-Rangel E, and Hwang JJ. Glycemic variability and cns inflammation: reviewing the connection. Nutrients. (2020) 12:3906. doi: 10.3390/nu12123906
13. Monnier L, Mas E, Ginet C, Michel F, Villon L, Cristol JP, et al. Activation of oxidative stress by acute glucose fluctuations compared with sustained chronic hyperglycemia in patients with type 2 diabetes. Jama. (2006) 295:1681–7. doi: 10.1001/jama.295.14.1681
14. Hermanides J, Vriesendorp TM, Bosman RJ, Zandstra DF, Hoekstra JB, and Devries JH. Glucose variability is associated with intensive care unit mortality. Crit Care Med. (2010) 38:838–42. doi: 10.1097/CCM.0b013e3181cc4be9
15. Egi M, Bellomo R, Stachowski E, French CJ, and Hart G. Variability of blood glucose concentration and short-term mortality in critically ill patients. Anesthesiology. (2006) 105:244–52. doi: 10.1097/00000542-200608000-00006
16. Chen Y, Yang Z, Liu Y, Gue Y, Zhong Z, Chen T, et al. Prognostic value of glycaemic variability for mortality in critically ill atrial fibrillation patients and mortality prediction model using machine learning. Cardiovasc Diabetol. (2024) 23:426. doi: 10.1186/s12933-024-02521-7
17. He HM, Zheng SW, Xie YY, Wang Z, Jiao SQ, Yang FR, et al. Simultaneous assessment of stress hyperglycemia ratio and glycemic variability to predict mortality in patients with coronary artery disease: A retrospective cohort study from the mimic-iv database. Cardiovasc Diabetol. (2024) 23:61. doi: 10.1186/s12933-024-02146-w
18. Yan F, Chen X, Quan X, Wang L, Wei X, and Zhu J. Association between the stress hyperglycemia ratio and 28-day all-cause mortality in critically ill patients with sepsis: A retrospective cohort study and predictive model establishment based on machine learning. Cardiovasc Diabetol. (2024) 23:163. doi: 10.1186/s12933-024-02265-4
19. Su Y, Fan W, Liu Y, and Hong K. Glycemic variability and in-hospital death of critically ill patients and the role of ventricular arrhythmias. Cardiovasc Diabetol. (2023) 22:134. doi: 10.1186/s12933-023-01861-0
20. Yu Q, Fu Q, Ma X, Wang H, Xia Y, Chen Y, et al. Impact of glycemic control metrics on short- and long-term mortality in transcatheter aortic valve replacement patients: A retrospective cohort study from the mimic-iv database. Cardiovasc Diabetol. (2025) 24:135. doi: 10.1186/s12933-025-02684-x
21. Zhou Z, Zhang H, Gu Y, Zhang K, and Ouyang C. Relationship between glycemic variability and the incidence of postoperative atrial fibrillation following cardiac surgery: A retrospective study from mimic-iv database. Diabetes Res Clin Pract. (2025) 219:111978. doi: 10.1016/j.diabres.2024.111978
22. Goshtasbi K, Abiri A, Torabi SJ, Bitner BF, Hsu FPK, and Kuan EC. Association between metabolic syndrome and short-term adverse events in skull base surgery. Int Forum Allergy Rhinol. (2023) 13:281–4. doi: 10.1002/alr.23087
23. Rajagopalan S and Sarwal A. Neuromonitoring in critically ill patients. Crit Care Med. (2023) 51:525–42. doi: 10.1097/ccm.0000000000005809
24. Sadan O, Feng C, Vidakovic B, Mei Y, Martin K, Samuels O, et al. Glucose variability as measured by inter-measurement percentage change is predictive of in-patient mortality in aneurysmal subarachnoid hemorrhage. Neurocrit Care. (2020) 33:458–67. doi: 10.1007/s12028-019-00906-1
25. Merino JG, Latour LL, Tso A, Lee KY, Kang DW, Davis LA, et al. Blood-brain barrier disruption after cardiac surgery. AJNR Am J Neuroradiol. (2013) 34:518–23. doi: 10.3174/ajnr.A3251
26. Hladky SB and Barrand MA. Alterations in brain fluid physiology during the early stages of development of ischaemic oedema. Fluids Barriers CNS. (2024) 21:51. doi: 10.1186/s12987-024-00534-8
27. Asioli GM, Castioni CA, Zinzani PL, Casadio MC, Pierucci E, Casadei B, et al. Intracranial pressure management in fulminant cerebral oedema after car T-cell therapy: not all is lost! Br J Haematol. (2024) 204:1109–13. doi: 10.1111/bjh.19270
28. Brasil S, de Carvalho Nogueira R, Salinet  SM, Yoshikawa MH, Teixeira MJ, Paiva W, et al. Critical closing pressure and cerebrovascular resistance responses to intracranial pressure variations in neurocritical patients. Neurocrit Care. (2023) 39:399–410. doi: 10.1007/s12028-023-01691-8
29. Schwartz SS, Herman ME, Tun MTH, Barone E, and Butterfield DA. The double life of glucose metabolism: brain health, glycemic homeostasis, and your patients with type 2 diabetes. BMC Med. (2024) 22:582. doi: 10.1186/s12916-024-03763-8
30. Liu P, Yang X, Niu J, and Hei C. Hyperglycemia aggravates ischemic brain damage via erk1/2 activated cell autophagy and mitochondrial fission. Front Endocrinol (Lausanne). (2022) 13:928591. doi: 10.3389/fendo.2022.928591
31. Cheng H, Gang X, Liu Y, Wang G, Zhao X, and Wang G. Mitochondrial dysfunction plays a key role in the development of neurodegenerative diseases in diabetes. Am J Physiol Endocrinol Metab. (2020) 318:E750–e64. doi: 10.1152/ajpendo.00179.2019
32. Fujikawa DG. Programmed mechanisms of status epilepticus-induced neuronal necrosis. Epilepsia Open. (2023) 8 Suppl 1:S25–s34. doi: 10.1002/epi4.12593
33. Tanaka K, Yoshimoto T, Koge J, Yamagami H, Imamura H, Sakai N, et al. Detrimental effect of acute hyperglycemia on the outcomes of large ischemic region stroke. J Am Heart Assoc. (2024) 13:e034556. doi: 10.1161/jaha.124.034556
34. Toma L, Sanda GM, Stancu CS, Niculescu LS, Raileanu M, and Sima AV. Oscillating Glucose Induces the Increase in Inflammatory Stress through Ninjurin-1 up-Regulation and Stimulation of Transport Proteins in Human Endothelial Cells. Biomolecules. (2023) 13:626. doi: 10.3390/biom13040626
35. Zheng S, Wang C, Lin L, Mu S, Liu H, Hu X, et al. Tnf-A Impairs pericyte-mediated cerebral microcirculation via the nf-Kb/inos axis after experimental traumatic brain injury. J Neurotrauma. (2023) 40:349–64. doi: 10.1089/neu.2022.0016
36. Conrad C and Eltzschig HK. Disease mechanisms of perioperative organ injury. Anesth Analg. (2020) 131:1730–50. doi: 10.1213/ane.0000000000005191
Keywords: glycemic variability, craniotomy, mortality, retrospective cohort study, machine learning prediction model
Citation: Ge Y, Wang G, Huang Y and Zhang Y (2025) Association between the postoperative glycemic variability and mortality after craniotomy: a retrospective cohort study and development of a mortality prediction model. Front. Endocrinol. 16:1613662. doi: 10.3389/fendo.2025.1613662
Received: 17 April 2025; Accepted: 27 June 2025;
Published: 17 July 2025.
Edited by:
Xiantong Zou, Peking University People’s Hospital, ChinaReviewed by:
Marcos Edgar Herkenhoff, Santa Catarina State University, BrazilNing Zhang, China Academy of Chinese Medical Sciences, China
Copyright © 2025 Ge, Wang, Huang and Zhang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Yaxin Zhang, eWF4aW4xOTk2QHFxLmNvbQ==
†These authors have contributed equally to this work