Chap04 ConvexOptimizationBasics
Chap04 ConvexOptimizationBasics
(y, f (y))
(x, f (x))
Figure 3.1 Graph of a convex function. The chord (i.e., line segment) be-
Figure 2.2 Some simple convex and nonconvex tween sets. any two points
• Key properties (e.g., first- and second-order characterizations
Left. on the graph lies above the graph.
The hexagon,
which includes its boundary (shown darker), is convex. Middle. The kidney
for functions)
shaped set is not convex, since the line segment between the two points in
the set shown as dots is not contained in the set. Right. The square contains
some boundary points but not others, and is not convex.
• Operations that preserve convexity (e.g., affine composition)
1
E.g., is max log , kAx + bk51 convex?
(aT x + b)7
Figure 2.3 The convex hulls of two sets in R2 . Left. The convex hull of a
set of fifteen points (shown as dots) is the pentagon (shown shaded). Right. 2
Outline
Today:
• Optimization terminology
• Properties and first-order optimality
• Equivalent transformations
3
Optimization terminology
Reminder: a convex optimization problem (or program) is
min f (x)
x∈D
subject to gi (x) ≤ 0, i = 1, . . . m
Ax = b
where f and gi , i = 1, . . . m
Tmare all convex, and the optimization
domain is D = dom(f ) ∩ i=1 dom(gi ) (often we do not write D)
• f is called criterion or objective function
• gi is called inequality constraint function
• If x ∈ D, gi (x) ≤ 0, i = 1, . . . m, and Ax = b then x is called
a feasible point
• The minimum of f (x) over all feasible points x is called the
optimal value, written f ?
4
• If x is feasible and f (x) = f ? , then x is called optimal; also
called a solution, or a minimizer1
• If x is feasible and f (x) ≤ f ? + , then x is called -suboptimal
• If x is feasible and gi (x) = 0, then we say gi is active at x
• Convex minimization can be reposed as concave maximization
1
Note: a convex optimization problem need not have solutions, i.e., need
not attain its minimum, but we will not be careful about this
5
Convex solution sets
Let Xopt be the set of all solutions of convex problem, written
Xopt = argmin f (x)
subject to gi (x) ≤ 0, i = 1, . . . m
Ax = b
Key property: Xopt is a convex set
min ky − Xβk22
β
subject to kβk1 ≤ s
7
Example: support vector machines
Given y ∈ {−1, 1}n , X ∈ Rn×p with rows x1 , . . . xn , consider the
support vector machine or SVM problem:
n
1 X
min kβk22 + C ξi
β,β0 ,ξ 2
i=1
subject to ξi ≥ 0, i = 1, . . . n
yi (xTi β + β0 ) ≥ 1 − ξi , i = 1, . . . n
8
Local minima are global minima
For a convex problem, a feasible point x is called locally optimal is
there is some R > 0 such that
●
●
● ●
Proof simply follows
●
from definitions ●
● ● ●●
Convex Nonconvex
9
Rewriting constraints
The optimization problem
min f (x)
x
subject to gi (x) ≤ 0, i = 1, . . . m
Ax = b
can be rewritten as
10
First-order optimality condition
For a convex problem
11
Example: quadratic minimization
Consider minimizing the quadratic function
1
f (x) = xT Qx + bT x + c
2
where Q 0. The first-order condition says that solution satisfies
∇f (x) = Qx + b = 0
Cases:
• if Q 0, then there is a unique solution x = −Q−1 b
• if Q is singular and b ∈
/ col(Q), then there is no solution (i.e.,
minx f (x) = −∞)
• if Q is singular and b ∈ col(Q), then there are infinitely many
solutions
x = −Q+ b + z, z ∈ null(Q)
where Q+ is the pseudoinverse of Q
12
Example: equality-constrained minimization
Consider the equality-constrained convex problem:
This is equivalent to
13
Example: projection onto a convex set
Consider projection onto convex set C:
a − x ∈ NC (x)
● ●
14
Partial optimization
15
Example: hinge form of SVMs
Recall the SVM problem
n
1 X
min kβk22 + C ξi
β,β0 ,ξ 2
i=1
subject to ξi ≥ 0, yi (xTi β + β0 ) ≥ 1 − ξi , i = 1, . . . n
16
Transformations and change of variables
If h : R → R is a monotone increasing transformation, then
17
Example: geometric programming
A monomial is a function f : Rn++ → R of the form
min f (x)
x
subject to gi (x) ≤ 1, i = 1, . . . m
hj (x) = 1, j = 1, . . . r
19
Many interesting problems are geometric programs, e.g., floor
8.8 Floor planning
planning: 43
wi
Ci hi
H
(xi , yi )
W
Figure 8.18 Floor planning problem. Non-overlapping rectangular cells are
placed in a rectangle with width W , height H, and lower left corner at (0, 0).
See Boyd
The ithetcell
al.is specified
(2007),by“A tutorial
its width on geometric
wi , height programming”,
hi , and the coordinates of its
lower left corner, (xi , yi ).
and also Chapter 8.8 of B & V book
20
Example floor planning program:
min WH
W,H,
x,y,w,h
subject to 0 ≤ xi ≤ W, i = 1, . . . n
0 ≤ yi ≤ H, i = 1, . . . n
xi + wi ≤ xj , (i, j) ∈ L
yi + hi ≤ yj , (i, j) ∈ B
wi hi = Ci , i = 1, . . . n.
21
Eliminating equality constraints
Important special case of change of variables: eliminating equality
constraints. Given the problem
min f (x)
x
subject to gi (x) ≤ 0, i = 1, . . . m
Ax = b
min f (M y + x0 )
y
subject to gi (M y + x0 ) ≤ 0, i = 1, . . . m
Note: this is fully general but not always a good idea (practically)
22
Introducing slack variables
Essentially opposite to eliminating equality contraints: introducing
slack variables. Given the problem
min f (x)
x
subject to gi (x) ≤ 0, i = 1, . . . m
Ax = b
min f (x)
x,s
subject to si ≥ 0, i = 1, . . . m
gi (x) + si = 0, i = 1, . . . m
Ax = b
hj (x) = 0, j = 1, . . . r
hj (x) ≤ 0, j = 1, . . . r
24
Example: maximum utility problem
The maximum utility problem models investment/consumption:
T
X
max αt u(xt )
x,b
t=1
subject to bt+1 = bt + f (bt ) − xt , t = 1, . . . T
0 ≤ xt ≤ bt , t = 1, . . . T
bt+1 ≤ bt + f (bt ) − xt , t = 1, . . . T ?
25
Example: principal components analysis
Given X ∈ Rn×p , consider the low rank approximation problem:
Here kAk2F = ni=1 pj=1 A2ij , the entrywise squared `2 norm, and
P P
rank(A) denotes the rank of A
R = Uk Dk VkT
27
Now consider relaxing constraint set to Fk = conv(C), its convex
hull. Note
max tr(SZ)
Z∈Fk
28
References and further reading
29