Library/SDK
Library
AI & Machine Learning Security

cleverhans

by cleverhans-lab

6.3Kstars
1.4Kforks
188watchers
Updated 6 months ago
About

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

Primary Use Case

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.

Key Features
  • Reference implementations of adversarial attacks against ML models
  • Implementations of defense mechanisms against adversarial examples
  • Support for three major ML frameworks: JAX, PyTorch, and TensorFlow 2
  • Tutorial scripts demonstrating library features
  • Continuous development with community contributions
  • Benchmarking tools for model vulnerability assessment
  • Modular directory structure separating attacks, defenses, and tutorials

Installation

  • 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 .`

Usage

>_ 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

Security Frameworks
Reconnaissance
Resource Development
Defense Evasion
Discovery
Impact
Usage Insights
  • Integrate CleverHans into CI/CD pipelines to continuously benchmark ML model robustness against adversarial attacks.
  • Use the library to simulate adversarial attacks during purple team exercises to improve collaboration between red and blue teams.
  • Leverage CleverHans for training AI/ML security teams on emerging adversarial techniques and defenses.
  • Combine CleverHans with threat intelligence feeds to proactively identify and mitigate novel adversarial threats.
  • Extend the library with custom attacks to model organization-specific ML threat scenarios and improve defense strategies.

Docs Take 2 Hours. AI Takes 10 Seconds.

Ask anything about cleverhans. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.

This tool hasn't been indexed yet. Request indexing to enable AI chat.

Admin will review your request within 24 hours

Security Profile
Red Team85%
Blue Team40%
Purple Team70%
Details
LicenseMIT License
LanguageJupyter Notebook
Open Issues454
Topics
machine-learning
security
benchmarking