Giter VIP home page Giter VIP logo

Comments (7)

ForeverZyh avatar ForeverZyh commented on August 11, 2024

And if I run it on CPU, it always (seemingly always) produces adversarial accuracy around 1%.

from nn_robust_attacks.

carlini avatar carlini commented on August 11, 2024

Not sure if I have anything insightful to offer. Have you tried GPU with batch_size=1 (and CPU with larger batch sizes)?

Does this happen even on the baseline code provided, without modification?

Another diagnostic would be to plot the loss of every input in the batch.

from nn_robust_attacks.

ForeverZyh avatar ForeverZyh commented on August 11, 2024

I have not tried those configurations. I will try later. Batch size=100 for all the experiments at that time.

l2_attack is not modified. But I'm trying to attack a model using CarliniL2.

I checked the losses between iterations, even for quite different adversarial accuracy, the losses are quite similar.

I forgot to mention that this issue only happens when the CPU burden is very high. I'm not sure but I feel this is GPU&CPU-related.
And now I'm using confidence=0.01, it seems the adversarial accuracy becomes always 0.

from nn_robust_attacks.

ForeverZyh avatar ForeverZyh commented on August 11, 2024

I tried GPU with batch_size=1, and it works pretty well. But that's too slow.

from nn_robust_attacks.

carlini avatar carlini commented on August 11, 2024

So you are using a new model with new code? I don't know what could be causing multi-batch code to behave differently than single, but that should give you something specific to look into. Try 2, or 3 examples. Do they behave the same? Does your code behave identically for different batch sizes? Are you using a reduce_sum somewhere? There are a lot of things to try.

from nn_robust_attacks.

ForeverZyh avatar ForeverZyh commented on August 11, 2024

I see. I have tried max_iterations=100, max_iterations=1000, max_iterations=10000. Strangely, max_iterations=100 produces the best result with 5% accuarcy, max_iterations=10000 produces the worst result with 46% accuarcy.

from nn_robust_attacks.

carlini avatar carlini commented on August 11, 2024

Accidentally confused github issues; didn't want to close this one.

This seems like something that should be easy to diagnose, if you check why some adversarial example no longer remain adversarial after more iterations of gradient descent.

My new guess: does your model have randomness involved? If so, you may be over-optimizing against one choice of randomness and you may need to ensemble over different randomness values.

from nn_robust_attacks.

Related Issues (20)

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.