How Many Steps Until It Has Converged?

Gradient DescentMedium+20 XP+20

How Many Steps Until It Has Converged?

A model is trained on the loss

L(w)=5(w−2)2L(w) = 5(w - 2)^2L(w)=5(w−2)2

with the update rule

w←w−α L′(w),α=0.03w \leftarrow w - \alpha\, L'(w), \qquad \alpha = 0.03w←w−αL′(w),α=0.03

starting from w0=10w_0 = 10w0​=10.

The team does not watch the loss curve by eye. They use a fixed stopping rule:

Training is declared converged the first time the loss drops below 0.5%0.5\%0.5% of its value at the starting point.

How many steps are needed before the stopping rule fires?

Give a whole number of steps.

Walking Downhill, One Step at a Time

Step size stays fixed at α = 0.30 here.
-8-4048
new x = old x − α × slope
5.950 = 7.000 − 0.30 × 3.500
Steps taken: 0 · Loss now: 14.250

The slope tells you which way is uphill, so you subtract it to head downhill. Near the edge the ground is steep and the steps are long. As the ground flattens the slope shrinks, so the steps shrink with it, and the walk eases into the bottom instead of shooting past it.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

steps