Skip to content

When Downhill Leads to Different Valleys

Math Toolbox · One focused lesson

Change the starting point while keeping the same loss. Watch actual gradient updates reach different valleys.

Reading tips and color key

Start with the explanation and experiment. Open the symbol cards when you want the details. Teal: probabilities; blue: states; orange: actions; green: rewards; purple: values; gray: parameters and settings; crimson: losses and errors. Written labels give every symbol its role.

A slope sees nearby ground, not the whole landscape

Imagine walking downhill in fog. You can feel the slope beside your feet, but another valley may be deeper. Where you start can decide where you finish.

Why study this? A single bowl has one best answer. Many learning objectives have several valleys, flat regions, and saddle points.

How do we investigate? Hold the objective fixed, change the starting point, and inspect actual gradient steps.

What can we conclude? A small slope signals little local first-order change. It does not certify a global minimum.

\[\begin{aligned}{\color{#ae2455}{f}}({\color{#525968}{w}})&=({\color{#525968}{w}}^2-1)^2+0.2{\color{#525968}{w}}+0.25,\\{\color{#ae2455}{g}}({\color{#525968}{w}})&=4{\color{#525968}{w}}({\color{#525968}{w}}^2-1)+0.2,\\{\color{#525968}{w}}_{k+1}&={\color{#525968}{w}}_k-{\color{#525968}{\alpha}}{\color{#ae2455}{g}}({\color{#525968}{w}}_k).\end{aligned}\]
Symbols for a landscape with two valleys · show / hide
Symbols for a landscape with two valleys
SymbolJobExample
w, k, αReal adjustable parameter, nonnegative update count, positive step size; gray settingsw=0.4, α=0.05
f(w), g(w)=f′(w)Scalar loss and its derivative; crimsonf(0.4)=1.0356; g(0.4)=−1.144

Build one update: 0.4 − 0.05 × (−1.144) = 0.4572. The negative slope moves us right. This can approach the right valley even though the left valley is lower.

Try two starting points on the same landscape

Crimson: actual loss. Blue circles: successive parameter settings. No tangent or connecting shortcut is drawn. Displayed numbers are rounded; updates use full precision. Hover or focus a point for its update number.

Show the recorded updates

At most 300 updates. Stops when |gradient|≤0.001, the update budget is reached, or a step leaves the displayed interval [−2,2]. A small gradient is not a global-optimum certificate.

StepOld wGradientNew wNew loss

Build a backward signal, multiplier by multiplier

Start with incoming gradient 1. Each stage multiplies it by the same local derivative c. This is a scalar chain-rule example, not a neural-network training run.

Show every multiplication
StageIncomingMultiplyOutgoing

What can help, and what it cannot promise

Match the response to the difficulty · show / hide
Match the response to the difficulty
SituationResponse and reasonLimitation
Different starting points reach different valleysTry several initializations; compare the same objective. Restarts explore different attraction regions.More computation; a finite number of starts cannot generally certify the global best.
Slow motion or zigzaggingMomentum accumulates directions: v←βv+g, w←w−αv, with 0≤β<1. Consistent slopes can build speed.It can overshoot or cross a valley; it is not guaranteed to escape a local minimum.
Noisy data already require sampled gradientsSGD noise can sometimes move across shallow barriers; mini-batches balance noise and work.Noise can also harm progress. Artificially adding noise does not turn this deterministic example into SGD on a dataset.
Steps jump across the plotReduce the learning rate or use an appropriate step-size search.Smaller steps improve local control, not knowledge of an unseen better valley.

A saddle is different from a valley. For F(x,y)=x²−y², the gradient is zero at (0,0). Moving along x raises F; moving along y lowers it. A flat plateau can also slow progress without being a minimum. A tiny gradient alone cannot distinguish these cases.

In an actual ML task, compare candidate models on held-out validation data too. A lower training loss is not automatically better performance on new examples. For deeper context, see the optimization chapter of Deep Learning.

Published inMath Toolbox

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *