Canonical Problem Forms: Ryan Tibshirani Convex Optimization 10-725
Canonical Problem Forms: Ryan Tibshirani Convex Optimization 10-725
Ryan Tibshirani
Convex Optimization 10-725
Last time: optimization basics
2
Outline
Today:
• Linear programs
• Quadratic programs
• Semidefinite programs
• Cone programs
3
4
Linear program
A linear program or LP is an optimization problem of the form
min cT x
x
subject to Dx ≤ d
Ax = b
5
Example: diet problem
min cT x
x
subject to Dx ≥ d
x≥0
Interpretation:
• cj : per-unit cost of food j
• di : minimum required intake of nutrient i
• Dij : content of nutrient i per unit of food j
• xj : units of food j in the diet
6
Example: transportation problem
Ship commodities from given sources to destinations at min cost
m X
X n
min cij xij
x
i=1 j=1
Xn
subject to xij ≤ si , i = 1, . . . , m
j=1
m
X
xij ≥ dj , j = 1, . . . , n, x ≥ 0
i=1
Interpretation:
• si : supply at source i
• dj : demand at destination j
• cij : per-unit shipping cost from i to j
• xij : units shipped from i to j
7
Example: basis pursuit
Given y ∈ Rn and X ∈ Rn×p , where p > n. Suppose that we seek
the sparsest solution to underdetermined linear system Xβ = y
Nonconvex formulation:
min kβk0
β
subject to Xβ = y
Pp
where recall kβk0 = j=1 1{βj 6= 0}, the `0 “norm”
min kβk1
β
subject to Xβ = y
8
Basis pursuit is a linear program. Reformulation:
subject to Xβ = y subject to z ≥ β
z ≥ −β
Xβ = y
9
Example: Dantzig selector
min kβk1
β
subject to kX T (y − Xβ)k∞ ≤ λ
1
Candes and Tao (2007), “The Dantzig selector: statistical estimation when
p is much larger than n”
10
Standard form
min cT x
x
subject to Ax = b
x≥0
11
Convex quadratic program
12
Example: portfolio optimization
Interpretation:
• µ : expected assets’ returns
• Q : covariance matrix of assets’ returns
• γ : risk aversion
• x : portfolio holdings (percentages)
13
Example: support vector machines
14
Example: lasso
min ky − Xβk22
β
subject to kβk1 ≤ s
15
Standard form
16
Motivation for semidefinite programs
Consider linear programming again:
min cT x
x
subject to Dx ≤ d
Ax = b
• Sn
++ is the space of positive definite matrices, i.e.,
17
Facts about Sn , Sn+ , Sn++
• Basic linear algebra facts, here λ(X) = (λ1 (X), . . . , λn (X)):
X ∈ Sn =⇒ λ(X) ∈ Rn
X ∈ Sn+ ⇐⇒ λ(X) ∈ Rn+
X ∈ Sn++ ⇐⇒ λ(X) ∈ Rn++
X • Y = tr(XY )
X Y ⇐⇒ X − Y ∈ Sn+
18
Semidefinite program
min cT x
x
subject to x1 F1 + · · · + xn Fn F0
Ax = b
19
Standard form
min C •X
X
subject to Ai • X = bi , i = 1, . . . , m
X0
20
Example: theta function
Let G = (N, E) be an undirected graph, N = {1, . . . , n}, and
• ω(G) : clique number of G
• χ(G) : chromatic number of G
2
Lovasz (1979), “On the Shannon capacity of a graph”
21
Example: trace norm minimization
Let A : Rm×n → Rp be a linear map,
A1 • X
A(X) = . . .
Ap • X
for A1 , . . . , Ap ∈ Rm×n (and where Ai • X = tr(ATi X)). Finding
lowest-rank solution to an underdetermined system, nonconvex:
min rank(X)
X
subject to A(X) = b
Trace norm approximation:
min kXktr
X
subject to A(X) = b
This is indeed an SDP (but harder to show, requires duality ...)
22
Conic program
min cT x
x
subject to Ax = b
D(x) + d ∈ K
Here:
• c, x ∈ Rn , and A ∈ Rm×n , b ∈ Rm
• D : Rn → Y is a linear map, d ∈ Y , for Euclidean space Y
• K ⊆ Y is a closed convex cone
Both LPs and SDPs are special cases of conic programming. For
LPs, K = Rn+ ; for SDPs, K = Sn+
23
Second-order cone program
A second-order cone program or SOCP is an optimization problem
of the form:
min cT x
x
subject to kDi x + di k2 ≤ eTi x + fi , i = 1, . . . , p
Ax = b
Q = {(x, t) : kxk2 ≤ t}
So we have
24
Observe that every LP is an SOCP. Further, every SOCP is an SDP
25
Hey, what about QPs?
Finally, our old friend QPs “sneak” into the hierarchy. Turns out
QPs are SOCPs, which we can see by rewriting a QP as
min cT x + t
x,t
1 T
subject to Dx ≤ d, x Qx ≤ t
2
Ax = b
26
References and further reading
27