Tsuyoshi Ide (井手 剛), tide@us.ibm.com, IBM Thomas J. Watson Research Center.
August 3, 2023 (beta release)
This repository provides a reference implementation of GPA (generative perturbation analysis) by the authors, based on a paper presented at KDD 2023:
Tsuyoshi Idé, Naoki Abe, ``Generative Perturbation Analysis for Probabilistic Black-Box Anomaly Attribution,'' Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 2023, August 6-10, 2023, Long Beach, California, USA), pp.845-856 (paper, slides, poster).
@inproceedings{Ide23KDD, title={Generative Perturbation Analysis for Probabilistic Black-Box Anomaly Attribution}, author={Tsuyoshi Id'{e} and Naoki Abe}, booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 23)}, pages={845--856}, year={2023} }
As the title of the paper suggests, GPA is for probabilistic anomaly attribution. The demo notebook provides a readable introduction to the algorithm and an endo-to-end demo using a publicly available dataset. Use gpa_map(X, y, model)
for the expected attribution score and gpa_dist(delta_MAP,X,y,model)
for its distribution.
In addition to the proposed GPA algorithm, I have implemented most of the existing black- or white-box (non-probabilistic) attribution methods for comparison purposes:
-
lib.gpa_map_gaussian()
: Likelihood compensation (LC) [Ide et al. AAAI 21] -
util.LIME_deviation()
: LIME [Ribeiro et al. KDD 16] -
util.IG_vec()
: Integrated gradient (IG) [Sundararajan et al. ICML 20] -
util.EIG_vec()
: Expected integrated gradient (EIG) [Deng et al. AAAI 21] -
util.SV()
: Shapley values (SV) [Strumbelj & Kononenko KAIS 14] - Z-score:
$Z_i = (x_i^t - m_i)/\sigma_i$