Skip to content

What is Adam Optimizer?

Also known as: Adam

Adam (Adaptive Moment Estimation) is a popular optimization algorithm used to train machine learning models by iteratively updating parameters based on gradients.

Adam combines the benefits of two other optimizers: momentum, which accelerates gradients in the right direction, and RMSprop, which adapts the learning rate for each parameter using a moving average of squared gradients.

It maintains two moving averages for each parameter: the first moment (mean of gradients) and the second moment (uncentered variance of gradients). These are bias-corrected and used to compute the update step, allowing efficient convergence even with noisy or sparse gradients.

Key hyperparameters include the learning rate, beta1 and beta2 (decay rates for the moments), and epsilon (for numerical stability).

Example

When training a neural network to classify handwritten digits, Adam can automatically adjust step sizes for different weights, helping the model learn faster and reach higher accuracy than basic gradient descent.

Why it matters

Adam is a default choice in most deep learning frameworks because it often converges quickly and reliably across a wide range of problems without extensive hyperparameter tuning.

Frequently asked questions

Adaptive Moment Estimation, referring to its use of first and second moment estimates of the gradients.