Adam Optimizer – The Smart Optimization Algorithm in Deep Learning

Adam Optimizer – The Smart Optimization Algorithm in Deep Learning

Why Adam Has Become the Default Choice for Most Modern Deep Learning Models?

Author
Nguyen Bao Huy
06:34:00 03/05/2026
3 min read
0 comments

Adam (Adaptive Moment Estimation) optimizer combines the advances of Momentum and RMSprop techinques to adjust learning rates during training. It works well with large datasets and complex models becuase it uses memory efficiently and adapts the learning rate for each parameter automatically.

How Does Adam Work?

Adam builds upon two key concepts in optimization:

1. Momentum

Momentum is used to accelerate the gradient descent process by incorporating an exponentially weighted moving average of past gradients. This helps smooth out the trajectory of the optimization allowing the algorithm to converge faster by reducing oscillations

The update rule with momentum is:

text
w(t+1)=wt−αmt

where:

  • mt​ is the moving average of the gradients at time tt
  • α is the learning rate
  • wt and wt+1​​ are the weights at time t and t+1, respectively

The momentum term mt​ is updated recursively as:

Figure 1. Exponentially Weighted Moving Average formula
Figure 1. Exponentially Weighted Moving Average formula

2. RMSprop (Root Mean Square Propagation)

RMSprop is an adaptive learning rate method that improves upon AdaGrad. While AdaGrad accumulates squares gradients and RMSprop uses an exponentially weighted moving average of squared gradients, which helps overcome the problem of diminishing learning rates.

The update rule for RMSprop is:

Figure 2. The update rule for RMSprop
Figure 2. The update rule for RMSprop

Combining Momentum and RMSprop to form Adam Optimizer

Adam optimizer combines the momentum and RMSprop techniques to provide a mỏe balanced and efficient optimization process. The key equations governing Adam are as follows:

Figure 3. Equations Governing Adam
Figure 3. Equations Governing Adam
  • Bias corresction: Since both mt và vt are initialized at zero, they tend to be biased toward zero, especially during the initial steps. To correct this bias, Adam computes the bias-corrected estimates:
[@portabletext/react] Unknown block type "latex", specify a component for it in the `components.types` prop
  • Final weight update: The weights are then updated as:
[@portabletext/react] Unknown block type "latex", specify a component for it in the `components.types` prop

Key Parameters

  • α: The learning rate or step size (default is 0.001)
  • β1​​ and β2​​: Decay rates for the moving averages of the gradient and squared gradient, typically set to β1=0.9 and β2​=0.999
  • ϵ: A small positive constant (e.g., 10−8) used to avoid division by zero when computing the final update

Why Adam Works So Well?

Adam addresses several challenges of gradient descent optimization:

  • Dynamic learning rates: Each parameter has its own adaptive learning rate based on past gradients and their magnitudes. This helps the optimizer avoid oscillations and get past local minima more effectively.
  • Bias correction: By adjusting for the initial bias when the first and second moment estimates are close to zero helping to prevent early-stage instability.
  • Efficient performance: Adam typically requires fewer hyperparameter tuning adjustments compared to other optimization algorithms like SGD making it a more convenient choice for most problems.

Performance of Adam

In comparison to other optimizers like SGD (Stochastic Gradient Descent) and momentum-based SGD. Adam outperforms them significantly in terms of both training time and convergence accuracy. Its ability to adjust the learning rate per parameter combined with the bias-correction mechanism leading to faster convergence and more stable optimization. This makes Adam especially useful in complex models with large datasets as it avoids slow convergence and instability while reaching the global minimum.

Figure 4. MNIST Multilayer Neural Networl + dropout
Figure 4. MNIST Multilayer Neural Networl + dropout

First Lesson

You are at the beginning of this curriculum.

Latest Tutorial

More chapters coming soon to this topic.

Author avatar

Nguyen Bao Huy

Lead Fullstack & AI Solutions Engineer

Specializing in Next.js App Router, React 19, TypeScript, and modern design systems. Passionate about creating seamless user experiences.

Discussion

0

No comments yet

Be the first to share your thoughts, question a concept, or provide additional tips!

Leave a Reply

Share your insights, questions, or solutions with the developer community.

Your avatar
0 / 500 characters