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^5random PGD restarts inside thel_infperturbation 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.
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.
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).
Compare weight inspections, transfer defenses, and evaluation traps from Madry et al. (2017).
Adversarial training turned Layer 1 into 3 thresholding filters
Weight inspectionInspecting 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.
10x wider ResNet held 45.8% white-box and 64.2% transfer accuracy
BenchmarkTraining a 10x wider ResNet against 7-step PGD (epsilon = 8) produced the first CIFAR-10 model resilient to iterative white-box attacks.
- Training setup
- 7-step PGD with step size 2 and epsilon = 8, using a single random start per image per epoch across training.
- White-box scores
- 87.3% natural, 56.1% FGSM, 50.0% 7-step PGD, 45.8% 20-step PGD, and 46.8% Carlini-Wagner (CW) accuracy (Table 2 & 5).
- Black-box transfer
- 64.2% against PGD transferred from an independent PGD-trained copy (A'), and 86.0% against PGD from a naturally trained copy (A_nat).
- Remaining cost
- Clean accuracy fell 7.9 percentage points below natural training (87.3% vs. 95.2%), and more than half of white-box PGD inputs still fooled the model.
FGSM training hit 95.1% on FGSM yet 0.0% on PGD
IllusionOne-step adversarial training overfit to linear step artifacts, creating the illusion of higher accuracy under attack than on clean data.
- Why naive defense breaks
- FGSM always steps to corners using unperturbed gradients at x; the network learns to detect that one-step pattern ('label leaking') rather than smoothing loss.
- Measured evidence
- Wide FGSM-trained CIFAR-10 scored 90.3% clean, 95.1% FGSM, 95.0% FGSM-random, and 0.0% against both 7-step and 20-step PGD (Table 5).
- When FGSM works
- Only for tiny epsilon values where loss remains nearly linear inside the ball; at larger radii like epsilon = 8 or 0.3, multi-step training is essential.
- Evaluation rule
- Always benchmark defenses with iterative multi-step attacks and multiple random restarts, never only the attack used during training.
Threshold filters blinded PGD during l_2 evaluation on MNIST
Gradient maskingAn l_inf-trained MNIST model appeared immune to PGD even at l_2 epsilon = 4.5, until a gradient-free attack exposed brittle boundaries.
- Why PGD lied
- The learned pixel-thresholding filters ReLU(alpha * x - beta) had zero gradients over large regions, starving gradient-based PGD of search direction.
- Non-gradient check
- Running the 2,000-step gradient-free Decision Boundary Attack (DBA, Figure 6b) revealed the model was far more brittle in l_2 norm than PGD claimed.
- Epsilon cliff
- Even under l_inf PGD (Figure 6a), MNIST accuracy plummeted right past the training radius epsilon = 0.3 because thresholds overfit to that exact margin.
- Evaluation rule
- Pair gradient-based PGD checks with gradient-free or score/decision attacks so gradient masking cannot masquerade as robustness.
Stronger training and wider models decorrelated attack gradients
Black-boxIncreasing network capacity and switching from standard to PGD training reduced black-box transferability between independent models.
- Why standard models transfer
- Independently initialized standard networks share strongly correlated input gradients on natural images (Appendix B, Figure 8), letting attacks transfer easily.
- Mechanism
- PGD training and 10x width reduce gradient alignment across runs and raise the threshold needed for transferred perturbations to raise target loss.
- Measured evidence
- Transferred 7-step PGD from an independent copy dropped CIFAR-10 simple standard models to 6.6%, whereas wide PGD-trained held 64.2% (Table 4).
- Takeaway
- Black-box transfer accuracy is consistently higher than white-box accuracy, making white-box PGD the stricter engineering stress test.
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_2tests, causing PGD to overestimate robustness atepsilon = 4.5until 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.


