Theoremadvanced
Kolmogorov-Zabih representability theorem
Also called graph-representable energies, regularity condition for graph cuts.
Only regular (submodular) binary energies can be represented by a cut. With terms of at most three variables, regularity is also sufficient, so one min cut minimizes them exactly.
The Kolmogorov-Zabih theorem says which energies of binary variables a minimum cut can minimize exactly. An energy is graph-representable if there is a directed graph with nonnegative capacities, a source, a sink and one node for each variable, such that the energy of every assignment equals, up to a constant, the cheapest cut that puts the nodes of the variables with value 0 on the source side and the others on the sink side. Such an energy is minimized by one max-flow computation, by the max-flow min-cut theorem. The theorem says that a graph-representable energy must be regular: every restriction of it to two variables, with the other variables fixed, satisfies . For energies that are sums of terms of at most two variables (the class ) and at most three variables (), this condition is also sufficient. Regularity is the same as submodularity of the energy seen as a set function. The theorem is the base of the move algorithms alpha-expansion and alpha-beta swap, and QPBO is the method for energies that are not regular.
Statement
Let be a function of binary variables .
Graph-representable (Kolmogorov and Zabih, Definition 3.1). is graph-representable if there is a directed graph with nonnegative edge capacities, terminals and , nodes and possibly more nodes, and a constant , such that for every
where is the total capacity of the edges from to the other nodes. The extra nodes may be on either side.
Projection and regularity. A projection of to two variables is the function of two binary variables that gives when , and all other variables have fixed values. is regular if every projection to two variables satisfies
A function of one variable has no such condition. is the class of functions and adds terms .
Theorem.
- (Necessity, Theorem 6.1 of the paper.) Every graph-representable function is regular.
- (Class , Theorem 4.1.) is graph-representable if and only if every pairwise term satisfies .
- (Class , Theorem 5.3.) is graph-representable if and only if it is regular.
In parts 2 and 3 the graph has nodes and edges for terms, so a regular in is minimized exactly in polynomial time by one max-flow computation: a minimum cut gives the minimizer .
In plain words
Think of each yes or no variable as a node that must go to one of two sides, the source side or the sink side. Cutting the graph into two sides costs the sum of the edges that cross from the source side to the sink side. If you can build a graph where this cost always equals your energy, then the cheapest cut tells you the best answer, and there are fast programs for the cheapest cut. The theorem says when such a graph exists. Look at any two variables. Agreeing in both ways must cost no more in total than disagreeing in both ways. If some pair breaks this rule, no graph can do it. If every pair keeps the rule and each term has at most three variables, a graph always exists.
Proof
Write for the capacity of the cut with source side .
Lemma (cuts are submodular). For any two node sets that contain and not , .
Proof. Look at one edge of capacity . It counts in when and . Let and . The edge adds to the left side and to the right side. If both right terms are 1, then and the left side is 2. If only the first is 1, then and some , so the left side is at least 1. If only the second is 1, then and some , so again the left side is at least 1. Sum over the edges.
Part 1 (necessity). Let and represent . Fix a projection to , with the other variables at fixed values . Let be a cheapest cut for the assignment with , and , and let be a cheapest cut for , and . Then , , and . Every other variable node is in both sets or in neither, because both use the values . So is a cut for and , and is a cut for and ; both contain and not . By the definition and the lemma,
Part 2 (sufficiency for ). Two facts make the construction modular. First, if and are represented by graphs on the same nodes , possibly with their own extra nodes, then is represented by the union of the two graphs, with capacities added on shared edges and constants added: the extra nodes of the two graphs are disjoint, so the minimum over their placement splits into two independent minimums. Second, each term is representable alone:
- A unary term with is an edge of capacity : it is cut exactly when , that is . With write : an edge of capacity and the constant . A general unary term is .
- A pairwise term with , , , equals
which the four cases check. The last product is 1 exactly when and , so it is an edge of capacity . The capacity is nonnegative exactly when the term is regular. The other parts are unary terms and a constant.
For the converse, the projection of to is plus functions of one variable and a constant, which do not change . So is regular exactly when every is regular, and Part 1 gives the "only if" direction.
Part 3 (sufficiency for ). Write in its unique multilinear form
For a projection to , the value is the coefficient of after the other variables are fixed, which is . The other variables take all values, so is regular if and only if
Replace each cubic monomial with one extra binary variable , using two identities that hold for all binary values (check the eight cases):
with . In both, the products have the coefficient . A positive cubic monomial also adds to the coefficient of each of its three pairs, and a negative one adds nothing. After all replacements, where has only unary and pairwise terms, and the coefficient of in is the left side of (R). A pairwise term has , so every pairwise term of is regular. By Part 2, is represented by a graph with nodes for and . A minimum over cuts that fixes the nodes of is also a minimum over the placement of the nodes of , so the same graph, with the nodes of as extra nodes, represents . The converse is Part 1.
The proof of Part 3 is a little different from the construction in Section 5.1 of the paper, which builds the graph for each regular term of three variables after a regrouping of the terms (Theorem 5.4 of the paper). Both give a graph of nodes and edges.
The minimizer. If represents and is a minimum cut, the assignment has , and every has , so is a minimizer.
Consequences
- Binary labeling. Foreground and background segmentation and binary image restoration with an Ising or Potts prior have regular pairwise terms, so they are solved exactly by one cut. This is the case of Greig, Porteous and Seheult (1989) and of graph cut segmentation.
- Move algorithms. A multi-label energy is minimized approximately by a sequence of binary moves. A move is one cut when its binary energy is regular. The swap move is regular when the pairwise term is a semimetric, and the expansion move when it is a metric. See alpha-beta swap and alpha-expansion.
- Stereo with occlusions. The uniqueness constraint of graph cut stereo is an infinite pairwise term. It is regular only after the move variables are chosen with care, and the theorem tells which choices work.
- Nonregular energies. For a pairwise energy that is not regular, QPBO builds a regular energy on twice as many variables and gets a partial optimal labeling.
- A test before building a graph. To know whether a new energy can be minimized by one cut, check the inequality on every pairwise projection. If it fails anywhere, no graph exists, however many extra nodes it has.
- Max-flow solvers. In vision the graphs are grids with a few edges per node, and the Boykov-Kolmogorov algorithm is the usual solver (an observed speed, not a bound).
A worked example
Take the pairwise term , , , . It is regular: . The formula of Part 2 gives , and . The graph has an edge of capacity 2, an edge of capacity 1, an edge of capacity 4, and .
| source side | cut edges | cut cost | $K + $ cost | ||
|---|---|---|---|---|---|
| 1 | 0 | 0 | |||
| 4 | 3 | 3 | |||
| , | 3 | 2 | 2 | ||
| 2 | 1 | 1 |
A non-example is the term that rewards disagreement, and : here , so by Part 1 no graph represents it, with any number of extra nodes.
Tightness
- Regularity is not enough for four variables. Živný, Cohen and Jeavons (2009) showed that some submodular functions of four binary variables cannot be written as the minimum over extra variables of a sum of submodular functions of two variables. So the "if" direction of Part 3 does not extend to all orders. Submodular functions of any order are still minimized in polynomial time by general submodular minimization, but not by one cut of this kind.
- Nonregular terms make the problem hard. Theorem 4.2 of the paper shows that minimizing is NP-hard when one fixed nonregular pairwise term may be placed on any pairs, together with arbitrary unary terms. So, unless P = NP, the limit that regularity puts on cuts is also a limit for every polynomial method on such classes.
- Representation is not the only route. A single nonregular term of two variables is easy to minimize by trying the four cases. The theorem is about the cut construction, not about every polynomial method.
History
Greig, Porteous and Seheult (1989) showed that the maximum a posteriori estimate of a binary image with an Ising prior is a minimum cut, and so can be computed exactly. Quadratic pseudo-Boolean functions with nonpositive quadratic coefficients were known to be minimized by network flows in operations research before that; the survey of Boros and Hammer (2002) collects these results. Boykov, Veksler and Zabih (2001) used cuts for the moves of multi-label energies and built a graph for each kind of move. Kolmogorov and Zabih (2004) gave the general answer: they defined graph-representable functions, proved that regularity is necessary, and gave constructions for and . Živný, Cohen and Jeavons (2009) showed that the construction cannot cover all submodular functions of four variables.
References
- Vladimir Kolmogorov and Ramin Zabih, What energy functions can be minimized via graph cuts?, IEEE Transactions on Pattern Analysis and Machine Intelligence 26(2), 2004, 147-159, Definition 3.1 (graph-representable functions), Theorem 4.1 (the class F2), Section 4.1 (the construction for F2), Theorem 4.2 (NP-hardness of nonregular F2), Theorem 5.3 and Section 5.1 (the class F3), Theorem 6.1 (regularity is necessary)
- D. M. Greig, B. T. Porteous and A. H. Seheult, Exact maximum a posteriori estimation for binary images, Journal of the Royal Statistical Society Series B 51(2), 1989, 271-279, the reduction of the MAP estimate of a binary image with an Ising prior to a minimum cut
- Stanislav Živný, David A. Cohen and Peter G. Jeavons, The expressive power of binary submodular functions, Discrete Applied Mathematics 157(15), 2009, 3347-3358, the result that some submodular functions of four variables cannot be expressed by binary submodular functions with extra variables
- Endre Boros and Peter L. Hammer, Pseudo-Boolean optimization, Discrete Applied Mathematics 123(1-3), 2002, 155-225, the parts on quadratic pseudo-Boolean functions, the multilinear form and the network flow methods for the submodular case
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Chapter 4, Model fitting and optimization (Markov random fields and their minimization by graph cuts)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag HPRR7C Edit this page History Report an error Markdown