Explain a learning-rate schedule by example
Check signs and decimal points before moving to the next value. · 168 words
A learning rate is the size of one gradient-descent update, and a schedule changes that size over time. Gradient descent subtracts eta times the gradient, so a negative gradient increases theta here. For y_hat = theta*x, use L = 0.5*(theta*x - y)^2, whose gradient is (theta*x - y)*x. Start with theta = 0 and the pair x = 2, y = 4. Use eta_t = 0.1/(1+t). At t = 0, eta = 0.1 and the gradient is (0 - 4)*2 = -8, so theta becomes 0.8.
At t = 1, eta = 0.05. The gradient is (0.8*2 - 4)*2 = -4.8, so theta becomes 0.8 - 0.05*(-4.8) = 1.04. A fixed rate of 0.1 would give 1.28 instead. At t = 2, eta is about 0.0333. The gradient is (1.04*2 - 4)*2 = -3.84, so theta becomes 1.168. Since the target prediction is 4, these updates are moving toward it. A decaying schedule reduces later steps and can limit overshooting, but the loss curve must still be checked.
Check your recall
At t = 1, what learning rate is used, and what value of theta results after the update?
Check your answer
The learning rate is eta = 0.05. The gradient is -4.8, so theta_new = 0.8 - 0.05*(-4.8) = 1.04.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Linear regression.