- 1Nursing Department,Sichuan Cancer Hospital & Institute, Sichuan Cancer Center, School of Medicine, University of Electronic Science and Technology of China, Chengdu, China
- 2Department of Medical oncology,Sichuan Cancer Hospital & Institute, Sichuan Cancer Center, School of Medicine, University of Electronic Science and Technology of China, Chengdu, China
- 3Department of Anesthesiology, Sichuan Cancer Hospital & Institute, Sichuan Cancer Center, School of Medicine, University of Electronic Science and Technology of China, Chengdu, China
Objectives: Neuropathic pain (NP) is a common and challenging complication following thoracic oncology surgery, characterized by complex etiological factors. However, effective predictive models for identifying high-risk patients are currently lacking. This study aims to determine the incidence and key risk factors associated with neuropathic pain following thoracic oncology surgery, and to construct and validate a series of machine learning-based risk prediction models, providing a scientific foundation for clinical decision-making.
Methods: This study involved 647 patients who underwent thoracic oncology surgery at a specialized cancer hospital in Sichuan Province, China (November 2022 to December 2023). An information survey was designed to collect general demographic data and influencing factors. Outcome indicators were assessed using the Numeric Rating Scale (NRS) for postoperative acute pain and the Douleur Neuropathique 4 Questionnaire (DN4) for neuropathic pain evaluation. Using stratified sampling, the patients were divided into training (80%) and testing (20%) datasets. Univariate analysis and LASSO regression were employed to identify independent risk factors for postoperative neuropathic pain, resulting in the selection of seven factors for model inclusion. Subsequently, six machine learning models were developed using Python 3.11: logistic regression (LR), K-nearest neighbors (K-NN), random forest (RF), support vector machine (SVM), XGBoost, and LightGBM (LGBM). To enhance model accuracy, parameter tuning and ten-fold cross-validation were employed, and performance was evaluated using the testing set with the Area Under the Curve (AUC) metric. A visualization analysis of the model’s variable features was conducted, and the Shapley Additive Explanations (SHAP) values of the predictive models were calculated to identify the significant influencing factors and their respective impact levels on postoperative neuropathic pain in thoracic oncology.
Results: The incidence of postoperative NP was 24.26%. The random forest model demonstrated the highest predictive performance (AUC = 0.86). SHAP value analysis revealed that the primary determinants for the onset of neuropathic pain include the surgical approach, the surgeon’s expertise, the quantity of thoracic drainage tubes, the duration of thoracic drainage tube placement, postoperative acute pain, and C-reactive protein (CRP).
Conclusions: The random forest model effectively predicts neuropathic pain following thoracic oncology surgery, facilitating early screening and targeted interventions to improve outcomes.
1 Introduction
Neuropathic pain, a severe and debilitating disease affecting the peripheral and central nervous systems, is defined as “pain caused by lesions or diseases of the somatosensory system” (1, 2). This type of pain differs from common pain in several ways. Neuropathic pain encompasses both spontaneous and evoked symptoms, with the location of the pain typically corresponding to the area of damage. It is characterized by spontaneous pain, evoked pain, hyperalgesia, paresthesia, pinprick-like sensations, and electric shock-like features (3–5).
Surgical interventions are pivotal in addressing thoracic organ ailments, yet persistent postsurgical pain (PPSP) emerges as a prevalent complication across numerous surgical procedures (6). Notably, thoracic surgery is characterized by heightened levels of postoperative discomfort (7). Neuropathy-induced by nerve injury, termed neuropathic pain (NeuP), has consistently been pinpointed as the predominant etiology of PPSP. Empirical evidence indicates that the incidence of probable or definitive NeuP among patients experiencing prolonged pain following thoracic and breast surgeries stands at 66% and 68%, respectively (8).
Literature research indicates that the risk factors for neuropathic pain after thoracic oncology surgery primarily include age (9, 10), gender (11, 12), preoperative use of hypnotics (13), surgical method (14, 15), prolonged surgical duration (8), moderate to severe acute postoperative pain (16, 17), intraoperative blood loss, and postoperative drainage time (18). Currently, domestic studies on predictive models for postoperative pain in thoracic surgery mainly focus on the construction of models for chronic pain after thoracic surgery (19) and the risk factor analysis for neuropathic pain following thoracic oncology surgery (18), with most models being based on logistic regression methods. Recently, Lamin Juwara (20) and others have utilized machine learning techniques to develop a predictive model for neuropathic pain after breast cancer surgery, providing valuable references for this field.
Neuropathic pain, prevalent in thoracic oncology surgery, significantly impairs patients’ quality of life. The management of this pain hinges on its prediction and prevention. Numerous studies, both domestically and internationally, have sought to construct predictive models for neuropathic pain following thoracic oncology surgery. Most of these models employ traditional logistic regression (19, 21, 22). However, there is a notable lack of emphasis on postoperative neuropathic pain (18). Consequently, it is imperative to thoroughly investigate the risk factors for this type of pain in neuropathic pain following thoracic oncology surgery. By leveraging machine learning techniques, we aim to develop a predictive model for postoperative neuropathic pain, offering insights into its prevention and treatment.
2 Materials and methods
2.1 Data collection
The data for this study were obtained from patients who underwent thoracic oncological surgery at a tertiary hospital in Sichuan Province, China, between November 2022 and December 2023. This study received ethical approval from the Ethics Committee of a tertiary hospital in Sichuan Province, with the approval number SCCHEC-02-2022-160. All participants provided informed consent prior to their inclusion in the study.
Inclusion Criteria: Patients aged 18 years or older who were hospitalized and required elective thoracotomy via a standard posterolateral incision or video-assisted thoracoscopic surgery (VATS) for conditions including esophageal, pulmonary, or mediastinal tumors; provided informed consent and participated voluntarily; and underwent general anesthesia.
Exclusion Criteria: History of thoracic surgery;Patients who are already suspected of having neuropathic pain prior to surgery.
2.2 Anaesthetic and Surgical management
Anaesthesia was induced via intravenous administration of propofol (1.5–2.5 mg/kg), sufentanil (0.3 μg/kg), and cisatracurium (0.2 mg/kg). Anaesthesia was maintained with a continuous intravenous infusion of remifentanil (0.10–0.15 μg·kg⁻¹·min⁻¹) and inhalation of sevoflurane at a concentration of 1.5%–2.0%, adjusted to maintain a bispectral index (BIS) between 40 and 60. The remifentanil infusion rate was titrated according to intraoperative haemodynamic responses to maintain a heart rate of 60–80 beats per minute and to ensure blood pressure fluctuations remained within 20% of baseline values. Vasoactive agents were administered as necessary.
All surgical interventions were performed for oncological indications by a specialized thoracic surgery team. The surgical procedures were characterized and analyzed based on two key dimensions: Resected Organ and Anatomical Site in Thoracic Oncology Surgery: (a)Pulmonary Tumor Resections: Lobectomy, wedge resection, segmentectomy, and pneumonectomy. (b)Esophageal Tumor Resections: Included open McKeown, open Ivor-Lewis, totally minimally invasive McKeown, totally minimally invasive Ivor-Lewis, thoracoscopic-assisted McKeown with laparotomy, and thoracoscopic-assisted Ivor-Lewis with laparotomy. (c)Mediastinal Tumor Resections: Comprised open mediastinal lesion resection via lateral thoracotomy, video-assisted thoracoscopic surgery (VATS) for mediastinal lesion resection, and subxiphoid mediastinal lesion resection; Surgical Approach:(a)Uniportal Video-Assisted Thoracoscopic Surgery (VATS): Procedures performed through a single small incision.(b)Multiportal Video-Assisted Thoracoscopic Surgery (VATS): Procedures performed through multiple small incisions. (c)Open Thoracotomy: Procedures conducted via a standard posterolateral thoracotomy incision with rib retraction.
Drawing upon pertinent domestic and international literature, we have summarized the risk factors for neuropathic pain following thoracic oncology surgery. These were categorized based on preoperative, intraoperative, and postoperative stages, utilizing a self-compiled survey form. The specific survey items and corresponding time points are detailed in the Table 1.
2.3 Outcome
The evaluation of postoperative acute pain was facilitated through the Numeric Rating Scale (NRS), whereas the assessment of postoperative neuropathic pain was conducted utilizing the Douleur Neuropathique 4 questions (DN4) scale.
The Numeric Rating Scale (NRS) is a unidimensional tool that requires patients to rate their pain on a scale from 0 to 10, where 0 indicates no pain and 10 represents the most severe pain. In this study, an NRS score of ≥ 4 is considered indicative of postoperative acute pain.
The Douleur Neuropathique 4 questions (DN4) scale consists of 10 items, covering 7 symptoms (burning pain, freezing pain, electric shock-like pain, tingling sensation, stabbing sensation, numbness, and itching) and 3 physical examination components (reduced touch sensation, reduced pain sensation, and evoked pain). Each item is scored 1 point for a “yes” response. A total score of ≥ 4 points can diagnose neuropathic pain.
The abbreviated DN4 scale (I-DN4) primarily includes the aforementioned 7 symptoms. A score of ≥ 3 points on this scale is used to diagnose neuropathic pain.
2.4 Risk factors screening
During the data analysis phase, this study employed univariate analysis to identify factors influencing perioperative neuropathic pain in patients with thoracic oncology. Specifically, categorical variables (such as gender and marital status) were analyzed using the Pearson chi-square test; normally distributed numerical variables were assessed using the t-test; and non-normally distributed numerical variables were evaluated with the Mann-Whitney U test. To encompass potentially significant variables and avoid omitting important factors, variables with a p-value < 0.2 in the univariate analysis were considered statistically significant. This approach is supported by relevant academic papers, master’s theses, and professional textbooks (23–25), which commonly suggest that using a more lenient p-value (e.g., p < 0.2) in preliminary variable selection can help identify variables that may be overlooked with stricter thresholds, thereby enhancing the accuracy and robustness of subsequent models.
To further prevent variable overfitting, this study incorporated variables with a p-value < 0.2 from the univariate analysis into a LASSO regression model for secondary screening. The optimal model was determined based on cross-validation, ultimately identifying the core predictive factors for neuropathic pain following thoracic oncology surgery.
2.5 Model selection
Prior to model construction, a stratified random sampling technique was employed to segregate neuropathic pain following thoracic oncology surgery patients into training and testing datasets at an 8:2 ratio. The model’s development commenced with the training set, wherein parameter adjustments were made using grid search and random search techniques to ascertain optimal parameters (26). Additionally, ten-fold cross-validation within the training set was implemented to enhance its accuracy. Following this, patients from the test set were utilized for evaluation to assess the model’s performance. This assessment encompassed binary confusion matrix diagrams and various performance indicators, including accuracy, precision, recall, F1 score, sensitivity, specificity, and the area under the ROC curve (AUC). To conclude, the SHAP (27, 28) was employed to evaluate the contribution of each feature to the predictive model. The machine learning models adopted in this study comprised six types: logistic regression, nearest neighbor classification algorithm, random forest, support vector machine, extreme gradient boosting, and light gradient boosting.
2.6 Statistical analysis
Sample size calculation was conducted using a specialized formula proposed by Riley et al. (29) for predictive model research, following four key steps: estimating the sample size required to assess the overall outcome risk;calculating the sample size necessary to minimize model prediction error;evaluating the sample size needed to reduce model overfitting;considering the requirements for model optimization.Based on these steps, the minimum sample size determined was 668 cases, and the final study included 670 patients.
In the statistical analysis of fundamental information, which includes general demographic data and relevant preoperative and intraoperative indicators, we utilized IBM SPSS Statistics (version 26.0) for processing. Categorical data are presented as frequency, proportion, or percentage, while continuous data are expressed as mean ± standard deviation. To address missing data, we employed the MICE package for multiple imputation of longitudinal data. Sensitivity analysis revealed that even with a 30% reduction in sample size, the primary study results remained stable, indicating that the conclusions of this research demonstrate good robustness against various methods of handling missing data.
Utilizing Python 3.11, in conjunction with libraries such as numpy, matplotlib, openpyxl, packaging, pandas, pillow, Python-dateutil, scikit-learn, and scipy, we constructed a risk prediction model for neuropathic pain following thoracic oncology surgery. The efficacy of this model was assessed using metrics including accuracy, precision, recall, F1 score, sensitivity, specificity, and the area under the ROC curve. These evaluations facilitated an analysis of the significant features within the model’s variables.
3 Results
3.1 Basic information
This study ultimately comprised 647 neuropathic pain following thoracic oncology surgery patients, who were randomly segregated into a training set (517 cases) and a test set (130 cases), in an 8:2 ratio. The general demographic data for both groups are presented in Table 2. It can be inferred that there is no statistically significant difference in the distribution of age, gender, marital status, BMI, education level, ethnicity, and occupation between the training and test sets (P>0.05).
3.2 Risk factors screening
The univariate analysis results revealed that a total of 16 variables were associated with the manifestation of neuropathic pain following thoracic oncology surgery, including: education level, preoperative radiotherapy, preoperative chemotherapy, duration of preoperative persistent pain, surgical technique, surgical resection site, single-port and multi-port, surgeon, acute postoperative pain, postoperative wound infection, operation duration, The quantity of thoracic drainage tubes, Duration of thoracic drainage tube placement in days, and intraoperative blood loss, CRP, Postoperative analgesia methods, The comprehensive findings are presented in Table 3. To mitigate feature overfitting, this research incorporated statistically significant variables from the univariate analysis into Lasso regression for further refinement. The optimal model parameters were determined using cross-validation as depicted in Figure 1. Seven predictive variables exerting the most pronounced influence on neuropathic pain following thoracic oncology surgery: surgical resection site, single-port and multi-port, surgeon, acute postoperative pain, The quantity of thoracic drainage tubes, Duration of thoracic drainage tube placement in days and CRP.
Table 3. The factors under consideration are evenly distributed across both the training and test sets.
3.3 Postoperative acute pain and neuropathic pain
The assessment of postoperative acute pain employs the NRS score, with acute pain defined as an NRS score of ≥4 at postoperative intervals T1 (one day post-surgery), T2 (three days post-surgery), and T3 (seven days post-surgery). At T1, 120 cases (18.54%) reported experiencing postoperative acute pain, 70 cases (10.81%) at T2, and 36 cases (5.56%) at T3. The incidence of postoperative acute pain peaked on the first day post-surgery, exhibiting a progressively decreasing trend on the third and seventh days post-surgery. When accounting for unique patients only in T1, T2, and T3 combined, a total of 140 distinct patients experienced acute pain within seven days following thoracic surgery, resulting in an overall incidence rate of postoperative acute pain of 21.63%.
The evaluation of neuropathic pain following thoracic oncology surgery was performed using the DN4 and I-DN4 scales. The specific incidence rates were as follows: 2.93% at one day post-operation; 3.4% at three days post-operation; 4.94% at seven days post-operation; 12.51% at one month post-operation; and 8.5% at three months post-operation. The peak incidence of postoperative neuropathic pain occurred at one month post-operation. Out of a total of 157 patients who experienced postoperative neuropathic pain, 56 had previously encountered acute postoperative pain. The incidence of postoperative neuropathic pain was found to be 24.26%.
3.4 Model test result
This study utilized Python software to construct six distinct machine learning models, subsequently comparing their evaluation metrics on a test set following ten-fold cross-validation. In terms of accuracy, the results from the Random Forest (RF), XGBoost, and Logistic Regression (LR) models were found to be comparable. These models demonstrated superior accuracy in predicting both true negatives (non-neuralgia) and true positives (neuralgia) compared to the other three models. In terms of Area Under the Curve (AUC) values, the RF model surpassed the other five prediction models.Ten-fold cross-validation was used within the training set to enhance its accuracy. The average ROC-AUC and 95% CI were as follows: LR at 0.79 (95% CI 0.74-0.80), SVM at 0.79 (95% CI 0.73-0.78), KNN at 0.72 (95% CI 0.70-0.75), RF at 0.86 (95% CI 0.71-0.80), XGBoost at 0.82 (95% CI 0.69-0.80), and LGBM at 0.81 (95% CI 0.71-0.80). The result is shown in Figure 2. In internal cross-validation, both the RF and XGboost models yielded superior average roc_auc results compared to other models.The result is shown in Figure 3. To better demonstrate the calibration degree of different models, the calibration curves are also shown in Figure 4.
Figure 4. The calibration curves of six models. Probability calibration curves for six machine learning models. The x-axis represents the predicted probabilities from the models, while the y-axis shows the actual observed probabilities. The diagonal line indicates the reference line for perfect calibration. The Brier score (with lower values indicating better performance) reveals that the random forest model (0.125) exhibits the best calibration performance.
To identify the most influential features in the model predictions, we performed a visual analysis using SHAP (SHapley Additive exPlanations) values. This analysis was applied to the Random Forest (RF) model, revealing the following key features, ranked by their mean absolute SHAP value: Single-port and multi-port (0.147), surgeon identity (0.092), duration of thoracic drainage tube placement in days (0.055), operation name (0.053), the quantity of thoracic drainage tubes (0.050), postoperative acute pain (0.022), and CRP (0.004). The results are visualized in Figure 5.
Figure 5. The SHAP value of the random forest in feature influence. This figure utilizes SHAP values to interpret the model, revealing key predictive factors and their impact. Features located higher up (such as the surgical approach) have a greater average influence on the model’s output. The horizontal position and color of the points together illustrate how feature values affect predictions: red points indicate that the feature value pushes the prediction towards the occurrence of neuropathic pain (Class 1), while blue points suggest a push towards the absence of neuropathic pain (Class 0).
4 Discussion
4.1 Analysis of neuropathic pain conditions
Intercostal nerve injury is identified as a significant pathogenic factor contributing to neuropathic pain following thoracic surgery, with reported incidence rates ranging from 23% to 66% (8, 30). This study determined that the incidence rate of neuropathic pain thoracic oncology was 24.26%. The peak incidence of postoperative neuropathic pain occurred at one month post-operation. International researchers have conducted evaluations and follow-ups on intercostal nerve injury in patients undergoing thoracic oncological surgery (31). They measured the current perception threshold of the intercostal nerve before surgery and at intervals of one, two, four, twelve, and twenty-four weeks after surgery. The findings indicated that the current perception threshold significantly increased at 2000 Hz one week post-operation, and the intensity of persistent pain was more pronounced at four and twelve weeks post-operation. These results align with the timing of the occurrence of postoperative neuropathic pain observed in this study.
4.2 Analysis of risk factors associated with postoperative neuropathic pain
4.2.1 Single-port and multi-port
The relationship between single-port, multi-port, and neuropathic pain following thoracic oncology surgery is evident (32). This study demonstrated that multi-port and open surgery significantly increased the incidence of neuropathic pain following thoracic oncology surgery compared to single-port surgery. The single-port incision is performed within a wider intercostal space on the anterior axillary line, while multi-port is conducted within the narrower intercostal space on the posterior axillary and midaxillary lines. This results in thinner muscle layers, which are more likely to cause stress, disorder, and potential damage to the lateral intercostal nerve. Furthermore, Benedetti et al. found that anterior thoracotomy, compared to the posterolateral approach, is less likely to cause nerve injury and subsequent chronic pain (33). Therefore, for multi-port thoracic surgery, medical staff should prioritize monitoring patients’ postoperative pain and facilitating their recovery.
4.2.2 Surgeon
This study identifies surgeons as a significant factor influencing the incidence of postoperative neuropathic pain, an area that currently remains under-researched. It is widely recognized that neuropathic pain following thoracoscopic surgery primarily results from continuous compression of the intercostal nerves by the thoracoscope during the procedure, as well as persistent stimulation caused by the postoperative chest drainage tube (34). Given that intercostal nerve injury is a key contributor to neuropathic pain, the surgical technique employed by the surgeon is particularly critical.
The study further demonstrates that the likelihood of patients developing postoperative neuropathic pain decreases as the annual surgical volume of the medical team increases—a correlation closely associated with the seniority and surgical experience of the surgeons. Surgeons with greater operative experience and higher case volumes are able to employ more refined dissection techniques, more precise electrocautery, and gentler tissue retraction, thereby significantly reducing tissue trauma, attenuating local inflammatory responses, and effectively alleviating postoperative pain.
On the other hand, the placement and selection of chest drain size also depend on the surgeon’s expertise. More experienced surgeons tend to shorten the duration of chest tube drainage. Studies have also shown that thin-bore chest tubes exert significantly less compression on the intercostal nerves, skin, and surrounding tissues compared to thick-bore tubes. Since postoperative pain largely stems from intercostal nerve compression, the use of thin-bore tubes can markedly reduce pain. In addition, incisions for thin-bore tubes do not require suture fixation, resulting in lower local tension and promoting better wound healing (35). Furthermore, experienced surgeons demonstrate more nuanced and effective approaches in formulating analgesic regimens and managing pain.
4.2.3 The quantity and duration of chest drainage tubes
This study demonstrates that the quantity and duration of chest drainage tubes independently influence neuropathic pain following thoracic oncology surgery. This finding aligns with the research conducted by domestic scholar Cheng Shaoyi (18) and international researchers Miyazaki, Takuro et al. (36)The insertion of chest drainage tubes during thoracic surgery is a significant contributor to intercostal nerve damage. Miyazaki, Takuro and colleagues conducted a perception threshold test on patients with inserted chest drainage tubes to objectively evaluate any potential damage to the intercostal nerve. The results indicated that the impact of chest drainage tube placement on intercostal nerve function. The more drainage tubes are present or the longer their placement duration, the greater the likelihood of pulling and compressing the intercostal nerve, thereby increasing the risk of damage. Therefore, for patients with numerous chest drainage tubes and extended durations, if feasible, the chest drainage tube should be removed as soon as possible. Alternatively, a more flexible and softer drainage tube could be used, and the angle of the drainage tube adjusted in a timely manner. This may mitigate or prevent the occurrence of intercostal nerve damage and associated pain (37).
4.2.4 Surgical resection sites
Currently, there is a paucity of studies that thoroughly explore the issue of neuropathic pain resulting from surgical resection sites in thoracic oncology surgery. The findings of this study indicate that surgical resection sites on the right side are more likely to induce neuropathic pain than those on the left side. To date, no literature has been identified that corroborates this result. We examine potential reasons for this discrepancy. Firstly, the prevalence of malignant tumors in the right lung exceeds that in the left lung. Secondly, existing literature suggests that the function of the right lung constitutes 55%-60% of total lung capacity, and surgeries involving the right lung are more likely to result in hypoxia (38). We propose that hypoxia may exert a certain influence on intercostal nerve damage.
4.2.5 Postoperative acute pain
Postoperative acute pain is positively correlated with postoperative neuropathic pain (16). The etiology of postoperative acute pain may be attributed to intercostal nerve damage, inflammation of chest wall structures proximate to the incision, injury to lung parenchyma or pleura, and the placement of a chest drainage tube. Notably, intercostal nerve damage can result from nerve compression during rib retraction or contraction during suturing, or it might be induced by stimulation from the insertion of a chest drainage tube. This study further underscores that postoperative acute pain significantly influences postoperative neuropathic pain.
4.2.6 C-reactive protein (CRP)
The findings suggest that CRP levels may contribute to postoperative neuropathic pain. As a sensitive marker of systemic inflammation, elevated CRP could indicate the inflammatory response following nerve tissue damage. However, a direct causal relationship between CRP and neuropathic pain remains unclear. It is uncertain whether CRP-mediated inflammation directly triggers pain or if secondary pain-induced inflammation raises CRP levels. These observations suggest that inflammation plays a key role in the pathophysiology of postoperative neuropathic pain. Standardized perioperative pain management is essential. Preoperatively, patients should be educated on pain scoring, and postoperative assessments should ensure accurate pain documentation, allowing for timely interventions and personalized care (39).
4.3 Pharmacological and Non-Pharmacological Pain Management
A range of pharmacological agents, including gabapentinoids, tricyclic antidepressants (TCAs), NMDA receptor antagonists (e.g., ketamine), and local anesthetics, have shown potential in preventing postoperative neuropathic pain. Gabapentinoids and TCAs are especially effective and considered first-line treatments (40, 41). Gabapentinoids suppress neuronal hyperexcitability by modulating calcium channels, while TCAs inhibit the reuptake of norepinephrine and serotonin. For localized pain, topical agents such as lidocaine or capsaicin patches may offer viable alternatives (42, 43). Non-pharmacological strategies like psychological support and physical therapy can complement pharmacological treatments, enhancing the overall effectiveness of pain management.
4.4 Machine Learning Models for Pain Prediction
Random Forest, as an ensemble learning method, enhances model accuracy and robustness by integrating the predictions of multiple decision trees, while also demonstrating strong resistance to overfitting. When dealing with high-dimensional data or small sample sizes, this model typically maintains good generalization performance. The results of this study indicate that the Random Forest model exhibits strong competitiveness across various evaluation metrics; it excels not only in discriminatory power (AUC) but also achieves a favorable balance between sensitivity and specificity, highlighting its clear advantages in classification tasks.
Compared to traditional logistic regression models, the Random Forest model can also incorporate feature importance analysis and SHAP values, effectively revealing the decision-making mechanisms of the model. Additionally, we conducted decision curve analysis for the RF model, which demonstrates its substantial clinical utility and ability to assist physicians in making better-informed decisions in most scenarios, as illustrated in Figure 6.
Figure 6. The decision curve analysis of the random forest. Decision curve analysis to evaluate the clinical utility of the random forest model. The y-axis represents the net benefit, while the x-axis indicates the threshold probability. The results demonstrate that across a wide range of threshold probabilities (approximately 0.1 to 0.7), the net benefit of the random forest model (orange curve) consistently exceeds that of the extreme strategies of “treat all” and “treat none.” This indicates that the model possesses substantial clinical utility and can assist physicians in making better-informed decisions in most scenarios.
4.5 Limitations
The limitations of this study include the fact that intraoperative anesthetic agents were not analyzed as independent influencing factors, primarily due to insufficient evidence in the existing literature explicitly identifying them as determinants. Nevertheless, we have thoroughly documented the anesthesia management protocols of the patients in the manuscript, providing foundational data for future in-depth research.
Additionally, the continuous inclusion of patients undergoing thoracic oncology surgery in this study, coupled with the widespread adoption of minimally invasive techniques, has resulted in a relatively limited number of open thoracic surgery cases being included. Existing studies suggest that open surgery may be one of the independent risk factors for neuropathic pain following thoracic oncology surgery. Due to the insufficient sample size of open surgeries in this study, we may not have been able to adequately assess the impact of this factor. In future research, increasing the sample size will facilitate a systematic comparison of the efficacy and complication risks between open and minimally invasive surgeries. Finally, the single-center design and the fact that data collection, model development, and validation all relied on the same source limit the generalizability of our findings. Multi-center studies incorporating more diverse populations are essential to enhance the model’s external validity.
5 Conclusions
The prevalence of neuropathic pain following thoracic oncology surgery is 24.2%, with the highest incidence occurring one month post-operation. Factors such as surgical approach, surgeon experience, duration of chest drainage tube placement, resection site, number of drainage tubes, acute postoperative pain,CRP are independent risk factors for neuropathic pain following thoracic oncology surgery. This study is unique in its population and methodology, as no predictive models for neuropathic pain following thoracic oncology surgery, despite models for other subspecialties like breast surgery. The RF machine learning model demonstrates superior performance in predicting neuropathic pain and offers a reliable tool for clinical use. It can aid in more accurate screening for neuropathic pain, inform prevention and intervention strategies, and raise awareness among patients about their risk for developing this condition.
Data availability statement
The original contributions presented in the study are included in the article/supplementary material. further inquiries can be directed to the corresponding author/s.
Author contributions
YZ: Data curation, Formal Analysis, Methodology, Software, Writing – original draft, Writing – review & editing. SW: Data curation, Formal Analysis, Writing – original draft. MZ: Data curation, Formal Analysis, Software, Writing – original draft. HP: Investigation, Writing – review & editing. QF: Investigation, Writing – review & editing. JX: Investigation, Writing – review & editing. XX: Investigation, Writing – review & editing. TZ: Investigation, Writing – review & editing. JS: Investigation, Writing – review & editing. YL: Investigation, Writing – review & editing. DM: Investigation, Writing – review & editing. QY: Conceptualization, Funding acquisition, Project administration, Software, Supervision, Writing – review & editing.
Funding
The author(s) declared that financial support was received for this work and/or its publication. This work was supported by the following funding sources: 1. 2023 Provincial Cadre Health Care Project (Grant No.: Chuan Gan Yan-2023807) 2. 2023 Nursing Special Research Project of Sichuan Cancer Hospital (Grant No.: 2023011)The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. Moulin DE, Clark AJ, Gilron I, Ware MA, Watson CP, Sessle BJ, et al. Pharmacological management of chronic neuropathic pain - consensus statement and guidelines from the Canadian Pain Society. Pain Res Manage. (2007) 12:13–21. doi: 10.1155/2007/730785
2. Finnerup NB, Attal N, Haroutounian S, McNicol E, Baron R, Dworkin RH, et al. Pharmacotherapy for neuropathic pain in adults: a systematic review and meta-analysis. Lancet Neurol. (2015) 14:162–73. doi: 10.1016/S1474-4422(14)70251-0
3. Gao C. Exploring new approaches to diagnosis and treatment of neuropathic pain based on a new definition. J Pract Pain Manage. (2014) 10:86–8. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_syttxzz201402002&dbid=WF_QK (Accessed March 10, 2022).
4. Galluzzi KE. Managing neuropathic pain. J Am Osteopath Assoc. (2007) 107:39–48. doi: 10.1097/SPC.0b013e3282eeb45f
5. Expert group for diagnosis and treatment of neuropathic pain. Consensus of experts in the diagnosis and treatment of neuropathic pain. Chin J Pain Med. (2013) 19:705–10. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_zgttyxzz201312001&dbid=WF_QK (Accessed March 10, 2022).
6. Macrae WA. Chronic post-surgical pain: 10 years on. Br J Anaesth. (2008) 101:77–86. doi: 10.1093/bja/aen099
7. Marshall K and McLaughlin K. Pain management in thoracic surgery. Thorac Surg Clin. (2020) 30:339–46. doi: 10.1016/j.thorsurg.2020.03.001
8. Haroutiunian S, Nikolajsen L, Finnerup NB, and Jensen TS. The neuropathic component in persistent postsurgical pain: a systematic literature review. Pain. (2013) 154:95–102. doi: 10.1016/j.pain.2012.09.010
9. Hopkins KG, Hoffman LA, Dabbs Ade V, Ferson PF, King L, Dudjak LA, et al. Postthoracotomy pain syndrome following surgery for lung cancer: symptoms and impact on quality of life. J Advanced Practitioner Oncol. (2015) 6:121–32. doi: 10.6004/jadpro.2015.6.2.4
10. Zhao Y, Liu XM, Zhang LY, Li B, Wang RH, Yuan QY, et al. Sex and age differences in chronic postoperative pain among patients undergoing thoracic surgery: a retrospective cohort study. Front Med (Lausanne). (2023) 10:1180845. doi: 10.3389/fmed.2023.1180845
11. Paige C, Barba-Escobedo PA, Mecklenburg J, Patil M, Goffin V, Grattan DR, et al. Neuroendocrine mechanisms governing sex differences in hyperalgesic priming involve prolactin receptor sensory neuron signaling. J Neurosci. (2020) 40:7080–90. doi: 10.1523/JNEUROSCI.1499-20.2020
12. Ho ST, Lin TC, Yeh CC, Cheng KI, Sun WZ, Sung CS, et al. Gender differences in depression and sex hormones among patients receiving long-term opioid treatment for chronic noncancer pain in Taiwan-A multicenter cross-sectional study. Int J Environ Res Public Health. (2021) 18:7837. doi: 10.3390/ijerph18157837
13. Li D and Wang X. Application value of diffusional kurtosis imaging (DKI) in evaluating microstructural changes in the spinal cord of patients with early cervical spondylotic myelopathy. Clin Neurol Neurosurg. (2017) 156:171. doi: 10.1016/j.clineuro.2017.03.015
14. Arends S, Böhmer AB, Poels M, Schieren M, Koryllos A, Wappler F, et al. Post-thoracotomy pain syndrome: seldom severe, often neuropathic, treated unspecific, and insufficient. Pain Rep. (2020) 5:810. doi: 10.1097/PR9.0000000000000810
15. Jin J, Du X, Min S, and Liu L. Comparison of chronic postsurgical pain between single-port and multi-port video-assisted thoracoscopic pulmonary resection: A prospective study. Thorac Cardiovasc Surg. (2022) 70:430–8. doi: 10.1055/s-0042-1744546
16. Fiorelli S, Cioffi L, Menna C, Ibrahim M, De Blasi RA, Rendina EA, et al. Chronic pain after lung resection: risk factors, neuropathic pain, and quality of life. Pain Symptom Manage. (2020) 60:326–35. doi: 10.1016/j.jpainsymman.2020.03.012
17. Beyaz SG, Ergönenç JŞ, Ergönenç T, Sönmez ÖU, Erkorkmaz Ü, and Altintoprak F. Postmastectomy pain: A cross-sectional study of prevalence, pain characteristics, and effects on quality of life. Chin Med J (Engl). (2016) 129:66–71. doi: 10.4103/0366-6999.172589
18. Cheng S, Chen Z, and Chen J. Analysis of the Occurrence and Related Factors of Neuropathic Pain after Thoracic Surgery. Prog Modern Biomedicine. (2020) 20:281–94. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_swcx202002016&dbid=WF_QK (Accessed March 10, 2022).
19. Wang H. Establishing chronic Post-surgical Pain Prediction Models in Patients with Thoracic Surgery (2014). Beijing: Peking Union Medical College, Chinese Academy of Medical Sciences. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=DegreePaper_Y3277540&dbid=WF_XW (Accessed February 28, 2023).
20. Juwara L, Arora N, Gornitsky M, Saha-Chaudhuri P, and Velly AM. Identifying predictive factors for neuropathic pain after breast cancer surgery using machine learning. Int J Med Inf. (2020) 141:104170. doi: 10.1016/j.ijmedinf.2020.104170
21. Zhang L, Yuan Y, and Zhang Y. Construction of prediction model for chronic postsurgical pain after video-assisted thoracoscopic surgery. Basic Clin Med. (2023) 43:651–5. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_jcyxylc202304022&dbid=WF_QK (Accessed February 28, 2023).
22. Juying JIN. Epidemiology of chronic post-surgical pain and the development and validation of its predictive model in general surgical population (2014). Chongqing: Chongqing Medical University. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=DegreePaper_Y2690338&dbid=WF_XW (Accessed February 28, 2023).
23. Zeng X. Construction and virification of intraoperative hypothermia among lung cancer people risk prediction model based on machine learning algorithm (2023). Chengdu: Chengdu Medical College. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=DegreePaper_D03125506&dbid=WF_XW (Accessed February 28, 2023).
24. Klein-Murrey L, Tirschwell DL, Hippe DS, Kharaji M, Sanchez-Vizcaino C, Haines B, et al. Using clinical data to reclassify ESUS patients to large artery atherosclerotic or cardioembolic stroke mechanisms. J Neurol. (2024) 272:87. doi: 10.1007/s00415-024-12848-6
25. Hosmer DW and Lemeshow S. Introduction to the Logistic Regression Model (2005). John Wiley & Sons, Ltd. Available online at: https://media.johnwiley.com.au/product_data/excerpt/72/04705824/0470582472-45.pdf (Accessed April 15, 2024).
26. Lundberg S and Lee SI. A unified approach to interpreting model predictions. Nips. (2017). doi: 10.48550/arXiv.1705.07874
27. Huang G. The Research of Prediction for Post-translational Modification Sites and Drug Indications (2015). Shanghai: Shanghai University. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=DegreePaper_WBXWC201603110000002108&dbid=WF_XW (Accessed April 15, 2024).
28. Ergstra J and Bengio Y. Random search for hyper-parameter optimization. Mach Learn Res. (2012) 13:281–305. doi: 10.1016/j.chemolab.2011.12.002
29. Riley RD, Ensor J, Snell KIE, Harrell FE Jr, Martin GP, Reitsma JB, et al. Calculating the sample size required for developing a clinical prediction model. BMJ. (2020) 368:441. doi: 10.1136/bmj.m441
30. Peng Z, Li H, Zhang C, Qian X, Feng Z, and Zhu S. A retrospective study of chronic post-surgical pain following thoracic surgery: prevalence, risk factors, incidence of neuropathic component, and impact on qualify of life. PLoS One. (2014) 9:e90014. doi: 10.1371/journal.pone.0090014
31. Miyazaki T, Sakai T, Tsuchiya T, Yamasaki N, Tagawa T, Mine M, et al. Assessment and follow-up of intercostal nerve damage after video-assisted thoracic surgery. Eur J Cardiothorac Surg. (2011) 39:1033–9. doi: 10.1016/j.ejcts.2010.10.015
32. Beloeil H, Sion B, Rousseau C, Albaladejo P, Raux M, Aubrun F, et al. SFAR research network. Early postoperative neuropathic pain assessed by the DN4 score predicts an increased risk of persistent postsurgical neuropathic pain. Eur J Anaesthesiol. (2017) 34:652–7. doi: 10.1097/EJA.0000000000000634
33. Benedetti F, Vighetti S, Ricco C, Amanzio M, Bergamasco L, Casadio C, et al. Neurophysiologic assessment of nerve impairment in posterolateral and muscle-sparing thoracotomy. J Thorac Cardiovasc Surg. (1998) 115:841–7. doi: 10.1016/S0022-5223(98)70365-4
34. Ma H, Song X, Li J, and Wu G. Postoperative pain control with continuous paravertebral nerve block and intercostal nerve block after two-port video-assisted thoracic surgery. Wideochir Inne Tech Maloinwazyjne. (2021) 16:273–81. doi: 10.5114/WIITM.2020.99349
35. He XY. Application of 12F pigtail catheter in thoracoscopic radical resection of lung cancer. (2023) Yangzhou, Jiangsu Province, China: Yangzhou University. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=DegreePaper_D03614502&dbid=WF_XW (Accessed October 20, 2024).
36. Miyazaki T, Sakai T, Yamasaki N, Tsuchiya T, Matsumoto K, Tagawa T, et al. Chest tube insertion is one important factor leading to intercostal nerve impairment in thoracic surgery. Gen Thorac Cardiovasc Surg. (2014) 62:58–63. doi: 10.1007/s11748-013-0328-z
37. Shumin D, Ran L, and Shasha Y. Study on stimulation of intercostal nerve by two method sof drainage Tube fixation after thoracoscopy. J Henan Univ. (2022) 41:377–9. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_hndxxb-yxkxb202205012&dbid=WF_QK (Accessed April 15, 2024).
38. Baciewicz FA Jr. Left versus right. Thorac Cardiovasc Surg. (2018) 155:1312. doi: 10.1016/j.jtcvs.2017.09.129
39. Chen C, Qiu R, and Xiel M. Application of integrated pain management model in orthopedic nursing. Gen Nurs. (2019) 17:2372–2373.2376. Available online at: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_jths201919029&dbid=WF_QK (Accessed April 15, 2024).
40. Moore J and Gaines C. Gabapentin for chronic neuropathic pain in adults. Br J Community Nurs. (2019) 24:608–9. doi: 10.12968/bjcn.2019.24.12.608
41. Huang Y, Chen H, Chen SR, and Pan HL. Duloxetine and amitriptyline reduce neuropathic pain by inhibiting primary sensory input to spinal dorsal horn neurons via α1- and α2-adrenergic receptors. ACS Chem Neurosci. (2023) 14:1261–77. doi: 10.1021/acschemneuro.2c00780
42. Überall M A, Bösl I, Hollanders E, Sabatschus I, and Eerdekens M. Postsurgical neuropathic pain: lidocaine 700 mg medicated plaster or oral treatments in clinical practice. Pain Manage. (2022) 12:725–35. doi: 10.2217/pmt-2022-0041%4010.1080
Keywords: machine learning, neuropathic pain, oncology, predictive model, surgery, thoracic
Citation: Zhang Y, Wu S, Zhou M, Pan H, Fan Q, Xie J, Xiao X, Zhang T, Shu J, Luo Y, Ma D and Yang Q (2025) Machine learning model for predicting neuropathic pain following thoracic oncology surgery. Front. Oncol. 15:1725412. doi: 10.3389/fonc.2025.1725412
Received: 15 October 2025; Accepted: 28 November 2025; Revised: 27 November 2025;
Published: 15 December 2025.
Edited by:
Sunyi Zheng, Tianjin Medical University Cancer Institute and Hospital, ChinaReviewed by:
Guoqing Zhong, Henan Provincial Cancer Hospital, ChinaJi Wu, Wuhan University, China
Vivian Salama, West Virginia University, United States
Copyright © 2025 Zhang, Wu, Zhou, Pan, Fan, Xie, Xiao, Zhang, Shu, Luo, Ma and Yang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Qing Yang, eWFuZ3FpbmdzY0AxNjMuY29t
†These authors have contributed equally to this work
Shirong Wu2†