430 likes | 569 Views
Probabilistic Inference Lecture 4 – Part 2. M. Pawan Kumar pawan.kumar@ecp.fr. Slides available online http:// cvc.centrale-ponts.fr /personnel/ pawan /. Outline. Integer Programming Formulation LP Relaxation and its Dual Convergent Solution for Dual Properties and Computational Issues.
E N D
Probabilistic InferenceLecture 4 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online http://cvc.centrale-ponts.fr/personnel/pawan/
Outline • Integer Programming Formulation • LP Relaxation and its Dual • Convergent Solution for Dual • Properties and Computational Issues
Things to Remember • BP is exact for trees • Every iteration provides a reparameterization • Forward-pass computes min-marginals of root
Integer Programming Formulation 2 0 4 Unary Potentials Label l1 1 2 1 b;0 = 2 a;0 = 5 Label l0 b;1 = 4 5 0 2 a;1 = 2 Vb Va Labelling f(a) = 1 ya;0 = 0 ya;1 = 1 yb;0 = 1 yb;1 = 0 f(b) = 0 Any f(.) has equivalent boolean variables ya;i
Integer Programming Formulation 2 0 4 Unary Potentials Label l1 1 2 1 b;0 = 2 a;0 = 5 Label l0 b;1 = 4 5 0 2 a;1 = 2 Vb Va Labelling f(a) = 1 ya;0 = 0 ya;1 = 1 yb;0 = 1 yb;1 = 0 f(b) = 0 Find the optimal variables ya;i
Integer Programming Formulation 2 0 4 Unary Potentials Label l1 1 2 1 b;0 = 2 a;0 = 5 Label l0 b;1 = 4 5 0 2 a;1 = 2 Vb Va 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
Integer Programming Formulation 2 0 4 Pairwise Potentials Label l1 1 2 1 ab;01 = 1 ab;00 = 0 Label l0 ab;11 = 0 5 0 2 ab;10 = 1 Vb Va Sum of Pairwise Potentials ∑(a,b) ∑ik ab;ik ya;iyb;k ya;i {0,1} ∑i ya;i = 1
Integer Programming Formulation 2 0 4 Pairwise Potentials Label l1 1 2 1 ab;01 = 1 ab;00 = 0 Label l0 ab;11 = 0 5 0 2 ab;10 = 1 Vb Va Sum of Pairwise Potentials ∑(a,b) ∑ik ab;ik yab;ik yab;ik =ya;i yb;k ya;i {0,1} ∑i ya;i = 1
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
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 ….]
ya;1 ya;0 One variable, two labels y = [ ya;0 ya;1] = [ a;0a;1] ya;0 + ya;1 = 1 ya;1 {0,1} ya;0 {0,1}
Two variables, two labels ya;0 + ya;1 = 1 ya;1 {0,1} ya;0 {0,1} yb;0 + yb;1 = 1 yb;1 {0,1} yb;0 {0,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 • = [ a;0a;1 b;0b;1 ab;00ab;01 ab;10ab;11] y = [ ya;0ya;1 yb;0yb;1 yab;00yab;01 yab;10yab;11]
In General Marginal Polytope
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
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 ….]
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*
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
Outline • Integer Programming Formulation • LP Relaxation and its Dual • Convergent Solution for Dual • Properties and Computational Issues
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
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
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
Linear Programming Relaxation min Ty ya;i [0,1] ∑i ya;i = 1 ∑k yab;ik =ya;i∑k yb;k = 1 One reason why we can’t solve this
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
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
ya;1 ya;0 One variable, two labels y = [ ya;0 ya;1] = [ a;0a;1] ya;0 + ya;1 = 1 ya;1 {0,1} ya;0 {0,1}
ya;1 ya;0 One variable, two labels y = [ ya;0 ya;1] = [ a;0a;1] ya;0 + ya;1 = 1 ya;1 [0,1] ya;0 [0,1]
Two variables, two labels ya;0 + ya;1 = 1 ya;1 {0,1} ya;0 {0,1} yb;0 + yb;1 = 1 yb;1 {0,1} yb;0 {0,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 • = [ a;0a;1 b;0b;1 ab;00ab;01 ab;10ab;11] y = [ ya;0ya;1 yb;0yb;1 yab;00yab;01 yab;10yab;11]
Two variables, two labels ya;0 + ya;1 = 1 ya;1 [0,1] ya;0 [0,1] yb;0 + yb;1 = 1 yb;1 [0,1] yb;0 [0,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 • = [ a;0a;1 b;0b;1 ab;00ab;01 ab;10ab;11] y = [ ya;0ya;1 yb;0yb;1 yab;00yab;01 yab;10yab;11]
Two variables, two labels ya;0 + ya;1 = 1 ya;1 [0,1] ya;0 [0,1] yb;0 + yb;1 = 1 yb;1 [0,1] yb;0 [0,1] yab;00 + yab;01 = ya;0 yab;10 = ya;1 yb;0 yab;11 = ya;1 yb;1 • = [ a;0a;1 b;0b;1 ab;00ab;01 ab;10ab;11] y = [ ya;0ya;1 yb;0yb;1 yab;00yab;01 yab;10yab;11]
Two variables, two labels ya;0 + ya;1 = 1 ya;1 [0,1] ya;0 [0,1] yb;0 + yb;1 = 1 yb;1 [0,1] yb;0 [0,1] yab;00 + yab;01 = ya;0 yab;10 + yab;11 = ya;1 • = [ a;0a;1 b;0b;1 ab;00ab;01 ab;10ab;11] y = [ ya;0ya;1 yb;0yb;1 yab;00yab;01 yab;10yab;11]
In General Local Polytope Marginal Polytope
In General • R(|V||L| + |E||L|2) y [0,1](|V||L| + |E||L|2) Number of constraints |V||L| + |V| + |E||L|
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
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
Linear Programming Relaxation Many interesting properties • Preserves solution for reparameterization • Global optimal MAP for trees Wainwright et al., 2001 • Global optimal MAP for submodular energy Chekuriet al., 2001 But we are interested in NP-hard cases
Linear Programming Relaxation Many interesting properties - Integrality Gap • Large class of problems • Metric Labelling • Semi-metric Labelling • Most likely, provides best possible integrality gap Manokaran et al., 2008
Linear Programming Relaxation Many interesting properties - Dual • A computationally useful dual Optimal value of dual = Optimal value of primal
Dual of the LP Relaxation Wainwright et al., 2001 min Ty Va Vb Vc Vd Ve Vf ya;i [0,1] Vg Vh Vi ∑i ya;i = 1 ∑k yab;ik =ya;i
Dual of the LP Relaxation Wainwright et al., 2001 1 1 Va Vb Vc Va Vb Vc 2 Vd Ve Vf 2 Vd Ve Vf 3 Vg Vh Vi 3 Vg Vh Vi 4 5 6 Va Vb Vc i ≥ 0 Vd Ve Vf Vg Vh Vi ii = 4 5 6
Dual of the LP Relaxation Wainwright et al., 2001 1 q*(1) Va Vb Vc Va Vb Vc Vd Ve Vf 2 q*(2) Vd Ve Vf Vg Vh Vi 3 q*(3) Vg Vh Vi q*(4) q*(5) q*(6) Va Vb Vc i ≥ 0 Dual of LP Vd Ve Vf max iq*(i) Vg Vh Vi ii = 4 5 6
Dual of the LP Relaxation Wainwright et al., 2001 1 q*(1) Va Vb Vc Va Vb Vc Vd Ve Vf 2 q*(2) Vd Ve Vf Vg Vh Vi 3 q*(3) Vg Vh Vi q*(4) q*(5) q*(6) Va Vb Vc i ≥ 0 Dual of LP Vd Ve Vf max iq*(i) Vg Vh Vi ii 4 5 6
Dual of the LP Relaxation Wainwright et al., 2001 max iq*(i) ii I can easily compute q*(i) I can easily maintain reparam constraint So can I easily solve the dual?