Git Product home page Git Product logo

blackbox-attack's Introduction

blackbox-attack

About

Implementations of the blackbox attack algorithms in Pytorch

Model description

There are two CNN models for MNIST dataset: a simple model and C&W model.

Simple Model for MNIST:

stride = 1, padding = 0

Layer 1: Conv2d 5x5x16, BatchNorm(16), ReLU, Max Pooling 2x2

Layer 2: Conv2d 5x5x32, BatchNorm(32), ReLU, Max Pooling 2x2

Layer 3: FC 10

C&W model for MNIST: This can be found in C&W paper their paper for MNIST data. (https://arxiv.org/abs/1608.04644)

C&W model for CIFAR10: This can be found in C&W paper their paper for CIFAR10 data. (https://arxiv.org/abs/1608.04644)

Pre-requisites

The following steps should be sufficient to get these attacks up and running on most Linux-based systems.

conda install pytorch torchvision -c pytorch

To train the model

python3 models.py

To run the attack:

python3 blackbox_attack.py

blackbox-attack's People

Contributors

cmhcbb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blackbox-attack's Issues

model.py ,the program have a small error!

model.py

line 469:
change
test(net, test_loader) ----->test_mnist(net, test_loader).

line 369:
change
test_minst(net, test_loader) ----->test_mnist(net, test_loader).

maybe error 2 need not to change.It is just a suggestion.
Thanks very much for your sharing your code about black-box adversarial examples.you know that the sharing about black-box adversarial examples is rarely.I also have some questions about the framework Pythorch you used that is only deployed in linux?I deploy the code in my windows,and still have an error “cuda runtime error (48) : no kernel image is available for execution on the device at”,I do not find an useful suggestion for me to solve this troublesome problem.
I will look forward to your reply very much.

cuda runtime error

RuntimeError: cuda runtime error (48) : no kernel image is available for execution on the device at d:\pytorch\pytorch\torch\lib\thcunn\generic/Threshold.cu:34

I want to know,do you have met this problem?

boundary-attack implementation

Hi, I found that your reimplementation for boundary-attack is quite different from the original version. For example, in your boundary_attack.py[line 72--80], you didn't use any ``orthogonal_perturbation'', which is a core idea in boundary-attack[see https://github.com/greentfrapp/boundary-attack/blob/5ce924cf62a041b218cd4a0d44a5e0d7c7619813/demo/server/controllers/boundaryattack_controller.py#L87].

Maybe there're some misunderstandings, and I would like to ask if you could possiblely explain this issue. Thank you very much :)

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.