Local vs Global Minima
A local minimum beats its neighbours; the global minimum beats everything. Training usually settles for local, and that turns out fine.
Why Does This Exist?
"Did training find the best weights?" has two readings. The global minimum is the best over the entire landscape; a local minimum is merely better than everything nearby. Gradient descent follows local slopes, so it can only promise something local. The gap between those promises is where a lot of optimisation anxiety lives.
Here is the good news the theory eventually delivered. Finding global minima of general non-convex functions is genuinely hard (NP-hard in the worst case), yet deep networks train well anyway. Three facts explain why: in high dimensions most critical points are saddles rather than traps, many distinct valleys perform about equally well, and valleys connect through low-loss paths more often than the one-dimensional pictures suggest. The local-versus-global distinction matters enormously in low dimensions and surprisingly little at scale.
The search procedure that finds the candidates, flat slopes plus curvature tests, is taught in critical points, maxima and minima. The landscape story around them, saddles and plateaus, continues in convex and non-convex optimisation.
The one idea you need first
A point is a local minimum if for all in some neighbourhood around it, and a global minimum if the inequality holds for every in the domain. Every global minimum is local; the reverse fails exactly when a second, deeper valley exists elsewhere.
Think of It Like This
Two lakes at different heights in fog
You stand in foggy mountains with an altimeter, tasked with finding the lowest lake. You walk downhill until the ground rises in every direction: a lakeshore. That is a local minimum.
But fog hides the next valley, whose lake sits fifty metres lower. Your altimeter proves your lake is the lowest nearby, and says nothing about the next valley. To check globally you would have to climb out, cross the ridge and descend again, paying altitude to gain information.
High-dimensional training is fog with a twist: there are so many directions that a point which looks like a lakeshore almost always has some direction still descending. True traps are rare; passes (saddles) are everywhere. The fog lifts differently than your three-dimensional instincts expect.
How It Actually Works
Take and find every candidate:
Flat slopes at and . The second derivative sorts them: , so the middle point is a local maximum with . At the outer points , both valleys, with values:
Both valleys tie at , so both are global minima. A descent starting at rolls into the right valley and stays there; reaching the left one requires climbing over the hill at 0. Same value, unreachable from each other by pure descent. That is the whole phenomenon in one line: local methods find a valley, not the valley.
Code
The point is the check: descents from different starts land in different valleys of equal value.
def descend(start: float, lr: float = 0.1, steps: int = 200) -> float: x = start for _ in range(steps): x = x - lr * (4 * x**3 - 6 * x) # gradient of x4 minus 3x2 plus 2 return x
print(round(descend(2.0), 4)) # -> 1.2247print(round(descend(-2.0), 4)) # -> -1.2247Both runs converge to with value . Two global minima, each invisible from the other side. Restarting found the twin; it did not find anything better, because nothing better exists.
Watch Out For
Reporting a converged run as the global best
Convergence proves the slope vanished, nothing more. In a landscape with valleys of different depths, one run reports one valley. If the depth matters (small models, scientific fitting, combinatorial objectives), restart from several widely spread starts and compare values instead of trusting a single trajectory.
Restarting with the same seed and calling it a restart
Two runs with identical initialisation, data order and augmentation follow identical trajectories to the identical valley. A restart ensemble needs genuine diversity: different seeds, different shuffles, ideally different architectures or data splits. Correlated restarts waste compute while looking diligent.
The Quick Version
- Local minima beat their neighbours; the global minimum beats every point in the domain.
- The quartic has twin global valleys at with value , split by a hill.
- Pure descent finds a valley, not the valley; reaching another means climbing first.
- Global optimisation is hard in general, yet deep networks train well because saddles dominate traps.
- Restart with genuinely different seeds when depth matters; identical seeds re-find the same valley.