adversarial.js
Break neural networks in your browser.
An interactive, in-browser demonstration of adversarial attacks on neural networks โ entirely in JavaScript.
Get Started
Implementation
adversarial.js is completely implemented in JavaScript โย so it can run entirely within your browser. We rely on TensorFlow.js.
The library supports the following attacks:
- Fast Gradient Sign Method (L_inf attack)
- Basic Iterative Method (L_inf attack)
- Jacobian-based Saliency Map Attack (L0 attack)
- Jacobian-based Saliency Map Attack, One-Pixel (L0 attack)
- Carlini & Wagner (L2 attack)
The demo can break the following pre-loaded systems:
- MNIST (digit recognition)
- GTSRB (street sign recognition)
- CIFAR-10 (object recognition, small images)
- ImageNet (object recognition, large images)
FAQ
Repo Structure
src/adversarial.js
: The core adversarial.js library that implements all attacks.docs/
: The interactive demo directory. Explore the live website.docs/js/
: Contains a ton of scripts that process data and power the demo, and a copy ofadversarial.js
.docs/data/
: Contains (subsets) of datasets used in the demo.