All Projects → sebastian-lapuschkin → Lrp_toolbox

sebastian-lapuschkin / Lrp_toolbox

Licence: other
The LRP Toolbox provides simple and accessible stand-alone implementations of LRP for artificial neural networks supporting Matlab and Python. The Toolbox realizes LRP functionality for the Caffe Deep Learning Framework as an extension of Caffe source code published in 10/2015.

Projects that are alternatives of or similar to Lrp toolbox

Lfortran
Official mirror of https://gitlab.com/lfortran/lfortran. Please submit pull requests (PR) there. Any PR sent here will be closed automatically.
Stars: ✭ 220 (-2.22%)
Mutual labels:  jupyter-notebook
Sdc Vehicle Detection
Udacity Project - Vehicle Detection
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Zoom Learn Zoom
computational zoom from raw sensor data
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Machine Learning Notebooks
Machine Learning notebooks for refreshing concepts.
Stars: ✭ 222 (-1.33%)
Mutual labels:  jupyter-notebook
Notebook
my note
Stars: ✭ 221 (-1.78%)
Mutual labels:  jupyter-notebook
Tutorial
Tutorial covering Open Source tools for Source Separation.
Stars: ✭ 223 (-0.89%)
Mutual labels:  jupyter-notebook
Covid 19
Ciência de Dados aplicada à pandemia do novo coronavírus.
Stars: ✭ 223 (-0.89%)
Mutual labels:  jupyter-notebook
Datascienceprojects
The code repository for projects and tutorials in R and Python that covers a variety of topics in data visualization, statistics sports analytics and general application of probability theory.
Stars: ✭ 223 (-0.89%)
Mutual labels:  jupyter-notebook
Lstms for predictive maintenance
LSTMS for Predictive Maintenance
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Deeplearning cv notes
📓 deepleaning and cv notes.
Stars: ✭ 223 (-0.89%)
Mutual labels:  jupyter-notebook
Skylift
Wi-Fi Geolocation Spoofing with the ESP8266
Stars: ✭ 223 (-0.89%)
Mutual labels:  jupyter-notebook
Sohu competition
Sohu's 2018 content recognition competition 1st solution(搜狐内容识别大赛第一名解决方案)
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Rethinking Numpyro
Statistical Rethinking (2nd ed.) with NumPyro
Stars: ✭ 225 (+0%)
Mutual labels:  jupyter-notebook
Video to bvh
Convert human motion from video to .bvh
Stars: ✭ 222 (-1.33%)
Mutual labels:  jupyter-notebook
Attention network with keras
An example attention network with simple dataset.
Stars: ✭ 225 (+0%)
Mutual labels:  jupyter-notebook
Ai Platform Samples
Official Repo for Google Cloud AI Platform
Stars: ✭ 222 (-1.33%)
Mutual labels:  jupyter-notebook
Machinelearningwithpython
Starter files for Pluralsight course: Understanding Machine Learning with Python
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Ml From Scratch
机器学习算法 基于西瓜书以及《统计学习方法》,当然包括DL。
Stars: ✭ 225 (+0%)
Mutual labels:  jupyter-notebook
Lstm Crf Medical
构建医疗实体识别的模型,包含词典和语料标注,基于python构建
Stars: ✭ 224 (-0.44%)
Mutual labels:  jupyter-notebook
Gan steerability
On the "steerability" of generative adversarial networks
Stars: ✭ 225 (+0%)
Mutual labels:  jupyter-notebook

The LRP Toolbox for Artificial Neural Networks (1.3.1)

The Layer-wise Relevance Propagation (LRP) algorithm explains a classifer's prediction specific to a given data point by attributing relevance scores to important components of the input by using the topology of the learned model itself.

The LRP Toolbox provides simple and accessible stand-alone implementations of LRP for artificial neural networks supporting Matlab and python. The Toolbox realizes LRP functionality for the Caffe Deep Learning Framework as an extension of Caffe source code published in 10/2015.

The implementations for Matlab and python are intended as a sandbox or playground to familiarize the user to the LRP algorithm and thus are implemented with readability and transparency in mind. Models and data can be imported and exported using raw text formats, Matlab's .mat files and the .npy format for python/numpy/cupy.

See the LRP Toolbox in Action

To try out either the python-based MNIST demo, or the Caffe based ImageNet demo in your browser, click on the respective panels:

MNIST Images Text
A simple LRP demo based on neural networks that predict handwritten digits and were trained using the MNIST data set. A more complex LRP demo based on a neural network implemented using Caffe. The neural network predicts the contents of the picture. An LRP demo that explains classification on natural language. The neural network predicts the type of document.

Obtaining the LRP Toolbox

Clone or download it from github!

Installing the Toolbox

After having obtained the toolbox code, data and models of choice, simply move into the subpackage folder of you choice -- matlab, python or caffe-master-lrp -- and execute the installation script (written for Ubuntu 14.04 or newer).

<obtain the toolbox>
cd lrp_toolbox/$yourChoice
bash install.sh

Make sure to at least skim through the installation scripts! For more details and instructions please refer to the manual.

Attention Caffe-Users

We highly recommend building LRP for Caffe via the singularity image definition (You might regret doing something else outside of Ubuntu 14.04 LTS or Ubuntu 16.04 LTS...). In this case, we also recommend to only download the content of the singularity folder. Call

cd <toolbox_location>/singularity
singularity build --fakeroot --force caffe-lrp-cpu-u16.04.sif caffe-lrp-cpu-u16.04.def

and the go have a coffee. The resulting caffe-lrp-cpu-u16.04.sif is an (executable) Singularity image which allows you to process LRP (and other methods) for Caffe Models with

[singularity run] ./caffe-lrp-cpu-u16.04.sif -c CONFIGPATH -f FILELISTPATH -p OUTPUTPATH

Have a look at the manual for details.

The LRP Toolbox Paper

When using (any part) of this toolbox, please cite our paper

@article{JMLR:v17:15-618,
    author  = {Sebastian Lapuschkin and Alexander Binder and Gr{{\'e}}goire Montavon and Klaus-Robert M{{{\"u}}}ller and Wojciech Samek},
    title   = {The LRP Toolbox for Artificial Neural Networks},
    journal = {Journal of Machine Learning Research},
    year    = {2016},
    volume  = {17},
    number  = {114},
    pages   = {1-5},
    url     = {http://jmlr.org/papers/v17/15-618.html}
}

Misc & Related

For further research and projects involving LRP, visit heatmapping.org

Also, consider paying https://github.com/albermax/innvestigate a visit! Next to LRP, iNNvestigate efficiently implements a hand full of additional DNN analysis methods and can boast with a >500-fold increase in computation speed when compared with our CPU-bound Caffe implementation!

Updates and Version History

New in 1.3.1:

Caffe implementation

  • a slightly updated singularity image .def-file
  • formula 11 now implements the vanilla backprop gradient
  • formula 99 is now the only variant implementing Sensitivity Analysis

New in 1.3.0:

Standalone Python implementation:

  • update to python 3
  • updated treatment of softmax and target class
  • lrp_aware option for efficient calculation of multiple backward passes (at the cost of a more expensive forward pass)
  • custom colormaps in render.py
  • gpu support when cupy is installed. this is an optional feature. without the cupy package, the python code will execute using the cpu/numpy.

Caffe implementation

  • updated the installation config
  • new recommended formula types 100, 102, 104
  • support for Guided Backprop via formula type 166
  • new python wrapper to use lrp in pycaffe
  • pycaffe demo file
  • bugfixes
  • singularity image definition for building a hassle-free OS-agnostic command line executable

New in 1.2.0

The standalone implementations for python and Matlab:

  • Convnets with Sum- and Maxpooling are now supported, including demo code.
  • LRP-parameters can now be set for each layer individually
  • w² and flat weight decomposition implemented.

Caffe:

  • Minimal output versions implemented.
  • Matthew Zeiler et al.'s Deconvolution, Karen Simonyan et al.'s Sensitivity Maps, and aspects of Grégoire Montavon et al.'s Deep Taylor Decomposition are implemented, alongside the flat weight decomposition for uniformly projecting relevance scores to a neuron's receptive field have been implemented.

Also:

  • Various optimizations, refactoring, bits and pieces here and there.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].