Introduction

Both blood glucose and lactate are well-known predictors of organ dysfunction and mortality in critically ill patients1,2. Glucose shows a U-shaped relationship with mortality with both hypo- and hyperglycaemia associated with poor outcomes3,4. The association between hospital mortality and lactate is particularly strong, with previous research demonstrating lactate has comparable predictive ability to the APACHE-II, SOFA and qSOFA scores in certain ICU populations5. Further, it has been shown in previous research that concurrent adjustment for glucose and lactate modifies the relationship between these variables and patient outcomes, including blunting of the association between blood glucose and patient outcome5,6,7,8.

The metabolic pathways of glucose and lactate are highly inter-connected. Lactate is an end-product of glycolysis, the oxygen independent cellular respiration of glucose, and is a major substrate for gluconeogenesis in the liver and kidney9. In previous work, our team has found that blood lactate is the most important non-glucose blood gas/laboratory factor in predicting future blood glucose in critically ill patients10. The mechanisms that lead to hyperglycaemia (> 180 mg/dL) and hyperlactatemia (> 2 mmol/L) in critical illness are complex and varied, with clinical interventions playing a role11,12,13. While tissue hypoxia leading to increased anaerobic respiration has commonly been seen as the primary cause of increased lactate levels, this view has been challenged, with both hyperlactatemia and hyperglycaemia also linked to metabolic alterations associated with immune activation9,14,15,16. A major question for clinicians and researchers is when components of this response are maladaptive requiring treatment.

The degree to which blood glucose (at varying thresholds) is a marker or mediator of poor patient outcomes has been debated17,18, with observational studies demonstrating lack of, or attenuated, association between blood glucose and patient outcome in certain circumstances5,6,7,8, and randomised control trials (RCTs) demonstrating that tight glycaemic control (a target 80–110 mg/dL) is associated with poorer outcomes than a less stringent target of < 180 mg/dL19. The pathway from short term glucose toxicity to poor outcomes in the critically ill has not been fully elucidated, with organ dysfunction as a result of glucose induced inflammation and oxidative damage one hypothesised route20,21. However, elevated lactate may also have deleterious effects, for instance through immunosuppression16,22, raising the potential that elevated blood glucose levels may be a marker of this effect.

Accordingly, we aim to investigate whether blood glucose is an independent predictor of hospital outcome while controlling for blood lactate across subgroups defined by diabetic status. To account for non-linear relationships, we use flexible semi-parametric statistical models which retain the benefit of being readily interpretable while accounting for non-linear effects23.

Methods

Patients and data sources

Data for this study were sourced from the eICU collaborative research database (eICU-CRD) open access critical care database, de-identified to conform with the Health Insurance Portability and Accountability Act (HIPAA). eICU-CRD is a large multi-center critical care database holding data associated with 200,859 ICU stays admitted at 208 hospitals across the United States between 2014 and 201524. As described in previous research25,26 data from the eICU-CRD are generally of high quality, with common vital signs (such as blood glucose) and patient outcomes well recorded, but missing data creating challenges identifying which patients received complex interventions such as intubation, ventilation, and dialysis beyond the first day of ICU stay and in the calculation of risk scores that depend on non-bedside measurements.

Inclusion criteria and data quality assessment

We restrict our analysis to non-elective adult patients (over 18-years-old) who had an ICU stay more than 12 h in duration, received an APACHE-IV score and were not admitted for diabetic ketoacidosis or hyperosmolar hyperglycaemic state. From this cohort we selected all patients who had at least one glucose and lactate measurement within − 12 to + 24 h of their ICU admission (see Fig. 1).

Figure 1
figure 1

Impact of the inclusion criteria and missing data on extraction of the target and final complete case cohort from the eICU-CRD database.

Data extraction

All data extraction and transformation processes were carried out using the R packages bigrquery27 and data.table28. All queries are freely available at the project code repository (linked below). The following variables on admission (− 12 to + 24 h of index admission time) were extracted from the database: ICU type, age, gender, ethnicity, weight, BMI, diabetic status, Elixhauser comorbidity index, APACHE admission diagnosis, APACHE-IV score, lactate, glucose, bilirubin, potassium, sodium, chloride, creatinine, blood urea nitrogen, calcium, along with indication of the use or prescription of insulin, intubation and ventilation. Extracted outcomes included in-hospital and in-ICU mortality and length of ICU stay.

Ethics statement and reporting standards

Use of the eICU-CRD dataset is exempt from institutional review board approval due to the retrospective design, lack of direct patient intervention, and the security schema, for which the re-identification risk was certified as meeting safe harbor standards by an independent privacy expert (Privacert, Cambridge, MA) (Health Insurance Portability and Accountability Act Certification no. 1031219-2). This includes a waiver of requirement for patient consent. Negligible risk ethics approval to ensure the analysis protocols and methods met relevant guidelines and regulations was obtained from UNSW Sydney—HC220829. We used the STROBE reporting guidelines29 to check we provided an accurate and complete report of the study.

Statistical analysis

Matching blood glucose and lactate measurements

As blood lactate is measured less frequently than blood glucose, we construct our blood glucose and lactate variables by: (1) selecting the blood lactate measurement closest to ICU admission and (2) taking the average of all blood glucose measurements within 1–12 h of this blood lactate measurement. The size of the blood glucose averaging window is the minimum value (at 1 h increments) from 1 to 12 such that at least one blood glucose measurement is available.

Descriptive statistics

We give a descriptive analysis of the data using graphs of the key variables and through summarising the dataset in a table. Graphically we report the univariate and bivariate relationship between blood glucose and blood lactate, stratified by diabetic status and hospital mortality status. To avoid overplotting we show the bivariate relationships using contour plots for the stratified results. In the tables, continuous variables are reported using the mean and standard deviation. Categorical variables are reported as percentages. Data are reported stratified by whether a lactate measurement was available.

Statistical modelling of missingness

We use inverse probability weighting to account for potential selection biases introduced by the irregular measurement of blood lactate30. This approach uses the complete cases to create a pseudo-population designed to mimic the characteristics of the target population (in this case adults with an ICU stay over 12 h and an APACHE-IVa score31). We use a logistic regression model to calculate the probability that blood lactate would be measured in our target population using the following covariates: age, APACHE-IVa score, operative admission, an APACHE admission diagnosis of sepsis, APACHE admission organ system and ICU type. We assess the model fit using the area under the ROC curve (AUC-ROC) and a calibration plot. For each row in the complete case dataset the weights are calculate as the inverse of the model prediction.

We performed several sensitivity analyses to ensure our results are not overly impacted by our approach to account for missing data. We use a machine learning model (XGBoost32) to additionally calculate the missingness weights using the same set of variables as the logistic regression model, along with all non-lactate laboratory results (see Data Extraction above). To avoid overfitting bias this was done using cross-validated out of sample prediction33. Additionally, we develop a linear generalised additive model (GAM) and XGBoost imputation models, that were fit on the subsample of observations with a lactate measurement. These use the same variables sets and methodologies (i.e., out of sample prediction for the XGBoost model) as the missingness models, and in the imputation analysis their prediction replace the unmeasured lactate values for the 65,971 observations with no recorded blood lactate.

Statistical modelling of hospital mortality

The aim of the statistical modelling of hospital mortality was: (1) to assess the degree to which blood glucose is predictive of mortality when controlling for blood lactate and diabetic status (model selection step) and (2) describe the functional form of this relationship (model interpretation step).

Models

We use logistic and GAMs to build the models. GAMs are additive models that allow the predictor effects to vary non-linearly with the level of the covariate by transforming the variable through some smooth function f, e.g., a spline parameterisation. For a given basis dimension, GAMs incorporate the penalization of the spline and model estimation into a single process reducing the need for model hyperparameter tuning compared to pre model fitting spline transformation of a regression variable23. We use thin-plate regression splines34. In cases where the smooth spline is a two-dimensional interaction effect we denote this by (var1:var2). For the logistic regression (LR) models, we transformed glucose and lactate into categorical (binned) variables using the cut points from Freire Jorge, Wieringa8. We fit the following models, for all observations and stratified by diabetic status, using the iterative fitting method introduced in Wood23 for GAMs and maximum likelihood for logistic regression models:

  1. 1.

    LR: glucose

  2. 2.

    LR: lactate

  3. 3.

    LR: glucose + lactate

  4. 4.

    LR: glucose + lactate + (glucose : lactate)

  5. 5.

    GAM: glucose

  6. 6.

    GAM: lactate

  7. 7.

    GAM: glucose + lactate

  8. 8.

    GAM: (glucose : lactate)

Model selection

Mirroring the aims, the statistical analysis was performed in two steps: model selection and model interpretation. During the model selection step a weighted tenfold cross-validation (CV) procedure was used to assess model fit35. The splits were made using the patient health care system ID, ensuring that all ICU stays from a patient were either in the training or test dataset. The performance of the models was assessed using the missing data model weights to calculate weighted versions of accuracy, the Brier score (mean squared error), logarithmic loss, the AUC-ROC, and the area under the precision-recall curve (AUC-PR). The results are presented overall and stratified by diabetic status. We repeated this procedure (unweighted for the imputation models) for each of the missingness sensitivity analysis models described above (Statistical Modelling of Missingness), along with an additional weighted approach restricted to only patients with an admission diagnosis of sepsis.

Model interpretation

During the final step we refit the models on the entire dataset using the missingness weights, graphing relevant GAM non-linear effects for interpretation and comparison so LR coefficients. Additionally, as a sensitivity analysis we fit a XGBoost model using blood glucose, blood lactate and diabetic status and assess the resulting non-parametric estimate of the relationship between blood glucose and hospital mortality for various blood lactate levels by diabetic status.

Code availability

All analysis were performed using R version 4.2.136 using ggplot237 and gratia38 for graphics, mgcv23 and XGBoost32 for statistical modelling, along with the packages listed previously. The project code is available at www.github.com/oizin/lactate.

Results

Patient characteristics

The characteristics of patients at ICU admission, over the first 24 h of their ICU stay and at discharge are shown in Table 1. The table enables comparison of those patients who had a lactate measurement taken with those who did not—with more analysis of the impact of missingness found in Appendix A (Fig. A1). Those who had a lactate measurement taken were on average more severely ill (Apache-IVa score: 68 vs 50), more likely to have an admission diagnosis of sepsis (33% vs 6%), more likely to be ventilated or receiving insulin (45% vs 24% and 38% vs 25%) and had poorer outcomes (hospital mortality of 16.2% vs 6.5%). The missing data weighting overcame these differences to a large degree, albeit with some residual differences. Comparing the weighted cohort to the overall cohort we see that the above differences in illness severity (Apache-IV score: 58 vs 57), sepsis diagnosis (17% vs 17%), ventilated (35% vs 32%), insulin (36% vs 30%), and outcomes (hospital mortality of 11.5% vs 10.3%) are greatly reduced. Our weighted analysis cohort is thus a marginally more severely ill version of our target cohort (Fig. 1). The mean lactate measurement of 2.3 mmol/L in the weighted cohort compares to values of 3.8 mmol/L (hospital mortality: 20.1%)5, 1.5 mmol/L (hospital mortality: 11.1%)8 and 1.4 mmol/L (hospital mortality: 13.3%)6 in previous literature. Additionally, we note that the hospital mortality rate in the 34,257 ICU stays without APACHE information was 8.7%, comparable with the target cohort with elective admissions included (hospital mortality percentage of 9.0%) and suggestive that this information could be considered missing at random.

Table 1 Descriptive statistics for all eligible patients (overall), the missing data weighted cohort and the overall cohort stratified by lactate availability.

Figure 2 outlines the univariate and bivariate relationship between blood glucose and blood lactate. As seen in Fig. 2A both blood glucose and blood lactate have right skewed distributions, even after log-transformation. There is a suggestion of a U-shaped relationship between blood glucose and blood lactate, with both hyperglycaemia and hypoglycaemia associated with hyperlactatemia. Stratifying by diabetic status the results are in line with expectation (Fig. 2B). Patients with diabetes have an upward shift in their blood glucose distribution. In comparison, grouping by hospital outcome reveals those who died have a greater spread in blood glucose values, in line with evidence that both hypoglycaemia and hyperglycaemia are markers of mortality risk. In contrast, the relationship for blood lactate appears simpler, with a clear upward shift in the distribution of blood lactate for those who died.

Figure 2
figure 2

The univariate and bivariate distributions of admission blood glucose and blood lactate with fitted loess curve for: (A) all data points; (B) stratified by diabetic status; and (C) stratified by hospital survival status.

Missingness model

The coefficients, and measures of their uncertainty, for the variables we used to model missing lactate are shown in Appendix A (Table A2). As the model outcome is 1 if lactate is missing and 0 otherwise, a positive coefficient indicates increased likelihood of missingness when the variables value increases. The results are in line with Table 1, with each unit reduction in the Apache-IVa score associated with a ~ 3% increase in the odds of missing lactate. Neuro ICU and operative patients are less likely to have a lactate measurement while sepsis patients are more likely. The model has good discrimination with an AUC-ROC of 0.788, illustrated in Appendix A Fig. A2A. Graphical analysis of model calibration (Fig. A2B) reveals that calibration is generally good, with some evidence that the lower probabilities are marginal over-estimates of the chance of missingness (Fig. A2A). As seen in Fig. A2A the distribution of the missingness probabilities is bimodal, with a broadly sepsis group clustered around 0.25 and non-sepsis around 0.75. The resulting weights are largely less than 10, with 75% less than 4 and 50% less than 2 (Fig. A2D). Results for the alternative XGBoost model and blood lactate imputation models can be found in Appendix A (Tables A3A5).

Model selection

The results of the model cross-validation are given in Table 2 and show variation in performance across the models compared to the reference model GAM: lactate. Overall, the addition of blood glucose into the predictive models improve performance over lactate alone, with the GAMs that include blood glucose outperforming the reference (lactate only) model, with a paired t-test indicating a significant difference (p = 0.005) between the predictive performance of GAM: lactate (mean AUC-ROC: 0.659) and GAM: glucose + lactate (mean AUC-ROC: 0.664). This effect was most clear in non-diabetics, with a paired t-test indicating a significant difference (p < 0.001) between the predictive performance of GAM: lactate (mean AUC-ROC: 0.663) and GAM: glucose + lactate (mean AUC-ROC: 0.675).. Further, the models illustrate that binning of covariates results in an inferior performance compared to the comparable GAM. As shown in Appendix A (Fig. A3A7) these results were consistent across sensitivity analyses.

Table 2 Weighted cross-validation results (mean values) for all patients and stratified by diabetic status.

Model interpretation

Based on the results of the cross-validation we refit the GAM models on the data due to their similar performance. The regression spline effects are shown in Fig. 3, with the effect of blood glucose on mortality varying depending on which factors are adjusted for in the model. Adjustment for lactate alone results in a moderate attenuation of the association between hyperglycaemia (although not hypoglycaemia) and hospital outcome (Fig. 3A). Further adjustment for diabetic status reveals different risk profiles for diabetics and non-diabetics (Fig. 3B), with the effect of hyperglycaemia much reduced for diabetics. There is evidence of an interaction effect between glucose and lactate in non-diabetics with both hypo- and hyper-glycaemia associated with a poorer outcome compared to normo-glycaemia for a given blood lactate level (Fig. 3C). This interaction effect is attenuated for diabetics (Fig. 3D). These results are largely consistent with the XGBoost based sensitivity analysis reported in Appendix A (Fig. A9) which suggests an interaction effect whereby the risk profile for blood glucose is less attenuated at higher blood lactate values.

Figure 3
figure 3

GAM model partial effects (log odds scale) for several GAM models. (A) The impact of adjustment for lactate on the partial effect of glucose. (B) The partial effects of glucose for diabetics and non-diabetics GAM: glucose + lactate. (C) The 2D spline interaction effect between blood glucose and lactate levels for non-diabetics GAM: (glucose:lactate | DM = 0). (D) The 2D spline interaction effect between blood glucose and lactate levels for diabetics GAM: (glucose:lactate | DM = 1).

Discussion

The aim of this research project was to investigate the relationship between blood glucose and hospital mortality while accounting for blood lactate measurements. Across 43,250 ICU admissions, weighted to account for missing data, we assessed the predictive ability of several models stratified by diabetic status. Additionally, we varied the functional form of the model, using binning or flexible semi-parametric GAMs to model the continuous variables. We found that inclusion of blood glucose improved predictive performance. Assessment of the functional form of the GAMs revealed that in non-diabetics hyperglycaemia remained a risk factor for hospital mortality with a lessened effect in diabetics. In both subgroups hypoglycaemia remained a risk. Sensitivity analyses using alternative models and approaches to accounting for missing data supported these findings.

Relationship to previous literature

The relationship between hyperglycaemia, hyperlactatemia and outcome in critically ill patients has been assessed in previous research. Two early studies found conflicting results on the impact of adjusting for lactate on the association between glucose and hospital outcome. Martin et al.7 found both glucose and lactate on admission to be independent predictors of mortality in a study of 1,551 surgical ICU patients, with an 18 mg/dL increase in blood glucose associated with a 1% increase in the odds of mortality when controlling for lactate. In contrast, Kaukonen et al.6 found that inclusion of lactate nullified the predictive power of glucose on hospital outcome in 7,925 mixed ICU patients. A common feature of these studies is the use of glucose as linear term in logistic regression. Later studies using discretisation—whether through stratification or binning—found an interactive effect between the two variables. Freire Jorge et al.8 found similar results to the present research, with abnormal levels of both blood glucose and blood lactate associated with the poorest outcomes, a finding we reproduced (see Fig. 3C and LR coefficient table in Appendix A Table A6). Additionally in the current study, using two-dimensional spline terms, we found an interaction effect such that with increased blood lactate the lowest risk blood glucose level increased, from approximately 100 mg/dL to 150 mg/dL as blood lactate rose from 1 to 10 mmol/L (Fig. 3C). In an alternative approach Chen et al.5 assessed the additional impact of lactate on glucose’s prognostic value finding it added value for patients with hypo- and hyperglycaemia. Examining the results of the current study, these findings, while superficially contradictory, may be explained by variation in study design and analysis techniques as discussed further below.

The current results are in line with previous research suggesting that admission blood glucose has a different risk profile for diabetics and non-diabetics. It has been suggested that chronic exposure to hyperglycaemia in diabetes results in metabolic adaption, reducing the potential toxic effects of acute hyperglycaemia in critical illness39. While no mechanism for this elevation has been described, higher HbA1c has been associated with an elevated renal threshold for glucose40, illustrating that diabetes may result in altered physiological homeostasis, albeit with significant negative side-effects41. Indeed, several authors have found a blunted or absent relationship between acute hyperglycaemia and mortality risk in diabetics42,43,44,45, in line with the current findings. On the other hand, there is evidence that the threshold for hypoglycaemic risk is elevated in those with uncontrolled diabetes46. In the current study we found that patients with diabetes have an inflection towards greater risk around 100–150 mg/dL (Fig. 3B), higher than standard definitions of hypoglycaemia, but in line with American Diabetes Association guidelines that a range of > 140 mg/dL is appropriate for hospitalised diabetics47.

Implications of study findings

Two features of the previous research on glucose and lactate stand out in relationship to the current study. None of the previous studies reported results either stratified by diabetic status or equivalently adjusted using interaction terms. As discussed above and shown in the current study (Fig. 3B), the relationship between blood glucose and mortality is modified by diabetic status. Given the “diabetic pandemic”, adjusting for diabetic status (or HbA1c level) when investigating the relationship between blood glucose and an outcome is clearly important.

In situations where risk profiles (or other physiological effects) may be non-linear, or interactive, model choice is important, and differences may explain variation in the previous results. As suggested by Freire Jorge et al.8 the use of glucose as linear term may partially explain the results in Kaukonen et al.6. More generally, we found that the binned models underperformed the spline-based GAM models despite no loss in model interpretability (Table 2). At the extreme, choice of bin cut point to account for non-linear effects can lead to spurious results48. While purely non-linear methods such as deep learning are increasingly used to account for non-linear effects, such models remain largely uninterpretable, with interpretability metrics not even guaranteed to give similar findings49. Thus these models, as currently implemented, are not ideal for informing high stakes decisions such as those made in medicine50, or for answering certain scientific questions. GAMs and other “white-box” machine learning approaches51 present an alternative approach for situations where non-linear effects are expected and interpretability is key.

Strengths and weaknesses

This paper has several strength and weakness. Strengths noted above are comparison of several model choices. The predictive aspect of model selection enables easy comparison of models with complex interactive effects and different estimation methods52. Through varying the model form and assessing predictive ability overall and across subgroups we gain a greater idea of the true discriminatory power of the models in the studied population. Other strengths include the use of a large high quality real world data collection24,25. The data source consists of a mixed ICU population across a wide geographic area, with potential variation in treatment practises and cohorts treated. However, the retrospective observational nature of the data source is also a weakness. The data were not originally designed for use in this study, and a significant portion of patients in the source database did not have a blood lactate measurement or the glucose and lactate measurements were separated by several hours. Additionally, we did not attempt to disentangle the degree to which exogenous glucose was responsible for measured blood glucose levels. Missing data is a known cause of bias in analysis of EMR data, with sicker patients typically have more complete records, as seen in the current findings53,54. While inverse probability of missingness weighting offers a straightforward approach to designing analyses aimed at reducing this bias the weighting did not completely remove differences between the groups (Table 1), and fundamentally cannot account for unmeasured predictors of missingness.

Future directions

While this research has confirmed that blood glucose is a marker of poor prognosis even in the presence of stronger markers (blood lactate) further research is required into the potential mechanisms of any causal effect on patient outcome along with subgroup variation along with examination of alternative outcomes, such as organ failure55. Ultimately lactate is produced from glucose, and discounting the presence of tissue hypoxia14, both hyperglycaemia and hyperlactatemia are measures of altered energy metabolism. However, biophysiological theories of how acute stress disturbances in energy metabolism cause poor outcomes are only starting to be pieced together9,16. Given the long timeframes of RCTs56 future research should continue aiming to link theory and observational data. For instance, if as claimed by Gunst et al.17 the treatment effect of insulin is entirely through reducing glucose toxicity, it should be possible to demonstrate this in observational data using methods to estimate causal effects of time-varying exposures that treat blood glucose measures as mediators such as g-computation57. Previous research looking at the treatment effect of insulin in observational data has found a negative impact of insulin treatment58, largely explained by huge differences in rates of hypoglycaemia (29% vs 1.4%) between treated and non-treated. Causal inference in observational data is notoriously difficult and a wider range of study designs need to be applied to the data to investigate this issue, in particular looking at subgroup effects (e.g. diabetic vs non-diabetic or surgical vs non-surgical patients17).

Conclusion

In a mixed ICU population admission blood glucose is predictive of hospital mortality after accounting for blood lactate, with different hyperglycaemic risk profiles for diabetics and non-diabetics. In diabetics we found no association between hyperglycaemia and hospital mortality, while in non-diabetics hyperglycaemia remains a predictor of poor outcomes.