SlideShare a Scribd company logo
1 of 120
Download to read offline
MAP Inference in Discrete Models



    M. Pawan Kumar, Stanford University
The Problem
E(x) =   ∑ fi (xi) + ∑ gij (xi,xj) + ∑ hc(xc)
         i           ij               c

             Unary        Pairwise   Higher Order



     Problems worthy of attack
  Prove their worth by fighting back




         Minimize E(x) ….. Done !!!
Energy Minimization Problems


    NP-Hard
               MAXCUT

    CSP   NP-hard




          Space of Problems
The Issues
• Which functions are exactly solvable?
  Boros Hammer [1965], Kolmogorov Zabih [ECCV 2002, PAMI 2004] , Ishikawa [PAMI
  2003], Schlesinger [EMMCVPR 2007], Kohli Kumar Torr [CVPR2007, PAMI 2008] ,
  Ramalingam Kohli Alahari Torr [CVPR 2008] , Kohli Ladicky Torr [CVPR 2008, IJCV
  2009] , Zivny Jeavons [CP 2008]




• Approximate solutions of NP-hard problems
  Schlesinger [76 ], Kleinberg and Tardos [FOCS 99], Chekuri et al. [01], Boykov et al.
  [PAMI 01], Wainwright et al. [NIPS01], Werner [PAMI 2007], Komodakis et al. [PAMI, 05
  07], Lempitsky et al. [ICCV 2007], Kumar et al. [NIPS 2007], Kumar et al. [ICML 2008],
  Sontag and Jakkola [NIPS 2007], Kohli et al. [ICML 2008], Kohli et al. [CVPR 2008,
  IJCV 2009], Rother et al. [2009]



• Scalability and Efficiency
  Kohli Torr [ICCV 2005, PAMI 2007], Juan and Boykov [CVPR 2006], Alahari Kohli Torr
  [CVPR 2008] , Delong and Boykov [CVPR 2008]
The Issues
• Which functions are exactly solvable?
  Boros Hammer [1965], Kolmogorov Zabih [ECCV 2002, PAMI 2004] , Ishikawa [PAMI
  2003], Schlesinger [EMMCVPR 2007], Kohli Kumar Torr [CVPR2007, PAMI 2008] ,
  Ramalingam Kohli Alahari Torr [CVPR 2008] , Kohli Ladicky Torr [CVPR 2008, IJCV
  2009] , Zivny Jeavons [CP 2008]




• Approximate solutions of NP-hard problems
  Schlesinger [76 ], Kleinberg and Tardos [FOCS 99], Chekuri et al. [01], Boykov et al.
  [PAMI 01], Wainwright et al. [NIPS01], Werner [PAMI 2007], Komodakis et al. [PAMI, 05
  07], Lempitsky et al. [ICCV 2007], Kumar et al. [NIPS 2007], Kumar et al. [ICML 2008],
  Sontag and Jakkola [NIPS 2007], Kohli et al. [ICML 2008], Kohli et al. [CVPR 2008,
  IJCV 2009], Rother et al. [2009]



• Scalability and Efficiency
  Kohli Torr [ICCV 2005, PAMI 2007], Juan and Boykov [CVPR 2006], Alahari Kohli Torr
  [CVPR 2008] , Delong and Boykov [CVPR 2008]
Popular Inference Methods
    Iterated Conditional Modes (ICM)
                                         Classical Move making
    Simulated Annealing                       algorithms
    Dynamic Programming (DP)
    Belief Propagtion (BP)                     Message passing
    Tree-Reweighted (TRW), Diffusion

    Graph Cut (GC)
                           Combinatorial Algorithms
    Branch & Bound

    Relaxation methods:          Convex Optimization
                                 (Linear Programming,
                                           ...)
    …
Road Map
9.30-10.00 Introduction (Andrew Blake)
10.00-11.00 Discrete Models in Computer Vision (Carsten Rother)
15min Coffee break
11.15-12.30 Message Passing: DP, TRW, LP relaxation (Pawan
   Kumar)
12.30-13.00 Quadratic pseudo-boolean optimization (Pushmeet
   Kohli)
1hour Lunch break
14:00-15.00 Transformation and move-making methods (Pushmeet
   Kohli)
15:00-15.30 Speed and Efficiency (Pushmeet Kohli)
15min Coffee break
15:45-16.15 Comparison of Methods (Carsten Rother)
16:30-17.30 Recent Advances: Dual-decomposition, higher-order,
   etc.            (Carsten Rother + Pawan Kumar)
Notation
Random variables - Va, Vb, ….

Labels - li, lj, ….

Labeling - f : {a,b,..}                 {i,j, …}

Unary Potential -     a;f(a)


Pairwise Potential -      ab;f(a)f(b)
Notation
Energy Function
      Q(f; ) = ∑a   a;f(a)   + ∑(a,b)   ab;f(a)f(b)



MAP Estimation
           f* = arg min Q(f; )

Min-marginals
    qa;i = min Q(f; ) s.t. f(a) = i
Outline

• Reparameterization



• Belief Propagation



• Tree-reweighted Message Passing
Reparameterization
2+2         0       4 -2   f(a) f(b)       Q(f; )
        1       1           0    0           7
                            0    1          10
2+ 5        0       2 -2    1    0           5
   Va                Vb
                            1    1           6

        Add a constant to all        a;i

   Subtract that constant from all          b;k
Reparameterization
2+2          0       4 -2   f(a) f(b)        Q(f; )
        1        1           0    0         7 +2-2
                             0    1         10 + 2 - 2
2+ 5         0       2 -2    1    0         5 +2-2
   Va                 Vb
                             1    1         6 +2-2

        Add a constant to all         a;i

   Subtract that constant from all            b;k

            Q(f; ’) = Q(f; )
Reparameterization
    2          0-3    4 +3   f(a) f(b)        Q(f; )
           1       1- 3       0     0           7
                              0     1           10
    5          0      2       1     0           5
     Va                Vb
                              1     1           6

          Add a constant to one      b;k

Subtract that constant from       ab;ik   for all ‘i’
Reparameterization
    2           0-3    4 +3   f(a) f(b)        Q(f; )
           1        1- 3       0     0           7
                               0     1       10 - 3 + 3
    5           0      2       1     0           5
     Va                 Vb
                               1     1       6-3+3

          Add a constant to one       b;k

Subtract that constant from        ab;ik   for all ‘i’
               Q(f; ’) = Q(f; )
Reparameterization
3               1        3            1        3     0-4     1+ 4
                               1+ 1
2    2-2        4        2            4 -1     2       1- 4 4
                               0+ 1
     1- 2                                              2-4
                                1+ 1
5    0-2        2 +2 5             2           5             2
Va               Vb   Va            Vb         Va             Vb


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

                                        2+2           0           4 -2
 ’a;i =     a;i   + Mba;i
                                                  1           1
 ’b;k =     b;k +   Mab;k
                                        2+ 5          0           2 -2
                                             Va                    Vb
 ’ab;ik =     ab;ik   - Mab;k - Mba;i
Recap
MAP Estimation
           f* = arg min Q(f; )
       Q(f; ) = ∑a   a;f(a)   + ∑(a,b)   ab;f(a)f(b)


Min-marginals
    qa;i = min Q(f; ) s.t. f(a) = i

Reparameterization
  Q(f; ’) = Q(f; ), for all f                   ’
Outline

• Reparameterization

• Belief Propagation
  – Exact MAP for Chains and Trees
  – Approximate MAP for general graphs
  – Computational Issues and Theoretical Properties


• Tree-reweighted Message Passing
Belief Propagation

• Some MAP problems are easy


• Belief Propagation gives exact MAP for chains


• Exact MAP for trees


• Clever Reparameterization
Two Variables
2                       2                0       4

     1                                       1

5         0    2        5
Va              Vb          Va                   Vb


         Add a constant to one      b;k

Subtract that constant from      ab;ik   for all ‘i’
Choose the right constant        ’b;k = qb;k
Two Variables
2                           2        0       4

     1                                   1

5        0    2             5
Va             Vb            Va              Vb


                 a;0   +   ab;00   = 5+0
Mab;0 = min
                 a;1   +   ab;10   = 2+1

Choose the right constant          ’b;k = qb;k
Two Variables
2                       2          0       4

     -2                                1

5         -3    5       5
Va               Vb         Va             Vb




Choose the right constant        ’b;k = qb;k
Two Variables
2
     f(a) = 1                2          0       4

     -2                                     1

5         -3     5           5
Va                Vb          Va                Vb

     ’b;0 = qb;0
Potentials along the red path add up to 0

Choose the right constant           ’b;k = qb;k
Two Variables
2                            2        0       4

     -2                                   1

5         -3    5            5
Va               Vb           Va              Vb


                  a;0   +   ab;01   = 5+1
Mab;1 = min
                  a;1   +   ab;11   = 2+0

Choose the right constant           ’b;k = qb;k
Two Variables
     f(a) = 1                    f(a) = 1
2                       2           -2        6

     -2                                  -1

5         -3    5       5
Va               Vb         Va                Vb

     ’b;0 = qb;0                 ’b;1 = qb;1
Minimum of min-marginals = MAP estimate

Choose the right constant        ’b;k = qb;k
Two Variables
        f(a) = 1                 f(a) = 1
2                         2         -2        6

       -2                                -1

5           -3     5      5
Va                  Vb      Va                Vb

       ’b;0 = qb;0               ’b;1 = qb;1
    f*(b) = 0 f*(a) = 1

Choose the right constant        ’b;k = qb;k
Two Variables
     f(a) = 1                    f(a) = 1
2                       2           -2        6

     -2                                  -1

5         -3    5       5
Va               Vb         Va                Vb

     ’b;0 = qb;0                 ’b;1 = qb;1
     We get all the min-marginals of Vb

Choose the right constant        ’b;k = qb;k
Recap
We only need to know two sets of equations
General form of Reparameterization

  ’a;i =     a;i    + Mba;i             ’b;k =    b;k+   Mab;k
  ’ab;ik =         ab;ik-   Mab;k- Mba;i
Reparameterization of (a,b) in Belief Propagation
Mab;k = mini {                a;i   +   ab;ik }
Mba;i = 0
Three Variables

l1   2         0       4         0       6
          1        1         2       3
l0
     5         0       2         1       3
     Va                 Vb               Vc




Reparameterize the edge (a,b) as before
Three Variables
                     f(a) = 1
l1   2          -2        6         0       6
          -2         -1         2       3
l0
     5          -3        5         1       3
     Va                    Vb               Vc

                     f(a) = 1

Reparameterize the edge (a,b) as before
Three Variables
                        f(a) = 1
l1     2           -2        6         0       6
             -2         -1         2       3
l0
       5           -3        5         1       3
        Va                    Vb               Vc

                        f(a) = 1

Reparameterize the edge (a,b) as before
     Potentials along the red path add up to 0
Three Variables
                        f(a) = 1
l1     2           -2        6         0       6
             -2         -1         2       3
l0
       5           -3        5         1       3
        Va                    Vb               Vc

                        f(a) = 1

Reparameterize the edge (b,c) as before
     Potentials along the red path add up to 0
Three Variables
                        f(a) = 1             f(b) = 1
l1     2           -2        6          -6    12
             -2         -1         -4         -3
l0
       5           -3        5          -5     9
        Va                    Vb                   Vc

                        f(a) = 1             f(b) = 0

Reparameterize the edge (b,c) as before
     Potentials along the red path add up to 0
Three Variables
                        f(a) = 1             f(b) = 1
l1     2           -2        6          -6    12
                                                        qc;1
             -2         -1         -4         -3
l0                                                      qc;0
       5           -3        5          -5     9
        Va                    Vb                   Vc

                        f(a) = 1             f(b) = 0

Reparameterize the edge (b,c) as before
     Potentials along the red path add up to 0
Three Variables
                      f(a) = 1             f(b) = 1
l1    2          -2        6          -6    12
                                                      qc;1
           -2         -1         -4         -3
l0                                                    qc;0
      5          -3        5          -5     9
      Va                    Vb                   Vc

                      f(a) = 1             f(b) = 0
          f*(c) = 0 f*(b) = 0 f*(a) = 1
     Generalizes to any length chain
Three Variables
                     f(a) = 1             f(b) = 1
l1   2          -2        6          -6    12
                                                     qc;1
          -2         -1         -4         -3
l0                                                   qc;0
     5          -3        5          -5     9
     Va                    Vb                   Vc

                     f(a) = 1             f(b) = 0
         f*(c) = 0 f*(b) = 0 f*(a) = 1
     Only Dynamic Programming
Why Dynamic Programming?
 3 variables     2 variables + book-keeping
n variables     (n-1) variables + book-keeping

Start from left, go to right
Reparameterize current edge (a,b)
  Mab;k = mini {         a;i   +   ab;ik }
    ’b;k =    b;k+   Mab;k ’ab;ik =      ab;ik-   Mab;k
Repeat
Why Dynamic Programming?
Messages      Message Passing

Why stop at dynamic programming?

Start from left, go to right
Reparameterize current edge (a,b)
  Mab;k = mini {        a;i   +   ab;ik }
    ’b;k =   b;k+   Mab;k ’ab;ik =      ab;ik-   Mab;k
Repeat
Three Variables

l1   2          -2        6          -6   12
          -2         -1         -4        -3
l0
     5          -3        5          -5    9
     Va                    Vb                  Vc

Reparameterize the edge (c,b) as before
Three Variables

l1   2          -2          11         -11   12
          -2           -1         -9         -7
l0
     5          -3          9          -9     9
     Va                      Vb                   Vc

Reparameterize the edge (c,b) as before
                     ’b;i = qb;i
Three Variables

l1   2          -2        11         -11   12
          -2         -1         -9         -7
l0
     5          -3        9          -9     9
     Va                    Vb                   Vc

Reparameterize the edge (b,a) as before
Three Variables

l1   9           -9         11         -11   12
           -9          -7         -9         -7
l0
     11          -9         9          -9     9
      Va                     Vb                   Vc

Reparameterize the edge (b,a) as before
                      ’a;i = qa;i
Three Variables

l1     9           -9        11         -11   12
             -9         -7         -9         -7
l0
       11          -9        9          -9     9
        Va                    Vb                   Vc

     Forward Pass                  Backward Pass

     All min-marginals are computed
Belief Propagation on Chains
Start from left, go to right
Reparameterize current edge (a,b)
  Mab;k = mini {        a;i   +   ab;ik }
    ’b;k =   b;k+   Mab;k ’ab;ik =      ab;ik-   Mab;k
Repeat till the end of the chain
Start from right, go to left
Repeat till the end of the chain
Belief Propagation on Chains
• Generalizes to chains of any length

• A way of computing reparam constants

• Forward Pass - Start to End
   • MAP estimate
   • Min-marginals of final variable

• Backward Pass - End to start
   • All other min-marginals
      Won’t need this .. But good to know
Computational Complexity
• Each constant takes O(|L|)


• Number of constants - O(|E||L|)

              O(|E||L|2)

• Memory required ?

              O(|E||L|)
Belief Propagation on Trees
                    Va


          Vb                  Vc


     Vd        Ve        Vg        Vh

Forward Pass: Leaf  Root
Backward Pass: Root  Leaf
 All min-marginals are computed
Outline

• Reparameterization

• Belief Propagation
  – Exact MAP for Chains and Trees
  – Approximate MAP for general graphs
  – Computational Issues and Theoretical Properties


• Tree-reweighted Message Passing
Belief Propagation on Cycles
           a;1                              b;1


           a;0                              b;0

                 Va                    Vb


d;1                              c;1


d;0                              c;0

      Vd                 Vc
Where do we start?            Arbitrarily
                      Reparameterize (a,b)
Belief Propagation on Cycles
           a;1
                                         ’b;1

           a;0
                                         ’b;0
                 Va                 Vb


d;1                           c;1


d;0                           c;0

      Vd                 Vc


Potentials along the red path add up to 0
Belief Propagation on Cycles
           a;1
                                      ’b;1

           a;0
                                      ’b;0
                 Va              Vb


d;1
                              ’c;1

d;0
                              ’c;0
      Vd                 Vc


Potentials along the red path add up to 0
Belief Propagation on Cycles
            a;1
                                      ’b;1

            a;0
                                      ’b;0
                  Va             Vb


’d;1                          ’c;1

’d;0                          ’c;0
       Vd                Vc


Potentials along the red path add up to 0
Belief Propagation on Cycles
            ’a;1        -   a;1                ’b;1

            ’a;0                               ’b;0
                        -   a;0
                   Va                     Vb


’d;1                                   ’c;1

’d;0                                   ’c;0
       Vd                         Vc

       Did not obtain min-marginals
Potentials along the red path add up to 0
Belief Propagation on Cycles
            ’a;1        -   a;1                ’b;1

            ’a;0                               ’b;0
                        -   a;0
                   Va                     Vb


’d;1                                   ’c;1

’d;0                                   ’c;0
       Vd                         Vc
       Reparameterize (a,b) again
Belief Propagation on Cycles
              ’a;1                         ’’b;1

              ’a;0                         ’’b;0
                     Va               Vb


  ’d;1                           ’c;1

  ’d;0                           ’c;0
         Vd                 Vc
         Reparameterize (a,b) again
But doesn’t this overcount some potentials?
Belief Propagation on Cycles
            ’a;1                         ’’b;1

            ’a;0                         ’’b;0
                   Va               Vb


’d;1                             ’c;1

’d;0                             ’c;0
       Vd                  Vc
       Reparameterize (a,b) again
       Yes. But we will do it anyway
Belief Propagation on Cycles
              ’a;1                     ’’b;1

              ’a;0                     ’’b;0
                     Va           Vb


 ’d;1                          ’c;1

  ’d;0                         ’c;0
         Vd               Vc
Keep reparameterizing edges in some order
         No convergence guarantees
Belief Propagation
• Generalizes to any arbitrary random field


• Complexity per iteration ?

              O(|E||L|2)

• Memory required ?

               O(|E||L|)
Outline

• Reparameterization

• Belief Propagation
  – Exact MAP for Chains and Trees
  – Approximate MAP for general graphs
  – Computational Issues and Theoretical Properties


• Tree-reweighted Message Passing
Computational Issues of BP
Complexity per iteration                O(|E||L|2)
    Special Pairwise Potentials             ab;ik   = wabd(|i-k|)


d                    d                       d



           i-k                  i-k                    i-k
          Potts          Truncated Linear     Truncated Quadratic

O(|E||L|)            Felzenszwalb & Huttenlocher, 2004
Computational Issues of BP
Memory requirements               O(|E||L|)

Half of original BP            Kolmogorov, 2006



Some approximations exist
Yu, Lin, Super and Tan, 2007
Lasserre, Kannan and Winn, 2007

But memory still remains an issue
Computational Issues of BP
Order of reparameterization


Randomly

In some fixed order

The one that results in maximum change
           Residual Belief Propagation

              Elidan et al. , 2006
Summary of BP

Exact for chains

Exact for trees

Approximate MAP for general cases
Convergence not guaranteed

So can we do something better?
Outline

• Reparameterization

• Belief Propagation

• Tree-reweighted Message Passing
  – Integer Programming Formulation
  – Linear Programming Relaxation and its Dual
  – Convergent Solution for Dual
  – Computational Issues and Theoretical
    Properties
Integer Programming Formulation
Unary Potentials        Label l1
                                   2        0   4
                                        1       1     2
 a;0   =5   b;0   =2
                        Label l0
                  =4               5        0   2
 a;1 = 2    b;1
                                   Va            Vb
Labeling
f(a) = 1 ya;0 = 0 ya;1 = 1

f(b) = 0 yb;0 = 1 yb;1 = 0

  Any f(.) has equivalent boolean variables ya;i
Integer Programming Formulation
Unary Potentials           Label l1
                                      2         0   4
                                            1       1     2
 a;0   =5      b;0   =2
                           Label l0
                     =4               5         0   2
 a;1 = 2       b;1
                                       Va            Vb
Labeling
f(a) = 1 ya;0 = 0 ya;1 = 1

f(b) = 0 yb;0 = 1 yb;1 = 0

            Find the optimal variables ya;i
Integer Programming Formulation
Unary Potentials            Label l1
                                        2        0   4
                                             1       1     2
 a;0   =5      b;0   =2
                            Label l0
                     =4                 5        0   2
 a;1 = 2       b;1
                                        Va            Vb
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
Pairwise Potentials           Label l1
                                           2        0   4
                                                1       1     2
 ab;00   =0     ab;01   =1
                              Label l0
                        =0                 5        0   2
 ab;10 = 1      ab;11
                                           Va            Vb
Sum of Pairwise Potentials
              ∑(a,b) ∑ik     ab;ik   ya;iyb;k
                    ya;i     {0,1}
                    ∑i ya;i = 1
Integer Programming Formulation
Pairwise Potentials           Label l1
                                              2        0   4
                                                   1       1     2
 ab;00   =0     ab;01   =1
                              Label l0
                        =0                    5        0   2
 ab;10 = 1      ab;11
                                              Va            Vb
Sum of Pairwise Potentials
              ∑(a,b) ∑ik     ab;ik   yab;ik
                    ya;i     {0,1} yab;ik = ya;i yb;k
                    ∑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 ….]
Integer Programming Formulation

            min    Ty


          ya;i    {0,1}
           ∑i ya;i = 1
          yab;ik = ya;i yb;k

  Solve to obtain MAP labeling 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

• Reparameterization

• Belief Propagation

• Tree-reweighted Message Passing
  – Integer Programming Formulation
  – Linear Programming Relaxation and its Dual
  – Convergent Solution for Dual
  – Computational Issues and Theoretical
    Properties
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
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                            2
                                   Vd   Ve        Vf
  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
         i i   =                    4         5         6
Dual of the LP Relaxation
Wainwright et al., 2001
                                                             1
                           q*( 1)   Va   Vb        Vc
  Va      Vb        Vc
                                                             2
                           q*( 2)   Vd   Ve        Vf
  Vd      Ve        Vf
                                                             3
                           q*( 3)   Vg   Vh        Vi
  Vg      Vh        Vi
                                q*( 4) q*( 5) q*( 6)
                                    Va    Vb            Vc
                           i≥   0
       Dual of LP                   Vd        Ve        Vf
 max            i q*( i)
                                    Vg    Vh            Vi
          i i   =                    4         5         6
Dual of the LP Relaxation
Wainwright et al., 2001
                                                             1
                           q*( 1)   Va   Vb        Vc
  Va      Vb      Vc
                                                             2
                           q*( 2)   Vd   Ve        Vf
  Vd      Ve      Vf
                                                             3
                           q*( 3)   Vg   Vh        Vi
  Vg      Vh      Vi
                                q*( 4) q*( 5) q*( 6)
                                    Va    Vb            Vc
                           i≥   0
       Dual of LP                   Vd        Ve        Vf
 max            i q*( i)
                                    Vg    Vh            Vi
          i i                        4         5         6
Dual of the LP Relaxation
Wainwright et al., 2001



                     max         i q*( i)


                           i i



            I can easily compute q*( i)
  I can easily maintain reparam constraint

         So can I easily solve the dual?
Outline

• Reparameterization

• Belief Propagation

• Tree-reweighted Message Passing
  – Integer Programming Formulation
  – Linear Programming Relaxation and its Dual
  – Convergent Solution for Dual
  – Computational Issues and Theoretical
    Properties
TRW Message Passing
Kolmogorov, 2006              4       5    6
 1 V                    1
    a     Vb       Vc        Va       Vb   Vc

 2                      2
     Vd   Ve       Vf        Vd       Ve   Vf

 3 V      Vh       Vi   3
    g                        Vg       Vh   Vi
                                  4    5    6


     Pick a variable                            Va
                            i q*( i)

                            i i
TRW Message Passing
Kolmogorov, 2006
1          1         1               4         4         4
    c;1        b;1       a;1             a;1       d;1       g;1



 1         1         1               4         4         4
     c;0       b;0       a;0             a;0       d;0       g;0

      Vc        Vb        Va              Va        Vd        Vg




                               i q*( i)

                               i i
TRW Message Passing
Kolmogorov, 2006
1          1            1               4                4         4
    c;1        b;1          a;1             a;1              d;1       g;1



 1         1            1               4                4         4
     c;0       b;0          a;0             a;0              d;0       g;0

      Vc        Vb           Va              Va               Vd        Vg


     Reparameterize to obtain min-marginals of Va

                     1 q*( 1)     +     4 q*( 4)             +K
                      1 1+        4 4   +         rest
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

                 1 q*(     ’1) +       4 q*(   ’4) + K
                    1    ’1 +      4   ’4 +    rest
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

                 1 q*(     ’1) +       4 q*(   ’4) + K
                    1    ’1 +      4   ’4 +    rest
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




    1 min{   ’1a;0, ’1a;1} +       4 min{     ’4a;0, ’4a;1} + K
                   1    ’1 +   4   ’4 +    rest
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 weighted average of min-marginals of Va

    1 min{    ’1a;0, ’1a;1} +      4 min{     ’4a;0, ’4a;1} + K
                   1    ’1 +   4   ’4 +    rest
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 =   1   ’1a;0+          4    ’4a;0         ’’a;1 =   1   ’1a;1+      4   ’4a;1
                    1   +       4                                    1   +   4


    1 min{      ’1a;0, ’1a;1} +                  4 min{      ’4a;0, ’4a;1} + K
                            1       ’1 +     4   ’4 +    rest
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 =   1   ’1a;0+          4   ’4a;0          ’’a;1 =    1   ’1a;1+      4   ’4a;1
                    1   +       4                                     1   +   4


    1 min{      ’1a;0, ’1a;1} +                 4 min{         ’4a;0, ’4a;1} + K
                            1    ’’1 +      4   ’’4 +        rest
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 =   1   ’1a;0+          4   ’4a;0          ’’a;1 =    1   ’1a;1+      4   ’4a;1
                    1   +       4                                     1   +   4


    1 min{      ’1a;0, ’1a;1} +                 4 min{         ’4a;0, ’4a;1} + K
                            1    ’’1 +      4   ’’4 +        rest
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 =   1    ’1a;0+         4   ’4a;0          ’’a;1 =    1   ’1a;1+      4   ’4a;1
                    1   +       4                                     1   +   4


        1 min{      ’’a;0, ’’a;1} +             4 min{        ’’a;0, ’’a;1} + K
                            1    ’’1 +      4   ’’4 +        rest
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 =   1   ’1a;0+          4   ’4a;0          ’’a;1 =    1   ’1a;1+      4   ’4a;1
                    1   +       4                                     1   +   4



                (       1+          4)   min{ ’’a;0, ’’a;1} + K
                            1    ’’1 +      4   ’’4 +        rest
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}

             (   1+       4)    min{ ’’a;0, ’’a;1} + K
                   1    ’’1 +       4   ’’4 +    rest
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

             (   1+       4)    min{ ’’a;0, ’’a;1} + K
                   1    ’’1 +     4   ’’4 +    rest
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

REPEAT       Can also do edge-averaging

              Kolmogorov, 2006
Example 1
              1 =1                    2 =1                  3 =1

l1
     2         0     4      4         0      6     6        1      6
          1        1              2       3             4       1
l0
     5         0     2      2         1      3     3        0      4
     Va               Vb     Vb               Vc   Vc               Va

               5                      6                     7
              Pick variable Va. Reparameterize.
Example 1
              1 =1                    2 =1                  3 =1

l1
     5        -3     4      4         0      6     6        -3 10
         -2        -1             2       3             1        -3
l0
     7        -2     2      2         1      3     3        -3     7
     Va               Vb     Vb               Vc   Vc               Va

               5                      6                     7
              Average the min-marginals of Va
Example 1
                1 =1                    2 =1                  3 =1

l1
     7.5        -3     4      4         0      6     6        -3 7.5
           -2        -1             2       3             1        -3
l0
      7         -2     2      2         1      3     3        -3     7
       Va               Vb     Vb               Vc   Vc               Va

                 7                      6                     7
                Pick variable Vb. Reparameterize.
Example 1
                1 =1                   2 =1                  3 =1

l1
     7.5    -7.5 8.5          9        -5     6     6        -3 7.5
           -7        -5.5         -3        -1           1        -3
l0
      7         -7     7      6        -3     3     3        -3     7
       Va               Vb     Vb              Vc   Vc               Va

                 7                     6                     7
                Average the min-marginals of Vb
Example 1
                1 =1                   2 =1                  3 =1

l1
     7.5    -7.5 8.75      8.75        -5     6     6        -3 7.5
           -7      -5.5           -3        -1           1        -3
l0
      7         -7 6.5     6.5         -3     3     3        -3     7
       Va             Vb      Vb               Vc   Vc               Va

                 6.5            6.5          7
                Value of dual does not increase
Example 1
                1 =1                   2 =1                  3 =1

l1
     7.5    -7.5 8.75      8.75        -5     6     6        -3 7.5
           -7      -5.5           -3        -1           1        -3
l0
      7         -7 6.5     6.5         -3     3     3        -3     7
       Va             Vb      Vb               Vc   Vc               Va

                 6.5             6.5          7
                Maybe it will increase for Vc
                                  NO
Example 1
                1 =1                    2 =1                  3 =1

l1
     7.5    -7.5 8.75       8.75        -5     6     6        -3 7.5
           -7      -5.5            -3        -1           1        -3
l0
      7         -7 6.5      6.5         -3     3     3        -3     7
       Va             Vb       Vb               Vc   Vc               Va
      f1(a) = 0 f1(b) = 0     f2(b) = 0 f2(c) = 0    f3(c) = 0 f3(a) = 0

                  Strong Tree Agreement
                   Exact MAP Estimate
Example 2
              1 =1                    2 =1                  3 =1

l1
     2         0     2      0         1      0     0        0      4
          1        1              0       0             1       1
l0
     5         0     2      0         1      0     3        0      8
     Va               Vb     Vb               Vc   Vc               Va

               4                      0                     4
              Pick variable Va. Reparameterize.
Example 2
              1 =1                    2 =1                  3 =1

l1
     4        -2     2      0         1      0     0        0      4
         -1        -1             0       0             0        1
l0
     7        -2     2      0         1      0     3        -1     9
     Va               Vb     Vb               Vc   Vc               Va

               4                      0                     4
              Average the min-marginals of Va
Example 2
              1 =1                    2 =1                  3 =1

l1
     4        -2     2      0         1      0     0        0      4
         -1        -1             0       0             0        1
l0
     8        -2     2      0         1      0     3        -1     8
     Va               Vb     Vb               Vc   Vc               Va

               4                      0    4
              Value of dual does not increase
Example 2
              1 =1                    2 =1                  3 =1

l1
     4        -2     2      0         1      0     0        0      4
         -1        -1             0       0             0        1
l0
     8        -2     2      0         1      0     3        -1     8
     Va               Vb     Vb               Vc   Vc               Va

               4                      0     4
              Maybe it will decrease for Vb or Vc
                                NO
Example 2
              1 =1                    2 =1                  3 =1

l1
     4        -2     2      0         1      0     0        0      4
         -1         -1            0       0             0        1
l0
     8        -2     2      0         1      0     3        -1     8
     Va               Vb     Vb               Vc   Vc               Va
     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
Example 2
              1 =1                    2 =1                  3 =1

l1
     4        -2     2      0         1      0     0        0      4
         -1        -1             0       0             0        1
l0
     8        -2     2      0         1      0     3        -1     8
     Va               Vb     Vb               Vc   Vc               Va
     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
Obtaining the Labeling
Only solves the dual. Primal solutions?

              Va    Vb         Vc   Fix the label
                                        Of Va
              Vd    Ve         Vf

              Vg    Vh         Vi


              ’=         i i
Obtaining the Labeling
Only solves the dual. Primal solutions?

              Va    Vb         Vc   Fix the label
                                        Of Vb
              Vd    Ve         Vf

              Vg    Vh         Vi


              ’=         i i

        Continue in some fixed order
           Meltzer et al., 2006
Outline
• Problem Formulation

• Reparameterization

• Belief Propagation

• Tree-reweighted Message Passing
   –   Integer Programming Formulation
   –   Linear Programming Relaxation and its Dual
   –   Convergent Solution for Dual
   –   Computational Issues and Theoretical Properties
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
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
Summary
• Trees can be solved exactly - BP

• No guarantee of convergence otherwise - BP

• Strong Tree Agreement - TRW-S

• Submodular energies solved exactly - TRW-S

• TRW-S solves an LP relaxation of MAP estimation

More Related Content

What's hot

Lca seminar modified
Lca seminar modifiedLca seminar modified
Lca seminar modified
Inbok Lee
 
Modular representation theory of finite groups
Modular representation theory of finite groupsModular representation theory of finite groups
Modular representation theory of finite groups
Springer
 
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
Alexander Decker
 

What's hot (18)

Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
 
bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...
bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...
bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...
 
Polynomial Kernel for Interval Vertex Deletion
Polynomial Kernel for Interval Vertex DeletionPolynomial Kernel for Interval Vertex Deletion
Polynomial Kernel for Interval Vertex Deletion
 
Kernel for Chordal Vertex Deletion
Kernel for Chordal Vertex DeletionKernel for Chordal Vertex Deletion
Kernel for Chordal Vertex Deletion
 
Lca seminar modified
Lca seminar modifiedLca seminar modified
Lca seminar modified
 
Bayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsBayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse Problems
 
Topic modeling with Poisson factorization (2)
Topic modeling with Poisson factorization (2)Topic modeling with Poisson factorization (2)
Topic modeling with Poisson factorization (2)
 
Poisson factorization
Poisson factorizationPoisson factorization
Poisson factorization
 
A Note on Latent LSTM Allocation
A Note on Latent LSTM AllocationA Note on Latent LSTM Allocation
A Note on Latent LSTM Allocation
 
Pilot Optimization and Channel Estimation for Multiuser Massive MIMO Systems
Pilot Optimization and Channel Estimation for Multiuser Massive MIMO SystemsPilot Optimization and Channel Estimation for Multiuser Massive MIMO Systems
Pilot Optimization and Channel Estimation for Multiuser Massive MIMO Systems
 
LAP2009 c&p101-vector2 d.5ht
LAP2009 c&p101-vector2 d.5htLAP2009 c&p101-vector2 d.5ht
LAP2009 c&p101-vector2 d.5ht
 
A Note on TopicRNN
A Note on TopicRNNA Note on TopicRNN
A Note on TopicRNN
 
Modular representation theory of finite groups
Modular representation theory of finite groupsModular representation theory of finite groups
Modular representation theory of finite groups
 
1.differential approach to cardioid distribution -1-6
1.differential approach to cardioid distribution -1-61.differential approach to cardioid distribution -1-6
1.differential approach to cardioid distribution -1-6
 
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
11.0001www.iiste.org call for paper.differential approach to cardioid distrib...
 
Graph Kernelpdf
Graph KernelpdfGraph Kernelpdf
Graph Kernelpdf
 
Metodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang LandauMetodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang Landau
 
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
 

Viewers also liked (8)

Iccv2009 recognition and learning object categories p3 c00 - summary and da...
Iccv2009 recognition and learning object categories   p3 c00 - summary and da...Iccv2009 recognition and learning object categories   p3 c00 - summary and da...
Iccv2009 recognition and learning object categories p3 c00 - summary and da...
 
On3 pitching competition
On3 pitching competitionOn3 pitching competition
On3 pitching competition
 
Bucharest Hubb Events Calendar
Bucharest Hubb Events CalendarBucharest Hubb Events Calendar
Bucharest Hubb Events Calendar
 
Kompany Presentation
Kompany PresentationKompany Presentation
Kompany Presentation
 
Fcv bio cv_weiss
Fcv bio cv_weissFcv bio cv_weiss
Fcv bio cv_weiss
 
Mila pitch report china mail
Mila pitch report china mailMila pitch report china mail
Mila pitch report china mail
 
Fcv rep darrell
Fcv rep darrellFcv rep darrell
Fcv rep darrell
 
Software Outsourcing: Events Calendar
Software Outsourcing: Events CalendarSoftware Outsourcing: Events Calendar
Software Outsourcing: Events Calendar
 

Similar to ICCV2009: MAP Inference in Discrete Models: Part 3

ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
zukun
 
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
Salar Delavar Qashqai
 

Similar to ICCV2009: MAP Inference in Discrete Models: Part 3 (8)

ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
 
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
 
Kalman_Filter_Report
Kalman_Filter_ReportKalman_Filter_Report
Kalman_Filter_Report
 
Cosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical SimulationsCosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical Simulations
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)
 
Using blurred images to assess damage in bridge structures?
Using blurred images to assess damage in bridge structures?Using blurred images to assess damage in bridge structures?
Using blurred images to assess damage in bridge structures?
 
Topic 9 kft 131
Topic 9 kft 131Topic 9 kft 131
Topic 9 kft 131
 

More from zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
zukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
zukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
zukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
zukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
zukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
zukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
zukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
zukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
zukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
zukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
zukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
zukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
zukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
zukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
zukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
zukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
zukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
zukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
zukun
 

More from zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

ICCV2009: MAP Inference in Discrete Models: Part 3

  • 1. MAP Inference in Discrete Models M. Pawan Kumar, Stanford University
  • 2. The Problem E(x) = ∑ fi (xi) + ∑ gij (xi,xj) + ∑ hc(xc) i ij c Unary Pairwise Higher Order Problems worthy of attack Prove their worth by fighting back Minimize E(x) ….. Done !!!
  • 3. Energy Minimization Problems NP-Hard MAXCUT CSP NP-hard Space of Problems
  • 4. The Issues • Which functions are exactly solvable? Boros Hammer [1965], Kolmogorov Zabih [ECCV 2002, PAMI 2004] , Ishikawa [PAMI 2003], Schlesinger [EMMCVPR 2007], Kohli Kumar Torr [CVPR2007, PAMI 2008] , Ramalingam Kohli Alahari Torr [CVPR 2008] , Kohli Ladicky Torr [CVPR 2008, IJCV 2009] , Zivny Jeavons [CP 2008] • Approximate solutions of NP-hard problems Schlesinger [76 ], Kleinberg and Tardos [FOCS 99], Chekuri et al. [01], Boykov et al. [PAMI 01], Wainwright et al. [NIPS01], Werner [PAMI 2007], Komodakis et al. [PAMI, 05 07], Lempitsky et al. [ICCV 2007], Kumar et al. [NIPS 2007], Kumar et al. [ICML 2008], Sontag and Jakkola [NIPS 2007], Kohli et al. [ICML 2008], Kohli et al. [CVPR 2008, IJCV 2009], Rother et al. [2009] • Scalability and Efficiency Kohli Torr [ICCV 2005, PAMI 2007], Juan and Boykov [CVPR 2006], Alahari Kohli Torr [CVPR 2008] , Delong and Boykov [CVPR 2008]
  • 5. The Issues • Which functions are exactly solvable? Boros Hammer [1965], Kolmogorov Zabih [ECCV 2002, PAMI 2004] , Ishikawa [PAMI 2003], Schlesinger [EMMCVPR 2007], Kohli Kumar Torr [CVPR2007, PAMI 2008] , Ramalingam Kohli Alahari Torr [CVPR 2008] , Kohli Ladicky Torr [CVPR 2008, IJCV 2009] , Zivny Jeavons [CP 2008] • Approximate solutions of NP-hard problems Schlesinger [76 ], Kleinberg and Tardos [FOCS 99], Chekuri et al. [01], Boykov et al. [PAMI 01], Wainwright et al. [NIPS01], Werner [PAMI 2007], Komodakis et al. [PAMI, 05 07], Lempitsky et al. [ICCV 2007], Kumar et al. [NIPS 2007], Kumar et al. [ICML 2008], Sontag and Jakkola [NIPS 2007], Kohli et al. [ICML 2008], Kohli et al. [CVPR 2008, IJCV 2009], Rother et al. [2009] • Scalability and Efficiency Kohli Torr [ICCV 2005, PAMI 2007], Juan and Boykov [CVPR 2006], Alahari Kohli Torr [CVPR 2008] , Delong and Boykov [CVPR 2008]
  • 6. Popular Inference Methods  Iterated Conditional Modes (ICM) Classical Move making  Simulated Annealing algorithms  Dynamic Programming (DP)  Belief Propagtion (BP) Message passing  Tree-Reweighted (TRW), Diffusion  Graph Cut (GC) Combinatorial Algorithms  Branch & Bound  Relaxation methods: Convex Optimization (Linear Programming, ...)  …
  • 7. Road Map 9.30-10.00 Introduction (Andrew Blake) 10.00-11.00 Discrete Models in Computer Vision (Carsten Rother) 15min Coffee break 11.15-12.30 Message Passing: DP, TRW, LP relaxation (Pawan Kumar) 12.30-13.00 Quadratic pseudo-boolean optimization (Pushmeet Kohli) 1hour Lunch break 14:00-15.00 Transformation and move-making methods (Pushmeet Kohli) 15:00-15.30 Speed and Efficiency (Pushmeet Kohli) 15min Coffee break 15:45-16.15 Comparison of Methods (Carsten Rother) 16:30-17.30 Recent Advances: Dual-decomposition, higher-order, etc. (Carsten Rother + Pawan Kumar)
  • 8. Notation Random variables - Va, Vb, …. Labels - li, lj, …. Labeling - f : {a,b,..} {i,j, …} Unary Potential - a;f(a) Pairwise Potential - ab;f(a)f(b)
  • 9. Notation Energy Function Q(f; ) = ∑a a;f(a) + ∑(a,b) ab;f(a)f(b) MAP Estimation f* = arg min Q(f; ) Min-marginals qa;i = min Q(f; ) s.t. f(a) = i
  • 10. Outline • Reparameterization • Belief Propagation • Tree-reweighted Message Passing
  • 11. Reparameterization 2+2 0 4 -2 f(a) f(b) Q(f; ) 1 1 0 0 7 0 1 10 2+ 5 0 2 -2 1 0 5 Va Vb 1 1 6 Add a constant to all a;i Subtract that constant from all b;k
  • 12. Reparameterization 2+2 0 4 -2 f(a) f(b) Q(f; ) 1 1 0 0 7 +2-2 0 1 10 + 2 - 2 2+ 5 0 2 -2 1 0 5 +2-2 Va Vb 1 1 6 +2-2 Add a constant to all a;i Subtract that constant from all b;k Q(f; ’) = Q(f; )
  • 13. Reparameterization 2 0-3 4 +3 f(a) f(b) Q(f; ) 1 1- 3 0 0 7 0 1 10 5 0 2 1 0 5 Va Vb 1 1 6 Add a constant to one b;k Subtract that constant from ab;ik for all ‘i’
  • 14. Reparameterization 2 0-3 4 +3 f(a) f(b) Q(f; ) 1 1- 3 0 0 7 0 1 10 - 3 + 3 5 0 2 1 0 5 Va Vb 1 1 6-3+3 Add a constant to one b;k Subtract that constant from ab;ik for all ‘i’ Q(f; ’) = Q(f; )
  • 15. Reparameterization 3 1 3 1 3 0-4 1+ 4 1+ 1 2 2-2 4 2 4 -1 2 1- 4 4 0+ 1 1- 2 2-4 1+ 1 5 0-2 2 +2 5 2 5 2 Va Vb Va Vb Va Vb ’a;i = a;i + Mba;i ’b;k = b;k + Mab;k Q(f; ’) ’ab;ik = ab;ik - Mab;k - Mba;i = Q(f; )
  • 16. Reparameterization ’ is a reparameterization of , iff Q(f; ’) = Q(f; ), for all f ’ Equivalently Kolmogorov, PAMI, 2006 2+2 0 4 -2 ’a;i = a;i + Mba;i 1 1 ’b;k = b;k + Mab;k 2+ 5 0 2 -2 Va Vb ’ab;ik = ab;ik - Mab;k - Mba;i
  • 17. Recap MAP Estimation f* = arg min Q(f; ) Q(f; ) = ∑a a;f(a) + ∑(a,b) ab;f(a)f(b) Min-marginals qa;i = min Q(f; ) s.t. f(a) = i Reparameterization Q(f; ’) = Q(f; ), for all f ’
  • 18. Outline • Reparameterization • Belief Propagation – Exact MAP for Chains and Trees – Approximate MAP for general graphs – Computational Issues and Theoretical Properties • Tree-reweighted Message Passing
  • 19. Belief Propagation • Some MAP problems are easy • Belief Propagation gives exact MAP for chains • Exact MAP for trees • Clever Reparameterization
  • 20. Two Variables 2 2 0 4 1 1 5 0 2 5 Va Vb Va Vb Add a constant to one b;k Subtract that constant from ab;ik for all ‘i’ Choose the right constant ’b;k = qb;k
  • 21. Two Variables 2 2 0 4 1 1 5 0 2 5 Va Vb Va Vb a;0 + ab;00 = 5+0 Mab;0 = min a;1 + ab;10 = 2+1 Choose the right constant ’b;k = qb;k
  • 22. Two Variables 2 2 0 4 -2 1 5 -3 5 5 Va Vb Va Vb Choose the right constant ’b;k = qb;k
  • 23. Two Variables 2 f(a) = 1 2 0 4 -2 1 5 -3 5 5 Va Vb Va Vb ’b;0 = qb;0 Potentials along the red path add up to 0 Choose the right constant ’b;k = qb;k
  • 24. Two Variables 2 2 0 4 -2 1 5 -3 5 5 Va Vb Va Vb a;0 + ab;01 = 5+1 Mab;1 = min a;1 + ab;11 = 2+0 Choose the right constant ’b;k = qb;k
  • 25. Two Variables f(a) = 1 f(a) = 1 2 2 -2 6 -2 -1 5 -3 5 5 Va Vb Va Vb ’b;0 = qb;0 ’b;1 = qb;1 Minimum of min-marginals = MAP estimate Choose the right constant ’b;k = qb;k
  • 26. Two Variables f(a) = 1 f(a) = 1 2 2 -2 6 -2 -1 5 -3 5 5 Va Vb Va Vb ’b;0 = qb;0 ’b;1 = qb;1 f*(b) = 0 f*(a) = 1 Choose the right constant ’b;k = qb;k
  • 27. Two Variables f(a) = 1 f(a) = 1 2 2 -2 6 -2 -1 5 -3 5 5 Va Vb Va Vb ’b;0 = qb;0 ’b;1 = qb;1 We get all the min-marginals of Vb Choose the right constant ’b;k = qb;k
  • 28. Recap We only need to know two sets of equations General form of Reparameterization ’a;i = a;i + Mba;i ’b;k = b;k+ Mab;k ’ab;ik = ab;ik- Mab;k- Mba;i Reparameterization of (a,b) in Belief Propagation Mab;k = mini { a;i + ab;ik } Mba;i = 0
  • 29. Three Variables l1 2 0 4 0 6 1 1 2 3 l0 5 0 2 1 3 Va Vb Vc Reparameterize the edge (a,b) as before
  • 30. Three Variables f(a) = 1 l1 2 -2 6 0 6 -2 -1 2 3 l0 5 -3 5 1 3 Va Vb Vc f(a) = 1 Reparameterize the edge (a,b) as before
  • 31. Three Variables f(a) = 1 l1 2 -2 6 0 6 -2 -1 2 3 l0 5 -3 5 1 3 Va Vb Vc f(a) = 1 Reparameterize the edge (a,b) as before Potentials along the red path add up to 0
  • 32. Three Variables f(a) = 1 l1 2 -2 6 0 6 -2 -1 2 3 l0 5 -3 5 1 3 Va Vb Vc f(a) = 1 Reparameterize the edge (b,c) as before Potentials along the red path add up to 0
  • 33. Three Variables f(a) = 1 f(b) = 1 l1 2 -2 6 -6 12 -2 -1 -4 -3 l0 5 -3 5 -5 9 Va Vb Vc f(a) = 1 f(b) = 0 Reparameterize the edge (b,c) as before Potentials along the red path add up to 0
  • 34. Three Variables f(a) = 1 f(b) = 1 l1 2 -2 6 -6 12 qc;1 -2 -1 -4 -3 l0 qc;0 5 -3 5 -5 9 Va Vb Vc f(a) = 1 f(b) = 0 Reparameterize the edge (b,c) as before Potentials along the red path add up to 0
  • 35. Three Variables f(a) = 1 f(b) = 1 l1 2 -2 6 -6 12 qc;1 -2 -1 -4 -3 l0 qc;0 5 -3 5 -5 9 Va Vb Vc f(a) = 1 f(b) = 0 f*(c) = 0 f*(b) = 0 f*(a) = 1 Generalizes to any length chain
  • 36. Three Variables f(a) = 1 f(b) = 1 l1 2 -2 6 -6 12 qc;1 -2 -1 -4 -3 l0 qc;0 5 -3 5 -5 9 Va Vb Vc f(a) = 1 f(b) = 0 f*(c) = 0 f*(b) = 0 f*(a) = 1 Only Dynamic Programming
  • 37. Why Dynamic Programming? 3 variables 2 variables + book-keeping n variables (n-1) variables + book-keeping Start from left, go to right Reparameterize current edge (a,b) Mab;k = mini { a;i + ab;ik } ’b;k = b;k+ Mab;k ’ab;ik = ab;ik- Mab;k Repeat
  • 38. Why Dynamic Programming? Messages Message Passing Why stop at dynamic programming? Start from left, go to right Reparameterize current edge (a,b) Mab;k = mini { a;i + ab;ik } ’b;k = b;k+ Mab;k ’ab;ik = ab;ik- Mab;k Repeat
  • 39. Three Variables l1 2 -2 6 -6 12 -2 -1 -4 -3 l0 5 -3 5 -5 9 Va Vb Vc Reparameterize the edge (c,b) as before
  • 40. Three Variables l1 2 -2 11 -11 12 -2 -1 -9 -7 l0 5 -3 9 -9 9 Va Vb Vc Reparameterize the edge (c,b) as before ’b;i = qb;i
  • 41. Three Variables l1 2 -2 11 -11 12 -2 -1 -9 -7 l0 5 -3 9 -9 9 Va Vb Vc Reparameterize the edge (b,a) as before
  • 42. Three Variables l1 9 -9 11 -11 12 -9 -7 -9 -7 l0 11 -9 9 -9 9 Va Vb Vc Reparameterize the edge (b,a) as before ’a;i = qa;i
  • 43. Three Variables l1 9 -9 11 -11 12 -9 -7 -9 -7 l0 11 -9 9 -9 9 Va Vb Vc Forward Pass   Backward Pass All min-marginals are computed
  • 44. Belief Propagation on Chains Start from left, go to right Reparameterize current edge (a,b) Mab;k = mini { a;i + ab;ik } ’b;k = b;k+ Mab;k ’ab;ik = ab;ik- Mab;k Repeat till the end of the chain Start from right, go to left Repeat till the end of the chain
  • 45. Belief Propagation on Chains • Generalizes to chains of any length • A way of computing reparam constants • Forward Pass - Start to End • MAP estimate • Min-marginals of final variable • Backward Pass - End to start • All other min-marginals Won’t need this .. But good to know
  • 46. Computational Complexity • Each constant takes O(|L|) • Number of constants - O(|E||L|) O(|E||L|2) • Memory required ? O(|E||L|)
  • 47. Belief Propagation on Trees Va Vb Vc Vd Ve Vg Vh Forward Pass: Leaf  Root Backward Pass: Root  Leaf All min-marginals are computed
  • 48. Outline • Reparameterization • Belief Propagation – Exact MAP for Chains and Trees – Approximate MAP for general graphs – Computational Issues and Theoretical Properties • Tree-reweighted Message Passing
  • 49. Belief Propagation on Cycles a;1 b;1 a;0 b;0 Va Vb d;1 c;1 d;0 c;0 Vd Vc Where do we start? Arbitrarily Reparameterize (a,b)
  • 50. Belief Propagation on Cycles a;1 ’b;1 a;0 ’b;0 Va Vb d;1 c;1 d;0 c;0 Vd Vc Potentials along the red path add up to 0
  • 51. Belief Propagation on Cycles a;1 ’b;1 a;0 ’b;0 Va Vb d;1 ’c;1 d;0 ’c;0 Vd Vc Potentials along the red path add up to 0
  • 52. Belief Propagation on Cycles a;1 ’b;1 a;0 ’b;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Potentials along the red path add up to 0
  • 53. Belief Propagation on Cycles ’a;1 - a;1 ’b;1 ’a;0 ’b;0 - a;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Did not obtain min-marginals Potentials along the red path add up to 0
  • 54. Belief Propagation on Cycles ’a;1 - a;1 ’b;1 ’a;0 ’b;0 - a;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Reparameterize (a,b) again
  • 55. Belief Propagation on Cycles ’a;1 ’’b;1 ’a;0 ’’b;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Reparameterize (a,b) again But doesn’t this overcount some potentials?
  • 56. Belief Propagation on Cycles ’a;1 ’’b;1 ’a;0 ’’b;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Reparameterize (a,b) again Yes. But we will do it anyway
  • 57. Belief Propagation on Cycles ’a;1 ’’b;1 ’a;0 ’’b;0 Va Vb ’d;1 ’c;1 ’d;0 ’c;0 Vd Vc Keep reparameterizing edges in some order No convergence guarantees
  • 58. Belief Propagation • Generalizes to any arbitrary random field • Complexity per iteration ? O(|E||L|2) • Memory required ? O(|E||L|)
  • 59. Outline • Reparameterization • Belief Propagation – Exact MAP for Chains and Trees – Approximate MAP for general graphs – Computational Issues and Theoretical Properties • Tree-reweighted Message Passing
  • 60. Computational Issues of BP Complexity per iteration O(|E||L|2) Special Pairwise Potentials ab;ik = wabd(|i-k|) d d d i-k i-k i-k Potts Truncated Linear Truncated Quadratic O(|E||L|) Felzenszwalb & Huttenlocher, 2004
  • 61. Computational Issues of BP Memory requirements O(|E||L|) Half of original BP Kolmogorov, 2006 Some approximations exist Yu, Lin, Super and Tan, 2007 Lasserre, Kannan and Winn, 2007 But memory still remains an issue
  • 62. Computational Issues of BP Order of reparameterization Randomly In some fixed order The one that results in maximum change Residual Belief Propagation Elidan et al. , 2006
  • 63. Summary of BP Exact for chains Exact for trees Approximate MAP for general cases Convergence not guaranteed So can we do something better?
  • 64. Outline • Reparameterization • Belief Propagation • Tree-reweighted Message Passing – Integer Programming Formulation – Linear Programming Relaxation and its Dual – Convergent Solution for Dual – Computational Issues and Theoretical Properties
  • 65. Integer Programming Formulation Unary Potentials Label l1 2 0 4 1 1 2 a;0 =5 b;0 =2 Label l0 =4 5 0 2 a;1 = 2 b;1 Va Vb Labeling f(a) = 1 ya;0 = 0 ya;1 = 1 f(b) = 0 yb;0 = 1 yb;1 = 0 Any f(.) has equivalent boolean variables ya;i
  • 66. Integer Programming Formulation Unary Potentials Label l1 2 0 4 1 1 2 a;0 =5 b;0 =2 Label l0 =4 5 0 2 a;1 = 2 b;1 Va Vb Labeling f(a) = 1 ya;0 = 0 ya;1 = 1 f(b) = 0 yb;0 = 1 yb;1 = 0 Find the optimal variables ya;i
  • 67. Integer Programming Formulation Unary Potentials Label l1 2 0 4 1 1 2 a;0 =5 b;0 =2 Label l0 =4 5 0 2 a;1 = 2 b;1 Va Vb 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
  • 68. Integer Programming Formulation Pairwise Potentials Label l1 2 0 4 1 1 2 ab;00 =0 ab;01 =1 Label l0 =0 5 0 2 ab;10 = 1 ab;11 Va Vb Sum of Pairwise Potentials ∑(a,b) ∑ik ab;ik ya;iyb;k ya;i {0,1} ∑i ya;i = 1
  • 69. Integer Programming Formulation Pairwise Potentials Label l1 2 0 4 1 1 2 ab;00 =0 ab;01 =1 Label l0 =0 5 0 2 ab;10 = 1 ab;11 Va Vb Sum of Pairwise Potentials ∑(a,b) ∑ik ab;ik yab;ik ya;i {0,1} yab;ik = ya;i yb;k ∑i ya;i = 1
  • 70. 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
  • 71. 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 ….]
  • 72. Integer Programming Formulation min Ty ya;i {0,1} ∑i ya;i = 1 yab;ik = ya;i yb;k Solve to obtain MAP labeling y*
  • 73. 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
  • 74. Outline • Reparameterization • Belief Propagation • Tree-reweighted Message Passing – Integer Programming Formulation – Linear Programming Relaxation and its Dual – Convergent Solution for Dual – Computational Issues and Theoretical Properties
  • 75. 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
  • 76. 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
  • 77. 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
  • 78. 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
  • 79. 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
  • 80. 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
  • 81. 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
  • 82. Dual of the LP Relaxation Wainwright et al., 2001 1 1 Va Vb Vc Va Vb Vc 2 2 Vd Ve Vf 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 i i = 4 5 6
  • 83. Dual of the LP Relaxation Wainwright et al., 2001 1 q*( 1) Va Vb Vc Va Vb Vc 2 q*( 2) Vd Ve Vf Vd Ve Vf 3 q*( 3) Vg Vh Vi Vg Vh Vi q*( 4) q*( 5) q*( 6) Va Vb Vc i≥ 0 Dual of LP Vd Ve Vf max i q*( i) Vg Vh Vi i i = 4 5 6
  • 84. Dual of the LP Relaxation Wainwright et al., 2001 1 q*( 1) Va Vb Vc Va Vb Vc 2 q*( 2) Vd Ve Vf Vd Ve Vf 3 q*( 3) Vg Vh Vi Vg Vh Vi q*( 4) q*( 5) q*( 6) Va Vb Vc i≥ 0 Dual of LP Vd Ve Vf max i q*( i) Vg Vh Vi i i 4 5 6
  • 85. Dual of the LP Relaxation Wainwright et al., 2001 max i q*( i) i i I can easily compute q*( i) I can easily maintain reparam constraint So can I easily solve the dual?
  • 86. Outline • Reparameterization • Belief Propagation • Tree-reweighted Message Passing – Integer Programming Formulation – Linear Programming Relaxation and its Dual – Convergent Solution for Dual – Computational Issues and Theoretical Properties
  • 87. TRW Message Passing Kolmogorov, 2006 4 5 6 1 V 1 a Vb Vc Va Vb Vc 2 2 Vd Ve Vf Vd Ve Vf 3 V Vh Vi 3 g Vg Vh Vi 4 5 6 Pick a variable Va i q*( i) i i
  • 88. TRW Message Passing Kolmogorov, 2006 1 1 1 4 4 4 c;1 b;1 a;1 a;1 d;1 g;1 1 1 1 4 4 4 c;0 b;0 a;0 a;0 d;0 g;0 Vc Vb Va Va Vd Vg i q*( i) i i
  • 89. TRW Message Passing Kolmogorov, 2006 1 1 1 4 4 4 c;1 b;1 a;1 a;1 d;1 g;1 1 1 1 4 4 4 c;0 b;0 a;0 a;0 d;0 g;0 Vc Vb Va Va Vd Vg Reparameterize to obtain min-marginals of Va 1 q*( 1) + 4 q*( 4) +K 1 1+ 4 4 + rest
  • 90. 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 1 q*( ’1) + 4 q*( ’4) + K 1 ’1 + 4 ’4 + rest
  • 91. 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 1 q*( ’1) + 4 q*( ’4) + K 1 ’1 + 4 ’4 + rest
  • 92. 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 1 min{ ’1a;0, ’1a;1} + 4 min{ ’4a;0, ’4a;1} + K 1 ’1 + 4 ’4 + rest
  • 93. 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 weighted average of min-marginals of Va 1 min{ ’1a;0, ’1a;1} + 4 min{ ’4a;0, ’4a;1} + K 1 ’1 + 4 ’4 + rest
  • 94. 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 = 1 ’1a;0+ 4 ’4a;0 ’’a;1 = 1 ’1a;1+ 4 ’4a;1 1 + 4 1 + 4 1 min{ ’1a;0, ’1a;1} + 4 min{ ’4a;0, ’4a;1} + K 1 ’1 + 4 ’4 + rest
  • 95. 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 = 1 ’1a;0+ 4 ’4a;0 ’’a;1 = 1 ’1a;1+ 4 ’4a;1 1 + 4 1 + 4 1 min{ ’1a;0, ’1a;1} + 4 min{ ’4a;0, ’4a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 96. 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 = 1 ’1a;0+ 4 ’4a;0 ’’a;1 = 1 ’1a;1+ 4 ’4a;1 1 + 4 1 + 4 1 min{ ’1a;0, ’1a;1} + 4 min{ ’4a;0, ’4a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 97. 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 = 1 ’1a;0+ 4 ’4a;0 ’’a;1 = 1 ’1a;1+ 4 ’4a;1 1 + 4 1 + 4 1 min{ ’’a;0, ’’a;1} + 4 min{ ’’a;0, ’’a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 98. 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 = 1 ’1a;0+ 4 ’4a;0 ’’a;1 = 1 ’1a;1+ 4 ’4a;1 1 + 4 1 + 4 ( 1+ 4) min{ ’’a;0, ’’a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 99. 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} ( 1+ 4) min{ ’’a;0, ’’a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 100. 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 ( 1+ 4) min{ ’’a;0, ’’a;1} + K 1 ’’1 + 4 ’’4 + rest
  • 101. 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 REPEAT Can also do edge-averaging Kolmogorov, 2006
  • 102. Example 1 1 =1 2 =1 3 =1 l1 2 0 4 4 0 6 6 1 6 1 1 2 3 4 1 l0 5 0 2 2 1 3 3 0 4 Va Vb Vb Vc Vc Va 5 6 7 Pick variable Va. Reparameterize.
  • 103. Example 1 1 =1 2 =1 3 =1 l1 5 -3 4 4 0 6 6 -3 10 -2 -1 2 3 1 -3 l0 7 -2 2 2 1 3 3 -3 7 Va Vb Vb Vc Vc Va 5 6 7 Average the min-marginals of Va
  • 104. Example 1 1 =1 2 =1 3 =1 l1 7.5 -3 4 4 0 6 6 -3 7.5 -2 -1 2 3 1 -3 l0 7 -2 2 2 1 3 3 -3 7 Va Vb Vb Vc Vc Va 7 6 7 Pick variable Vb. Reparameterize.
  • 105. Example 1 1 =1 2 =1 3 =1 l1 7.5 -7.5 8.5 9 -5 6 6 -3 7.5 -7 -5.5 -3 -1 1 -3 l0 7 -7 7 6 -3 3 3 -3 7 Va Vb Vb Vc Vc Va 7 6 7 Average the min-marginals of Vb
  • 106. Example 1 1 =1 2 =1 3 =1 l1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 -7 -5.5 -3 -1 1 -3 l0 7 -7 6.5 6.5 -3 3 3 -3 7 Va Vb Vb Vc Vc Va 6.5 6.5 7 Value of dual does not increase
  • 107. Example 1 1 =1 2 =1 3 =1 l1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 -7 -5.5 -3 -1 1 -3 l0 7 -7 6.5 6.5 -3 3 3 -3 7 Va Vb Vb Vc Vc Va 6.5 6.5 7 Maybe it will increase for Vc NO
  • 108. Example 1 1 =1 2 =1 3 =1 l1 7.5 -7.5 8.75 8.75 -5 6 6 -3 7.5 -7 -5.5 -3 -1 1 -3 l0 7 -7 6.5 6.5 -3 3 3 -3 7 Va Vb Vb Vc Vc Va f1(a) = 0 f1(b) = 0 f2(b) = 0 f2(c) = 0 f3(c) = 0 f3(a) = 0 Strong Tree Agreement Exact MAP Estimate
  • 109. Example 2 1 =1 2 =1 3 =1 l1 2 0 2 0 1 0 0 0 4 1 1 0 0 1 1 l0 5 0 2 0 1 0 3 0 8 Va Vb Vb Vc Vc Va 4 0 4 Pick variable Va. Reparameterize.
  • 110. Example 2 1 =1 2 =1 3 =1 l1 4 -2 2 0 1 0 0 0 4 -1 -1 0 0 0 1 l0 7 -2 2 0 1 0 3 -1 9 Va Vb Vb Vc Vc Va 4 0 4 Average the min-marginals of Va
  • 111. Example 2 1 =1 2 =1 3 =1 l1 4 -2 2 0 1 0 0 0 4 -1 -1 0 0 0 1 l0 8 -2 2 0 1 0 3 -1 8 Va Vb Vb Vc Vc Va 4 0 4 Value of dual does not increase
  • 112. Example 2 1 =1 2 =1 3 =1 l1 4 -2 2 0 1 0 0 0 4 -1 -1 0 0 0 1 l0 8 -2 2 0 1 0 3 -1 8 Va Vb Vb Vc Vc Va 4 0 4 Maybe it will decrease for Vb or Vc NO
  • 113. Example 2 1 =1 2 =1 3 =1 l1 4 -2 2 0 1 0 0 0 4 -1 -1 0 0 0 1 l0 8 -2 2 0 1 0 3 -1 8 Va Vb Vb Vc Vc Va 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
  • 114. Example 2 1 =1 2 =1 3 =1 l1 4 -2 2 0 1 0 0 0 4 -1 -1 0 0 0 1 l0 8 -2 2 0 1 0 3 -1 8 Va Vb Vb Vc Vc Va 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
  • 115. Obtaining the Labeling Only solves the dual. Primal solutions? Va Vb Vc Fix the label Of Va Vd Ve Vf Vg Vh Vi ’= i i
  • 116. Obtaining the Labeling Only solves the dual. Primal solutions? Va Vb Vc Fix the label Of Vb Vd Ve Vf Vg Vh Vi ’= i i Continue in some fixed order Meltzer et al., 2006
  • 117. Outline • Problem Formulation • Reparameterization • Belief Propagation • Tree-reweighted Message Passing – Integer Programming Formulation – Linear Programming Relaxation and its Dual – Convergent Solution for Dual – Computational Issues and Theoretical Properties
  • 118. 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
  • 119. 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
  • 120. Summary • Trees can be solved exactly - BP • No guarantee of convergence otherwise - BP • Strong Tree Agreement - TRW-S • Submodular energies solved exactly - TRW-S • TRW-S solves an LP relaxation of MAP estimation