Framing adversarial defense as a min-max saddle-point problem and training high-capacity networks against multi-step Projected Gradient Descent (PGD) raised white-box robust accuracy from near zero to 89.3% or higher on MNIST and 45.8% on CIFAR-10. In 2017, Aleksander Madry, Aleksandar Makelov, Dimitris Tsipras, Ludwig Schmidt, and Adrian Vladu unified attacks and defenses under one mathematical guarantee, showing why popular one-step defenses collapsed completely when tested against iterative attackers.

Two principles from this paper still govern security evaluation in machine learning, including modern jailbreak and red-teaming audits. First, a robustness claim has no meaning without an explicit threat model defining what perturbations the attacker may make. Second, evaluating against a weak attack creates false confidence: a wide CIFAR-10 ResNet trained on one-step FGSM scored 95.1% against FGSM yet collapsed to 0.0% accuracy under 7-step PGD.

  • One-step defenses fail catastrophically: Standard wide CIFAR-10 ResNets fell from 95.2% clean accuracy to 3.5% under 20-step PGD; FGSM-trained wide ResNets hit 95.1% against FGSM via overfitting (“label leaking”) yet collapsed to 0.0% under 7-step and 20-step PGD.
  • PGD training holds against white-box and transfer attacks: With a 10x wider ResNet on CIFAR-10 (epsilon = 8), PGD adversarial training reached 87.3% clean accuracy, 45.8% against 20-step white-box PGD, 46.8% against Carlini-Wagner (CW), and 64.2% against black-box transfer PGD.
  • 100,000-restart landscape structure: Across 10^5 random PGD restarts inside the l_inf perturbation box, distinct local maxima (roughly 90 degrees apart) clustered tightly in loss value with zero extreme outliers, supporting PGD as a universal first-order adversary.
  • Capacity is mandatory: Widening the CIFAR-10 ResNet by 10x cut PGD training loss from 1.11 to 0.0218 and boosted clean accuracy from 79.4% to 87.3%; undersized networks collapsed to predicting a single constant class.
Saddle-point robust optimization: inner attack meets outer defense
1. Explicit threat model S
Defines the exact perturbation neighborhood allowed around each input x.
Bounded l_inf ball
MNIST permits pixel shifts up to epsilon = 0.3 (on [0, 1]); CIFAR-10 permits epsilon = 8 (out of 255).
2. Inner maximization (Attack)
Finds the worst-case perturbation inside x + S using random-start PGD.
Iterative ascent max_{delta in S} L(theta, x + delta, y)
Steps along sgn(grad_x L) and projects back onto the epsilon-box (40 steps of 0.01 on MNIST; 7 steps of 2 on CIFAR-10).
3. Outer minimization (Defense)
Updates network weights theta at the PGD maximizer via Danskin’s theorem.
High-capacity SGD
Minimizes expected worst-case loss min_theta E[max L] across epochs using fresh random restarts every batch.

Formulation from Madry et al. (2017), Sections 2, 3, and 5.

Why one-step defenses break and why PGD maxima cluster

Standard Empirical Risk Minimization (ERM) optimizes average loss on clean inputs E[L(theta, x, y)], leaving decision boundaries razor-close to natural examples. Earlier defenses tried linearizing the adversary’s problem with the Fast Gradient Sign Method (FGSM), perturbing inputs in one step x + epsilon * sgn(grad_x L). Because that inner maximization is non-concave, researchers assumed finding true worst-case perturbations was intractable and settled for one-step approximations.

Madry et al. proved that shortcut is fatal for large perturbations. Training against one-step FGSM lets a network overfit to the narrow geometry of single-step gradients, a failure mode called label leaking. On CIFAR-10 (epsilon = 8), an FGSM-trained wide ResNet scored 95.1% accuracy on FGSM attacks, even higher than its 90.3% clean accuracy, because the step itself leaked class structure. Against 7-step or 20-step PGD, that seemingly invincible model scored 0.0%. (The authors also flag an earlier defense claiming 70% accuracy against FGSM at epsilon = 0.7, noting that shifting every normalized [0, 1] pixel by more than 0.5 allows an attacker to turn any image into uniform gray!)

To test whether the non-concave inner problem is actually solvable, the authors ran 100,000 random PGD restarts inside the l_inf box around evaluation images on MNIST and CIFAR-10. The surprise in Section 3.1 is geometric: although restarts converged to widely separated points (distances matching random points in the cube, angles near 90 degrees, and even negative inner products with the initial gradient), their final loss values clustered tightly with zero extreme outliers. That concentration justifies treating multi-step PGD with random starts as a universal first-order adversary: any attack relying only on input gradients should struggle to find significantly worse failures than PGD.

CIFAR-10 wide ResNet accuracy under three training regimes (epsilon = 8)
Standard ERM

Natural: 95.2%
FGSM: 32.7%
PGD (20 steps): 3.5%

FGSM training

Natural: 90.3%
FGSM: 95.1% (label leak)
PGD (20 steps): 0.0%

PGD training (10x wide)

Natural: 87.3%
FGSM: 56.1%
PGD (20 steps): 45.8%

White-box test set (10,000 images) from Madry et al. (2017), Table 5.

Capacity, Danskin’s theorem, and why clean accuracy drops

Even if PGD solves the inner attack, two conditions determine whether outer SGD produces a genuinely robust classifier: valid descent directions and sufficient model capacity.

Mathematically, computing grad_theta L(theta, x + delta*, y) at an inner maximizer delta* yields a valid descent direction for max_{delta in S} L by Danskin’s theorem (Appendix A). Although ReLU activations and max-pooling violate strict continuous differentiability on measure-zero sets, and PGD returns local rather than global maxima, the authors verify empirically (Figure 5) that adversarial training loss decreases steadily across training steps on both MNIST and CIFAR-10.

Architecturally, however, robustness demands far more parameters than clean classification. Separating clean data points can often be done with a smooth, near-linear boundary. Separating l_inf squares (x + S) around every data point forces the decision boundary to weave tightly around neighboring classes (Figure 3). When a network lacks capacity, training against PGD breaks completely: small MNIST convnets collapsed to always predicting a single fixed class rather than learning a non-trivial boundary.

Scaling capacity fixed both optimization and generalization. On CIFAR-10, widening a 5-unit ResNet by 10x ((16, 160, 320, 640) filters) dropped the PGD training saddle-point loss from 1.11 (simple ResNet) down to 0.0218, raised clean accuracy from 79.4% to 87.3%, and raised 20-step white-box PGD accuracy from 43.7% to 45.8%. Stronger training adversaries and higher capacity also cut black-box transfer attacks: between independently initialized wide ResNets, transferred PGD accuracy rose from 0.0%–10.9% (standard models) to 64.2% (wide PGD-trained), as gradients across separate training runs became noticeably less correlated (Appendix B). Yet clean accuracy still paid a 7.9-point tax (dropping from 95.2% to 87.3%), previewing the accuracy-robustness tradeoffs still debated in baseline safety defenses.

Inspecting what robust models learn (and where gradient checks mislead)

Training against PGD alters learned weights in surprising ways and exposes a subtle evaluation trap when models suppress input gradients. Switch through the five findings from Section 5 and Appendices B–C below (or use Left and Right arrow keys).

Five empirical discoveries inside PGD-trained models

Compare weight inspections, transfer defenses, and evaluation traps from Madry et al. (2017).

Adversarial training turned Layer 1 into 3 thresholding filters

Weight inspection

Inspecting the robust MNIST convnet revealed that 29 of 32 first-layer filters collapsed to zero, leaving three single-pixel threshold detectors.

Learned structure
Each active Layer 1 filter had only one nonzero weight, reducing convolution plus ReLU to ReLU(alpha * x - beta), which zeroes out any pixel below beta - epsilon.
Class biases
Layer 2 grew sparse with wider weight ranges, and softmax biases shifted strongly away from uniform to hedge vulnerable digit classes.
Why manual engineering failed
When the authors hard-coded those exact thresholding and sparsity tricks into a standard network without PGD training, PGD fooled 100% of test examples.
Measured evidence
Against epsilon = 0.3 on MNIST, the PGD-trained convnet hit 98.8% clean, 95.6% FGSM, 93.2% 40-step PGD, 89.3% 100-step PGD (20 restarts), and 94.0% CW.

Source: Madry et al. (2017), Sections 4, 5, and Appendices B through C.

If you skip the tabs, five findings summarize the paper’s empirical lessons:

  • MNIST filters: PGD training pruned 29 of 32 Layer 1 conv filters and turned the remaining three into ReLU(alpha*x - beta) pixel thresholders, reaching 89.3%+ accuracy against 100-step PGD (epsilon = 0.3).
  • CIFAR-10 wide: A 10x wider ResNet trained with 7-step PGD reached 87.3% clean, 45.8% 20-step white-box PGD, and 64.2% black-box transfer accuracy (epsilon = 8).
  • FGSM leak: FGSM-trained wide ResNets scored 95.1% on FGSM (beating 90.3% clean accuracy) yet dropped to 0.0% under 7-step PGD.
  • MNIST L2 trap: Threshold filters masked input gradients on l_2 tests, causing PGD to overestimate robustness at epsilon = 4.5 until exposed by a gradient-free Decision Boundary Attack.
  • Transfer decay: Increasing model width and training against PGD decorrelated gradients between independent copies, cutting black-box transfer success sharply.

Caveats and why the threat-model mindset endured

Three caveats bound what Madry et al. actually proved. First, PGD does not prove absence of gradient masking. As the authors added in their 2019 revision (citing Schott et al. and Brendel et al.), l_inf-trained MNIST learned threshold filters that stalled gradient-based l_2 PGD even at perturbations large enough to change the human ground-truth digit. Whenever an evaluation relies solely on gradients, dead or shattered gradients can mimic security.

Second, robustness stayed tightly scoped to the trained norm and radius. On MNIST, accuracy held steady up to epsilon = 0.3 and collapsed immediately past it, and l_inf pixel boxes do not protect against natural distribution shifts like lighting changes, rotations, or semantic jailbreaks. Third, robustness stayed expensive: even at 10x width on CIFAR-10, clean accuracy dropped nearly 8 points while more than half of white-box adversarial inputs still succeeded.

Years later, researchers adapting adversarial robustness to LLMs ran into the exact same pattern: surface-level filters break under stronger optimization, prompting deeper interventions like representation circuit breakers and stricter white-box and adaptive evaluations. For engineers shipping models into untrusted environments, Madry et al.’s discipline remains the baseline: state the exact perturbation set S you claim to resist, train against the strongest iterative adversary inside S, and pair gradient checks with gradient-free attacks so no hidden gradient mask passes your safety gate.