MAP Inference in Discrete Models
M. Pawan Kumar, Stanford University
Recent Advances in Convex
Relaxations
Outline
• Revisiting the LP relaxation
• Rounding Schemes and Move Making
• Beyond the LP relaxation
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
Linear Programming Relaxation
Primal formulation is useful
Easier to analyze
LP better than a large class of relaxations
- QP (Ravikumar, Lafferty 2006)
- SOCP (Muramatsu, Suzuki 2003)
Kumar, Kolmogorov and Torr, NIPS 2007
Linear Programming Relaxation
Primal fractional solution is useful
Multiplicative Bounds
Type of Problem Bound
Potts 2
Truncated Linear 2 + √2
Truncated Quadratic O(√M)
General Metric O(log |L|)
Outline
• Revisiting the LP relaxation
• Rounding Schemes and Move Making
• Beyond the LP relaxation
Randomized Rounding
0 y’a;0 y’a;i y’a;k y’a;h = 1
y’a;i = ya;0 + ya;1 + … + ya;i
Choose an interval of length L’
Randomized Rounding
0 y’a;0 y’a;i y’a;k y’a;h = 1
y’a;i = ya;0 + ya;1 + … + ya;i
Generate a random number r (0,1]
r
Randomized Rounding
0 y’a;0 y’a;i y’a;k y’a;h = 1
y’a;i = ya;0 + ya;1 + … + ya;i
Assign label next to r (if within the interval)
r
Move Making
Va Vb
• Initialize the labeling
• Choose interval I of L’ labels
• Each variable can
• Retain old label
• Choose a label from I
• Choose best labeling
Iterate over intervals
Truncated Convex Models
Two Problems
Va Vb
• Choose interval I of L’ labels
• Each variable can
• Retain old label
• Choose a label from I
• Choose best labeling
Large L’ => Non-submodular
Non-submodular
First Problem
Va Vb Submodular problem
Ishikawa, 2003; Veksler, 2007
First Problem
Va Vb Non-submodular
Problem
First Problem
Va Vb Submodular problem
Veksler, 2007
First Problem
Va Vb
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
Model unary potentials exactly
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
Similarly for Vb
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
Model convex pairwise costs
am+1
am+2
an
t
am+2
bm+1
bm+2
bn
bm+2
First Problem
Va Vb
Overestimated pairwise potentials
Wanted to model
ab;ik = wab min{ d(i-k), M }
For all li, lk I
Have modelled
ab;ik = wab d(i-k)
For all li, lk I
Second Problem
Va Vb
• Choose interval I of L’ labels
• Each variable can
• Retain old label
• Choose a label from I
• Choose best labeling
Non-submodular problem !!
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
Previous labels may not lie in interval
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
s
ua ub
ua and ub : unary potentials for previous labels
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
s
ua ub
Pab : pairwise potential for previous labels
ab
Pab
MM
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
wab d(i-k)
s
ua ub
ab
Pab
MM
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
wab ( d(i-m-1) + M )
s
ua ub
ab
Pab
MM
Second Problem
Va Vb
am+1
am+2
an
t
bm+1
bm+2
bn
Pab
s
ua ub
ab
Pab
MM
Graph Construction
Va Vb
Find st-MINCUT.
Retain old labeling
if energy increases.
am+1
am+2
an
bm+1
bm+2
bn
t
ITERATE
Move Making
LP Bounds
Kumar and Torr, NIPS 08
In General?
Type of Problem Bound
Potts 2
Truncated Linear 2 + √2
Truncated Quadratic O(√M)
General Metric O(log |L|)
Kumar and Koller, UAI 09
Outline
• Revisiting the LP relaxation
• Rounding Schemes and Move Making
• Beyond the LP relaxation
LP over a Frustrated Cycle
Va Vb
1
0 0
1
0
0
0
0l0
l1
Vb Vc
1
0 0
1
0
0
0
0
Vc Va
1
0 0
1
0
0
0
0
Optimal labeling has energy = 1
One takes label l0, two take label l1
One takes label l1, two take label l0
LP optimal solution
Va Vb
0
0.5 0.5
0
0.5
0.5
0.5
0.5l0
l1
Vb Vc
0
0.5 0.5
0
0.5
0.5
0.5
0.5
Vc Va
0
0.5 0.5
0
0.5
0.5
0.5
0.5
Optimal fractional labeling has energy = 0
Need tighter relaxations
Cycle Inequalities
Vb
Va Vc
At least two variables take same label
Cycle Inequalities
Vb
Va Vc
Va and Vc take label 0, yac;00 = 1
Cycle Inequalities
Vb
Va Vc
Or Va and Vc take label 1, yac;11 = 1
Cycle Inequalities
Vb
Va Vc
∑ yab;00 + yab;11 ≥ 1
LP optimal solution
Va Vb
0
0.5 0.5
0
0.5
0.5
0.5
0.5l0
l1
Vb Vc
0
0.5 0.5
0
0.5
0.5
0.5
0.5
Vc Va
0
0.5 0.5
0
0.5
0.5
0.5
0.5
Does not satisfy cycle inequality
Cycle Inequalities
Generalizes to cycles of arbitrary length
Barahona and Mahjoub, 1986
Generalizes to arbitrary label sets
Chopra and Rao, 1991
Sontag and Jaakkola, 2007
Modifies the primal
But weren’t we solving the dual?
Modifying the Dual
Do operations on trees and cycles
Which algorithm? Which cycles?
Kumar and Torr, 2008
TRW-S All cycles of length 3 and 4
Komodakis and Paragios, 2008
Dual Decomposition All frustrated cycles
Sontag et al, 2008
MPLP Iteratively add cycles
Maximum increase in the dual
Questions?