Development and Internal Validation of a Preoperative Machine Learning Model to Predict Operative Difficulty in Laparoscopic Liver Resection for Primary Liver Cancer
Jianhui Pan, Tao Luo
Key points
From the paper's conclusion- We developed and internally validated machine‐learning models that use only preoperatively available variables to predict operative difficulty (defined as operative time ≥ 150 min) in LLR for primary liver cancer (PLC) and interpreted the best‐performing model using Shapley additive explanation (SHAP).
Abstract
Background Operative difficulty varies substantially among patients undergoing laparoscopic liver resection (LLR). Accurate preoperative assessment may support case selection, team allocation and patient counselling. Existing difficulty scores mainly emphasise tumour burden and planned resection extent, with limited incorporation of patient‐level factors. Many machine‐learning studies also include intraoperative variables, which creates data leakage in a preoperative prediction setting. We developed and internally validated machine‐learning models that use only preoperatively available variables to predict operative difficulty (defined as operative time ≥ 150 min) in LLR for primary liver cancer (PLC) and interpreted the best‐performing model using Shapley additive explanation (SHAP). Methods This single‐centre retrospective cohort study included 409 consecutive patients with PLC who underwent LLR between December 2012 and December 2022. Operative difficulty was defined using the cohort median operative time of 150 min. Twenty‐three preoperative variables were included, while all intraoperative and postoperative variables were excluded from model inputs. Patients were stratified into a training set ( n = 287) and an internal validation set ( n = 122) at a 7:3 ratio with a fixed random seed. Logistic regression, support vector machine, gradient boosting machine (GBM), random forest, XGBoost, LightGBM and CatBoost models were developed. Performance in the internal validation set was assessed using the area under the receiver operating characteristic curve (AUC), 95% confidence interval (CI), accuracy, sensitivity, specificity, precision, F1 score, Brier score and calibration metrics. SHAP was used for global and individual‐level model interpretation. Results Tree‐ensemble models performed best in the internal validation set. GBM achieved the highest discrimination, with an AUC of 0.955 (95% CI 0.922–0.987) and a Brier score of 0.085. It outperformed LightGBM (AUC 0.951), XGBoost (0.949), CatBoost (0.944), random forest (0.936), support vector machine (0.877) and logistic regression (0.854). Multivariable analysis identified maximum tumour diameter (odds ratio [OR] 1.027, 95% CI 1.014–1.040), solitary tumour (OR 6.01, 95% CI 2.45–16.14), subcapsular location (OR 3.23, 95% CI 1.81–5.87), posterosuperior location (Couinaud segments VII and VIII and the posterior part of segment VI; OR 4.55, 95% CI 2.50–8.51) and greater resection extent as independent predictors. Global SHAP rankings were consistent with the regression results, with maximum tumour diameter, tumour location, subcapsular tumour and resection extent contributing most to model predictions. Conclusions A preoperative machine‐learning model based only on routinely available variables predicted operative difficulty in LLR for PLC with strong internal discrimination. SHAP analysis showed that the GBM model relied mainly on clinically plausible anatomical factors. The model provides an objective and interpretable framework for preoperative risk stratification as an adjunct to surgical judgement, but its clinical use requires external multicentre validation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A Predictive Model Integrating Coagulation Profiles for Preoperative Risk Stratification of Difficult Single-Incision Laparoscopic Cholecystectomy: A Retrospective Cohort Study Based on Explainable Machine Learning.Surgical laparoscopy, endoscopy & percutaneous techniques · 2026
- Development and temporal validation of a predictive model for difficult laparoscopic cholecystectomyBMC Surgery · 2026
- Predicting Textbook Oncological Outcomes with Machine Learning: A Retrospective Review of Patients Who Underwent Resection for Malignant Tumours.Journal of clinical medicine · 2026
- Incremental value of laboratory and ultrasonographic markers for preoperative risk stratification of difficult laparoscopic cholecystectomy: a cross-validated cohort study.Frontiers in surgery · 2026
- Preoperative Prediction of Difficult Laparoscopic Cholecystectomy: Evolution, Validation, and Emerging Machine-Learning Approaches-A Scoping Review.Medicina (Kaunas, Lithuania) · 2026
- Performance of Large Language Models vs Conventional Machine Learning for Predicting Clinical Outcomes With Limited Data: Comparative StudyJMIR AI · 2026