Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

Optimization · 6 compared

Optimizers

Definition

Every optimiser here descends a gradient — they differ in how much data each step looks at, and how much they remember between steps. Those two axes explain the whole family.

Comparison

Name What it adds Data per step State kept Tolerates noisy gradients
Gradient descent The base rule. Step against the gradient of the full training set, scaled by a fixed learning rate. Full page →whole datasetnonen/a — exact
SGD Estimates the gradient from one example. Far worse per step, far more steps, and the noise helps escape poor minima. Full page →1 examplenoneYes — by design
Mini-batch Averages over a small batch. Cuts the noise and matches how parallel hardware actually works. Full page →32–512noneYes
Adam Keeps running averages of the gradient and its square, giving every parameter its own effective step size. Full page →mini-batch2 values / parameterYes — built for it
Conjugate gradient Chooses each direction so it does not undo earlier progress. Kills the zig-zag with almost no memory. Full page →whole dataset1 directionPoorly; mini-batch variants exist
BFGS / L-BFGS Infers curvature from how the gradient changed between steps, then aims each step using it. Full page →whole datasetn×n, or ~10 pairsNo

On the cheat sheet: Optimizers →

Two axes, not a ranking

The table is sorted by neither speed nor quality, because neither orders this family. What separates these methods is two independent choices.

How much data does one step look at? All of it gives an exact gradient at enormous cost per step. One example gives a cheap, noisy one. A mini-batch sits between, and that is where almost all deep learning lives [2, §12.5].

How much is remembered between steps? Plain descent remembers nothing. Adam keeps two numbers per parameter. Conjugate gradient keeps one direction. BFGS keeps an entire curvature matrix — and L-BFGS exists because that matrix stops fitting in memory long before modern models stop growing.

The split that actually matters

Read the last column and the family divides cleanly in two.

Methods that tolerate noise — SGD, mini-batch, Adam — are what neural networks are trained with. They assume every gradient is an estimate, and are built to make progress anyway.

Methods that do not — conjugate gradient, BFGS — are faster and better aimed when gradients are exact, and unreliable when they are not. Both infer something about the landscape from the relationship between successive gradients, and mini-batch noise corrupts that inference: second-order updates "typically require much larger batch sizes, like 10,000" [1, §8.1.3].

This is why methods that are standard in scientific computing are rare in deep learning, despite converging in far fewer iterations. Rare, not absent: practitioners report reasonable results with nonlinear conjugate gradients, and mini-batch versions have been used successfully [1, §8.6.2].

Choosing

  • Training a neural network → Adam, or AdamW if you want weight decay. Tune SGD with momentum only if a benchmark number justifies the effort.
  • Fitting a smooth model with exact gradients → L-BFGS. It is already the default solver for logistic regression in most libraries.
  • Very large, sparse, deterministic problem → conjugate gradient, where the memory cost of a curvature estimate is unaffordable.
  • Understanding what any of them do → plain gradient descent. Everything else in the table is a modification of that one update rule.

What none of them fix

An optimiser searches the landscape it is given. If the loss surface is a ravine because features are on wildly different scales, every method here struggles — Adam least, but none of them escape it. Scaling the inputs changes the landscape itself, and usually helps more than changing the optimiser.

Sources

  1. Goodfellow, Bengio, Courville. Deep Learning (2016)bookhttps://www.deeplearningbook.org/
  2. Zhang, Lipton, Li, Smola. Dive into Deep Learningbook · retrieved 2026-08-31https://d2l.ai/

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com