How The Inner Maximization Is Solved

The inner is itself an optimization problem and is approximated by gradient ascent on the input.

FGSM (Fast Gradient Sign Method) takes a single step in the sign of the input gradient:

FGSM is fast (one extra forward-backward) but weak — a one-step linear approximation often misses the worst-case perturbation. Example: for a handwritten 7, FGSM produces a perturbed image that still looks like a 7 to humans but the model misclassifies as 1.

PGD (Projected Gradient Descent) iterates FGSM and projects back onto the -ball after each step:

PGD with random restart is the standard “strong” attack used to evaluate robustness. Training on PGD-generated examples (Madry-style adversarial training) is the most common reliable defense, at the cost of roughly more compute per step where is the number of inner iterations.