Problem of understanding in the FGSM attack #1545
Unanswered
Bulby-Bull
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @Bulby-Bull Thank you very much for using ART! That's an interesting set of experiments. About your first question, why do you think that "by passing the target C0, class 0 goes to class 1 (uncorrectly) while class 1 correctly goes to class 0"? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've been trying to figure out how the targeted and untargeted mode works in FGSM and I'm having some trouble.
Context: I created an MLP model with Keras to do a binary classification with 1 hidden layer (ReLU) and an output layer in SoftMax with 2 neurons. The dataset used is 2 class of data having 2 features based on a binomial distribution. I provide the code at this URL:
Colab example
After training the model using the crossentropy loss function, I used FGSM to create adversarial examples to see the "targeted" and "untargeted" behaviour. I provide you with my results here, which are obviously specific to my model, so you may get slightly different results.
In the table, L2 and Linf represents the norms, epsilon is the parameter the generate function, Target C0 and Target C1 are the targeted classes given as the target parameter (y) in the generate function and true labels are the original y_test from the dataset.
Questions:
Why, when using the L2 norm and passing the target C0, does class 0 go to class 1 (uncorrectly) while class 1 correctly goes to class 0?
Why, still in the L2 norm, does class 0 tend to go only half way to class 1 or class 0 regardless of the target, and even in untargeted mode, while class 1 goes correctly?
Why, in untargeted mode, the parameter y is taken into consideration while is supposed to be neutral? (when y = class 0 or class 1, the results are different).
Can you explain the behavior of the untargeted function because it seems that it's complementary to the targeted function but it provides some inconsistencies (in targeted mode, if we pass the y_test in parameters of generate, it's equivalent to the reverse of y_test in parameters in the untargeted mode).
Thank you in advance, if any questions are unclear, please feel free to ask me for more information.
Benjamin.
Beta Was this translation helpful? Give feedback.
All reactions