Code Monkey home page Code Monkey logo

davidmr001 / adversarial-robustness-toolbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trusted-ai/adversarial-robustness-toolbox

0.0 1.0 0.0 2.74 MB

This is a library dedicated to adversarial machine learning. Its purpose is to allow rapid crafting and analysis of attacks and defense methods for machine learning models. The Adversarial Robustness Toolbox provides an implementation for many state-of-the-art methods for attacking and defending classifiers.

License: MIT License

Python 99.97% Shell 0.03%

adversarial-robustness-toolbox's Introduction

Adversarial Robustness Toolbox (ART v0.1)

Documentation Status

This is a library dedicated to adversarial machine learning. Its purpose is to allow rapid crafting and analysis of attacks and defense methods for machine learning models. The Adversarial Robustness Toolbox provides an implementation for many state-of-the-art methods for attacking and defending classifiers.

The library is still under development. Feedback, bug reports and extension requests are highly appreciated.

Supported attack and defense methods

The Adversarial Robustness Toolbox contains implementations of the following attacks:

The following defense methods are also supported:

Setup

The Adversarial Robustness Toolbox is designed to run with Python 3 (and most likely Python 2 with small changes). You can either download the source code or clone the repository in your directory of choice:

git clone https://github.com/IBM/adversarial-robustness-toolbox

To install the project dependencies, use the requirements file:

pip install .

The library comes with a basic set of unit tests. To check your install, you can run all the unit tests by calling in the library folder:

bash run_tests.sh

The configuration file config/config.ini allows to set custom paths for data. By default, data is downloaded in the data folder as follows:

[DEFAULT]
profile=LOCAL

[LOCAL]
data_path=./data
mnist_path=./data/mnist
cifar10_path=./data/cifar-10
stl10_path=./data/stl-10

If the datasets are not present at the indicated path, loading them will also download the data.

Running scripts

The library contains three main scripts for:

  • training a classifier using (train.py)
  • crafting adversarial examples on a trained model through (generate_adversarial.py)
  • testing model accuracy on different test sets using (test_accuracies.py)

Detailed instructions for each script are available by typing

python3 <script_name> -h

Documentation

Documentation is available here.

Some examples of how to use the toolbox when writing your own code can be found in the examples folder. See examples/README.md for more information about what each example does. To run an example, use the following command:

python3 examples/<example_name>.py

adversarial-robustness-toolbox's People

Contributors

ambrishrawat avatar kant avatar mathsinn avatar minhitbk avatar ririnicolae avatar stevemart avatar vzantedeschi 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.