The weight's journey 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3
The loss from the gradient descent topic: L(w) = (w − 3)² + 0.5, with its bottom at w = 3. The horizontal axis is the step, the vertical axis the weight. The yellow dot is the start, w = −1.
A small learning rate 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 lr 0.05
The blue curve is lr = 0.05. Each step multiplies the distance to the bottom by 0.9, so it shrinks by only 10 percent. The weight approaches slowly, always from the same side.
A largish learning rate 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 lr 0.05 lr 0.9
The black curve is lr = 0.9. Each step multiplies the distance to the bottom by −0.8: the weight jumps over the bottom to the other side and lands a little closer each time. It approaches in a zigzag.
A learning rate that is too large 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 lr 0.05 lr 0.9 lr 1.05
The yellow curve is lr = 1.05. The factor is −1.1: every step jumps over the bottom and lands farther than before. The weight moves away from the bottom and the loss grows; the curve stops where it leaves the chart.
Your learning rate 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 your lr 0.30
Your learning rate is 0.30: each step multiplies the distance to the bottom by 0.40. After 20 steps w = 3.00, at a distance of 0.00 from the bottom.
Where the limit is 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 your lr 0.30
For this loss the factor is 1 − 2 · lr. Below 0.5 the weight approaches from one side, between 0.5 and 1 it approaches in jumps, above 1 it moves away. In real models this limit is unknown; the learning rate is chosen by trying.
Why it matters 0 5 10 15 20 −2 0 2 4 6 8 step weight, w bottom, w = 3 your lr 0.30
The learning rate is the most tuned hyperparameter. Too small and training takes long, too large and the loss blows up. In deep networks the rate is lowered during training; methods like Adam give each weight its own rate.