Skip to main content

AdvSecureNet | Adversarial Secure Networks | Machine Learning Security

Project description

AdvSecureNet - Adversarial Secure Networks

Unit Tests and Style Checks Build and Deploy Sphinx Documentation Upload Python Package

AdvSecureNet

AdvSecureNet is a Python library to for Machine Learning Security. It has been developed by Melih Catal at University of Zurich as a part of his Master's Thesis under the supervision of Prof. Dr. Manuel Günther. Currently, the main focus of the library is on adversarial attacks and defenses on vision tasks. However, it's planned to extend the library to support other tasks such as natural language processing.

The library provides a set of tools to generate adversarial examples and to evaluate the robustness of machine learning models against adversarial attacks. It also provides a set of tools to train robust machine learning models. The library is built on top of PyTorch. It is designed to be modular and extensible. So, anyone can easily run experiments with different configurations.

The library currently supports the following attacks:

The library currently supports the following defenses:

The library supports any model that is implemented in PyTorch. It also provides a set of pre-trained models that can be used for experiments. It's also possible to create and use custom models.

The library supports multi-GPU training and adversarial training with DDP (Distributed Data Parallel) from PyTorch. This allows the library to be used for large-scale experiments.

Installation

You can install the library using pip:

pip install advsecurenet

You can also install the library from source:

git clone
cd advsecurenet
pip install -e .

Usage

The library can be used as a command line tool or as an importable Python package.

Command Line Tool

advsecurenet command can be used to interact with the library. You can use advsecurenet --help to see the available commands and options. Available commands are:

  • attack Command to execute attacks.
  • config-default Generate a default configuration file based on the name...
  • configs Return the list of available configuration files.
  • defense Command to execute defenses.
  • model-layers Command to list the layers of a model.
  • models Command to list available models.
  • test Command to evaluate a model.
  • train Command to train a model.
  • weights Command to model weights.

You can use advsecurenet <command> --help to see the available options for a command. For example, you can use advsecurenet attack --help to see the available options for the attack command. The CLI supports both config yml files and arguments.

Python Package

You can import the library as a Python package. You can use the advsecurenet module to access the library. You can find the available modules and classes in the documentation.

Examples

You can find various examples in the examples directory. The examples show different use cases of the library and how to use the library as a Python package/CLI tool.

Architecture

The high-level architecture of the library is shown in the figure below.

AdvSecureNet

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

Further Information

Further information about the library can be found in the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

advsecurenet-0.1.7.tar.gz (86.9 kB view hashes)

Uploaded Source

Built Distribution

advsecurenet-0.1.7-py3-none-any.whl (138.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page