Discrete Optimization - M. Pawan Kumar · [email protected] ... Integer Programming Formulation V...

35
Discrete Optimization Lecture 2 – Part 2 M. Pawan Kumar [email protected] Slides available online http://cvn.ecp.fr/personnel/pawan/

Transcript of Discrete Optimization - M. Pawan Kumar · [email protected] ... Integer Programming Formulation V...

Page 1: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Discrete Optimization Lecture 2 – Part 2

M. Pawan Kumar [email protected]

Slides available online http://cvn.ecp.fr/personnel/pawan/

Page 2: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

•  Integer Programming Formulation

•  LP Relaxation

Outline

Page 3: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

Va Vb

Label l0

Label l12

5

4

2

0

1 1

0

2Unary Potentials

θa;0 = 5

θa;1 = 2

θb;0 = 2

θb;1 = 4

Labeling f(a) = 1

f(b) = 0

ya;0 = 0 ya;1 = 1

yb;0 = 1 yb;1 = 0

Any f(.) has equivalent boolean variables ya;i

Page 4: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

Va Vb

2

5

4

2

0

1 1

0

2Unary Potentials

θa;0 = 5

θa;1 = 2

θb;0 = 2

θb;1 = 4

Labeling f(a) = 1

f(b) = 0

ya;0 = 0 ya;1 = 1

yb;0 = 1 yb;1 = 0

Find the optimal variables ya;i

Label l0

Label l1

Page 5: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

Va Vb

2

5

4

2

0

1 1

0

2Unary Potentials

θa;0 = 5

θa;1 = 2

θb;0 = 2

θb;1 = 4

Sum of Unary Potentials

∑a ∑i θa;i ya;i

ya;i ∈ {0,1}, for all Va, li ∑i ya;i = 1, for all Va

Label l0

Label l1

Page 6: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

Va Vb

2

5

4

2

0

1 1

0

2Pairwise Potentials

θab;00 = 0

θab;10 = 1

θab;01 = 1

θab;11 = 0

Sum of Pairwise Potentials

∑(a,b) ∑ik θab;ik ya;iyb;k

ya;i ∈ {0,1} ∑i ya;i = 1

Label l0

Label l1

Page 7: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

Va Vb

2

5

4

2

0

1 1

0

2Pairwise Potentials

θab;00 = 0

θab;10 = 1

θab;01 = 1

θab;11 = 0

Sum of Pairwise Potentials

∑(a,b) ∑ik θab;ik yab;ik

ya;i ∈ {0,1} ∑i ya;i = 1

yab;ik = ya;i yb;k

Label l0

Label l1

Page 8: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

min ∑a ∑i θa;i ya;i + ∑(a,b) ∑ik θab;ik yab;ik

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

Page 9: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

min θTy

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

θ = [ … θa;i …. ; … θab;ik ….] y = [ … ya;i …. ; … yab;ik ….]

Page 10: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

One variable, two labels

ya;0

ya;1

ya;0 ∈ {0,1} ya;1 ∈ {0,1} ya;0 + ya;1 = 1

y = [ ya;0 ya;1] θ = [ θa;0 θa;1]

Page 11: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Two variables, two labels

θ  = [ θa;0 θa;1 θb;0 θb;1

θab;00 θab;01 θab;10 θab;11] y = [ ya;0 ya;1 yb;0 yb;1 yab;00 yab;01 yab;10 yab;11]

ya;0 ∈ {0,1} ya;1 ∈ {0,1} ya;0 + ya;1 = 1

yb;0 ∈ {0,1} yb;1 ∈ {0,1} yb;0 + yb;1 = 1

yab;00 = ya;0 yb;0 yab;01 = ya;0 yb;1

yab;10 = ya;1 yb;0 yab;11 = ya;1 yb;1

Page 12: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

In General

Marginal Polytope

Page 13: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

In General

θ  ∈ R(|V||L| + |E||L|2)

y ∈ {0,1}(|V||L| + |E||L|2)

Number of constraints

|V||L| + |V| + |E||L|2 ya;i ∈ {0,1} ∑i ya;i = 1 yab;ik = ya;i yb;k

Page 14: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

min θTy

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

θ = [ … θa;i …. ; … θab;ik ….] y = [ … ya;i …. ; … yab;ik ….]

Page 15: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

min θTy

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

Solve to obtain MAP labelling y*

Page 16: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Integer Programming Formulation

min θTy

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

But we can’t solve it in general

Page 17: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

•  Integer Programming Formulation

•  LP Relaxation

Outline

Page 18: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ {0,1}

∑i ya;i = 1

yab;ik = ya;i yb;k

Two reasons why we can’t solve this

Page 19: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

yab;ik = ya;i yb;k

One reason why we can’t solve this

Page 20: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

∑k yab;ik = ∑kya;i yb;k

One reason why we can’t solve this

Page 21: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

One reason why we can’t solve this

= 1 ∑k yab;ik = ya;i∑k yb;k

Page 22: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

∑k yab;ik = ya;i

One reason why we can’t solve this

Page 23: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

∑k yab;ik = ya;i

No reason why we can’t solve this * *memory requirements, time complexity

Page 24: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

One variable, two labels

ya;0

ya;1

ya;0 ∈ {0,1} ya;1 ∈ {0,1} ya;0 + ya;1 = 1

y = [ ya;0 ya;1] θ = [ θa;0 θa;1]

Page 25: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

One variable, two labels

ya;0

ya;1

ya;0 ∈ [0,1] ya;1 ∈ [0,1] ya;0 + ya;1 = 1

y = [ ya;0 ya;1] θ = [ θa;0 θa;1]

Page 26: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Two variables, two labels

θ  = [ θa;0 θa;1 θb;0 θb;1

θab;00 θab;01 θab;10 θab;11] y = [ ya;0 ya;1 yb;0 yb;1 yab;00 yab;01 yab;10 yab;11]

ya;0 ∈ {0,1} ya;1 ∈ {0,1} ya;0 + ya;1 = 1

yb;0 ∈ {0,1} yb;1 ∈ {0,1} yb;0 + yb;1 = 1

yab;00 = ya;0 yb;0 yab;01 = ya;0 yb;1

yab;10 = ya;1 yb;0 yab;11 = ya;1 yb;1

Page 27: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Two variables, two labels

θ  = [ θa;0 θa;1 θb;0 θb;1

θab;00 θab;01 θab;10 θab;11] y = [ ya;0 ya;1 yb;0 yb;1 yab;00 yab;01 yab;10 yab;11]

ya;0 ∈ [0,1] ya;1 ∈ [0,1] ya;0 + ya;1 = 1

yb;0 ∈ [0,1] yb;1 ∈ [0,1] yb;0 + yb;1 = 1

yab;00 = ya;0 yb;0 yab;01 = ya;0 yb;1

yab;10 = ya;1 yb;0 yab;11 = ya;1 yb;1

Page 28: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Two variables, two labels

θ  = [ θa;0 θa;1 θb;0 θb;1

θab;00 θab;01 θab;10 θab;11] y = [ ya;0 ya;1 yb;0 yb;1 yab;00 yab;01 yab;10 yab;11]

ya;0 ∈ [0,1] ya;1 ∈ [0,1] ya;0 + ya;1 = 1

yb;0 ∈ [0,1] yb;1 ∈ [0,1] yb;0 + yb;1 = 1

yab;00 + yab;01 = ya;0

yab;10 = ya;1 yb;0 yab;11 = ya;1 yb;1

Page 29: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Two variables, two labels

θ  = [ θa;0 θa;1 θb;0 θb;1

θab;00 θab;01 θab;10 θab;11] y = [ ya;0 ya;1 yb;0 yb;1 yab;00 yab;01 yab;10 yab;11]

ya;0 ∈ [0,1] ya;1 ∈ [0,1] ya;0 + ya;1 = 1

yb;0 ∈ [0,1] yb;1 ∈ [0,1] yb;0 + yb;1 = 1

yab;00 + yab;01 = ya;0

yab;10 + yab;11 = ya;1

Page 30: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

In General

Marginal Polytope

Local Polytope

Page 31: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

In General

θ  ∈ R(|V||L| + |E||L|2)

y ∈ [0,1](|V||L| + |E||L|2)

Number of constraints

|V||L| + |V| + |E||L|

Page 32: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

min θTy

ya;i ∈ [0,1]

∑i ya;i = 1

∑k yab;ik = ya;i

No reason why we can’t solve this

Page 33: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

Extensively studied Optimization

Schlesinger, 1976

Koster, van Hoesel and Kolen, 1998

Theory

Chekuri et al, 2001 Archer et al, 2004

Machine Learning

Wainwright et al., 2001

Page 34: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

Many interesting properties

•  Global optimal MAP for trees

Wainwright et al., 2001

But we are interested in NP-hard cases

•  Preserves solution for reparameterization

•  Global optimal MAP for submodular energy

Chekuri et al., 2001

Page 35: Discrete Optimization - M. Pawan Kumar · pawan.kumar@ecp.fr ... Integer Programming Formulation V a V b Label l 0 Label l 1 2 5 4 2 0 1 1 0 2 ... k Label l 0 Label l 1. Integer Programming

Linear Programming Relaxation

•  Large class of problems

•  Metric Labeling •  Semi-metric Labeling

Many interesting properties - Integrality Gap

Manokaran et al., 2008

•  Most likely, provides best possible integrality gap