Git Product home page Git Product logo

transferability-advdnn-pub's Introduction

Delving into Transferable Adversarial Examples and Black-box Attacks

This repo provides the code to replicate the experiments in the paper. It is still under development so ensemble models and other experiements will be added later.

Yanpei Liu, Xinyun Chen, Chang Liu, Dawn Song, Delving into Transferable Adversarial Examples and Black-box Attacks , in Proceedings of 5th International Conference on Learning Representations (ICLR 2017)

Paper [arXiv] [OpenReview]

Datasets

ILSVRC12

You can get the dataset by

cd scripts
bash retrieve_data.sh

Or download validation dataset from official website: [ImageNet] to data/test_data folder

The image_label_target.csv under data folder is the images and their targets used for the paper.

Usage

Model architectures

The code currently only supports GoogleNet, will add more models in the later updates

Run experiments

In the following we list some important arguments for our python codes:

  • --input_dir: Directory of dataset.
  • --output_dir: Directory of output noise file.
  • --model: Models to be evaluated, now only supports GoogleNet
  • --num_images: Max number of images to be evaluated (optional).
  • --file_list: Evaluate a specific list of file in dataset (optional).
  • --num_iter: Number of iterations to generate attack (optional).
  • --learning_rate: Learning rate of each iteration (optional).
  • --use_round: Round to integer (optional).
  • --weight_loss2: Weight of distance penalty (optional).
  • --noise_file: Directory of added noise (optional).
  • --target: Target list of file in dataset, if not provided then will do nontargeted attack (optional).

You can run experiment of FG/FGS method using following command

python FG_and_FGS.py -i test -o output/GoogleNet --model GoogleNet --file_list test/test_file_list.txt

You can also run optimization-based method using the following command

python Optimization.py -i test -o output/GoogleNet --model GoogleNet --file_list test/test_file_list.txt

Citation

If you use the code in this repo, please cite the following paper:

@inproceedings{liu2017delving,
  author    = {Yanpei Liu and
               Xinyun Chen and
               Chang Liu and
               Dawn Song},
  title     = {Delving into Transferable Adversarial Examples and Black-box Attacks},
  year      = {2017},
  booktitle = {Proceedings of 5th International Conference on Learning Representations},
}

transferability-advdnn-pub's People

Contributors

gomapur avatar liuchangacm avatar

Watchers

 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.