CleverHans is a Python library for benchmarking machine learning models against adversarial examples by providing implementations of attacks and defenses.
An adversarial example library for constructing attacks, building defenses, and benchmarking both
This tool is primarily used by researchers and developers in AI security to evaluate the robustness of machine learning models against adversarial attacks. It helps in constructing attacks, building defenses, and benchmarking models to identify vulnerabilities and improve security.
CleverHans requires one of the supported ML frameworks (JAX, PyTorch, or TensorFlow 2) as a prerequisite. It is tested primarily on Python 3.6 with specific versions of these frameworks on Ubuntu 18.04 LTS. Users should direct support questions to StackOverflow and reserve GitHub issues for bugs or feature requests. Contributions should follow the Black coding style and avoid git submodules.
Ensure Python 3.6 and one of the supported ML libraries (JAX, PyTorch, or TensorFlow 2) are installed
Install CleverHans via pip with `pip install cleverhans` for the latest stable release
Alternatively, install the bleeding edge version using `pip install git+https://github.com/cleverhans-lab/cleverhans.git#egg=cleverhans`
For development, fork the repository on GitHub and clone your fork locally
Navigate to the cloned directory and install in editable mode with `pip install -e .`
pip install cleverhans
Installs the latest stable release of CleverHans from PyPI
pip install git+https://github.com/cleverhans-lab/cleverhans.git#egg=cleverhans
Installs the bleeding edge version of CleverHans directly from the GitHub repository
git clone https://github.com/<your-org>/cleverhans
Clones your fork of the CleverHans repository for development
pip install -e .
Installs CleverHans in editable mode for local development and contribution