Skip to main content

Convexity: The Gold Standard of Optimization

In the complex world of high-dimensional optimization, Convexity is the most desirable property a problem can have. It provides a mathematical guarantee that any local minimum you find is also the global minimum, eliminating the fear of being trapped in sub-optimal valleys.

Convex vs Non-Convex Visualization

General Optimization and Convex Analysis

This page summarizes the core concepts of optimization, focusing on the formulation of problems, the properties of convex sets and functions, and the role of gradients in finding optimal solutions.

Source

Based on the course "General optimization and convex analysis" by Pr. Pierre Hellier (Université de Rennes / Inria).

1. General Formulation

Optimization problems generally aim to find a variable xx^* that minimizes a specific loss function.

Unconstrained Optimization

The goal is to solve for:

x=argminxCL(x)x^* = \arg \min_{x \in C} L(x)

L(x)L(x): Loss function (or objective function).

xRnx \in \mathbb{R}^n: Vector of nn variables.

CC: Set of admissible solutions.

Objective: Find a vector xx^* such that xC,L(x)<L(x)\forall x \in C, L(x^*) < L(x).

Constrained Optimization

Often, the solution must satisfy specific rules (constraints):

minimize L(x)subject to hj(x)=0,j=1,,pgi(x)<0,i=1,,q\begin{aligned} & \text{minimize } && L(x) \\ & \text{subject to } && h_j(x) = 0, \quad \forall j=1,\dots,p \\ & && g_i(x) < 0, \quad \forall i=1,\dots,q \end{aligned}

This is equivalent to unconstrained optimization where the admissible set CC is defined by the intersection of these equality (hjh_j) and inequality (gig_i) constraints.

Key Definitions

TermDefinition
Feasible PointAny point xCx \in C that satisfies all constraints.
Optimal ValueThe minimal function value L=L(x)L^* = L(x^*).
Optimal Solutionxx^* is optimal if xC,L(x)<L(x)\forall x \in C, L(x^*) < L(x).
Sub-optimal (Local)xx^* is a local optimum if it is optimal only within a small ball around xx^*.

2. Convexity

Convexity is a powerful property because it guarantees that local minima are global minima.

Convex Sets

A set CC is convex if the line segment connecting any two points in the set lies entirely within the set.

x,yC,0<α<1    αx+(1α)yCx, y \in C, \quad 0 < \alpha < 1 \implies \alpha x + (1-\alpha)y \in C

Examples of Convex Sets:

  • Rn\mathbb{R}^n and Positive Orthant R+n\mathbb{R}^n_+
  • Hyperplane: {xRnaTx=b}\{x \in \mathbb{R}^n \mid a^T x = b\}
  • Half-space: {xRnaTx<b}\{x \in \mathbb{R}^n \mid a^T x < b\}
  • Polyhedra: {xRnAx<b}\{x \in \mathbb{R}^n \mid Ax < b\}
Operations Preserving Convexity

If CkC_k are convex sets, the following remain convex:

  • Intersection: kCk\cap_k C_k
  • Cartesian Product: C1×C2C_1 \times C_2 \dots
  • Affine Transformation: If CC is convex, then {Ax+bxC}\{Ax + b \mid x \in C\} is convex.

Convex Functions

A function is convex if its graph lies below the line segment joining any two points on the graph (the chord).

f(αx+(1α)y)αf(x)+(1α)f(y)f(\alpha x + (1-\alpha)y) \le \alpha f(x) + (1-\alpha)f(y)
  • Strictly Convex: The inequality is strict (<<).
  • Concave: If ff is convex, then f-f is concave.
  • Second Order Condition: If ff is twice differentiable, ff is convex     f0\iff f'' \ge 0.

Common Convex Functions:

  • Affine: ax+bax + b
  • Exponential: exe^x
  • Power: xp|x|^p for p1p \ge 1
  • Neg-entropy: xlog(x)x \log(x) for x>0x > 0

3. Smoothness and Gradients

To solve optimization problems efficiently, we often rely on differentiability.

Differentiability Classes

  • C0C^0: Continuous functions.
  • C1C^1: Continuous first derivatives.
  • CC^\infty: Smooth functions (infinitely differentiable).

The Gradient

For a function F:RnRF: \mathbb{R}^n \to \mathbb{R}, the gradient is the vector of partial derivatives:

xF(x)={F(x)x1,,F(x)xm}T\nabla_x F(x) = \left\{ \frac{\partial F(x)}{\partial x_1}, \dots, \frac{\partial F(x)}{\partial x_m} \right\}^T

The gradient points in the direction of steepest ascent (where FF increases the most).

Convexity First-Order Condition

A differentiable function ff is convex if and only if:

f(x)f(x)+f(x),xxf(x) \ge f(x') + \langle \nabla f(x'), x - x' \rangle

4. Optimality Conditions

Necessary Condition

If xx^* is a local minimum, the gradient must vanish:

F(x)=0\nabla F(x^*) = 0

Sufficient Condition (The "Convex Advantage")

For convex functions, the zero gradient condition is not just necessary, it is sufficient.

The Main Theorem

If ff is convex:

Any local minimum is a global minimum.

f(x)=0    x\nabla f(x^*) = 0 \iff x^* is a global minimum.

View Proof Sketch
  1. Local is Global: Suppose xx^* is a local minimum but not global. There exists some xx where f(x)<f(x)f(x) < f(x^*). By convexity, for small tt, the point tx+(1t)xtx^* + (1-t)x is close to xx^*.
f(tx+(1t)x)tf(x)+(1t)f(x)f(tx^* + (1-t)x) \le t f(x^*) + (1-t)f(x)

Since f(x)<f(x)f(x) < f(x^*), the right side is strictly less than f(x)f(x^*). This contradicts that xx^* is a local minimum.

  1. Gradient Condition: If f(x)=0\nabla f(x^*) = 0, by the first-order convexity condition:
f(x)f(x)+f(x),xxf(x) \ge f(x^*) + \langle \nabla f(x^*), x - x^* \rangle

Since the gradient is 0, f(x)f(x)f(x) \ge f(x^*) for all xx. Thus, xx^* is global.