Introduction

Liver failure, a multifactorial syndrome, features jaundice, clotting issues, hepatorenal syndrome, liver-related encephalopathy, and abdominal fluid buildup, with high short-term mortality1,2. Consequently, it is essential to detect liver failure promptly. Liver failure therapy relies on three key principles: early detection and treatment of the cause, proactive complication management, and systematic patient evaluation. Accurate early prognosis is vital to prevent liver dysfunction progression3,4,5. Several models are currently used to assess the severity of liver failure, such as the Model for End-Stage Liver Disease Score (MELD), the Chronic Liver Failure Consortium Acute-on-Chronic Liver Failure Score (CLIF-C ACLF), the Model for End-Stage Liver Disease-Sodium Score (MELD-Na), and the Child-Turcotte-Pugh (Child-Pugh) score. However, these models rely heavily on the severity of organ failure and laboratory indicators, which often appear normal until later stages, hindering early diagnosis and intervention6,7,8. Therefore, a simple, cost-effective, and highly sensitive index is urgently needed to evaluate the prognosis of individuals experiencing liver failure.

Serum albumin primarily reflects the body’s nutritional status, hepatic and renal function, inflammation, and infection9. Patients with liver failure usually have hypoalbuminemia, which is more common in severely ill patients and has a strong association with higher mortality and poorer prognosis10,11. The anion gap (AG) is an important indicator for assessing acid-base disturbance and the disease stage, the results of which are influenced by the net negative charge carried by the albumin molecule12. Thus, the albumin-corrected anion gap (ACAG) more accurately reflects unmeasured anion levels and the patient’s acid-base status13,14. Research indicates that elevated ACAG concentrations are related to poorer health outcomes among patients in critical condition, particularly those with heart failure, sepsis, or acute pancreatitis15,16,17,18. While ACAG’s role in hepatic pathophysiology is recognized, its prognostic value in liver failure remains unclear. This study investigates ACAG’s correlation with clinical outcomes to assess its biomarker potential.

Materials and methods

Database

This retrospective investigation examined the connection of ACAG with liver failure outcomes using data from the MIMIC-IV database (v3.1). The MIMIC-IV repository contains anonymized ICU patient records sourced from Beth Israel Deaconess Medical Center (BIDMC), spanning the period 2008 to 202219. The database was accessed by an author (Hang Wang) who had completed compliance certification and extracted data (certification number: 68167728). This study was exempted from ethical review because the database had anonymized patient information.

Research population

The selection criteria for this research were established in the following manner: (1) Individuals confirmed to have liver failure were identified using ICD-10 diagnostic codes (K704, K7040, K7041, K721, K7210, K7211, K720, K7200, K7201, K729, K7290, K7291); (2) Patients were first hospitalized in ICU for any length; (3) patients were 18 years or older; (4) only patients whose first ICU admission contained serum AG and albumin test results within 24 h were included. Further screening excluded patients who met the following criteria: (1) not a first-time ICU admission; (2) younger than 18 years; (3) no serum AG and albumin tests on the first day of ICU hospitalization; (4) Patients who underwent liver transplantation during their ICU hospitalization or within the 90-day follow-up period.

Data extraction

The clinical information we collected on patients included the following elements: (1) Basic demographic information: age, weight, sex, marital status, and race. (2) Vital signs: respiratory rate, heart rate, and oxygen saturation (SpO2). (3) Comorbidities: hypertension, chronic kidney disease (CKD), diabetes mellitus (DM), chronic obstructive pulmonary disease (COPD). (4) Laboratory parameters: hemoglobin (HB), white blood cells (WBC), platelets (PLT), red blood cells (RBC), hematocrit (HCT), red blood cell distribution width (RDW), potassium, sodium, calcium, glucose, aspartate aminotransferase (AST), alanine aminotransferase (ALT), activated partial thromboplastin time (APTT), prothrombin time (PT). (5) Clinical scores: Charlson Comorbidity Index, Sequential Organ Failure Assessment (SOFA), Glasgow Coma Scale (GCS), MELD. (6) Therapeutic methods: mechanical ventilation (MV), vasopressin (VP), and continuous renal replacement therapy (CRRT). The covariates were selected based on clinical relevance and prior studies on liver disease prognosis14.

Calculation formula and primary outcomes

Standard anion gap (AG): AG (mmol/l) = (sodium + potassium) - (chloride + bicarbonate)20.

Albumin-corrected anion gap (ACAG): ACAG (mmol/L) = [4.4-albumin (g/dL)] *2.5 + AG21.

Primary outcomes: 30- and 90-day mortality. 30-day mortality reflects early (often in-hospital) events typical of acute liver failure and acute on chronic liver failure6,7, whereas 90-day mortality reflects outcomes such as late sepsis, re-bleeding or progressive organ failure among ICU survivors5. Both endpoints are standard in liver-failure research.

Statistical analysis

Numerical data were expressed as mean ± standard deviation (SD) (normally distributed) or median (P25-P75) (non-normally distributed). Normally distributed variables were analyzed using parametric tests (t-test/ANOVA), while nonparametric methods (Mann-Whitney U/Kruskal-Wallis) were applied to skewed distributions. Categorical data were assessed via the chi-square test, reported as frequencies (n%). Kaplan-Meier analysis with log-rank test evaluated outcome occurrence across ACAG levels. Multivariate Cox regression, adjusted for univariate-identified confounders, examined ACAG-mortality associations, presenting HRs (95% CI); multicollinearity was evaluated using variance inflation factors (VIF) (Table S3). Trend significance (P-trend) was calculated for ordered groups. RCS (restricted cubic spline) regression modeled potential ACAG-mortality nonlinearity, with knots placed at the 14th, 20th, and 29.25th percentiles. Receiver operating characteristic (ROC) curve analysis compared the predictive performance of ACAG, MELD, and their combined use. The DeLong test is used to compare AUC values. Subgroup analyses was conducted based on liver failure type, age, gender, ethnicity, hypertension, chronic lung disease, CRRT, mechanical ventilation, and vasopressor.

The analysis and process of data were conducted using DecisionLinnc v1.0.9, a versatile platform designed for integrating various programming languages. This tool facilitates data manipulation, analytical tasks, and machine learning via an intuitive visual interface. Statistical significance was defined using a P-value cutoff of 0.05.

Result

Baseline patient characteristics

This study included 2016 patients suffering from liver failure, with the flow chart shown in Figure S1. The median age was 61 (52–71), and 60.47% were male. Diagnoses included: acute and subacute liver failure (58.58%), chronic liver failure (1.69%), alcoholic liver failure (14.09%), and unclassified liver failure (25.64%). The 30-day mortality rate was 27.23%, rising to 30.01% at 90-days. Patients were categorized into four groups according to ACAG quartiles (Table 1). Patients with higher ACAG exhibited elevated heart and respiratory rates (p < 0.001), increased prevalence of diabetes (p = 0.002) and chronic kidney disease (p = 0.004), and higher SOFA (p < 0.001), Charlson (p = 0.01), and MELD scores (p < 0.001). Laboratory findings included lower calcium levels (p < 0.001) and elevated WBC, PLT, ALT, AST, potassium, glucose, PT, and APTT (all p < 0.001). The highest ACAG quartile had higher 30- and 90-day mortality and greater CRRT use (all p < 0.001).

Table 1 Baseline characteristics of patients with liver failure according to ACAG classification.

Table 2 presents the baseline features of 90-day survival and mortality groups. The median ACAG value across the study population was 20.00. The median ACAG value in non-survivors was significantly higher than that in survivors (22.00 vs. 19.25, p < 0.001), suggesting that ACAG is a significant prognostic marker for mortality risk. Compared with the survival group, the mortality group was heavier (p < 0.001), older (p = 0.007), had a faster heart rate (p = 0.003), poorer oxygen saturation (p = 0.016), and higher SOFA scores and MELD scores (both p < 0.001). Laboratory findings also suggested higher WBC and RDW (p < 0.001, p = 0.004) and longer PT and APTT (p < 0.001) in the deceased group. They also required more treatment with CRRT, mechanical ventilation, and vasopressors (p < 0.001). However, a significantly larger fraction of surviving patients had diabetes relative to non-survivors (34.09% vs. 25.12%, p < 0.001).

Table 2 Baseline characteristics of the 90-Day survival and 90-Day death Groups.

Mortality in various ACAG groups

By ACAG level in groups 1–4, the 30-day mortality was 15.91%, 24.60%, 30.71%, and 38.07%, while the 90-day mortality was 19.25%, 26.60%, 34.55%, and 39.92%. It was revealed that the mortality increased with the ACAG levels. The Kaplan-Meier survival curves also demonstrated this relationship. (Fig. 1).

Fig. 1
Fig. 1The alternative text for this image may have been generated using AI.
Full size image

Kaplan-Meier survival curves for all-cause mortality in ACAG quartiles. (A) 30-day and (B) 90-day mortality: showing stratification of ACAG quartiles (Q1 to Q4), showing a progressive decrease in survival from the lowest to the highest quartile (p < 0.0001). (C) 30-day and (D) 90-day mortality, pooled groups: comparing the highest quartile (Q4) to the combined quartiles (Q1 ~ 3) highlights a significant reduction in survival from Q4 (p < 0.0001).

Relationship between all-cause mortality and ACAG

Cox regression modeling results showed a correlation between higher ACAG and higher 30- and 90-day mortality risk (Table 3). In Model 1, the HR for 30-day and 90-day mortality were 1.062 (1.050–1.074) and 1.059 (1.047–1.070) (both P < 0.001). In Model 3, the HR decreased to 1.032 (1.019–1.046) and 1.031 (1.018–1.045) (both P < 0.001). From Model 1 to Model 3, HR decreased slightly, but remained greater than 1, indicating that elevated ACAG was significantly and positively associated with 30- and 90-day mortality in patients with liver failure. The hazard ratios for all quartiles (Q2–Q4) in each model were significantly higher than that of the reference group (Q1), showing a clear dose-response relationship and confirming the predictive capability of ACAG for 30- and 90-day mortality. All variables had VIF < 3, supporting stable model estimation (Table S3).

Table 3 Cox proportional risk ratio (HR) for all-cause mortality.

The RCS showed that elevated ACAG levels were related to 30- and 90- day mortality (p < 0.001), and none of the nonlinear tests reached the threshold of significance (p = 0.099, p = 0.173) (Fig. 2).

Fig. 2
Fig. 2The alternative text for this image may have been generated using AI.
Full size image

HR (95% CI) for all-cause mortality by ACAG quartiles after correction for AGE, WEIGHT, HR, SpO2, SOFA, MELD, WBC, RDW, PT, APTT, TDM, CRRT, MV, VP. Where Q1 is the reference value. (A) HR (95% CI) for 30-day mortality by ACAG quartile. (B) HR (95% CI) for 90-day mortality by ACAG quartile. (C) RCS curves for 30-day and (D) 90-day mortality.

Comparative predictive value of ACAG and MELD in patients with liver failure

ACAG demonstrates high predictive value for both 30- and 90-day mortality. For 30-day mortality, the AUC was 0.641 (0.612–0.669) for ACAG alone, 0.634 (0.605–0.663) for MELD alone, and 0.668 (0.640–0.696) for ACAG in combination with MELD. The AUC of ACAG compared with MELD showed no statistically significant difference (Z = 0.381, P = 0.7035), and both were lower than the AUC of their combination (Z = − 3.317, P = 0.0009 and Z = − 3.566, P = 0.0004). For 90-day mortality, the AUC was 0.630 (0.604–0.657) for ACAG alone, 0.621 (0.594–0.648) for MELD alone, and 0.654 (0.630–0.680) for ACAG combined with MELD. There was no statistically significant difference in AUC between ACAG and MELD (Z = 0.615, P = 0.5387). The AUC of the combined model was higher than that of either model alone (Z = − 3.151, P = 0.0016 and Z= − 3.670, P = 0.0002). (Table 4; Fig. 3)

Table 4 Prognostic accuracy of ACAG and MELD.
Fig. 3
Fig. 3The alternative text for this image may have been generated using AI.
Full size image

ROC curves for predicting all-cause mortality. ROC curves for ACAG, MELD, and combined prediction of 30-day (A) and 90-day (B) mortality.

Subgroup analysis

Subgroup analysis of ACAG based on demographic and clinical characteristics revealed a significant association between elevated ACAG levels and increased 30- and 90-day mortality in patients with liver failure. Nevertheless, significant interactions were observed in age (p = 0.032 and 0.047) and CRRT subgroups (p < 0.001 and 0.001) for 30- and 90-day mortality, suggesting that there were variations in mortality risk prediction tied to age and CRRT (Fig. 4). Subgroup analysis showed non-survivors had significantly higher median ACAG than survivors across all liver failure subtypes (Table S4). The divergence was most pronounced among patients with acute and subacute liver failure, in whom the median ACAG rose from 20.25 (16.50–24.75) in survivors to 23.00 (18.88–27.25) in non-survivors for 30- day, and from 20.25 (16.50–24.75) to 22.75 (18.63–27.00) for 90- day (both P < 0.001). Similar, albeit smaller, inter-group differences were observed for alcoholic and unclassified liver failure, and remained statistically significant throughout Fig. 4.

Fig. 4
Fig. 4The alternative text for this image may have been generated using AI.
Full size image

Forest plot of HR for 30-day and 90-day mortality in different subgroups. HR was adjusted according to age, weight, HR, SpO2, SOFA, MELD, WBC, RDW, PT, APTT, TDM, CRRT, MV, VP.

Discussion

In this MIMIC-IV retrospective cohort of 2,016 liver-failure patients, 30- and 90-day mortality rose stepwise from Q1 to Q4. Comparing survival between the highest ACAG quartile (Q4) and the combined group of the three lower quartiles (Q1–Q3) simplifies risk stratification into high risk versus non-high risk. This approach is more intuitive for rapid bedside assessment or designing interventions specifically targeting the highest-risk cohort. Following multivariate Cox regression adjustment, HRs remained elevated across all quartiles (Q2-Q4) versus Q1, albeit slightly attenuated. ACAG showed a strong, dose-dependent association with 30- and 90-day mortality, both as a continuous and as a categorical variable; RCS curves confirmed linearity. The 90-day mortality group exhibited significantly higher ACAG levels than survivors, confirming a positive correlation between ACAG and short-term mortality in patients with liver failure and supporting its value as a prognostic marker. The AUC indicated that ACAG exhibited predictive performance comparable to that of MELD for 30- and 90-day mortality. The combination of ACAG and MELD further improved sensitivity and negative predictive value (NPV), outperforming each model individually. These findings indicated that ACAG retains robust predictive value and complemented the MELD score. Their combined use improved risk stratification, facilitating the early identification of high-risk patients and enabling timely intervention to slow disease progression in individuals with liver failure.

The results of subgroup analyses showed that ACAG served as a stable and reliable prognostic indicator of liver failure for forecasting 30- and 90-day mortality across different populations and clinical scenarios. The ACAG level was significantly higher in non-survivors across all subgroups. This difference was highly significant (P < 0.001) in the total cohort and in the acute/subacute and unclassified subgroups, while it was statistically significant in the alcoholic liver failure subgroup (P = 0.029 and 0.033 for 30- and 90-day mortality, respectively). However, significant interactions between 30- and 90-day mortality were observed in the age (p = 0.032, p = 0.047) and CRRT-treated subgroup (p < 0.001, p = 0.001). Many studies have established the consistent predictive value of ACAG for mortality across different age groups in multiple diseases18,22,23,24. However, our study found that individuals aged 45–65 years and those not receiving CRRT showed a numerically higher hazard ratio at both 30- and 90- day mortality. These observations might reflect chance, residual confounding, selection bias (e.g., CRRT indication), or differential care patterns, and require further investigation.

Beyond the critical roles of the respiratory and renal systems, the liver also plays a crucial role in acid base homeostasis through lactate and Cori cycle metabolism, albumin synthesis, ketone-body generation, and urea cycle activity. Moreover, extrahepatic complications such as hepatic encephalopathy, ascites, and acute renal failure disturb acid–base balance, thereby rendering hepatic dysfunction a complex acid–base imbalance25,26,27,28. Serum AG, a key indicator of acid–base status, is widely used to diagnose and monitor acid–base disorders and to predict poor prognosis across multiple diseases29,30,31,32. Albumin, the predominant plasma protein, maintains colloid osmotic pressure, acts as an antioxidant and anti-inflammatory agent, modulates immunity, transports ligands, and mediates signaling, thereby preserving physiological homeostasis. Its concentration reflects nutritional state, hepatic synthesis, and endothelial integrity33,34,35. In liver failure, impaired albumin concentration and function reflect disease severity33. Hypoalbuminaemia reduces the accuracy of AG in diagnosing the degree of acid-base imbalance. In advanced liver disease, hypoalbuminaemia usually results from decreased albumin synthesis attributable to hepatocyte depletion and the suppressive effects of systemic inflammation36. Metabolic acidosis, hypoproteinemia, inflammation, and oxidative stress often coexist in patients with end-stage liver disease37; relying on either AG or albumin alone may underestimate disease severity. We therefore used ACAG—a more accurate composite indicator—to predict short-term prognosis in liver failure.

Up to now, we have found only 3 studies that have explored the relationship between ACAG and liver disease. In the first study, Lu et al. demonstrated the significant prognostic value of ACAG for NAFLD, particularly in overweight/obese populations. A predictive model incorporating ACAG, waist circumference, and ALT achieved strong performance (AUC = 0.834)38. In the second study, Bai et al. confirmed the clinical utility of ACAG for identifying NAFLD risk, demonstrating population-specific efficacy particularly in individuals under 60 years. They identified a nonlinear, inverted U-shaped association between ACAG and NAFLD (inflection point: 23.05 mmol/L), indicating a bidirectional risk relationship mediated by ACAG levels39. In the third study, Pan et al. examined the association between ACAG and clinical outcomes in individuals suffering from cirrhotic sepsis for the first time, confirming that higher ACAG levels were independently correlated with increased 28-day mortality14. Furthermore, the study by Yu et al. was the first to systematically evaluate the association between in-hospital mortality and AG in patients with acute liver failure; they found that AG > 20 mmol/L was independently associated with mortality and provided predictive performance (AUC = 0.666) comparable to that of the MELD score. The authors concluded that hypoalbuminemia caused by liver failure exerts only a minor effect on AG, so AG alone remains adequate for assessing metabolic acidosis40. Although previous studies had highlighted the prognostic value of ACAG in liver disease, none had specifically examined its association with short-term outcomes of liver failure. Our findings demonstrated the role and predictive value of ACAG in liver failure.

Multiple mechanisms account for the correlation between ACAG and liver failure41,42. First, liver failure increases AG via lactate accumulation, ketogenesis, or renal insufficiency, reflecting tissue hypoxia and global metabolic derangement. Second, concomitant hypoalbuminaemia lowers AG and compromises its reliability as an indicator of acid-base status; albumin is also an established inflammatory and nutritional biomarker that predicts outcome. Third, elevated ACAG closely mirrors systemic inflammation and oxidative stress—drivers of hepatocellular injury and multi-organ failure. Because ACAG adjusts for albumin, it minimises diagnostic error; its elevation thus identifies severe acid-base imbalance that is mechanistically linked to mortality43. To enhance prognostic accuracy in liver failure patients, our study incorporated ACAG as a supplementary measure alongside the MELD score.

Our study has the following strengths: (1) the large sample size provides strong statistical power to validate the prognostic value of ACAG; (2) we used ACAG instead of AG to correct for albumin-induced underestimation of acidosis in hypoproteinaemic patients, thereby reducing false-negative results; (3) precise stratification by ACAG quartiles, age strata, multivariable adjustment, and subgroup analyses confirms the robustness of ACAG; (4) integration of ACAG with MELD improves 30- and 90-day mortality prediction.

Of course, our study has some limitations. First, retrospective studies are inevitably affected by data completeness and confounders. Although we adjusted for confounders through multivariate analyses, there may still be potential confounders that were not considered, resulting in bias. Second, our findings require external validation in geographically and ethnically diverse populations, including non-ICU settings and transplant centers, to assess broader applicability. Finally, the etiology of liver failure could not be traced due to the limitations of the database to establish causality, and it could not be ruled out that liver failure was secondary to other organ failure. Furthermore, the primary etiology of hepatic failure varies among different countries and regions, so it is uncertain whether the conclusions of this study apply to other countries and races. Future prospective, multicenter studies—ideally comparing the prognostic performance of ACAG across different critical illnesses—are warranted to define its disease-specific utility and consolidate the present results.

Conclusion

These findings revealed a strong, direct and linear association between ACAG and both 30- and 90-day mortality in patients with liver failure. The discriminative ability of ACAG was comparable to that of MELD, and the two variables together augmented prognostic accuracy. ACAG thus provides an inexpensive yet highly sensitive adjunct for risk stratification, facilitating early identification of patients destined to progress to severe liver failure and informing clinical decision-making. Nevertheless, large-scale, multicenter, prospective studies are essential to determine the universal applicability and unbiased prognostic value of ACAG in patients with liver failure.