Course contentsShow
← Machine Learning and Deep Learning
Lesson 3390 of 3,53874. Adversarial RobustnessFree lesson

Basic Iterative Method (BIM) and PGD

Understand iterative gradient-based attacks that apply FGSM repeatedly with projection to generate stronger adversarial examples.

Basic Iterative Method (BIM) and PGD

You'll learn: How iterative gradient-based attacks apply FGSM repeatedly with projection to craft far more effective adversarial examples than single-step methods.

The Core Idea

You already know FGSM takes one gradient step to perturb an image. Basic Iterative Method (BIM) and Projected Gradient Descent (PGD) take the same gradient-sign idea but apply it multiple times with smaller steps, like carefully climbing a hill versus taking one giant leap.

Think of it as refining your attack: instead of asking "which single perturbation fools the model?", you ask "which sequence of small perturbations gets me there while staying within the allowed budget?"

How It Works

BIM starts with the original image and applies FGSM repeatedly:

  • Take a small gradient step (smaller than FGSM's ε)
  • Project the result back into the allowed perturbation ball (clip to ensure total change ≤ ε)
  • Repeat for multiple iterations

PGD is essentially BIM with random initialization—instead of starting from the clean image, you start from a random point within the perturbation budget, then iterate. This helps escape poor local optima.

The projection step is critical: after each gradient update, you ensure the total perturbation hasn't exceeded your threat model's bounds. This constraint keeps the adversarial example "valid."

Why They're Stronger

Multi-step attacks explore the loss surface more thoroughly. FGSM might miss the optimal attack direction; iterative methods navigate around defenses and find more reliable adversarial examples. PGD is considered the gold standard for evaluating adversarial robustness.

Key Takeaway: BIM and PGD apply FGSM iteratively with projection, creating stronger adversarial examples by taking multiple small, constrained steps through the gradient landscape.