Background: Accurate estimation of perioperative blood transfusion risk in lumbar posterior interbody fusion is essential to reduce the number, cost, and complications associated with blood transfusions. Machine learning algorithms have the potential to outperform traditional prediction methods in predicting perioperative blood transfusion. This study aimed to construct a machine learning-based perioperative transfusion risk prediction model for lumbar posterior interbody fusion in order to improve the efficacy of surgical decision-making.Methods: We retrospectively collected clinical data on 1905 patients who underwent lumbar posterior interbody fusion surgery at the Second Hospital of Shanxi Medical University between January 2021 and March 2023. All the data was randomly divided into a training set and a validation set, and the “feature_importances” method provided by eXtreme Gradient Boosting (XGBoost) algorithm was applied to select statistically significant features on the training set to establish five machine learning prediction models. The optimal model was identified by utilizing the area under the curve (AUC) and the probability calibration curve on the validation set. Shapley additive explanations (SHAP) and local interpretable model-agnostic explanations (LIME) were employed for interpretable analysis of the optimal model.Results: In the postoperative outcomes of patients, the number of hospital days in the transfusion group was longer than that in the non-transfusion group. Additionally, the transfusion group experienced higher total hospital costs, 90-day readmission rates, and complication rates within 90 days after surgery than the non-transfusion group. A total of 9 features were selected for the models. The XGBoost model performed best with an AUC value of 0.958. The SHAP values showed that intraoperative blood loss, intraoperative fluid infusion, and number of fused segments were the top 3 most important features affecting perioperative blood transfusion in lumbar posterior interbody fusion. The LIME algorithm was used to interpret the individualized prediction.Conclusion: Surgery, ASA class, levels fused, total intraoperative blood loss, operative time, and preoperative Hb are viable predictors of perioperative blood transfusion in lumbar posterior interbody fusion. The XGBoost model has demonstrated superior predictive efficacy compared to the traditional logistic regression model, making it a more effective decision-making tool for perioperative blood transfusion.