Abstract
Background
Trigger finger is a common disorder of the hand characterized by pain and locking of the digits during flexion or extension. In cases refractory to nonoperative management, surgical release of the A1 pulley can be performed. This study evaluates the ability of machine learning (ML) techniques to predict short-term complications following trigger digit release surgery.
Methods
A retrospective study was conducted using data for trigger digit release from the American College of Surgeons National Surgical Quality Improvement Program (ACS-NSQIP) years 2005–2020. Outcomes of interest were 30-day complications and 30-day return to the operating room. Three ML algorithms were evaluated — a Random Forest (RF), Elastic-Net Regression (ENet), and Extreme Gradient Boosted Tree (XGBoost), along with a deep learning Neural Network (NN). Feature importance analysis was performed in the highest performing model for each outcome to identify predictors with the greatest contributions.
Results
We included a total of 1209 cases of trigger digit release. The best algorithm for predicting wound complications was the RF, with an AUC of 0.64 ± 0.04. The XGBoost algorithm was best performing for medical complications (AUC: 0.70 ± 0.06) and reoperations (AUC: 0.60 ± 0.07). All three models had performance significantly above the AUC benchmark of 0.50 ± 0.00. On our feature importance analysis, age was distinctively the highest contributing predictor of wound complications.
Conclusions
Machine learning can be successfully used for risk stratification in surgical patients. Moving forwards, it is imperative for hand surgeons to continue evaluating applications of ML in the field.
Keywords: Machine learning, Deep learning, Trigger finger release
1. Introduction
Trigger finger is a common disorder of the hand characterized by pain and locking of the digits during flexion or extension.1 In cases refractory to nonoperative management, surgical release of the A1 pulley can be performed.2 Though infrequent, postoperative complications can prove to be challenging.3 In light of this, having the ability to potentially predict which patients face a greater risk for complications could prove useful in preoperative counseling.
Machine learning methods, which have been vastly underutilized in the field of hand surgery, present a powerful framework for analyzing and identifying this preoperative patient risk. These techniques can be used to create risk-stratification models, with the ultimate goal of using patient-specific data to inform postoperative expectations. By identifying at-risk patients earlier, surgeons may be able to make better recommendations for therapy, improve patient satisfaction, and reduce adverse outcomes.4
The objective of this study was to evaluate the ability of machine learning (ML) techniques to predict short-term complications following trigger finger release surgery. Risk stratification models developing using ML methods can improve preoperative patient selection and inform expectations.4,5
2. Methods
2.1. Patient population and outcomes
A retrospective study was conducted using data from the American College of Surgeons National Surgical Quality Improvement Program (ACS-NSQIP) years 2005–2020. Current Procedural Terminology (CPT) coding was used to identify all patients ≥18 years who underwent trigger finger release (code: 26055). A total of 31 predictor variables, encompassing patient demographic information, medical history, social history, intraoperative characteristics, and preoperative laboratory values were included in the models (Supplementary Table 1). Outcomes of interest were 30-day complications and 30-day return to the operating room. Cases missing data for any predictor variables or outcomes were excluded from the study.
2.2. Machine learning models construction and optimization
Three machine learning algorithms were evaluated for this study — a Random Forest (RF), Elastic-Net Regression (ENet), and Extreme Gradient Boosted Tree (XGBoost). These models were constructed and optimized using Python packages imbalance-learn, sci-kit-learn, hyper-opt, and xgboost. We chose these 3 algorithms due to their prevalence in the existing ML literature, their ability to implicitly rank features based on the importance of their contribution, and their ability to handle unbalanced data.6 Models were optimized using a 5-fold cross validation process with a Bayesian Search algorithm repeated over 25 iterations. Hyperparameters were optimized on a model-specific based, depending on the set that maximized average AUC values. Class imbalances in the Enet and XGBoost models were addressed using inverse class weighting based on frequencies. The RF model addresses class imbalance through implicit random undersampling for each bootstrapped tree.
The models were trained using 80 % of the data and tested on 20 % of the data. Model performance was evaluated using the Area Under the Receiver Operating Curve (AUC) statistic. To guarantee balanced class frequencies in the training and test subsets, we used a stratified splitting method.
2.3. Deep learning model construction and optimization
In addition to the three machine learning algorithms, we built a deep learning artificial neural network (NN). The model was built using the Keras and Tensorflow packages on Python. The NN had a total of 6 layers, with interspersed dropout layers (20 %) for regularization. We optimized the NN using a validation set consisting of a 10 % stratified split of the training dataset. Model weights were adjusted depending on the AUC performance of the validation set over 100 epochs. Early stopping was implemented to prevent overfitting by ending model training if the performance did not improve over 5 epochs. To address any class imbalances, inverse class weighting based on frequencies was utilized in this model.
2.4. Feature importance
A feature importance analysis was performed in the highest performing model for each outcome to identify predictors with the greatest contributions. Feature importance was measured using SHAP values.
2.5. Repetitions and randomness
To reduce the effect of randomness on our study findings, the modeling pipeline was repeated a total of 50 times. We utilized a series of 50 random seeds to ensure reproducibility of our model. Confidence intervals (95 %) were calculated for both AUC and feature importance estimates. Model performance was deemed significant if it outperformed the benchmark AUC of 0.50 ± 0.00.
3. Results
Our study included a total of 1209 cases of trigger digit release (Table 1). The average age of the patients included in the study was 59.7 years (SD: 12.6), and 819 (67.7 %) patients were female. The average body mass index (BMI) of patients within the study was 31.2 (SD: 7.4). Within this cohort, reoperations (1.32 %), wound complications (1.74 %), and medical complications (1.16 %) were rare.
Table 1.
Cohort demographics.
| Variable | N (% out of 1209); Mean (SD) |
|---|---|
| Sex | |
| Female | 819 (67.74 %) |
| Male | 390 (32.26 %) |
| Race | |
| American Indian or Alaska Native | 11 (0.91 %) |
| Asian | 30 (2.48 %) |
| Black | 133 (11 %) |
| Native Hawaiian or Pacific Islander | 6 (0.5 %) |
| White | 1029 (85.11 %) |
| Ethnicity | |
| Non-Hispanic/Latino | 1124 (92.97 %) |
| Hispanic | 85 (7.03 %) |
| Characteristics | |
| Age | 59.7 (12.56 %) |
| Smoker | 189 (15.63 %) |
| Diabetes | 284 (23.49 %) |
| Surgical Specialty | |
| General Surgery | 48 (3.97 %) |
| Gynecology | 4 (0.33 %) |
| Neurosurgery | 4 (0.33 %) |
| Orthopedics | 990 (81.89 %) |
| Plastics | 162 (13.4 %) |
| Vascular | 1 (0.08 %) |
| ASA Class | |
| 1 | 68 (5.62 %) |
| 2 | 608 (50.29 %) |
| 3 | 506 (41.85 %) |
| 4 | 27 (2.23 %) |
| Comorbidities | |
| Dyspnea | 44 (3.64 %) |
| Ascites | 1 (0.08 %) |
| History of Congestive Heart Failure | 5 (0.41 %) |
| Hypertension Requiring Medication | 621 (51.36 %) |
| Renal Failure | 3 (0.25 %) |
| History of COPD | 64 (5.29 %) |
| Past Wound Infection | 25 (2.07 %) |
| Steroid Use | 48 (3.97 %) |
| Major Preoperative Weight Loss | 1 (0.08 %) |
| Bleeding Disorders | 37 (3.06 %) |
| Transfusion of 1+ RBCs Prior to Surgery | 2 (0.17 %) |
| Ventilator Dependent | 1 (0.08 %) |
| Systemic Sepsis | 11 (0.91 %) |
| Disseminated Cancer | 4 (0.33 %) |
Cohort Demographics for different variables along with the number from each group with reported mean and standard deviation. Note: Percentages may not add to 100 % due to rounding.
As shown in Table 2, the best performing algorithm for predicting wound complications was the RF, with an AUC of 0.64 ± 0.04. The XGBoost algorithm performed best in predicting medical complications (AUC: 0.70 ± 0.06) and reoperations (AUC: 0.60 ± 0.07). All three models had performance significantly above the AUC benchmark of 0.50 ± 0.00.
Table 2.
Performance of machine learning models.
| Outcome | Elastic Net | Random Forest | XGBoost | Neural Network |
|---|---|---|---|---|
| 30-Day Wound Complications AUC (±95 % CI) | 0.55 ± 0.07 | 0.64 ± 0.04 | 0.61 ± 0.04 | 0.47 ± 0.07 |
| 30-Day Medical Complications AUC (±95 % CI) | 0.62 ± 0.08 | 0.70 ± 0.06 | 0.70 ± 0.05 | 0.53 ± 0.06 |
| 30-Day Reoperations AUC (±95 % CI) | 0.54 ± 0.07 | 0.51 ± 0.07 | 0.60 ± 0.07 | 0.42 ± 0.06 |
Abbreviations: AUC: Area Under Curve; CI: Confidence Interval.
Performance of Machine Learning Models with shown confidence intervals per model under calculated Area Under Curve.
On our feature importance analysis, we found that age was distinctively the highest contributing predictor of wound complications (Fig. 1). For the other two outcome models, the top ranked variables had similar weights. Within all three outcome models, age, female sex, and procedure duration were consistently ranked among the top five predictors. Diabetes was a top predictor of both reoperations and wound complications, while presence of ascites was highly correlated with medical complications.
Fig. 1.
The top 10 features by average importance for the highest performing model in each outcome.(a) XGBoost for reoperations, (b) Random Forest for wound complications, (c) XGBoost for medical complications.
4. Discussion
In our study, we successfully created several machine learning models capable of predicting medical complications, wound complications, and reoperations following trigger digit release surgery. In addition, we performed a feature importance analysis to identify the predictors with the highest contributions to our models. In wound complications, age was the highest weighted predictor of wound complications. Diabetes was highly ranked for reoperations and wound complications. Female sex and procedure duration were ranked among the top predictors in all outcomes.
To our knowledge, this study is the first to use ML techniques to predict short-term outcomes following trigger digit release. Our models reported significant AUC values for all outcomes when compared to the benchmark (0.70, 0.64, 0.60) of 0.50 ± 0.00; however, we believe these results are still insufficient for clinical application. To be robustly applied to clinical practice, these early results must be improved upon to ensure better sensitivity and specificity. Our model performance may have been affected by the low absolute counts of adverse outcomes in our data and relatively small sample size; however, by substantially outperforming the benchmark, this study suggests promise for ML techniques to be used for risk stratification. Given the differences between surgical techniques and expected outcomes, it is important to build risk prediction models tailored to specific procedures.
In our feature importance analysis, we identified several predictors with the greatest contributions to our models. In particular, we found that age was consistently ranked among the top variables and was the highest weighted for wound complications. Advanced age is not a contraindication to trigger digit release, and the procedure is highly effective for improving function; however, our study suggests that older age may be a risk factor for postoperative complications. Procedure duration and female sex were two other features that were ranked among the top predictors in all three outcomes. There are several reasons that procedure duration may be associated with adverse events. Prolonged operative time may be associated with adverse events due to factors such as greater tissue trauma, higher complexity of the case, prolonged microbial exposure, decreased effectiveness of antibiotic prophylaxis, potentially compromised tissue blood flow due to statis or thrombosis formation, and breaches in sterile technique.7, 8, 9, 10 Our finding that female sex was a predictor of adverse events has not previously been shown in the literature and does not have a clear explanation. Lastly, diabetes was highly correlated with both reoperations and wound complications.11,12 Diabetes has been shown to increase the risk of complications in patients undergoing trigger digit release, with reasons including delays in healing, increased infection risk, inadequate blood circulation, and poor postoperative glucose management.13,14
Our study has several notable limitations. Most importantly, our study only captured 30-day outcomes, missing any long-term complications of trigger digit release surgery. Since outcomes provided by ACS-NSQIP only fall under a 30-day postoperative period, there may have also been additional reoperations that were not captured in the data. Additionally, we were unable to capture outcomes such as functional status of the digit, range of motion, pain, and recovery time. The low frequency of adverse outcomes may limit the generalizability of our feature importance scores and results in AUC values that have high variation on repeat analysis. It is possible that some cases of trigger digit release were performed alongside larger surgeries, as our query looked for all instances of the procedure. With greater computational resources, it would have been possible to better optimize model performance through further rounds of hyperparameter tuning, varied core neural network architectures, and evaluation of the data with additional algorithms.
5. Conclusions
As applications of machine learning continue to transform our world, there is tremendous potential for improving the delivery of healthcare. In surgery, one prominent use of ML techniques is in transforming the preoperative risk assessment of surgical candidates.15 This is particularly relevant for patients undergoing elective procedures such as trigger digit release. With data-driven expectations of surgical outcomes, at-risk patients can be prepared for potential negative sequalae of surgery, improving postoperative care and satisfaction. While ML studies are being performed across medicine, there is a lag in the adoption of these techniques in hand surgery, relative to peer subspecialties.16,17 This study provides an example of successfully applying ML modeling to risk stratification in surgical patients.
Moving forwards, it is imperative for hand surgeons to continue evaluating applications of ML in the field. Future high-quality trials are needed to construct, validate, and implement risk stratification tools, ultimately improving the delivery of surgical care.
Funding/support
None.
Footnotes
Supplementary data to this article can be found online at https://doi.org/10.1016/j.jham.2024.100171.
Appendix A. Supplementary data
The following is the Supplementary data to this article:
References
- 1.Makkouk A.H., Oetgen M.E., Swigart C.R., Dodds S.D. Trigger finger: etiology, evaluation, and treatment. Curr Rev Musculoskelet Med. 2008;1(2):92–96. doi: 10.1007/s12178-007-9012-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Cebesoy O., Kose K.C., Baltaci E.T., Isik M. Percutaneous release of the trigger thumb: is it safe, cheap and effective? Int Orthop. 2007;31(3):345–347. doi: 10.1007/s00264-006-0180-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Park M.J., Oh I., Ha K.I. A1 pulley release of locked trigger digit by percutaneous technique. J Hand Surg Br. 2004;29(5):502–505. doi: 10.1016/j.jhsb.2004.03.015. [DOI] [PubMed] [Google Scholar]
- 4.Chuang B.I., Kuo L.C., Yang T.H., et al. A medical imaging analysis system for trigger finger using an adaptive texture-based active shape model (ATASM) in ultrasound images. PLoS One. 2017;12(10):187–192. doi: 10.1371/journal.pone.0187042. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Kuok C.P., Yang T.H., Tsai B.S., et al. Segmentation of finger tendon and synovial sheath in ultrasound image using deep convolutional neural network. Biomed Eng Online. 2020;19(1):24. doi: 10.1186/s12938-020-00768-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Garcia-Argibay M., Zhang-James Y., Cortese S., Lichtenstein P., Larsson H., Faraone S.V. Predicting childhood and adolescent attention-deficit/hyperactivity disorder onset: a nationwide deep learning approach. Mol Psychiatr. 2023;28(3):1232–1239. doi: 10.1038/s41380-022-01918-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Frykberg R.G., Banks J. Challenges in the treatment of chronic wounds. Adv Wound Care. 2015;4(9):560–582. doi: 10.1089/wound.2015.0635. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Guidry C.A., Shah P.M., Dietch Z.C., et al. Recent anti-microbial exposure is associated with more complications after elective surgery. Surg Infect. 2018;19(5):473–479. doi: 10.1089/sur.2018.031. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Cheng H., Clymer J.W., Po-Han Chen B., et al. Prolonged operative duration is associated with complications: a systematic review and meta-analysis. J Surg Res. 2018;229:134–144. doi: 10.1016/j.jss.2018.03.022. [DOI] [PubMed] [Google Scholar]
- 10.Mundi R., Nucci N., Wolfstadt J., Pincus D., Chaudhry H. Risk of complications with prolonged operative time in morbidly obese patients undergoing elective total knee arthroplasty. Arthroplasty. 2023;5(1):6. doi: 10.1186/s42836-022-00162-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Alfonso A.R., Kantar R.S., Ramly E.P., et al. Diabetes is associated with an increased risk of wound complications and readmission in patients with surgically managed pressure ulcers. Wound Repair Regen. 2019;27(3):249–256. doi: 10.1111/wrr.12694. [DOI] [PubMed] [Google Scholar]
- 12.Coady-Fariborzian L., McGreane A. Risk factors for postoperative complications in trigger finger release. Fed Pract. 2015;32(2):21–23. [PMC free article] [PubMed] [Google Scholar]
- 13.Federer A.E., Baumgartner R.E., Cunningham D.J., Mithani S.K. Increased rate of complications following trigger finger release in diabetic patients. Plast Reconstr Surg. 2020;146(4):420e–427e. doi: 10.1097/PRS.0000000000007156. [DOI] [PubMed] [Google Scholar]
- 14.Dasari N., Jiang A., Skochdopole A., et al. Updates in diabetic wound healing, inflammation, and scarring. Semin Plast Surg. 2021;35(3):153–158. doi: 10.1055/s-0041-1731460. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Chiew C.J., Liu N., Wong T.H., Sim Y.E., Abdullah H.R. Utilizing machine learning methods for preoperative prediction of postsurgical mortality and intensive care unit admission. Ann Surg. 2020;272(6):1133–1139. doi: 10.1097/SLA.0000000000003297. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Miller R., Farnebo S., Horwitz M.D. Insights and trends review: artificial intelligence in hand surgery. J Hand Surg Eur. 2023;48(5):396–403. doi: 10.1177/17531934231152592. [DOI] [PubMed] [Google Scholar]
- 17.Keller M., Guebeli A., Thieringer F., Honigmann P. Artificial intelligence in patient-specific hand surgery: a scoping review of literature. Int J Comput Assist Radiol Surg. 2023;18(8):1393–1403. doi: 10.1007/s11548-023-02831-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.

