Quadratic Pseudo-Boolean Optimization
   HOME

TheInfoList



OR:

Quadratic pseudo-Boolean optimisation (QPBO) is a combinatorial optimization method for minimizing quadratic
pseudo-Boolean function In mathematics and optimization, a pseudo-Boolean function is a function (mathematics), function of the form :f: \mathbf^n \to \R, where is a ''Boolean domain'' and is a nonnegative integer called the arity of the function. A Boolean function is ...
s in the form : f(\mathbf) = w_0 + \sum_ w_p(x_p) + \sum_ w_(x_p, x_q) in the
binary variables Binary data is data whose unit can take on only two possible states. These are often labelled as 0 and 1 in accordance with the binary numeral system and Boolean algebra. Binary data occurs in many different technical and scientific fields, wher ...
x_p \in \ \; \forall p \in V = \, with E \subseteq V \times V. If f is
submodular In mathematics, a submodular set function (also known as a submodular function) is a set function whose value, informally, has the property that the difference in the incremental value of the function that a single element makes when added to an ...
then QPBO produces a global optimum equivalently to
graph cut optimization Graph cut optimization is a combinatorial optimization method applicable to a family of function (mathematics), functions of Continuous or discrete variable, discrete variables, named after the concept of cut (graph theory), cut in the theory of fl ...
, while if f contains non-submodular terms then the algorithm produces a partial solution with specific optimality properties, in both cases in
polynomial time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
. QPBO is a useful tool for inference on Markov random fields and conditional random fields, and has applications in
computer vision Computer vision is an interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate tasks that the hum ...
problems such as image segmentation and
stereo matching Stereophonic sound, or more commonly stereo, is a method of sound reproduction that recreates a multi-directional, 3-dimensional audible perspective. This is usually achieved by using two independent audio channels through a configuration ...
.


Optimization of non-submodular functions

If the coefficients w_ of the quadratic terms satisfy the submodularity condition : w_(0, 0) + w_(1, 1) \le w_(0, 1) + w_(1, 0) then the function can be efficiently optimised with
graph cut optimization Graph cut optimization is a combinatorial optimization method applicable to a family of function (mathematics), functions of Continuous or discrete variable, discrete variables, named after the concept of cut (graph theory), cut in the theory of fl ...
. It is indeed possible to represent it with a non-negative weighted graph, and the global minimum can be found in polynomial time by computing a minimum cut of the graph, which can be computed with algorithms such as Ford–Fulkerson, Edmonds–Karp, and Boykov–Kolmogorov's. If the function is not submodular, then the problem is
NP-hard In computational complexity theory, NP-hardness ( non-deterministic polynomial-time hardness) is the defining property of a class of problems that are informally "at least as hard as the hardest problems in NP". A simple example of an NP-hard pr ...
in the general case and it is not always possible to solve it exactly in polynomial time. It is possible to replace the target function with a similar but submodular approximation, e.g. by removing all non-submodular terms or replacing them with submodular approximations, but such approach is generally sub-optimal and it produces satisfying results only if the number of non-submodular terms is relatively small. QPBO builds an extended graph, introducing a set of auxiliary variables ideally equivalent to the negation of the variables in the problem. If the nodes in the graph associated to a variable (representing the variable itself and its negation) are separated by the minimum cut of the graph in two different connected components, then the optimal value for such variable is well defined, otherwise it is not possible to infer it. Such method produces results generally superior to submodular approximations of the target function.


Properties

QPBO produces a solution where each variable assumes one of three possible values: ''true'', ''false'', and ''undefined'', noted in the following as 1, 0, and \emptyset respectively. The solution has the following two properties. * ''Partial optimality'': if f is submodular, then QPBO produces a global minimum exactly, equivalent to graph cut, and all variables have a non-undefined value; if submodularity is not satisfied, the result will be a partial solution \mathbf where a subset \hat \subseteq V of the variables have a non-undefined value. A partial solution is always part of a global solution, i.e. there exists a global minimum point \mathbf for f such that x_i = x_i^* for each i \in \hat. * ''Persistence'': given a solution \mathbf generated by QPBO and an arbitrary assignment of values \mathbf to the variables, if a new solution \hat is constructed by replacing y_i with x_i for each i \in \hat, then f(\hat) \le f(\mathbf).


Algorithm

The algorithm can be divided in three steps: graph construction, max-flow computation, and assignment of values to the variables. When constructing the graph, the set of vertices V contains the source and sink nodes s and t, and a pair of nodes p and p' for each variable. After re-parametrising the function to normal form, a pair of edges is added to the graph for each term w: * for each term w_p(0) the edges p \rightarrow t and s \rightarrow p', with weight \frac w_p(0); * for each term w_p(1) the edges s \rightarrow p and p' \rightarrow t, with weight \frac w_p(1); * for each term w_(0, 1) the edges p \rightarrow q and q' \rightarrow p', with weight \frac w_(0, 1); * for each term w_(1, 0) the edges q \rightarrow p and p' \rightarrow q', with weight \frac w_(1, 0); * for each term w_(0, 0) the edges p \rightarrow q' and q \rightarrow p', with weight \frac w_(0, 0); * for each term w_(1, 1) the edges q' \rightarrow p and p' \rightarrow q, with weight \frac w_(1, 1). The minimum cut of the graph can be computed with a max-flow algorithm. In the general case, the minimum cut is not unique, and each minimum cut correspond to a different partial solution, however it is possible to build a minimum cut such that the number of undefined variables is minimal. Once the minimum cut is known, each variable receives a value depending upon the position of its corresponding nodes p and p': if p belongs to the connected component containing the source and p' belongs to the connected component containing the sink then the variable will have value of 0. Vice versa, if p belongs to the connected component containing the sink and p' to the one containing the source, then the variable will have value of 1. If both nodes p and p' belong to the same connected component, then the value of the variable will be undefined. The way undefined variables can be handled is dependent upon the context of the problem. In the general case, given a
partition Partition may refer to: Computing Hardware * Disk partitioning, the division of a hard disk drive * Memory partition, a subdivision of a computer's memory, usually for use by a single job Software * Partition (database), the division of a ...
of the graph in two sub-graphs and two solutions, each one optimal for one of the sub-graphs, then it is possible to combine the two solutions into one solution optimal for the whole graph in polynomial time. However, computing an optimal solution for the subset of undefined variables is still a
NP-hard In computational complexity theory, NP-hardness ( non-deterministic polynomial-time hardness) is the defining property of a class of problems that are informally "at least as hard as the hardest problems in NP". A simple example of an NP-hard pr ...
problem. In the context of iterative algorithms such as \alpha-expansion, a reasonable approach is to leave the value of undefined variables unchanged, since the persistence property guarantees that the target function will have non-increasing value. Different exact and approximate strategies to minimise the number of undefined variables exist.


Higher order terms

It is always possible to reduce a higher-order function to a quadratic function which is equivalent with respect to the optimisation, problem known as "higher-order clique reduction" (HOCR), and the result of such reduction can be optimized with QPBO. Generic methods for reduction of arbitrary functions rely on specific substitution rules and in the general case they require the introduction of auxiliary variables. In practice most terms can be reduced without introducing additional variables, resulting in a simpler optimization problem, and the remaining terms can be reduced exactly, with addition of auxiliary variables, or approximately, without addition of any new variable.


Notes

Kolmogorov and Rother (2007). Fix et al. (2011). Ishikawa (2014). Billionnet and Jaumard (1989). Rother et al. (2007).


References

* * * * *


Notes

The representation of a pseudo-Boolean function with coefficients \mathbf = (w_0, w_1, \dots, w_) is not unique, and if two coefficient vectors \mathbf and \mathbf' represent the same function then \mathbf' is said to be a reparametrisation of \mathbf and vice versa. In some constructions it is useful to ensure that the function has a specific form, called ''normal form'', which is always defined for any function, and it is not unique. A function f is in normal form if the two following conditions hold (Kolmogorov and Rother (2007)): # \min \ = 0 for each p \in V; # \min \ = 0 for each (p, q) \in E and for each j \in \. Given an arbitrary function f, it is always possible to find a reparametrisation to normal form with the following algorithm in two steps (Kolmogorov and Rother (2007)): # as long as there exist indices (p, q) \in E and j \in \ such that the second condition of normality is not satisfied, substitute: #* w_^ with w_^ - a #* w_^ with w_^ - a #* w_q^j with w_q^j + a #: where a = \min \; # for p = 1, \dots, n, substitute: #* w_0 with w_0 + a #* w_p^0 with w_p^0 - a #* w_p^1 with w_p^1 - a #: where a = \min \{ w_p^0, w_p^1 \}.


External links


Implementation of QPBO (C++)
available under the GNU General Public License, by Vladimir Kolmogorov.
Implementation of HOCR (C++)
available under the MIT license, by Hiroshi Ishikawa. Combinatorial optimization Computational problems in graph theory