Comparative Explainable AI for Breast Cancer Classification: Cross-Model SHAP Agreement Analysis Using XGBoost and Logistic Regression

Khalid Alalawi · Applied Sciences · 2026

Breast cancer remains one of the most frequently diagnosed cancers worldwide, and improving the accuracy and transparency of automated diagnostic tools is an ongoing clinical priority. This study examines whether three established machine-learning classifiers achieve comparable performance on a standard breast cancer benchmark and whether their SHAP-based feature explanations converge on the same predictive signals across model architectures. Logistic Regression (LR), Support Vector Machines (SVM), and XGBoost were trained and tested on the Wisconsin Diagnostic Breast Cancer (WDBC) dataset using a shared preprocessing pipeline to ensure fair comparison. Hyperparameters were selected through grid search with 5-fold stratified cross-validation, and model performance was estimated using 10-fold stratified cross-validation. Paired t-tests and Wilcoxon signed-rank tests were used to determine whether performance differences between models were statistically meaningful. Shapley Additive explanations (SHAP) values were computed separately for XGBoost using TreeExplainer and for Logistic Regression using LinearExplainer, and Spearman’s rank correlation was used to quantify the agreement between the two models’ feature importance rankings. All three classifiers achieved Receiver Operating Characteristic–Area Under the Curve (ROC-AUCs) above 0.994, with SVM achieving the highest accuracy (0.9737) and F1-score (0.9630). No statistically significant difference was found between any model pair (p > 0.05). The cross-model SHAP analysis yielded a Spearman correlation of r = 0.578 (p = 0.0008), with seven of the ten most important features ranked consistently across both architectures. The agreement between two structurally different models on which features matter most provides evidence that these features carry a consistent predictive signal that goes beyond what any single model’s architecture alone would produce. Cross-model explainability analysis of this kind offers a stronger basis for feature interpretation than the output of any single model.

Read the paper · More papers on PaperTik