On this page

    凸优化问题是以下形式:

    \[\min_{x \in D} f(x) \quad \text{subject to} \quad g_i(x) \leq 0, i = 1, ..., m \quad h_j(x) = 0, j=1, ..., r\]

    其中 $f$ 和 $g_i, i =1, …, m$ 都是凸的, $h_j, j=1, …, r$ 是 affine。

    特殊的性质: 任意局部最小值都是全局最小值。

    Convex sets

    $\color{red}{\text{Convex set}}$: $C \subseteq \mathbb R^{n}$ :

    \(x, y \in C \Rightarrow tx + (1 - t)y \in C \quad \text{for all} \quad 0 \leq t \leq 1\) 简单来说,连接任何两个元素的线段完全在集合中

    $x_1, …, x_k \in \mathbb{R}^n$ 的$\color{red}{\text{Convex combination}}$ : 任意线性组合:

    \[\theta_1 x_1 + ... + \theta_k x_k\]

    $\theta_i \geq 0, i = 1, …, k$, 并且 $\sum_{i=1}^k \theta_i = 1$ 。

    集合 $C$ 的 $\color{red}{\text{Convex hull}}$ $\text{conv}(C)$ 是所有元素的 convex combinations。 并且总是凸的。

    Examples of convex sets

    Cones

    $\color{red}\text{Cone}$: $C \subseteq \mathbb{R}^n$:

    \[x \in C \Rightarrow tx \in C \quad \text{for all} \quad t \geq 0\]

    $\color{red}\text{Convex cone}$: cone 也是凸的, 例如:

    \[x1, x2 \in C \Rightarrow t_1x_1 + t_2x_2 \in C \quad \text{for all} \quad t_1, t_2 \geq 0\]

    $x_1, …, x_k \in \mathbb{R}^n$ 的 $\color{red}\text{Conic combination}$ : 任意线性组合:

    \(\theta_1 x_1 + ... + \theta_k x_k\) 其中 $\theta_i \geq 0, i = 1, …, k$。

    $\color{red}{\text{Conic hull}}$ 是所有 conic combination。

    Examples of convex cones

    \(\mathcal{N}_C(x) = \{g : g^\top x \geq g^\top y, \quad \text{for all} \quad y \in C\}\)

    Key properties of convex sets

    如果 $C, D$ 有非空 convex sets $C \cap D = \emptyset$, 存在 $a, b$ :

    \[C \subseteq \{x : a^\top x \leq b \} \\ D \subseteq \{x : a^\top x \geq b\}\]

    如果 $C$ 是非空 convex set, $x_0 \in \text{bd}(C)$, 存在 $a$:

    \[C \subset \{x : a^\top x \leq a^\top x_0\}\]

    上述两个定理(seperating 和 supporting hyperplane 定理)都有部分相反;

    Operations preserving convexity

    \(aC + b = \{ax + b : x \in C\}\) 是凸的, 对于任意 $a, b$

    \[f(C) = \{f(x) : x \in C\}\]

    是凸的, 如果 $D$ 是凸的, 那么:

    \[f^{-1}(D) = \{x : f(x) \in D\}\]

    是凸的

    Example: linear matrix inequality solution set

    给定 $A_1, …, A_k, B \in \mathbb{S}^n$, $\color{red}\text{linear matrix inequality}$ 是如下形式:

    \(x_1 A_1 + x_2 A_2 + ... + x_k A_k \preceq B\) 对于变量 $x \in \mathbb{R}^k$。 让我们证明满足上述不等式的点 $x$ 的集合 $C$ 是凸的

    Approach 1: 直接验证 $x, y \in C \Rightarrow tx + (1- t)y \in C$。 对于任意 $v$:

    \[v^\top(B - \sum_{i=1}^k (t x_i + (1 - t)y_i) A_i) v \geq 0\]

    Approach 2: 令 $f: \mathbb{R}^k \rightarrow \mathbb{S}^n$, $f(x) = B - \sum_{i=1}^k x_i A_i$。$C = f^{-1}(\mathbb{S}_+^n)$ 是凸集的 affine preimage。

    More operations preserving convexity

    \(P(x, z) = x / z\) 对于 $z > 0$。 如果 $C \subset \text{dom}(P)$ 是凸的, 那么 $P(C)$ 也是凸的, 如果 $D$ 是凸的, 那么 $P^{-1}(D)$ 也是凸的。

    \(f(x) = \frac{Ax + b}{c^\top x + d}\) 叫做 $\color{red}\text{linear-fractional}$ 函数,定义在 $c^\top x + d > 0$ 上。 如果 $C \subseteq \text{dom}(f)$ 是凸的, 那么 $f(C)$ 也是凸的, 如果 $D$ 是凸的, 那么 $f^{-1}(D)$ 也是凸的

    Example: conditional probability set

    令 $U, V$ 为在 ${1, …, n}$ 和 ${1, …, m}$ 上的随机变量。 令 $C \subseteq \mathbb{R}^{nm}$ 是 $U, V$ 的联合分布集合, 例如每个 $p \in C$ 定义为联合概率:

    \(p_{ij} = \mathbb{P}(U = i, V = j)\) 令 $D \in \mathbb{R}^{nm}$ 包含对应的 $\color{red}\text{conditional distributions}$, 例如,每个 $q \in D$ 定义:

    \(q_{ij} = \mathbb{P}(U = i \mid V_j)\) 假设 $C$ 是凸的, 让我们证明 $D$ 是凸的。

    \[D = \left\{q \in \mathbb{R}^{nm} : q_{ij} = \frac{p_{ij}}{\sum_{k=1}^n p_{kj}}, \quad \text{for some} \quad p \in C \right\} = f(C)\]

    Convex functions

    $\color{red}\text{Convex function}$ : $f: \mathbb{R}^n \rightarrow \mathbb{R}$ , 有 $\text{dom}(f) \subseteq \mathbb{R}^n$ 凸, 并且:

    \[f(tx + (1 - t)y) \leq tf(x) + (1 - t) f(y) \quad \text{for } \quad 0 \leq t \leq 1\]

    对所有 $x, y \in \text{dom}(f)$

    简答来说, 函数在线段 $f(x), f(y)$ 下面

    $\color{red}\text{Concave function}:$ 上面不等式的反:

    \[f \text{ concave} \Leftrightarrow -f \text{ convex}\]

    Important modifiers:

    Note: $\text{strongly convex}$ $\Rightarrow$ $\text{strickly convex}$ $\Rightarrow$ $\text{Convex}$

    Example of convex functions

    \[\| x \|_p = (\sum_{i=1}^n \mid x_i \mid^p)^{1/p} \quad \text{for} \quad p \geq 1, \quad \| x \|_\infty = \max_{i = 1, ..., n} \mid x_i \mid\]

    包括 operator(spectral) 和 trace(nuclear) 范数

    \[\| X \|_{op} = \sigma_1(X), \| X \|_{tr} = \sum_{i=1}^r \sigma_r(X)\]

    其中 $\sigma_1(X) \geq … \geq \sigma_r(X) \geq 0$ 是矩阵 $X$ 是奇异值。

    \(I_C(x) = \begin{cases} 0 & x \in C \\ \infty & x \neq C \end{cases}\) 是 convex 的

    \(I_C^*(x) = \max_{y \in C} x^\top y\) 是 convex 的

    Key properties of convex functions

    \(\text{epi}(f) = \{(x, t) \in \text{dom}(f) \times \mathbb{R} : f(x) \leq t\}\) 是 convex set

    \(\{x \in \text{dom}(f) : f(x) \leq t\}\) 是 convex 的, 对于所有 $t \in \mathbb{R}$。 反之亦然。

    \(f(y) \geq f(x) + \nabla f(x)^\top(y - x)\) 对所有 $x, y \in \text{dom}(f)$。 因此对于一个可微 convex function $\nabla f(x) = 0 \Leftrightarrow x \text{ minimize } f$

    Operations preserving convexity

    Example: distances to a set

    令 $C$ 是任意集合, 在一个任意范数 $| · |$下, 考虑到 $C$ 的 $\color{red}\text{maximum distance}$ :

    \(f(x) = \max_{y \in C} \| x - y \|\) 对于任意固定的 $y$, $f_y(x) = | x - y |$ 是 convex 的, 通过 pointwise maximization rule, $f$ 是 convex 的

    令 $C$ 是 convex 的, 考虑到 $C$ 的 $\color{red}\text{minimum distance}$ :

    \[f(x) = \min_{y \in C} \| x - y \|\]

    $g(x, y) = | x - y |$ 是 convex 的, 并且假设 $C$ 是 convex 的, 因此应用 partial minimization rule

    More operations preserving convexity

    如何记住这些? 回忆当 $n = 1$ 时, 链式法则:

    \(f''(x) = h''(g(x))g'(x)^2 + h'(g(x))g''(x)\)

    \(f(x) = h(g(x)) = h(g_1(x), ..., g_k(x))\) 其中 $g: \mathbb{R}^n \rightarrow \mathbb{R}^k, h : \mathbb{R}^k \rightarrow \mathbb{R}, f: \mathbb{R}^n \rightarrow \mathbb{R}$, 然后

    Example: log-sum-exp function

    $\color{red}\text{Log-sum-exp function}$: 对于固定的 $a_i, b_i, i = 1, …, k$, $g(x) = \log(\sum_{i=1}^k e^{a_i^\top x + b_i})$ 。 通常叫做 “soft max” , 因为它估计 $\max_{i=1, …, k}(a_i^\top x + b_i)$

    首先, 足够证明 $f(x) = \log (\sum_{i=1}^n e^{x_i})$ 的 convexity (affine composition rule)

    现在使用使用 second-order characterization。 计算:

    \(\nabla_i f(x) = \frac{e^{x_i}}{\sum_{\ell = 1}^n e^{x_\ell}}\) \(\nabla_{ij}^2 f(x) = \frac{e^{x_i}}{\sum_{\ell = 1}^n e^{x_\ell}} 1\{i = j\} - \frac{e^{x_i}e^{x_j}}{(\sum_{\ell=1}^n e^{x_\ell})^2}\)

    将 $\nabla^2 f(x) = \text{diag}(z) - zz^\top$, 其中 $z_i = e^{x_i} / (\sum_{\ell = 1}^n e^{x_\ell})$。 这个矩阵是主对角矩阵, 因此是半正定的。