Queries on implementing DeepLIFT

148 views
Skip to first unread message

sambuddh...@gmail.com

unread,
Jun 9, 2017, 3:46:02 PM6/9/17
to DeepLIFT Users
I have been looking into the DeepLIFT code from the available git repository and the paper associated with it and have a few questions:

1. I looked into the provided README.md file and am curious to know what you mean when you say that it "converts" an existing model (which is a keras Sequential in my case) to a deeplift one.

2. Providing the reference image. How is this reference image being chosen (taking an mean/sd of all the training data/adding Gaussian or S&P noise) and how to feed that image into the code (as a system argument or any other method)

3. As it says, the Sequential model is "converted" to a deeplift one; does that mean that this new model can be used for retraining and saving new weights/activations. I am looking to do exactly that. I am guessing that's the end goal so as to bypass the gradient saturation issue.

Thanks & Regards.

thomas.c...@gmail.com

unread,
May 14, 2018, 4:49:36 AM5/14/18
to DeepLIFT Users
I don t belongs to the DeepLift team but it seems that "converts" mean that each layer is going to be wrapped into the Block class which implement the DeepLift function needed to calculate multiplicators, etc and return the score at each node in the model. I have done something similar in a previous project.

About the reference image, it could be anything you want to make a comparison to. I think for images, the mean should be a good metric, especially if objects are centered.

Avanti Shrikumar

unread,
May 15, 2018, 6:28:40 AM5/15/18
to thomas.c...@gmail.com, DeepLIFT Users
Hi Thomas/Sambuddha,

Sorry I missed this thread earlier! Thanks for the response, Thomas, it's mostly accurate; "convert" indeed means that the layers will be reconstructed using DeepLIFT's python classes which have the functionality to compute the multipliers.

Regarding how to feed the reference image into the code: just as you supply input_data_list as an argument to the scoring function, you can also supply input_references_list. It would have the same dimensions as input_data_list, but would contain reference images for each input.

The choice of reference depends on the question you wish to ask of the data. Generally speaking, the reference should retain the properties you don't care about and scramble the properties you do care about. In the supplement of the DeepLIFT paper, Appendix L looks at the results on a CIFAR10 model with two different choices of the reference. I'm including a screenshot of the figure below:

You'll notice that when a blurred version of the input is used as a reference, the outlines of objects stand out. When a black reference is used, the results are more confusing, possibly because the net is also highlighting color. One thing to consider is using multiple different references to interpret a single image and averaging the results over all the different references. We use this approach in genomics; we generate a collection of references per input sequence by shuffling the sequence.

Hope this helps.
- Av


--
You received this message because you are subscribed to the Google Groups "DeepLIFT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deeplift+unsubscribe@googlegroups.com.
To post to this group, send email to deep...@googlegroups.com.
Visit this group at https://groups.google.com/group/deeplift.
To view this discussion on the web visit https://groups.google.com/d/msgid/deeplift/5f56b351-785f-400f-ae17-dc79596cce57%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages