How to recognize a minimum
The topic Convex sets and functions showed that for a convex loss every local minimum is global. It did not say how to find one. This topic does: first we learn to recognize a minimum, then to walk to it.
We minimize a differentiable over all of . "Unconstrained" means any vector is allowed. For a model, is the loss and is the parameter vector .
First-order condition. If is a local minimum, then
Otherwise a small step against the gradient, the direction of steepest descent (see the topic Gradients, Jacobians and Hessians), would lower . Points with zero gradient are called critical (or stationary). Minima, maxima and saddle points are all critical.
Second-order conditions. At a critical point the gradient term of the Taylor expansion vanishes:
So the Hessian's quadratic form decides (see Symmetric matrices and quadratic forms):
- necessary: at a local minimum ;
- sufficient: and give a strict local minimum;
- eigenvalues of both signs give a saddle.
The gap between and is real. Both and have zero gradient and Hessian at the origin. The first has a minimum there, the second a saddle.
Convex case. If is convex, alone means a global minimum: the tangent plane lies below the graph, and here it is flat.
For least squares, is the normal equations (see Inner products, norms and orthogonality). That is a linear system we solve once. For logistic regression, is a nonlinear system with no closed form. So we iterate.