Skip to content
Code for my blog post titled "Explaining Away Attacks Against Neural Networks"
Jupyter Notebook Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
.gitignore
LICENSE
README.md
dict_class_to_idx.pkl
elephant.png
explain_away_attacks.ipynb
generate_integrated_gradients.py
map_clsloc.txt

README.md

Explaining Away Attacks Against Neural Networks

image

This notebook accompanies the blog post titled "Explaining Away Attacks Against Neural Networks" which can be found here.

The steps in the notebook are as follows:

  • Load a pre-trained InceptionV3 model from pytorch
  • Generate adversarial examples using an ImageNet image
  • Generate explanations for the model's prediction via SHAP
  • Compare SHAP value explanations between the original image and the adversarial image

The notebook uses Python 3.6 and relies on the following dependencies:

matplotlib==3.1.1
numpy==1.17.0
Pillow==6.1.0
scipy==1.3.0
shap==0.29.3
torch==1.1.0.post2
torchvision==0.3.0
You can’t perform that action at this time.