Skip to content

wsonejoy/pytorch-adversarial-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adversarial Examples

PyTorch implementation following algorithms:

  • Fast Gradient Sign Method (FGSM) [1]
  • Basic Iterative Method (BIM) [2]
  • DeepFool [3]

Prerequisites

  • Python 3.5.2
  • PyTorch 0.4.0
  • torchvision 0.2.1
  • NumPy 1.14.3

Usage

$ python main.py

Dataset

Results

Clean

Label: 0 Label: 1 Label: 2 Label: 3 Label: 4 Label: 5 Label: 6 Label: 7 Label: 8 Label: 9

FGSM (eps=0.15)

Label: 2 Label: 8 Label: 1 Label: 2 Label: 9 Label: 3 Label: 5 Label: 2 Label: 1 Label: 7

BIM (eps=0.15, eps_iter=0.01, n_iter=50)

Label: 7 Label: 8 Label: 3 Label: 2 Label: 9 Label: 3 Label: 5 Label: 2 Label: 1 Label: 7

DeepFool (max_iter=50)

Label: 9 Label: 8 Label: 3 Label: 8 Label: 9 Label: 3 Label: 5 Label: 8 Label: 3 Label: 7

Reference

[1] Ian J. Goodfellow, Jonathon Shlens, Christian Szegedy. Explaining and Harnessing Adversarial Examples. ICLR, 2015

[2] Alexey Kurakin, Ian J. Goodfellow, Samy Bengio. Adversarial Examples in the Physical World. arXiv, 2016

[3] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Pascal Frossard. DeepFool: A Simple and Accurate Method to Fool Deep Neural Networks. CVPR, 2016

Author

Kuan-Hao Huang / @ej0cl6

About

PyTorch Implemetations of Adversarial Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%