Explainable Boosting Machine Predicting Length of Stay After Liver Surgery in Patients with Colorectal Liver
Lucas Alexander Knøfler1,2,3, Andreas Skov Millarch1, Sanne Pagh Møller4
1Department of Digestive Diseases, Transplantation and General Surgery, Copenhagen University Hospital, Rigshospitalet, 2100 Copenhagen, Denmark.
Cancers
|July 15, 2026
Summary
Predicting hospital stay after colorectal liver metastases surgery is challenging. An interpretable machine learning model showed modest accuracy, identifying surgical approach and tumor burden as key predictors for length of stay (LOS).
Area of Science:
- Oncology
- Surgical Oncology
- Machine Learning in Healthcare
Background:
- Accurate prediction of length of hospital stay (LOS) for colorectal liver metastases (CRLM) surgery is crucial for patient care and resource management.
- Existing risk prediction tools for CRLM surgery LOS are limited.
- This study aimed to develop an interpretable machine learning model for predicting LOS after liver-directed surgery for CRLMs.
Purpose of the Study:
- To develop and validate an interpretable machine learning model for predicting length of hospital stay (LOS) after first-time liver-directed surgery for colorectal liver metastases (CRLM).
- To identify key preoperative predictors influencing LOS in CRLM surgery.
- To compare the performance of interpretable machine learning models against opaque algorithms.
Main Methods:
- A multicenter cohort study included 915 patients undergoing liver resection, ablation, or combination therapy for CRLMs between 2016-2023.
- Preoperative data from national registries were used to train and evaluate four machine learning algorithms: Elastic Net, Random Forest, HistGradientBoosting, and Explainable Boosting Machine (EBM).
- Model performance was assessed using mean absolute error (MAE) on a 20% hold-out test set, with hyperparameter optimization via five-fold cross-validation.
Main Results:
- The median LOS was 4.0 days (IQR 3.0-6.0).
- All four machine learning algorithms demonstrated comparable prediction errors (MAE 3.0-3.1 days).
- The EBM model, selected for interpretability, identified surgical approach (percutaneous, laparoscopic) and tumor burden (lesion number, diameter) as significant predictors, though overall explained variance was low (R² ≤ 0.10) and longer stays were underestimated.
Conclusions:
- An interpretable machine learning model (EBM) achieved predictive performance comparable to opaque algorithms for CRLM surgery LOS.
- Surgical approach and tumor burden were identified as the most influential predictors of LOS.
- The model's modest overall accuracy and underestimation of longer stays highlight the need for external validation in diverse healthcare settings.

