Observed since 20 Oct, 20:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A unified library for performing adversarial attacks on ML models
Adversarial Lab is a unified Python library for launching adversarial attacks on any machine learning model. It is framework-agnostic, supporting both TensorFlow and PyTorch.
Key Features • Installation • Quick Start • Usage • Customization • Contributing • License
To install Adversarial Lab, you can use pip. The pip installation does not install tensorflow and pytorch. Both these libraries must be installed for Adversarial Lab to work.
pip install adversarial-lab
Here's a basic example to get you started with a white-box attack on a PyTorch model:
from PIL import Image
import tensorflow as tf
from tensorflow.keras.applications import InceptionV3
from adversarial_lab.attacks.whitebox import WhiteBoxMisclassification
image = Image.open('data/panda.jpg')
model = InceptionV3(weights='imagenet')
attacker = WhiteBoxMisclassification(model, "cce", "adam")
noise = attacker.attack(image_array, epochs=20, strategy="random", verbose=3)
Adversarial Lab supports a variety of adversarial attack techniques. Here's a brief overview:
adversarial_lab/attacks/blackboxadversarial_lab/attacks/whiteboxCOMING SOON
Adversarial Lab is designed to be extensible. You can add your custom components in the following areas:
adversarial_lab/core/losses.adversarial_lab/core/optimizers.adversarial_lab/core/noise_generators.We welcome contributions to Adversarial Lab! If you'd like to contribute, please follow these steps:
For detailed guidelines, see the CONTRIBUTING.md file.
This project is licensed under the terms of the MIT license. See the LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.0.6 | 28 Oct 2025 | 15 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 20:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:dd2e38798ca5af092af799cabf47eeb3a414f244df00495a337edeec8ab344b0