Extrema and optimization

Finding the best: maxima, minima, convexity and optimization under constraints. The mathematics behind training models, planning routes and allocating resources.

6 topics

Almost every problem in machine learning, operations research, robotics and engineering design can be written as minimize f(x)f(x) subject to some constraints. Calculus gives the necessary conditions (the derivative vanishes, or the gradient is a combination of constraint gradients), convexity tells when those conditions are also sufficient, and numerical methods (gradient descent, Newton) find the points that satisfy them.

Topics

Maxima and minima

A global minimum is the lowest value of ff anywhere; a local minimum is lowest only in a neighbourhood. In optimization the difference between the two is the difference between a good model and a stuck one.

Fundamental

Critical points and derivative tests

Where f′(x)=0f'(x) = 0 (or does not exist). Fermat: an interior extremum of a differentiable function is a critical point. The sign of f′′f'' then tells minimum (f′′>0f'' > 0), maximum (f′′<0f'' < 0) or "look closer" (f′′=0f'' = 0).

Fundamental

Convexity and concavity

ff is convex if the chord between any two points of its graph lies above the graph — equivalently, for smooth ff, if f′′≥0f'' \ge 0. For convex functions every local minimum is global, which is why convex problems are the ones optimization can reliably solve.

University

Constrained optimization

Minimize f(x)f(x) only over the points that satisfy constraints g(x)=0g(x) = 0 or h(x)≤0h(x) \le 0: a budget, a physical limit, a probability that must sum to 1. The minimum can now sit on the boundary, where ∇f≠0\nabla f \ne 0.

University

Lagrange multipliers

At a constrained optimum of ff subject to g=0g = 0, the gradients are parallel: ∇f=λ∇g\nabla f = \lambda\nabla g. The multiplier λ\lambda measures how much the optimum would improve if the constraint were relaxed.

University

KKT conditions

Lagrange multipliers for inequality constraints hj(x)≤0h_j(x) \le 0: multipliers are non-negative, and each is zero unless its constraint is active (complementary slackness). For convex problems the KKT conditions are necessary and sufficient.

Advanced

Where this area leads in computing

↑ ↓ to navigate · ↵ · Esc