Giter VIP home page Giter VIP logo

notion_robustness_icassp2021's Introduction

Code accompagning the paper: A generative perspective to study adversarial robustness

This is the code used to pruduce experiments that shows that it is possible to learn the generative distribution associated to a classifier and to evaluate distance between these distributions to assess the robustness of a model.

├── Readme.md                          # This file
├── requirements.txt                   # Requierements
└── src
    ├── models                        # Contains pytorch modedules to describe classifiers and generative distributions.
    │   ├── classifiers.py            # Contains classifiers models.
    │   ├── explainers.py             # Generative distribution models.
    │   ├── __init__.py
    └── run_experiments.py            # Main file to run the experiments.

Usage

python src/run_experiments.py --help
usage: run_experiments.py [-h] [-d DIR] [-re REPEAT_EXPERIMENT] [-b BATCH_SIZE] [-cm {conv,dense}] [-ce CLASSIFIER_EPOCHS] [-aa {L2PGDAttack,LinfPGDAttack,L1PGDAttack}] [-ap ADVERSARIAL_ATTACK_PARAMETERS] [-gl {sharp,fuzzy}] [-ge GENERATIVE_EPOCHS] path

Produces experiments following the parameters in the configuration file

positional arguments:
  path                  Filepath where to store the results of the experiment.

optional arguments:
  -h, --help            show this help message and exit
  -d DIR, --dir DIR     Where to store the file of statistics produced.
  -re REPEAT_EXPERIMENT, --repeat-experiment REPEAT_EXPERIMENT
                        Number of repetition for each attack/parameter configuration (For statistical significance).
  -b BATCH_SIZE, --batch-size BATCH_SIZE
                        Size of batch to use during the trainings.
  -cm {conv,dense}, --classifier-model {conv,dense}
                        Wether to use the convolutional model or the dense one.
  -ce CLASSIFIER_EPOCHS, --classifier-epochs CLASSIFIER_EPOCHS
                        Number of epoch to do while training the classifiers.
  -aa {L2PGDAttack,LinfPGDAttack,L1PGDAttack}, --adversarial-attack {L2PGDAttack,LinfPGDAttack,L1PGDAttack}
                        Name of the adversarial attack to use.
  -ap ADVERSARIAL_ATTACK_PARAMETERS, --adversarial-attack_parameters ADVERSARIAL_ATTACK_PARAMETERS
                        List of parameters to test for this adversarial attack.
  -gl {sharp,fuzzy}, --generative_loss {sharp,fuzzy}
                        Sharp or fuzzy representation.
  -ge GENERATIVE_EPOCHS, --generative-epochs GENERATIVE_EPOCHS
                        Number of epoch to do while training the generative distributions.

notion_robustness_icassp2021's People

Contributors

icannos avatar

Watchers

 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.