Foundation Lab

Adversarial Examples & Robustness

Reveals that neural networks are "right for the wrong reasons"—decision boundaries are brittle

Concept 44 of 100TheoryPhase 8
#44AdversarialTheory
key equation
xadv=x+ϵ⋅sign(∇xL)x_{\text{adv}} = x + \epsilon \cdot \text{sign}(\nabla_x L)
Reading map and next steps

Selected Foundation Object

Keep the equation fixed; move through the evidence.

Concept 44 of 100AdversarialTheory / Phase 8: Scaling, theory & multimodal
Current question

Adversarial examples exist because of high dimensionality: many directions to push decision boundaries

xadv=x+ϵ⋅sign(∇xL)x_{\text{adv}} = x + \epsilon \cdot \text{sign}(\nabla_x L)
PredictionCommit before tracing the equation.

Ask what should change under a concrete input, then trace that expectation through the equation.

EvidenceCompare the equation and source.

Use the key equation and canonical papers as the available witnesses, without implying that a runnable panel exists.

InvariantName what survives notation changes.

The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.

Next moveContinue through the atlas.

Use prerequisites, dependents, and semantic links to repair the next gap without leaving the object behind.

Why It Matters for Modern Models

  • Reveals that neural networks are "right for the wrong reasons"—decision boundaries are brittle
  • Foundation for understanding model robustness, jailbreaks, and AI safety
  • Adversarial training remains the most reliable defense—robust models generalize better to distribution shift

What Tutorials Skip

What is still poorly explained in textbooks and papers:

  • Adversarial examples exist because of high dimensionality: many directions to push decision boundaries
  • Linear hypothesis: even linear models are vulnerable due to high-dimensional dot products
  • Robustness-accuracy tradeoff: adversarial training typically hurts clean accuracy by 2-10%

Visualization Status

Core Math (Optional Deep Dive)

If you want intuition first, start with the key equation and cited sources. Come back here for the full walkthrough.

Key Equation
xadv=x+ϵ⋅sign(∇xL)x_{\text{adv}} = x + \epsilon \cdot \text{sign}(\nabla_x L)

FGSM (Fast Gradient Sign Method) generates adversarial examples:

xadv=x+ϵ⋅sign(∇xL(θ,x,y))x_{\text{adv}} = x + \epsilon \cdot \text{sign}(\nabla_x L(\theta, x, y))

PGD (Projected Gradient Descent) iterates:

x(t+1)=ΠBϵ(x)(x(t)+α⋅sign(∇xL))x^{(t+1)} = \Pi_{\mathcal{B}_\epsilon(x)} \left( x^{(t)} + \alpha \cdot \text{sign}(\nabla_x L) \right)

Adversarial training min-max objective:

min⁡θE(x,y)[max⁡∥δ∥≤ϵL(θ,x+δ,y)]\min_\theta \mathbb{E}_{(x,y)} \left[ \max_{\|\delta\| \leq \epsilon} L(\theta, x + \delta, y) \right]

Small perturbations δ\delta cause large changes in model predictions.

Canonical Papers

Explaining and Harnessing Adversarial Examples

Goodfellow, Shlens, Szegedy2015ICLR
Read paper →

Connections

Next Moves

Choose the next question to carry this object forward.