Abstract
INTRODUCTION: Postoperative pulmonary complications (PPCs) significantly impact the prognosis of elderly patients undergoing laparoscopic surgery, yet reliable tools for early risk stratification are lacking. This study aimed to develop and externally validate a machine learning (ML) model to predict PPCs using preoperative and intraoperative data available at the point of surgical closure. METHODS: A multicenter retrospective cohort study was conducted involving 1,415 elderly patients (age >60 years) from two tertiary hospitals in China. The primary outcome was clinically significant PPCs (Clavien-Dindo Grade ≥ II) within 7 days postoperatively. Nine ML algorithms were trained and optimized using a nested 5-fold cross-validation framework. The Synthetic Minority Over-sampling Technique (SMOTE) and Boruta algorithm were employed to address class imbalance and feature selection, respectively. The model's performance was evaluated in an internal development cohort and an independent external validation cohort (n=102). RESULTS: Among the evaluated algorithms, the Gradient Boosting Machine (GBM) demonstrated superior performance, achieving an Area Under the Curve (AUC) of 0.691(95% CI: 0.617-0.762) (Sensitivity 65.2%, Specificity 83.4%) in the internal cohort, Notably, the model exhibited superior performance in the external validation cohort with an AUC: 0.755 (95% CI: 0.652-0.849), indicating excellent generalizability without overfitting. The decision curve analysis confirmed that the GBM model provided a higher net clinical benefit than the default strategies. SHAP (SHapley Additive exPlanations) analysis identified Surgery Duration, Preoperative Albumin, and inflammatory markers (CRP, WBC) as top predictors, reflecting the interplay between surgical stress and physiological reserve. Decision Curve Analysis (DCA) confirmed the model's clinical utility, showing a net benefit across a threshold probability range of 30%-90%. CONCLUSION: The GBM-based dynamic model offers a robust, interpretable, and generalizable tool for the early prediction of PPCs in elderly laparoscopic surgery patients. By enabling risk assessment immediately upon surgical completion, this tool facilitates the shift from reactive treatment to proactive prevention and personalized perioperative management.