Predicting Chronic Post-Surgical Pain After Anal Fistula Surgery Using Perioperative Clinical and Anesthesia Data: A Machine Learning Study.
Di Yu, Xiaojie Su, Wenqiu Feng, Rong Liao, Xuebing Wang
Department of Anesthesiology, Central Hospital of Qinghe County, Xingtai, Hebei, 054800, People's Republic of China. · Department of General Surgery, The First Affiliated Hospital of Changsha Medical University, Changsha, Hunan, 410005, People's Republic of China.
Key points
From the paper's conclusion- Models based on preoperative clinical and intraoperative anesthesia and surgical data showed promising discrimination for CPSP at 3 months after anal fistula surgery. XGBoost and logistic regression performed comparably in the test set. Following external validation, such models may assist in identifying patients who warrant closer postoperative pain assessment, individualized nursing attention, and follow-up; their impact on patient outcomes remains to be established.
Abstract
OBJECTIVE: To develop and internally evaluate prediction models integrating preoperative clinical characteristics and intraoperative anesthesia and surgical data to estimate the risk of chronic postsurgical pain (CPSP) 3 months after anal fistula surgery, with the aim of informing risk-stratified postoperative nursing care and follow-up. METHODS: This retrospective cohort study included 779 patients who underwent anal fistula surgery between January 2023 and June 2025. CPSP was assessed 3 months after surgery. The dataset was randomly divided into a training set (70%; n = 545) and a held-out test set (30%; n = 234). Candidate variables were screened using univariable analysis and least absolute shrinkage and selection operator (LASSO) regression. Logistic regression, random forest (RF), extreme gradient boosting (XGBoost), and support vector machine (SVM) models were developed, with 10-fold cross-validation used during model development; final performance was assessed in the held-out test set. Discrimination was evaluated using the area under the receiver operating characteristic curve (AUC); calibration, decision curve analysis (DCA), and Shapley additive explanations (SHAP) were used to assess calibration, potential net benefit, and predictor contributions, respectively. RESULTS: CPSP was identified in 63 of 779 patients (8.1%). LASSO retained eight predictors: fistula type, previous perianal surgery, preoperative pain, operative time, anesthesia duration, surgical grade, ASA physical status, and anesthesia technique. Test-set AUCs were 0.834 (95% CI, 0.741-0.917) for logistic regression, 0.823 (0.724-0.902) for RF, 0.836 (0.751-0.923) for XGBoost, and 0.783 (0.684-0.864) for SVM. XGBoost and logistic regression had similar discrimination, with Brier scores of 0.067 and 0.066, respectively. DCA suggested potential net benefit over portions of the assessed threshold range. In the XGBoost SHAP analysis, fistula type, preoperative pain, and operative time made the largest reported contributions; complex fistula, previous perianal surgery, and higher surgical grade were associated with higher model-predicted risk. CONCLUSION: Models based on preoperative clinical and intraoperative anesthesia and surgical data showed promising discrimination for CPSP at 3 months after anal fistula surgery. XGBoost and logistic regression performed comparably in the test set. Following external validation, such models may assist in identifying patients who warrant closer postoperative pain assessment, individualized nursing attention, and follow-up; their impact on patient outcomes remains to be established.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Development and Validation of a Machine Learning-Based Prediction of Chronic Postsurgical Pain Following Total Hip and Knee Arthroplasty: An Exploratory Study.Pain research & management · 2026
- Interpretable Machine Learning for Predicting Risk Factors for Chronic Postsurgical Pain After Cesarean Delivery: A Prospective Cohort StudyMedComm · 2026
- Machine learning-based risk prediction model for postoperative abdominal distension after spinal surgery under general anesthesia.Frontiers in medicine · 2026
- Machine learning-based risk prediction model for postoperative abdominal distension after spinal surgery under general anesthesia.Frontiers in medicine · 2026
- Machine learning-based prediction models for chronic postsurgical pain after orthopaedic surgery: a scoping review.Journal of orthopaedic surgery and research · 2026
- Development and validation of a SHAP-interpretable GBM model for predicting postoperative recurrence of anal Fistula.Frontiers in surgery · 2026