Harry24k / adversarial-attacks-pytorch

PyTorch implementation of adversarial attacks [torchattacks].
https://adversarial-attacks-pytorch.readthedocs.io/en/latest/index.html
MIT License
1.79k stars 337 forks source link

[FEATURE] Consider adding PI-FGSM attack #143

Closed CHENBIN99 closed 1 year ago

CHENBIN99 commented 1 year ago

✨ Short description of the feature [tl;dr]

Thanks for your great contributions!

This library contains many types of attack methods. Here I suggest adding the PI-FGSM method to the library. Links to papers and open source codes related to the method are as follows:

paper code

This method uses patch-wise perturbation to attack the model, and the adversarial examples generated by it have good attack transferability.

💬 Detailed motivation and codes

paper code

rikonaka commented 1 year ago

Hi @CHENBIN99 , thanks for the suggestion, I have submitted new code for the new PI-FGSM attack, it won't take long before you can use PI-FGSM in torchattacks.

But it seems that PI-FGSM attack does not support targeted attacks (I don't see any of this in the original code). 🤯

CHENBIN99 commented 1 year ago

Thank you for your fast and efficient work!

As for the target attack, it is possible that the author did not implement this function, and I have not found a description or code for the implementation of the target attack, but in any case, it is good enough to implement a non-target attack.

I will continue to follow the progress of the torchattacks library!