Adding individual attacks for AutoAttack #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I started adding the individual attacks. Here the details.
AutoPGD: the class
APGDTargeted
is not a targeted attacks (doesn't check that the final adversarial example belongs to the target class), but rather optimizes a loss including the correct class and a target class (and loops over a few possible target classes).FAB: in
fab_with_threshold.py
a variant of theFABAttack
is added. Differently from the original one, once it finds adversarial perturbations with norm smaller thaneps
it stops. Similarly toAPGDTargeted
,FABTargeted
is not a proper targeted attack, but consider just one possible target class (this is also necessary for datasets with many classes e.g. ImageNet).Square: a black-box attack which is specific to images. It works for Linf and L2, untargeted and targeted attacks (in the classical sense here).
Probably the names of some files and attacks should be improved, but I'm not sure which is the best option. Also some classes like
LinfSquareAttack
could be useful.What do you think?