Func 20160919
Func 20160919
2 Convex Function
Yipeng Liu
1 / 35
Overview
1. definition
2. basic properties
4. Jensen’s inequality
6. conjugate function
2 / 35
Definition
• f is concave if −f is convex
3 / 35
Examples on R
convex:
concave:
4 / 35
Examples on RN and RM ×N
affine functions are convex and concave; all norms are convex
examples on RN :
examples on RM ×N :
• affine function
M X
X N
f (X) = tr AT X + b = Amn Xmn + b
m=1 n=1
5 / 35
Restriction of a convex function to a line
g(t) = log det (X + tV) = log det X + log det I + tX−1/2 VX−1/2
N
X
= log det X + log(1 + tλn )
n=1
6 / 35
Extended-value extension
extended-value extension f˜ of f is
• dom f is convex
• x, y ∈ dom f
7 / 35
First-order condition
f is differentiable if dom f is open and the gradient
∂f (x) ∂f (x) ∂f (x)
∇f (x) = , ,··· ,
∂x1 ∂x2 ∂xN
8 / 35
Second-order conditions
∂ 2 f (x)
∇2 f (x)i,j = , i, j = 1, 2, · · · , N
∂xi ∂xj
9 / 35
Examples
quadratic function: f (x) = (1/2) xT Px + qT x + r (with P ∈ SN )
∇f (x) = Px + q, ∇2 f (x) = P
convex if P 0
least-squares objective: f (x) = kAx − bk22
quadratic-over-linear: f (x, y) = x2 y
" #" #T
2 2 y y
∇ f (x, y) = 3 0
y −x −x
10 / 35
Examples
PN
log-sum-exp (soft max): f (x) = log n=1 exp xn is convex
1 1
∇2 f (x) = diag(z) − zzT , (zn = exp xn )
1T z (1T z)2
2
zn vn2
P P P
zn − n vn zn
vT ∇2 f (x)v = n
P
n
2 >0
n zn
2
zn vn2
P P P
since n vn zn 6 n n zn (Cauchy-Schwarz inequality)
Q 1/N
N
geometric mean: f (x) = n=1 xn on RN
++ is concave
11 / 35
Epigraph and sublevel set
α-sublevel set of f : RN → R
Cα = {x ∈ dom f |f (x) 6 α }
n o
epi f = (x, t) ∈ RN +1 |x ∈ dom f, f (x) 6 t
12 / 35
Some convex functions constructed from convex sets
13 / 35
Jensen’s inequality
f (Ez) 6 Ef (z)
prob(z = x) = θ, prob(z = y) = 1 − θ
14 / 35
Operations that preserve convexity
15 / 35
Positive weighted sum & composition with affine function
examples
M
X
f (x) = − log bm − aTm x ,
m=1
n o
dom f = x aTm x < bm , m = 1, · · · , M
16 / 35
Pointwise maximum
examples
the max of all the functions which select K entries from x and sum them.
17 / 35
Pointwise supremum
if f (x, y) is convex in x for each f (x, y), y ∈ C, then
is convex
note that: f (x, y) does not need to be convex in f (x, y)
examples
• support function of a set
C : SC (x) = sup xT y
y∈C
f (x) = sup kx − yk
y∈C
18 / 35
Composition with scalar functions
composition of g : RN → R and h : R → R:
f (x) = h(g(x))
examples
19 / 35
Vector composition
N
composition of g : R → RK and h : RK → R:
examples
PM
• log gm (x) is concave if gm are concave and positive
m=1
PM
• log m=1 exp gm (x) is convex if gm are convex
20 / 35
Infimum
is convex
example
21 / 35
Perspective
the perspective of a function f : RN → R is the function g : RN × R → R,
g is convex if f is convex
examples
Ax + b
g(x) = (cT x + d)f ( )
cT x + d
is convex on
Ax + b
x cT x + d > 0, ∈ dom f
cT x + d
22 / 35
Conjugate function
the conjugate of a function f is
1 T 1
f ∗ (y) = sup(yT x − x Qx) = yT Q−1 y
x 2 2
• indicator function f (x) = 1C (x)
24 / 35
Conjugate function
Properties
25 / 35
Quasiconvex functions
N
Definition 1: f : R → R is quasiconvex if dom f is convex and the sublevel
sets
Sα = {x ∈ dom f |f (x) 6 α }
• f is quasiconcave if −f is quasiconvex
26 / 35
examples
p
• |x| is quasiconvex on R
• ceil(x) = inf {z ∈ Z |z > x } is quasilinear
• linear-fractional function
aT x + b n o
f (x) = T
, dom f = x cT x + d > 0
c x+d
is quasilinear
• distance ratio
kx − ak2
f (x) = , dom f = x kx − ak2 6 kx − bk2
kx − bk2
is quasiconvex
27 / 35
Quasiconvex functions
N
X
PV(x, r) = (1 + r)−n xn
n=0
• internal rate of return is smallest interest rate for which PV(x, r):
N
X
IRR(x) > R ⇔ (1 + r)−n xn > 0 for 06r<R
n=0
28 / 35
Properties of quasiconvex functions
29 / 35
Strictly local quasiconvex function
• f (x) − f (z) 6 ε
• k∇f (x)k2 > 0, and for every y ∈ B(z, ε/κ) it holds that
h∇f (x), y − xi 6 0
30 / 35
Log-concave and log-convex functions
x
u2
Z
1
φ(x) = √ exp − du
2π −∞ 2
31 / 35
Properties of log-concave functions
32 / 35
Properties of log-concave functions
f (x) = prob(x + y ∈ C)
is log-concave
proof: write f (x) as integral of product of log-concave functions
(
1, u ∈ C
Z
f (x) = g(x + y) p(y)dy, g(u) =
0, u ∈
/C
p is pdf of y
33 / 35
Properties of log-concave functions
h(x) = prob(x + w ∈ S)
• h is log-concave
34 / 35
Convexity with respect to generalized inequalities
for x, y ∈ dom f, 0 6 θ 6 1
example: f : SM → SM , f (X) = X2 is SM
+ -convex
for X, Y ∈ SM , 0 6 θ 6 1
therefore, (θX + (1 − θ)Y)2 θX2 + (1 − θ)Y2
35 / 35