Skip to content

Interview question · Adversarial ML & Model Privacy

What is an adversarial example, and how is it different from an ordinary error?

Every model makes mistakes. An adversarial example is a mistake someone chose for it, and that changes how you measure and defend.

easyNewPreparation tags: Google, Microsoft, AppleUpdated Nov 2026

TL;DR: An ordinary error is a mistake on naturally occurring data, measured by average accuracy on a test set. An adversarial example is an input deliberately optimised by an attacker, often with a perturbation people cannot perceive, to cause a specific error with high confidence. Ordinary errors are reduced by better data and models; adversarial errors are a worst-case property that average accuracy does not measure, so robustness must be evaluated against adaptive attackers within a stated threat model (perturbation budget, attacker knowledge).

How to approach it

Contrast the two along four axes: who chooses the input, what is measured, how often it occurs, and how you defend. Use one concrete example, then mention LLM analogues.

A strong answer

FIG · ORDINARY ERROR VS ADVERSARIAL EXAMPLE
Average accuracy says nothing about the worst case

Ordinary error

Natural data

measured on a test set

Occasional mistake

no intent

Better data reduces it

Outcome, safe: Average-case problem

Accuracy metrics capture it

Adversarial example

Deliberate optimisation

imperceptible change

Specific, confident error

chosen by the attacker

Survives high accuracy

Outcome, unsafe: Worst-case problem

Needs robustness evaluation

Ordinary errorAdversarial example
Input sourceNature, users, data distributionAn attacker optimising against the model
FrequencySome rate on typical dataNear-certain once the attacker searches
Measured byAccuracy on held-out dataAccuracy under attack, within a stated threat model
ConfidenceOften low near boundariesOften high: the attacker pushes past the boundary
FixBetter data, architecture, trainingAdversarial training, certified robustness, system design

Example. An image classifier labels a few blurry stop signs as speed-limit signs: ordinary errors, more data helps. Researchers add a few carefully designed stickers to a clear stop sign so the classifier reads it as a speed-limit sign from many angles (Eykholt et al., 2018): an adversarial example, and more ordinary data does not fix it.

Why they exist. Models rely on statistical features that humans ignore, and in high-dimensional inputs many tiny coordinated changes can add up to a large change in the model's output (Goodfellow et al., 2014).

Defending. Adversarial training with strong attacks such as PGD (Madry et al., 2017) improves robustness within the trained threat model; certified methods give guarantees in small regions; system design (multiple signals, human review for high-stakes decisions, query limits) limits consequences. Evaluate against adaptive attacks: many published defences were later broken (Athalye et al., 2018).

In LLMs. Optimised adversarial suffixes that cause aligned models to comply (Zou et al., 2023) and jailbreaks that evade classifiers are the text equivalents: inputs chosen to land on the wrong side of a learned boundary.

What interviewers probe next

  • "Does robustness cost accuracy?" Adversarial training typically costs some clean accuracy; the trade-off depends on the task and budget.
  • "What is a threat model for robustness?" The allowed perturbation (type and size), attacker knowledge and query budget; robustness claims are meaningless without one.
  • "Are adversarial examples a real-world threat or a lab curiosity?" Real where attackers control inputs and benefit from errors: spam, malware, fraud, content moderation, safety filters.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

A product manager sees a demo where a stop sign with a few stickers is classified as a speed limit sign, and asks whether this is just a bug that more training data will fix.

  1. Start here

    How is this different from an ordinary error?

How it's scored

Weak: "A wrong prediction on a weird input."

Hire: Distinguishes chosen versus natural inputs and average versus worst-case evaluation.

Strong Hire: Explains why they exist, the threat-model requirement for robustness claims, adaptive evaluation, and LLM analogues.

Common mistakes

  • Reporting accuracy as evidence of robustness.
  • Robustness claims without a perturbation budget.
  • Trusting defences evaluated only on non-adaptive attacks.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 10, and we keep track of how far you get in every topic.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 5 to 10 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet. Share a correction or a different way to answer it.