One Step Downhill

Introduction to Calculus & ChangeMedium+20 XP+20

One Step Downhill

A very small model has a single weight www. How badly it performs is measured by a loss function

L(w)=w2−6w+13L(w) = w^2 - 6w + 13L(w)=w2−6w+13

and training's whole job is to make LLL smaller. It does that by repeatedly nudging www using this rule:

wnew=wold−η L′(wold)w_{\text{new}} = w_{\text{old}} - \eta \, L'(w_{\text{old}})wnew​=wold​−ηL′(wold​)

Here L′(w)L'(w)L′(w) is the instantaneous rate of change of LLL at the weight www, and η\etaη (the learning rate) controls how big the nudge is. For this run,

η=0.3,wold=5\eta = 0.3, \qquad w_{\text{old}} = 5η=0.3,wold​=5

The model takes exactly one step.

By how much does the loss decrease? Report a positive number, rounded to two decimal places.

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.