Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding individual attacks for AutoAttack #74

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

fra31
Copy link
Contributor

@fra31 fra31 commented Apr 21, 2020

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 the FABAttack is added. Differently from the original one, once it finds adversarial perturbations with norm smaller than eps it stops. Similarly to APGDTargeted, 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?

@gwding
Copy link
Collaborator

gwding commented Apr 23, 2020

@fra31 Thanks a lot for the contribution!
Since this is a big PR, it might take me some time to review. In the mean time, do you mind adding a benchmarking script like this https://github.com/BorealisAI/advertorch/blob/master/advertorch_examples/attack_benchmarks/benchmark_fast_adaptive_boundary.py , just to make sure that this implementation matches your original one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants