shap icon indicating copy to clipboard operation
shap copied to clipboard

Problems about using Shap to explain deep adaptation network or GCN model

Open liaoherui opened this issue 1 year ago • 3 comments

Hi, thanks for your wonderful tool and it is really helpful to my research!

However, when I plan to extend this method to my own deep adaptation network (DAN) or GCN model, the program always return errors. I have tried DeepExplainer, GradientExplainer, and KernelExplainer, while none of them works well.

The given explainer examples always take the model and one training feature matrix as input. Then, the explainer will take the testing feature matrix as input to explain the model. But this does not fit the case for DAN and GCN model, which both take multiple feature matrices or the feature matrix and adjacency matrix as input (see codes below). Thus, I wonder whether there is a way to extend Shap to these advanced and popular models. Thanks a lot for your answering in advance!

DAN model: src_pred,mmd_loss=model(src_data,tgt_data) # src_data refers to training data, and tgt_data refers to testing data

GCN model: output=model(features,adj)

liaoherui avatar Feb 20 '23 07:02 liaoherui