Adversarial Attacks and Defenses
Small input perturbations that fool models, and defenses: FGSM, PGD, and more.
Adversarial Examples (L-BFGS Attack)Adversarial examples are inputs that make a model misclassify through small perturbations people cannot notice. Szegedy et al. (2014) built them by using box-constrained L-BFGS to search for the nearest input classified as a specified class, and showed that these perturbations also fool other models and models trained on different data.
C&W AttackThe C&W attack searches for the nearest input classified as a chosen class by minimizing the sum of perturbation size and a logit-difference term with a change of variables and Adam. It comes in L0, L2, and L∞ variants, broke defensive distillation, and became a standard for evaluating defenses.
DeepFoolDeepFool approximates decision boundaries with hyperplanes and repeatedly steps perpendicular to the nearest one, finding a near-minimal perturbation that changes the prediction. It finds smaller perturbations than FGSM, far faster than the L-BFGS attack, and is used as a yardstick for measuring model robustness.
Fast Gradient Sign Method (FGSM)FGSM creates adversarial examples that make a model misclassify by shifting every pixel by the same small amount in the direction of the sign of the gradient of the loss with respect to the input, using a single backward pass. It is used as material for adversarial training and as a quick attack for checking how vulnerable a model is.
PGD Attack and Adversarial TrainingThe PGD attack builds adversarial examples by repeatedly moving the input a little in the direction that increases the loss and projecting it back into the allowed region. Madry et al. (2018) framed attack and defense as a min-max problem and showed that adversarial training on PGD adversarial examples yields models robust to a wide range of attacks.
TRADESTRADES is an adversarial training method whose loss adds, to the classification loss on the original input, a term penalizing the gap between the model's outputs on the original input and on a nearby adversarial example. Derived from a theory that splits robust error into natural error and boundary error, it tunes the trade-off between accuracy and robustness with a coefficient 1/λ.
