Skip to main content
eScholarship
Open Access Publications from the University of California

UC San Diego

UC San Diego Previously Published Works bannerUC San Diego

Classifying High-Risk Patients for Persistent Opioid Use After Major Spine Surgery: A Machine-Learning Approach.

Abstract

BACKGROUND: Persistent opioid use is a common occurrence after surgery and prolonged exposure to opioids may result in escalation and dependence. The objective of this study was to develop machine-learning-based predictive models for persistent opioid use after major spine surgery. METHODS: Five classification models were evaluated to predict persistent opioid use: logistic regression, random forest, neural network, balanced random forest, and balanced bagging. Synthetic Minority Oversampling Technique was used to improve class balance. The primary outcome was persistent opioid use, defined as patient reporting to use opioids after 3 months postoperatively. The data were split into a training and test set. Performance metrics were evaluated on the test set and included the F1 score and the area under the receiver operating characteristics curve (AUC). Feature importance was ranked based on SHapley Additive exPlanations (SHAP). RESULTS: After exclusion (patients with missing follow-up data), 2611 patients were included in the analysis, of which 1209 (46.3%) continued to use opioids 3 months after surgery. The balanced random forest classifiers had the highest AUC (0.877, 95% confidence interval [CI], 0.834-0.894) compared to neural networks (0.729, 95% CI, 0.672-0.787), logistic regression (0.709, 95% CI, 0.652-0.767), balanced bagging classifier (0.859, 95% CI, 0.814-0.905), and random forest classifier (0.855, 95% CI, 0.813-0.897). The balanced random forest classifier had the highest F1 (0.758, 95% CI, 0.677-0.839). Furthermore, the specificity, sensitivity, precision, and accuracy were 0.883, 0.700, 0.836, and 0.780, respectively. The features based on SHAP analysis with the highest impact on model performance were age, preoperative opioid use, preoperative pain scores, and body mass index. CONCLUSIONS: The balanced random forest classifier was found to be the most effective model for identifying persistent opioid use after spine surgery.

Many UC-authored scholarly publications are freely available on this site because of the UC's open access policies. Let us know how this access is important for you.