Machine Learning Approach to Predict Postoperative Pain and Opioid Usage in Elective Primary Spine Surgery: A Retrospective Study

Background: Machine learning (ML) was used to predict pain scores and opioid consumption after elective spine surgery in the presence and absence of erector spinae plane block (ESP). Methods: A single-center retrospective chart review of 2796 cases was conducted. These cases were divided into the control group (N=1255) consisting of patients who did not receive the ESP blocks and the treatment group consisting of patients who received the blocks (N=1541). The gradient boosting ensemble tree methodology was employed to develop the AI predictive models. Feature importance for each optimized gradient boosting model was quantified using impurity-based importance scores, as implemented in the scikit-learn library. Partial dependence analysis was conducted to characterize the direction, magnitude, and non-linear nature of predictor-outcome relationships across clinically relevant ranges. Results: On unadjusted univariate analysis, the ESP block was associated with a statistically significant (p=0.01) yet clinically irrelevant 1% increase in average postsurgical pain scores. Conversely, ESP block was associated with a statistically non-significant (p=0.13) but clinically relevant 6.7% reduction in opioid consumption (MME/kg/day). These associations are exploratory and should not be interpreted as causal. Three AI models were developed to predict postsurgical pain and opioid consumption. The best-performing model, which predicts average postsurgical pain, achieved a mean absolute error of 1.24 on a 10-point scale (approximately 12.4%). High-importance predictors across the models included preoperative pain scores, serum glucose, and white blood cell count, as well as age. Conclusion: It is feasible to use machine-learning approaches to identify risk factors for postoperative pain and predict population-level pain scores and opioid consumption in spine surgery using large datasets; these models are not intended for individual-level prediction. The role of ESP in spine surgery, however, remains uncertain, and ESP block findings should be interpreted as exploratory associations only. Keywords: machine learning, spine, pain, opioid

Authors

Institutions

Publication Details

Journal
Journal of Pain Research
Published
2026-03-01
DOI
https://doi.org/10.2147/jpr.s596384
Primary Topic
Opioid Use Disorder Treatment
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine Learning Approach to Predict Postoperative Pain and Opioid Usage in Elective Primary Spine Surgery: A Retrospective Study

Seongho Jeong, J. -L. Li, R. Lee, Glenn S. Russo et al.
Journal of Pain Research
Opioid Use Disorder Treatment
article

Machine Learning Approach to Predict Postoperative Pain and Opioid Usage in Elective Primary Spine Surgery: A Retrospective Study

Seongho Jeong, J. -L. Li, R. Lee, Glenn S. Russo, Swaroopa Vaidya, Alex Yuan, Nishita Lockwood, Danny Saksenberg
article en

Abstract

Background: Machine learning (ML) was used to predict pain scores and opioid consumption after elective spine surgery in the presence and absence of erector spinae plane block (ESP). Methods: A single-center retrospective chart review of 2796 cases was conducted. These cases were divided into the control group (N=1255) consisting of patients who did not receive the ESP blocks and the treatment group consisting of patients who received the blocks (N=1541). The gradient boosting ensemble tree methodology was employed to develop the AI predictive models. Feature importance for each optimized gradient boosting model was quantified using impurity-based importance scores, as implemented in the scikit-learn library. Partial dependence analysis was conducted to characterize the direction, magnitude, and non-linear nature of predictor-outcome relationships across clinically relevant ranges. Results: On unadjusted univariate analysis, the ESP block was associated with a statistically significant (p=0.01) yet clinically irrelevant 1% increase in average postsurgical pain scores. Conversely, ESP block was associated with a statistically non-significant (p=0.13) but clinically relevant 6.7% reduction in opioid consumption (MME/kg/day). These associations are exploratory and should not be interpreted as causal. Three AI models were developed to predict postsurgical pain and opioid consumption. The best-performing model, which predicts average postsurgical pain, achieved a mean absolute error of 1.24 on a 10-point scale (approximately 12.4%). High-importance predictors across the models included preoperative pain scores, serum glucose, and white blood cell count, as well as age. Conclusion: It is feasible to use machine-learning approaches to identify risk factors for postoperative pain and predict population-level pain scores and opioid consumption in spine surgery using large datasets; these models are not intended for individual-level prediction. The role of ESP in spine surgery, however, remains uncertain, and ESP block findings should be interpreted as exploratory associations only. Keywords: machine learning, spine, pain, opioid

Journal of Pain ResearchVol. Volume 19
Hartford Hospital (US), Johannes Gutenberg University Mainz (DE), Yale University (US), Quinnipiac University (US)
Quality Education
Openalex Percentile: Top 7%
Opioid Use Disorder Treatment
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.