Comparative study on predicting postoperative distant metastasis of lung cancer based on machine learning models

Sci Rep 2026 AI 7 Explanations View Original
Original Paper (PDF)

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

Plain-English Explanations
Pages 1-2
Postoperative Distant Metastasis as a Clinical Challenge

The leading cause of surgical treatment failure. Despite curative-intent surgery for stage I-III lung cancer, a substantial proportion of patients develop postoperative distant metastasis, which is the primary driver of disease recurrence and death after resection. Identifying patients at highest risk before or shortly after surgery remains a major unmet clinical need.

Limitations of current staging and prognostic tools. TNM staging captures anatomical disease extent but does not integrate the full spectrum of patient-level biological factors including nutritional status, systemic inflammation, body composition, and treatment history that influence metastatic risk. Conventional logistic regression is further limited by its inability to model complex non-linear interactions among predictors.

Machine learning as a solution to complexity. Modern machine learning algorithms can capture non-linear interactions, handle high-dimensional data, and weigh multiple variables simultaneously. Gradient boosting, random forest, and neural network methods have demonstrated superior predictive accuracy across multiple clinical prediction tasks compared to traditional regression models.

Body composition as an underutilized predictor. CT-derived body composition metrics including skeletal muscle index, visceral and subcutaneous fat area, and intramuscular fat content can be extracted from routine staging scans. These imaging biomarkers encode nutritional and metabolic status linked to immune function and treatment tolerance, but their contribution to metastasis risk prediction in lung cancer surgery has been underexplored.

TL;DR: Predicting postoperative distant metastasis in lung cancer remains difficult with conventional tools, motivating a systematic comparison of machine learning models that integrate clinical, pathological, and imaging-based predictors.
Pages 2-4
Patient Cohort and Variables

Large retrospective cohort from a regional cancer center. The study enrolled 3,120 stage I-III lung cancer patients who underwent surgical resection at Yunnan Oncology Center between 2013 and 2018. Patients were excluded if they had missing key variables, prior malignancy, neoadjuvant therapy, or incomplete follow-up. The median follow-up was 54 months.

Metastasis incidence and distribution. Of the 3,120 patients, 596 (19.1%) developed postoperative distant metastasis during follow-up. Metastasis sites included lung (109 patients), brain (113), bone (79), abdominal organs (28), pleura (24), lymph nodes (81), and multiple simultaneous sites (154), reflecting diverse patterns of spread across the cohort.

Comprehensive variable set. A total of 52 candidate variables were evaluated spanning four domains: clinical characteristics (age, sex, smoking history, BMI, comorbidities), pathological features (histology, stage, lymph node involvement, surgical margins), imaging-derived body composition parameters from CT at the T4 and L3 vertebral levels, and preoperative laboratory values including complete blood count, albumin, and inflammatory indices.

Outcome definition. The primary outcome was development of any radiologically confirmed distant metastasis at any site during the follow-up period. All patients were followed every 3 to 6 months postoperatively per institutional protocol, with imaging ordered on clinical suspicion or per schedule.

TL;DR: The cohort of 3,120 stage I-III lung cancer surgical patients had a 19.1% postoperative distant metastasis rate, and 52 candidate variables spanning clinical, pathological, body composition, and laboratory domains were evaluated.
Pages 4-5
Feature Selection and Model Construction

LASSO regression for variable reduction. Least Absolute Shrinkage and Selection Operator (LASSO) regression was applied to the full set of 52 candidate variables to identify those with the strongest independent association with postoperative distant metastasis. The regularization parameter lambda was selected by 10-fold cross-validation, minimizing prediction error while shrinking non-informative coefficients to zero.

Six significant predictors retained. LASSO reduced the 52 variables to 9 candidates, and multivariate analysis identified 6 as independently significant: age, BMI, pathological N stage, adjuvant chemotherapy, adjuvant radiotherapy, and preoperative absolute neutrophil count (Pre-ANC). These six variables formed the feature set for all nine machine learning models.

Nine models evaluated. The comparative study tested: Gradient Boosted Decision Tree (GBDT), XGBoost, Random Forest, LightGBM, Adaptive Boosting (AdaBoost), Decision Tree, Gaussian Naive Bayes (GNB), Complement Naive Bayes (CNB), and Multilayer Perceptron (MLP). This breadth of models spanning ensemble methods, tree-based approaches, probabilistic classifiers, and neural networks enabled a comprehensive comparison across methodological families.

Nested cross-validation to prevent overfitting. A nested cross-validation framework was used: the outer loop applied stratified 70/30 train-test splits repeated 10 times to estimate generalization performance, while the inner loop used 5-fold cross-validation for hyperparameter tuning within each training fold. This approach minimizes the risk of overly optimistic performance estimates caused by data leakage during hyperparameter optimization.

TL;DR: LASSO selected 6 predictors from 52 candidates, and nine machine learning algorithms were compared using a nested cross-validation framework to prevent overfitting and ensure unbiased performance estimates.
Pages 5-7
GBDT Achieves Best Predictive Performance

GBDT ranked first across all key metrics. Among all nine models, the Gradient Boosted Decision Tree achieved the highest AUC of 0.810 (95% CI 0.748 to 0.872), with accuracy 0.766, sensitivity 0.698, specificity 0.786, and F1 score 0.564. This performance was consistent across the 10 repeated outer cross-validation splits, confirming robustness rather than a single favorable split.

Ensemble methods outperformed simpler approaches. The top four performers were all ensemble or boosting methods: GBDT (AUC 0.810), XGBoost, LightGBM, and Random Forest. Neural network MLP and single Decision Tree models performed substantially lower, while Naive Bayes variants performed poorly on this structured clinical dataset. This pattern confirms the general advantage of ensemble approaches for clinical prediction tasks with heterogeneous mixed-type features.

Class imbalance addressed through cost-sensitive learning. Given the 19.1% metastasis rate, training data were class-imbalanced. Cost-sensitive learning was applied during model training to avoid bias toward predicting the majority non-metastasis class. Without this correction, a classifier predicting no metastasis for all patients would achieve 80.9% accuracy while providing no clinical value.

PR-AUC as a complementary metric. Because the dataset was imbalanced, precision-recall AUC (PR-AUC) was reported alongside ROC-AUC. PR-AUC is more informative in imbalanced settings because it focuses on the minority (positive) class performance, revealing whether the model meaningfully identifies true metastasis cases beyond what chance would predict.

TL;DR: GBDT achieved the best performance with AUC 0.810, outperforming all other models including XGBoost, Random Forest, LightGBM, and MLP, with class imbalance addressed through cost-sensitive learning.
Pages 7-8
SHAP Analysis: Key Predictors of Metastasis Risk

Adjuvant therapies dominate SHAP importance rankings. SHAP (Shapley Additive Explanations) analysis of the best-performing GBDT model identified adjuvant chemotherapy and adjuvant radiotherapy as the two highest-importance predictors. However, their large odds ratios (adjuvant radiotherapy OR=49.34) reflect confounding by indication: patients receiving these treatments had more aggressive disease at baseline, making these variables markers of disease severity rather than causal drivers of metastasis.

Pathological N stage as a biological signal. Pathological lymph node stage (N stage) ranked third in SHAP importance and represents a direct measure of regional lymph node involvement, which is a biologically meaningful predictor of distant spread through established lymphovascular pathways. Unlike adjuvant treatment variables, N stage carries genuine predictive signal independent of confounding.

BMI, age, and Pre-ANC as systemic predictors. BMI, age, and preoperative absolute neutrophil count (Pre-ANC) completed the top six predictors. BMI integrates nutritional reserve and metabolic status, while Pre-ANC reflects baseline systemic inflammation and innate immune activation, both of which modulate the immune microenvironment supporting metastatic seeding. Age captures accumulated biological aging effects on immune surveillance.

Body composition features not retained. Despite including CT-derived body composition metrics (skeletal muscle index, visceral fat area, intramuscular fat) in the initial 52-variable candidate set, none were retained after LASSO feature selection. This suggests that in this dataset, the body composition information captured by these imaging metrics was either redundant with BMI or insufficiently associated with metastasis risk to survive regularization.

TL;DR: SHAP analysis identified adjuvant treatments, pathological N stage, BMI, age, and Pre-ANC as the top six predictors, though adjuvant therapy associations primarily reflect confounding by disease severity rather than causal effects.
Pages 8-10
Interpreting Results and Study Limitations

GBDT's advantage from iterative error correction. The superiority of GBDT over other ensemble methods reflects its sequential training process, in which each successive tree specifically targets and corrects the prediction errors of prior trees. This iterative refinement is particularly valuable when predictor-outcome relationships are non-linear and when interaction effects among variables are clinically meaningful but mathematically complex.

Clinical utility of a six-variable model. That only six readily available variables (age, BMI, N stage, adjuvant chemotherapy, adjuvant radiotherapy, and Pre-ANC) achieved an AUC of 0.810 is clinically meaningful because these variables are universally available from medical records without additional testing. A tool requiring only routinely collected data is more implementable in real-world clinical settings than one requiring novel biomarkers or specialized imaging analysis.

Confounding in adjuvant therapy variables. The very high odds ratios for adjuvant therapies warrant caution in interpretation. In non-randomized retrospective cohorts, patients receiving adjuvant chemotherapy or radiotherapy have systematically more advanced or high-risk disease by selection. The predictive contribution of these variables likely reflects this selection effect rather than a paradoxical harmful effect of treatment, and should be interpreted accordingly in any clinical decision support application.

Single-center design and absence of external validation. The study is limited by its single-center retrospective design at Yunnan Oncology Center and the lack of an independent external validation cohort. Performance metrics estimated from repeated cross-validation within a single institution may not generalize to patient populations at other centers with different practice patterns, patient demographics, or surgical approaches. Multi-center prospective validation is needed before clinical deployment.

TL;DR: GBDT's iterative error-correction mechanism explains its superior performance, while the six-variable model's use of routinely available data enhances clinical applicability, though single-center design without external validation limits generalizability.
Pages 10-11
Clinical Implications and Future Directions

GBDT as the recommended model for this task. Based on the systematic head-to-head comparison across nine machine learning algorithms, GBDT offers the best combination of predictive accuracy and calibration for postoperative distant metastasis prediction in stage I-III lung cancer. Its performance advantage over simpler models is consistent across repeated cross-validation splits, supporting confidence in the model's stability.

A foundation for precision surveillance. A validated metastasis risk prediction tool could enable risk-stratified postoperative surveillance, directing more intensive imaging follow-up toward high-risk patients while potentially allowing less frequent monitoring for low-risk patients. This has direct implications for both clinical resource allocation and early detection of recurrence when treatment is most likely to be effective.

Informing adjuvant therapy decisions. By quantifying the independent predictive value of pathological N stage and systemic inflammatory markers alongside adjuvant treatment receipt, this framework contributes to understanding which patient subgroups derive the greatest benefit from postoperative systemic therapy. Future prospective studies could incorporate this risk stratification into adjuvant treatment selection algorithms.

Future research priorities. Next steps include multi-center validation of the GBDT model in external patient cohorts, incorporation of molecular biomarkers such as circulating tumor DNA or genomic risk scores alongside clinical variables, and testing whether dynamic postoperative biomarker measurements can improve prediction accuracy beyond single preoperative assessments. Prospective deployment with clinical decision support integration would provide real-world feasibility data.

TL;DR: GBDT is the best-performing model for postoperative metastasis risk prediction in lung cancer surgery, and future work should prioritize multi-center external validation and integration with molecular biomarkers to enable clinical deployment.
Citation: Open Access, 2026. Available at: PMC12910018.