Convexity

1 min read

A function ff is convex if a line segment between any two points on its graph lies above the graph:

f(αx+(1α)y)αf(x)+(1α)f(y),α[0,1]f(\alpha x + (1-\alpha)y) \leq \alpha f(x) + (1-\alpha)f(y), \quad \forall \alpha \in [0,1]

Equivalent characterizations:

  • The Hessian Matrix HH is positive semi-definite everywhere
  • Every local minimum is a global minimum
  • First-order condition: f(y)f(x)+f(x)(yx)f(y) \geq f(x) + \nabla f(x)^\top(y-x) (tangent plane is a global lower bound)

Strictly convex: strict inequality → unique global minimum.

Convex optimization is "easy": gradient descent converges to the global optimum with guaranteed rates. Linear regression, logistic regression, and SVMs have convex objectives.

Neural networks are non-convex:

  • Multiple local minima, saddle points, flat regions
  • No guarantee of finding the global optimum
  • Yet SGD works well in practice — modern understanding suggests most local minima in high dimensions are nearly as good as the global minimum, and saddle points are a bigger problem than local minima

Vocabulary: convex set, convex function, convex combination, convex hull, convex relaxation. These appear throughout optimization, operations research, and ML theory.

See also: Stochastic Gradient Descent, Hessian Matrix, Taylor Expansion

Linked from