Complexity of Discrete Energy Minimization Problems
Discrete energy minimization is widely-used in computer vision and machine learning for problems such as MAP inference in graphical models. The problem, in general, is notoriously intractable, and finding the global optimal solution is known to be NP-hard. However, is it possible to approximate this problem with a reasonable ratio bound on the solution quality in polynomial time? We show in this paper that the answer is no. Specifically, we show that general energy minimization, even in the 2-label pairwise case, and planar energy minimization with three or more labels are exp-APX-complete. This finding rules out the existence of any approximation algorithm with a sub-exponential approximation ratio in the input size for these two problems, including constant factor approximations. Moreover, we collect and review the computational complexity of several subclass problems and arrange them on a complexity scale consisting of three major complexity classes – PO, APX, and exp-APX, corresponding to problems that are solvable, approximable, and inapproximable in polynomial time. Problems in the first two complexity classes can serve as alternative tractable formulations to the inapproximable ones. This paper can help vision researchers to select an appropriate model for an application or guide them in designing new algorithms.
Keywords:Energy minimization, complexity, NP-hard, APX, exp-APX, NPO, WCSP, min-sum, MAP MRF, QPBO, planar graph
14(1,0.4) Author’s version. The final publication is available at link.springer.com.
Discrete energy minimization, also known as min-sum labeling  or weighted constraint satisfaction (WCSP)111WCSP is a more general problem, considering a bounded plus operation. It is itself a special case of valued CSP, where the objective takes values in a more general valuation set. , is a popular model for many problems in computer vision, machine learning, bioinformatics, and natural language processing. In particular, the problem arises in maximum a posteriori (MAP) inference for Markov (conditional) random fields (MRFs/CRFs) . In the most frequently used pairwise case, the discrete energy minimization problem (simply “energy minimization” hereafter) is defined as
where is the label for node in a graph . When the variables are binary (Boolean): , the problem can be written as a quadratic polynomial in  and is known as quadratic pseudo-Boolean optimization (QPBO) .
In computer vision practice, energy minimization has found its place in semantic segmentation , pose estimation , scene understanding , depth estimation , optical flow estimation , image in-painting , and image denoising . For example, tree-structured models have been used to estimate pictorial structures such as body skeletons or facial landmarks , multi-label Potts models have been used to enforce a smoothing prior for semantic segmentation , and general pairwise models have been used for optimal flow estimation . However, it may not be appreciated that the energy minimization formulations used to model these vision problems have greatly varied degrees of tractability or computational complexity. For the three examples above, the first allows efficient exact inference, the second admits a constant factor approximation, and the third has no quality guarantee on the approximation of the optimum.
The study of complexity of energy minimization is a broad field. Energy minimization problems are often intractable in practice except for special cases. While many researchers analyze the time complexity of their algorithms (e.g., using big O notation), it is beneficial to delve deeper to address the difficulty of the underlying problem. The two most commonly known complexity classes are P (polynomial time) and NP (nondeterministic polynomial time: all decision problems whose solutions can be verified in polynomial time). However, these two complexity classes are only defined for decision problems. The analogous complexity classes for optimization problems are PO (P optimization) and NPO (NP optimization: all optimization problems whose solution feasibility can be verified in polynomial time). Optimization problems form a superset of decision problems, since any decision problem can be cast as an optimization over the set yes, no, \ie, P PO and NP NPO. The NP-hardness of an optimization problem means it is at least as hard as (under Turing reduction) the hardest decision problem in the class NP. If a problem is NP-hard, then it is not in PO assuming P NP.
Although optimal solutions for problems in NPO, but not in PO, are intractable, it is sometimes possible to guarantee that a good solution (i.e., one that is worse than the optimal by no more than a given factor) can be found in polynomial time. These problems can therefore be further classified into class APX (constant factor approximation) and class exp-APX (inapproximable) with increasing complexity (Figure 1). We can arrange energy minimization problems on this more detailed complexity scale, originally established in , to provide vision researchers a new viewpoint for complexity classification, with a focus on NP-hard optimization problems.
In this paper, we make three core contributions, as explained in the next three paragraphs. First, we prove the inapproximability result of QPBO and general energy minimization. Second, we show that the same inapproximability result holds when restricting to planar graphs with three or more labels. In the proof, we propose a novel micro-graph structure-based reduction that can be used for algorithmic design as well. Finally, we present a unified framework and an overview of vision-related special cases where the energy minimization problem can be solved in polynomial time or approximated with a constant, logarithmic, or polynomial factor.
Binary and multi-label case (Section 3). It is known that QPBO (2-label case) and the general energy minimization problem (multi-label case) are NP-hard , because they generalize such classical NP-hard optimization problems on graphs as vertex packing (maximum independent set) and the minimum and maximum cut problems . In this paper, we show a stronger conclusion. We prove that QPBO as well as general energy minimization are complete (being the hardest problems) in the class exp-APX. Assuming P NP, this implies that a polynomial time method cannot have a guarantee of finding an approximation within a constant factor of the optimal, and in fact, the only possible factor in polynomial time is exponential in the input size. In practice, this means that a solution may be essentially arbitrarily bad.
Planar three or more label case (Section 4). Planar graphs form the underlying graph structure for many computer vision and image processing tasks. It is known that efficient exact algorithms exist for some special cases of planar 2-label energy minimization problems . In this paper, we show that for the case of three or more labels, planar energy minimization is exp-APX-complete, which means these problems are as hard as general energy minimization. It is unknown that whether a constant ratio approximation exists for planar 2-label problems in general.
Subclass problems (Section 5). Special cases for some energy minimization algorithms relevant to computer vision are known to be tractable. However, detailed complexity analysis of these algorithms is patchy and spread across numerous papers. In Section 5, we classify the complexity of these subclass problems and illustrate some of their connections. Such an analysis can help computer vision researchers become acquainted with existing complexity results relevant to energy minimization and can aid in selecting an appropriate model for an application or in designing new algorithms.
1.1 Related Work
Much of the work on complexity in computer vision has focused on experimental or empirical comparison of inference methods, including influential studies on choosing the best optimization techniques for specific classes of energy minimization problems [62, 26] and the PASCAL Probabilistic Inference Challenge, which focused on the more general context of inference in graphical models . In contrast, our work focuses on theoretical computational complexity, rather than experimental analysis.
On the theoretical side, the NP-hardness of certain energy minimization problems is well studied. It has been shown that 2-label energy minimization is, in general, NP-hard, but it can be in PO if it is submodular  or outerplanar . For multi-label problems, the NP-hardness was proven by reduction from the NP-hard multi-way cut problem . These results, however, say nothing about the complexity of approximating the global optimum for the intractable cases. The complexity involving approximation has been studied for classical combinatorial problems, such as MAX-CUT and MAX-2SAT, which are known to be APX-complete . QPBO generalizes such problems and is therefore APX-hard. This leaves a possibility that QPBO may be in APX, \ie, approximable within a constant factor.
Energy minimization is often used to solve MAP inference for undirected graphical models. In contrast to scarce results for energy minimization and undirected graphical models, researchers have more extensively studied the computational complexity of approximating the MAP solution for Bayesian networks, also known as directed graphical models . Abdelbar and Hedetniemi first proved the NP-hardness for approximating the MAP assignment of directed graphical models in the value of probability, \ie, finding such that
with a constant or polynomial ratio is NP-hard and showing that this problem is poly-APX-hard . The probability approximation ratio is closest to the energy ratio used in our work, but other approximation measures have also been studied. Kwisthout showed the NP-hardness for approximating MAPs with the measure of additive value-, structure-, and rank-approximation [40, 41, 42]. He also investigated the hardness of expectation-approximation of MAP and found that no randomized algorithm can expectation-approximate MAP in polynomial time with a bounded margin of error unless NP BPP, an assumption that is highly unlikely to be true .
Unfortunately, the complexity results for directed models do not readily transfer to undirected models and vice versa. In directed and undirected models, the graphs represent different conditional independence relations, thus the underlying family of probability distributions encoded by these two models is distinct, as detailed in Appendix 0.B. However, one can ask similar questions on the hardness of undirected models in terms of various approximation measures. In this work, we answer two questions, “How hard is it to approximate the MAP inference in the ratio of energy (log probability) and the ratio of probability?” The complexity of structure-, rank-, and expectation-approximation remain open questions for energy minimization.
2 Definitions and Notation
There are at least two different sets of definitions of what is considered an NP optimization problem [45, 4]. Here, we follow the notation of Ausiello et al  and restate the definitions needed for us to state and prove our theorems in Sections 3 and 4 with our explanation of their relevance to our proofs.
Definition 2.0 (Optimization Problem,  Def. 1.16).
An optimization problem is characterized by a quadruple where
is the set of instances of .
is a function that associates to any input instance the set of feasible solutions of .
is the measure function, defined for pairs such that and . For every such pair , provides a positive integer.
Notice the assumption that the cost is positive, and, in particular, it cannot be zero.
Definition 2.0 (Class NPO,  Def 1.17).
An optimization problem belongs to the class of NP optimization (NPO) problems if the following hold:
The set of instances is recognizable in polynomial time.
There exists a polynomial such that given an instance , for any , and, besides, for any such that , it is decidable in polynomial time whether .
The measure function is computable in polynomial time.
Definition 2.0 (Class PO,  Def 1.18).
An optimization problem belongs to the class of PO if it is in NPO and there exists a polynomial-time algorithm that, for any instance , returns an optimal solution , together with its value .
For intractable problems, it may be acceptable to seek an approximate solution that is sufficiently close to optimal.
Definition 2.0 (Approximation Algorithm,  Def. 3.1).
Given an optimization problem an algorithm is an approximation algorithm for if, for any given instance , it returns an approximate solution, that is a feasible solution .
Definition 2.0 (Performance Ratio, , Def. 3.6).
Given an optimization problem , for any instance of and for any feasible solution , the performance ratio, approximation ratio or approximation factor of with respect to is defined as
where is the measure of the optimal solution for the instance .
Since is a positive integer, the performance ratio is well-defined. It is a rational number in . Notice that from this definition, it follows that if finding a feasible solution, \eg, is an NP-hard decision problem, then there exists no polynomial-time approximation algorithm for , irrespective of the kind of performance evaluation that one could possibly mean.
Definition 2.0 (-approximation, , Def. 8.1).
Given an optimization problem in NPO, an approximation algorithm for , and a function , we say that is an -approximate algorithm for if, for any instance of such that , the performance ratio of the feasible solution with respect to verifies the following inequality:
Definition 2.0 (-Apx, , Def. 8.2).
Given a class of functions , -APX is the class of all NPO problems such that, for some function , there exists a polynomial-time -approximate algorithm for .
The class of constant functions for yields the complexity class APX. Together with logarithmic, polynomial, and exponential functions applied in Definition 2.0, the following complexity axis is established:
Since the measure needs to be computable in polynomial time for NPO problems, the largest measure and thus the largest performance ratio is an exponential function. But exp-APX is not equal to NPO (assuming P NP) because NPO contains problems whose feasible solutions cannot be found in polynomial time. For an energy minimization problem, any label assignment is a feasible solution, implying that all energy minimization problems are in exp-APX.
The standard approach for proofs in complexity theory is to perform a reduction from a known NP-complete problem. Unfortunately, the most common polynomial-time reductions ignore the quality of the solution in the approximated case. For example, it is shown that any energy minimization problem can be reduced to a factor 2 approximable Potts model , however the reduction is not approximation preserving and is unable to show the hardness of general energy minimization in terms of approximation. Therefore, it is necessary to use an approximation preserving (AP) reduction to classify NPO problems that are not in PO, for which only the approximation algorithms are tractable. AP-preserving reductions preserve the approximation ratio in a linear fashion, and thus preserve the membership in these complexity classes. Formally,
Definition 2.0 (AP-reduction,  Def. 8.3).
Let and be two problems in NPO. is said to be AP-reducible to , in symbols , if two functions and and a positive constant exist such that 222The complete definition contains a rational for the the two mappings ( and ) and it is omitted here for simplicity.:
For any instance , .
For any instance , if then .
For any instance and for any , .
and are computable by algorithms whose running time is polynomial.
For any instance , for any rational , and for any ,
AP-reduction is the formal definition of the term ‘as hard as’ used in this paper unless otherwise specified. It defines a partial order among optimization problems. With respect to this relationship, we can formally define the subclass containing the hardest problems in a complexity class:
Definition 2.0 (-hard and -complete,  Def. 8.5).
Given a class of NPO problems, a problem is -hard if, for any , . A -hard problem is -complete if it belongs to .
Intuitively, a complexity class specifies the upper bound on the hardness of the problems within, -hard specifies the lower bound, and -complete exactly specifies the hardness.
3 Inapproximability for the General Case
In this section, we show that QPBO and general energy minimization are inapproximable by proving they are exp-APX-complete. As previously mentioned, it is already known that these problems are NP-hard , but it was previously unknown whether useful approximation guarantees were possible in the general case. The formal statement of QPBO as an optimization problem is as follows:
A pseudo-Boolean function
given by the collection of unary terms and pairwise terms .
Assignment of variables .
QPBO is exp-APX-complete.
(Full proof in Appendix 0.A).
We observe that W3SAT-triv is known to be exp-APX-complete . W3SAT-triv is a 3-SAT problem with weights on the variables and an artificial, trivial solution.
Each 3-clause in the conjunctive normal form can be represented as a polynomial consisting of three binary variables. Together with representing the weights with the unary terms, we arrive at a cubic Boolean minimization problem.
We use the method of  to transform the cubic Boolean problem into a quadratic one, with polynomially many additional variables, which is an instance of QPBO.
Together with an inverse mapping that we define, the above transformation defines an AP-reduction from W3SAT-triv to QPBO, \ieW3SAT-triv QPBO. This proves that QPBO is exp-APX-hard.
We observe that all energy minimization problems are in exp-APX and thereby conclude that QPBO is exp-APX-complete.
This inapproximability result can be generalized to more than two labels.
-label energy minimization is exp-APX-complete for .
(Full proof in Appendix 0.A). This theorem is proved by showing QPBO -label energy minimization for .
Taken together, this theorem and its corollaries form a very strong inapproximability result for general energy minimization 333These results automatically generalize to higher order cases as they subsume the pairwise cases discussed here.. They imply not only NP-hardness, but also that there is no algorithm that can approximate general energy minimization with two or more labels with an approximation ratio better than some exponential function in the input size. In other words, any approximation algorithm of the general energy minimization problem can perform arbitrarily badly, and it would be pointless to try to prove a bound on the approximation ratio for existing approximation algorithms for the general case. While this conclusion is disappointing, these results serve as a clarification of grounds and guidance for model selection and algorithm design. Instead of counting on an oracle that solves the energy minimization problem, researchers should put efforts into selecting the proper formulation, trading off expressiveness for tractability.
4 Inapproximability for the Planar Case
Efficient algorithms for energy minimization have been found for special cases of 2-label planar graphs. Examples include planar 2-label problems without unary terms and outerplanar 2-label problems (i.e., the graph structure remains planar after connecting to a common node) . Grid structures over image pixels naturally give rise to planar graphs in computer vision. Given their frequency of use in this domain, it is natural to consider the complexity of more general cases involving planar graphs. Figure 2 visualizes the current state of knowledge of the complexity of energy minimization problems on planar graphs. In this section, we prove that for the case of planar graphs with three or more labels, energy minimization is exp-APX-complete. This result is important because it significantly reduces the space of potentially efficient algorithms on planar graphs. The existence of constant ratio approximation for planar 2-label problems in general remains an open question 444The planar 2-label problem in general is APX-hard, since it subsumes the APX problem planar vertex cover ..
Planar 3-label energy minimization is exp-APX-complete.
(Full proof in Appendix 0.A).
We construct elementary gadgets to reduce any 3-label energy minimization problem to a planar one with polynomially many auxiliary nodes.
Together with an inverse mapping that we define, the above construction defines an AP-reduction, \ie, 3-label energy minimization planar 3-label energy minimization.
Since 3-label energy minimization is exp-APX-complete (Corollary 3.1) and all energy minimization problems are in exp-APX, we thereby conclude that planar 3-label energy minimization is exp-APX-complete.
Planar -label energy minimization is exp-APX-complete, for .
(Full proof in Appendix 0.A). This theorem is proved by showing planar 3-label energy minimization planar -label energy minimization, for .
These theorems show that the restricted case of planar graphs with 3 or more labels is as hard as general case for energy minimization problems with the same inapproximable implications discussed in Section 3.
The most novel and useful aspect of the proof of Theorem 4.1 is the planar reduction in Step 1. The reduction creates an equivalent planar representation to any non-planar 3-label graph. That is, the graphs share the same optimal value. The reduction applies elementary constructions or “gadgets” to uncross two intersecting edges. This process is repeated until all intersecting edges are uncrossed. Similar elementary constructions were used to study the complexity of the linear programming formulation of energy minimization problems [49, 48]. Our novel gadgets have three key properties at the same time: 1) they are able to uncross intersecting edges, 2) they work on non-relaxed problems, \ie, all indicator variables (or pseudomarginals to be formal) are integral; and 3) they can be applied repeatedly to build an AP-reduction.
The two gadgets used in our reduction are illustrated in Figure 3. A 3-label node can be encoded as a collection of 3 indicator variables with a one-hot constraint. In the figure, a solid colored circle denotes a 3-label node, and a solid colored rectangle denotes the equivalent node expressed with indicator variables (white circles). For example, in Figure 3, corresponds to the blue node taking the first label value. The pairwise potentials (edges on the left part of the figures) can be viewed as edge costs between the indicator variables (black lines on the right), \eg, is placed onto the edge between indicator and and is counted into the overall measure if and only if . In our gadgets, drawn edges represent zero cost while omitted edges represent positive infinity555A very large number will also serve the same purpose, \eg, take the sum of the absolute value of all energy terms and add 1. Therefore, we are not expanding the set of allowed energy terms to include .. While the set of feasible solutions remains the same, the gadget encourages certain labeling relationships, which, if not satisfied, cause the overall measure to be infinity. Therefore, the encouraged relationships must be satisfied by any optimal solution. The two gadgets serve different purposes:
Split A 3-label node (blue) is split into two 2-label nodes (green). The shaded circle represents a label with a positive infinite unary cost and thus creates a simulated 2-label node. The encouraged relationships are
Thus encodes , and both encode and encodes .
UncrossCopy The values of two 2-label nodes are encouraged to be the same as their diagonal counterparts respectively (red to red, green to green) without crossing with each other. The orange nodes are intermediate nodes that pass on the values. All types of lines represent the same edge cost, which is 0. The color differences visualize the verification for each of the 4 possible states of two 2-label nodes. For example, the cyan lines verify the case where the top-left (green) node takes the values (1, 0) and the top-right (red) node takes the value (0, 1). It is clear that the encouraged solution is for the bottom-left (red) node and the bottom-right (green) node to take the value (0, 1) and (1, 0) respectively.
These two gadgets can be used to uncross the intersecting edges of two pairs of 3-label nodes (Figure 4, left). For a crossing edge (, ), first a new 3-label node is introduced preserving the same arbitrary interaction (red line) as before (Figure 4, middle). Then, the crossing edges (enclosed in the dotted circle) are uncrossed by applying Split and UncrossCopy four times (Figure 4, right). Without loss of generality, we can assume that no more than two edges intersect at a common point except at their endpoints. This process can be applied repeatedly at each edge crossing until there are no edge crossings left in the graph .
5 Complexity of Subclass Problems
In this section, we classify some of the special cases of energy minimization according to our complexity axis (Figure 1). This classification can be viewed as a reinterpretation of existing results from the literature into a unified framework.
5.1 Class PO (Global Optimum)
Polynomial time solvability may be achieved by considering two principal restrictions: those restricting the structure of the problem, \ie, the graph , and those restricting the type of allowed interactions, \ie, functions .
Structure Restrictions. When is a chain, energy minimization reduces to finding a shortest path in the trellis graph, which can be solved using a classical dynamic programming (DP) method known as the Viterbi algorithm . The same DP principle applies to graphs of bounded treewidth. Fixing all variables in a separator set decouples the problem into independent optimization problems. For treewidth 1, the separators are just individual vertices, and the problem is solved by a variant of DP [47, 54]. For larger treewidths, the respective optimization procedure is known as junction tree decomposition . A loop is a simple example of a treewidth 2 problem. However, for a treewidth problem, the time complexity is exponential in . When is an outer-planar graph, the problem can be solved by the method of , which reduces it to a planar Ising model, for which efficient algorithms exist .
Interaction Restrictions. Submodularity is a restriction closely related to problems solvable by minimum cut. A quadratic pseudo-Boolean function is submodular iff its quadratic terms are non-positive. It is then known to be equivalent with finding a minimum cut in a corresponding network . Another way to state this condition for QPBO is However, submodularity is more general. It extends to higher-order and multi-label problems. Submodularity is considered a discrete analog of convexity. Just as convex functions are relatively easy to optimize, general submodular function minimization can be solved in strongly polynomial time . Kolmogorov and Zabin introduced submodularity in computer vision and showed that binary 2nd order and 3rd order submodular problems can be always reduced to minimum cut, which is much more efficient than general submodular function minimization . Živný et al. and Ramalingam et al. give more results on functions reducible to minimum cut [68, 50]. For QPBO on an unrestricted graph structure, the following dichotomy result has been proven by Cohen et al. : either the problem is submodular and thus in PO or it is NP-hard (\ie, submodular problems are the only ones that are tractable in this case).
For multi-label problems Ishikawa proposed a reduction to minimum cut for problems with convex interactions, \ie, where and is convex and symmetric . It is worth noting that when the unary terms are convex as well, the problem can be solved even more efficiently [22, 31]. The same reduction  remains correct for a more general class of submodular multi-label problems. In modern terminology, component-wise minimum and component-wise maximum of complete labelings , for all nodes are introduced (). These operations depend on the order of labels and, in turn, define a lattice on the set of labelings. The function is called submodular on the lattice if for all , . In the pairwise case, the condition can be simplified to the form of submodularity common in computer vision : In particular, it is easy to see that a convex satisfies it . Kolmogorov  and Arora et al.  proposed maxflow-like algorithms for higher order submodular energy minimization. Schlesinger proposed an algorithm to find a reordering in which the problem is submodular if one exists . However, unlike in the binary case, solvable multi-label problems are more diverse. A variety of problems are generalizations of submodularity and are in PO, including symmetric tournament pair, submodularity on arbitrary trees, submodularity on arbitrary lattices, skew bisubmodularity, and bisubmodularity on arbitrary domains (see references in ). Thapper and Živný  and Kolmogorov  characterized these tractable classes and proved a similar dichotomy result: a problem of unrestricted structure is either solvable by LP-relaxation (and thus in PO) or it is NP-hard. It appears that LP relaxation is the most powerful and general solving technique .
Mixed Restrictions. In comparison, results with mixed structure and interaction restrictions are rare. One example is a planar Ising model without unary terms . Since there is a restriction on structure (planarity) and unary terms, it does not fall into any of the classes described above. Another example is the restriction to supermodular functions on a bipartite graph, solvable by  or by LP relaxation, but not falling under the characterization  because of the graph restriction.
Algorithmic Applications. The aforementioned tractable formulations in PO can be used to solve or approximate harder problems. Trees, cycles and planar problems are used in dual decomposition methods [35, 36, 9]. Binary submodular problems are used for finding an optimized crossover of two-candidate multi-label solutions. An example of this technique, the expansion move algorithm, achieves a constant approximation ratio for the Potts model . Extended dynamic programming can be used to solve restricted segmentation problems  and as move-making subroutine . LP relaxation also provides approximation guarantees for many problems [5, 15, 28, 37], placing them in the APX or poly-APX class.
5.2 Class APX and Class log-APX (Bounded Approximation)
Problems that have bounded approximation in polynomial time usually have certain restriction on the interaction type. The Potts model may be the simplest and most common way to enforce the smoothness of the labeling. Each pairwise interaction depends on whether the neighboring labellings are the same, \ie. Boykov \etalshowed a reduction to this problem from the NP-hard multiway cut , also known to be APX-complete [4, 17]. They also proved that their constructed alpha-expansion algorithm is a 2-approximate algorithm. These results prove that the Potts model is in APX but not in PO. However, their reduction from multiway cut is not an AP-reduction, as it violates the third condition of AP-reducibility. Therefore, it is still an open problem whether the Potts model is APX-complete. Boykov \etalalso showed that their algorithm can approximate the more general problem of metric labeling . The energy is called metric if, for an arbitrary, finite label space , the pairwise interaction satisfies a) , b) , and c) , for any labels , , and any . Although their approximation algorithm has a bound on the performance ratio, the bound depends on the ratio of some pairwise terms, a number that can grow exponentially large. For metric labeling with labels, Kleinberg \etalproposed an -approximation algorithm. This bound was further improved to by Chekuri et al. , making metric labeling a problem in log-APX 666An -approximation implies an -approximation (see Corollary 0.C.0). .
We have seen that a problem with convex pairwise interactions is in PO. An interesting variant is its truncated counterpart, \ie, , where is a non-negative weight, is a convex symmetric function to define the distance between two labels, and is the truncating constant . This problem is NP-hard , but Kumar et al.  have proposed an algorithm that yields bounded approximations with a factor of for linear distance functions and a factor of for quadratic distance functions777In these truncated convex problems, the ratio bound is defined for the pairwise part of the energy Eq. 1. The approximation ratio in accordance to our definition is obtained assuming the unary terms are non-negative.. This bound is analyzed for more general distance functions by Kumar .
Another APX problem with implicit restrictions on the interaction type is logic MRF . It is a powerful higher order model able to encode arbitrary logical relations of Boolean variables. It has energy function , where each is a disjunctive clause involving a subset of Boolean variables , and if it is satisfied and 0 otherwise. Each clause is assigned a non-negative weight . The goal is to find an assignment of to maximize . As disjunctive clauses can be converted into polynomials, this is essentially a pseudo-Boolean optimization problem. However, this is a special case of general 2-label energy minimization, as its polynomial basis spans a subspace of the basis of the latter. Bach et al.  proved that logic MRF is in APX by showing that it is a special case of MAX-SAT with non-negative weights.
The algorithmic implications of our inapproximability have been discussed above. Here, we focus on the discussion of practical implications. The existence of an approximation guarantee indicates a practically relevant class of problems where one may expect reasonable performance. In structural learning for example, it is acceptable to have a constant factor approximation for the inference subroutine when efficient exact algorithms are not available. Finley and Joachims proved that this constant factor approximation guarantee yields a multiplicative bound on the learning objective, providing a relative guarantee for the quality of the learned parameters . An optimality guarantee is important, because the inference subroutine is repeatedly called, and even a single poor approximation, which returns a not-so-bad worst violator, will lead to the early termination of the structural learning algorithm.
However, despite having no approximation ratio guarantee, algorithms such as the extended roof duality algorithm for QPBO  are still widely used. This gap between theory and application applies not only to our results but to all other complexity results as well. We list several key reasons for the potential lack of correspondence between theoretical complexity guarantees and practical performance.
Complexity results address the worst case scenario. Our inapproximability result guarantees that for any polynomial time algorithm, there exists an input instance for which the algorithm will produce a very poor approximation. However, applications often do not encounter the worst case. Such is the case with the simplex algorithm, whose worst case complexity is exponential, yet it is widely used in practice.
Objective function is not the final evaluation criterion. In many image processing tasks, the final evaluation criterion is the number of pixels correctly labeled. The relation between the energy value and the accuracy is implicit. In many cases, a local optimum is good enough to produce a high labeling accuracy and a visually appealing labeling.
Other forms of optimality guarantee or indicator exist. Approximation measures in the distance of solutions or in the expectation of the objective value are likely to be prohibitive for energy minimization, as they are for Bayesian networks [40, 41, 42]. On the other hand, a family of energy minimization algorithms has the property of being persistent or partial optimal, meaning a subset of nodes have consistent labeling with the global optimal one [10, 11]. Rather than being an optimality guarantee, persistency is an optimality indicator. In the worst case, the set of persistent labelings could be empty, yet the percentage of persistent labelings over the all the nodes gives us a notion of the algorithm’s performance on this particular input instance. Persistency is also useful in reducing the size of the search space [29, 58]. Similarly, the per-instance integrality gap of duality based methods is another form of optimality indicator and can be exponentially large for problems in general [37, 61].
In this paper, we have shown inapproximablity results for energy minimization in the general case and planar 3-label case. In addition, we present a unified overview of the complexity of existing energy minimization problems by arranging them in a fine-grained complexity scale. These altogether set up a new viewpoint for interpreting and classifying the complexity of optimization problems for the computer vision community. In the future, it will be interesting to consider the open questions of the complexity of structure-, rank-, and expectation-approximation for energy minimization.
This material is based upon work supported by the National Science Foundation under Grant No. IIS-1328930 and by the European Research Council under the Horizon 2020 program, ERC starting grant agreement 640156.
- PIC  The Probabilistic Inference Challenge (2011), http://www.cs.huji.ac.il/project/PASCAL/
- Abdelbar and Hedetniemi  Abdelbar, A., Hedetniemi, S.: Approximating MAPs for belief networks is NP-hard and other theorems. Artificial Intelligence 102(1), 21–38 (6 1998)
- Arora et al.  Arora, C., Banerjee, S., Kalra, P., Maheshwari, S.N.: Generic cuts: An efficient algorithm for optimal inference in higher order MRF-MAP. In: ECCV. pp. 17–30 (2012)
- Ausiello et al.  Ausiello, G., Crescenzi, P., Gambosi, G., Kann, V., Marchetti-Spaccamela, A., Protasi, M.: Complexity and approximation: Combinatorial optimization problems and their approximability properties. Springer (1999)
- Bach et al. [2015a] Bach, S.H., Huang, B., Getoor, L.: Unifying local consistency and max sat relaxations for scalable inference with rounding guarantees. In: AISTATS. JMLR Proceedings, vol. 38 (2015a)
- Bach et al. [2015b] Bach, S.H., Huang, B., Getoor, L.: Unifying local consistency and max sat relaxations for scalable inference with rounding guarantees. In: AISTATS. pp. 46–55 (2015b)
- Bar-Yehuda and Even  Bar-Yehuda, R., Even, S.: On approximating a vertex cover for planar graphs. In: Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing. pp. 303–309 (1982)
- Barbu  Barbu, A.: Learning real-time MRF inference for image denoising. In: CVPR. pp. 1574–1581 (2009)
- Batra et al.  Batra, D., Gallagher, A.C., Parikh, D., Chen, T.: Beyond trees: Mrf inference via outer-planar decomposition. In: CVPR. pp. 2496–2503 (2010)
- Boros et al.  Boros, E., Hammer, P.L., Sun, X.: Network flows and minimization of quadratic pseudo-Boolean functions. Tech. Rep. RRR 17-1991, RUTCOR (May 1991)
- Boros and Hammer  Boros, E., Hammer, P.: Pseudo-Boolean optimization. Tech. rep., RUTCOR (October 2001)
- Boros and Hammer  Boros, E., Hammer, P.: Pseudo-Boolean optimization. Discrete Applied Mathematics 1-3(123), 155–225 (2002)
- Boykov et al.  Boykov, Y., Veksler, O., Zabih, R.: Fast approximate energy minimization via graph cuts. PAMI 23, 1222–1239 (November 2001)
- Chekuri et al.  Chekuri, C., Khanna, S., Naor, J., Zosin, L.: A linear programming formulation and approximation algorithms for the metric labeling problem. SIAM Journal on Discrete Mathematics 18(3), 608–625 (2005)
- Chekuri et al.  Chekuri, C., Khanna, S., Naor, J., Zosin, L.: Approximation algorithms for the metric labeling problem via a new linear programming formulation. In: In Symposium on Discrete Algorithms. pp. 109–118 (2001)
- Cohen et al.  Cohen, D., Cooper, M., Jeavons, P.: Principles and Practice of Constraint Programming, chap. A Complete Characterization of Complexity for Boolean Constraint Optimization Problems, pp. 212–226 (2004)
- Dahlhaus et al.  Dahlhaus, E., Johnson, D.S., Papadimitriou, C.H., Seymour, P.D., Yannakakis, M.: The complexity of multiterminal cuts. SIAM Journal on Computing 23(4), 864–894 (1994)
- Felzenszwalb and Veksler  Felzenszwalb, P.F., Veksler, O.: Tiered scene labeling with dynamic programming. In: CVPR. pp. 3097–3104 (2010)
- Finley and Joachims  Finley, T., Joachims, T.: Training structural svms when exact inference is intractable. In: ICML. pp. 304–311. ACM (2008)
- Forney Jr  Forney Jr, G.D.: The viterbi algorithm. Proceedings of the IEEE 61(3), 268–278 (1973)
- Hammer  Hammer, P.L.: Some network flow problems solved with pseudo-Boolean programming. Operation Research 13, 388–399 (1965)
- Hochbaum  Hochbaum, D.S.: An efficient algorithm for image segmentation, Markov random fields and related problems. J. ACM 48(4), 686–701 (Jul 2001)
- Ishikawa  Ishikawa, H.: Exact optimization for Markov random fields with convex priors. PAMI 25(10), 1333–1336 (2003)
- Ishikawa  Ishikawa, H.: Transformation of general binary MRF minimization to the first-order case. PAMI 33(6), 1234–1249 (2011)
- Jeavons et al.  Jeavons, P., Krokhin, A., Živnỳ, S., et al.: The complexity of valued constraint satisfaction. Bulletin of EATCS 2(113) (2014)
- Kappes et al.  Kappes, J.H., Andres, B., Hamprecht, F.A., Schnörr, C., Nowozin, S., Batra, D., Kim, S., Kausler, B.X., Kröger, T., Lellmann, J., et al.: A comparative study of modern inference techniques for structured discrete energy minimization problems. IJCV 115, 155–184 (2015)
- Karp  Karp, R.M.: Reducibility among combinatorial problems. In: Proceedings of a symposium on the Complexity of Computer Computations. pp. 85–103 (1972)
- Kleinberg and Tardos  Kleinberg, J., Tardos, E.: Approximation algorithms for classification problems with pairwise relationships: metric labeling and Markov random fields. J. ACM 49(5), 616–639 (2002)
- Kohli et al.  Kohli, P., Shekhovtsov, A., Rother, C., Kolmogorov, V., Torr, P.: On partial optimality in multi-label MRFs. In: ICML. pp. 480–487 (2008)
- Kolmogorov and Zabih  Kolmogorov, V., Zabih, R.: What energy functions can be minimized via graph cuts? PAMI 26(2), 147–159 (February 2004)
- Kolmogorov  Kolmogorov, V.: Primal-dual algorithm for convex Markov random fields. Tech. Rep. MSR-TR-2005-117, Microsoft Research Cambridge (2005)
- Kolmogorov  Kolmogorov, V.: Minimizing a sum of submodular functions. Discrete Applied Mathematics 160(15), 2246 – 2258 (2012)
- Kolmogorov  Kolmogorov, V.: The power of linear programming for finite-valued CSPs: A constructive characterization. In: Automata, Languages, and Programming, Lecture Notes in Computer Science, vol. 7965, pp. 625–636 (2013)
- Kolmogorov and Zabin  Kolmogorov, V., Zabin, R.: What energy functions can be minimized via graph cuts? PAMI 26(2), 147–159 (2004)
- Komodakis et al.  Komodakis, N., Paragios, N., Tziritas, G.: MRF optimization via dual decomposition: Message-passing revisited. In: ICCV. pp. 1–8 (2007)
- Komodakis and Paragios  Komodakis, N., Paragios, N.: Beyond loose LP-relaxations: Optimizing MRFs by repairing cycles. In: ECCV. pp. 806–820 (2008)
- Komodakis and Tziritas  Komodakis, N., Tziritas, G.: Approximate labeling via graph cuts based on linear programming. PAMI 29(8), 1436–1453 (2007)
- Kumar  Kumar, M.P.: Rounding-based moves for metric labeling. In: NIPS. pp. 109–117 (2014)
- Kumar et al.  Kumar, M.P., Veksler, O., Torr, P.H.: Improved moves for truncated convex models. Journal of Machine Learning Research 12, 31–67 (Feb 2011)
- Kwisthout  Kwisthout, J.: Most probable explanations in Bayesian networks: Complexity and tractability. International Journal of Approximate Reasoning 52(9), 1452 – 1469 (2011)
- Kwisthout  Kwisthout, J.: Symbolic and Quantitative Approaches to Reasoning with Uncertainty: 12th European Conference, ECSQARU 2013, Utrecht, The Netherlands, July 8-10, 2013. Proceedings, chap. Structure Approximation of Most Probable Explanations in Bayesian Networks, pp. 340–351 (2013)
- Kwisthout  Kwisthout, J.: Tree-width and the computational complexity of MAP approximations in Bayesian networks. Journal of Artificial Intelligence Research pp. 699–720 (2015)
- Lauritzen  Lauritzen, S.L.: Graphical Models. No. 17 in Oxford Statistical Science Series, Oxford Science Publications (1998)
- Liu et al.  Liu, B., Gould, S., Koller, D.: Single image depth estimation from predicted semantic labels. In: CVPR. pp. 1253–1260 (2010)
- Orponen and Mannila  Orponen, P., Mannila, H.: On approximation preserving reductions: complete problems and robust measures. Technical Report (1987)
- Papadimitriou and Yannakakis  Papadimitriou, C.H., Yannakakis, M.: Optimization, approximation, and complexity classes. Journal of Computer and System Sciences 43(3), 425 – 440 (1991)
- Pearl  Pearl, J.: Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann Publishers Inc. (1988)
- Prusa and Werner [2015a] Prusa, D., Werner, T.: How hard is the lp relaxation of the potts min-sum labeling problem. In: Energy Minimization Methods in Computer Vision and Pattern Recognition (EMMCVPR). pp. 57–70 (2015a)
- Prusa and Werner [2015b] Prusa, D., Werner, T.: Universality of the local marginal polytope. PAMI 37(4), 898–904 (2015b)
- Ramalingam et al.  Ramalingam, S., Kohli, P., Alahari, K., Torr, P.H.: Exact inference in multi-label crfs with higher order cliques. In: CVPR. pp. 1–8. IEEE (2008)
- Ren et al.  Ren, X., Bo, L., Fox, D.: Rgb-(d) scene labeling: Features and algorithms. In: CVPR. pp. 2759–2766. IEEE (2012)
- Rother et al.  Rother, C., Kolmogorov, V., Lempitsky, V., Szummer, M.: Optimizing binary MRFs via extended roof duality. In: CVPR. pp. 1–8 (2007)
- Schlesinger  Schlesinger, D.: Exact solution of permuted submodular minsum problems. In: EMMCVPR. vol. 4679, pp. 28–38. Springer (2007)
- Schlesinger and Hlaváč  Schlesinger, M.I., Hlaváč, V.: Ten lectures on statistical and structural pattern recognition, Computational Imaging and Vision, vol. 24. Kluwer Academic Publishers, Dordrecht, The Netherlands (2002)
- Schraudolph  Schraudolph, N.: Polynomial-time exact inference in NP-hard binary MRFs via reweighted perfect matching. In: AISTATS. JMLR Proceedings, vol. 9, pp. 717–724 (2010)
- Schrijver  Schrijver, A.: A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory Series B(80), 346–355 (2000)
- Schwing and Urtasun  Schwing, A.G., Urtasun, R.: Efficient exact inference for 3d indoor scene understanding. In: ECCV, pp. 299–313. Springer (2012)
- Shekhovtsov et al.  Shekhovtsov, A., Swoboda, P., Savchynskyy, B.: Maximum persistency via iterative relaxed inference with graphical models. In: CVPR (2015)
- Shekhovtsov et al.  Shekhovtsov, A., Kohli, P., Rother, C.: Curvature prior for MRF-based segmentation and shape inpainting. In: DAGM/OAGM. pp. 41–51 (2012)
- Shih et al.  Shih, W.K., Wu, S., Kuo, Y.S.: Unifying maximum cut and minimum cut of a planar graph. IEEE Transactions on Computers 39(5), 694–697 (May 1990)
- Sontag et al.  Sontag, D., Choe, D.K., Li, Y.: Efficiently searching for frustrated cycles in MAP inference. In: Uncertainty in Artificial Intelligence (UAI). pp. 795–804 (2012)
- Szeliski et al.  Szeliski, R., Zabih, R., Scharstein, D., Veksler, O., Kolmogorov, V., Agarwala, A., Tappen, M., Rother, C.: A comparative study of energy minimization methods for Markov random fields with smoothness-based priors. PAMI 30(6), 1068–1080 (2008)
- Thapper and Živný  Thapper, J., Živný, S.: The power of linear programming for valued CSPs. In: Symposium on Foundations of Computer Science (FOCS). pp. 669–678 (2012)
- Thapper and Živný  Thapper, J., Živný, S.: The complexity of finite-valued CSPs. In: Symposium on the Theory of Computing (STOC). pp. 695–704 (2013)
- Topkis  Topkis, D.M.: Minimizing a submodular function on a lattice. Operations Research 26(2), 305–321 (1978)
- Veksler  Veksler, O.: Graph cut based optimization for MRFs with truncated convex priors. In: CVPR. pp. 1–8 (2007)
- Vineet et al.  Vineet, V., Warrell, J., Torr, P.H.S.: A tiered move-making algorithm for general pairwise MRFs. In: CVPR. pp. 1632–1639 (2012)
- Živný et al.  Živný, S., Cohen, D.A., Jeavons, P.G.: The expressive power of binary submodular functions. Discrete Applied Mathematics 157(15), 3347 – 3358 (2009)
- Werner  Werner, T.: A linear programming approach to max-sum problem: A review. PAMI 29(7), 1165–1179 (July 2007)
- Xu et al.  Xu, L., Jia, J., Matsushita, Y.: Motion detail preserving optical flow estimation. PAMI 34(9), 1744–1757 (2012)
- Yang and Ramanan  Yang, Y., Ramanan, D.: Articulated pose estimation with flexible mixtures-of-parts. In: CVPR. pp. 1385–1392 (2011)
- Živný et al.  Živný, S., Werner, T., Průša, D.a.: The Power of LP Relaxation for MAP Inference, pp. 19–42. The MIT Press, Cambridge, USA (December 2014)
Complexity of Discrete Energy Minimization Problems (ECCV’16 Appendix)
Mengtian Li Alexander Shekhovtsov Daniel Huber
Appendix 0.A Formal Proofs
Note for all proofs in this section, we assign integer values to Boolean functions: 0 for False and 1 for True.
0.a.1 General Case
We reduce from the following problem.
Problem 2 (, Section 8.3.2).
Boolean CNF formula with variables and each clause assuming exactly 3 variables; non-negative integer weights .
Truth assignment to the variables that either satisfies or assigns the trivial, all-true assignment.
W3SAT-triv is known to be exp-APX-complete . We use an AP-reduction from W3SAT-triv to prove the same completeness result for QPBO. The optimal value of W3SAT-triv is upper bounded by because the all-true assignment is feasible. The objective weight is represented in QPBO as unary terms . For every Boolean clause we construct a triple-wise term
This term takes the large value iff is not satisfied and otherwise. Further, the Boolean clause can be represented uniquely as a multi-linear cubic polynomial. For example, a clause can be represented as
Then we obtain similar representation with a single third order term and a second order multi-linear polynomial for :
where , is set to 1 if is empty, , and . We now apply the quadratization techniques  to . After introducing an auxiliary variable with , we observe the following identities:
In either case, substituting the cubic term in with the expression inside the min operator, we can have a unified quadratic form
where and is set to 1 if is empty. In both cases, the quadratic form takes the same optimal values as its cubic counterpart given the optimal assignment, i.e.,
but the transformation expands the original range of the cubic term from to and from to respectively for and . Therefore, the cost of the constructed instance of QPBO is bounded in the absolute value by and the number of added variables is exactly the number of clauses in . Clearly, this construction can be computed in polynomial time. Note that when approximation is used, this transformation is no longer exact (), as the optimality of the auxiliary variable cannot be guaranteed. However, it can be verified that under all possible assignments (ignoring the min operator) in either case, , which is the key for the reduction to be an approximation preserving (AP) one.
The construction above defines a mapping from any instance of W3SAT-triv () to an instance of QPBO (). The mapping from feasible solutions of () to that of is defined as follows: if , then let the mapped solution be the all true assignment, otherwise let the mapped solution be .
Now, we need to show that together with a constant is an AP-reduction. Let , , and to be short for , , , and respectively, where indicates the optimal solution. First, note that is always feasible for W3SAT-triv: either it satisfies or and therefore is the all-true assignment. In the first case, since every quadratic term is non-negative, we have
In the second case, by construction
Therefore, no matter which case .
Now for the optimal solution, if is satisfiable, then by construction . Recall from Definition 2.0, . For any instance , for any rational , and for any , if
If is not satisfiable, and . Thus, for any instance , for any rational , and for any ,
Therefore is an AP-reduction. Since W3SAT-triv is exp-APX-complete and QPBO is in exp-APX, we prove that QPBO is exp-APX-complete.
We create an AP-reduction from QPBO to -label energy minimization by setting up the unary and pairwise terms to discourage a labeling with the additional labels.
Denote QPBO as and -label energy minimization as . Given an instance , let be a large number such that all for all , . For example, we can let
We define the forward mapping from any to as follows:
, for , and ;
, for , and ;
, for , and ;
if either or for .
This setup has two properties:
if and only if the labeling includes labels that are not in ;
= , for any and .
Then we define the reverse mapping from any to to be
= , if ;
be any fixed feasible solution (e.g., all nodes are labeled as the first label), if .
Observe that in both cases, . For any instance , for any rational , and for any , if
Therefore is an AP-reduction. As QPBO is exp-APX-complete and all energy minimization problems are in exp-APX, we conclude that -label energy minimization is exp-APX-complete for .
The above construction also formally shows that the energy minimization problem can only become harder when having a larger labeling space, irrespective of the graph structure and the interaction type.
0.a.2 Planar Case
We create an AP-reduction from 3-label energy minimization to planar 3-label energy minimization by introducing polynomially many auxiliary nodes and edges.
The gadget-based reduction presented in Section 4, defines a forward mapping from any to . Let be the nodes added during the reduction, then . The two gadgets Split and UncrossCopy are used 4 times each to replace an edge crossing (point of intersection not at end points) with a planar representation (Figure 4), introducing 22 auxiliary nodes. Since the gadgets can be drawn arbitrarily small so that they are not intersecting with any other edges, we can repeatedly replace all edge crossings in with this representation. There can be up to edge crossings, and we have = . Given that the reduction adds only a polynomial number of auxiliary nodes, the forward mapping can be computed by a polynomial time algorithm.
This setup has two properties:
if and only if the labeling is the same as the partial labeling in restricting to nodes in in .
= , for any and .
Then we define the reverse mapping from any to to be
= , if ;
be any fixed feasible solution (e.g., all nodes are labeled as the first label), if .
Observe that in both cases, . For any instance , for any rational , and for any , if
Therefore is an AP-reduction. As 3-label energy minimization is exp-APX-complete (Corollary 3.1) and all energy minimization problems are in exp-APX, we conclude that planar 3-label energy minimization is exp-APX-complete.
The proof of Corollary 3.1 is graph structure independent. Therefore, the same proof applies here.
Appendix 0.B Relation to Bayesian Networks
There are substantial differences between results for Bayesian networks  and our result. Bayesian networks have a probability density function that factors according to a directed acyclic graph, \eg, as . Finding the MAP assignment (same as the most probable estimate (MPE)) in a Bayesian network is related to energy minimization (1) by letting . The product is transformed into the sum and so, \eg, factor corresponds to term .
The inapproximability result of Abdelbar and Hedetniemi  holds even when restricting to binary variables and factors of order three. However, [2, Section 6.1] count incoming edges of the network. For a factor , there are two, but the total number of variables it couples is three and therefore such a network does not correspond to QPBO. If one restricts to factors of at most two variables, \eg, , in a Bayesian network, then only tree-structured models can be represented, which are easily solvable.
In the other direction, representing pairwise energy (1) as a Bayesian network may require to use factors of order up to composed of conditional probabilities of the form with the number of variables depending on the vertex degrees. It is seen that while the problems in their most general forms are convertible, fixed-parameter classes (such as order and graph restrictions) differ significantly. In addition, the approximation ratio for probabilities translates to an absolute approximation (an additive bound) for energies. The next corollary of our main result illustrates this point.
It is NP-hard to approximate MAP in the value of probability (2) with any exponential ratio , where is polynomial.
Recall that the probability is given by the exponential map of the energy: . Assume for contradiction that there is a polynomial time algorithm that finds solution and a polynomial for such that
for all instances of the problem. Taking the logarithm,
Divide by , which, by definition of NPO is positive, we obtain
where we have used that is integer and positive and hence it is greater or equal to 1. Inequality (32) provides a polynomial ratio approximation for energy minimization. Since the latter is exp-APX-complete (Corollary 3.1), this contradicts existence of the polynomial algorithm , unless P = NP.
Note, this corollary provides a stronger inapproximability result for probabilities than was proven in .
Abdelbar and Hedetniemi  have shown also the following interesting facts. For Bayesian networks, the following problems are also APX-hard (in the value of probability):
Given the optimal solution, approximate the second best solution;
Given the optimal solution, approximate the optimal solution conditioned on changing the assignment of one variable.
Appendix 0.C Miscellaneous
This result is used in Section 5.2.
An -approximation implies an -approximation for -label energy minimization problems.
Observe that an instance of the energy minimization problem Eq. 1 is completely specified by a set of all unary terms and pairwise terms . This defines a natural encoding scheme to describe an instance of an energy minimization problem with binary alphabet . Assume each potential is encoded by digits, the input size
For an -approximation algorithm, the performance ratio
which implies an -approximation algorithm.