Visual walkthrough — Hyperparameter tuning for deep nets
This is the visual companion to the parent topic. If you have never met the word learning rate, start at Step 1 — we assume nothing.
Step 1 — What is the learning rate, as a picture?
WHAT: picture a valley (the loss). You are a ball on its side wanting to reach the bottom.
WHY matters so much: it multiplies every step, forever. Too small and you crawl; too big and you leap clean over the bottom and up the far wall. Look at the figure: three balls, three values of .

Step 2 — The knob is multiplicative, not additive
WHAT: compare two changes that look very different on a ruler but feel the same to the network.
WHY this is the whole story: if the effect lives in ratios, then the sensible values of are spread across orders of magnitude — — not evenly along a normal number line. A knob whose effect is multiplicative should be searched multiplicatively.
PICTURE: the figure shows a normal ("linear") ruler on top and a "×10 each tick" ruler (a log ruler) below. The four candidate learning rates crowd into one corner on the linear ruler but sit evenly spaced on the log ruler.

Step 3 — The disaster of uniform sampling (the thing we must avoid)
WHAT: draw many random uniformly and see where they land.
WHY it fails: the range is wide, while is only wide — ten times narrower — and is a hundred times narrower still. Uniform sampling drops points by area, so roughly 90% of all draws fall in that top decade , and the small values almost never get tested.
PICTURE: the histogram below piles nearly all samples into the largest decade. The tiny learning rates — often exactly the ones a delicate network needs — are essentially never explored.

Step 4 — The fix: sample the exponent, not the value
WHAT: roll a uniform number for the power of ten, then take that power of ten.
WHY it works: picking evenly on means each decade — , , … — is an equal-width slice of , so each gets an equal share of samples. Convert back and every ×10 band of is explored equally.
PICTURE: the same random draws as Step 3, but now generated by . On the log ruler they are spread flat and even; every decade has its fair handful of points.

Step 5 — Proving it: the density comes out as
WHAT we do: transform the flat density from -world into -world using that change-of-variables rule
- = flat: uniform in means constant height.
- = the stretch factor: how many units of correspond to one unit of right here.
WHY the derivative of the log: since , we need . Using and :
Put it together (and note , so this is already positive — the is safe):
- and = fixed constants, they don't depend on .
- = the shape that matters: density falls off like one-over-.
WHY is exactly "equal per decade": the chance of landing in a band is the area under , which is — it depends only on the ratio . Every decade has ratio , so every decade has equal probability. ∎
PICTURE: the smooth curve, with three decades shaded — each shaded area is equal, even though the curve is far taller on the left.

Recall Why does the
curve give equal decades? Because the area under from to is , which depends only on the ratio. Every decade is a ×10 ratio, so every decade has equal area = equal probability.
Step 6 — Edge cases: zero, negatives, and endpoints
Case . On a log scale is infinitely far to the left (), so it is never sampled and never should be — a zero learning rate means no learning at all (the update becomes ). This is a feature: log sampling automatically refuses the useless value.
Case . A negative learning rate would step uphill, increasing the loss — nonsense. Log sampling cannot produce it, since for every real . Safe by construction.
Case: the endpoints . These are your honest bounds. Choose small enough that the loss is still flat (nothing happens) and large enough that training diverges, so the useful region sits inside the range, never clipped at an edge.
Case: a knob that lives in , like dropout probability or momentum . Here the interesting action is near the top edge (). Log-sampling itself is wrong; instead log-sample the distance from 1, i.e. . That is why the parent's table says "linear-in-".
PICTURE: a number line marking the forbidden zone (, greyed), the flat zone, the productive band, and the divergence zone — showing where good bounds should sit.

Step 7 — Random beats grid, because of this scale
WHAT: with a fixed budget of runs, compare grid (fixed lattice of values) against random (each run gets fresh random values) when only one of two knobs actually matters.
WHY random wins: on a grid, the important knob is tested at only as many distinct values as one grid axis (say 5), and whole rows are wasted repeating it. Random search gives the important knob a different value on every single run, so 25 runs test it at 25 distinct spots — and because we draw those on the log scale, they're spread across all decades, not bunched up.
PICTURE: the classic Bergstra–Bengio panel — grid projects onto 5 columns; random projects onto 25 spread-out points along the knob that matters.

See Cross-Validation and Data Splits for which data measures each run's score, and Learning Rate Schedules and Warmup for what to do after you've found a good .
The one-picture summary

The whole derivation compressed: a multiplicative knob (top) → uniform-in-value wastes 90% on one decade (left) → sample the exponent instead (middle) → density becomes , equal per decade, never negative, never zero (right).
Recall Feynman retelling — say it like a story
The learning rate is how big a step the network takes downhill. What matters isn't the raw size but the ratio — doubling is doubling whether you're at or . So sensible learning rates are spread across powers of ten, not evenly along a ruler. If I pick numbers evenly between and , almost all of them land in the top tenth and I never try the tiny ones — a total waste. The cure is to pick the exponent evenly instead: roll a number between and , then use to that power. Because stretches the line, a flat choice of exponent turns into a pile-up — which, when you measure it decade by decade, gives equal probability to every ×10 band. And it can never hand you a zero or negative learning rate, which would mean "don't learn" or "climb uphill". Finally, since only a knob or two really matter, random draws on this log scale beat a rigid grid, because every run tests the important knob at a brand-new, well-spread value.