Explainable Machine Learning Model Based on Routine Admission Laboratory Tests for Predicting New-Onset Hypoalbuminemia in Hospitalized Older Patients with Acute Exacerbation of COPD Authors: Li Xiao, Yan Qin, Youli Wen, Xiaocong Guo, Yingqi Wang, Yinghui Wang, Zilin Wang Published: 2026 ABSTRACT BackgroundMalnutrition in older patients hospitalized for acute exacerbation of chronic obstructive pulmonary disease (AECOPD) is frequently overlooked. New-onset hypoalbuminemia during hospitalization is an important signal of worsening nutritional and inflammatory burden and is closely associated with adverse outcomes such as prolonged mechanical ventilation, readmission, and mortality. Early proactive warning tools based on admission data are lacking.MethodsThis dual-center retrospective cohort study included patients aged ≥65 years who were hospitalized for AECOPD between January 2023 and December 2025 and had normal serum albumin at admission (≥35 g/L). The Zigong cohort (n=1,502) was used for model development and internal validation, whereas the Qiannan cohort (n=1,086) served as the external test cohort. Among the Zigong cohort, 1052 patients were assigned to the training set and 450 to the internal validation set. The primary outcome was defined as new-onset hypoalbuminemia recorded in the discharge diagnosis during the same hospitalization among patients with normal admission albumin. Because the retrospective source database did not retain a standardized schedule for inpatient albumin re-testing, albumin measurement frequency and the median time from admission to outcome ascertainment could not be evaluated. To minimize information leakage, all feature-selection procedures were performed exclusively in the training set. Missing data were handled using multiple imputation. Candidate predictors were demographics and routine laboratory tests completed within 24 hours of admission. Core features were selected using the intersection of univariable screening, least absolute shrinkage and selection operator (LASSO) regression, and the Boruta algorithm. Logistic regression, decision tree, random forest, XGBoost, LightGBM, support vector machine, and artificial neural network models were developed with five-fold cross-validation and grid-search tuning. Discrimination, calibration, and decision-curve analysis were evaluated in an internal validation set and an external test set. Model interpretability was assessed with SHapley Additive exPlanations (SHAP), and the optimal model was deployed as an online risk calculator.ResultsAmong 1502 older AECOPD inpatients, 335 (22.3%) met the study definition of new-onset hypoalbuminemia by discharge. Eight core predictors available at admission were retained: cholinesterase (CHE), high-sensitivity C-reactive protein (hs-CRP), hematocrit (HCT), anion gap (AG), serum magnesium (Mg), alanine aminotransferase (ALT), age, and international normalized ratio (INR). XGBoost achieved AUCs of 0.85 in the internal validation set and 0.83 in the external test set, compared with 0.84 and 0.82, respectively, for logistic regression, indicating only a modest performance advantage. SHAP indicated that lower CHE, HCT, AG, and Mg and higher hs-CRP, age, and INR were associated with higher risk.ConclusionAn interpretable model derived from routine admission laboratory tests may support early risk stratification for new-onset hypoalbuminemia in older hospitalized patients with AECOPD. Nevertheless, further prospective validation is required to confirm its clinical utility and generalizability. Introduction Chronic obstructive pulmonary disease (COPD) is a major global health challenge and one of the leading causes of death worldwide.1–4 Previous studies have identified respiratory diseases as the second leading cause of mortality, highlighting the significant contribution of respiratory pathology and reinforcing the clinical importance of conditions such as COPD.5 In older adults, AECOPD is not only a respiratory event but also a systemic inflammatory and catabolic process. In this context, hypoalbuminemia is a key yet often underestimated prognostic determinant.6 Serum albumin is more than a nutritional marker; as a potent negative acute-phase reactant, it reflects systemic inflammation, endothelial permeability, and hepatic synthetic reserve.7,8 Epidemiological data suggest that 20%–50% of hospitalized older AECOPD patients exhibit hypoalbuminemia, which is associated with sarcopenia, prolonged mechanical ventilation, and increased mortality.8–10 Prior COPD prediction studies have also shown that routinely collected clinical and laboratory variables can be used to model important acute outcomes, supporting the feasibility of laboratory-based risk prediction for metabolic complications such as hypoalbuminemia in this population.11,12 Despite its clinical importance, early risk stratification remains challenging because metabolic dysregulation can be insidious in this heterogeneous population. Current management is largely reactive. Clinicians often rely on serial albumin measurements to confirm hypoalbuminemia, so interventions are usually initiated only after hypoalbuminemia has already become clinically apparent. Albumin kinetics during acute illness are more complex than a simple half-life argument: serum concentrations may decrease because of inflammation-driven reprioritization of hepatic protein synthesis, capillary leak, hemodilution, and redistribution, even when overt malnutrition is not yet clinically recognized. Although prealbumin (PA) is sometimes recommended for early nutritional assessment, it is not universally available and its specificity decreases markedly during the inflammatory storm of AECOPD.13–15 Traditional scores, such as the BODE index (body mass index, airflow obstruction, dyspnea, and exercise capacity), the DOSE index (dyspnea, obstruction, smoking, and exacerbation), and APACHE II, were developed for global outcomes rather than specific metabolic complications, and many existing prediction tools still rely on linear logistic regression that may not capture complex non-linear interactions among age, coagulation indices, and inflammatory biomarkers in older patients.11,12,16 Machine learning (ML) can model high-dimensional non-linear relationships, but clinical adoption has been limited by concerns about “black-box” behavior and usability.17–19 Many published models remain academic prototypes and are difficult to apply at the bedside. Therefore, we aimed to develop and externally validate an interpretable ML model using only routine admission laboratory tests to predict new-onset hypoalbuminemia among older hospitalized AECOPD patients and to translate the optimal model into an interactive web calculator as an exploratory risk-stratification aid rather than evidence of immediate outcome benefit or clinical readiness. Methods Study Design and Ethics This was a dual-center, retrospective cohort study. The study protocol was approved by the Ethics Committee of Zigong First People’s Hospital (Approval No.: (M)2026–015) and Qiannan People’s Hospital, Guizhou Province (Approval No.: 2026-qnzy-04). Due to the retrospective design, informed consent was waived. Data were collected from January 2023 to December 2025. The study was conducted in accordance with the Declaration of Helsinki. Study design, predictor handling, model development, and external validation were reported with reference to key items from the TRIPOD+AI statement and domains emphasized by PROBAST+AI.20,21 Participants and Eligibility Criteria Eligible patients were aged ≥65 years and hospitalized with a primary diagnosis of AECOPD. AECOPD was defined according to the GOLD 2023 report as an acute worsening of respiratory symptoms (dyspnea, cough, and/or sputum) usually occurring within 14 days and accompanied by increased local or systemic inflammation.22 The underlying diagnosis of COPD was confirmed by prior spirometry meeting GOLD criteria (post-bronchodilator FEV1/FVC <0.7). Outcome definition: Patients had normal serum albumin at admission (index albumin ≥35 g/L measured within the first 24 hours of admission). Patients were classified as having new-onset hypoalbuminemia if hypoalbuminemia was listed in the discharge diagnosis.23 Because the source database did not retain a standardized inpatient albumin re-testing schedule, the exact albumin measurement frequency and the median time from admission to outcome identification were unavailable and were therefore not analyzed. Exclusion criteria were applied to reduce confounding from secondary hypoalbuminemia due to primary organ failure: (1) albumin <35 g/L within the first 24 hours of admission; (2) severe hepatic dysfunction (decompensated cirrhosis or Child-Pugh score ≥7 [class B/C]);24 (3) severe renal dysfunction (eGFR <30 mL/min/1.73 m2, CKD stage 4–5, or nephrotic syndrome); (4) other acute high-consumption conditions within the preceding 4 weeks (major surgery, severe burns, or severe non-respiratory infections such as sepsis or peritonitis); and (5) missing data: no albumin measurement within the first 24 hours of admission or >20% missingness in key predictors. Sample Size and Data Preprocessing We used the events-per-variable (EPV) principle to assess sample adequacy. With eight predictors in the final model and 235 outcome events, EPV was ~29.3 (235/8), exceeding the commonly recommended threshold (≥10), suggesting adequate sample size to reduce overfitting. Missing values were addressed by multiple imputation, and all analyses were performed on imputed datasets. Feature Selection, Model Development, and Validation The Zigong cohort served as the development dataset and was randomly split 7:3 into a training set and an internal validation set. The Qiannan cohort served as an independent external test set to evaluate generalizability. Candidate variables included sex, age, and routine laboratory indices obtained within 24 hours of admission that were consistently available across both centers and are commonly included in the standard admission work-up for AECOPD, including complete blood count, coagulation tests, liver/kidney function, electrolytes, and inflammatory markers. These tests were chosen because they capture inflammatory burden, hematologic status, hepatic synthetic function, renal-metabolic reserve, and electrolyte imbalance without requiring additional examinations.25,26 Feature selection followed a multi-stage strategy performed exclusively within the training set to avoid information leakage: univariable screening, LASSO regression with cross-validation to shrink coefficients and reduce multicollinearity, and Boruta feature selection based on random-forest importance. The intersection of variables selected by all three methods was used as the final core feature set. Seven models were trained: logistic regression (LR), decision tree (DT), random forest (RF), XGBoost, LightGBM, support vector machine (SVM), and artificial neural network (ANN). Hyperparameters were tuned using grid search with five-fold cross-validation, optimizing AUC. Performance was evaluated in terms of discrimination (ROC/AUC and related metrics), calibration (calibration curves), and clinical utility (decision curve analysis). Model Interpretability and Web Deployment Model interpretability was assessed using SHapley Additive exPlanations (SHAP), including global feature-importance rankings, beeswarm plots, and dependence plots, as well as individual-level waterfall and force plots. The best-performing model was deployed as an interactive web calculator (https://elderly-hypoalb-calc.streamlit.app/) to enable bedside risk estimation at admission (Figure 1).Figure 1Patient selection flow diagram for older AECOPD inpatients.Study design flowchart: elderly AECOPD inpatients' data collection, processing, cohort division, model evaluation.This study is a double-center retrospective cohort from January 2023 to December 2025, examining elderly AECOPD inpatients at Zigong and Qiannan Hospitals. It includes patients aged 65+ with AECOPD diagnosis and albumin levels ≥35 g/L. Exclusions are albumin <35 g/L, severe liver/kidney dysfunction, recent major surgery, burns, severe infection, or >20% missing data. MICE is used for data imputation. The cohort is split into a development cohort at Zigong and a test cohort at Qiannan, with Zigong's cohort further divided into a training set (70%) and validation set (30%). Feature engineering employs univariate, LASSO and Boruta methods. Seven machine learning algorithms are used with five-fold cross-validation and grid search to optimize AUC. Evaluation involves internal validation and external test sets, assessing AUC, accuracy, F1 score, calibration and decision curves. SHAP analysis evaluates interpretability and a web calculator is available for clinical use. Patient selection flow diagram for older AECOPD inpatients. Statistical Analysis Normality was assessed using the Kolmogorov–Smirnov test. Normally distributed variables are presented as mean ± standard deviation and compared using Student’s t-test; non-normally distributed variables are presented as median (interquartile range) and compared using the Wilcoxon rank-sum test. Categorical variables are presented as counts (percentages) and compared using the chi-square test or Fisher’s exact test. All tests were two-sided with P<0.05 considered statistically significant. Because the univariable analyses were used only as an exploratory screening step within the training set rather than for formal confirmatory inference, multiplicity correction was not applied; instead, variable retention required concordance across univariable screening, LASSO shrinkage, and Boruta selection. Feature selection was performed in R (version 4.5.1; MICE, LASSO, Boruta), and model training and SHAP analyses were performed in Python (version 3.10). Results Baseline Characteristics The training cohort included 1,052 older inpatients with AECOPD after inclusion and exclusion criteria were applied (Figure 1). All patients had normal albumin on the first admission test. By discharge, 235 patients met the study definition of new-onset hypoalbuminemia (normal admission albumin plus a discharge diagnosis of hypoalbuminemia), and 817 did not. The cohort was predominantly male, with most patients aged 70–80 years. Compared with patients without hypoalbuminemia, those who were classified as having new-onset hypoalbuminemia were older and already showed higher inflammatory burden and reduced synthetic/metabolic reserve at admission, including lower CHE and higher hs-CRP. They also had lower hematocrit, lower anion gap and magnesium, higher INR, and mildly higher ALT. Detailed distributions and between-group comparisons are shown in Table 1.Table 1Baseline Characteristics of the Training CohortVariableTotal (N=1052)Non-Hypoalbuminemia (N=817)Hypoalbuminemia (N=235)pMale, n (%)842 (80.00)659 (80.66)183 (77.87)0.346Age (years)75.00 [71.00, 81.00]74.00 [70.00, 80.00]78.00 [72.00, 84.00]<0.001Myoglobin (ng/mL)56.00 [38.00, 84.50]56.00 [38.00, 82.00]57.00 [38.00, 96.00]0.608HBDH (U/L)161.00 [141.00, 196.00]160.00 [141.00, 194.00]171.00 [139.50, 217.00]0.137AST_ALT_Ratio1.31 [1.00, 1.70]1.33 [1.04, 1.67]1.27 [0.90, 1.79]0.145UA (μmol/L)317.50 [244.75, 393.00]325.00 [260.00, 394.00]280.00 [200.00, 383.00]<0.001AST (U/L)23.00 [19.00, 30.00]23.00 [19.00, 29.00]24.00 [19.00, 35.50]0.057K (mmol/L)4.09 [3.74, 4.56]4.09 [3.76, 4.56]4.07 [3.68, 4.56]0.078CK_MB (ng/mL)17.00 [13.00, 21.00]17.00 [13.00, 21.00]16.00 [12.00, 23.00]0.338hs_TnI (ng/L)9.75 [4.80, 21.85]8.80 [4.60, 19.70]15.40 [6.30, 30.50]<0.001hs_CRP (mg/L)7.92 [2.90, 35.61]6.70 [2.40, 26.70]18.02 [3.33, 78.25]<0.001AG (mmol/L)10.00 [7.30, 13.10]10.40 [7.60, 13.30]9.10 [6.30, 11.50]<0.001TBA (μmol/L)5.60 [3.20, 10.00]5.60 [3.20, 9.50]6.10 [3.30, 11.50]0.106ALP (U/L)85.00 [70.00, 105.00]85.00 [70.00, 104.00]89.00 [70.00, 109.00]0.296Urea (mmol/L)6.06 [4.69, 8.05]5.96 [4.59, 7.72]6.73 [5.10, 8.94]<0.001CHE (U/L)5768.53 (1522.81)6179.14 (1338.95)4341.04 (1236.36)<0.001Mg (mmol/L)0.82 [0.75, 0.88]0.83 [0.76, 0.88]0.79 [0.70, 0.89]0.005IBIL (μmol/L)5.70 [3.40, 8.43]6.00 [3.70, 8.80]5.20 [2.85, 7.50]<0.001GGT (U/L)25.00 [16.00, 42.00]23.00 [16.00, 40.00]29.00 [20.00, 54.50]<0.001Cr (μmol/L)76.30 [62.08, 93.00]76.00 [62.00, 92.50]77.00 [63.00, 99.20]0.398DBIL (μmol/L)3.30 [2.50, 4.82]3.30 [2.50, 4.80]3.20 [2.40, 5.05]0.514Na (mmol/L)137.80 [134.88, 140.30]137.90 [135.10, 140.30]137.50 [134.20, 140.05]0.048Cl (mmol/L)103.40 [99.80, 106.80]103.30 [99.80, 106.50]104.20 [99.80, 108.15]0.114ALT (U/L)18.00 [13.00, 26.00]18.00 [13.00, 25.00]20.00 [13.00, 33.00]0.008TBIL (μmol/L)9.30 [6.10, 13.43]9.50 [6.50, 13.60]8.30 [5.40, 12.70]0.003LDH (U/L)231.00 [187.00, 458.00]227.00 [186.00, 458.00]245.00 [191.00, 458.00]0.131Mono_abs (×10^9/L)0.62 [0.45, 0.84]0.60 [0.44, 0.83]0.66 [0.47, 0.88]0.012MCV (fL)93.00 [88.97, 96.62]93.00 [89.30, 96.70]93.10 [88.05, 96.60]0.4Eos_abs (×10^9/L)0.07 [0.02, 0.17]0.08 [0.02, 0.18]0.05 [0.01, 0.13]<0.001Baso_abs (×10^9/L)0.02 [0.01, 0.04]0.02 [0.01, 0.04]0.02 [0.01, 0.03]0.019P_LCR (%)33.00 [26.00, 40.10]33.20 [26.80, 40.30]31.00 [23.50, 38.98]0.007RDW (%)47.30 [44.38, 50.60]46.90 [44.20, 50.10]48.60 [44.85, 52.25]<0.001MCH (pg)29.90 [28.50, 31.20]29.90 [28.60, 31.20]29.60 [27.80, 31.10]0.065PCT (%)0.21 [0.17, 0.25]0.20 [0.17, 0.25]0.21 [0.16, 0.27]0.11MCHC (g/L)320.00 [311.00, 329.00]321.00 [313.00, 329.00]318.00 [310.00, 327.00]0.013PDW (fL)13.10 [11.10, 15.60]13.30 [11.30, 15.80]12.30 [10.33, 14.88]0.001Hb (g/L)125.00 [113.00, 137.00]129.00 [118.00, 139.00]115.00 [102.00, 126.50]<0.001Lym_abs (×10^9/L)0.87 [0.57, 1.23]0.88 [0.60, 1.27]0.80 [0.47, 1.13]0.001HCT (%)39.20 [35.60, 42.70]40.00 [36.60, 43.10]35.90 [32.25, 38.80]<0.001MPV (fL)11.00 [10.10, 12.00]11.10 [10.20, 12.00]10.80 [9.90, 11.80]0.012RBC (×10^12/L)4.21 [3.83, 4.66]4.31 [3.93, 4.72]3.92 [3.54, 4.31]<0.001WBC (×10^9/L)7.98 [6.03, 10.59]7.87 [6.00, 10.43]8.19 [6.29, 11.34]0.102PLT (×10^9/L)181.00 [141.00, 232.00]180.00 [142.00, 227.00]185.00 [140.00, 262.00]0.078Neu_abs (×10^9/L)6.16 [4.26, 8.83]6.02 [4.18, 8.53]6.41 [4.50, 9.47]0.042INR1.01 [0.95, 1.07]1.00 [0.94, 1.06]1.05 [0.98, 1.13]<0.001APTT (s)28.10 [26.30, 30.00]28.00 [26.20, 29.80]28.70 [26.65, 30.95]0.003TT (s)16.60 [15.50, 17.80]16.60 [15.50, 17.80]16.30 [15.30, 17.80]0.448NLR6.70 [4.00, 13.47]6.43 [3.86, 12.41]7.80 [4.78, 17.23]0.001PLR213.28 [136.19, 340.19]203.95 [131.18, 312.16]255.12 [162.81, 404.52]<0.001SII (×10^9/L)1309.06 [675.27, 2526.12]1182.58 [622.07, 2350.12]1676.62 [819.08, 3292.78]<0.001 Table 1Baseline Characteristics of the Training CohortVariableTotal (N=1052)Non-Hypoalbuminemia (N=817)Hypoalbuminemia (N=235)pMale, n (%)842 (80.00)659 (80.66)183 (77.87)0.346Age (years)75.00 [71.00, 81.00]74.00 [70.00, 80.00]78.00 [72.00, 84.00]<0.001Myoglobin (ng/mL)56.00 [38.00, 84.50]56.00 [38.00, 82.00]57.00 [38.00, 96.00]0.608HBDH (U/L)161.00 [141.00, 196.00]160.00 [141.00, 194.00]171.00 [139.50, 217.00]0.137AST_ALT_Ratio1.31 [1.00, 1.70]1.33 [1.04, 1.67]1.27 [0.90, 1.79]0.145UA (μmol/L)317.50 [244.75, 393.00]325.00 [260.00, 394.00]280.00 [200.00, 383.00]<0.001AST (U/L)23.00 [19.00, 30.00]23.00 [19.00, 29.00]24.00 [19.00, 35.50]0.057K (mmol/L)4.09 [3.74, 4.56]4.09 [3.76, 4.56]4.07 [3.68, 4.56]0.078CK_MB (ng/mL)17.00 [13.00, 21.00]17.00 [13.00, 21.00]16.00 [12.00, 23.00]0.338hs_TnI (ng/L)9.75 [4.80, 21.85]8.80 [4.60, 19.70]15.40 [6.30, 30.50]<0.001hs_CRP (mg/L)7.92 [2.90, 35.61]6.70 [2.40, 26.70]18.02 [3.33, 78.25]<0.001AG (mmol/L)10.00 [7.30, 13.10]10.40 [7.60, 13.30]9.10 [6.30, 11.50]<0.001TBA (μmol/L)5.60 [3.20, 10.00]5.60 [3.20, 9.50]6.10 [3.30, 11.50]0.106ALP (U/L)85.00 [70.00, 105.00]85.00 [70.00, 104.00]89.00 [70.00, 109.00]0.296Urea (mmol/L)6.06 [4.69, 8.05]5.96 [4.59, 7.72]6.73 [5.10, 8.94]<0.001CHE (U/L)5768.53 (1522.81)6179.14 (1338.95)4341.04 (1236.36)<0.001Mg (mmol/L)0.82 [0.75, 0.88]0.83 [0.76, 0.88]0.79 [0.70, 0.89]0.005IBIL (μmol/L)5.70 [3.40, 8.43]6.00 [3.70, 8.80]5.20 [2.85, 7.50]<0.001GGT (U/L)25.00 [16.00, 42.00]23.00 [16.00, 40.00]29.00 [20.00, 54.50]<0.001Cr (μmol/L)76.30 [62.08, 93.00]76.00 [62.00, 92.50]77.00 [63.00, 99.20]0.398DBIL (μmol/L)3.30 [2.50, 4.82]3.30 [2.50, 4.80]3.20 [2.40, 5.05]0.514Na (mmol/L)137.80 [134.88, 140.30]137.90 [135.10, 140.30]137.50 [134.20, 140.05]0.048Cl (mmol/L)103.40 [99.80, 106.80]103.30 [99.80, 106.50]104.20 [99.80, 108.15]0.114ALT (U/L)18.00 [13.00, 26.00]18.00 [13.00, 25.00]20.00 [13.00, 33.00]0.008TBIL (μmol/L)9.30 [6.10, 13.43]9.50 [6.50, 13.60]8.30 [5.40, 12.70]0.003LDH (U/L)231.00 [187.00, 458.00]227.00 [186.00, 458.00]245.00 [191.00, 458.00]0.131Mono_abs (×10^9/L)0.62 [0.45, 0.84]0.60 [0.44, 0.83]0.66 [0.47, 0.88]0.012MCV (fL)93.00 [88.97, 96.62]93.00 [89.30, 96.70]93.10 [88.05, 96.60]0.4Eos_abs (×10^9/L)0.07 [0.02, 0.17]0.08 [0.02, 0.18]0.05 [0.01, 0.13]<0.001Baso_abs (×10^9/L)0.02 [0.01, 0.04]0.02 [0.01, 0.04]0.02 [0.01, 0.03]0.019P_LCR (%)33.00 [26.00, 40.10]33.20 [26.80, 40.30]31.00 [23.50, 38.98]0.007RDW (%)47.30 [44.38, 50.60]46.90 [44.20, 50.10]48.60 [44.85, 52.25]<0.001MCH (pg)29.90 [28.50, 31.20]29.90 [28.60, 31.20]29.60 [27.80, 31.10]0.065PCT (%)0.21 [0.17, 0.25]0.20 [0.17, 0.25]0.21 [0.16, 0.27]0.11MCHC (g/L)320.00 [311.00, 329.00]321.00 [313.00, 329.00]318.00 [310.00, 327.00]0.013PDW (fL)13.10 [11.10, 15.60]13.30 [11.30, 15.80]12.30 [10.33, 14.88]0.001Hb (g/L)125.00 [113.00, 137.00]129.00 [118.00, 139.00]115.00 [102.00, 126.50]<0.001Lym_abs (×10^9/L)0.87 [0.57, 1.23]0.88 [0.60, 1.27]0.80 [0.47, 1.13]0.001HCT (%)39.20 [35.60, 42.70]40.00 [36.60, 43.10]35.90 [32.25, 38.80]<0.001MPV (fL)11.00 [10.10, 12.00]11.10 [10.20, 12.00]10.80 [9.90, 11.80]0.012RBC (×10^12/L)4.21 [3.83, 4.66]4.31 [3.93, 4.72]3.92 [3.54, 4.31]<0.001WBC (×10^9/L)7.98 [6.03, 10.59]7.87 [6.00, 10.43]8.19 [6.29, 11.34]0.102PLT (×10^9/L)181.00 [141.00, 232.00]180.00 [142.00, 227.00]185.00 [140.00, 262.00]0.078Neu_abs (×10^9/L)6.16 [4.26, 8.83]6.02 [4.18, 8.53]6.41 [4.50, 9.47]0.042INR1.01 [0.95, 1.07]1.00 [0.94, 1.06]1.05 [0.98, 1.13]<0.001APTT (s)28.10 [26.30, 30.00]28.00 [26.20, 29.80]28.70 [26.65, 30.95]0.003TT (s)16.60 [15.50, 17.80]16.60 [15.50, 17.80]16.30 [15.30, 17.80]0.448NLR6.70 [4.00, 13.47]6.43 [3.86, 12.41]7.80 [4.78, 17.23]0.001PLR213.28 [136.19, 340.19]203.95 [131.18, 312.16]255.12 [162.81, 404.52]<0.001SII (×10^9/L)1309.06 [675.27, 2526.12]1182.58 [622.07, 2350.12]1676.62 [819.08, 3292.78]<0.001 Baseline Characteristics of the Training Cohort Feature Selection and Core Predictors Univariable analyses were first conducted to screen candidate predictors associated with new-onset hypoalbuminemia. LASSO regression was then used to shrink coefficients and reduce multicollinearity, with cross-validation identifying an optimal penalty parameter (Figure 2a and b). In parallel, Boruta identified variables with stable importance across resampling (Figure 2c). The intersection of the three approaches yielded eight core predictors: CHE, hs-CRP, HCT, AG, Mg, ALT, age, and INR (Figure 2d). All predictors were obtained from routine admission tests within 24 hours.Figure 2Feature-selection workflow and identification of the core predictors. (a) Coefficient path plot of the LASSO regression model; (b) selection of the optimal penalty parameter (λ) based on cross-validation; (c) Boruta algorithm results classifying features as important versus unimportant; (d) intersection of features selected by univariable analysis, LASSO regression, and the Boruta algorithm, yielding eight core predictors.Four graphs showing LASSO regression, Boruta algorithm and feature selection results.Image A displays a graph with the x-axis as Log(lambda) and y-axis from 0.7 to 1.1, showing optimal penalty selection via cross-validation, with points from -10 to -2. Image B features a graph with Log(lambda) on the x-axis and Coefficients on the y-axis, depicting the LASSO regression model's coefficient path, with curves intersecting between -7 and -2. Image C presents a graph with various features on the x-axis and Importance on the y-axis, showing Boruta algorithm results, distinguishing important from unimportant features. Image D includes a Venn diagram of features selected by univariable analysis, LASSO regression and Boruta algorithm, identifying eight core predictors. A bar chart below indicates list sizes: LASSO with 12, Boruta with 29 and T-test with 31. Feature-selection workflow and identification of the core predictors. (a) Coefficient path plot of the LASSO regression model; (b) selection of the optimal penalty parameter (λ) based on cross-validation; (c) Boruta algorithm results classifying features as important versus unimportant; (d) intersection of features selected by univariable analysis, LASSO regression, and the Boruta algorithm, yielding eight core predictors. Model Performance Comparison Based on the eight core variables identified above, seven classification models were developed in the training set: LR, DT, RF, XGBoost, LightGBM, SVM, and ANN. Hyperparameter tuning was performed using a grid search combined with five-fold cross-validation, with AUC as the optimization objective. In the internal validation set, all models demonstrated favorable discrimination (Figure 3a). The XGBoost model achieved an AUC of 0.85, which was numerically but only slightly higher than logistic regression and random forest (both AUC = 0.84). XGBoost also achieved a relatively balanced performance in terms of accuracy (0.78), sensitivity (0.79), specificity (0.78), and F1 score (0.62) (Table 2). While LightGBM, SVM, and ANN also presented AUCs ranging from 0.83 to 0.84, some of these models exhibited compromised sensitivity or specificity. Calibration curves indicated a satisfactory fit between predicted probabilities and observed frequencies across all models (Figure 3b). Decision curve analysis (DCA) suggested that within the majority of reasonable clinical threshold ranges, employing any of the models provided a positive net benefit compared with the treat-all or treat-none strategies (Figure 3c).Table 2Performance of Models in Internal Validation and External Test SetsModelAUCAccuracyPrecisionSensitivitySpecificityF1 ScoreKappaYouden’s JPPVNPVValidation SetLogistic0.840.760.470.810.740.60.440.550.470.93Decision Tree0.780.720.430.740.710.540.360.450.430.91Random Forest0.840.730.450.830.710.580.410.540.450.94XGBoost0.850.780.510.790.780.620.480.570.510.93LightGBM0.840.780.50.780.770.610.460.550.50.92SVM0.840.760.470.820.740.60.440.560.470.93ANN0.830.750.470.780.740.580.420.520.470.92External Test SetLogistic0.820.760.640.680.80.660.480.490.640.83Decision Tree0.770.730.590.630.780.610.40.410.590.81Random Forest0.790.730.570.740.720.650.430.460.570.85XGBoost0.830.780.670.660.830.670.50.50.670.83LightGBM0.80.750.630.670.80.650.460.470.630.83SVM0.810.750.610.70.780.650.460.480.610.84ANN0.80.760.630.70.80.660.480.490.630.84 Figure 3Model performance comparison. (a) ROC curves of all models in the internal validation set; (b) calibration curves in the internal validation set, showing agreement between predicted probabilities and observed event rates; (c) decision curve analysis in the internal validation set, illustrating net clinical benefit across a range of threshold probabilities; (d) ROC curves of all models in the external test set; (e) calibration curves in the external test set; (f) decision curve analysis in the external test set.Six graphs comparing model performance: ROC, calibration and decision curves for validation and test sets.Image A displays a ROC curve for validation set model comparison, with sensitivity vs. 1-specificity. AUC scores: Logistic 0.840, Decision Tree 0.782, Random Forest 0.843, XGBoost 0.848, LightGBM 0.835, SVM 0.838, ANN 0.828. Image B shows calibration curves with true vs. predicted probability. Image C presents decision curve analysis with net benefit vs. threshold probability. Image D features a ROC curve for test set model comparison, with sensitivity vs. 1-specificity. AUC scores: Logistic 0.816, Decision Tree 0.769, Random Forest 0.791, XGBoost 0.825, LightGBM 0.804, SVM 0.811, ANN 0.797. Image E shows calibration curves with true vs. predicted probability. Image F displays decision curve analysis with net benefit vs. threshold probability. Table 2Performance of Models in Internal Validation and External Test SetsModelAUCAccuracyPrecisionSensitivitySpecificityF1 ScoreKappaYouden’s JPPVNPVValidation SetLogistic0.840.760.470.810.740.60.440.550.470.93Decision Tree0.780.720.430.740.710.540.360.450.430.91Random Forest0.840.730.450.830.710.580.410.540.450.94XGBoost0.850.780.510.790.780.620.480.570.510.93LightGBM0.840.780.50.780.770.610.460.550.50.92SVM0.840.760.470.820.740.60.440.560.470.93ANN0.830.750.470.780.740.580.420.520.470.92External Test SetLogistic0.820.760.640.680.80.660.480.490.640.83Decision Tree0.770.730.590.630.780.610.40.410.590.81Random Forest0.790.730.570.740.720.650.430.460.570.85XGBoost0.830.780.670.660.830.670.50.50.670.83LightGBM0.80.750.630.670.80.650.460.470.630.83SVM0.810.750.610.70.780.650.460.480.610.84ANN0.80.760.630.70.80.660.480.490.630.84 Performance of Models in Internal Validation and External Test Sets Model performance comparison. (a) ROC curves of all models in the internal validation set; (b) calibration curves in the internal validation set, showing agreement between predicted probabilities and observed event rates; (c) decision curve analysis in the internal validation set, illustrating net clinical benefit across a range of threshold probabilities; (d) ROC curves of all models in the external test set; (e) calibration curves in the external test set; (f) decision curve analysis in the external test set. In the independent external test set, the performance of all models declined slightly compared with the internal validation set but remained acceptable overall (Figure 3d). XGBoost retained the highest observed discrimination, with an AUC of 0.83 compared with 0.82 for logistic regression, indicating only a modest absolute difference in AUC. XGBoost achieved an accuracy of 0.78, sensitivity of 0.66, specificity of 0.83, and F1 score of 0.67 (Table 2). Accordingly, XGBoost was selected as the final model because of its overall balance across discrimination, calibration, and decision-curve performance rather than because of a large gain in discrimination alone. The external calibration curve demonstrated that the predicted probabilities of the XGBoost model aligned well with the actual risks (Figure 3e), and the external DCA further confirmed stable net benefit across a wide range of threshold probabilities (Figure 3f). Global SHAP Analysis and Non-Linear Effects of Key Features To enhance model interpretability, a global SHAP analysis was conducted on the final XGBoost model. The feature importance bar plot demonstrated that CHE had the highest mean absolute SHAP value regarding model output, identifying it as the most significant predictor. This was followed by hs-CRP, HCT, AG, Mg, ALT, age, and INR (Figure 4a). The SHAP beeswarm plot further elucidated the relationship between variable values and the direction of prediction: generally, lower values of CHE, HCT, AG, and Mg, as well as higher values of hs-CRP, age, and INR, tended to shift the model output toward the “occurrence of hypoalbuminemia” (SHAP value > 0), whereas values in the opposite direction were associated with lower risk (Figure 4b). SHAP dependence plots revealed non-linear and threshold effects for select key variables (Figure 4c). For instance, as CHE levels decreased, its positive SHAP value exhibited an approximately monotonic increase; specifically, when CHE was significantly lower than the population mean, its driving effect on risk became particularly prominent. Conversely, the positive contribution of hs-CRP to risk increased sharply at moderate-to-high levels, suggesting that a higher inflammatory burden correlates with a greater likelihood of hypoalbuminemia. Regarding HCT, when levels approached or fell below the lower quartile, the negative shift in model output (indicating a diminished protective effect) was evident. Notably, AG exhibited a “low-value risk” pattern; at low-normal or even mildly reduced levels, its SHAP values were predominantly located on the risk-increasing side, implying that hypoalbuminemia might mask certain signals of potential metabolic acidosis. Overall, the model’s decision-making process was primarily driven by multidimensional indicators, including liver synthetic function (CHE), systemic inflammation level (hs-CRP), anemia/volume status (HCT), acid-base/metabolic burden (AG), and coagulation function.Figure 4Global SHAP interpretability analysis of the XGBoost model. (a) SHAP feature-importance bar plot showing the mean absolute SHAP value for each predictor; (b) SHAP beeswarm plot illustrating the overall distribution of feature values and their corresponding contributions to predicted risk; (c) SHAP dependence plots for key predictors.Three SHAP plots: feature-importance bar plot, beeswarm plot and dependence plots for predictors in XGBoost model.The image A showing a SHAP feature-importance bar plot with the x-axis labeled mean left parenthesis SHAP value right parenthesis and no unit, displaying predictors CHE, hs-CRP, HCT, AG, Mg, ALT, Age and INR with values ranging from 0.01 to 0.14. The image B showing a SHAP beeswarm plot with the x-axis labeled SHAP value left parenthesis impact on model output right parenthesis and no unit, illustrating feature values for CHE, hs-CRP, HCT, AG, Mg, ALT, Age and INR, with values from negative 0.2 to positive 0.4. The image C showing SHAP dependence plots for predictors Mg, ALT, AG, hs-CRP, CHE, INR, HCT and Age, each with individual x-axis labels corresponding to the predictor name and no unit and y-axis labeled SHAP value for predictor name and no unit. Each plot shows a range of values with visible data points and trend lines, indicating the relationship between predictor values and SHAP values. Global SHAP interpretability analysis of the XGBoost model. (a) SHAP feature-importance bar plot showing the mean absolute SHAP value for each predictor; (b) SHAP beeswarm plot illustrating the overall distribution of feature values and their corresponding contributions to predicted risk; (c) SHAP dependence plots for key predictors. Individual-Level SHAP Interpretation and Consistency Verification of the Web Calculator To demonstrate the model’s interpretability at the individual patient level and to verify the consistency between the offline model and the online calculator, two representative elderly AECOPD patients were selected for illustration (Figure 5).Figure 5Individual-level SHAP interpretation and consistency verification of the web calculator. (a and b) SHAP waterfall plots for the high-risk case; (c and d) SHAP force plots for the low-risk case; (e) web-calculator output for the high-risk case; (f) web-calculator output for the low-risk case.SHAP plots and web calculator outputs for AECOPD risk prediction in high and low cases.Image A: SHAP waterfall plot for Class 0 - hs_CRP -0.86, AG -0.05, ALT +0.03, HCT -0.03, CHe -0.02, INR -0.02, Age +0.01, Mg +0.01. Image B: SHAP waterfall plot for Class 1 - hs_CRP +0.06, AG -0.05, ALT -0.03, HCT +0.03, CHe -0.02, INR -0.01, Age -0.01, Mg +0.01. Image C: SHAP force plot for Class 0 - HCT -0.15, CHe -7.96, hs_CRP -0.86, AG -0.05, Age -0.01, ALT +0.15. Image D: SHAP force plot for Class 1 - ALT +0.15, hs_CRP +0.06, CHe -7.96, AG -0.05, Age -0.01, HCT -0.15. Image E: Web calculator for high risk - Age 74, CHe 47.57, hs_CRP 54.5, HCT 37.8, AG 0.8, Mg 0.67, ALT 13.0. High risk detected: 33.97% and 50.0%. Image F: Web calculator for low risk - Age 70, CHe 79.0, hs_CRP 10.0, HCT 37.5, AG 6.43, Mg 0.99, ALT 15.0. Low risk: 1.37% and 2.0%. Individual-level SHAP interpretation and consistency verification of the web calculator. (a and b) SHAP waterfall plots for the high-risk case; (c and d) SHAP force plots for the low-risk case; (e) web-calculator output for the high-risk case; (f) web-calculator output for the low-risk case. For Case 1, admission laboratory results revealed a marked reduction in CHE, along with elevated hs-CRP and INR levels, accompanied by lower HCT, slightly decreased AG, and mild hypomagnesemia. Based on these features, the XGBoost model predicted a probability of hypoalbuminemia exceeding 33%, which surpassed the pre-set clinical intervention threshold of the web calculator. Consequently, the interface automatically prompted a “High Risk” alert, recommending “strengthened nutritional monitoring and intervention” (Figure 5e). The corresponding SHAP waterfall plot indicated that low CHE, low HCT, and low AG, combined with high hs-CRP and INR, were the primary positive contributors driving the risk upward. In contrast, certain indicators approaching normal ranges exerted a partial mitigating effect on the risk (Figure 5a and b). In Case 2, indicators such as CHE, HCT, AG, and Mg were essentially within or near normal ranges, while hs-CRP and INR were only mildly elevated (Figure 5f). The model predicted a hypoalbuminemia probability of approximately 2%, falling far below the intervention threshold. The web calculator concluded “Low Risk,” suggesting “routine follow-up” (Figure 5f). The SHAP force plot demonstrated that the majority of features (eg., higher CHE, relatively normal HCT and AG) made negative contributions to the model output, shifting the prediction toward the non-occurrence of hypoalbuminemia (Figure 5c and d). Although factors such as slightly elevated hs-CRP and age marginally increased the risk, they were insufficient to alter the overall judgment. The risk probabilities obtained from the online calculator for both patients were completely consistent with the inferences from the offline model. This supports numerical consistency between the deployed calculator and the offline model; however, the web calculator should still be regarded as an exploratory aid until prospective clinical-impact validation is available. Discussion In this study, we developed an interpretable XGBoost-based model for predicting the risk of hypoalbuminemia in older patients with AECOPD. Among 1,052 patients, 22.3% met the study definition of new-onset hypoalbuminemia by discharge. This incidence falls within the mid-range of nutritional risk previously reported in respiratory disease populations.8 Based on eight routine indicators collected within 24 hours of admission (CHE, hs-CRP, HCT, AG, Mg, ALT, age, and INR), the final model achieved an AUC of 0.83 in the external test set, compared with 0.82 for logistic regression. Thus, the observed advantage of XGBoost was modest, but the model still provided an interpretable framework for early nutritional risk stratification using routinely available admission data. Compared with tools such as the BODE index, our model does not require exercise testing and may therefore be easier to apply in older, acutely ill patients. However, prediction alone does not demonstrate improved prognosis, and prospective validation is required before routine implementation. In our model, CHE and hs-CRP exhibited the highest feature contribution, reflecting the interplay between hepatic synthetic capacity and systemic inflammatory burden. While albumin is a relatively delayed marker of acute stress, CHE is also synthesized by the liver and may decrease earlier when synthetic reserve is impaired. Our SHAP analysis showed that lower CHE levels at admission were associated with a higher predicted risk of subsequent hypoalbuminemia.27 Elevated CRP likewise reflects inflammatory burden during AECOPD.28 Taken together, these findings suggest that CHE and hs-CRP may capture the inflammatory-catabolic milieu of AECOPD, but they should not be interpreted as proving a direct mechanistic pathway. Age also emerged as an independent predictor, likely reflecting accumulated frailty, multimorbidity, chronic inflammation, and diminished physiologic reserve in older hospitalized patients.29 The inclusion of INR and ALT in our model adds a broader systemic-hepatic dimension to nutritional risk assessment. We found that mild elevations in ALT and prolonged INR were associated with hypoalbuminemia, and low HCT was also more common among patients who developed the outcome. One possible explanation is that these variables reflect systemic illness, hypoxic stress, occult hepatic dysfunction, or venous congestion; however, in the absence of echocardiographic or hemodynamic data, any interpretation in terms of cardio-hepatic congestion remains speculative. Accordingly, these markers should be viewed as associative risk signals rather than proof of a specific causal pathway.30 Additionally, we observed a non-linear relationship between AG and the risk of hypoalbuminemia. Since albumin is a major plasma anion, a decrease in albumin concentration can lower uncorrected AG readings, which may complicate the interpretation of acid-base balance.31 Our model identified low-normal AG values as potentially informative, but this finding should be interpreted cautiously and requires further mechanistic study. Hypomagnesemia was also associated with higher risk. Prior studies have reported frequent hypomagnesemia during acute COPD exacerbations,32 and magnesium is biologically relevant to multiple enzymatic and metabolic pathways.33 Nevertheless, our study did not capture corticosteroid dose or other treatment exposures, so the relationship between lower magnesium and hypoalbuminemia should be regarded as observational rather than causal. Compared with existing prognostic tools, our model offers practical advantages. Traditional scores such as the BODE index (body mass index, airflow obstruction, dyspnea, and exercise capacity) and the DOSE index (dyspnea, obstruction, smoking, and exacerbation) require symptom- or performance-based assessment that may be difficult to obtain in older patients during the acute phase. In contrast, all variables in our model are derived from routine tests. By integrating inflammatory (CRP) and hepatic synthetic (CHE) indicators, the model achieves nutritional risk prediction without incurring additional examination costs. It is worth noting that PA (prealbumin), although recommended for nutritional assessment, is itself a negative acute-phase protein that decreases rapidly under inflammatory conditions, making nutritional interpretation challenging.34 The main practical appeal of our model is therefore its accessibility. At the same time, the performance gain of XGBoost over logistic regression was small; its value in this study lies more in handling non-linearity and providing SHAP-based interpretability than in a large increase in AUC. Several limitations of this study must be acknowledged. First, the retrospective design may introduce selection bias; although we mitigated this through multicenter external validation, prospective validation remains necessary. Second, the source database lacked several clinically relevant confounders, including body mass index (BMI), smoking status, COPD severity, corticosteroid dose, structured nutritional assessment at admission, and active malignancy/chemotherapy status; these unmeasured factors may have influenced both albumin dynamics and model predictions. Third, because the outcome was identified by normal admission albumin plus a discharge diagnosis of hypoalbuminemia, the exact inpatient albumin remeasurement frequency and the median time from admission to outcome identification were unavailable. Fourth, the model used only baseline admission data and did not capture treatment effects during hospitalization, including nutritional support and other evolving therapies. Fifth, although multicenter validation was performed, center-specific laboratory calibration differences may still affect transportability. Finally, the external sensitivity of 66% indicates that some at-risk patients would still be missed. Therefore, the calculator should be viewed as an adjunctive risk-stratification tool rather than evidence that early detection improves outcomes; prospective impact studies are needed before clinical implementation. Conclusion In summary, we developed and externally tested an interpretable machine learning model to predict the risk of new-onset hypoalbuminemia in older AECOPD patients. Using routine admission laboratory indicators, the model may help identify patients who warrant closer nutritional monitoring without additional testing. However, its incremental advantage over logistic regression was modest, and prospective studies are still needed to further evaluate its clinical utility before routine implementation.