The winning submission for NIPS 2017: Defense Against Adversarial Attack of team TSAIL
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8881ab7 Mar 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Attackset train Dec 18, 2017
Exps/sample Rename v3.py to model.py Mar 27, 2018
GD_train train Dec 18, 2017
PD_train train Dec 18, 2017
nips_deploy train Dec 18, 2017
toolkit Update run_attacks.sh Mar 27, 2018
utils train Dec 18, 2017
.gitignore train Dec 18, 2017
README.md Update README.md Mar 27, 2018
prepare_data.ipynb train Dec 18, 2017
sample_dev_dataset.csv train Dec 18, 2017

README.md

Guided-Denoise

The winning submission for NIPS 2017: Defense Against Adversarial Attack of team TSAIL

Paper

Defense against Adversarial Attacks Using High-Level Representation Guided Denoiser

File Description

  • prepare_data.ipynb: generate dataset

  • Originset, Originset_test: the folder for original image

  • toolkit: the program running the attack in batch

  • Attackset: the attacks

  • Advset: the adversarial images

  • checkpoints: the models checkpoint used, download here

  • Exps: the defense model

  • GD_train, PD_train: train the defense model using guided denoise or pixel denoise

How to use

the attacks are stored in folder Attackset the script is in the toolkit folder. in the run_attacks.sh file: modify models to the attacks you want to generate, separate by comma, or use "all" to include all attacks in Attackset. use the command to run:

bash run_attacks.sh $gpuids

where gpuids is the id of the gpus you want to use, they are number separated by comma. It will generate the training set. Then change the line DATASET_DIR="${parentdir}/Originset" to DATASET_DIR="${parentdir}/Originset_test", and run the command bash run_attacks.sh $gpuids again.

Then specify a model you want to use, the models are stored in Exp folder, there is a sample folder, it refers to a model named "sample", let's use it. Then go to GD_train if you want to use guided denoiser, run

python main --exp sample

The program will load Exp/sample/model.py as a model to train. and also you can specify other parameters defined in the GD_train/main.py