Lecture 3: Semidefinite Programming Lecture Outline Part I: - - PowerPoint PPT Presentation
Lecture 3: Semidefinite Programming Lecture Outline Part I: - - PowerPoint PPT Presentation
Lecture 3: Semidefinite Programming Lecture Outline Part I: Semidefinite programming, examples, canonical form, and duality Part II: Strong Duality Failure Examples Part III: Conditions for strong duality Part IV: Solving convex
Lecture Outline
- Part I: Semidefinite programming, examples,
canonical form, and duality
- Part II: Strong Duality Failure Examples
- Part III: Conditions for strong duality
- Part IV: Solving convex optimization problems
Part I: Semidefinite Programming, Examples, Canonical Form, and Duality
Semidefinite Programming
- Semidefinite Programming: Want to optimize a
linear function, can now have matrix positive semidefiniteness (PSD) constraints as well as linear equalities and inequalities
- Example: Maximize ๐ฆ subject to
1 ๐ฆ ๐ฆ 2 + ๐ฆ โฝ 0
- Answer: ๐ฆ = 2
Example: Goemans-Williamson
- First approximation algorithm using a
semiefinite program (SDP)
- MAX-CUT reformulation: Have a variable ๐ฆ๐ for
each vertex i, will set ๐ฆ๐ = ยฑ1 depending on which side of the cut ๐ is on.
- Want to maximize ฯ๐,๐:๐<๐, ๐,๐ โ๐น(๐ป)
1โ๐ฆ๐๐ฆ๐ 2
where ๐ฆ๐ โ {โ1, +1} for all ๐.
Example: Goemans-Williamson
- Idea: Take ๐ so that ๐๐๐ = ๐ฆ๐๐ฆ๐
- Want to maximize ฯ๐,๐:๐<๐, ๐,๐ โ๐น(๐ป)
1โ๐๐๐ 2
where ๐๐๐ = 1 for all ๐ and ๐ = xxT.
- Relaxation: Maximize ฯ๐,๐:๐<๐, ๐,๐ โ๐น(๐ป)
1โ๐๐๐ 2
subject to
1. โ๐, ๐๐๐ = 1 2. ๐ โฝ 0
Example: SOS Hierarchy
- Goal: Minimize a polynomial โ(๐ฆ1, โฆ , ๐ฆ๐)
subject to constraints ๐ก1 ๐ฆ1, โฆ , ๐ฆ๐ = 0, ๐ก2 ๐ฆ1, โฆ , ๐ฆ๐ = 0, etc.
- Relaxation: Minimize แบผ[โ] where แบผ is a linear
map from polynomials of degree โค ๐ to โ satisfying:
1. แบผ 1 = 1
- 2. แบผ ๐๐ก๐ = 0 whenever deg ๐ + deg ๐ก๐ โค ๐
- 3. แบผ ๐2 โฅ 0 whenever deg ๐ โค
๐ 2
The Moment Matrix
- Indexed by monomials of degree โค
๐ 2
- ๐๐๐ = เทจ
๐น[๐๐]
- Each ๐ of degree โค
๐ 2 corresponds to a vector
- เทจ
๐น ๐2 = ๐๐๐๐
- โ๐, เทจ
๐น ๐2 โฅ 0 โ ๐ is PSD
๐ ๐ แบผ[pq] ๐ p,q are monomials of degree at most
๐ 2.
Semidefinite Program for SOS
- Program: Minimize แบผ[โ] where แบผ satisfies:
1. แบผ 1 = 1
- 2. แบผ ๐๐ก๐ = 0 whenever deg ๐ + deg ๐ก๐ โค ๐
- 3. แบผ ๐2 โฅ 0 whenever deg ๐ โค
๐ 2
- Expressible as semidefinite program using ๐:
- 1. โโ, แบผ[โ] is a linear function of entries of ๐
- 2. Constraints that แบผ 1 = 1 and แบผ ๐๐ก๐ = 0 give
linear constraints on entries of ๐
- 3. แบผ ๐2 โฅ 0 whenever deg ๐ โค
๐ 2 โฌ๐ โฝ 0
- 4. Also have SOS symmetry constraints
SOS symmetry
- Define ๐ฆ๐ฝ = ฯ๐โ๐ฝ ๐ฆ๐ where ๐ฝ is a multi-set
- SOS symmetry constraints: ๐๐ฆ๐ฝ๐ฆ๐พ = ๐๐ฆ๐ฝโฒ๐ฆ๐พโฒ
whenever ๐ฝ โช ๐พ = ๐ฝโฒ โช ๐พโฒ
- Example:
1 ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐ ๐ 1 ๐ฆ ๐ง ๐ฆ2 ๐ฆ๐ง ๐ง2 1 ๐ฆ ๐ง ๐ฆ2 ๐ฆ๐ง ๐ง2
Canonical Form
- Def: Define ๐โฆ๐ = ฯ๐,๐ ๐๐๐๐
๐๐ = ๐ข๐ (๐๐๐) to be
the entry-wise dot product of ๐ and ๐
- Canonical form: Minimize ๐ทโฆ๐ subject to
1. โ๐, ๐ต๐โฆ๐ = ๐๐ where the ๐ต๐ are symmetric 2. ๐ โฝ 0
Putting Things Into Canonical Form
- Canonical form: Minimize ๐ทโฆ๐ subject to
1. โ๐, ๐ต๐โฆ๐ = ๐๐ where the ๐ต๐ are symmetric 2. ๐ โฝ 0
- Ideas for obtaining canonical form:
1. ๐ โฝ 0, ๐ โฝ 0โฌ ๐ ๐ โฝ 0
- 2. Slack variables: ๐ต๐โฆ๐ โค ๐๐ โฌ๐ต๐โฆ๐ = ๐๐ + ๐ก๐, ๐ก๐ โฅ 0
- 3. Can enforce ๐ก๐ โฅ 0 by putting ๐ก๐ on the diagonal of
๐
Semidefinite Programming Dual
- Primal: Minimize ๐ทโฆ๐ subject to
1. โ๐, ๐ต๐โฆ๐ = ๐๐ where the ๐ต๐ are symmetric 2. ๐ โฝ 0
- Dual: Maximize ฯ๐ ๐ง๐๐๐ subject to
1. ฯ๐ ๐ง๐๐ต๐ โผ ๐ท
- Value for dual lower bounds value for primal:
๐ทโฆ๐ = ๐ท โ ฯ๐ ๐ง๐๐ต๐ โฆ๐ + ฯ๐ ๐ง๐๐ต๐ โฆ๐ โฅ ฯ๐ ๐ง๐๐๐
Explanation for Duality
- Primal: Minimize ๐ทโฆ๐ subject to
1. โ๐, ๐ต๐โฆ๐ = ๐๐ where the ๐ต๐ are symmetric 2. ๐ โฝ 0
- = min
๐โฝ0 max ๐ง
๐ทโฆ๐ + ฯ๐ ๐ง๐ ๐๐ โ ๐ต๐โฆ๐
- = max
๐ง
min
๐โฝ0 ฯ๐ ๐ง๐๐๐ + (๐ท โ ฯ๐ ๐ง๐๐ต๐)โฆ๐
- Dual: Maximize ฯ๐ ๐ง๐๐๐ subject to
1. ฯ๐ ๐ง๐๐ต๐ โผ ๐ท
In class exercise: SOS duality
- Exercise: What is the dual of the semidefinite
program for SOS?
- Primal: Minimize แบผ[โ] where แบผ is a linear map
from polynomials of degree โค ๐ to โ such that:
1. แบผ 1 = 1
- 2. แบผ ๐๐ก๐ = 0 whenever deg ๐ + deg ๐ก๐ โค ๐
- 3. แบผ ๐2 โฅ 0 whenever deg ๐ โค
๐ 2
In class exercise solution
- Definition: Given a symmetric matrix ๐ indexed
by monomials ๐ฆ๐ฝ, we say that ๐ represents the polynomial ๐๐ = ฯ๐พ ฯ๐ฝ,๐ฝโฒ:๐ฝโช๐ฝโฒ=๐พ ๐ ๐ฆ๐ฝ๐ฆ๐ฝโฒ๐ฆ๐พ
- Proposition 1: If ๐ โฝ 0 then ๐๐ is a sum of
- squares. Conversely, if ๐ is a sum of squares
then โ๐ โฝ 0: ๐ = ๐๐
- Proposition 2: If ๐ is a moment matrix then
๐โฆ๐ = แบผ ๐๐
In class exercise solution continued
- ๐ท = ๐ผ where ๐๐ผ = โ
- Constraint that เทจ
๐น 1 = 1 gives matrix ๐ต1 = 1 โฏ โฏ โฎ โฎ โฑ and ๐1 = 1
- Constraints that เทจ
๐น ๐๐ก๐ = 0 give matrices ๐ต๐ where ๐๐ต๐ = ๐๐ก๐ and ๐
๐ = 0
- SOS symmetry constraints give matrices ๐ต๐
such that ๐๐ต๐ = 0 and ๐๐ = 0
In class exercise solution continued
- Recall dual: Maximize ฯ๐ ๐ง๐๐๐ subject to
1. ฯ๐ ๐ง๐๐ต๐ โผ ๐ท
- Here: Maximize ๐ such that
๐๐ต1 + ฯ๐ ๐ง๐๐ต๐ + ฯ๐ ๐ง๐๐ต๐ โผ ๐ผ
- This is the answer, but letโs simplify it into a
more intuitive form.
- Let ๐ = ๐ผ โ ๐๐ต1 + ฯ๐ ๐ง๐๐ต๐ + ฯ๐ ๐ง๐๐ต๐
- ๐ โฝ 0
In class exercise solution continued
- ๐ผ = ๐๐ต1 + ฯ๐ ๐ง๐๐ต๐ + ฯ๐ ๐ง๐๐ต๐ + ๐ ,
A1 = 1 โฏ โฏ โฎ โฎ โฑ , ๐ โฝ 0
- View everything in terms of polynomials.
- ๐๐ผ = โ, ๐๐ต1 = 1, ๐(ฯ๐ ๐ง๐๐ต๐) = ฯ๐ ๐
๐๐ก๐ for some
๐
๐, ๐ฯ๐ ๐ง๐๐ต๐ = 0, ๐๐ = ฯ๐ ๐๐ 2 for some ๐๐
- โ = ๐ + ฯ๐ ๐
๐๐ก๐ + ฯ๐ ๐๐ 2
In class exercise solution continued
- Simplified Dual: Maximize ๐ such that
โ = ๐ + ฯ๐ ๐
๐๐ก๐ + ฯ๐ ๐๐ 2
- This is a Positivstellensatz proof that โ โฅ ๐ (see
Lectures 1 and 5)
Part II: Strong Duality Failure Examples
Strong Duality Failure
- Unlike linear programming, it is not always the
case that the values of the primal and dual are the same.
- However, almost never an issue in practice,
have to be trying in order to break strong duality.
- Weโll give this issue its due here then ignore it
for the rest of the seminar.
Non-attainability Example
- Primal: Minimize ๐ฆ2 subject to ๐ฆ1
1 1 ๐ฆ2 โฝ 0
- Dual: Maximize 2๐ง subject to
1. ๐ง ๐ง 0 โผ 0 1
- Duality demonstration:
1 โ 0 ๐ง ๐ง โฆ ๐ฆ1 1 1 ๐ฆ2 = ๐ฆ2 โ 2๐ง โฅ 0
- Dual has optimal value 0, this is not attainable
in the primal (we can only get arbitrarily close)
Duality Gap Example
- Primal: Minimize ๐ฆ2 + 1 subject to
1 + ๐ฆ2 ๐ฆ1 ๐ฆ2 ๐ฆ2 โฝ 0
- Dual: Maximize 2๐ง subject to
2๐ง ๐ง1 ๐ง2 ๐ง1 โ๐ง ๐ง2 โ๐ง ๐ง3 โผ 1
- Duality demonstration
1 โ 2๐ง ๐ง1 ๐ง2 ๐ง1 โ๐ง ๐ง2 โ๐ง ๐ง3 โฆ 1 + ๐ฆ2 ๐ฆ1 ๐ฆ2 ๐ฆ2 = ๐ฆ2 + 1 โ 2๐ง โฅ 0
Duality Gap Example
- Primal: Minimize ๐ฆ2 + 1 subject to
1 + ๐ฆ2 ๐ฆ1 ๐ฆ2 ๐ฆ2 โฝ 0
- Has optimal value 1 as we must have ๐ฆ2 = 0
- Dual: Maximize 2๐ง subject to
2๐ง ๐ง1 ๐ง2 ๐ง1 โ๐ง ๐ง2 โ๐ง ๐ง3 โผ 1
- Has optimal value 0 as we must have ๐ง = 0.
- Note: This example was taken from Lecture 13,
EE227A at Berkeley given on October 14, 2008.
Part III: Conditions for strong duality
Sufficient Strong Duality Conditions
- How can we rule out such a gap?
- Slaterโs Condition (informal):
โ If the feasible region for the primal has an interior point (in the subspace defined by the linear equalities) then the duality gap is 0. Moreover, if the optimal value is finite then it is attainable in the dual.
- Also sufficient if either the primal or the dual is
feasible and bounded (i.e. any very large point violates the constraints)
Recall Minimax Theorem
- Von Neumann [1928]: If ๐ and ๐ are convex
compact subsets of ๐๐ and ๐๐ and ๐: ๐ ร ๐ โ ๐ is a continuous function which is convex in ๐ and concave in ๐ then max
๐งโ๐ min ๐ฆโ๐ ๐(๐ฆ, ๐ง) = min ๐ฆโ๐ max ๐งโ๐ ๐(๐ฆ, ๐ง)
- Issue: ๐ and ๐ are unbounded in our setting.
Minimax in the limit
- Idea: Minimax applies for arbitrarily large ๐, ๐ so
long as they are bounded
- Can take the limit as ๐, ๐ get larger and larger
- Question: Do we bound ๐ or ๐ first?
- If ๐ is bounded first, get primal: min
๐ฆโ๐ max ๐งโ๐ ๐(๐ฆ, ๐ง)
- If ๐ is bounded first, get dual: max
๐งโ๐ min ๐ฆโ๐ ๐(๐ฆ, ๐ง)
- If we can show it doesnโt matter which is
bounded first, have duality gap 0.
Formal Statements
- Def: Define ๐ถ ๐ = {๐ฆ: ๐ฆ
โค ๐}
- Minimax Theorem: For all finite ๐1, ๐2
max
๐งโ๐โฉ๐ถ(๐2)
min
๐ฆโ๐โฉ๐ถ(๐1) ๐(๐ฆ, ๐ง) =
min
๐ฆโ๐โฉ๐ถ(๐1)
max
๐งโ๐โฉ๐ถ(๐2) ๐(๐ฆ, ๐ง)
- Letโs call this value ๐๐๐ข(๐1, ๐2)
- Primal value: lim
๐1โโ lim ๐2โโ ๐๐๐ข(๐1, ๐2)
- Dual value: lim
๐2โโ lim ๐1โโ ๐๐๐ข(๐1, ๐2)
- Sufficient for 0 gap: Show that
โ๐: โ๐1, ๐2 โฅ ๐, ๐๐๐ข ๐1, ๐2 = ๐๐๐ข(๐, ๐2)
Boundedness Condition Intuition
- Assume โ feasible ๐ฆ โ ๐ถ(๐) but when ๐ฆ
> ๐, constraints on primal are violated.
- Want to show that โ๐โฒ
โ๐1, ๐2 โฅ ๐โฒ, ๐๐๐ข ๐1, ๐2 = ๐๐๐ข(๐โฒ, ๐2)
- We are in the finite setting, so we can assume ๐ฆ
player plays first.
- Intuition: ๐ง player can heavily punish ๐ฆ player
for violated constraints, so ๐ฆ player should always choose an ๐ฆ โ ๐ถ(๐โฒ).
- Similar logic applies to the dual.
Slaterโs Condition Intuition
- Idea: Strictly feasible point ๐ฆ shows it is bad for
๐ง player to play a very large ๐ง.
- Primal: Minimize โ(๐ฆ) subject to {๐๐ ๐ฆ โค ๐๐}
where the ๐๐ are convex.
- ๐ ๐ฆ, ๐ง = ฯ๐ ๐ง๐ ๐๐ ๐ฆ โ ๐๐ + โ(๐ฆ) (weโll
restrict ourselves to non-negative ๐ง)
- Dual: Doesnโt seem to have a nicer form than
max
๐งโฅ0 min ๐ฆ
ฯ๐ ๐ง๐ ๐๐ ๐ฆ โ ๐๐ + โ ๐ฆ
Slaterโs Condition Intuition
- Primal: Minimize โ(๐ฆ) subject to {๐๐ ๐ฆ โค ๐๐}
- Dual: max
๐งโฅ0 min ๐ฆ
ฯ๐ ๐ง๐ ๐๐ ๐ฆ โ ๐๐ + โ ๐ฆ
- Key observation: If โ๐, ๐๐ ๐ฆ < ๐๐, ๐ฆ punishes
very large ๐ง. Thus, ๐ง is effectively bounded.
Strong Duality Conditions Summary
- Strong duality may fail for semidefinite
programs.
- However, strong duality holds if the program is
at all robust (Slaterโs condition is satisfied) or either the primal or dual is feasible and bounded (any very large point violates the constraints)
- Note: working over the hypercube satisfies
boundedness.
Part III: Solving convex
- ptimization problems
Solving Convex Optimization Problems
- In practice: simplex methods or interior point
methods work best
- First polynomial time guarantee: ellipsoid
method
- This seminar: Weโll use algorithms as a black-
box and assume that semidefinite programs of size ๐๐ can be solved in time ๐๐(๐).
- Note: Can fail to be polynomial time in
pathological cases (see Ryan OโDonnellโs note), almost never an issue in practice
Usefulness of Convexity
- Want to minimize a convex function ๐ over a
convex set ๐.
- All local minima are global minima: If ๐ ๐ฆ <
๐(๐ง) then ๐(๐ง) is not a local minima as โ๐ > 0, ๐ ๐๐ฆ + 1 โ ๐ ๐ง โค ๐๐ ๐ฆ + 1 โ ๐ f(y)
- Can always go from the current point ๐ฆ towards
a global minima.
Reduction to Feasibility Testing
- Want to minimize a convex function ๐ over a
convex set ๐
- Testing whether we can achieve ๐ ๐ฆ โค ๐ is
equivalent to finding a point in the convex set Xc = ๐ โฉ {๐ฆ: ๐ ๐ฆ โค ๐}
- If we can solve this feasibility problem, we can
use binary search to approximate the optimal value.
Cutting-plane Oracles
- Let ๐ be a convex set. Given a point ๐ฆ0 โ ๐, a
cutting-plane oracle returns a hyperplane ๐ผ passing through ๐ฆ0 such that ๐ is entirely on
- ne side of ๐ผ.
- Intuition for obtaining a cutting-plane oracle: If
๐ฆ0 โ ๐ then there is a constraint ๐ฆ0 violates. This constraint is of the form ๐ ๐ฆ0 < ๐ where ๐ is convex. ๐ must be inside the half-space ๐๐ โ ๐ฆ โ ๐ฆ0 โค 0
Ellipsoid Method Sketch
- Algorithm: Let ๐ be the feasible set
- 1. Keep track of an ellipsoid ๐ containing ๐
- 2. At each step, query center ๐ of ๐
- 3. If ๐ โ ๐, output ๐. Otherwise, cutting-plane oracle
gives a hyperplane ๐ผ passing through c and ๐ is on
- ne side of ๐ผ. Use ๐ผ to find a smaller ellipsoid ๐โฒ.
- Initial Guarantees:
1. ๐ โ ๐ถ(๐) where ๐ถ ๐ = {๐ฆ โ ๐๐: ๐ฆ โค ๐} 2. ๐ contains a ball of radius ๐ .
- Note: Not polynomial time if ๐
๐ is 2(๐๐(1))
References
- L. E. Ghaoui. Lecture 13: SDP Duality. Berkeley EE227A Convex Optimization and
- Applications. 2008
- [GW95] M. X. Goemans and D. P. Williamson. Improved Approximation Algorithms
for Maximum Cut and Satisfiability Problems Using Semidefinite Programming. J. ACM, 42(6):1115โ1145, 1995.
- [OโDon17] R. OโDonnell. SOS is not Obviously Automatizable, Even Approximately.
ITCS 2017.
- [Sla50] M. Slater. Lagrange Multipliers Revisited. Cowles Commission Discussion
Paper: Mathematics 403, 1950.