Skip to content

About

An implementation of FGSM targeted attack on MNIST classifier.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Introduction

The AdversarialAttack library provides an implementation of the Fast Gradient Sign Method (FGSM) targeted attack.

The implementation is based on the PyTorch tutorial on Adversarial Example Generation and Yannick Merkli's FGSM implementation.

How to run

The notebook adversarial_attack_demo.ipynb provides an example for using the class FGSMTargeted to generate targeted adversarial examples on a pretrained MNIST model.

FGSMTargeted class

The file AdversarialAttack.py contains the implementation of the abstract class AdversarialAttack and the concrete class FGSMTargeted.

The FGSMTargeted class implements the targeted FGSM targeted attack on a neural network model, which can be any PyTorch model.

You can add another attack method (e.g. PGD) by implementing the abstract method generate_adv_example() in new concrete class that implements AdversarialAttack.

About

An implementation of FGSM targeted attack on MNIST classifier.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages