An interpretable machine learning model for predicting early liver metastasis after pancreatic cancer surgery

BMC Cancer 2025 AI 6 Explanations View Original
Original Paper (PDF)

Unable to display PDF. Download it here or view on PMC.

Plain-English Explanations
Page [1, 2]
Liver Spread After Surgery: Pancreatic Cancer's Most Common Complication

Even when pancreatic cancer surgery appears successful, many patients develop liver metastases within the first year after the operation. The liver is the most common site where pancreatic cancer spreads, and this early recurrence is a major reason why long-term survival rates remain low even after technically successful surgery.

Identifying which patients are most likely to develop early liver metastasis (ELM) before or shortly after surgery would be enormously valuable. It would allow doctors to intensify monitoring, begin preventive systemic therapy earlier, or consider whether surgery is truly the best approach for a given patient.

This study aimed to develop a machine learning model that predicts which pancreatic cancer patients will develop liver metastasis within one year of surgery, using data collected routinely during pre-operative evaluation and the surgery itself.

TL;DR: This study built a machine learning model to identify which pancreatic cancer patients are at high risk of liver metastasis within one year of surgery, enabling earlier intervention and better-informed treatment planning.
Pages 3-4
Training the Model on Four Hundred Surgical Patients

The study analyzed 407 patients who underwent pancreatic cancer surgery at one hospital between 2015 and 2023. The dataset was split into a training group of 284 patients (used to build the model) and an internal validation group of 123 patients (used to test it). An additional external validation group of 131 patients from a separate hospital was used to confirm that the model works in a different clinical setting.

Researchers collected 22 clinical variables for each patient—including age, BMI, tumor location (head vs. body/tail), surgical margins, lymph node involvement, tumor differentiation grade, nerve invasion, fatty liver status, and liver function scores. Seven machine learning algorithms were then tested to find which best predicted early liver metastasis.

To help clinicians understand not just what the model predicts but why, the team used SHAP (SHapley Additive exPlanations)—a technique that shows which patient features pushed a prediction toward high or low risk for each individual. This transparency is crucial for clinical trust and application.

TL;DR: Seven machine learning algorithms were tested on 407 pancreatic surgery patients across two hospitals, with SHAP analysis used to make the winning model interpretable for clinical use.
Pages 7-7
XGBoost Model Achieves 90% Predictive Accuracy

Among the seven algorithms tested, XGBoost—a gradient-boosted decision tree method—performed best. It achieved an AUC of 0.901 on internal validation, meaning it correctly ranked a high-risk patient above a low-risk patient 90% of the time. Accuracy was 84.6%, sensitivity 75.6%, and specificity 89.7%.

In the external validation cohort from the second hospital, the model maintained strong performance (AUC ~0.85), demonstrating that it generalizes well beyond the training data. This cross-hospital validation is an important indicator that the model captures real biological signals rather than quirks specific to one institution.

Out of 22 initial variables, the model narrowed its key features down to nine: lymph node stage, tumor differentiation grade, nerve invasion, tumor location (body/tail), presence of tumor embolus, fatty liver presence, Child-Pugh liver function score, BMI, and CA19-9 blood marker level. These features are all routinely collected before or during surgery.

TL;DR: XGBoost achieved an AUC of 0.901, selecting nine key clinical features—including tumor location, nerve invasion, and liver function—as the strongest predictors of early liver metastasis after pancreatic cancer surgery.
Pages 9-9
Tumor Location and Liver Health Matter Most

SHAP analysis revealed that tumors in the body and tail of the pancreas (rather than the head) were associated with higher early metastasis risk—consistent with prior research suggesting these tumors have more access to the portal venous system, which drains directly to the liver.

Fatty liver disease (hepatic steatosis) emerged as a protective factor: patients with fatty liver were paradoxically less likely to develop early liver metastasis. The authors suggest this may reflect differences in the liver microenvironment, which might be less hospitable to metastatic tumor cells in this setting.

The Child-Pugh score—a clinical measure of liver function used in cirrhosis—was also an important predictor. Worse baseline liver function was associated with higher metastasis risk, possibly because a compromised liver is a more permissive site for tumor seeding. This insight could guide more aggressive post-operative surveillance in patients with liver function abnormalities.

TL;DR: Tumor location in the body or tail, poor liver function (Child-Pugh score), and nerve invasion were the strongest risk factors for early liver metastasis, while fatty liver was unexpectedly protective.
Pages 12-12
A Web Tool That Doctors Can Use Right Now

To bridge the gap between research and practice, the team deployed the XGBoost model as an online clinical decision-support tool. Clinicians can enter a patient's values for the nine key features and receive an immediate personalized risk estimate for early liver metastasis.

High-risk patients identified by the model could be offered more intensive post-operative surveillance imaging (CT or MRI), earlier initiation of systemic chemotherapy, or enrollment in clinical trials testing adjuvant therapies. Low-risk patients might be spared unnecessary over-treatment.

The model uses only information that is routinely collected as part of standard pre-operative workup and pathology reports—meaning adoption would not require new tests or equipment. This practicality is a major advantage over biomarker-based approaches that require specialized laboratory assays.

TL;DR: The XGBoost model was deployed as a free online tool that clinicians can use immediately to estimate a patient's liver metastasis risk using only standard pre-operative data, supporting earlier and more tailored post-operative planning.
Pages 14-15
Smarter Surveillance Starts with Better Prediction

This study demonstrates that machine learning can identify pancreatic cancer patients at high risk of early liver metastasis using only routinely available clinical data. The XGBoost model's AUC of 0.901 represents a meaningful advance over the clinical judgment available to surgeons and oncologists today.

The study is limited by its retrospective design and relatively small external validation cohort. Future work should validate the model in larger, multicenter prospective studies across diverse patient populations and health systems. Expanding the feature set to include molecular markers could further improve predictive power.

If validated and adopted, this type of interpretable AI tool could shift the post-operative care paradigm: instead of uniform surveillance schedules for all pancreatic cancer surgery patients, risk-stratified approaches could direct intensive monitoring and early therapy to those who need it most.

TL;DR: An interpretable XGBoost model accurately predicts early liver metastasis after pancreatic cancer surgery, offering a practical clinical decision tool that could enable risk-stratified surveillance and earlier therapeutic intervention.
Citation: Open Access, 2025. Available at: PMC12211964.