Machine Learning

Adversarial Example

An adversarial example is an input that has been deliberately altered, often in ways a person cannot notice, so that a machine learning model gets it wrong, frequently with high confidence.

What is an adversarial example?

An adversarial example is an input crafted to make a machine learning model fail. The classic case is a panda photo with a faint layer of calculated noise added. A person still sees a panda, while an image classifier labels it a gibbon with high confidence. In published physical-world demonstrations, a few stickers made a vision model read a stop sign as a speed limit sign, and patterned eyeglass frames made a face recognition system identify the wearer as someone else.

Attackers search for the small change that moves the model’s output the most. With access to the model, they calculate that change from its gradients. Without access, they query it repeatedly or craft the example on a similar model, since adversarial examples often transfer between models. Adversarial machine learning calls this an evasion attack. Text models share the weakness: swapped characters can slip a phishing email past a filter, and strings of odd tokens added to a prompt can trigger a jailbreak.

Why adversarial examples matter

Any model whose output controls money, access, or safety is a target. A lender’s onboarding flow that matches a selfie to an ID photo and an insurer that estimates repair costs from customer photos both accept inputs an attacker can shape. Defenses include adversarial training on crafted examples, limits on how often one user can query a model, and human review of high-value or low-confidence decisions. Testing with adversarial examples belongs in AI red teaming and in any assessment of model robustness.

← Back to AI Glossary