Docsity

Understanding the Duality in Convex Optimization: Primal-Dual Relationship, Study notes of Computer Graphics

Toggle sidebar
bg1
Convex Optimization — Boyd & Vandenberghe
5. Duality
•Lagrange dual problem
•weak and strong duality
•geometric interpretation
•optimality conditions
•perturbation and sensitivity analysis
•examples
•generalized inequalities
5–1
Lagrangian
standard form problem (not necessarily convex)
minimize f0(x)
subject to fi(x)≤0, i = 1, . . . , m
hi(x) = 0, i = 1, . . . , p
variable x∈Rn, domain D, optimal value p?
Lagrangian: L:Rn×Rm×Rp→R, with dom L=D × Rm×Rp,
L(x, λ, ν) = f0(x) +
m
X
i=1
λifi(x) +
p
X
i=1
νihi(x)
•weighted sum of objective and constraint functions
•λiis Lagrange multiplier associated with fi(x)≤0
•νiis Lagrange multiplier associated with hi(x) = 0
Duality 5–2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Understanding the Duality in Convex Optimization: Primal-Dual Relationship and more Study notes Computer Graphics in PDF only on Docsity!

Convex Optimization — Boyd & Vandenberghe

5. Duality

  • Lagrange dual problem
  • weak and strong duality
  • geometric interpretation
  • optimality conditions
  • perturbation and sensitivity analysis
  • examples
  • generalized inequalities

5–

Lagrangian

standard form problem (not necessarily convex)

minimize f 0 (x) subject to fi(x) ≤ 0 , i = 1,... , m hi(x) = 0, i = 1,... , p

variable x ∈ Rn, domain D, optimal value p?

Lagrangian: L : Rn^ × Rm^ × Rp^ → R, with dom L = D × Rm^ × Rp,

L(x, λ, ν) = f 0 (x) +

∑^ m

i=

λifi(x) +

∑^ p

i=

νihi(x)

  • weighted sum of objective and constraint functions
  • λi is Lagrange multiplier associated with fi(x) ≤ 0
  • νi is Lagrange multiplier associated with hi(x) = 0

Lagrange dual function

Lagrange dual function: g : Rm^ × Rp^ → R,

g(λ, ν) = inf x∈D L(x, λ, ν)

= inf x∈D

f 0 (x) +

∑^ m

i=

λifi(x) +

∑^ p

i=

νihi(x)

g is concave, can be −∞ for some λ, ν

lower bound property: if λ ∫ 0 , then g(λ, ν) ≤ p?

proof: if x˜ is feasible and λ ∫ 0 , then

f 0 (˜x) ≥ L(˜x, λ, ν) ≥ inf x∈D L(x, λ, ν) = g(λ, ν)

minimizing over all feasible x˜ gives p?^ ≥ g(λ, ν)

Duality 5–

Least-norm solution of linear equations

minimize xT^ x subject to Ax = b

dual function

  • Lagrangian is L(x, ν) = xT^ x + νT^ (Ax − b)
  • to minimize L over x, set gradient equal to zero:

∇xL(x, ν) = 2x + AT^ ν = 0 =⇒ x = −(1/2)AT^ ν

  • plug in in L to obtain g:

g(ν) = L((− 1 /2)AT^ ν, ν) = −

νT^ AAT^ ν − bT^ ν

a concave function of ν

lower bound property: p?^ ≥ −(1/4)νT^ AAT^ ν − bT^ ν for all ν

Two-way partitioning

minimize xT^ W x subject to x^2 i = 1, i = 1,... , n

  • a nonconvex problem; feasible set contains 2 n^ discrete points
  • interpretation: partition { 1 ,... , n} in two sets; Wij is cost of assigning i, j to the same set; −Wij is cost of assigning to different sets

dual function

g(ν) = inf x (xT^ W x +

i

νi(x^2 i − 1)) = inf x xT^ (W + diag(ν))x − 1 T^ ν

− 1 T^ ν W + diag(ν) ∫ 0 −∞ otherwise

lower bound property: p?^ ≥ − 1 T^ ν if W + diag(ν) ∫ 0

example: ν = −λmin(W ) 1 gives bound p?^ ≥ nλmin(W )

Duality 5–

Lagrange dual and conjugate function

minimize f 0 (x) subject to Ax π b, Cx = d

dual function

g(λ, ν) = inf x∈dom f 0

f 0 (x) + (AT^ λ + CT^ ν)T^ x − bT^ λ − dT^ ν

= −f 0 ∗ (−AT^ λ − CT^ ν) − bT^ λ − dT^ ν

  • recall definition of conjugate f ∗(y) = supx∈dom f (yT^ x − f (x))
  • simplifies derivation of dual if conjugate of f 0 is kown

example: entropy maximization

f 0 (x) =

∑^ n

i=

xi log xi, f 0 ∗ (y) =

∑^ n

i=

eyi−^1

The dual problem

Lagrange dual problem

maximize g(λ, ν) subject to λ ∫ 0

  • finds best lower bound on p?, obtained from Lagrange dual function
  • a convex optimization problem; optimal value denoted d?
  • λ, ν are dual feasible if λ ∫ 0 , (λ, ν) ∈ dom g
  • often simplified by making implicit constraint (λ, ν) ∈ dom g explicit

example: standard form LP and its dual (page 5–5)

minimize cT^ x subject to Ax = b x ∫ 0

maximize −bT^ ν subject to AT^ ν + c ∫ 0

Duality 5–

Weak and strong duality

weak duality: d?^ ≤ p?

  • always holds (for convex and nonconvex problems)
  • can be used to find nontrivial lower bounds for difficult problems for example, solving the SDP

maximize − 1 T^ ν subject to W + diag(ν) ∫ 0

gives a lower bound for the two-way partitioning problem on page 5–

strong duality: d?^ = p?

  • does not hold in general
  • (usually) holds for convex problems
  • conditions that guarantee strong duality in convex problems are called constraint qualifications

Quadratic program

primal problem (assume P ∈ Sn ++)

minimize xT^ P x subject to Ax π b

dual function

g(λ) = inf x

xT^ P x + λT^ (Ax − b)

λT^ AP −^1 AT^ λ − bT^ λ

dual problem

maximize −(1/4)λT^ AP −^1 AT^ λ − bT^ λ subject to λ ∫ 0

  • from Slater’s condition: p?^ = d?^ if Ax˜ ≺ b for some x˜
  • in fact, p?^ = d?^ always

Duality 5–

A nonconvex problem with strong duality

minimize xT^ Ax + 2bT^ x subject to xT^ x ≤ 1

nonconvex if A 6 ∫ 0

dual function: g(λ) = infx(xT^ (A + λI)x + 2bT^ x − λ)

  • unbounded below if A + λI 6 ∫ 0 or if A + λI ∫ 0 and b 6 ∈ R(A + λI)
  • minimized by x = −(A + λI)†b otherwise: g(λ) = −bT^ (A + λI)†b − λ

dual problem and equivalent SDP:

maximize −bT^ (A + λI)†b − λ subject to A + λI ∫ 0 b ∈ R(A + λI)

maximize −t − λ subject to

[

A + λI b bT^ t

]

strong duality although primal problem is not convex (not easy to show)

Geometric interpretation

for simplicity, consider problem with one constraint f 1 (x) ≤ 0

interpretation of dual function:

g(λ) = inf (u,t)∈G

(t + λu), where G = {(f 1 (x), f 0 (x)) | x ∈ D}

PSfrag replacements G f 1 (x) (^) p? λu + t = g(λ) g(λ)

t

u

PSfrag replacements

G p? d?

t

u

  • λu + t = g(λ) is (non-vertical) supporting hyperplane to G
  • hyperplane intersects t-axis at t = g(λ)

Duality 5–

epigraph variation: same interpretation if G is replaced with

A = {(u, t) | f 1 (x) ≤ u, f 0 (x) ≤ t for some x ∈ D}

PSfrag replacements

A

f 1 (x) p? g(λ)

λu + t = g(λ)

t

u

strong duality

  • holds if there is a non-vertical supporting hyperplane to A at (0, p?)
  • for convex problem, A is convex, hence has supp. hyperplane at (0, p?)
  • Slater’s condition: if there exist (˜u, ˜t) ∈ A with u <˜ 0 , then supporting hyperplanes at (0, p?) must be non-vertical

KKT conditions for convex problem

if x˜, λ˜, ν˜ satisfy KKT for a convex problem, then they are optimal:

  • from complementary slackness: f 0 (˜x) = L(˜x, ˜λ, ν˜)
  • from 4th condition (and convexity): g(λ,˜ ˜ν) = L(˜x, λ,˜ ν˜)

hence, f 0 (˜x) = g(λ,˜ ν˜)

if Slater’s condition is satisfied:

x is optimal if and only if there exist λ, ν that satisfy KKT conditions

  • recall that Slater implies strong duality, and dual optimum is attained
  • generalizes optimality condition ∇f 0 (x) = 0 for unconstrained problem

Duality 5–

example: water-filling (assume αi > 0 )

minimize −

∑n i=1 log(xi^ +^ αi) subject to x ∫ 0 , 1 T^ x = 1

x is optimal iff x ∫ 0 , 1 T^ x = 1, and there exist λ ∈ Rn, ν ∈ R such that

λ ∫ 0 , λixi = 0,

xi + αi

  • λi = ν
  • if ν < 1 /αi: λi = 0 and xi = 1/ν − αi
  • if ν ≥ 1 /αi: λi = ν − 1 /αi and xi = 0
  • determine ν from 1 T^ x =

∑n i=1 max{^0 ,^1 /ν^ −^ αi}^ = 1

interpretation

  • n patches; level of patch i is at height αi
  • flood area with unit amount of water
  • resulting level is 1 /ν?

PSfrag replacements

i

1 /ν? x i αi

Perturbation and sensitivity analysis

(unperturbed) optimization problem and its dual

minimize f 0 (x) subject to fi(x) ≤ 0 , i = 1,... , m hi(x) = 0, i = 1,... , p

maximize g(λ, ν) subject to λ ∫ 0

perturbed problem and its dual

min. f 0 (x) s.t. fi(x) ≤ ui, i = 1,... , m hi(x) = vi, i = 1,... , p

max. g(λ, ν) − uT^ λ − vT^ ν s.t. λ ∫ 0

  • x is primal variable; u, v are parameters
  • p?(u, v) is optimal value as a function of u, v
  • we are interested in information about p?(u, v) that we can obtain from the solution of the unperturbed problem and its dual

Duality 5–

global sensitivity result

assume strong duality holds for unperturbed problem, and that λ?, ν?^ are dual optimal for unperturbed problem

apply weak duality to perturbed problem:

p?(u, v) ≥ g(λ?, ν?) − uT^ λ?^ − vT^ ν? = p?(0, 0) − uT^ λ?^ − vT^ ν?

sensitivity interpretation

  • if λ?i large: p?^ increases greatly if we tighten constraint i (ui < 0 )
  • if λ?i small: p?^ does not decrease much if we loosen constraint i (ui > 0 )
  • if νi? large and positive: p?^ increases greatly if we take vi < 0 ; if νi? large and negative: p?^ increases greatly if we take vi > 0
  • if νi? small and positive: p?^ does not decrease much if we take vi > 0 ; if νi? small and negative: p?^ does not decrease much if we take vi < 0

Introducing new variables and equality constraints

minimize f 0 (Ax + b)

  • dual function is constant: g = infx L(x) = infx f 0 (Ax + b) = p?
  • we have strong duality, but dual is quite useless

reformulated problem and its dual

minimize f 0 (y) subject to Ax + b − y = 0

maximize bT^ ν − f 0 ∗ (ν) subject to AT^ ν = 0

dual function follows from

g(ν) = inf x,y (f 0 (y) − νT^ y + νT^ Ax + bT^ ν)

−f 0 ∗ (ν) + bT^ ν AT^ ν = 0 −∞ otherwise

Duality 5–

norm approximation problem: minimize ‖Ax − b‖

minimize ‖y‖ subject to y = Ax − b

can look up conjugate of ‖ · ‖, or derive dual directly

g(ν) = inf x,y (‖y‖ + νT^ y − νT^ Ax + bT^ ν)

bT^ ν + infy(‖y‖ + νT^ y) AT^ ν = 0 −∞ otherwise

=

bT^ ν AT^ ν = 0, ‖ν‖∗ ≤ 1 −∞ otherwise

(see page 5–4)

dual of norm approximation problem

maximize bT^ ν subject to AT^ ν = 0, ‖ν‖∗ ≤ 1

Implicit constraints

LP with box constraints: primal and dual problem

minimize cT^ x subject to Ax = b − 1 π x π 1

maximize −bT^ ν − 1 T^ λ 1 − 1 T^ λ 2 subject to c + AT^ ν + λ 1 − λ 2 = 0 λ 1 ∫ 0 , λ 2 ∫ 0

reformulation with box constraints made implicit

minimize f 0 (x) =

cT^ x − 1 π x π 1 ∞ otherwise subject to Ax = b

dual function

g(ν) = inf − 1 πxπ 1 (cT^ x + νT^ (Ax − b))

= −bT^ ν − ‖AT^ ν + c‖ 1

dual problem: maximize −bT^ ν − ‖AT^ ν + c‖ 1

Duality 5–

Problems with generalized inequalities

minimize f 0 (x) subject to fi(x) πKi 0 , i = 1,... , m hi(x) = 0, i = 1,... , p

πKi is generalized inequality on Rki

definitions are parallel to scalar case:

  • Lagrange multiplier for fi(x) πKi 0 is vector λi ∈ Rki
  • Lagrangian L : Rn^ × Rk^1 × · · · × Rkm^ × Rp^ → R, is defined as

L(x, λ 1 , · · · , λm, ν) = f 0 (x) +

∑^ m

i=

λTi fi(x) +

∑^ p

i=

νihi(x)

  • dual function g : Rk^1 × · · · × Rkm^ × Rp^ → R, is defined as

g(λ 1 ,... , λm, ν) = inf x∈D

L(x, λ 1 , · · · , λm, ν)