HomeAI & Machine LearningUniversal Adversarial Perturbation Explorer

Universal Adversarial Perturbation Explorer (2D)

Train a real logistic-regression classifier on 2D data, craft genuine FGSM gradient-sign attacks on individual points, and build a shared universal perturbation vector that flips a live-measured fraction of the whole population as its epsilon budget grows.

AI & Machine Learning2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-neural-network-adversarial-example-perturbation ↗ Open standalone

This is the 2D counterpart of the 3D Universal Adversarial Perturbation Explorer, built around the same real gradient-based attack mechanic on a classifier you can see fit in real time. A logistic regression model is trained by genuine gradient descent on a two-cluster 2D dataset, giving a real decision boundary. Click any point to compute its exact individual FGSM gradient-sign perturbation — ε · sign(∂Loss/∂x) — and watch whether that single, bounded nudge crosses the boundary. Then run the accumulation to build one shared universal vector, added to every point at once, and watch the live fooling-rate statistic climb as ε grows, with the population visibly sliding across the line together.

⚙ Under the hood

Watch a single shared perturbation vector get built, sample by sample, until it flips the predicted class of most points in a 3D input space at once -- an interactive model of the Universal Adversarial Perturbation algorithm for a linear neural network classifier.

adversarial-mlneural-networksperturbationrobustnessai-securitydeepfool

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)