AI engineering glossary · Calculus optimisation

What is SAM (sharpness-aware minimisation)?

Sharpness-aware minimisation (also called SAM): A training method that seeks parameters lying in neighbourhoods with uniformly low loss. Each step first perturbs the weights in the direction that raises the loss most, then takes the gradient there, which steers optimisation toward flat minima.

Level: advancedTopic: Calculus optimisation

Sharpness-aware minimisation: an example

Each SAM update needs two gradient computations, one at the current weights and one at the perturbed weights, roughly doubling the cost per step.

Related terms

More Calculus optimisation terms

Where you learn it

Sharpness-aware minimisation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.