Visualize Adversarial Attacks

See how adversarial perturbations affect machine learning model predictions.

Fast Gradient Sign Method (FGSM)
A one-step attack that perturbs an image in the direction that maximizes the loss function
Original + Perturbation
Perturbed image
Model prediction: Cat (98% confidence)
Perturbation Only (Magnified)
Noise pattern
This shows the noise pattern added to the original image
Perturbation Strength0.0

Drag the slider to adjust the strength of the adversarial perturbation and observe how it affects the model's prediction.

The Fast Gradient Sign Method (FGSM) creates adversarial examples by adding perturbations in the direction of the gradient of the loss function with respect to the input.

Even with perturbations that are imperceptible to humans, the model's prediction can change dramatically.