Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Dec 19;9(3):748-755.
doi: 10.1016/j.jseint.2024.11.020. eCollection 2025 May.

Using deep learning to predict postoperative pain in reverse shoulder arthroplasty patients

Affiliations

Using deep learning to predict postoperative pain in reverse shoulder arthroplasty patients

Tim Schneller et al. JSES Int. .

Abstract

Background: Most research on shoulder arthroplasty has predominantly concentrated on optimizing treatment to enhance shoulder function with comparatively less emphasis on postsurgical pain. Yet, pain is an equally significant or even more important outcome in orthopedic surgery. The aim of this study was to develop a deep learning algorithm for predicting postsurgical pain after reverse total shoulder arthroplasty (rTSA).

Methods: Clinical data of rTSA patients were extracted from a local shoulder arthroplasty registry and used to build an artificial neural network, which was set up with input from 34 preoperative features including demographics, disease-related information, clinical, and self-report assessments. The target variable was a binary classification derived from a numeric pain rating scale (0-10): if the pain scored 3 or higher, it was classified as positive; if the pain score was 2 or lower, it was classified as negative. The model was internally validated with a test dataset that was comprised of 20% of the whole dataset. Model performance was evaluated on the testset using the metrics accuracy, precision, recall, and f1-score.

Results: Our model, including data from 1707 patients (pain: n = 705, no pain: n = 1002), achieved a 63% accuracy rate in predicting postsurgical pain 2 years following rTSA. Identification of the most critical factors indicating low postsurgical pain was performed by SHapley Additive exPlanations analysis, which included a low American Society of Anesthesiologists physical status classification, a low Quick Disability of the Arm, Shoulder and Hand questionnaire score, private insurance status, primary OA, being admitted due to illness as opposed to due to an accident, low pain levels, occasional alcohol consumption, low shoulder pain and disability index and functional scores.

Conclusion: We successfully developed an artificial neural network to predict postsurgical pain after rTSA. Additional efforts are still required to refine the models' performance, such as including further parameters predictive of pain and considering other machine learning algorithms. In a clinical setting, the implementation of such a prediction model could optimize surgical indications and help manage patient expectations more effectively.

Keywords: Arthroplasty; Deep learning; Machine learning; Neural networks; Pain; Postoperative; Replacement; Shoulder.

PubMed Disclaimer

Figures

Figure 1
Figure 1
The most impactful features on the model’s prediction are shown. Blue dots represent low feature values and red dots stand for high values. In binary features like admission type, the blue and red dots symbolize zero and one respectively (representing illness and accident, or no and yes for one-hot encoded variables). For continuous variables such as the quickDASH score, blue dots represent those with lower scores. This color coding also applied to ordinal variables like shoulder flexion, with blue dots indicating lower values and red dots showing higher values of the respective feature. quickDASH, disabilities of the arm shoulder and hand short version questionnaire; ASA, American Society of Anesthesiologists; OA, osteoarthritis; NRS, numeric rating scale; SPADI, shoulder pain and disability index.
Figure 2
Figure 2
Explanation of predictors on a case level. It displays the individual most important characteristics of selected patients for predicting the outcome. The size of the arrows indicates the magnitude of the influence of a single feature on the model’s prediction, while the color highlights the direction of this influence, with blue arrows contributing to the prediction of lower postsurgical pain and red arrows contributing to the prediction of higher postsurgical pain. The base value stands for the value that would be predicted if we didn’t know any features, while the output stands for the probability to belonging to class 1. For example, patient A is predicted not to experience postsurgical pain, despite not consuming alcohol occasionally. However, this prediction agrees with the patient’s low preoperative quickDASH score, the diagnosis primary osteoarthritis, a low disease burden as measured by the ASA grade, and low preoperative pain levels, all of which suggest a lower likelihood of developing postsurgical pain. quickDASH, disabilities of the arm shoulder and hand short version questionnaire; ASA, American Society of Anesthesiologists.
Figure 3
Figure 3
Depicttion of confusion matrices for both baseline models and the proposed model. They are essentially frequency tables with the ground truth on the y-axis, and the predictions on the x-axis. For example, our proposed model predicted the absence of postsurgical pain in 194 cases, 134 of which were correctly predicted, while the prediction was wrong in 60 cases. Similarly, the model predicted the presence of postsurgical pain in 148 cases, 81 of which were correctly predicted, 67 of which were falsely predicted.
Figure 4
Figure 4
This figure shows the receiver operating characteristics curve along with the area under the curve value.

References

    1. Arendt-Nielsen L., Nie H., Laursen M.B., Laursen B.S., Madeleine P., Simonsen O.H., et al. Sensitization in patients with painful knee osteoarthritis. J Pain. 2010;149:573–581. doi: 10.1016/j.pain.2010.04.003. - DOI - PubMed
    1. Breckenridge J.D., McAuley J.H. Shoulder pain and disability index (SPADI) J Physiother. 2011;57:197. doi: 10.1016/s1836-9553(11)70045-5. - DOI - PubMed
    1. Cabitza F., Locoro A., Banfi G. Machine learning in orthopedics: a literature review. Front Bioeng Biotechnol. 2018;6:75. doi: 10.3389/fbioe.2018.00075. - DOI - PMC - PubMed
    1. Chawla N.V., Bowyer K.W., Hall L.O., Kegelmeyer W.P. SMOTE: synthetic minority over-sampling technique. J Artif Intell Res. 2002;16:321–357. doi: 10.48550/arXiv.1106.1813. - DOI
    1. Clement N.D., Muzammil A., Macdonald D., Howie C.R., Biant L.C. Socioeconomic status affects the early outcome of total hip replacement. J Bone Joint Surg Br. 2011;93:464–469. doi: 10.1302/0301-620X.93B4.25717. - DOI - PubMed