PyTorch implementation of MagNet: a Two-Pronged Defense against Adversarial Examples
Paper: https://arxiv.org/pdf/1705.09064.pdf
-
Attack Models: Trained classifier models for the datasets MNIST, Fashion-MNIST & CIFAR-10 are availabe in the
modelsdirectory. If you want to train your own classifier define them inclassifiers.pyand train them usingtrain_classifier.py -
Defensive Models: Trained autoencoder models for the datasets MNIST, Fashion-MNIST & CIFAR-10 are availabe in the
modelsdirectory. If you want to train your own autoencoder define them indefensive_models.pyand train them usingtrain_defensive_model.py -
Adversarial Examples:
generate_adversarial_examples.pywill generated the adversarial images using common adversarial attacks using Foolbox. -
Evaluation: Performance of a defensive model against various attacks can be evalauted using
evaluate_defensive_model.py. Check the summary csv files for each dataset inside theresults'directory