EasyDeepLearn

What does SAM (Sharpness-Aware Minimization) do?

hard

Answer

  • SAM (Foret et al., 2020) minimizes a surrogate that penalizes sharp minima: for each step, first perturb θ in the direction that maximizes the loss within a small ball (θ  +  ρ    L  /  L)({\theta}\; + \;{\rho}\; \cdot \; \nabla L\; / \; \mid \mid \nabla L \mid \mid ), then compute the gradient at that perturbed point and update the original θ.
  • Roughly 2x compute per step, but consistently improves generalization on vision and NLP benchmarks.
  • Extended in adaptive SAM variants.
Check yourself — multiple choice
  • SAM sharpens the minimum
  • Compute gradient at a perturbed θ that maximizes local loss — penalizes sharpness → flatter minima
  • SAM removes momentum
  • SAM has zero overhead

SAM: gradient at a worst-case perturbation → flatter minima, ~2× cost, better generalization.

#optimizers#regularization

Practise Deep Learning

214 interview questions in this topic.

Related questions