Fig. 4: Model interpretability using SHAP.

a SHAP beeswarm plot illustrates the impact of each variable, where each dot represents a sample with the variable’s influence coded by color. b SHAP summary bar plot displays variable importance with mean SHAP values on the x-axis, indicating the predictive power of each variable. SHAP force plots with imaging and case details for two individual patients, one with XGC and one with GBC: c A 62-year-old male with no additional symptoms. Imaging findings included hypoechoic ultrasound, gallbladder stones, no biliary duct dilation, regular gallbladder morphology, presence of intramural nodules, absence of intraluminal tumor, continuous mucosal line, no enlarged peri-tumoral lymph nodes, a fibrinogen level of 5.27 g/L, and indirect bilirubin at 16.4 µmol/L. LIDGAX predicted XGC, confirmed by post-cholecystectomy pathology. The white arrow highlights the thickened gallbladder wall. d A 51-year-old female with no additional symptoms. Imaging showed hypoechoic ultrasound, gallbladder stones, no biliary duct dilation, irregular gallbladder morphology, absence of intramural nodules, presence of an intraluminal tumor, a discontinuous mucosal line, no enlarged peri-tumoral lymph nodes, fibrinogen at 2.34 g/L, and indirect bilirubin at 4.6 µmol/L. LIDGAX classified this case as GBC, also confirmed by pathology. SHAP SHapley Additive exPlanations, XGC Xanthogranulomatous cholecystitis, GBC gallbladder cancer, US ultrasound, CT computerized tomography, MRI magnetic resonance imaging, LIDGAX LightGBM Intelligent Differentiator for XGC and GBC, T2WI T2-weighted imaging, DWI diffusion-weighted imaging.