Surgically Oriented Ultrasound-Based AI of Median Nerve Morphology as a Decision Support for Carpal Tunnel Release: A Calibrated ConvNeXt-CBAM Framework With Supervised Contrastive Warm-Up.
Authors
Affiliations (2)
Affiliations (2)
- Department of Hand Microsurgery and Plastic Reconstructive Surgery, The Sixth Hospital of Ningbo, 315010 Ningbo, Zhejiang, China.
- Department of Special Examinations, The Sixth Hospital of Ningbo, 315010 Ningbo, Zhejiang, China.
Abstract
Carpal tunnel syndrome (CTS) is a compressive neuropathy commonly encountered in hand surgery, and decisions regarding whether operative decompression should be conducted rely on accuracy and clinical interpretability of imaging findings. Ultrasound is commonly used to directly visualize the median nerve in this condition, but remains operator-dependent and is limited by inconsistent diagnostic thresholds. This study aimed to develop a surgically oriented ultrasound-based artificial intelligence (AI) model that provides strong discriminative power, reliable probability calibration for preoperative counseling, and anatomy-aware explainability aligned with the nerve targeted in carpal tunnel release. In this retrospective study, adults with suspected CTS, who had ultrasound image of adequate quality and met criteria for the clinical standard, were included; cases with prior carpal tunnel surgery or non-diagnostic images were excluded. We analyzed 2900 wrist ultrasound examinations, reserving an a priori 20% test set (n = 580 images) at the patient level. DenseNet-121 was utilized as the reference baseline. The proposed model used ConvNeXt-T augmented with Convolutional Block Attention Modules (CBAM), optimized with a supervised contrastive warm-up before standard fine-tuning; probabilities were post-hoc calibrated by temperature scaling. Images underwent de-identification, normalization, and ultrasound-appropriate augmentation. Primary outcome was discrimination (receiver operating characteristic (ROC), area under the curve (AUC), average precision (AP)) with bootstrap bands; secondary outcomes included accuracy, precision, recall, F1 score (harmonic mean of precision and recall), confusion matrices, probability distributions, class-conditional score separation, and Grad-CAM++ agreement with expert-defined regions of interest. Test set labels used a fixed 0.5 threshold. The proposed model outperformed the baseline in terms of discrimination (AUC 0.904 vs 0.821; AP 0.907 vs 0.831). Aggregate metrics also favored the proposed approach (accuracy 0.91 vs 0.83; precision 0.89 vs 0.81; recall 0.88 vs 0.82; F1 score 0.88 vs 0.81). Confusion matrices showed concurrent reductions in false positives (58→33, -43%) and false negatives (52→35, -33%): baseline true-negatives (TN)/false-positives (FP)/false-negatives (FN)/true-positives (TP) = 232/58/52/238; proposed TN/FP/FN/TP = 257/33/35/255. Predicted-probability histograms and class-conditional densities indicated more confident, better-separated outputs with calibration. Grad-CAM++ overlays were more compact and nerve-concordant relative to expert contours, supporting anatomy-aligned interpretability for surgical planning. A calibrated, explainable ConvNeXt-CBAM ultrasound classifier delivers reliable probabilities and anatomically faithful saliency that are directly actionable for surgical triage, timing of decompression, and preoperative counseling in CTS. These findings support ultrasound-based AI as a practical adjunct to clinical assessment and nerve conduction studies in hand surgery, warranting prospective, multicenter validation and workflow integration.