Value of Endoscopic Ultrasonography for Distinguishing Malignant from Benign Non-pancreatic Periampullary Lesions: An Explainable Machine Learning Study

Dig Dis Sci. 2026 Jan 9. doi: 10.1007/s10620-025-09646-z. Online ahead of print.

Abstract

Background: Early discrimination of non-pancreatic periampullary lesions (NPLs) is challenging owing to their complex anatomy and the absence of representative clinical symptoms.

Purpose: To establish an interpretable machine learning (ML) model that integrates clinical variables and endoscopic ultrasonography (EUS) features to diagnose NPLs.

Methods: A total of 158 patients, suspected of having NPLs and who underwent EUS, were enrolled and randomly allocated into a training cohort (TC, n = 110) and a validation cohort (VC, n = 48). Risk clinical and EUS features were identified by multivariate logistic regression analysis and subsequently input into five ML classifiers to develop predictive models. The performance of ML models was assessed using the area under the curve (AUC), calibration curve, and decision curve analysis (DCA). The Shapley Additive Explanations (SHAP) approach was employed to interpret the result of the optimal ML model.

Results: Among the five ML models developed, the ExtraTrees model achieved the highest AUC values of 0.94 (95% confidence interval (CI): 0.89-0.99) and 0.94 (95% CI: 0.82-1.00) in TC and VC, respectively. This performance was followed by the extreme gradient boosting model (AUC = 0.94/0.93), the light gradient boosting machine (AUC = 0.92/0.91), the support vector machine (AUC = 0.91/0.94), and the logistic regression model (AUC = 0.86/0.87). The calibration curve and DCA graphically suggested good agreement and superior clinical benefits for the ExtraTrees model. SHAP analysis identified abdominal discomfort, lesion diameter, irregular shape, surface ulceration, and nonsmooth margin as the most influential features in the model's decision-making process.

Conclusions: Our developed ML model exhibited superior capability and higher clinical benefit in distinguishing malignant from benign NPLs, particularly the ExtraTrees model. Furthermore, the SHAP analysis provided insightful interpretation of the ExtraTrees model for individualized and transparent prediction of NPLs.

Keywords: Diagnostic performance; Endoscopic ultrasonography; Machine learning; Periampullary lesions; Shapley additive explanations.