Predicting In-Hospital Mortality in Pediatric Sepsis: Machine Learning Development and Multicenter Validation Authors: Juntao Lin, Jin Xiong, Qinxin Fan, Jie Ren, Zhenxuan Kong, Yan Zhao, Qinyuan Li, Kaicheng Peng, Hui Liu, Ximing Xu, Zhengxiu Luo Published: 2026 ABSTRACT AbstractBackgroundEarly identification of pediatric sepsis patients at high risk of in-hospital mortality is crucial. However, the clinical utility of existing machine learning (ML) models is limited by temporal data leakage and a lack of robust external validation.ObjectiveTo develop, interpret, and externally validate an interpretable ML model for predicting in-hospital mortality in pediatric sepsis, utilizing only predictors available within the first 24 hours of ICU admission.MethodsBased on a retrospective development cohort from the Children’s Hospital of Chongqing Medical University, eight ML algorithms were evaluated. Predictor variables were strictly limited to the first 24 ICU hours to prevent temporal bias. The best-performing model was interpreted via SHAP, calibrated with spline-based regression, and externally validated on the Pediatric Intensive Care (PIC) database (pediatric cohort) and the MIMIC-IV database (adult cohort, to test biological generalizability). A web-based calculator was developed.ResultsXGBoost achieved the best performance (AUC: 0.821, 95% CI: 0.751–0.892). In external validation, the model demonstrated strong generalizability, yielding AUCs of 0.735 (95% CI: 0.700–0.770) in the pediatric PIC cohort and 0.778 (95% CI: 0.763–0.793) in the adult MIMIC-IV cohort. The calibrated model showed excellent agreement (pediatric Brier score: 0.060, calibration slope: 1.000, intercept: 0.000). Decision curve analysis confirmed clinical net benefit between 3% and 27% thresholds. SHAP analysis identified pH, fibrinogen, lactate, platelet count, urea, and chloride as the key predictors.ConclusionWe developed a validated, interpretable XGBoost model for early risk stratification of pediatric sepsis. By restricting predictors to the initial 24 hours, the model avoids temporal bias while maintaining stable performance across pediatric and adult cohorts. This web-based tool is ready to support clinical bedside decision-making.Keywords: pediatric sepsis, machine learning, prognostic model, XGBoost, in-hospital mortality Introduction Sepsis is defined as life‑threatening organ dysfunction resulting from a dysregulated host response to infection and remains a leading cause of mortality and pediatric intensive care unit (PICU) admissions worldwide.1–5 Recently, the Society of Critical Care Medicine introduced the Phoenix Sepsis Criteria, which define pediatric sepsis based on a score of at least two points in the Phoenix Organ Dysfunction Score, providing a standardized, globally applicable framework to identify life-threatening organ dysfunction in children.1 Its rapid progression often leads to severe organ failure and death, making early and accurate identification of high‑risk pediatric sepsis patients essential for timely intervention and the potential to improve outcomes. Several scoring systems, such as the Pediatric Risk of Mortality (PRISM) and the Pediatric Logistic Organ Dysfunction (PELOD) score, are currently used in clinical practice to assess sepsis severity and predict prognosis.6 However, these traditional tools primarily rely on a limited set of physiological parameters and are often based on linear assumptions, which may be insufficient to capture the complex, non‑linear pathophysiological interactions inherent in sepsis. This leaves considerable room for improvement in predictive performance. In recent years, machine learning (ML) techniques have shown significant promise in medical prediction tasks due to their ability to model non‑linear relationships and handle high‑dimensional data. Several studies have explored algorithms such as Random Forest and Support Vector Machines for outcome prediction in adult sepsis populations.7–9 Although machine learning has recently been applied to optimize pediatric sepsis stratification and prognosis, existing models are often constrained by their focus on specific clinical sub-populations, reliance on complex or non-routine variables, or a lack of robust validation across heterogeneous cohorts.10,11 These limitations hinder their general clinical translation for real-time mortality prediction. Despite the promise of machine learning in clinical prognostication, its application in pediatric sepsis remains constrained by several persistent challenges. First, existing studies often develop single models or compare only a limited number of algorithms, lacking a systematic evaluation across a broad range of advanced techniques. Second, the “black‑box” nature of many complex ML models obscures their decision‑making logic, which undermines clinical trust and hinders adoption. Third, most models have not undergone rigorous external validation using independent databases. Finally, few studies successfully translate predictive models into practical, clinician‑friendly tools, leaving a substantial gap between model development and bedside implementation. To address these gaps, the present study aimed to develop and validate an interpretable machine learning–based prognostic framework for pediatric sepsis. Our approach consisted of four key components: systematically comparing eight machine learning algorithms; enhancing model interpretability using SHAP; conducting external validation across both pediatric and adult cohorts; and deploying the optimal model as an open‑access web calculator to facilitate clinical implementation. Importantly, candidate predictors were strictly limited to clinical variables obtained within the first 24 hours of PICU admission to prevent data leakage and ensure early clinical utility. To address the critical gap in external generalizability, we validated the model on two fronts: first, using the pediatric-specific PIC database to evaluate cross-cohort robustness within the target pediatric population; second, leveraging the adult MIMIC-IV database for cross-age validation to test whether the model captures shared, core pathological features of sepsis that transcend life stages.12 Finally, by translating model development into a web‑based calculator, we offer a practical tool to support individualized clinical decision‑making at the bedside. Materials and Methods Study Design and Populations We conducted a retrospective cohort study to develop and validate machine learning models for predicting in-hospital mortality in pediatric sepsis. We first excluded patients with missing data for any routine baseline clinical variables. The development cohort was derived from the Children’s Hospital of Chongqing Medical University and included 1,005 pediatric patients (aged≥28 days and <18 years) who met the Phoenix Sepsis Criteria (Phoenix Sepsis Score≥2) between June 2018 and June 2023. Exclusion criteria for this development cohort were: (1) length of hospital stay less than 24 hours; (2) missing outcome data; and (3) more than 30% missing values in candidate predictors. To ensure clinical utility and early application, all clinical laboratory measurements utilized for baseline prediction were obtained within the first 24 hours of admission. For external validation, we employed a dual-cohort validation strategy using two large-scale independent critical care databases: the Pediatric Intensive Care (PIC) database (2010–2018) for pediatric external validation, and the Medical Information Mart for Intensive Care IV (MIMIC-IV) database (2008–2022) for adult cross-population validation. For the PIC cohort, a total of 12,881 patients with first-time PICU admission were initially screened. Following the application of the Phoenix Sepsis Criteria (Phoenix Sepsis Score≥2) and the exclusion of neonates (aged <28 days) and patients with a hospital stay less than 24 hours, and after removing cases with missing routine clinical data, 4,491 patients were initially enrolled. After further excluding patients with missing data for critical predictors (including pH, fibrinogen, and other baseline clinical features), a final cohort of 3,362 pediatric patients was included. For the MIMIC-IV cohort, 72,043 patients in their first hospital admission were screened. We first excluded patients with missing data for any routine baseline clinical variables. Applying the Sepsis-3.0 criteria (Sequential Organ Failure Assessment score≥2) and requiring a hospital stay exceeding 24 hours yielded 25,045 initially enrolled adult patients. Following the same exclusion criteria for missing key predictors, including pH, fibrinogen, and other clinical features, 6,931 adult patients were ultimately included. The inclusion of these two distinct validation cohorts served complementary purposes. While the PIC cohort directly validates the clinical applicability and generalizability of the models within a separate pediatric population, the MIMIC-IV adult cohort functions as a stringent test of generalizability, specifically evaluating whether the models capture universal pathophysiological patterns of sepsis rather than population-specific pediatric correlations. This cross-demographic approach was feasible because the final predictor set excluded age and other overtly age-specific variables, focusing instead on core physiological derangements shared across age groups, such as organ dysfunction, hypoperfusion, and systemic inflammation.13–15 This retrospective study was approved by the Institutional Review Board of the Children’s Hospital of Chongqing Medical University (File No. 2025298), which waived the requirement for informed consent due to the anonymous nature of the data. Access to and use of the MIMIC-IV and PIC databases was authorized via PhysioNet (Certification No. 64539312). Predictors, Outcomes, and Data Preprocessing The primary outcome of interest was in-hospital all-cause mortality. A structured feature selection process was implemented, integrating clinical knowledge, univariate analysis, and least absolute shrinkage and selection operator (LASSO) regression to mitigate overfitting and derive a parsimonious model. LASSO regression with 10-fold cross-validation was performed using the glmnet package in R, with predictor variables standardized to zero mean and unit variance. The optimal regularization parameter (λ) was determined based on the one standard error criterion (λ1se) to select a stable and concise predictor set for the final mortality model. Missing values were addressed using k-nearest neighbors imputation for variables with a missing rate below 30%, while continuous variables were winsorized at the 1st and 99th percentiles to reduce the influence of outliers. The development cohort was randomly split into a training set (70%) and a testing set (30%). The final mortality model included six key parameters: pH levels, lactate levels, chloride levels, fibrinogen levels, platelet count, and urea levels. Model Development and Validation We systematically trained eight machine learning algorithms for the prediction of in-hospital mortality: Logistic Regression, Decision Tree, Random Forest, K-Nearest Neighbors, Support Vector Machine, Neural Network, XGBoost, and LightGBM. Hyperparameter tuning was performed using 10-fold cross-validation with Bayesian optimization to maximize the area under the receiver operating characteristic curve (AUC). Model performance was primarily evaluated using the AUC on the held-out test set, supplemented by accuracy, precision, recall, and F1-score. To rigorously assess generalizability, external validation was conducted using the PIC and MIMIC-IV cohorts. This validation design enabled evaluation of model performance across distinctly different healthcare settings, age groups (pediatric and adult populations), and clinical protocols. In the external validation cohorts, we assessed discrimination (AUC), calibration (calibration plots and Brier score), and clinical utility (decision curve analysis across a range of clinically relevant thresholds) to provide a comprehensive evaluation of model applicability in real-world clinical environments. Model Interpretation and Clinical Application To enhance interpretability, we applied SHAP analysis to the best-performing models, enabling explanation of predictions at both global and individual patient levels. The final models were deployed as interactive web-based calculators, allowing real-time estimation of individualized risk probabilities. All analyses were performed using R version 4.5.1. Statistical Analysis All statistical analyses were performed using R software (version 4.5.1). Model discrimination was primarily evaluated using the AUC, with 95% CIs derived via DeLong’s method. Pairwise comparisons of AUCs between the best-performing model and other candidate machine learning algorithms were performed using DeLong’s test. During the model development phase, 10-fold cross-validation was utilized for hyperparameter tuning on the training set, and internal validation was evaluated on the held-out test set. External validation was carried out on the PIC and MIMIC-IV cohorts as described above. Model interpretability was achieved using SHAP, which quantifies feature importance at both global and individual levels. All statistical tests were two-sided, and a p-value < 0.05 was considered statistically significant. To support clinical application, we developed an interactive web-based calculator that delivers real-time risk predictions along with 95% CIs, enabling clinicians to account for prediction uncertainty at the point of care. This study followed the RECORD guidelines. Results Study Population and Baseline Characteristics The final development cohort comprised 1,005 pediatric patients. After rigorous data quality control, 56 candidate variables (including demographics, clinical parameters, and the primary outcome of in-hospital mortality) were retained for analysis. Missingness for the included variables was < 30% (eg, red cell distribution width: 12.4%; total calcium: 3.8%; fibrinogen: 1.99%) and was handled using KNN imputation; variables with missingness exceeding 30% (eg, height: 36.2%) were excluded. The baseline clinical and demographic characteristics of the development cohort are summarized in Table 1. Table 1Baseline CharacteristicsVariableOverall N = 1005aSurvival N = 908aNon-survival N = 97ap-valuebGender0.929Female455 (45.3%)412 (45.4%)43 (44.3%)Male550 (54.7%)496 (54.6%)54 (55.7%)Age (years)2.65 (0.81, 7.00)2.68 (0.83, 6.95)2.61 (0.64, 8.24)0.711Weight (kg)13.00 (8.00, 21.00)13.00 (8.10, 21.00)14.00 (7.50, 26.00)0.797Procalcitonin (ng/mL)4.00 (0.71, 22.88)3.93 (0.71, 20.71)5.50 (0.71, 36.27)0.401Platelet Distribution Width (fL)12.00 (10.50, 14.22)11.90 (10.47, 14.16)13.32 (11.40, 15.10)<0.001Lymphocyte Count (×10^9/L)1.98 (1.12, 3.61)2.02 (1.14, 3.59)1.75 (0.86, 3.84)0.150Lymphocyte Percentage (%)23.01 (12.80, 37.00)23.00 (12.05, 36.49)25.55 (17.00, 41.00)0.065Monocyte Count (×10^9/L)0.38 (0.19, 0.65)0.38 (0.20, 0.67)0.25 (0.13, 0.50)0.001Monocyte Percentage (%)4.00 (2.56, 6.00)4.00 (2.60, 6.00)3.00 (2.00, 5.40)0.110Neutrophil Count (×10^9/L)7.70 (4.00, 12.60)7.97 (4.12, 12.74)6.22 (2.95, 10.73)0.016Neutrophil Percentage (%)71.30 (56.80, 83.00)72.00 (56.94, 83.00)69.00 (55.00, 79.42)0.193Red Cell Distribution Width (%)14.40 (13.40, 18.20)14.31 (13.36, 17.65)15.40 (14.00, 22.10)<0.001Lactate (mmol/L)1.55 (1.10, 2.50)1.50 (1.10, 2.20)3.53 (1.79, 6.00)<0.001Mean Arterial Pressure (mmHg)70.33 (63.33, 78.00)70.36 (63.67, 78.02)69.33 (60.67, 76.00)0.143Systolic Blood Pressure (mmHg)97.00 (88.65, 105.98)97.05 (89.00, 106.00)94.00 (83.00, 104.66)0.085Diastolic Blood Pressure (mmHg)57.00 (50.00, 64.75)57.19 (50.00, 64.80)56.00 (47.18, 64.00)0.282Respiratory Rate (breaths/min)33.00 (26.00, 45.00)33.00 (26.00, 45.00)32.00 (25.00, 48.00)0.505Temperature (°C)37.10 (36.60, 38.20)37.20 (36.60, 38.20)36.80 (36.50, 38.00)0.003Heart Rate (beats/min)132.00 (117.00, 152.00)132.00 (117.00, 150.50)136.00 (112.00, 163.00)0.463Red Blood Cell Count (×10^12/L)3.80 (3.35, 4.32)3.81 (3.38, 4.31)3.78 (3.26, 4.38)0.974Mean Corpuscular Hemoglobin Concentration (g/L)330.00 (319.00, 339.00)331.00 (320.00, 339.00)326.00 (315.00, 338.00)0.022Hemoglobin (g/L)95.00 (57.00, 112.00)95.00 (59.50, 112.00)90.00 (13.50, 109.00)0.306Mean Corpuscular Volume (fL)81.70 (77.90, 85.80)81.70 (77.90, 85.70)82.10 (77.90, 86.90)0.432Mean Corpuscular Hemoglobin (pg)27.10 (25.60, 28.50)27.10 (25.70, 28.50)27.00 (25.60, 28.70)0.972Platelet Count (×10^9/L)215.00 (107.00, 364.00)230.50 (113.50, 374.00)124.00 (61.00, 214.00)<0.001White Blood Cell Count (×10^9/L)11.21 (6.18, 17.03)11.31 (6.52, 17.11)8.36 (4.27, 15.86)0.014Platelet Large Cell Ratio (%)28.80 (22.20, 36.50)28.50 (21.90, 36.07)32.30 (25.60, 39.50)0.002C-Reactive Protein (mg/L)38.37 (9.00, 80.00)39.52 (9.96, 83.00)21.00 (8.00, 57.00)0.003Mean Platelet Volume (fL)10.50 (9.70, 11.40)10.40 (9.60, 11.40)10.80 (10.06, 11.90)0.006pH7.42 (7.35, 7.46)7.42 (7.37, 7.46)7.35 (7.24, 7.42)<0.001Potassium (mmol/L)3.96 (3.51, 4.44)3.94 (3.50, 4.43)4.05 (3.60, 4.50)0.493Uric Acid (μmol/L)249.00 (166.00, 372.40)243.00 (165.00, 362.00)316.00 (191.20, 532.00)<0.001Cholinesterase (U/L)4654.00 (3436.00, 6130.00)4674.00 (3473.50, 6100.50)4146.00 (2867.00, 6306.00)0.253AST/ALT Ratio1.62 (1.07, 2.44)1.60 (1.06, 2.33)2.25 (1.35, 3.17)<0.001Alanine Aminotransferase (U/L)37.80 (21.00, 82.10)35.50 (20.75, 75.50)64.00 (26.90, 203.50)<0.001Total Bilirubin (μmol/L)7.40 (4.50, 14.50)7.23 (4.50, 14.13)8.10 (4.40, 27.40)0.318Alkaline Phosphatase (U/L)148.70 (106.00, 209.00)146.00 (105.00, 204.50)173.00 (111.80, 245.00)0.017Gamma-Glutamyl Transferase (U/L)25.00 (13.10, 72.60)24.00 (13.00, 69.40)45.00 (22.00, 103.70)<0.001Phosphorus (mmol/L)1.35 (1.08, 1.65)1.33 (1.08, 1.63)1.47 (1.14, 1.89)0.007Chloride (mmol/L)102.50 (99.00, 106.00)102.40 (99.00, 105.80)103.00 (99.90, 112.00)0.025Creatinine (μmol/L)32.00 (23.00, 48.00)31.90 (23.00, 46.65)40.60 (25.00, 75.00)<0.001Albumin (g/L)32.30 (27.00, 37.20)32.50 (27.30, 37.35)29.60 (25.50, 35.20)0.008Total Calcium (mmol/L)2.14 (1.99, 2.30)2.14 (2.00, 2.30)2.08 (1.94, 2.30)0.101Urea (mmol/L)3.97 (2.69, 6.48)3.87 (2.61, 6.21)6.00 (3.69, 10.15)<0.001Aspartate Aminotransferase (U/L)57.00 (31.80, 149.00)54.00 (31.00, 125.80)158.10 (54.00, 396.50)<0.001Myoglobin (μg/L)29.58 (14.36, 125.56)28.26 (14.03, 107.14)69.73 (23.03, 644.21)<0.001Sodium (mmol/L)135.60 (132.00, 138.60)135.60 (132.00, 138.35)136.20 (131.60, 140.00)0.187Indirect Bilirubin (μmol/L)5.00 (2.67, 9.50)5.05 (2.70, 9.55)4.80 (2.00, 9.20)0.475Total Protein (g/L)57.10 (49.80, 64.10)57.40 (50.00, 64.40)53.50 (49.00, 61.60)0.023Creatine Kinase-MB (μg/L)1.69 (0.67, 4.46)1.58 (0.65, 3.89)3.10 (1.24, 12.63)<0.001Globulin (g/L)23.90 (20.40, 28.20)23.90 (20.40, 28.20)23.40 (19.90, 28.00)0.382Magnesium (mmol/L)0.86 (0.78, 0.94)0.86 (0.78, 0.93)0.86 (0.77, 0.98)0.874Prothrombin Time (s)14.10 (12.20, 16.30)14.00 (12.20, 16.00)15.80 (13.10, 20.60)<0.001D-Dimer (mg/L)4.11 (2.18, 9.93)4.04 (2.16, 9.56)4.60 (2.57, 12.57)0.122International Normalized Ratio1.23 (1.06, 1.43)1.21 (1.06, 1.40)1.36 (1.14, 1.77)<0.001Fibrinogen (g/L)3.41 (1.95, 5.47)3.64 (2.09, 5.57)2.07 (1.30, 3.30)<0.001Notes: an (%); Median (Q1, Q3). bPearson’s Chi-squared test; Wilcoxon rank sum test. Baseline Characteristics Notes: an (%); Median (Q1, Q3). bPearson’s Chi-squared test; Wilcoxon rank sum test. For external validation, 3,362 pediatric patients from the PIC database and 6,931 adult patients from the MIMIC-IV database were enrolled. Evaluating the model using both an external pediatric cohort and an adult critical care cohort provides a robust assessment of its transportability and generalizability across different clinical settings and patient age groups. LASSO Regression for Feature Selection LASSO regression was employed to select the optimal predictors for in-hospital mortality. By applying the one-standard error rule (λ1se = 0.03150) to balance model complexity and clinical transportability, a parsimonious set of six key predictors was selected: pH, lactate, chloride, fibrinogen, platelet count and urea. These selected features were subsequently used to construct the predictive models. Model Performance Comparison and Selection We systematically evaluated the performance of eight machine learning models to predict in-hospital mortality using the 6 features selected via LASSO regression. To ensure a fair and head-to-head comparison under equivalent conditions, all candidate models were similarly optimized to address the significant class imbalance between survivors and non-survivors. This was achieved by applying cohort-specific class weighting, cost-sensitive learning, or decision threshold adjustments to each algorithm during training. For the XGBoost model, this class-weighting strategy was implemented by setting the scale_pos_weight hyperparameter to 9.507463, which scaled the gradient updates for the minority class of non-survivors to improve the model’s sensitivity in predicting mortality events. The final optimized hyperparameters for the XGBoost model were configured with a max_depth of 4, eta of 0.05, lambda of 8, alpha of 2, scale_pos_weight of 9.507463, and nrounds of 10. In the test set of the development cohort, the optimized XGBoost model demonstrated superior discriminative ability compared to the other candidate models under these equivalent conditions. It achieved the highest area under the receiver operating characteristic curve (AUC) of 0.821 (95% CI: 0.751 to 0.892), an accuracy of 0.827, precision of 0.567, sensitivity of 0.304, and an F1-score of 0.395. The complete comparative results of all eight machine learning models in the test set of the development cohort are detailed in Table 2, and their corresponding ROC curves are shown in Figure 1. Table 2Performance Comparison of Machine Learning Models for Mortality PredictionModelAUC95% CIAccuracyPrecision (PPV)Sensitivity (Recall)F1-ScoreXGBoost0.8210.751–0.8920.8270.5670.3040.395Logistic Regression0.8180.746–0.8900.7740.6670.2560.370SVM0.8180.748–0.8870.9000.1670.5000.250LightGBM0.8160.753–0.8800.8610.3670.3240.344Neural Network0.8160.733–0.8990.8070.6000.2810.383Random Forest0.7800.695–0.8650.9040.1670.5560.256KNN0.7410.648–0.8340.8840.0330.1430.054Decision Tree0.6050.466–0.7440.7710.5000.2170.303Abbreviations: AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; KNN, k-nearest neighbors; SVM, support vector machine. Performance Comparison of Machine Learning Models for Mortality Prediction Abbreviations: AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; KNN, k-nearest neighbors; SVM, support vector machine. Receiver operating characteristic (ROC) curves of different machine learning models in the testing cohort for predicting mortality in pediatric sepsis. The prediction models were constructed based on six key clinical parameters: pH, lactate, chloride, fibrinogen, platelet count, and urea levels. The area under the curve (AUC) for each of the eight models is presented, with XGBoost demonstrating the highest predictive ability (AUC = 0.821). To verify the transportability and robustness of the models, external validation was performed on two independent cohorts. In the pediatric validation cohort derived from the PIC database (Figure 2A), XGBoost achieved the highest AUC of 0.735, outperforming all other machine learning algorithms. We also benchmarked its performance against the traditional Pediatric Risk of Mortality score (PRISM IV; Figure 2A), which achieved an AUC of 0.708. Although DeLong’s test indicated no statistically significant difference in discriminative capacity between XGBoost and PRISM IV (p = 0.1695), XGBoost offers substantially higher clinical utility. It achieves comparable performance using only the 6 common and easily accessible laboratory parameters, whereas PRISM IV requires a complex array of physiological variables that are often difficult to obtain in timely clinical workflows. External validation and benchmarking of the prediction models in independent cohorts. (A) ROC curves of the eight machine learning models compared with the traditional PRISM IV score in the pediatric validation cohort (PIC database). XGBoost achieved the highest AUC (0.735), demonstrating comparable discriminative ability to PRISM IV (AUC = 0.708) but with higher clinical utility using only 6 laboratory parameters. (B) ROC curves of the machine learning models in the adult validation cohort (MIMIC-IV database), with XGBoost demonstrating the highest discriminative performance (AUC = 0.778). In the adult validation cohort from the MIMIC-IV database (Figure 2B), XGBoost again achieved the highest discriminative performance with an AUC of 0.778. Across the test set of the development cohort (Figure 1) and both external validation cohorts (Figure 2A and B), XGBoost consistently demonstrated superior and stable discriminative capacity, leading to its selection as the final clinical prediction model. Model Calibration and Clinical Utility To further evaluate the clinical reliability and practical value of the final XGBoost model, we assessed its calibration and clinical net benefit using the independent external pediatric validation cohort (PIC database). As shown in the calibration curve (Figure 3A), the model demonstrated excellent prediction accuracy with a low Brier score of 0.0604, well below the standard threshold of 0.25. The predicted probabilities of in-hospital mortality showed satisfactory agreement with the actual observed rates, particularly within the low-to-moderate risk range (predicted probability < 30%) where the vast majority of pediatric sepsis patients are clinically distributed. While some deviation was observed at higher predicted probabilities due to the limited sample size of extremely high-risk pediatric patients, the overall calibration indicates that the model provides reliable risk stratifications. Calibration and clinical utility of the XGBoost model in the pediatric validation cohort. (A) Calibration curve demonstrating the agreement between predicted probabilities of in-hospital mortality and actual observed rates, with a Brier score of 0.0604. (B) Decision curve analysis (DCA) evaluating the clinical net benefit of the XGBoost model compared with the “treat all” and “treat none” strategies. The model achieved a positive net benefit across a critical threshold probability range of 3% to 27%, aligning closely with clinical intervention thresholds (5% to 20%) for pediatric sepsis. The clinical utility was further evaluated using decision curve analysis (DCA), as illustrated in Figure 3B. The XGBoost model demonstrated a positive net benefit across a threshold probability range of 3% to 27%. This range aligns closely with pediatric clinical decision-making protocols: because sepsis-related mortality in children is a low-probability but high-impact event, clinicians typically set a conservative risk threshold—commonly between 5% and 20%—to trigger early resuscitation, intensive monitoring, or escalation of antibiotics. Within this critical decision-making window, utilizing the model to guide interventions provides a clear advantage over both the “treat all” and “treat none” approaches, while also helping avoid unnecessary resource allocation or over-intervention in lower-risk patients at higher threshold limits. Interpretability Analysis of the XGBoost Model To explain the clinical decision-making process of the final XGBoost model, SHAP analysis was conducted based on the six selected laboratory features. Specifically, SHAP values were computed for patients in the training set (N=704) utilizing the independent test set (N=301) as the reference background dataset to establish baseline feature distributions. Global feature importance was quantified using the mean absolute SHAP values (Figure 4A). pH emerged as the most critical predictor, closely followed by fibrinogen and lactate, while platelet count and urea showed moderate importance, and chloride contributed minimally to the prediction. The SHAP summary beeswarm plot (Figure 4B) further illustrated the directional impact of these clinical parameters on in-hospital mortality. High lactate levels (represented by yellow points) were associated with positive SHAP values, indicating an increased risk of mortality, which aligns with the established significance of hyperlactatemia in pediatric sepsis. Conversely, low fibrinogen levels (represented by purple points) and low platelet counts (purple points) were associated with elevated SHAP values, reflecting the adverse prognostic impact of consumptive coagulopathy and thrombocytopenia. Elevated urea levels also pushed prediction risks higher, signaling renal dysfunction. Interpretability of the XGBoost model using SHAP analysis. (A) Global feature importance ranked by the mean absolute SHAP values (mean (|SHAP value|)) of the six laboratory parameters in the training cohort (N=704), with the test cohort (N=301) serving as the reference background. pH, fibrinogen, and lactate emerged as the top three predictors. (B) SHAP summary beeswarm plot illustrating the distribution and directional impact of each clinical feature on predicted in-hospital mortality. Each point represents an individual patient, with the color representing the relative feature value (yellow for high values; purple for low values). Positive SHAP values indicate an increased risk of mortality. To capture non-linear relationships, SHAP dependence analysis was performed for the top predictor, pH (Figure 5A). The analysis revealed a distinct non-linear, U-shaped relationship: normal physiological pH levels (approximately 7.35 to 7.45) corresponded to negative SHAP values (protective zone), whereas both acidosis (pH<7.35) and alkalosis (pH>7.45) contributed to positive SHAP values (increased mortality risk), with extreme deviations demonstrating the highest risk. Coloring the points by fibrinogen levels further illustrated joint pathophysiological indicators, demonstrating how severe physiological acid-base disturbance combined with depletion of fibrinogen (depicted in blue) represents a particularly high-risk clinical state. Local and non-linear interpretation of the XGBoost model for pediatric sepsis mortality. (A) SHAP dependence plot for pH, the top-ranking predictor, illustrating a non-linear, U-shaped relationship with in-hospital mortality. Negative SHAP values within the physiological range (7.35–7.45) indicate a protective effect, while both acidosis (pH < 7.35) and alkalosis (pH > 7.45) contribute to increased risk. Points are colored by fibrinogen levels, showing that the combination of severe acid-base disturbance and fibrinogen depletion (depicted in blue) represents an exceptionally high-risk clinical state. (B) SHAP waterfall plot for a representative patient, providing an individual-level breakdown of the clinical decision. Starting from the baseline expected probability (E[f(x)]=0.468), severe hyperlactatemia (12.3mmol/L), hypofibrinogenemia (0.87 g/L), and acidosis (pH 7.15) serve as the primary risk drivers, while a normal-to-high platelet count (379 x 10^9/L) acts as a protective factor, resulting in a final predicted mortality probability (f(x)) of 0.519. For individual-level clinical interpretation, a SHAP waterfall plot was used to visualize the additive contribution of each feature in a representative patient (Figure 5B). Starting from a baseline expected mortality probability of 0.468 (E[f(x)]), the patient’s severe hyperlactatemia (lactate=12.3 mmol/L) and hypofibrinogenemia (fibrinogen=0.87 g/L) were identified as the primary drivers of risk, increasing the predicted probability by +0.0325 and +0.0255, respectively. Acidosis (pH=7.15) further elevated the risk (+0.0119). In contrast, the patient’s normal-to-high platelet count (379×109/L) served as a protective factor, reducing the risk output by −0.0183. Cumulatively, these inputs adjusted the final predicted mortality probability to 0.519 (f(x)). This individual-level breakdown demonstrates the model’s capacity to provide transparent, explainable, and patient-specific risk profiles to support bedside clinical decision-making. Deployment and Implementation of the Online Prediction Tool To facilitate clinical translation and bedside decision-making, we developed and publicly deployed a user-friendly, web-based risk calculator, available at https://ljuntao.github.io/ (Figure 6). Graphical user interface of the web-based clinical risk calculator for predicting pediatric sepsis mortality. The interactive interface (available at https://ljuntao.github.io/) is based on the optimized XGBoost model developed at the Children’s Hospital of Chongqing Medical University. The left panel allows clinicians to input six routine laboratory parameters (lactate, pH, chloride, fibrinogen, platelet count, and urea) in their standard clinical units. The right panel displays the real-time, personalized probability of in-hospital mortality. Model architecture details and discrimination performance on the independent test cohort (AUC of 0.821; 95% CI: 0.751–0.892) are transparently presented at the footer of the page to guide clinical interpretation. Based on our optimized XGBoost model developed at the Children’s Hospital of Chongqing Medical University, this online tool enables clinicians to input the six key laboratory parameters (lactate, pH, chloride, fibrinogen, platelet count, and urea) to obtain a real-time, personalized probability of in-hospital mortality for pediatric patients with sepsis. To maintatablein clinical transparency, the interface explicitly displays the model’s technical specifications alongside its performance metrics on the independent test set, which yielded an AUC of 0.821 (95% CI: 0.751–0.892). At present, this web-based calculator is designed as an exploratory research tool to support clinical evaluation and is not intended for direct clinical decision-making pending further prospective validation. Discussion In this study, we developed and externally validated a set of machine learning models to predict in‑hospital mortality in pediatric sepsis. Among the eight algorithms evaluated, XGBoost consistently achieved the highest discriminative performance. Through a proof‑of‑concept external validation using adult cohorts, we found that the model—particularly for mortality—captured core pathophysiological features of sepsis that transcend age‑related differences. By incorporating SHAP‑based interpretability and deploying the final model as an accessible web‑based calculator, we sought to bridge the gap between model development and potential clinical application, although prospective validation in pediatric populations remains a critical next step. The superior performance of XGBoost, particularly its capacity to capture complex nonlinear relationships among clinical features, aligns with the growing body of evidence supporting ensemble methods in medical prognosis.9,16,17 In this study, the XGBoost model achieved an AUC of 0.821 (95% CI: 0.751–0.892) in the internal test cohort. Its robustness was further supported by external validation, yielding an AUC of 0.735 (95% CI: 0.700–0.770) in the pediatric PIC cohort and 0.778 (95% CI: 0.763–0.793) in the adult MIMIC cohort. Notably, in the external pediatric cohort, the model demonstrated comparable clinical utility and discriminative performance to the Pediatric Risk of Mortality IV (PRISM IV) score (AUC: 0.735 vs 0.708; DeLong’s test p=0.1695). Furthermore, this consistent performance across diverse pediatric and adult populations offers compelling evidence that the pathophysiological patterns captured by our model, particularly those tied to key mortality drivers such as acidosis, hyperlactatemia, and organ dysfunction, reflect fundamental mechanisms of sepsis that transcend age-specific factors.18–20 That said, while these cross-population results strongly support the generalizability of our model, validation in adult cohorts serves primarily as a proof-of-concept for biological transferability, rather than a replacement for prospective validation in multicenter pediatric populations. A key strength of this study lies in the exceptional calibration and clinical utility demonstrated by our model during external validation (Figure 3). While obtaining a discrimination AUC of 0.735 is highly encouraging in the heterogeneous clinical landscape of pediatric intensive care, model calibration is often of greater clinical significance. Our model achieved an excellent Brier score of 0.0604, well below the non-informative threshold of 0.25. More importantly, the application of a spline-based logistic regression calibration method effectively corrected the inherent prediction bias and probability distortion typical of tree ensembles, yielding a calibration slope of 1.0000 and an intercept of 0.0000 (Figure 3A). Decision curve analysis (DCA) further confirmed its clinical utility, showing a sustained net benefit within the risk threshold range of 3% to 27% (Figure 3B). Clinically, because pediatric sepsis mortality is relatively low (typically 5% to 15% in PICUs), clinicians generally set a conservative action threshold (typically 5% to 20%) to trigger aggressive interventions (eg, intensive monitoring, fluid resuscitation, or antibiotic escalation). The model’s net benefit sweet spot (3% to 27%) perfectly aligns with this critical clinical decision-making zone. Additionally, at high thresholds where “treat-all” strategies result in substantial negative utility due to overtreatment, our XGBoost model safely guides clinicians away from unnecessary interventions, demonstrating its dual value in preventing therapy delays and avoiding medical over-allocation. Through SHAP analysis (Figures 4 and 5), we identified clinically meaningful predictors that align well with established sepsis pathophysiology. The primary importance of key physiological and laboratory parameters—specifically pH, fibrinogen, lactate, platelet count, and urea—highlights their critical roles in driving sepsis-related mortality (Figure 4). Profound deviations in pH reflect systemic acid-base imbalance and tissue hypoperfusion; as illustrated in the SHAP mortality risk dependence plot (Figure 5A), the mortality risk (SHAP value) escalates sharply as pH drops below physiological levels, reflecting severe metabolic acidosis. Altered fibrinogen levels and decreased platelet counts point toward sepsis-induced coagulation dysfunction and endothelial injury.21 Lactate, a well-established biomarker of tissue hypoxia and anaerobic metabolism, serves as a direct indicator of metabolic crisis and disease severity.22–24 Furthermore, elevated urea levels reflect renal impairment or acute kidney injury (AKI), a common and severe complication associated with mortality in patients with sepsis. A representative patient-level waterfall plot (Figure 5B) demonstrates how these individual risk drivers clinically aggregate, providing transparent, case-specific insights that directly address the “black box” concern often raised in medical machine learning. Notably, the retention of variables with weak or non-significant univariate associations (such as chloride) highlights the multivariate nature of LASSO selection. Unlike univariate filters that evaluate each predictor in isolation, LASSO assesses variables simultaneously within a unified framework, allowing it to capture subtle suppression effects, adjust for confounding variance, and leverage conditional associations that collectively optimize the model’s overall predictive performance. Deploying our model as a web-based calculator (available at https://ljuntao.github.io/) represents an important step toward bridging the gap between computational development and clinical practice. The tool allows clinicians to input routinely available bedside parameters and obtain immediate, individualized risk assessments for in-hospital mortality, making it possible to identify high-risk pediatric patients earlier and potentially initiate proactive medical support. Such efforts to facilitate clinical translation are increasingly emphasized in medical AI research, with contemporary literature highlighting the transition from mathematical reporting to accessible, implementable clinical decision aids.9,25–27 A significant methodological challenge in pediatric sepsis prediction is the severe class imbalance, with non-survivors constituting only approximately 9.7% of the development cohort. In such low-prevalence settings, models optimized using default parameters often suffer from extremely low sensitivity. Although we addressed this by implementing cohort-specific class weighting (adjusting the scale_pos_weight to 9.507463 for XGBoost), the sensitivity (recall) of the final model on the test set remained relatively low at 0.304 under the default decision threshold of 0.5. However, this reflects a critical clinical trade-off between sensitivity and precision (PPV) in a real-world ICU environment. While alternative algorithms like SVM achieved higher sensitivity (0.500), their precision collapsed to 0.167, which would generate an overwhelming rate of false alarms and trigger severe “clinical alarm fatigue”—ultimately leading clinicians to ignore the tool. In contrast, our optimized XGBoost model maintained the highest precision of 0.567, ensuring that more than half of the patients flagged as high-risk were true positive cases. Furthermore, to mitigate the limitations of binary classification, we developed a web-based calculator that outputs continuous risk probabilities rather than a binary “yes/no” decision, allowing clinicians to dynamically monitor high-risk trends based on absolute risk percentages. Several limitations warrant consideration when interpreting our findings. First, the development cohort was single-center and retrospective, leaving it susceptible to selection bias and unmeasured confounding typical of electronic health record analyses. Second, although we validated the model’s performance in both an external pediatric cohort (PIC) and an adult database (MIMIC), these validation datasets are still retrospective in nature; prospective, multicenter studies in diverse pediatric populations remain the gold standard to fully confirm its clinical generalizability. Third, our model does not incorporate treatment-related variables, such as the timing of antimicrobial therapy, fluid resuscitation registry, or the use of vasoactive agents. Because these early interventions significantly influence sepsis outcomes, their omission represents a common challenge in static predictive modeling. Finally, our predictors consist primarily of static, early-stage laboratory and metabolic variables; integrating dynamic, high-frequency vital signs (such as continuous heart rate and blood pressure trajectories) could potentially improve the model’s sensitivity to rapid clinical deterioration. Looking ahead, prospective, multicenter validation within clinical settings will be essential to firmly establish the model’s real-world utility. Furthermore, future clinical impact studies, potentially including randomized controlled trials or clinical simulation studies, are warranted to determine whether implementing our web-based calculator into daily PICU workflows translates into tangible improvements in physician decision-making, timely therapeutic interventions, and ultimately, patient clinical outcomes. Conclusion In this study, we developed and validated an interpretable XGBoost-based model for predicting in-hospital mortality in pediatric sepsis using early clinical data. The model demonstrated strong discrimination and excellent calibration in the development cohort, which was successfully validated in an external pediatric cohort (PIC). Furthermore, its robust performance in an adult cohort (MIMIC) provides key proof-of-concept evidence that the model captures fundamental, age-transcending pathophysiological pathways of sepsis. While our web-based calculator offers a promising tool for early bedside risk stratification, further prospective, multicenter validation in pediatric populations is warranted before widespread clinical implementation can be recommended. Acknowledgments We sincerely thank all the patients and their families who participated in this research, as well as the healthcare professionals who provided care and support during their hospitalizations. Funding Statement This study was supported by the Chongqing Municipality Joint Science and Health Major Medical Research Project (Grant NO: 2025DBXM008), Chongqing, China. Data Sharing Statement The data presented in this study are available on reasonable request from the corresponding author. Ethical Requirement and Reporting Standards This study was conducted and reported in accordance with the RECORD (REporting of studies Conducted using Observational Routinely-collected health Data) guidelines. It adhered to the principles of the Declaration of Helsinki, and the study protocol was approved by the Institutional Ethics Committee of Children’s Hospital of Chongqing Medical University (Approval No. 2025298). The requirement for written informed consent was waived by the ethics committee due to the de-identified and retrospective nature of the anonymized electronic medical record data. Author Contributions Juntao Lin: Conceptualization, Methodology, Software, Writing- Original draft preparation. Jin Xiong: Data curation, Writing – review and editing. Qinxin Fan: Visualization, Writing – review and editing. Jie Ren: Investigation, Writing – review and editing. Zhenxuan Kong: Software, Writing – review and editing. Yan Zhao: Methodology, Writing – review and editing. Qinyuan Li: Conceptualization, Writing – review and editing. Kaicheng Peng: Investigation, Resources, Writing – review and editing. Hui Liu: Visualization, Writing – review and editing. Ximing Xu: Conceptualization, Supervision, Writing – review and editing. Zhengxiu Luo: Conceptualization, Resources, Writing- Reviewing and Editing, Funding acquisition. All authors gave final approval of the version to be published; have agreed on the journal to which the article has been submitted; and agree to be accountable for all aspects of the work. Disclosure Juntao Lin, Jin Xiong, Qinxin Fan, Jie Ren, Zhenxuan Kong, Yan Zhao, Qinyuan Li, Kaicheng Peng, Hui Liu, Ximing Xu and Zhengxiu Luo report that the paper was supported by Chonqing Municipality Joint Science and Health Major Medical Research Project (Grant NO: 2025DBXM008), Chongqing, China. The authors declare no other conflicts of interest in this study. References Associated Data Data Availability Statement The data presented in this study are available on reasonable request from the corresponding author.