/WeightedSHAP

WeightedSHAP: analyzing and improving Shapley based feature attributions (NeurIPS 2022)

Primary LanguageJupyter Notebook

WeightedSHAP: analyzing and improving Shapley based feature attributions

This repository provides an implementation of the paper WeightedSHAP: analyzing and improving Shapley based feature attributions accepted at NeurIPS 2022. We show the suboptimality of SHAP and propose a new feature attribution method called WeightedSHAP. WeightedSHAP is a generalization of SHAP and is more effective to capture influential features.

Quick start

We provide an easy-to-follow Jupyter notebook, which introduces how to compute the WeightedSHAP on the Fraud dataset.

Key results

→ Illustrations of the suboptimality of Shapley-based feature attributions (SHAP) when $d=2$. Shapley value fails to assign large attributions to more influential features on grey area.

→ Illustrations of the prediction recovery error curve and the Inclusion AUC curve as a function of the number of features added. WeightedSHAP effectively assigns larger values for more influential features and recovers the original prediction $\hat{f}(x)$ significantly faster than other state-of-the-art methods.

WeightedSHAP can identify more interpretable features. In particular, SHAP fails to capture the last stroke of digit nine, which is a crucially important stroke to differentiate from the digit zero.

References

This repository highly depends on the following two repositories.

  • Covert, I., Lundberg, S. M., & Lee, S. I. (2021). Explaining by Removing: A Unified Framework for Model Explanation. J. Mach. Learn. Res., 22, 209-1. [GitHub]

  • Jethani, N., Sudarshan, M., Covert, I. C., Lee, S. I., & Ranganath, R. (2021, September). FastSHAP: Real-Time Shapley Value Estimation. In International Conference on Learning Representations. [GitHub]

Authors

  • Yongchan Kwon (yk3012 (at) columbia (dot) edu)

  • James Zou (jamesz (at) stanford (dot) edu)