Coder Social home page Coder Social logo

max-andr / square-attack Goto Github PK

View Code? Open in Web Editor NEW
143.0 143.0 26.0 12.82 MB

Square Attack: a query-efficient black-box adversarial attack via random search [ECCV 2020]

Home Page: https://arxiv.org/abs/1912.00049

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
adversarial-attacks adversarial-robustness black-box-attacks random-search robustness zeroth-order-optimization

square-attack's People

Contributors

fra31 avatar max-andr 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  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

square-attack's Issues

The Linf version

Hi, I am glad to learn from this interesting work. I got one question here. In attack.py Line#238, why do you add deltas on the variable, x_curr, instead of x_best_curr? Thanks a lot.

Where does this paper published on?

I cannot find the place of the official journal or conference that the square attack published on? Does this paper only published on ArXiv website?

L2 targeted attack taking very much query with low success rate

I am applying the square l2 targeted attack on ImageNet dataset with VGG16 model, for n_ex=100, with p=0.05, n_iter=20000, eps=1275/255. First of my concern is that the attack sometimes starts with "nan" med#q_ae and avg#q_ae and second that it is taking 7k queries and also gives a success rate of only 61%.

Bugs when running Linf attack on pt_inception

Thanks for your great job! I have some trouble running your code.
I want to run your code on docker server. But since you use both Tensorflow and Pytorch, I could not find a proper docker image and encountered a lot of version errors. Finally I gave up and try to remove the Tensorflow part in your code (remove some irrelevant codes related to TFmodels in models.py) and just want to test on pt_inception model. But still I got some bug:
image
I appreciate if you can help me!

FileNotFoundError: '/scratch/maksym/imagenet/val_orig'

image

I tried running the basic attack from the example but I ran into this error.
I followed the requirements of installing Pytorch==1.0.0, tensorflow==1.12.0
I was using an Anaconda base with Python 3.6.

Was any of my dependencies different from what is required for the code to run? Thank you for your help

Can you provide the code of defensive model in your paper's section 5.2 for me?

Hi:
I am working on adversarial attack research area. I recently read your paper square attack, which is particularly for me to experiment.

But in Section 5.2, you mention that you experiment your square attack to break the defensive model of Clean Logit Pairing (CLP), Logit Squeezing (LSQ) and post-averaging randomized defense method.

Can you provide the code of these defensive model/method for me so that I can do these experiments. I will cite your paper!!
Thank you!

Why the perturbation with its value equals the maximum bound of Linf and L2 attack should be used in update?

I wonder the use of maximum bound of Linf and L2 attack in the update is the best choice?
For example, I mean deltas[i_img, :, center_h:center_h+s, center_w:center_w+s] = np.random.choice([-eps, eps], size=[c, 1, 1]) in https://github.com/max-andr/square-attack/blob/master/attack.py#L236
Can it change to a value inside the [-eps, eps] interval? (smaller than eps) Would it possible be better?

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.