Code Monkey home page Code Monkey logo

blackbox_starting_points's Introduction

Copy and Paste: A Simple But Effective Initialization Method for Black-Box Adversarial Attacks

Starting points

This is the exact implementation as used for Run #3 in the paper. Find it on arXiv: https://arxiv.org/abs/1906.06086

Usage:

  1. Download checkpoints for both models (see instructions in models/*/checkpoints/README.md)

  2. Specify imagenet_base_path in precalc_saliency_maps.py and run_imagenet_bench.py.

  3. Precalculate saliency maps for the entire ImageNet validation set.

    python3 precalc_saliency_maps.py

    We found this to take ~48 hours on a Geforce 1070. The script saves each image individually and resumes where it left off, so you can simply run multiple instances in parallel from the same directory. If you have a 4 GPU machine it will finish overnight.

  4. Start the main benchmark.

    python3 run_imagenet_bench.py

    Our implementation of the Boundary Attack does not batch requests to the black box, in order to mimic a real attack and keep queries minimal. This also means that the attacks are pretty slow - expect a minute or two for a single image. Again, you can run multiple instances in parallel from the same directory.

  5. Find detailed output in the out_imagenet_bench. For every run, all successful steps are logged, so you can watch the current progress at all times.

Concerning hyperparameters: The source code has "MODIFIED:" markers, which explain the changes we made to the biased Boundary Attack and its hyperparameters, differing from the original version in https://github.com/ttbrunner/biased_boundary_attack.

blackbox_starting_points's People

Contributors

ttbrunner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ezeob002

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.