Git Product home page Git Product logo

fab-attack's Introduction

FAB: a Fast Adaptive Boundary Attack

This is the code relative to the method introduced in

Minimally distorted Adversarial Examples with a Fast Adaptive Boundary Attack
Francesco Croce, Matthias Hein
University of Tübingen
https://arxiv.org/pdf/1907.02044.pdf

We propose a new white-box adversarial attack against neural networks-based classifiers. FAB-attack aims at changing the classification of a clean input applying a perturbation with minimal Lp-norm, for p in {1, 2, inf}. It achieves quickly good quality results, does not need the specification of a step size and tries to track the desicion boundary.

News

  • The paper is accepted at ICML 2020!
  • FAB attack is included in AutoAttack, a new parameter-free protocol to evaluate adversarial robustness!
  • An optimized PyTorch implementation of FAB attack is now available here in Advertorch!

Running the attack

We provide here, in the folder models, classifiers on MNIST and CIFAR-10, trained with either natural training (plain), adversarial training wrt the L2-norm (l2-at) or wrt the Linf-norm (linf-at). In the folder datasets, available at the same link, we provide also the datasets in the format consistent with the scripts.

With

python test_attack.py --dataset mnist --model plain --bs 1000 --im 1000 --p linf --n_iter 100 --n_restarts 3 --eps 0.3

one would run FAB-attack on the plain model on MNIST wrt the Linf-norm (that is the attack aims at minimizing the Linf-norm of the adversarial perturbations), using 100 iterations and 3 restarts (eps defines the region where to sample the random starting points). It returns adversarial examples for the first 1000 images of the test set. More informations about the parameters are available in test_attack.py.

The FAB-attack is implemented in FAB_linf.py, FAB_l2.py and FAB_l1.py. In order to run the attack on other classifiers, it is sufficient to define a model as in utils.Model. Then, e.g., FABattack_linf(model, x_input, y_input, sess, hps) performs the Linf attack on the model.

Results

FAB-attack achieves top results in the two challenges at https://github.com/yaodongyu/TRADES and the one at https://github.com/MadryLab/cifar10_challenge.

Citations

@inproceedings{croce2020minimally,
  author    = {F. Croce and M. Hein},
  title     = {Minimally distorted Adversarial Examples with a Fast Adaptive Boundary Attack},
  booktitle = {ICML},
  year      = {2020}
}

fab-attack's People

Contributors

fra31 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.