Development and validation of a multidimensional machine-learning model to predict clinically significant
Xiaoqin Weng1, Hengrui Zhang1, Mao Huang2
1Department of Respiratory and Critical Care Medicine, The Second Affiliated Hospital of Nanjing Medical University Nanjing 210000, Jiangsu, China.
Objectives:
To overcome the limitations of existing predictors for immune-related adverse events (irAEs) in advanced non-small cell lung cancer (NSCLC), including failure to account for competing mortality risks and non-linear interactions, we aimed to develop an accurate machine learning model for clinically significant irAEs (cs-irAEs, Grade ≥ 2).
Methods:
We enrolled 332 patients with stage IIIB-IV NSCLC treated with PD-1/PD-L1 inhibitors, and randomly assigned to training (n = 232) and testing (n = 100) sets. The Fine-Gray model, adjusting for death as a competing event, estimated cs-irAE incidence. Least Absolute Shrinkage and Selection Operator (LASSO) regression selected predictors, followed by an Extreme Gradient Boosting (XGBoost) model compared to logistic regression. Model performance was assessed using under the receiver operating characteristic curve (AUC), calibration plots, and decision curve analysis, and SHapley Additive exPlanations (SHAP) values for interpretability.
Results:
The 12-month cumulative incidence of cs-irAEs was 18.0% (95% CI, 14.0%-23.0%). Nine predictors were selected, including baseline neutrophil-to-lymphocyte ratio (NLR), body mass index, prior radiotherapy, and proton pump inhibitor use. The XGBoost model achieved an AUC of 0.871 (95% CI, 0.805-0.937) and a negative predictive value (NPV) of 87.9% in the testing set. SHAP analysis revealed a non-linear protective threshold for NLR > 4.0. A bedside nomogram was created using the six strongest predictors.
Conclusion:
This machine learning-based model accurately identified advanced NSCLC patients at risk for cs-irAEs. Its high NPV value helped identify low-risk patients, supporting optimized monitoring and resource allocation. Combining competing risk analysis with interpretable machine learning offers a stable tool for personalized toxicity management.

