AdvSecureNet | Adversarial Secure Networks | Machine Learning Security
Project description
AdvSecureNet
AdvSecureNet is a Python library for Machine Learning Security, developed by Melih Catal at University of Zurich as part of his Master's Thesis under the supervision of Prof. Dr. Manuel Günther. The main focus of the library is on adversarial attacks and defenses for vision tasks, with plans to extend support to other tasks such as natural language processing.
The library provides tools to generate adversarial examples, evaluate the robustness of machine learning models against adversarial attacks, and train robust machine learning models. Built on top of PyTorch, it is designed to be modular and extensible, making it easy to run experiments with different configurations.
Table of Contents
- Features
- Supported Attacks
- Supported Defenses
- Installation
- Why AdvSecureNet?
- Usage
- Examples
- Architecture
- License
- Further Information
Features
- Generate adversarial examples
- Evaluate model robustness against adversarial attacks
- Train robust machine learning models
- Modular and extensible design
- Native multi-GPU support
Supported Attacks
Supported Defenses
Installation
You can install the library using pip
:
pip install advsecurenet
Or install it from source:
git clone https://github.com/melihcatal/advsecurenet.git
cd advsecurenet
pip install -e .
Why AdvSecureNet?
-
Research-Oriented: Easily run and share experiments with different configurations using YAML configuration files.
-
Supports Various Attacks and Defenses: Experiment with a wide range of adversarial attacks and defenses.
-
Supports Any PyTorch Model: Use pre-trained models or your own PyTorch models with the library.
-
Supports Various Evaluation Metrics: Evaluate the robustness of models, performance of adversarial attacks, and defenses.
-
Bening Use Case Support: Train and evaluate models on benign data.
-
Native Multi-GPU Support: Efficiently run large-scale experiments utilizing multiple GPUs.
Usage
The library can be used as a command line tool or as an importable Python package.
Command Line Tool
Use the advsecurenet
command to interact with the library. Use advsecurenet --help
to see available commands and options. It is recommended to use YAML configuration files to run experiments. You can list the available configuration options using advsecurenet utils configs list
and generate a template configuration file using advsecurenet utils configs get -c <config_name> -o <output_file>
.
Running an adversarial attack:
advsecurenet attack -c ./fgsm.yml
Running an adversarial defense:
advsecurenet defense adversarial-training -c ./adv_training.yml
Running an evaluation:
advsecurenet evaluate benign -c ./evaluate_benign.yml
or
advsecurenet evaluate adversarial -c ./evaluate_adversarial.yml
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
Examples of different use cases can be found in the examples directory.
Architecture
The high-level architecture of the library is shown in the figure below.
License
This project is licensed under the terms of the MIT license. See LICENSE for more details.
Further Information
More information about the library can be found in the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for advsecurenet-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6861dd3cf554e21954d2736641c28311254adc23ca011bffe316cf81fb31dde6 |
|
MD5 | 32d73622653fe0210614954bce344293 |
|
BLAKE2b-256 | 70e7284f4c73b0da07dc2127459a33c7e5be8b5b4982f5e2053ec50b2d7cd72d |