ObjectiveTo explore the risk factors for very early recurrence (VER) after curative-intent resection for gallbladder cancer (GBC) patients and construct prediction models for VER based on various machine learning (ML) algorithms.MethodsA retrospective study was conducted on 329 GBC patients who underwent curative-intent surgery at our hospital between January 2016 and December 2020. Risk factors for VER were identified, and prediction models were constructed, validated and compared with multiple ML algorithms[logistic regression (LR), support vector machine (SVM), naive Bayes (NB), random forest (RF), light gradient boosting machine (LGB), and extreme gradient boosting (XGB)]based on independent associated factors for VER.ResultsAmong the 329 patients who underwent curative-intent resection in patients with GBC, 162 (49.2%) patients experienced recurrence, including 69 (42.6%) with VER(<6 months) and 93 (57.4%) with non-VER(≥6 months). Survival analysis showed that patients with VER had significantly worse median overall survival compared to those with non-VER (6 monthsvs. not arrived,χ2=398.2,P<0.001). Univariate analysis showed that carcinoembryonic antigen (CEA), carbohydrate antigen (CA)19-9, CA-125, tumor differentiation, pathological type, liver involvement, vascular invasion, perineural invasion, TNM stage, T stage and N stage were risk factors of VER (P<0.05), whereas adjuvant chemotherapy was protective factor (P<0.05). Multivariate analysis confirmed CA-125, tumor differentiation, pathological type, vascular invasion and N stage as independent risk factors (P<0.05), whereas adjuvant chemotherapy was independent protective factor (P<0.05). XGB model achieved the best performance with an area under curve (AUC) of 0.841 and an accuracy (ACC) of 83.0% in the validation set. Shapley additive explanations (SHAP) bar plots highlighted tumor differentiation, N stage, pathological type of tumor, and CA-125 the top four features contributing to the model, each positively influencing the predicted probability of VER.ConclusionsCA-125, tumor differentiation, pathological type, vascular invasion, N stage and adjuvant chemotherapy are independent factors associated with VER of GBC following curative-intent resection. ML-based prediction models incorporating these factors have the potential to some extent to effectively identify high-risk patients, providing a valuable reference for VER surveillance in GBC.