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.
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.
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.
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.
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.
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.