Layerwise-Relevance-Propagation
Layerwise-Relevance-Propagation copied to clipboard
Implementation of Layerwise Relevance Propagation for heatmapping "deep" layers
Layerwise-Relevance-Propagation
Implementation of Layerwise Relevance Propagation for heatmapping "deep" layers, using Tensorflow and Keras.
Results
MNIST
VGG
Instructions
MNIST
- Run
train.pyto train model. - Weights will be saved in
logs/. - Run
lrp.pyfor Layerwise Relevance Propagation.
NOTE: If using Tensorflow version < 1.5.0, you need to change
tf.nn.softmax_cross_entropy_with_logits_v2 to tf.nn.softmax_cross_entropy_with_logits.
VGG
- Feed a list of images to run Layerwise Relevance Propagation on all images.
- All results will be saved in
results/. - Run
lrp.py <image_1> <image_2> ... <image_n>.
Reference
- On Pixel-Wise Explanations for Non-Linear Classifier Decisions by Layer-Wise Relevance Propagation
- Explaining NonLinear Classification Decisions with Deep Taylor Decomposition
- Understanding Neural Networks with Layerwise Relevance Propagation and Deep Taylor Series
- A Quick Introduction to Deep Taylor Decomposition
- Tutorial: Implementing Layer-Wise Relevance Propagation