TL;DR
Global optimization means finding the smallest value a function takes over its whole domain, not just the smallest value in the valley you happen to be standing in. Gradient descent is fast, but it only finds a local minimum, and it can settle in the wrong valley. Global methods pay extra work to search more widely, and no method can guarantee the answer without some assumption about how smooth the function is.
Where you'll see it: fitting model settings where the error surface has many valleys, predicting the shape of a molecule by finding its lowest-energy arrangement, and tuning the design of a circuit or a mechanical part.
Intuition
Many valleys, one deepest
Picture a landscape with several valleys. Drop a ball at a random point and let it roll downhill. It stops at the bottom of whichever valley it landed in. That bottom is a local minimum: nothing nearby is lower. The lowest valley overall is the global minimum, and the ball has no way to know whether it found it.
Gradient descent is the ball rolling downhill. It is very good at reaching the bottom of the valley it starts in, and it has no way to tell whether a lower valley exists elsewhere. Global optimization is the question of how to look beyond the valley you are in, without searching every point of the landscape.
The plot below shows a one-dimensional example with two valleys. The left valley is the local one, and the right valley is the global one.
- f(x)
Convexity is the special case that makes this easy
A convex function is shaped like a single bowl, with no false valleys. For a convex function every local minimum is the global minimum, so gradient descent is enough. Global optimization is the study of what to do when the function is not convex, which covers most of the problems that matter in practice. The key difficulty is that a local method cannot tell a deep valley from a shallow one just by looking at the slope where it stands.
The math
Definitions
Let be a function on a domain , such as a box in . A point is a global minimiser if
A point is a local minimiser if the same inequality holds for every in some neighbourhood of . Every global minimiser is a local minimiser, but not the other way round. Gradient descent, from Gradient Descent, converges to a point where the gradient is zero, which is a local minimiser under the usual conditions. It has no mechanism to compare that point with the rest of .
Why convexity helps
If is convex, then for any two points the chord between them lies on or above the graph. A consequence is that a point where the gradient vanishes is a global minimiser. A non-convex function can have many such points, each a local minimiser with a different value. The gap between the best and worst of them can be arbitrarily large.
A lower bound from smoothness
Global methods often rely on a bound on how fast the function can change. Say is -Lipschitz on an interval, meaning for all and in it. Take an interval with centre and half-width . For any in we have , so
The right-hand side is a lower bound on the function over the whole interval, computed from one evaluation. If the best value found so far is , and , then no point in can beat , so the whole interval can be discarded. This is the basis of branch and bound: split intervals, bound each one, and discard the ones that cannot contain the minimum. The method works only when a Lipschitz constant is known or can be bounded, which is the assumption that Lipschitz Continuity describes.
What cannot be guaranteed
Without some assumption, no finite procedure can certify the global minimum of a continuous function. Take any function that is zero on a large region and place a very narrow dip somewhere in it. A finite set of evaluation points can miss the dip entirely, and nothing in the samples reveals that it exists. The Lipschitz bound is what rules this out, because a narrow dip needs a steep slope, and a steep slope is limited by .
Worked examples
Use the function on the real line. On the branch the minimum is at with value . On the branch the minimum is at with value . The two branches are equal at , so starting points to the left of fall into the left valley and points to the right fall into the right valley.
- Start at . This is on the left-valley side, so use the branch . Its derivative is .
- Gradient at : . With step size , the update is .
- Gradient at : . So .
- Each step halves the distance to , so the iterates converge to and . This is a local minimum, not the global one.
- Start at instead. The branch is now the smaller one, with derivative . The first step is , and the iterates converge to with .
- A simple multi-start strategy runs the local method from several points and keeps the best result. Here, starting points at and give two sets of results. Starts at and end at , and starts at , and end at . Keeping the best of these gives the global minimum, .
Interpretation: a single run from the wrong side reports a plausible answer that is wrong by 0.5. Running from several points and keeping the best is a cheap first defence, though it is not a guarantee, since a valley narrower than the spacing of the starts can be missed.
Keep the same function on . Each branch has slope at most 6 in absolute value there, so is 6-Lipschitz on this interval. The best value found so far is , from the point .
- Consider the interval . Its centre is and its half-width is .
- The centre value is .
- The lower bound over the interval is .
- Since , no point in this interval can be lower than the best value found, so the interval is discarded.
- A wider interval , with centre and half-width , gives the bound . This is below , so it cannot be discarded yet, and it must be split further.
Interpretation: the bound becomes useful only when intervals are narrow enough. The width at which the centre value of can be ruled out is . Splitting continues until every interval is either discarded or small enough to be certain.
Tradeoffs and failure modes
| Method | Idea | Strength | Weakness |
|---|---|---|---|
| Multi-start local search | Run gradient descent from many random points, keep the best | Simple, parallel, reuses existing local solvers | Can miss a narrow valley, and cost grows with the number of starts |
| Grid or exhaustive search | Evaluate on a fine grid | Easy to reason about in one or two dimensions | Cost grows exponentially with dimension |
| Simulated annealing | Random moves, accepting uphill moves with a probability that shrinks over time | Escapes local minima without gradients | Needs a cooling schedule that is hard to tune |
| Basin hopping | Local minimisation, then a random jump, then accept or reject the new basin | Good on rugged landscapes such as molecular energies | Results depend on the jump size and acceptance rule |
| Branch and bound | Split intervals and prune with a Lipschitz lower bound | Can certify a global minimum to a tolerance | Needs a known Lipschitz constant, and cost grows fast with dimension |
A common mistake is to trust a single local run. Another is to assume that more random starts always help: in high dimensions the chance that a random start lands near the global valley can be tiny. Tuning matters too. Simulated annealing that cools too quickly freezes into a local valley, and one that cools too slowly wastes its budget.
For machine learning, the picture is different. Training a large neural network is non-convex, but in practice the local minima found by gradient methods often have similar loss values, so a single good run is usually acceptable. The hard cases are those with a few deep, isolated valleys, such as molecular energy surfaces and design problems with a small number of good solutions.
History
Local search with random moves is much older than the modern theory. In 1953, Nicholas Metropolis and colleagues proposed a random-walk method for simulating physical systems, which accepted uphill moves with a probability that depends on the energy difference and the temperature. This acceptance rule later became the engine of simulated annealing.
In 1983, Scott Kirkpatrick, Charles Gelatt and Mario Vecchi used the same idea as an optimisation method, slowly lowering a temperature parameter so that the search could leave local valleys early and settle into a good one late. The method caught on because it needed nothing from the function except the ability to evaluate it, and it worked on problems such as circuit layout, where no gradient was available.
In the late 1990s, David Wales and Jonathan Doye applied basin hopping to the structures of small clusters of atoms that interact through the Lennard-Jones potential. Their approach combined local minimisation with random jumps between basins. It found lowest-energy structures that were hard to reach with plain local search, and it remains a standard tool in computational chemistry. The broader theory was shaped by the no-free-lunch results of Wolpert and Macready in 1997, which showed that no single search method is best on every function.
Check yourself
QuestionWhy can gradient descent get stuck at a point that is not the global minimum, and what property of a convex function prevents this?Show answer
Gradient descent moves only in the direction of decreasing slope. Near a local minimum the slope is zero or points back into the valley, so the method stops there regardless of what lies elsewhere. A convex function has a single bowl, so every local minimum is also the global minimum. Convexity removes the false valleys that trap the method.
QuestionFor , starting at with step size , what is , and which minimum does the method head toward?Show answer
At , the two branches are and . The second is smaller, so the derivative is . The update is . The method heads toward , the local minimum with value 0.5, because lies left of the boundary at .
QuestionWhy does a Lipschitz bound make global minimisation of a continuous function possible in principle, when without one no finite search can certify the minimum?Show answer
With a bound on the slope, the value near any sample is limited: nothing within distance of a point can be lower than . So a narrow dip cannot hide between samples, because it would need a slope steeper than to exist. The bound lets an algorithm rule out whole intervals with finitely many evaluations. Without it, a dip of any width can be placed between samples and go unseen.
QuestionYou run gradient descent on a neural network from ten random initialisations and get ten different final losses. What does this suggest, and what would you check?Show answer
It suggests the loss surface has several local minima, or flat regions, that the starts reach differently. Whether this matters depends on the spread. If the losses are close and the held-out performance is similar, the local minima are probably acceptable. If the spread is large, you would check the initialisation scheme, the learning rate, and whether the final models perform differently on held-out data. Running more starts and keeping the best on validation data is the standard multi-start response.