The Same Valley, Turned

OptimizersHard+30 XP+30

The Same Valley, Turned

A model with two weights w1,w2w_1, w_2w1​,w2​ is trained on one of two loss surfaces:

LA(w1,w2)=50 w12+0.5 w22L_A(w_1, w_2) = 50\,w_1^2 + 0.5\,w_2^2LA​(w1​,w2​)=50w12​+0.5w22​

LB(w1,w2)=25 (w1−w2)2+0.25 (w1+w2)2L_B(w_1, w_2) = 25\,(w_1 - w_2)^2 + 0.25\,(w_1 + w_2)^2LB​(w1​,w2​)=25(w1​−w2​)2+0.25(w1​+w2​)2

Both are the same narrow valley: steep across, shallow along, with its bottom at (0,0)(0, 0)(0,0) where the loss is 000. In A the valley floor runs along the w2w_2w2​ axis. B is exactly A turned by 45° about the bottom, so its floor runs along the diagonal w1=w2w_1 = w_2w1​=w2​.

Each run starts at the matching point: A at (1, 7)(1,\ 7)(1, 7), and B at (42, 32)≈(5.66, 4.24)(4\sqrt2,\ 3\sqrt2) \approx (5.66,\ 4.24)(42​, 32​)≈(5.66, 4.24). In both cases that is 1 unit up the steep wall and 7 units along the floor from the bottom, with a starting loss of 74.574.574.5.

For reference, the gradients are

∇LA=(100 w1,  w2)\nabla L_A = \big(100\,w_1,\ \ w_2\big)∇LA​=(100w1​,  w2​)

∇LB=(50(w1−w2)+0.5(w1+w2),  −50(w1−w2)+0.5(w1+w2))\nabla L_B = \big(50(w_1 - w_2) + 0.5(w_1 + w_2),\ \ -50(w_1 - w_2) + 0.5(w_1 + w_2)\big)∇LB​=(50(w1​−w2​)+0.5(w1​+w2​),  −50(w1​−w2​)+0.5(w1​+w2​))

Three optimizers were raced on valley A. The table shows the number of steps until the loss fell below 0.010.010.01 and stayed there:

optimizersettingssteps on A
plain descentrate 0.0180.0180.018215215215
momentummemory 0.90.90.9, rate 0.010.010.01858585
Adammemory settings 0.90.90.9 and 0.9990.9990.999, rate 0.150.150.15747474

Momentum keeps a velocity vvv that starts at 000. Each step it updates v←0.9 v−0.01 ∇Lv \leftarrow 0.9\,v - 0.01\,\nabla Lv←0.9v−0.01∇L and then moves the weights by vvv. Adam is the standard version, with bias correction on.

The same three optimizers, with identical settings, are now raced on valley B from its matching start.

Which prediction for valley B is right?

Hints

Solve it to unlock the solution

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

Select all that apply.