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

Which optimiser, which learning rate?

Six optimisers side by side, the pairs people confuse, and one problem run twice, where scaling the features matters more than the optimiser.

prints on 2 A4 pagesfrom 7 pages and 1 cataloguefree to read · PDF with a free accountUpdated 24 Oct 2026

Download PDF

The PDF and the Print button ask you to sign in; a free account is enough. Reading and Test yourself are open to everyone.

Side by side

The first columns are the Optimizers catalogue’s; the rest come from each page.

Say what each one answers, what it cannot see and when to reach for it, then reveal its row.

Optimiser Data per step State kept Tolerates noisy gradients Reach for it when Trap
Gradient descent whole dataset none n/a — exact a small, smooth problem whose every step can read all the data Unscaled features make the surface a ravine.
SGD 1 example none Yes — by design the dataset is large, which is nearly always SGD does not converge to a point at a fixed learning rate.
Mini-batch 32–512 none Yes always; the question is how large a batch Changing batch size silently changes the effective learning rate.
Adam mini-batch 2 values / parameter Yes — built for it the default for deep networks, and on badly scaled features Adam is not always better than SGD.
Conjugate gradient whole dataset 1 direction Poorly; mini-batch variants exist a smooth, exact objective with too many parameters for L-BFGS The line search costs function evaluations.
BFGS / L-BFGS whole dataset n×n, or ~10 pairs No a smooth, exact objective of moderate size Use L-BFGS above a few thousand parameters.

A formula is printed only when it is shorter than the words; the others are said in words, and each page has its formula.

Easy to confuse

The “what is the difference between…” questions, in two lines each.

  • Gradient descent vs SGD

    Gradient descent reads every row for one exact step; SGD takes one noisy step per row.

    SGD, or its mini-batch form, once the data is large; full gradients for small, smooth problems.

  • SGD vs Adam

    SGD moves every parameter by one learning rate; Adam scales each by its own gradient history.

    Adam to get going on any scaling; SGD with momentum when test accuracy is what is measured.

  • Conjugate gradient vs BFGS

    Both search along a line on the full data; L-BFGS also keeps a few gradient pairs to model the curvature.

    L-BFGS for most smooth problems; conjugate gradient when even that memory is too much.

  • Learning rate vs Batch size

    A bigger batch averages away gradient noise, so it can take a larger step; the two are tuned together.

    Change one, revisit the other.

One real run

One logistic regression run with each optimiser, on features scaled 1 to 1,000 and standardised.

Optimiser Passes, raw LRs, raw Passes, std LRs, std
grad-descent never 0 5 3
sgd never 0 1 6
mini-batch never 0 1 6
adam 5 4 1 5
conj-gradient 328 n/a 7 n/a
l-bfgs 48 n/a 4 n/a

“On badly scaled features, one learning rate cannot serve every direction.”

“Standardise, and the plain methods catch up.”

“A line search needs no learning rate, only full passes.”

The run and these lines are the worked example on Adam, as it printed: logistic regression, 4000 rows, 10 features; passes until within 0.01 of the minimum

Which one?

  1. How large is the data?

  2. Do you need it working quickly?

    • Yes, with little tuning Adam
  3. Is memory the limit?

Each answer is from its page’s “Why & when”.

All 29 traps on these pages

Each is the opening line of a pitfall; its page says why.

Gradient descent

  • The learning rate is the first thing to check when training fails.
  • Unscaled features make the surface a ravine.
  • A fixed learning rate is a compromise.
  • Convergence is to a local minimum.

SGD

  • SGD does not converge to a point at a fixed learning rate.
  • The loss curve will be jagged.
  • Sorted data is dangerous.
  • Pure one-example SGD wastes hardware.

Mini-batch gradient descent

  • Changing batch size silently changes the effective learning rate.
  • The last batch is smaller.
  • Batch size interacts with normalisation.
  • Powers of two are a runtime question, not a statistical one.

Adam

  • Adam is not always better than SGD.
  • Use AdamW for weight decay.
  • Bias correction matters early.
  • Epsilon is not only numerical hygiene.

Conjugate gradient

  • It needs an accurate gradient.
  • Restart it periodically.
  • Conditioning still matters.
  • The line search costs function evaluations.

BFGS

  • Use L-BFGS above a few thousand parameters.
  • Give it an analytic gradient.
  • No learning rate is a feature with a cost.
  • Smoothness is what the theory assumes, not a hard requirement.

Learning rate

  • Reading divergence as a bug.
  • Assuming there is one right value.
  • Tuning it on a linear grid.
  • Changing the batch size and leaving the rate alone.
  • Expecting an adaptive optimiser to make the choice.

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