TITLE: Development of a machine-learning model to predict chronic postsurgical pain in patients undergoing cardiac surgery: a case-control study
AUTHORS: Ying Zhang, Xi Wang, Feng Xiao, Hui Liu, Hequan Zhu, Qing Liu, Xin

[DESCRIPTION]
ABSTRACT
Background: Chronic postsurgical pain is common, affecting more than 30% of the world’s population, with patients undergoing open-heart surgery being a high-risk group for chronic postsurgical pain.
Methods: We retrospectively analyzed the clinical data of 830 patients who underwent open-heart surgery, screened the key variables of chronic postsurgical pain using multifactorial logistic regression, and constructed and compared eight machine-learning models. Finally, the models were interpreted using the SHapley Additive exPlanations package.
Results: Nine key characteristics were screened: age, diabetes, coronary artery disease, length of hospitalization, history of preoperative pain, number of pain medications required (>3), postoperative incision infection, length of surgery, and use of remifentanil. Among the eight algorithms, the logistic regression algorithm exhibited the best performance. Following reconstruction with the logistic regression algorithm, the areas under the curve for the training and validation sets were 0.846 and 0.836, respectively. The algorithm also demonstrated strong performance on the test set (area under the curve=0.825, accuracy=76.8%, sensitivity=79.2%, F1 score=0.736). The validation set’s area under the curve was within 10% of that of the test set, indicating a well-fitted model.
Conclusions: A machine-learning model, utilizing accessible clinical data, can accurately predict chronic postsurgical pain in open-heart surgery patients at an early stage, which helps to accurately identify and improve their prognosis.

[STEPS]
SECTION: Clarify the research theme and content
2. Type of study: retrospective, case-control, machine learning, clinical predictive modeling
SECTION: Clarify the research theme and content
1. Title: Development of a machine-learning model to predict chronic postsurgical pain in patients undergoing cardiac surgery: a case-control study
SECTION: Background
3. Chronic postsurgical pain (CPSP) is defined as pain that emerges or intensifies following a surgical intervention and continues for a minimum duration of 3 months post-surgery, while other possible causes of pain are excluded [1, 2]. Chronic pain following open-heart surgery is categorized as a sub-diagnosis of CPSP in the International Classification of Diseases 11th Revision and has a notable impact on patients’ postoperative recovery and quality of life [1]. After open-heart surgery, an estimated 5%–65% of patients develop CPSP, and approximately 10% suffer from severe CPSP [1]. Although it has been shown that factors affecting chronic pain after open-heart surgery include female sex [3], wound complications [4], preoperative depression [3], and pre-existing pain disorders [5], the prediction of CPSP in patients undergoing cardiac open-heart surgery remains challenging. The lack of a widely accepted predictive tool leads to poor recognition, diagnosis, and treatment outcomes [6].
SECTION: Background
4. Machine-learning algorithms that can identify patterns and relationships and make predictions or decisions by training and analyzing large amounts of data have been widely used in clinical disease diagnosis, risk prediction, and medical image analysis [7, 8]. Researchers have recently conducted studies on predictive models for CPSP in orthopedic surgery [9], breast cancer surgery [10], and rotator cuff repair surgery [11]. Unfortunately, machine-learning predictive models for chronic pain after open-heart surgery are still insufficient, and further research is urgently required.
SECTION: Background
5. This study sought to employ machine-learning techniques, utilizing clinical data, to create an advanced forecasting model for CPSP in individuals who have undergone open-heart surgery. SHapley Additive exPlanations (SHAP) analysis was employed to interpret the final model, enabling the identification of high-risk patients and assisting clinicians in developing personalized treatment strategies.
SECTION: Purpose
6. This study sought to employ machine-learning techniques, utilizing clinical data, to create an advanced forecasting model for CPSP in individuals who have undergone open-heart surgery. 
SECTION: Research profile
9. The criteria for inclusion： being between 18 and 80 years old, having a primary diagnosis of either congenital heart disease, rheumatic heart disease, or heart valve disease, and with American Society of Anesthesiologists classification I–III.
SECTION: Research profile
10. The criteria for exclusion included severe acute heart failure, cerebral infarction, visual-auditory-verbal impairment, psychiatric disorders, incomplete medical records, previous history of open-heart surgery, or death.
SECTION: Research profile
8.4. 830 individuals
SECTION: Research profile
8.3. the Department of Cardiac Surgery in the Affiliated Hospital of Southwest Medical University
SECTION: Research profile
8.2. from January 2021 to January 2024
SECTION: Research profile
8.1. individuals who had open-heart surgery
SECTION: Research profile
8. study population
SECTION: Research profile
7. Ethical Approval and Study Registration
SECTION: Research profile
7.1. This study adhered to the ethical principles and basic statements of the Declaration of Helsinki.
SECTION: Research profile
7.2.  This study was a single-center, retrospective cohort study approved by the Clinical Trial Ethics Committee of the Affiliated Hospital of Southwest Medical University (Approval No. KY2023326), and verbal informed consent was obtained from the patients.
SECTION: Research profile
7.3. This study was prospectively registered in the Chinese Clinical Trial Registry on December 15, 2023 before patient enrollment (registration number: ChiCTR2300078695, URL: https://www.chictr.org.cn).
SECTION: Research profile
11. Collection of Variables and Outcome Events
SECTION: Research profile
11.1. (1) demographic data and clinical traits, including sex, age, body mass index (BMI), primary diagnosis, total days of hospitalization, conditions like hypertension, diabetes mellitus, hyperlipidemia, coronary artery disease, habits including smoking and alcohol consumption, as well as a history of pain prior to surgery; 
SECTION: Research profile
11.2. (2) examination results: red blood cell count, hemoglobin, platelet count, prothrombin time, activated partial thromboplastin time, albumin, leukocyte differential, and neutrophil differential on the first postoperative day; 
SECTION: Research profile
11.3. (3) surgical anesthesia: type of valve replacement; length of surgery; difference in fluid intake and output; total amount of sufentanil and midazolam; and use of remifentanil, hydromorphone, flurbiprofenate, or diazoxide; 
SECTION: Research profile
11.4. (4) consultation information: total number of days in the hospital, acute pain in the postoperative ward, postoperative painkiller use, and surgical incision infection; 
SECTION: Research profile
11.5. and (5) follow-up information: surgical incision pain, numerical rating scale (NRS) score, verbal rating scale (VRS) score, nature of pain, whether itching or numbness occurred during the incision and whether it was accompanied by pain in other areas, and health scale scores (EuroQol Five Dimensions Five Levels [EQ-5D-5L] and EuroQol-VAS scores) (Supplementary Material).
SECTION: Research profile
12. Statistical Analysis
SECTION: Research profile
12.1. Preliminary statistical analyses were performed using SPSS software (version 25.0; IBM, Armonk, NY). Count data are described as counts and percentages (%), while measures are expressed as mean ± standard deviation or median and interquartile range. To screen for risk factors for outcome events, one-way analyses (e.g., chi-squared test, t-test, or Mann–Whitney U-test, if applicable) and multifactorial logistic regression (LR) analyses were used. The odds ratio (OR) and its 95% confidence interval (CI) were used to compare the results, and a P value of less than 0.05 was deemed statistically significant.
SECTION: Research profile
12.2. Machine learning models were constructed and evaluated using R software (version 4.4.0) and Python (version 3.11.4). The filtered predictors were imported into extreme gradient boosting, random forest, decision tree, lightweight gradient boosting machine (Light-GBM), logistic regression (LR), plain Bayes (Naive Bayes), K nearest neighbors (KNN), and support vector machine (SVM) algorithms. Model performance was assessed utilizing the area under the curve (AUC), sensitivity, accuracy, specificity, positive and negative predictive values, F1 scores, kappa values, and clinical decision
SECTION: Research profile
12.3. Model Interpretation: The SHAP package considers every feature as a “contributor” and computes the associated SHAP values. Both SHAP value plots and variable importance plots were utilized to demonstrate each feature’s contribution to the model and their respective rankings in terms of importance.