albermax / innvestigate

A toolbox to iNNvestigate neural networks' predictions!
Other
1.25k stars 234 forks source link

Add composite LRP example #261

Open adrhill opened 3 years ago

adrhill commented 3 years ago

An example on how to use composite LRP is missing from the docs and frequently requested.

Closes #252 Addresses #162, #190, #249, #255


This PR adds a Jupyter notebook explaining how to use the keyword arguments of the LRP analyzer class. I'm opening this as a draft PR as we should

The references I would add are

Maybe @sebastian-lapuschkin you can help me out here?

adrhill commented 3 years ago

Here's a screenshot of the example in the notebook for quick reference:

image
codecov-commenter commented 3 years ago

Codecov Report

Merging #261 (d5bbee1) into master (c6ce893) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #261   +/-   ##
=======================================
  Coverage   71.36%   71.36%           
=======================================
  Files          41       41           
  Lines        4173     4173           
  Branches      637      637           
=======================================
  Hits         2978     2978           
  Misses       1007     1007           
  Partials      188      188           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c6ce893...d5bbee1. Read the comment docs.

sebastian-lapuschkin commented 3 years ago

another reference to add would be

Kohlbrenner et al.: Towards Best Practice in Explaining Neural Network Decisions with LRP

which properly introduces the composite LRP pretty much at the same time as Montavon et al (preprints existed a bit earlier) and evaluates the composite approach against other methods and approaches.

is there anything else I can help with?

adrhill commented 3 years ago

is there anything else I can help with?

Is there anything you would change about the example in the screenshot?

sebastian-lapuschkin commented 3 years ago

maybe add some line(s) actually using this custom built analyzer, and some example heatmaps of this composite rule with non-composite counter parts for comparison?

a hint at the existing LRP presets (if they will be carried over to version 2.0) would also be interesting to the users I guess.

adrhill commented 3 years ago

A usage example is already in the notebook. I will add a comparison with the existing presets.

Thanks!