Target Values (Y) in ART Generate Function #2001
-
Dear developers, When crafting adversarial examples using gradient-based methods such as FGM, JSMA, BIM, etc. One of the arguments in generate function is Y which is as described by ART : Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape (nb_samples,)Only provide this parameter if you’d like to use true labels when crafting adversarial samples. Otherwise, model predictions are used as labels. My question is when providing Y to generate function should we provide the true labels (original labels) or the target label ? I really appreciate any help you can provide. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @fatimah-aloraini Thank you very much for using ART! The question if true labels or target labels should be provided depends on whether the attack is being run as un-targeted attack (attack argument |
Beta Was this translation helpful? Give feedback.
Hi @fatimah-aloraini Thank you very much for using ART!
The question if true labels or target labels should be provided depends on whether the attack is being run as un-targeted attack (attack argument
targeted=False
, default for most attacks) or as targeted attack (attack argumenttargeted=True
). Un-targeted attacks expect true labels whereas targeted attacks expect target labels.