BACKGROUND: Perineural invasion (PNI) is an independent prognostic risk factor for gallbladder carcinoma (GBC). However, there is currently no reliable method for the preoperative noninvasive prediction of PNI. METHODS: This retrospective study included 180 patients with pathologically diagnosed GBC who underwent preoperative contrast-enhanced CT between January 2022 to December 2023 at one high-volume medical center from China. K-Nearest Neighbors (KNN), LightGBM (LGB), Logistic Regression (LR), XGBoost (XGB), Naive Bayes (NB), and Support Vector Machine (SVM) were employed to develop prediction models. The Shapley additive explanations (SHAP) were used to visualize models and rank the importance of features associated with PNI. RESULTS: Total bilirubin, CA19-9, imaging liver invasion, vascular invasion, T staging and N staging were identified as risk factors for PNI (P <
0.05). The LightGBM model demonstrated the improved performance in the testing set, with the AUCs of 0.886 and 0.795 in the training and testing sets, respectively. In four machine learning algorithms prediction models demonstrated improved performance included three imaging features (imaging T staging, N staging, and vascular invasion) and two clinical features (TBIL and CA19-9). When these features were employed to develop the prediction models, the LightGBM model exhibited the higher performance than other machine learning modes in the testing set, with AUCs of 0.843 and 0.802, and ACCs of 0.786 and 0.759 in the training and testing sets, respectively. CONCLUSION: A machine learning-based prediction model integrating contrast-enhanced CT imaging and clinical features demonstrates good performance and stability in the noninvasive preoperative identification of PNI status in GBC patients.