Adversarial AI Lab

Attack small models with FGSM, PGD and C&W, and try poisoning, backdoors, defense, privacy and robustness evaluation in your browser, with real numbers.

30interactive experiments

Adversarial AI Lab

Glossary and FAQ

Adversarial-AI terms with short definitions, and answers to the questions that come up most. Search them directly.

  • 34Terms
  • 10FAQ

Glossary

Adversarial example

An input altered by a small, deliberate change that makes the model err, often unnoticed by a human.

Adversarial training

Training on adversarial examples generated during training to raise robustness.

Attack success rate (ASR)

The share of examples on which the attack achieves its goal. For backdoors: the share of triggered images classified into the target class.

Backdoor

Hidden behaviour activated by a trigger so any input carrying it is classified into the attacker's chosen class, with normal clean accuracy.

Black box

The attacker sees only inputs and outputs, usually within a query budget.

BPDA

An adaptive attack technique that passes the gradient as if a preprocessing step were the identity, to get around non-differentiable defences.

Certified robustness

A mathematical proof that an image's class cannot change inside a given radius, whatever the attack, unlike empirical evaluation.

Clean accuracy

The model's accuracy on unattacked data.

Clean-label

Poisoning that leaves labels unchanged: only inputs are modified, so label review does not find it.

Data poisoning

Contaminating training data to corrupt the model or implant hidden behaviour.

Differential privacy

A mathematical guarantee that an algorithm's output hardly changes with the presence or absence of any one sample, measured by (ε,δ).

DP-SGD

Training with per-sample gradient clipping and Gaussian noise plus a privacy accountant.

ε (epsilon)

The maximum change allowed per pixel (in an L∞ constraint). A larger ε makes the attack easier but the change more visible.

Excessive agency

Giving a model tools or permissions broader than the task needs, which magnifies the effect of any injection.

False sense of security

A robustness claim based on attacks that do not know the defence; it vanishes under adaptive attacks.

Feature squeezing

Reducing input precision (bit depth, smoothing) and comparing outputs to detect attacks.

Generalisation gap

The difference between training and test accuracy; the wider it is the more membership usually leaks.

Gradient masking

A defence that makes gradients useless to the attacker without making the model genuinely robust; it fools weak attacks and falls to stronger ones.

Gray box

Partial knowledge: e.g. the architecture or similar data without the weights; a substitute model is often built.

Interval bound propagation (IBP)

Propagating lower/upper bounds on activations through the network to show the true-class margin stays positive.

Indirect prompt injection

Instructions hidden in data the system retrieves (document, page, email) rather than typed by the user.

Jailbreak

Phrasing that pushes an aligned model past its policy.

Membership inference

An attack that decides whether a sample was in the training data.

Model inversion

Reconstructing an input representing a class from model outputs.

Norms L0, L2, L∞

L0 counts changed pixels, L2 measures the total length of the perturbation, L∞ measures the largest change of a single pixel. Robustness to one norm does not imply robustness to another.

Prompt injection

Input text carrying instructions that try to override the developer's.

Randomized smoothing

Turning a classifier into one that votes under Gaussian noise, giving a probabilistic L2 certificate.

Red teaming

Structured testing in which a team plays the attacker to find weaknesses before exploitation, with authorisation.

Robust accuracy

The share of images still classified correctly under a specific attack with stated knowledge and constraint. It is attack-specific, not a general guarantee.

Shadow model

A model the attacker trains on similar data to learn how members and non-members behave differently.

Threat model

A statement of the attacker's goal, knowledge, capability and constraints.

Transferability

Adversarial examples built on one model often fool other models.

Trigger

A small pattern added to an input to activate the backdoor.

White box

The attacker knows the architecture, weights and gradients.

Frequently asked questions

What is the difference between clean accuracy and ASR?

Clean accuracy measures normal performance; ASR measures the backdoor's success with the trigger. A poisoned model may score high on both, which is why it is hard to detect.

Is a large ε in DP-SGD bad?

A large ε means a weaker guarantee. In this small lab large values appear because the sample count is small; it illustrates the accuracy–privacy trade-off and does not represent a production system.

Does a failed attack mean the model is robust?

No. One failed attack does not prove robustness; the defence may mask gradients or the attack may be weak. Only formal certificates prove robustness inside a stated radius, and empirical evaluation must use several strong adaptive attacks.

Are my images sent to the server?

No. An image you upload for the attack experiment is processed inside your browser and shrunk to 8×8; it is not sent. When you save an experiment only the settings and results are stored, under an anonymous identifier kept in your browser.

When do I need the optional Python engine?

It is not needed for the built-in experiments. It is optional for larger models and frameworks (such as ART) and runs outside shared WordPress hosting. If the engine is down, browser experiments keep working.

Does the LLM lab use a real language model?

No. It is a transparent rule-based simulator (a toy policy) that shows how injection attacks succeed and how defence layers fail or hold. Its numbers describe the rule set and fictional scenarios only and say nothing about any real model.

May I use these tools against real systems?

The lab is educational and works on its own models only. Testing other people's systems requires written authorisation from their owner; do not use these methods without permission.

How do I reproduce a result?

Every experiment records its settings and random seed; use the same settings and seed to get the same result in any browser. You can export JSON and copy the re-run settings.

Which ε should I use?

There is no single correct value: it depends on the threat model and pixel scale. In this lab useful values lie between 0.05 and 0.3 on images scaled to [0,1]; always compare models at the same ε.

Why 8×8 digit images?

Because the experiments (training, attacks, certificates) run entirely in the browser, quickly and without a server. That gives real, reproducible results, but the numbers do not generalise to large image models.