1 / 107

Discrete Optimization Lecture 8

Discrete Optimization Lecture 8. M. Pawan Kumar pawan.kumar@ecp.fr. Slides available online http:// cvn.ecp.fr /personnel/ pawan /. Recap !!. Questions?. Energy Minimization. 0. 6. 1. 3. 2. 0. 4. Label l 1. 1. 2. 3. 4. 1. 1. Label l 0. 1. 0. 5. 0. 3. 7. 2. V b. V c.

sol
Télécharger la présentation

Discrete Optimization Lecture 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete OptimizationLecture 8 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online http://cvn.ecp.fr/personnel/pawan/

  2. Recap !! Questions?

  3. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va q* = min Q(f; ) = Q(f*; ) Q(f; ) = ∑a a;f(a) + ∑(a,b) ab;f(a)f(b) f* = arg min Q(f; )

  4. Min-Marginals 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va such that f(a) = i f* = arg min Q(f; ) Min-marginal qa;i

  5. Min-Marginals and MAP • Minimum min-marginal of any variable = • energy of MAP labelling

  6. Equivalently + Mba;i ’a;i = a;i + Mab;k ’ab;ik = ab;ik - Mab;k - Mba;i Reparameterization ’ is a reparameterization of , iff ’   Q(f; ’) = Q(f; ), for all f Kolmogorov, PAMI, 2006 ’b;k = b;k

  7. + Mab;k ’b;k= b;k + Mba;i ’a;i = a;i ’ab;ik = ab;ik - Mab;k - Mba;i Dynamic Programming We only need to know two sets of equations General form of Reparameterization Reparameterization of (a,b) in Belief Propagation Mab;k = mini { a;i + ab;ik } Mba;i = 0

  8. Outline • LP Relaxation and its Dual • TRW Message Passing • Dual Decomposition

  9. 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

  10. Dual of the LP Relaxation Wainwright et al., 2001 1 Va Vb Vc Va Vb Vc 2 Vd Ve Vf Vd Ve Vf 3 Vg Vh Vi Vg Vh Vi 4 5 6  Va Vb Vc Vd Ve Vf Vg Vh Vi  i  

  11. Dual of the LP Relaxation Wainwright et al., 2001 q*(1) Va Vb Vc Va Vb Vc Vd Ve Vf q*(2) Vd Ve Vf Vg Vh Vi q*(3) Vg Vh Vi q*(4) q*(5) q*(6)  Va Vb Vc Dual of LP Vd Ve Vf max  q*(i) Vg Vh Vi  i 

  12. Outline • LP Relaxation and its Dual • TRW Message Passing • Dual Decomposition

  13. Things to Remember • BP is exact for trees • Every iteration provides a reparameterization • Forward-pass computes min-marginals of root

  14. TRW Message Passing Kolmogorov, 2006 4 5 6 1 Va Vb Vc Vb Vc Va 2 Vd Ve Vf Ve Vf Vd 3 Vg Vh Vi Vh Vi Vg Va Pick a variable  q*(i)  i  

  15. TRW Message Passing Kolmogorov, 2006 1c;1 1b;1 1a;1 4a;1 4d;1 4g;1 1c;0 1b;0 1a;0 4a;0 4d;0 4g;0 Vc Vb Va Va Vd Vg  q*(i)  i  

  16. TRW Message Passing Kolmogorov, 2006 1c;1 1b;1 1a;1 4a;1 4d;1 4g;1 1c;0 1b;0 1a;0 4a;0 4d;0 4g;0 Vc Vb Va Va Vd Vg Reparameterize to obtain min-marginals of Va q*(1) + q*(4) + K 1 +4 + rest 

  17. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’1a;1 ’4a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’1a;0 ’4a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg One pass of Belief Propagation q*(’1) + q*(’4) + K ’1 +’4 + rest

  18. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’1a;1 ’4a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’1a;0 ’4a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg Remain the same q*(’1) + q*(’4) + K ’1 +’4 + rest 

  19. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’1a;1 ’4a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’1a;0 ’4a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg min{’1a;0,’1a;1} + min{’4a;0,’4a;1} + K ’1 +’4 + rest 

  20. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’1a;1 ’4a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’1a;0 ’4a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg Compute average of min-marginals of Va min{’1a;0,’1a;1} + min{’4a;0,’4a;1} + K ’1 +’4 + rest 

  21. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’1a;1 ’4a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’1a;0 ’4a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg ’’a;0 = ’1a;0+ ’4a;0 ’’a;1 = ’1a;1+ ’4a;1 2 2 min{’1a;0,’1a;1} + min{’4a;0,’4a;1} + K ’1 +’4 + rest 

  22. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’’a;1 ’’a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’’a;0 ’’a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg ’’a;0 = ’1a;0+ ’4a;0 ’’a;1 = ’1a;1+ ’4a;1 2 2 min{’1a;0,’1a;1} + min{’4a;0,’4a;1} + K ’’1 +’’4 + rest

  23. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’’a;1 ’’a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’’a;0 ’’a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg ’’a;0 = ’1a;0+ ’4a;0 ’’a;1 = ’1a;1+ ’4a;1 2 2 min{’1a;0,’1a;1} + min{’4a;0,’4a;1} + K ’’1 +’’4 + rest  

  24. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’’a;1 ’’a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’’a;0 ’’a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg ’’a;0 = ’1a;0+ ’4a;0 ’’a;1 = ’1a;1+ ’4a;1 2 2 2 min{’’a;0, ’’a;1} + K ’’1 +’’4 + rest  

  25. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’’a;1 ’’a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’’a;0 ’’a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg ≥ min {p1+p2, q1+q2} min {p1, q1} + min {p2, q2} 2 min{’’a;0, ’’a;1} + K ’’1 +’’4 + rest  

  26. TRW Message Passing Kolmogorov, 2006 ’1c;1 ’1b;1 ’’a;1 ’’a;1 ’4d;1 ’4g;1 ’1c;0 ’1b;0 ’’a;0 ’’a;0 ’4d;0 ’4g;0 Vc Vb Va Va Vd Vg Objective function increases or remains constant 2 min{’’a;0, ’’a;1} + K ’’1 +’’4 + rest  

  27. TRW Message Passing Initialize i. Take care of reparam constraint Choose random variable Va Compute min-marginals of Va for all trees Node-average the min-marginals Can also do edge-averaging REPEAT Kolmogorov, 2006

  28. Outline • LP Relaxation and its Dual • TRW Message Passing • Examples • Primal Solution • Results • Dual Decomposition

  29. Example 1 2 0 4 4 0 6 6 1 6 l1 1 2 4 1 3 1 l0 5 0 2 1 3 0 2 3 4 Vb Vc Va Va Vb Vc 5 6 7 Pick variable Va. Reparameterize.

  30. Example 1 5 -3 4 4 0 6 6 -3 10 l1 2 1 -1 3 -3 -2 l0 7 -2 2 1 3 -3 2 3 7 Vb Vc Va Va Vb Vc 5 6 7 Average the min-marginals of Va

  31. Example 1 7.5 -3 4 4 0 6 6 -3 7.5 l1 2 1 -1 3 -3 -2 l0 7 -2 2 1 3 -3 2 3 7 Vb Vc Va Va Vb Vc 7 6 7 Pick variable Vb. Reparameterize.

  32. Example 1 7.5 -7.5 8.5 9 -5 6 6 -3 7.5 l1 1 -5.5 -3 -1 -3 -7 l0 7 -7 6 -3 3 -3 7 3 7 Vb Vc Va Va Vb Vc 7 6 7 Average the min-marginals of Vb

  33. Example 1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 l1 1 -5.5 -3 -1 -3 -7 l0 7 -7 6.5 -3 3 -3 6.5 3 7 Vb Vc Va Va Vb Vc 6.5 6.5 7 Value of dual does not increase

  34. Example 1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 l1 1 -5.5 -3 -1 -3 -7 l0 7 -7 6.5 -3 3 -3 6.5 3 7 Vb Vc Va Va Vb Vc 6.5 6.5 7 Maybe it will increase for Vc NO

  35. Example 1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 l1 1 -5.5 -3 -1 -3 -7 l0 7 -7 6.5 -3 3 -3 6.5 3 7 Vb Vc Va Va Vb Vc f1(a) = 0 f1(b) = 0 f2(b) = 0 f2(c) = 0 f3(c) = 0 f3(a) = 0 Strong Tree Agreement Exact MAP Estimate

  36. Example 2 2 0 2 0 1 0 0 0 4 l1 1 0 1 1 0 1 l0 5 0 0 1 3 0 2 0 8 Vb Vc Va Va Vb Vc 4 0 4 Pick variable Va. Reparameterize.

  37. Example 2 4 -2 2 0 1 0 0 0 4 l1 0 -1 0 1 -1 0 l0 7 -2 0 1 3 -1 2 0 9 Vb Vc Va Va Vb Vc 4 0 4 Average the min-marginals of Va

  38. Example 2 4 -2 2 0 1 0 0 0 4 l1 0 -1 0 1 -1 0 l0 8 -2 0 1 3 -1 2 0 8 Vb Vc Va Va Vb Vc 4 0 4 Value of dual does not increase

  39. Example 2 4 -2 2 0 1 0 0 0 4 l1 0 -1 0 1 -1 0 l0 8 -2 0 1 3 -1 2 0 8 Vb Vc Va Va Vb Vc 4 0 4 Maybe it will decrease for Vb or Vc NO

  40. Example 2 4 -2 2 0 1 0 0 0 4 l1 0 -1 0 1 -1 0 l0 8 -2 0 1 3 -1 2 0 8 Vb Vc Va Va Vb Vc f1(a) = 1 f1(b) = 1 f2(b) = 1 f2(c) = 0 f3(c) = 1 f3(a) = 1 f2(b) = 0 f2(c) = 1 Weak Tree Agreement Not Exact MAP Estimate

  41. Example 2 4 -2 2 0 1 0 0 0 4 l1 0 -1 0 1 -1 0 l0 8 -2 0 1 3 -1 2 0 8 Vb Vc Va Va Vb Vc f1(a) = 1 f1(b) = 1 f2(b) = 1 f2(c) = 0 f3(c) = 1 f3(a) = 1 f2(b) = 0 f2(c) = 1 Weak Tree Agreement Convergence point of TRW

  42. Outline • LP Relaxation and its Dual • TRW Message Passing • Examples • Primal Solution • Results • Dual Decomposition

  43. Obtaining the Labelling Only solves the dual. Primal solutions? Fix the label Of Va Va Vb Vc Vd Ve Vf Vg Vh Vi ’=  i  

  44. Obtaining the Labelling Only solves the dual. Primal solutions? Fix the label Of Vb Va Vb Vc Vd Ve Vf Vg Vh Vi ’=  i   Continue in some fixed order Meltzer et al., 2006

  45. Computational Issues of TRW Basic Component is Belief Propagation • Speed-ups for some pairwise potentials Felzenszwalb & Huttenlocher, 2004 • Memory requirements cut down by half Kolmogorov, 2006 • Further speed-ups using monotonic chains Kolmogorov, 2006

  46. Theoretical Properties of TRW • Always converges, unlike BP Kolmogorov, 2006 • Strong tree agreement implies exact MAP Wainwright et al., 2001 • Optimal MAP for two-label submodular problems ab;00 + ab;11 ≤ ab;01 + ab;10 Kolmogorov and Wainwright, 2005

  47. Outline • LP Relaxation and its Dual • TRW Message Passing • Examples • Primal Solutions • Results • Dual Decomposition

  48. Results Szeliski et al. , 2008 Binary Segmentation Labels - {foreground, background} Unary Potentials: -log(likelihood) using learnt fg/bg models Pairwise Potentials: 0, if same labels 1 - exp(|da- db|), if different labels

  49. Results Szeliski et al. , 2008 Binary Segmentation TRW Labels - {foreground, background} Unary Potentials: -log(likelihood) using learnt fg/bg models Pairwise Potentials: 0, if same labels 1 - exp(|da- db|), if different labels

  50. Results Szeliski et al. , 2008 Binary Segmentation Belief Propagation Labels - {foreground, background} Unary Potentials: -log(likelihood) using learnt fg/bg models Pairwise Potentials: 0, if same labels 1 - exp(|da- db|), if different labels

More Related