210 likes | 374 Views
LP, extended maxflow, TRW OR: How to understand Vladimir’s most recent work. Ramin Zabih Cornell University. Linear programming and duality Extended maxflow TRW Some slides from Ziv Bar-Yossef (Technion) Much content from Vladimir Kolmogorov. Outline. Linear Programming.
E N D
LP, extended maxflow, TRWOR: How to understand Vladimir’s most recent work Ramin Zabih Cornell University
Linear programming and duality Extended maxflow TRW Some slides from Ziv Bar-Yossef (Technion) Much content from Vladimir Kolmogorov Outline
Linear Programming • Fast algorithms - O(n3) or so • Numerous interesting special cases can be encoded as LP’s • Many ways to convert between LP’s • Sometimes you can transform into a fast special case • Can sometimes solve integer programs • “Integrality gap”: IP versus LP solution
Solving LP Graphically Optimal solution Vertices Objective function Feasible region
Notes on solutions • Maximum is always at a vertex • Simplex algorithm • Certain constraints are “tight” • So you can check if the solution is integral!
Convert any LP to Standard Form • • • •
Bounding the Optimal Solution • Suppose we wish to find an upper bound on the optimal solution • Multiply first constraint by 3: z ≤ 90 • Add first and second constraints: z ≤ 54 • What linear combination gives the best upper bound?
Bound Optimal Solution by LP Primal Dual
Primal vs. Dual • Lemma: The dual of the dual is the primal. • Theorem (Weak Duality) For any feasible solution x for the primal (cost vector c), and for any feasible solution y for the dual (cost b), • Theorem (Strong Duality) If the primal has an optimal solution x*, then the dual also has an optimal solution y*, and
Notes • Solutions to dual are not obviously cuts • Why are the yI,j values 0 or 1? • Any flow · any cut • We can find the biggest flow fast • By strong duality this is the value of the cheapest cut • But how do we actually find the cut? • How about in generality?
Complementary slackness • Easy to go from dual optimum solution to primal optimal solution • No guarantees if dual solution isn’t optimal • Dual variable yj is zero iff j’th constraint is slack (not tight) • So you know which constraint lines intersect at the optimum!
LP for energy minimization • We can formulate E(x) as an IP • Since IP’s are NP-hard • We replace xp by indicator variables xp;k which are like probabilities (non negative, sum to 1) • Similarly, need xpq;ij for adjacent pixels • Parameters are costs • We can then relax this IP to an LP and solve it • If integer solutions, we are done • Note that we first need to actually solve the LP!
Importance of this LP • This LP is vital for both “extended maxflow” (quadratic pseudo-boolean optimization) and TRW(-S) • Both work on its dual • So by solving the dual we are maximizing a lower bound on the energy
Extended maxflow vs TRW • Maxflow is only for binary labels • I.e., for the expansion move algorithm • Maxflow solves the LP exactly • Solutions are [1 0] or [0 1] or [.5 .5] • No ambiguities if problem is regular • Automatically does “flipping” • If not regular, solution is persistent
- lower bound on the energy: Extended maxflow • Maximize lower bound on E maximize non-negative
TRW idea • Decompose graph into a collection of trees with different parameterizations • Weak tree agreement (WTA): • Consider all trees incorporating a node. Their parameterizations with cost 0 all agree. • Normal form tree parameterization • node params are min marginals (after BP) • Goal is normal form and WTA
TRW(-S) properties • WTA and normal form holds at the dual solution (max ()) • For binary labels only! • TRW(-S) tries to achieve this • TRW doesn’t always converge to a solution where this is true (TRW-S does) • What it converges for isn’t necessarily the dual solution (except for 2 labels) • The primal solution may not be integral