ShapleyExplanationNetworks icon indicating copy to clipboard operation
ShapleyExplanationNetworks copied to clipboard

Training and layers specifications

Open Ahmed-Radwan094 opened this issue 2 years ago • 3 comments

Dear all, Thank you very much for the well documented implementation. I have a couple of questions: 1- Is there a training script available to investigate the training loop of such networks? 2- Does the training require any special setting or is it optimizer for weights optimization based on loss function? 3- Is there any limitation on the used layers, I plan to build my own network with LSTM and embedding layers to process one hot encoded variables? Best regards,

Ahmed-Radwan094 avatar Aug 31 '22 14:08 Ahmed-Radwan094

Hi!

Thanks for your interests!

  1. The training of this model has nothing different compared to those of other models, you could just replace the model from any other usual training scripts.
  2. No, as I said above, this model can be treated as usual PyTorch models.
  3. As for the limitation of the layers, I believe you just need to make sure that for each output, there is a Shapley module wrapped around it. That being said, I'm not really sure how I would approach the problem of applying Shapley modules onto LSTMs.

Best, Rui

RuiWang1998 avatar Aug 31 '22 16:08 RuiWang1998

@RuiWang1998 Thank you very much for the fast reply. The reply clarifies a lot.

Ahmed-Radwan094 avatar Sep 01 '22 11:09 Ahmed-Radwan094

Dear all, Once again thank you for the code and your support. I had a couple of additional questions:

1- If I am only interested in the Shapley values between network inputs and final output, can I just use nn.Sequential with all my network layers defined inside it and wrap this sequential module inside a Shapley module

2- Can I use unexplained forward during the network training phase to reduce the computation error and use explained forward only in inference time?

3- When should I set the reference values to something else than a tensor of zeros? In the paper within the deepShapNet section, it is written that this depends on the application. Can expand on this note?

Just for context, I am using an autoencoder architecture for anomaly detection over a set of features. I am trying to use your implementation for finding the degree to which each feature contributes to anomaly detection.

I am really sorry for bothering you with all these questions and appreciate your help.

Best regards, Ahmed Radwan

Ahmed-Radwan094 avatar Sep 03 '22 10:09 Ahmed-Radwan094

Hi,

  1. You could do that but Shapley value computation is extremely hard if not decomposed into several feature subgroups.
  2. It does not seem to be possible, at least not off the top of my head.
  3. I suppose it depends on your use case? You could set them to the most sensible reference values for you problem.

RuiWang1998 avatar Nov 08 '22 02:11 RuiWang1998