You are viewing the site in preview mode

Skip to main content

A machine learning–based framework for predicting postpartum chronic pain: a retrospective study

Abstract

Background

Postpartum chronic pain is prevalent, affecting many women after delivery. Machine learning algorithms have been widely used in predicting postoperative conditions. We investigated the prevalence of and risk factors for postpartum chronic pain, and aimed to develop a machine learning model for its prediction.

Methods

Pregnant women in our tertiary hospital were screened from July 2021 to June 2022. Postoperative pain intensity was assessed using the numerical rating scale at 1, 3, and 6 months after delivery. Six machine learning algorithms were benchmarked using the nested resampling method, and their performance was evaluated based on classification error (CE). The algorithm with the best performance evaluation was used to establish the model for predicting chronic pain 6 months after delivery. Shapley additive explanations analysis was used to assess the contribution of each variable to the model.

Results

A total of 1,398 postpartum women were included for analysis, among whom 383 developed chronic pain 6 months after delivery. The least absolute shrinkage selection operator identified five relevant factors: numerical rating scale at 3 days after delivery, body mass index before delivery, newborn weight, multiparous delivery, and back pain during gestation. The CEs for the algorithms were as follows: K-nearest neighbor, 0.212; logistic regression, 0.342; linear discriminant analysis, 0.343; naive Bayes, 0.346; ranger, 0.219; and extreme gradient boosting model, 0.147. The extreme gradient boosting model exhibited the best performance (CE = 0.147, F1 = 0.851) and was selected for model establishment. Visualization using Shapley additive explanations facilitated the interpretation of the influence of the five variables in the model.

Conclusions

The extreme gradient boosting algorithm, which incorporates five risk factors, demonstrated strong performance in predicting postpartum chronic pain.

Trial registration

https//www.chictr.org.cn/ (ChiCTR2300070514).

Significance

Our established machine learning algorithm may help facilitate early screening and potentially prevent the development of chronic pain following delivery. Additionally, our findings highlight that body weight control during gestation and effective postpartum acute pain management are critical for preventing postpartum chronic pain.

Key summary points

Cesarean section results in a high incidence of postoperative chronic pain 6 months after delivery.

Back pain during gestation, Numerical Rating Scale of pain at 3 days after delivery, newborn weight, body mass index before delivery, and multiparous delivery are risk factors for postpartum chronic pain.

Body weight control during gestation and postpartum acute pain management are critical for the prevention of postpartum chronic pain.

The extreme gradient boosting algorithm, which incorporates five risk factors, demonstrated strong performance in predicting postpartum chronic pain.

Peer Review reports

Background

Pregnancy and lactation are specific periods for women of reproductive age, during which the body undergoes dramatic physical and emotional changes to nurture a fetus and breastfeed a newborn [1]. The altered physical condition makes pregnant and lactating women potentially vulnerable to many disorders [2]. Some women develop delivery-related pain, which can transition from acute to chronic pain in many cases [3]. The prevalence of postpartum chronic pain ranges from 4 to 41.8% between 2 and 6 months after delivery [4], and the incidence is as high as 58.6% in China [5]. Postpartum chronic pain can amplify postnatal stress and contribute to mental health issues, such as depression and anxiety [6]. It imposes a heavy burden on the body and mind of women after delivery, as well as on their families, mother–infant attachment, and breastfeeding practices [7]. In severe cases, some women even commit suicide during the first year after childbirth [8]. Previous studies have demonstrated that timely acute and subacute pain evaluation and management can decrease the incidence of postoperative chronic pain [9]. Thus, early identification of factors associated with the development of postoperative chronic pain in high-risk women is necessary for implementing preventive strategies.

Despite the fact that chronic pain is a major cause of productivity loss and a large population of women experience postpartum chronic pain [10], few studies have examined the prevalence of chronic pain according to different modes of delivery [11]. Recently, a study identified nine risk factors of postpartum chronic pain; however, the C-index was below 0.7, indicating that the model’s performance requires further improvement [12]. Another study established a prediction model using a machine learning algorithm; however, it included 34 risk factors, making it difficult to use clinically [13]. In addition, recent research highlighted fetal status as a risk factor for postpartum chronic pain [14], yet it has not been incorporated into existing predictive tools. Thus, establishing a predictive tool that performs well is a priority for the prediction of postpartum chronic pain.

In recent years, prediction models have been increasingly used for predicting postpartum complications in clinical settings [15,16,17]. Machine learning has been widely used for predicting various events, demonstrating excellent predictive performance [18,19,20,21,22,23]. In this study, we benchmarked six machine learning algorithms and identified the best model to establish a tool for predicting postpartum chronic pain. We selected the features from demographics, history of cesarean delivery, and maternal and fetal status during gestation, as well as delivery- and surgery-related information [24, 25]. We then used Shapley additive explanations (SHAP) analysis to enhance the interpretability of the model variables, and the SHAP plots visually illustrated the contribution and direction of influence for each feature. This approach may advance its utility by bridging the gap between complex machine learning algorithms and actionable clinical understanding. Our findings may facilitate early screening and preventive strategies to reduce the development of postpartum chronic pain after delivery.

Methods

Trial design

The study was conducted in accordance with the Declaration of Helsinki (October 2000). The research protocol was approved by the Ethics Committee of Xiangyang Central Hospital, an affiliated hospital of Hubei University of Arts and Science. The clinical trial was registered at https://www.chictr.org.cn/ (No. ChiCTR2300070514, April 4, 2023). We conducted this retrospective study to investigate the prevalence and severity of postpartum chronic pain among all pregnant women who delivered at Xiangyang Central Hospital from July 1, 2021, to June 30, 2022. Our study followed the STROBE statement.

Participants

The study inclusion criteria comprised pregnant women who were of Han nationality, had singleton births and underwent vaginal delivery or cesarean delivery at our tertiary hospital, and who could understand our questions. The focus on Han Chinese women ensures consistency in genetic, cultural, and physiological factors, thereby enhancing the validity and applicability of the findings to this demographic. Women with a fetus that died were excluded from the study, as their emotional status may have been significantly affected, potentially influencing the evaluation of postpartum chronic pain.

Baseline characteristics

The baseline clinical characteristics of all postpartum women were collected, including age, body mass index (BMI) before delivery, gestational age at delivery, educational background (primary school, middle school, senior school, or college), comorbid diseases during gestation (hepatic disease, renal disease, hypertension, diabetes mellitus [DM]), primiparous or multiparous delivery, history of cesarean delivery, American Society of Anesthesiologists (ASA) physical status, heart function, anesthesia (no anesthesia, intrathecal anesthesia, or general anesthesia), patient-controlled analgesia (PCA, classified as no PCA, epidural PCA [PCEA], or intravenous PCA [PCIA]), induced delivery, blood loss, blood transfusion, newborn weight, baby nursed by delivery woman, other member of the family, or delivery women and members of the family, feeding pattern (breastfeeding, breast feeding and cow’s milk, or cow’s milk), white blood cell (WBC) count, neutrophil count, length of hospital stay, back pain during gestation, and numerical rating scale (NRS) at 3 days after delivery. These variables were collected because they may influence the occurrence of postoperative chronic pain.

For peri-delivery pain control, PCEA or PCIA was used. Pregnant women were taught to press a button if their pain intensity reached a pain numerical rating scale (NRS) score ≥ 4. The PCEA protocol for painless delivery comprised 1 mg/kg ropivacaine + 10 mg azasetron + 1 µg/kg sufentanil + normal saline (100 mL in total). The background rate was 4 mL/h and a 6 mL bolus with a 15-min lockout time. The PCIA protocol for postoperative analgesia comprised 3 µg/kg sufentanil + 20 mg azasetron + normal saline (100 mL in total). The background rate was 2 mL/h and a 2-mL bolus with a 15-min lockout time. The PCEA protocol for postoperative analgesia comprised 3 mg/kg ropivacaine + 20 mg azasetron + 2 µg/kg sufentanil + normal saline (100 mL in total). The background rate was 2 mL/h and a 1.5-mL bolus with a 15-min lockout time. If the women still had an NRS score ≥ 4 with a maximum push of PCA, non-steroidal anti-inflammatory drugs were prescribed by the attending physician. Women who underwent cesarean delivery received urinary catheters before the surgery.

Outcomes

The NRS for pain [26, 27] is a 0–10 point scale with “0” indicating no pain and “10” indicating the most intense pain imaginable. The scale was used to evaluate postpartum pain. NRS scores were collected from the electronic medical records on postpartum day 3 and a follow-up database at 1, 3, and 6 months after delivery. The state of pain was categorized into non-chronic pain and chronic pain 6 months after delivery. Postpartum pain evaluations were conducted using an electronic questionnaire administered by a follow-up team at our hospital. The team developed a detailed follow-up plan to ensure that the follow-up was completed at a fixed time point and carried out by well-trained physicians. All women were fully educated about the follow-up process during their hospitalization, including approximately when they will receive follow-up communications after discharge.

Statistical and machine learning analysis

The least absolute shrinkage and selection operator (LASSO) with 10-fold cross-validation was used to analyze the factors associated with postpartum chronic pain using whole data. In the coefficient plot, the earlier a variable enters the model, the more important it is considered to be. The deviance plot displays the impact of changes in the number of variables on the model’s performance. When the model’s performance is acceptable, selecting as few variables as possible helps to reduce the complexity of the model. In this study, coefficients at Lambda1se were selected for model establishment. The influence of the selected variables on the incidence of chronic pain 6 months after delivery was visualized using a forest plot.

To address data imbalance, a combination of over- and down-sampling methods was employed using the “ROSE” package to balance class distribution. The ROSE package is designed to handle binary classification problems in the presence of imbalanced classes [28], providing functions for estimation, accuracy evaluation, and remedies even in the presence of a rare class. Next, six machine learning algorithms—K-nearest neighbor (KNN), logistic regression, linear discriminant analysis (LDA), naive Bayes, ranger, and extreme gradient boosting (XGBoost)—were used to develop machine learning models, and their performance was benchmarked to identify the best model. The performance evaluation used a nested resampling method. In the inner loop, a random search for parameters was conducted to identify the optimal hyperparameters, which were then used to train the machine model with the inner loop data. The model performance was evaluated using the outer loop data. The inner loop used a holdout cross-validation (ratio, 7:3) with 1,000 iterations, and the outer loop used a 10-fold cross-validation. Several metrics were calculated to evaluate model performance, including classification error, F1 score, areas under the receiver operating characteristic curve (AUC), precision and recall AUC, sensitivity, and specificity. The machine learning algorithm with the best performance evaluation was used to establish the prediction model, and SHAP was used to interpret the impact of variables. SHAP value explains the impact of each feature on the outcome, and the feature importance plot was used to display the influence of features on the model prediction in a descending manner based on the average absolute value of SHAP.

The KNN algorithm identifies the K training samples in the training dataset that are analog to a given test sample [20]. Then, based on the classification labels of these K neighbors (for classification problems) or their numerical values (for regression problems), it predicts the category or value of the test sample. The principle of LDA primarily relies on the idea of dimensionality reduction, aiming to maximize the between-class separability while minimizing the within-class variance [29]. This is achieved by projecting the data onto a lower-dimensional space, and the position of points determines the category of the individual. Naive Bayes assumes that features are independent of each other, and it calculates posterior probabilities through Bayes’ theorem using known prior probabilities and conditional probabilities [30]. Ranger is an ensemble learning algorithm based on decision trees, which improves the accuracy and stability of the model by constructing multiple decision trees and making predictions by voting [23]. XGBoost is an iterative optimization algorithm based on decision trees, which obtains the final prediction by repeatedly training and fitting the residuals to minimize the loss function [19].

Quantitative data are expressed as the mean (standard deviation) and were analyzed using one-way analysis of variance if normally distributed or median (interquartile range, IQR) or Kruskal–Wallis tests if non-normally distributed among the different groups. Count data are expressed as number (percentage) and were analyzed using the χ2 or Fisher’s exact test. The sample size selected for the clinical prediction model establishment met the standard of 10 events per variable [31]. The statistical analysis was performed using R software (version 4.3.1). A P-value of < 0.05 indicated a statistically significant difference.

Results

Demographic characteristics

In this study, we screened 1636 pregnant women who gave birth at Xiangyang Central Hospital, among whom 44 women were excluded from the analysis (dead fetus, 12; parity, 32). Finally, a total of 1592 women (categorized into natural delivery, 410; painless delivery, 395; and cesarean delivery, 787) were included in the comparison of postpartum chronic pain. Loss to follow-up at 1, 3, and 6 months after delivery comprised 0, 12, and 20 women in the natural delivery group; 0, 11, and 20 women in the painless delivery group; and 0, 29, and 102 women in the cesarean delivery group, respectively (Fig. 1). The demographic and clinical characteristics of postpartum women according to the different modes of delivery are presented in Table 1.

Fig. 1
figure 1

Trial flowchart

Table 1 Patients’ baseline characteristics

The results showed that the proportion of multiparous delivery was significantly lower in the painless delivery group than in the natural delivery or cesarean delivery groups (P < 0.05). Similarly, gestational age at delivery was higher in the painless delivery group than in the natural delivery and cesarean delivery groups (P < 0.05). Pregnant women who underwent painless delivery had higher education levels than the other two groups (P < 0.05). Pregnant women who underwent cesarean sections had higher BMI before delivery and a higher prevalence of prior cesarean sections compared with the natural delivery and painless delivery groups (P < 0.05). With respect to delivery-related characteristics, the results showed that women who received cesarean sections had a higher volume of blood loss than the natural delivery and painless delivery groups (P < 0.05). Newborn weight and neutrophils in the cesarean delivery group were higher and lower than those in the natural delivery group, respectively (P < 0.05). NRS scores 3 days after delivery were higher in the cesarean delivery group than in the natural delivery and painless delivery groups (P < 0.05). The length of hospital stay was longer in the cesarean delivery group than in the other two groups and longer in the painless delivery group than in the natural delivery group (P < 0.05). There was no statistically significant difference among the three groups in terms of hepatic disease, blood transfusion, WBC, feeding pattern, or back pain during gestation (P > 0.05).

Women’ pain outcomes

The outcomes of postpartum chronic pain after delivery are shown in Table 2. The NRS scores of chronic pain at 1, 3, and 6 months after delivery were higher in the cesarean group than in the natural delivery and painless delivery groups (P < 0.05). The incidence of postpartum chronic pain at 1 (57.4% vs. 34.9% vs. 31.7%), 3 (42.6% vs. 30.2% vs. 25.9%), and 6 (31.2%, vs. 25.3%, vs. 22.8%) months after delivery was higher in the cesarean group than in the other two groups (P < 0.05). Low back pain was the most common across all three delivery groups.

Table 2 Patients’ chronic pain outcomes

Feature selection and machine learning benchmarking results

The women’s variables for demographics, anesthesia, surgery, delivery, and fetus were analyzed to identify relevant factors of postpartum chronic pain 6 months after delivery. LASSO identified five variables entered before λ1se: NRS at 3 days after delivery, BMI before delivery, newborn weight, multiparous delivery, and back pain during gestation. The coefficient lines for each variable in the LASSO classification and the diagram for determining the optimal penalty coefficient Lambda are shown in Fig. 2A and B, respectively. The influence of five variables on the incidence of chronic pain 6 months after delivery was visualized using a forest plot (Supplementary Figure A).

Fig. 2
figure 2

Feature selection for postpartum chronic pain 6 months after delivery with LASSO. (A) The influence of a variable entered into the model earlier is greater than that of a variable entered later. (B) Different values of λ are shown on the x-axis, and the binary deviance is shown on the y-axis. λ min to 1se indicates the acceptable variable

The performance evaluation of six machine learning methods demonstrated the following classification errors (CEs): KNN, 0.212; logistic regression, 0.342; LDA, 0.343; naive Bayes, 0.346; ranger, 0.219; and XGBoost, 0.147 (Fig. 3). Additionally, their F1 scores were as follows: KNN, 0.789; logistic regression, 0.628; LDA, 0.627; naive Bayes, 0.629; ranger, 0.775; and XGBoost, 0.851 (Table 3). The CE, F1 score, AUC, precision and recall AUC, precision, recall, sensitivity, and specificity for each machine learning method are depicted in Table 3. The receiver operating characteristic curve, and precision and recall curve are shown in Supplementary Figures B and C, respectively. Of all the algorithms tested, XGBoost performed the best and was chosen for model establishment. All hyperparameters and comparisons among six metrics are provided in the Supplementary text.

Fig. 3
figure 3

Classification error of benchmarking six machine learning algorithms

Table 3 Performance evaluation of six machine learning algorithms

SHAP analysis of the prediction model

SHAP analysis was used to visualize the XGBoost model, with plots reflecting the influence of each feature and the direction of its impact. The horizontal axis shows SHAP values, whereas the vertical axis displays the five identified variables (Fig. 4A). Back pain during gestation, NRS at 3 days after delivery, multiparous delivery, newborn weight, and body mass index before delivery are the five most significant factors in predicting chronic pain 6 months after delivery. For instance, the SHAP plot reveals that a higher pain score 3 days after delivery is associated with a significant positive SHAP value, indicating that effective management of acute postpartum pain effectively could reduce the risk of chronic pain development. Similarly, positive SHAP values for back pain during gestation are associated with an elevated risk of postpartum chronic pain, suggesting that controlling back pain during pregnancy may serve as a preventive measure. Furthermore, the feature ranking of the y-axis indicates the feature importance in our prediction model (Fig. 4B). Five features were shown in descending order, evaluated by the average absolute SHAP values of the model.

Fig. 4
figure 4

Interpretation of the xgboost models using SHAP. (A) SHAP summary point. (B) feature importance of the variables in the xgboost

Discussion

Our study demonstrated that pregnant women who underwent cesarean delivery developed a higher incidence of postpartum chronic pain than women who underwent natural delivery and painless delivery. Additionally, NRS at 3 days after delivery, BMI before delivery, newborn weight, multiparous delivery, and back pain during gestation were risk factors for postpartum chronic pain. Benchmarking of six machine learning algorithms identified that XGBoost was superior to the other five algorithms. Consequently, the XGBoost algorithm was used to establish a prediction model, and visualization using SHAP provided valuable insights for interpreting the model.

A comparison of the delivery modes revealed that women in the cesarean delivery group were older, had a shorter gestational period, and delivered heavier newborns. These outcomes may be explained by several factors. Older mothers often have more health problems, leading them to opt for cesarean deliveries to prioritize fetal safety. Additionally, the cesarean section group had a lower gestational age, which may be because these women had more pre-delivery complications, including hypertension and DM. DM [32] and hypertension [33] suggest a poorer physical condition before delivery and may result in a cesarean section to terminate pregnancy early. Furthermore, the cesarean section group had higher fetal weight, and a large fetus may result in difficulties in the birth canal, and these women may have to undergo cesarean section delivery.

Postpartum chronic pain has become a major long-term health problem among women after delivery, negatively affecting their health status [34]. Our results showed that the incidence of chronic pain 6 months after delivery is 20–30% and that most women experience low back pain and pelvic pain. The high prevalence of chronic postpartum pain affects postpartum physical and mental health, including anxiety and depression. Previous studies have reported that 68%, 43%, and 20% of women report persistent low back pain and pelvic pain beyond 3 months, 6 months, and 3 years after delivery [14, 35, 36]. Our findings align with those of previous studies, highlighting the significant burden of postpartum chronic pain. Moreover, our results showed a higher incidence of postpartum chronic pain after cesarean delivery. Two previous studies have reported similar results indicating that cesarean section is associated with a higher incidence of postpartum chronic pain [37, 38]. Thus, women who undergo a cesarean delivery are at a higher risk of developing postpartum chronic pain.

LASSO can extract the most meaningful features from the data, reducing complexity, multicollinearity, and overfitting of the prediction model. In this study, LASSO identified six risk factors that were used to develop machine learning prediction models. Machine learning algorithms have been frequently used for predicting various perioperative events [39, 40]. However, in this study, we used six machine learning algorithms to predict postpartum chronic pain, and the benchmarking results showed that XGBoost had the best performance evaluation. For XGBoost, the metrics indicated a good performance, with a CE below 0.2, an F1 score exceeding 0.8, and an AUC above 0.8. The machine learning algorithm XGBoost excels at handling complex feature interactions and nonlinear relationships within datasets. Its ensemble approach combines multiple decision trees, effectively capturing intricate interactions and dependencies, thereby enhancing predictive accuracy. Additionally, XGBoost’s built-in regularization techniques help mitigate over-fitting, ensuring robust performance even with relatively small or imbalanced datasets. Considering the superiority of XGBoost, we established a prediction tool using this algorithm and performed a SHAP analysis to aid the interpretation of the model. Our model’s advantage lies in its ability to screen women at risk for chronic pain early, enabling clinicians to implement preventive strategies to reduce the development of postpartum chronic pain.

Our results showed that back pain during gestation and pain intensity 3 days after delivery contribute to postpartum chronic pain. Previous studies have demonstrated that both preoperative pain and postoperative acute pain are risk factors for postoperative chronic pain [41]. Perioperative pain results in an increased incidence of chronic pain due to the priming effect of pain signal pathways in the central nervous system [42, 43]. A peri-delivery study has identified that back pain during pregnancy contributes to the development of chronic pain [44], whereas insufficient pain control after delivery increases the likelihood of postpartum chronic pain [45]. Although postpartum acute pain can be controlled effectively in the hospital, managing pain after discharge remains a challenge. Recently, a study proposed that a transitional follow-up of high-risk women 4–6 weeks after delivery may help to overcome the disconnect between ward-based postoperative acute pain management and outpatient chronic pain management [41]. Thus, early identification of perioperative risk factors and implementation of preventative strategies in women at the highest risk may result in a reduction in the incidence of chronic postoperative pain [46, 47].

Our study indicated that newborn weight is a risk factor for postoperative chronic pain. This may be because higher newborn weight increases the pressure on the lower back and pelvic structures during pregnancy compared with lower newborn weight. Larger newborns may also increase birth canal pressure during delivery, which may result in pelvic muscle injury [14]. Similarly, we found that BMI is a risk factor for postpartum chronic pain. This may be explained by the fact that obesity during pregnancy increases the incidence of lower back muscle stress and results in chronic low back muscle injury. Interestingly, another study identified that excessive weight gain contributes to the development of postpartum chronic pain [36]. The results suggest that a weight gain of less than 15 kg does not increase the risk of postpartum chronic pain. Furthermore, we identified multiparous deliveries as a risk factor for postpartum chronic pain. This may be because pregnancy- and delivery-related body injuries have an accumulative and priming effect on the next pregnancy. A previous study using an algorithm identified that cesarean section is the most important risk factor for postpartum chronic pain [13]. Consistently, our results showed that the cesarean group had a higher incidence of chronic pain. However, multivariable analysis has demonstrated that acute pain, rather than delivery mode, is a contributor to postpartum chronic pain. This outcome may be explained by the fact that cesarean surgery causes more severe tissue damage and inflammation and enhanced postoperative acute pain [45].

The findings of this study summarize the predictive capabilities of the tool in identifying high-risk individuals with postpartum chronic pain. However, it is equally important to translate these findings into clinical utility. During pregnancy, it is essential to provide comprehensive prenatal education, including personalized dietary plans and regular weight monitoring, to prevent excessive nutrition and obesity. Additionally, encouraging appropriate physical activity during pregnancy and advising patients to seek medical interventions for back pain could be considered. Moreover, for fetuses that are severely overweight, a cesarean section may be recommended before delivery to prevent pelvic nerve plexus injury and birth canal trauma. Postoperatively, implementing multimodal analgesia after delivery is recommended to reduce pain intensity, alleviate psychological stress, and ensure early intervention for moderate to severe pain. By integrating this strategy into routine clinical practice, healthcare providers can shift from a reactive to a proactive approach, ultimately preventing the development of postpartum chronic pain.

Strengths and limitations

In our research, we identified five risk factors used for prediction model establishment. According to the rule of 10 events per variable, the incidence of postpartum chronic pain is approximately 20%; therefore, the sample size should be not less than 250 women. Indeed, our study included 1,398 patients, making it statistically powerful enough to detect meaningful differences. However, we must acknowledge some limitations of the study. First, this was a retrospective study; much information on preoperative variables, perioperative care, surgery, and anesthesia could not be identified accurately and included for analysis. Second, the retrospective design carries inherent limitations, such as selection bias and recall bias. These biases occur when the samples are not representative or when inaccuracies arise in self-reported data. Prospective studies, which use representative sampling and standardized data collection protocols and aim to minimize reliance on participants’ memory, could potentially enhance the reliability and accuracy of results. Third, the data in our study had an unbalanced study population (1,398 postpartum women, of whom 383 developed chronic pain). An unbalanced dataset, although managed with statistical methods, may lead to biased predictions and misleading evaluation metrics, increasing the risk of overfitting the majority class. Fourth, some women chose their delivery mode, whereas a small proportion of women had to receive cesarean delivery due to their physical status and comorbidities; this may result in selection bias and skew the generalizability of the findings. Lastly, more patients in the cesarean section were lost to follow-up, and the reason for this is unknown. Loss to follow-up may result in selection bias and reduce the reliability of the outcomes.

Conclusions and implications

In this study, we identified six risk factors for postpartum chronic pain. We then established a machine learning algorithm for predicting postpartum chronic pain with good performance evaluations. The established prediction model may be useful for early screening of high-risk women and implementing preventive strategies for decreasing the incidence of postpartum chronic pain.

In the future, our results should be validated in a well-designed prospective study to rigorously assess the generalizability and robustness of the model. Additionally, incorporating additional features such as psychosocial factors could improve the predictive performance of the model. Moreover, the application of our prediction model in clinical decision-making for postpartum care should be prioritized. By addressing these steps, we can move closer to translating our research into actionable solutions that prevent the development of postpartum chronic pain.

Data availability

The datasets analyzed in the current study are available from the corresponding author upon reasonable request.

Abbreviations

ASA:

American society of anesthesiologists

AUC:

Areas under the receiver operating characteristic curve (AUC), and precision and recall AUC (PRAUC)

BMI:

Body mass index

DM:

Diabetes mellitus

IQR:

Interquartile range

LASSO:

Least absolute shrinkage and selection operator

NRS:

Numerical rating scale

PCA:

Patient-controlled analgesia

PRAUC:

Precision and recall areas under the receiver operating characteristic curve

ROC:

Receiver operating curve

SD:

Standard division

WBC:

White blood cell

References

  1. Haddad-Tóvolli R, Claret M. Metabolic and feeding adjustments during pregnancy. Nat Rev Endocrinol. 2023;19(10):564–80.

    Article  PubMed  Google Scholar 

  2. Robinson DP, Klein SL. Pregnancy and pregnancy-associated hormones alter immune responses and disease pathogenesis. Horm Behav. 2012;62(3):263–71.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  3. Munro A, George RB, Chorney J, Snelgrove-Clarke E, Rosen NO. Prevalence and predictors of chronic pain in pregnancy and postpartum. J Obstet Gynaecol Ca. 2017;39(9):734–41.

    Article  Google Scholar 

  4. Yimer H, Woldie H. Incidence and associated factors of chronic pain after caesarean section: A systematic review. J Obstet Gynaecol Ca. 2019;41(6):840–54.

    Article  Google Scholar 

  5. Wang X, Wang Y, Zhou S, Wang J, Wang J, Lofstedt P. Women’s postpartum practices and chronic pain in rural China. Matern Child Hlth J. 2009;13(2):206–12.

    Article  Google Scholar 

  6. Pawluski JL, Lonstein JS, Fleming AS. The neurobiology of postpartum anxiety and depression. Trends Neurosci. 2017;40(2):106–20.

    Article  CAS  PubMed  Google Scholar 

  7. Meltzer-Brody S, Howard LM, Bergink V, Vigod S, Jones I, Munk-Olsen T, Honikman S, Milgrom J. Postpartum psychiatric disorders. Nat Rev Dis Primers. 2018;4:18022.

    Article  PubMed  Google Scholar 

  8. Johannsen BM, Larsen JT, Laursen TM, Bergink V, Meltzer-Brody S, Munk-Olsen T. All-Cause mortality in women with severe postpartum psychiatric disorders. Am J Psychiat. 2016;173(6):635–42.

    Article  PubMed  Google Scholar 

  9. Tawfic Q, Kumar K, Pirani Z, Armstrong K. Prevention of chronic post-surgical pain: the importance of early identification of risk factors. J Anesth. 2017;31(3):424–31.

    Article  PubMed  Google Scholar 

  10. Komatsu R, Ando K, Flood PD. Factors associated with persistent pain after childbirth: a narrative review. Brit J Anaesth. 2020;124(3):e117–30.

    Article  PubMed  PubMed Central  Google Scholar 

  11. Ilska M, Banas E, Gregor K, Brandt-Salmeri A, Ilski A, Cnota W. Vaginal delivery or caesarean section - Severity of early symptoms of postpartum depression and assessment of pain in Polish women in the early puerperium. Midwifery. 2020;87:102731.

    Article  PubMed  Google Scholar 

  12. Zheng Y, Ni L, Ni F, Wang X, Chen Y, Guo M, Dong X, Pan Q, Chen C. The prediction and treatment of postpartum myofascial pelvic pain. Technol Health Care. 2023;31(2):593–605.

    Article  PubMed  Google Scholar 

  13. Xu W, Sampson M. Prenatal and childbirth risk factors of postpartum pain and depression: A machine learning approach. Matern Child Hlth J. 2023;27(2):286–96.

    Article  Google Scholar 

  14. Stomp-van DBS, Hendriksen I, Bruinvels DJ, Twisk J, van Mechelen W, van Poppel M. Predictors for postpartum pelvic girdle pain in working women: the Mom@Work cohort study. Pain. 2012;153(12):2370–9.

    Article  Google Scholar 

  15. Allotey J, Fernandez-Felix BM, Zamora J, Moss N, Bagary M, Kelso A, Khan R, van der Post JAM, Mol BW, Pirie AM, et al. Predicting seizures in pregnant women with epilepsy: development and external validation of a prognostic model. Plos Med. 2019;16(5):e1002802.

    Article  PubMed  PubMed Central  Google Scholar 

  16. Wu Q, Yao K, Liu Z, Li L, Zhao X, Wang S, Shang H, Lin Y, Wen Z, Zhang X, et al. Radiomics analysis of placenta on T2WI facilitates prediction of postpartum haemorrhage: A multicentre study. Ebiomedicine. 2019;50:355–65.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  17. Wang M, Yi G, Zhang Y, Li M, Zhang J. Quantitative prediction of postpartum hemorrhage in Cesarean section on machine learning. BMC Med Inform Decis. 2024;24(1):166.

    Article  Google Scholar 

  18. Lotsch J, Ultsch A. Machine learning in pain research. Pain. 2018;159(4):623–30.

    Article  PubMed  Google Scholar 

  19. Xiao S, Liu F, Yu L, Li X, Ye X, Gong X. Development and validation of a nomogram for blood transfusion during intracranial aneurysm clamping surgery: a retrospective analysis. BMC Med Inform Decis. 2023;23(1):71.

    Article  Google Scholar 

  20. Xiao S, Jiang F, Chen Y, Gong X. Development and validation of a prediction tool for intraoperative blood transfusion in brain tumor resection surgery: a retrospective analysis. Sci Rep-UK. 2023;13(1):17428.

    Article  CAS  Google Scholar 

  21. Sirocchi C, Bogliolo A, Montagna S. Medical-informed machine learning: integrating prior knowledge into medical decision systems. BMC Med Inform Decis. 2024;24(Suppl 4):186.

    Article  Google Scholar 

  22. Yu L, Zhang X, Jiang F, Zheng H, Li X, Ye X, Gong X, Xing H. Development and validation of nomograms to predict preoperative anxiety and postoperative pain in patients undergoing gynecological surgery: an observational analysis. J Affect Disorders. 2023;339:227–36.

    Article  PubMed  Google Scholar 

  23. Zuo D, Yang L, Jin Y, Qi H, Liu Y, Ren L. Machine learning-based models for the prediction of breast cancer recurrence risk. BMC Med Inform Decis. 2023;23(1):276.

    Article  Google Scholar 

  24. Gjestland K, Bo K, Owe KM, Eberhard-Gran M. Do pregnant women follow exercise guidelines? Prevalence data among 3482 women, and prediction of low-back pain, pelvic girdle pain and depression. Brit J Sport Med. 2013;47(8):515–20.

    Article  Google Scholar 

  25. Rodriguez-Ayllon M, Acosta-Manzano P, Coll-Risco I, Romero-Gallardo L, Borges-Cosic M, Estevez-Lopez F, Aparicio VA. Associations of physical activity, sedentary time, and physical fitness with mental health during pregnancy: the GESTAFIT project. J Sport Health Sci. 2021;10(3):379–86.

    Article  PubMed  Google Scholar 

  26. Zhou D, Liu F, Jiang F, Ye X, Gong X, Zhang M. Sub-Anesthesia dose of S-Ketamine reduces postoperative pain and anxiety in patients receiving breast and thyroid surgery: A randomized, controlled trial. Pain Physician. 2023;26(3):257–64.

    Article  PubMed  Google Scholar 

  27. Liu J, Liu M, Shi S, Jiang F, Zhang Y, Guo J, Gong X. Evaluation of the effect of intraoperative Tropisetron on postoperative rebound pain after brachial plexus block: a randomized controlled trial. Pain Rep. 2024;9(3):e1163.

    Article  PubMed  PubMed Central  Google Scholar 

  28. Lunardon N, Menardi G, Torelli N. ROSE: a package for binary imbalanced learning. R J. 2014;6(1):79.

    Article  Google Scholar 

  29. Hu W, Shen W, Zhou H, Kong D. Matrix Linear Discriminant Anal. Technometrics. 2020;62(2):196–205.

    Google Scholar 

  30. Zhang Z. Naive Bayes classification in R. Ann Transl Med. 2016;4(12):241.

    Article  PubMed  PubMed Central  Google Scholar 

  31. Riley RD, Ensor J, Snell K, Harrell FJ, Martin GP, Reitsma JB, Moons K, Collins G, van Smeden M. Calculating the sample size required for developing a clinical prediction model. BMJ-Brit Med J. 2020;368:m441.

    Article  Google Scholar 

  32. Rajamaki TJ, Jamsen E, Puolakka PA, Nevalainen PI, Moilanen T. Diabetes is associated with persistent pain after hip and knee replacement. Acta Orthop. 2015;86(5):586–93.

    Article  PubMed  PubMed Central  Google Scholar 

  33. Lim J, Chen D, McNicol E, Sharma L, Varaday G, Sharma A, Wilson E, Wright-Yatsko T, Yaeger L, Gilron I, et al. Risk factors for persistent pain after breast and thoracic surgeries: a systematic literature review and meta-analysis. Pain. 2022;163(1):3–20.

    Article  PubMed  Google Scholar 

  34. Bergstrom C, Persson M, Mogren I. Pregnancy-related low back pain and pelvic girdle pain approximately 14 months after pregnancy - pain status, self-rated health and family situation. BMC Pregnancy Childb. 2014;14:48.

    Article  Google Scholar 

  35. Noren L, Ostgaard S, Johansson G, Ostgaard HC. Lumbar back and posterior pelvic pain during pregnancy: a 3-year follow-up. Eur Spine J. 2002;11(3):267–71.

    Article  PubMed  Google Scholar 

  36. Matsuda N, Kitagaki K, Perrein E, Tsuboi Y, Ebina A, Kondo Y, Murata S, Isa T, Okumura M, Kawaharada R, et al. Association between excessive weight gain during pregnancy and persistent low back and pelvic pain after delivery. Spine. 2020;45(5):319–24.

    Article  PubMed  Google Scholar 

  37. Kainu JP, Halmesmaki E, Korttila KT, Sarvela PJ. Persistent pain after Cesarean delivery and vaginal delivery: A prospective cohort study. Anesth Analg. 2016;123(6):1535–45.

    Article  PubMed  Google Scholar 

  38. Kainu JP, Sarvela J, Tiippana E, Halmesmaki E, Korttila KT. Persistent pain after caesarean section and vaginal birth: a cohort study. Int J Obstet Anesth. 2010;19(1):4–9.

    Article  CAS  PubMed  Google Scholar 

  39. Lotsch J, Ultsch A, Kalso E. Prediction of persistent post-surgery pain by preoperative cold pain sensitivity: biomarker development with machine-learning-derived analysis. Brit J Anaesth. 2017;119(4):821–9.

    Article  CAS  PubMed  Google Scholar 

  40. Hashimoto DA, Witkowski E, Gao L, Meireles O, Rosman G. Artificial intelligence in anesthesiology: current techniques, clinical applications, and limitations. Anesthesiology. 2020;132(2):379–94.

    Article  PubMed  Google Scholar 

  41. Glare P, Aubrey KR, Myles PS. Transition from acute to chronic pain after surgery. Lancet. 2019;393(10180):1537–46.

    Article  PubMed  Google Scholar 

  42. Deumens R, Steyaert A, Forget P, Schubert M, Lavand’Homme P, Hermans E, De Kock M. Prevention of chronic postoperative pain: cellular, molecular, and clinical insights for mechanism-based treatment approaches. Prog Neurobiol. 2013;104:1–37.

    Article  CAS  PubMed  Google Scholar 

  43. Correll D. Chronic postoperative pain: recent findings in Understanding and management. F1000Res. 2017;6:1054.

    Article  PubMed  PubMed Central  Google Scholar 

  44. To WWK, Wong MWN. Factors associated with back pain symptoms in pregnancy and the persistence of pain 2 years after pregnancy. Acta Obstet Gyn Scan. 2003;82(12):1086–91.

    Article  CAS  Google Scholar 

  45. Eisenach JC, Pan PH, Smiley R, Lavand’Homme P, Landau R, Houle TT. Severity of acute pain after childbirth, but not type of delivery, predicts persistent pain and postpartum depression. Pain. 2008;140(1):87–94.

    Article  PubMed  PubMed Central  Google Scholar 

  46. Richebe P, Capdevila X, Rivat C. Persistent postsurgical pain: pathophysiology and preventative pharmacologic considerations. Anesthesiology. 2018;129(3):590–607.

    Article  PubMed  Google Scholar 

  47. Fregoso G, Wang A, Tseng K, Wang J. Transition from acute to chronic pain: evaluating risk for chronic postsurgical pain. Pain Physician. 2019;22(5):479–88.

    PubMed  Google Scholar 

Download references

Acknowledgements

We would like to acknowledge all medical staff who participated in the study.

Funding

XRG was funded by a grant from the Natural Science Foundation of Hubei Province (2023AFD041).

Author information

Authors and Affiliations

Authors

Contributions

Design and supervision: XRG. Data acquisition and sorting: FL, TL, DXZ, and SNS. Statistical analysis and interpretation of data: FL, TL; and DXZ. Manuscript drafting: XRG. Critical revision of the manuscript: XRG. All authors read and approved the final version of the manuscript.

Corresponding author

Correspondence to Xingrui Gong.

Ethics declarations

Ethics approval and consent to participate

This study was approved by the Ethics Committee of Xiangyang Central Hospital. All study procedures were performed in accordance with the Declaration of Helsinki. The Ethics Committee of the Xiangyang Central Hospital provided an exempt determination and waived the requirement for informed consent.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary Material 1

Supplementary Material 2

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, F., Li, T., Zhou, D. et al. A machine learning–based framework for predicting postpartum chronic pain: a retrospective study. BMC Med Inform Decis Mak 25, 168 (2025). https://doiorg.publicaciones.saludcastillayleon.es/10.1186/s12911-025-03004-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doiorg.publicaciones.saludcastillayleon.es/10.1186/s12911-025-03004-9

Keywords