1 Basic properties and examples
1.1 Definition
[!note] Convex is convex if is convex set and
for all
[!tip] 注意
- 这里不是指定义域
- 凸函数要求两个条件:(1)定义域是凸集;(2)满足 Jensen 不等式
[!note] 充要条件:Restriction of a convex function to a line is convex if and only if the function
is convex for any
[!tip] 注意
- can check convexity of by checking convexity of functions of one variable. (换句话讲,可以限制在一条线上来判断是否是凸函数,这也就变成一个标量)
定义 (矩阵仿射函数):
1.2 Extended-value extensions
[!NOTE] Extended-value extension
- 通常用 来表示。
- 非定义域的函数值直接取 ,保证整个函数 convex
[!tip] 注意:恢复定义域 we can recover the domain of the original function from the extension as .
- 主要原因在于,凸函数一定存在下界,而在定义域中的值,必定不是正无穷,否则不满足 Jensen 不等式。
采用 extended-value extension 的好处是
- 不需要考虑定义域,例如,在定义时,或者考虑两个凸函数的和
[!attention] Indicator function of a convex set
关于这个函数有一些很重要的 trick:
- :这个技巧在后面很有用
1.3 Fist-order conditions
[!note] First-order condition Suppose is differentiable. Then is convex if and only if is convex and
for all
- 右边的项实际上提供了一个 global lower bound,也是从局部到整体的一个信息,可以说是凸函数最重要的性质。
- 凸函数一定存在最小值:例如存在
- 同样该性质可以描述
严格凸
(此时注意等号仅 时成立)(充要条件)- 对于凹函数,也可以得到类似的性质
- 这个证明过程非常值得学习,首先从定义的等价性出发,转化为只需要证明标量的情况,然后就可以方便求导。
1.4 Second-order conditions
[!note] Second-order conditions Assume that is twice differentiable. Then is convex if and only if is convex and its Hessian is positive semidefinite: for all ,
- 该性质如果不取等,可以推出严格凸,但反之不成立, e.g., . (充分条件)
Note: is convex cannot be dropped from the first- or second-order characterizations of convexity and concavity. (e.g. is not a convex function)
1.5 Examples
[!example] Examples
- Quadratic function
- Least squares objective
- Quadratic-over-linear function
- Los-sum-exp function: is convex. (算是 max 函数的一个近似)
- Geometric mean: concave
这些证明很值得一看 注意:证明正交,要想到可能可以用柯西不等式,因此有平方和。
结论 1: ,对任意非奇异矩阵 。也就是说乘以非奇异矩阵不会破坏正定性质。非奇异矩阵保留正定性。 结论 2: 保留特征值(特征值不变)。可逆矩阵保留特征值。 结论 3:实对称矩阵一定可以相似对角化。
1.6 Sublevel set
[!note] Sublevel set The -sublevel set of :
- Sublevel sets of convex functions are convex, for any value of .
- The converse is not true. e.g., .
- If is concave, then its -superlevel set, given by , is a convex set.
- 这是证明一个集合是凸集的办法。
1.7 Epigraph
[!note] Epigraph for
- is convex if and only if is a convex set.
- similarly, a function is concave if and only if its hypograph, defined as
is a convex set.
- 这条性质建立了凸集和凸函数的联系。(充要)
1.8 Jensen’s inequality and extensions
[!note] Jensen’s inequality Extenstion: if is convex, then
for any random variable
- We can interpret it as follows. Suppose and is any zero mean random vector in . Then we have
2 Operations that preserve convexity
[!note] methods for establishing convexity of a function
- verify definition (often simplified by restricting to aline)
- for twice differentiable functions, show
- show that is obtained from simple convex functions by operations that preserve convexity
2.1 Nonnegative weighted sums
2.2 Composition with an affine mapping
2.3 Pointwise maximum and supremum
[!tip] maximum 与 supremum 的区别
- 在有限点集上是一样的,在无限点集上,maximum 可能不存在,但 supremum 一定存在。因为 supremum 并不需要取到最大的那个点。
- supreme 用于 infinite set
[!note] pointwise supremum If for each , is convex in , then the function , defined as
is convex in .Here the domain of is
- Similarly, the pointwise infimum of a set of concave functions is a concave function.
- The pointwise supremum of functions corresponds to the intersection of epigraphs.
- 判断时,其实就是给定 ,看是否是 的凸函数。
[!example] Some examples
- Support function of a set: 对应与集合 中元素点积最大的元素。
- Maximum eigenvalue of a symmetric matrix. , with , is convex.
- Norm of a matrix. (maximum singular value)
Fact:
[!note] Representation as pointwise supremum of affine functions A good method for establishing convexity of a function: by expressing it as the pointwise supremum of a family of affine functions.
- Almost every convex function can be expressed as the pointwise supremum of a family of affine functions.
- For example, if is convex, with , then we have
2.4 Composition
We examine conditions on and that guarantee convexity or concavity of their composition , defined by
[!note] Scalar composition
- 凹凸性一致(外部一致),注意一定是要求 在整个 上。
- ;要求凹的话,就小于等于 0
Note: the requirement that monotonicity hold for the extended-value extension , and not just the function , cannot be removed.
[!note] Vector composition Suppose with . We have
is convex if is convex and for each , one of the following three cases holds:
- is convex and nondecreasing in its -th argument
- is concave and nonincreasing in its -th argument
- is affine.
- 注意是 ,非常重要!
2.5 Minimization
[!note] Minimization If convex in , and is a convex nonempty set, then the function
is convex in , provided for some . The domain of is the projection of on its -coordinates, i.e.,
[!attention] 注意 这里的 需要独立于 ,可以通过重新定义的方法(扩充到正无穷)去掉 的限制。
[!note] infimum convolution
2.6 Perspective of a function
[!note] Perspective of a function If , then the perspective of is the function defined by
with domain
3 the conjugate function
3.1 Definition and examples
[!note] conjugate function Let . The function , defines as
is called the conjugate of the function .
- 简单理解: 给定 也就确定了一条直线,实际上这个就是求直线与 图像竖直距离的最大值。
- 定义域:要求 supremum 是有限的,e.g., 考虑 , 那么 的定义域是 .
- 一定是凸函数
- 当 是凸函数时,就没必要限制 在定义域了。
[!warning] 注意
- 可以看出来,最重要的一点就是找 的定义域了。那么就关于 求导,取最大即可。
- 关键在于找该函数取最大时, 的值。
3.2 Basic properties
[!note] conjugate of the conjugate If is convex, and is closed (i.e., is a closed set), then .
4 quasiconvex functions
[!note] Quasiconvex function A function is called quasiconvex or unimodal if its domain ad all its sublevel sets
for , are convex.
- 这是从集合的角度来定义的,一是要求定义域是凸集,二是要求所有 sublevel 集合也是凸集。
- Similarly, a function is quasiconcave if is quasiconvex, i.e., every superlevel set is convex.
- For a function on , quasiconvexity requires that each sublevel set be an interval.
- 甚至不要求函数连续
- 一般通过定义来证明
Basic properties
[!note] Modified Jensen inequality for quasiconvex ,
[!note] First-order condition differentiable with convex domain is quasiconvex iff
- 竖直方向的增量是负的
[!note] Sums sums of quasiconvex functions are not necessarily quasiconvex
5 Log-concave and log-convex functions
5.1 Definition
[!note] Log-concave A function is logarithmically concave or log-concave: if for all and is concave.
[!note] Another definition A function , with convex domain and for all , is log-concave if and only if for all and , we have
- A log-convex function is convex.
- A non-negative concave function is log-concave.
- many common probability densities are log-concave.
- cdf of a Gaussian density is log-concave.
5.2 Properties
- Twice differentiable log-convex/concave functions
- Multiplication, addition, and integration
- closed for multiplication and positive scaling
- the sum of two log-convex functions is log-convex
- if is log-convex in for each then is log-convex.
- Integration of log-concave functions: if is log-concave, then
is log-concave. (这个就是要求同时关于 x 都是 log-concave)
[!note] Consequences of integration property convolution of log-concave functions is log-concave
[!example] Yield function
If is convex and has a log-concave p.d.f., then
- is log-concave
- yield regions are convex.