Local and Global Extrema
When optimizing a function, the goal is often to find its absolute best or worst value. However, a function's landscape can be complex, featuring many 'hills' and 'valleys'. Understanding the difference between local extrema (the highest or lowest points in a specific region) and global extrema (the absolute highest or lowest points across the entire domain) is fundamental to successful optimization. This distinction guides how algorithms search and what they ultimately find.
Local Minima and Maxima
A local minimum is a point where the function's value is smaller than or equal to the values at all nearby points. Think of it as the bottom of a small dip or valley. Conversely, a local maximum is a point where the function's value is greater than or equal to the values at all nearby points, like the peak of a small hill. These points are significant because they represent optimal solutions within a restricted neighborhood, even if better solutions exist elsewhere.
The definition of 'nearby points' is crucial for local extrema. A point is a local minimum if there exists some open interval around such that for all in that interval. The size of this interval can be arbitrarily small.
Global Minima and Maxima
A global minimum is the point where the function's value is the absolute smallest across its entire domain. Similarly, a global maximum is the point where the function's value is the absolute largest across its entire domain. Unlike local extrema, global extrema are unique in their value, though multiple points might achieve that same value. Finding these global points is often the ultimate objective in many optimization problems, such as minimizing a loss function in machine learning.
For a continuous function on a closed and bounded interval (or compact set in higher dimensions), the Extreme Value Theorem guarantees the existence of both a global maximum and a global minimum. For functions on open or unbounded domains, global extrema may not exist.
Critical Points: Where Gradients Vanish
A critical point of a function is any point where its gradient is either zero or undefined. For differentiable functions, this means the tangent line (in 1D) or tangent plane (in higher dimensions) is flat. Local minima, local maxima, and saddle points are all types of critical points. Identifying these points is the first step in finding extrema, as they are the only candidates where an extremum can occur within the interior of a function's domain.
For a function , a point is a critical point if the gradient vector at that point is the zero vector:
Saddle Points: Neither Min nor Max
A saddle point is a critical point that is neither a local maximum nor a local minimum. Imagine a saddle on a horse: it's a minimum along one direction (front-to-back) but a maximum along another (side-to-side). For optimization algorithms, saddle points are problematic because the gradient is zero, making it seem like an extremum has been found, but the function can still decrease or increase by moving in different directions. This can trap algorithms, preventing them from reaching true minima.
For a critical point where , let and .
- If and , then is a local minimum.
- If and , then is a local maximum.
- If , then is a saddle point.
- If , the test is inconclusive.
The Optimization Challenge
Optimization algorithms, such as gradient descent, primarily rely on the gradient to navigate the function landscape. They naturally gravitate towards points where the gradient is zero. While this is effective for finding local minima, it means these algorithms can easily get trapped in a local minimum or a saddle point, failing to reach the desired global minimum. Strategies like using different starting points, adding momentum, or employing more advanced optimization techniques are necessary to increase the chances of finding the global optimum.
Local extrema are the highest or lowest points within a specific neighborhood of a function, not necessarily across the entire domain.
Global extrema represent the absolute highest or lowest values a function attains over its entire domain, and their values are unique.
Critical points are locations where the function's gradient is zero or undefined; all local and global extrema (within the domain interior) are critical points.
Saddle points are critical points that are neither local minima nor local maxima, posing a challenge for optimization algorithms that can get stuck there.
The Hessian matrix and its determinant can classify critical points in higher dimensions, distinguishing between minima, maxima, and saddle points.
Optimization algorithms like gradient descent aim for global extrema but can converge to local minima or saddle points due to their reliance on local gradient information.
To find global extrema, consider multiple starting points, advanced optimization techniques, and evaluate function behavior at domain boundaries.