Code Monkey home page Code Monkey logo

adversarial-attacks's Introduction

Adversarial Notebook made-with-python

Adversarial examples

drawing

Implementation of adversarial attack on different deep NN classifiers, the attacks are base on the algorithms in the papers :

ATTACKS :

DEFENSES :

Project Organization

├── Adversarial_blackbox_attacks.ipynb  <- Notebook for testing BB attacks>
├── Adversarial_whitebox_attacks.ipynb  <- Notebook for testing WB attacks>
├── attack.py                           <- Test functions of attacks>
├── Attacks                             
│   ├── FGSM.py                         <- FGSM fast attack class>
│   ├── LBFGS.py                        <- L-BFGS attack class >
│   └── VanillaGradient.py              <- Vanilla attack class >      
├── Defense.ipynb                       <- Notebook for testing defenses>
├── defense.py                          <- Test functions of defense>
├── imagenet_classes.txt
├── Net.py                              <- Architectures of models >
├── Results                             <- Resulting images and accuracies >
├── utils.py                            <- Plotting functions >
└── weights                             <- Weights for pretrained models>

Our work was inspired by Adversarial Attacks and Defences Competition, we implemented 3 differents attack vectors and 3 matching defenses.

  • Adversarial_whitebox_attacks.ipynb : We first implemented the attacks on the architecture Net.py with MNIST dataset, the notebook show the impact of our different attacks on the accuracy of the model
    • Adversarial_whitebox_attacks
  • Defense.ipynb : This notebook showcases the robustness of 3 different defenses against the attacks. You'll find the accuracy measure of the model when adding the defense. The L-BFGS attack was left out of the testing because the high computational cost of the attack.
  • Adversarial_blackbox_attacks.ipynb : One very interesting feature of adversarial examples is their ability to transfer to different models. We tested this unique property by attack a model based on image generated froma different one. We used a more complex dataset (ants/bees) of 3 channels images from this test.
    • Note the dataset is available to download by running :
          wget https://download.pytorch.org/tutorial/hymenoptera_data.zip

adversarial-attacks's People

Contributors

aminediro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.