Skip to content

averyma/adversarial-spheres

Repository files navigation

Adversarial spheres

Pytorch implementation Adversarial Spheres.

Requiresments

python 3.6.0
pytorch 1.4.0
numpy 1.15.0
tensorflow 2.1.0
tqdm

How to run

  • regular training:
$ python main.py --method clean
  • train with the exact maximizer of the inner-max optimization (truemax)
$ python main.py --method truemax
  • adversarial training with PGD attacks
$ python main.py --method adv --pgd_alpha 0.01 --pgd_itr 100

Standard training

Training with trueax

Adversarial training with PGD examples (eps = 0.01, itr = 100)

Some minor typos in paper

Here I notice a few typos in the original paper. They are very minor and will not affect the overal understanding of the paper, but they do matter for reproducibility.

  • In Equation 3, Analytic error rate on the inner sphere should be:

  • Right above Equation 3, the variance is missing a square sign:

  • The Gaussian distribution in the caption of Figure F5 should be:

Discussions

Number of iterations required for a perfect classifier

Others

Please cite the following paper for Adversarial spheres:

@inproceedings{46623,
title	= {Adversarial Spheres},
author	= {Justin Gilmer and Luke Metz and Fartash Faghri and Sam Schoenholz and Maithra Raghu and Martin Wattenberg and Ian Goodfellow},
year	= {2018},
URL	= {https://arxiv.org/pdf/1801.02774.pdf}
}

Contact

If you have any questions or suggestions, please feel free to contact me via ama at cs dot toronto dot edu!

About

Pytorch implementation of Adversarial Spheres.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors