Overview

Part 14 - Convex Optimization

Introduction

In this part we will (again) cover convex optimization problems, subgradients, and subdifferentials. We will see how we can use subgradients to solve convex optimization problems that are not necessarily differentiable. Furthermore, we will connect these methods to the Lagrange dual problem.

Convex Optimization Problems

Recall (Convex Optimization Problem)

Let’s firstly recall what we need to build a convex optimization problem.

Recall (Convex Set)

A set S⊆RnS \subseteq \mathbb{R}^n is convex if,

x1,x2∈Sλ∈(0,1)}⟹λx1+(1−λ)x2∈S\begin{align*} \left. \begin{array}{l} \mathbf{x}_1, \mathbf{x}_2 \in S \newline \lambda \in (0, 1) \end{array} \right\} \Longrightarrow \lambda \mathbf{x}_1 + (1 - \lambda) \mathbf{x}_2 \in S \end{align*}
Recall (Convex Function)

A function f:Rn→Rf: \mathbb{R}^n \to \mathbb{R} is convex on the convex set SS if,

x1,x2∈Sλ∈(0,1)}⟹f(λx1+(1−λ)x2)≤λf(x1)+(1−λ)f(x2)\begin{align*} \left. \begin{array}{l} \mathbf{x}_1, \mathbf{x}_2 \in S \newline \lambda \in (0, 1) \end{array} \right\} \Longrightarrow f(\lambda \mathbf{x}_1 + (1 - \lambda) \mathbf{x}_2) \leq \lambda f(\mathbf{x}_1) + (1 - \lambda) f(\mathbf{x}_2) \end{align*}
Recall (Convex Optimization Problem)

A optimization problem,

min⁡f(x)subject tox∈S\begin{align*} \min & f(\mathbf{x}) \newline \text{subject to} \quad & \mathbf{x} \in S \newline \end{align*}

is called convex if SS is a convex set and ff is a convex function on SS. Typically,

S={x∈Rn∣gi(x)≤0,i=1,…,m,hj(x)=0,j=1,…,l}S = \{\mathbf{x} \in \mathbb{R}^n \mid g_i(\mathbf{x}) \leq 0, \quad i = 1, \ldots, m, \quad h_j(\mathbf{x}) = 0, \quad j = 1, \ldots, l \}

where gig_i are convex functions and hjh_j are affine functions.

Note ((Re)formulating Problems to be Convex)

Sometimes, we can reformulate problems to be convex.

min⁡12x12+x2subject tox12−2x2=0x1,x2∈R"  ⟺  "min⁡x12subject tox∈R2,x2=12x12"  ⟺  "min⁡12x12+x2subject tox12−2x2≤0\begin{align*} \min & \frac{1}{2} x_1^2 + x_2 \newline \text{subject to} \quad & x_1^2 - 2 x_2 = 0 \newline & x_1, x_2 \in \mathbb{R} \end{align*} \quad \text{"} \iff \text{"} \begin{align*} \min & x_1^2 \newline \text{subject to} \quad & \mathbf{x} \in \mathbb{R}^2, \quad x_2 = \frac{1}{2} x_1^2 \end{align*} \quad \text{"} \iff \text{"} \begin{align*} \min & \frac{1}{2} x_1^2 + x_2 \newline \text{subject to} \quad & x_1^2 - 2 x_2 \leq 0 \end{align*}

Subgradients and Subdifferentials

Recall (Subgradient)

Let S⊆RnS \subseteq \mathbb{R}^n be a non-empty and convex set and f:S→Rf: S \to \mathbb{R} be a convex function on SS. Then, p∈Rn\mathbf{p} \in \mathbb{R}^n is a subgradient of ff at xˉ\bar{\mathbf{x}} if,

f(x)≥f(xˉ)+pT(x−xˉ),∀x∈Sf(\mathbf{x}) \geq f(\bar{\mathbf{x}}) + \mathbf{p}^T (\mathbf{x} - \bar{\mathbf{x}}), \quad \forall \mathbf{x} \in S
Recall (Subdifferential)

Let SS and ff be defined as above. The subdifferential of ff at xˉ\bar{\mathbf{x}} is,

∂f(xˉ)≔{p∈Rn∣f(x)≥f(xˉ)+pT(x−xˉ),∀x∈S}\partial f(\bar{\mathbf{x}}) \coloneqq \{\mathbf{p} \in \mathbb{R}^n \mid f(\mathbf{x}) \geq f(\bar{\mathbf{x}}) + \mathbf{p}^T (\mathbf{x} - \bar{\mathbf{x}}), \quad \forall \mathbf{x} \in S \}

i.e., the set of all subgradients of ff at xˉ\bar{\mathbf{x}}.

Note (C1C^1 functions and global optimality)

If f∈C1f \in C^1 and xˉ∈int(S)\bar{\mathbf{x}} \in \mathrm{int}(S) 1, then,

∂f(xˉ)={∇f(xˉ)}\partial f(\bar{\mathbf{x}}) = \{\nabla f(\bar{\mathbf{x}})\}

Further, if f:Rn→Rf : \mathbb{R}^n \to \mathbb{R} and f∈C1f \in C^1, then,

∇f(xˉ)=0  ⟺  xˉ is a global minimum of f\nabla f(\bar{\mathbf{x}}) = 0 \iff \bar{\mathbf{x}} \text{ is a global minimum of } f
Intuition (Proposition about Subdifferentials for Convex Functions)

Let f:Rn→Rf: \mathbb{R}^n \to \mathbb{R} be a convex function, then,

x⋆ is a global minimum of f  ⟺  0∈∂f(x⋆)\mathbf{x}^{\star} \text{ is a global minimum of } f \iff \mathbf{0} \in \partial f(\mathbf{x}^{\star})

Thus we can ask ourselves two questions,

  1. How can we use subgradients?
  2. How can we compute subgradients?

Subgradient Method

Intuition (Subgradient Method)

Step 0: Initialize x0,f0best=f(x0),k=0\mathbf{x}_0, f_0^\text{best} = f(\mathbf{x}_0), k = 0.

Step 1: Find pk∈∂f(xk)\mathbf{p}_k \in \partial f(\mathbf{x}_k).

Step 2: Update xk+1=xk−αkpk\mathbf{x}_{k+1} = \mathbf{x}_k - \alpha_k \mathbf{p}_k.

Step 3: fk+1best=min⁡{fkbest,f(xk+1)}f_{k+1}^\text{best} = \min\{f_k^\text{best}, f(\mathbf{x}_{k+1})\}.

If termination criteria is fulfilled, STOP; Else, go to (1) with k←k+1k \leftarrow k + 1.

Note

For an element p∈∂f(x)\mathbf{p} \in \partial f(\mathbf{x}), −p-\mathbf{p} might not be a descent direction from xˉ\bar{\mathbf{x}}.

Example 1

Consider,

min⁡∥x1∥+2∥x2∥subject tox∈R2\begin{align*} \min & \Vert x_1 \Vert + 2 \Vert x_2 \Vert \newline \text{subject to} \quad & \mathbf{x} \in \mathbb{R}^2 \end{align*}

Let xˉ=[10]T\bar{\mathbf{x}} = \begin{bmatrix} 1 & 0 \end{bmatrix}^T, then f(xˉ)=1f(\bar{\mathbf{x}}) = 1, further, let p=[11]T\mathbf{p} = \begin{bmatrix} 1 & 1 \end{bmatrix}^T,

f(xˉ)+pT(x−xˉ)=1+[11][x1−1x2−0]=x1+x2≤∥x1∥+∥2x2∥≤∥x1∥+2∥x2∥⏟f(x)  ⟹  p∈∂f(xˉ)\begin{align*} f(\bar{\mathbf{x}}) + \mathbf{p}^T (\mathbf{x} - \bar{\mathbf{x}}) & = 1 + \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} x_1 - 1 \newline x_2 - 0 \end{bmatrix} \newline & = x_1 + x_2 \newline & \leq \Vert x_1 \Vert + \Vert 2 x_2 \Vert \newline & \leq \underbrace{\Vert x_1 \Vert + 2 \Vert x_2 \Vert}_{f(\mathbf{x})} \newline & \implies \mathbf{p} \in \partial f(\bar{\mathbf{x}}) \newline \end{align*}

However, notice that,

f(xˉ−αp)=∥xˉ1−αp1∥+2∥xˉ2−αp2∥=∥1−α∥+2∥−α∥≥1 ∀x\begin{align*} f(\bar{\mathbf{x}} - \alpha \mathbf{p}) & = \Vert \bar{x}_1 - \alpha p_1 \Vert + 2 \Vert \bar{x}_2 - \alpha p_2 \Vert \newline & = \Vert 1 - \alpha \Vert + 2 \Vert - \alpha \Vert \geq 1 \, \forall \mathbf{x} \end{align*}
Intuition (Subgradient Step)

Although −pk-\mathbf{p}_k might not be a descent direction, it moves us closer to the optimal solution,

pk∈∂f(xk)  ⟹  f(x⋆)≥f(xk)+pkT(x⋆−xk)\mathbf{p}_k \in \partial f(\mathbf{x}_k) \implies f(\mathbf{x}^{\star}) \geq f(\mathbf{x}_k) + \mathbf{p}_k^T (\mathbf{x}^{\star} - \mathbf{x}_k)

where x⋆\mathbf{x}^{\star} is a global minimum of ff,

  ⟹  pkT(xk−x⋆)⏟points towards optimal solution≥f(xk)−f(x⋆)≥0\begin{align*} \implies \mathbf{p}_k^T \underbrace{(\mathbf{x}_k - \mathbf{x}^{\star})}_{\text{points towards optimal solution}} & \geq f(\mathbf{x}_k) - f(\mathbf{x}^{\star}) \newline & \geq 0 \end{align*}

i.e., the directions define half-spaces where the optimal solution cannot be.

Definition 1 (Step Length Rule)

For the subgradient method, we set the step length sequence {αk}\{\alpha_k\} a priori, a common rule is a sequence that is square summable but not summable, i.e.,

∑k=0∞αk2<∞∑k=0∞αk=∞\begin{align*} \sum_{k=0}^{\infty} \alpha_k^2 & < \infty \newline \sum_{k=0}^{\infty} \alpha_k & = \infty \newline \end{align*}

e.g.,

αk=ab+ck,a,b,c>0\alpha_k = \frac{a}{b + ck}, \quad a, b, c > 0
Theorem 1 (Convergence of Subgradient Method)

Let f:Rn→Rf: \mathbb{R}^n \to \mathbb{R} be a convex function and let X⋆=arg⁡min⁡f(x)\mathbf{X}^{\star} = \arg \min f(\mathbf{x}) be non-empty. Let {xk}\{\mathbf{x}_k\} be the sequence generated by the subgradient method where {αk}\{\alpha_k\} is square summable but not summable. If {pk}\{\mathbf{p}_k\} is bounded, then,

f(xk)→f⋆ and xk→x⋆∈X⋆f(\mathbf{x}_k) \to f^{\star} \text{ and } \mathbf{x}_k \to \mathbf{x}^{\star} \in \mathbf{X}^{\star}

Connection to Lagrange Dual Problem

Recall (Primal, Lagrangian, and Dual Problem)

Consider the primal problem,

(P){inf⁡f(x)subject togi(x)≤0,i=1,…,mx∈X\begin{align*} (P) \quad & \begin{cases} \inf & f(\mathbf{x}) \newline \text{subject to} \quad & g_i(\mathbf{x}) \leq 0, \quad i = 1, \ldots, m \newline & \mathbf{x} \in \mathbf{X} \end{cases} \end{align*}

We define the Lagrangian function as,

L(x,μ)=f(x)+∑i=1mμigi(x)\mathcal{L}(\mathbf{x}, \boldsymbol{\mu}) = f(\mathbf{x}) + \sum_{i=1}^m \mu_i g_i(\mathbf{x})

where μ≥0\boldsymbol{\mu} \geq 0 are the Lagrange multipliers. The Lagrange dual function is defined as,

q(μ)=inf⁡x∈XL(x,μ)q(\boldsymbol{\mu}) = \inf_{\mathbf{x} \in \mathbf{X}} \mathcal{L}(\mathbf{x}, \boldsymbol{\mu})

The dual problem is then defined as,

(D){sup⁡q(μ)subject toμ≥0\begin{align*} (D) \quad & \begin{cases} \sup & q(\boldsymbol{\mu}) \newline \text{subject to} \quad & \boldsymbol{\mu} \geq 0 \end{cases} \end{align*}
Note (Convexity of the Dual Problem)

Since qq is concave and μ≥0\boldsymbol{\mu} \geq 0 is a convex set, the dual problem is a convex optimization problem. However, as we have noted before, to evaluate q(μ)q(\boldsymbol{\mu}), we must solve an optimization problem, which may not even be easier than the primal problem.

Theorem 2 (Subgradients of the Lagrange Dual Function)

Let x(μ)≔arg⁡min⁡x∈XL(x,μ)\mathbf{x}(\boldsymbol{\mu}) \coloneqq \arg \min_{\mathbf{x} \in \mathbf{X}} \mathcal{L}(\mathbf{x}, \boldsymbol{\mu}). Further, let X\mathbf{X} be non-empty and compact and let μ≥0\boldsymbol{\mu} \geq 0. If xμ∈x(μ)\mathbf{x}_{\boldsymbol{\mu}} \in \mathbf{x}(\boldsymbol{\mu}), then,

g(xμ)≔[gi(xμ)]i=1m is a subgradient to q at μg(\mathbf{x}_{\boldsymbol{\mu}}) \coloneqq \left[g_i(\mathbf{x}_{\boldsymbol{\mu}})\right]_{i=1}^m \text{ is a subgradient to } q \text{ at } \boldsymbol{\mu}

Furthermore,

∂q(μ)=conv{g(xμ)∣xμ∈x(μ)}\partial q(\boldsymbol{\mu}) = \mathrm{conv} \{g(\mathbf{x}_{\boldsymbol{\mu}}) \mid \mathbf{x}_{\boldsymbol{\mu}} \in \mathbf{x}(\boldsymbol{\mu})\}

where conv(S)\mathrm{conv}(S) is the convex hull of the set SS.

Proof (Proof Idea)q(μ)=inf⁡x∈XL(z,μ)=inf⁡x∈X f(z)+∑i=1mμigi(z)=f(xμ)+∑i=1mμigi(xμ)=f(xμ)+μTg(xμ)=f(xμ)+μTg(xμ)(μˉ−μ)Tg(xμ)⏟0=f(xμ)+μˉTg(xμ)⏟q(μˉ)+(μ−μˉ)Tg(xμ)≥q(μˉ)+(μ−μˉ)Tg(xμ)\begin{align*} q(\boldsymbol{\mu}) & = \inf_{\mathbf{x} \in \mathbf{X}} \mathcal{L}(\mathbf{z}, \boldsymbol{\mu}) \newline & = \inf_{\mathbf{x} \in \mathbf{X}} \, f(\mathbf{z}) + \sum_{i=1}^m \mu_i g_i(\mathbf{z}) \newline & = f(\mathbf{x}_{\boldsymbol{\mu}}) + \sum_{i=1}^m \mu_i g_i(\mathbf{x}_{\boldsymbol{\mu}}) \newline & = f(\mathbf{x}_{\boldsymbol{\mu}}) + \boldsymbol{\mu}^T g(\mathbf{x}_{\boldsymbol{\mu}}) \newline & = f(\mathbf{x}_{\boldsymbol{\mu}}) + \boldsymbol{\mu}^T g(\mathbf{x}_{\boldsymbol{\mu}}) \underbrace{(\boldsymbol{\bar{\mu}} - \boldsymbol{\mu})^T g(\mathbf{x}_{\boldsymbol{\mu}})}_{0} \newline & = \underbrace{f(\mathbf{x}_{\boldsymbol{\mu}}) + \boldsymbol{\bar{\mu}}^T g(\mathbf{x}_{\boldsymbol{\mu}})}_{q(\boldsymbol{\bar{\mu}})} + (\boldsymbol{\mu} - \boldsymbol{\bar{\mu}})^T g(\mathbf{x}_{\boldsymbol{\mu}}) \newline & \geq q(\boldsymbol{\bar{\mu}}) + (\boldsymbol{\mu} - \boldsymbol{\bar{\mu}})^T g(\mathbf{x}_{\boldsymbol{\mu}}) \newline \end{align*}

Thus, g(xμ)g(\mathbf{x}_{\boldsymbol{\mu}}) is a subgradient to qq at μ\boldsymbol{\mu}.

Algorithm 1: Subgradient Method for the Lagrange Dual Problem

Step 0: Initialize μ0≥0,q0best=q(μ0),k=0\boldsymbol{\mu}_0 \geq 0, q_0^\text{best} = q(\boldsymbol{\mu}_0), k = 0.

  1. Evaluate q(μk)q(\boldsymbol{\mu}_k), i.e., solve q(μk)=inf⁡x∈XL(x,μk)q(\boldsymbol{\mu}_k) = \inf_{\mathbf{x} \in \mathbf{X}} \mathcal{L}(\mathbf{x}, \boldsymbol{\mu}_k). Let xk\mathbf{x}_k be a solution.
  2. Update μk+1=(μk+αkg(xk))+\boldsymbol{\mu}_{k+1} = \left(\boldsymbol{\mu}_k + \alpha_k g(\mathbf{x}_k)\right)_+, where (⋅)+(\cdot)_+ is max⁡{0,⋅}\max\{0, \cdot\} applied element-wise.
  3. Let qk+1best=max⁡{qkbest,q(μk+1)}q_{k+1}^\text{best} = \max\{q_k^\text{best}, q(\boldsymbol{\mu}_{k+1})\}.
  4. if termination criteria is fulfilled then stop; else go to (1) with k←k+1k \leftarrow k + 1.
Footnotes
  1. int(S)\mathrm{int}(S) is the interior of SS, i.e., the set of all points in SS that are not on the boundary of SS.

    ↩

Search

Essays, lecture notes, and research

Type to search the site.