Development and external validation of a machine learning model for predicting in-hospital mortality in acute liver
Xuanlin Wu1, Qingzhou Song2, Delin Li2
1Department of Breast Surgery, Guangxi Medical University Cancer Hospital, Nanning 530021, Guangxi Zhuang Autonomous Region, China.
Background:
Acute liver failure (ALF) is a rapidly progressive and life-threatening condition that requires accurate risk stratification. Existing prognostic tools have limited sensitivity and generalizability. This study aimed to develop and externally validate a machine learning-based modeling framework for early in-hospital dynamic prediction of in-hospital mortality in patients with acute liver failure.
Methods:
Patients with ALF were identified from the MIMIC-IV database, with an independent external cohort from Guangxi Medical University Cancer Hospital for validation. Eleven predictors were selected using LASSO regression and the Boruta algorithm. Seven ML models were trained and optimized through cross-validation and grid search. Model performance was assessed using discrimination, calibration, and decision curve analysis, with interpretability evaluated by SHAP.
Results:
A total of 1,228 patients from MIMIC-IV and 108 external patients were included. Among all evaluated models, logistic regression demonstrated the most robust and stable performance, with AUCs of 0.802 in internal validation and 0.774 in external validation. Calibration and decision curve analyses demonstrated good clinical utility. SHAP identified temperature, vasopressor use, age, CRRT, and sedative/analgesic use as key predictors. A nomogram and online tool were developed for individualized risk prediction.
Conclusion:
This study presents an interpretable and externally validated ML model for predicting in-hospital mortality in ALF, providing a practical tool for early in-hospital dynamic risk stratification and clinical decision support.


