Clique Cuts in Weighted Constraint Satisfaction

. In integer programming, cut generation is crucial for improving the tightness of the linear relaxation of the problem. This is relevant for weighted constraint satisfaction problems (WCSPs) in which we use approximate dual feasible solutions to produce lower bounds during search. Here, we investigate using one class of cuts in WCSP: clique cuts. We show that clique cuts are likely to trigger suboptimal behavior in the specialized algorithms that are used in WCSP for generating dual bounds and show how these problems can be corrected. At the same time, the additional structure present in WCSP allows us to slightly generalize these cuts. Finally, we show that cliques exist in instances from several benchmark families and that exploiting them can lead to substantial performance improvement.


Introduction
The performance of branch and bound algorithms depends crucially on the quality of the dual bound produced during search.One of the techniques used in Integer Linear Programming (ILP) to improve dual bounds is cut generation.These work by adding to the LP relaxation constraints that are entailed by the integer program but not by the linear program.These eliminate optimal non-integral solutions and hence improve the dual bounds.One such class of cuts is clique cuts [4].These are quite powerful, as they strengthen the inference possible in the LP from n i=1 x i ≥ n/2 to n i=1 x i ≥ n − 1, so when they can be found, they can increase performance significantly.
These techniques are useful, but they are orthogonal to cut generation and can be further improved by it.However, adding cuts to dual bound reasoning in WCSP presents several challenges.The bounds used in WCSP are based on producing feasible -but often suboptimal -dual solutions of the LP relaxation.The algorithms that do so are weaker than LP solvers, but are significantly faster.In some extreme cases, a WCSP solver can solve an instance to optimality by search on several thousand nodes in shorter time than it would take to solve the linear relaxation of that instance.This speed comes at a price, as it is not easy to extend these algorithms to handle arbitrary linear constraints and to do so efficiently.In fact, we show that clique cuts reveal the worst cases for these bounds and, if used without care, may lead to no improvement whatsoever in the dual bound.We develop, however, a set of techniques and heuristics that prove successful in applying clique cuts to some families of instances.These families were cases where WCSP solving was much worse than applying ILP.With our contributions, the performance gap is closed significantly.

Background
Integer Linear Programming.An ILP has the general form where c, b are constant vectors, x is a vector of variables and A is a constant matrix, and all entries in c, b and A are integral.If we ignore the integrality constraint, the resulting problem is the linear relaxation of the original ILP.As a relaxation, any dual bound of the LP is a dual bound of the ILP.
The dual of an LP as given above is max b T y s.t.A T y ≤ c y ≥ 0 Any feasible solution of the dual gives a lower bound of the primal and the optima meet.
Solving an ILP exactly is typically done using branch and bound.At each node, the linear relaxation is solved and if the lower bound is greater than the cost of the incumbent, the node is closed.The linear relaxation can be strengthened using cuts, i.e., linear inequalities that are not entailed by the LP relaxation, but are entailed by the ILP.All linear combinations of inequalities are entailed by the LP.A particular method of deriving inequalities that are not entailed by the LP is strengthening, which derives a i x i ≥ b from a i x i ≥ b when b is not integral.A special case that we use here is deriving Weighted CSP .A WCSP is a tuple X , C, k where X is a set of discrete variables with associated domain D(X) for each variable X ∈ X , C is a set of cost functions with associated scope scope(c) ⊆ X for each c ∈ C and k is a distinguished "top" cost.For simplicity, we assume a single cost function per scope and write c S for the unique function with scope S. We also write c i for the unary cost function with scope {X i } and c ij for the binary cost function with scope {X i , X j }.A partial assignment τ is a mapping from each of a subset of X (denoted scope(τ )) to one of the values in its domain.A complete assignment is a partial assignment such that scope(τ ) = X .We write τ (S) for all partial assignments such that scope(τ ) = scope(S).Given a cost function c S and a partial assignment τ such that S ⊆ scope(τ ), c(τ | S ) ≥ 0 gives the cost of τ for c.If c(τ | S ) = k, we say that the constraint is violated.Given a complete assignment τ , its cost is c(τ ) = c S ∈C c(τ | S ).The objective of solving a WCSP is to find an assignment that minimizes c(τ ).It defines an NP-hard problem.
Dual (lower) bounds in WCSP are derived by applying equivalence preserving transformations (EPTs).Given two cost functions c S1 , c S2 with S 1 ⊂ S 2 , a partial assignment τ ∈ τ (S 1 ) and a value α, we can move cost α between c S1 and c S2 by updating c S1 (τ ) ← c S1 (τ )+α and c S2 (τ ) ← c S2 (τ )−α for all τ ∈ τ (S 2 ) such that τ | S1 = τ if this operation leaves no negative costs.This operation preserves the global cost of all assignments, so it is called an EPT.If α is positive, this operation is called a projection, otherwise it is an extension.They are written, respectively project(c S2 , c S1 , τ, α) and extend(c S1 , τ, c S2 , −α).For convenience, it is usual to assume the presence of a cost function with nullary scope, c ∅ .Since this function has nullary scope, its cost is used in every assignment of the WCSP and its value is a lower bound for the cost of any assignment of the WCSP (remember that all costs are non-negative).For any cost function c with non-empty scope, if α = min scope(τ )=scope(c) c(τ ), we can apply project(c, c ∅ , ∅, α).
The extend and project operations preserve equivalence even if α is chosen so that the operation creates negative costs.But it would violate the requirement that all costs are non-negative.This implies that a given EPT may be inadmissible because it creates negative costs, but is admissible as part of a set of EPTs, such that if they are all applied no negative costs remain.

Soft consistencies and linear programming.
There has been a long sequence of algorithms for computing a sequence of EPTs.For the results from the WCSP literature, an overview is given by Cooper et al [9].A parallel development of algorithms has happened under the name maximum a posteriori (MAP) inference for Markov random fields (MRF) [39], starting with [36].In most of the literature, the extension and projection operations are limited so that one of the cost functions involved has arity 1.We will also mostly limit our attention to this case here.In any case, it has been shown that all these algorithms find a feasible dual solution of the following linear relaxation of a WCSP/MRF: However, specialized algorithms aim to be faster than using a linear solver on the above problem.But solving this special form is as hard as solving an arbitrary LP [32], hence these specialized algorithms typically converge on suboptimal dual solutions.One particular condition to which some algorithms converge is virtual arc consistency: Definition 1.Given a WCSP C, let hard(C) be the CSP which has the same set of variables and domains as C and for each c S ∈ C has a hard constraint hard(c S ), which is satisfied by an assignment τ if and only if c S (τ ) = 0. C is virtually arc consistent if and only if hard(C) is arc consistent.
Among those algorithms that converge on virtual arc consistency is, not so surprisingly, VAC [9], to which we refer further in this paper.
Finally, we define EDAC, which is the default level of soft consistency enforced in the ToulBar2 solver.

Clique Cuts
An important class of cuts used by MIP solvers are clique cuts [4].Given a set S of 0/1 variables and the constraints This is done as follows.Given any triplet of distinct x i , x j , x k ∈ S, we sum the binary constraints involving these three variables to get 2x i +2x j +2x k ≥ 3 ≡ x i + x j + x k ≥ 3/2, which we strengthen to x i + x j + x k ≥ 2. We repeat this with m−tuples of variables and the (m − 1)-ary constraints from the previous step to generate m−ary constraints until m = |S|, which gives the above constraint.This is in contrast to the much weaker constraint which can be derived by linear combinations only (that is, the constraint that is entailed by the LP), which is The reason for the name of these cuts comes from the fact that the set S corresponds to a clique in a graphical representation of binary constraints of the IP.Specifically, we construct a graph with a vertex for each 0/1 variable of the IP and have edges between two vertices if their variables appear together in a binary constraint of the form x + y ≥ 1.From every clique in this graph we can derive a clique cut, i.e., a constraint of the form (1).
We can generalize this construction to have a vertex also for 1 − x (equivalently x) for every 0/1 variable x of the IP, connected to the vertex x.Then, there exists an edge between x and y for every constraint x+(1−y) ≥ 1 ≡ x−y ≥ 0 and an edge between x and y for every constraint In this case if we find a clique that contains both x and x, the clique cut requires that we must set all other variables in the clique to 1: If we find a clique that contains x, x, y, y, the problem is unsatisfiable.

Cliques in WCSPs
We apply this reasoning to get clique cuts in WCSPs.From a WCSP P with top k, we construct a graph G(P ) as follows: we have a vertex for v xi every variable x and every value i ∈ D(x).There exists an edge between two vertices v pv(p) , v qv(q) if there exists a cost function c pq such that c pq (v(p), v(q)) = k1 .This corresponds to the constraint (1 − x pv(p) ) + (1 − x qv(q) ) ≥ 1 in the LP relaxation.Now, given a clique S in G(P ), we can add the clique constraint v pv(p) ∈S (1− x pv(p) ) ≥ |S| − 1.In other words, the constraint requires at least n − 1 variables in the clique must get a value other than the one included in the clique.
Overlapping cliques.In the ILP case, we mentioned that the graph construction can be generalized to have vertices for both x and (1 − x) and an edge between them.In the WCSP case we already have vertices for different values of the same variable.We can ensure that each set of vertices corresponding to values of the same variable forms a clique.Then, the general case for a clique is that it may contain several values from each variable involved.We assume in the rest of this paper that this is the case.Then, given such a clique S, varsof (S) = {X p | ∃i.v pi ∈ S}.For every X p ∈ varsof (S) we write S(p) = {i | v pi ∈ S}.The constraint then requires that at least |varsof (S)| − 1 of the variables get a value outside their respective set S(p).
Despite this generalization, in order to simplify presentation, we will assume that every variable in the clique is a binary variable and S(p) = {1}.All results and algorithms are valid for the general case, with the caveat that when we use c i (0) (c i (1)) on the right hand side of an expression, it means min i / and when it appears on the left hand side, it means for all

Propagating clique constraints
We can encode a clique constraint with a non-uniform layered automaton (meaning an automaton where the transition function may differ in each layer) with two states q 0 , q 1 .The initial state is q 0 and both are accepting.Suppose |S| = n and the variables involved are x 1 , . . ., x n .Then the transition function at layer i is We can encode the automaton using the usual ternary construction [33,34].This ensures that EDAC deduces the optimal lower bound for each clique constraint, at least when viewed in isolation.As the constraint is invariant under reordering of the variables, we can use an ordering that agrees with the EDAC ordering and place each state variable Q i in between the variables x i and x i+1 in the EDAC ordering.This is sufficient to guarantee that EDAC propagates each clique constraint optimally [2].
However, this is not an attractive option in practice.The reformulation to automata introduces many variables for each clique constraint, something to which EDAC is quite sensitive.That is, depending on the vagaries of the algorithm, such as the order in which constraints of a variable are processed, it may derive a stronger or weaker lower bound, even though the formulation is locally optimal.
Combined with the issues that we describe later, this leads us to implement a specialized propagator for these constraints, which includes the reasoning performed by the softregular constraint [18] on this automaton.For completeness, we describe the propagation independent of the softregular constraint.This also sets the stage for the discussion of section 3.3.
Propagating clique constraints.For each clique constraint clq, we store a single integer a 0 which summarizes the effect on the constraint of all extensions and projections we have performed.This quantity is the cost of assigning all variables to 0.
We define the following transformation, u → clq which performs a set of extensions and projections through the clique constraint, getting the maximum increase in c ∅ and extending the minimum amount from unary costs in order to achieve this increase.
Let clq be the clique constraint, l 0 = c i (0)−max{c i (0)}, r 0 = max({c i (0)}\ max{c i (0)}) (the second largest c i (0), possibly equal to the largest), t = c i (0), t r = l 0 + r 0 and l 1 = min{t r − l 0 , min c i (1), a 0 }.Then u → clq comprises the following operations: -If the arity is 2 (resp.1), project a 0 to the (0, 0) tuple (resp.0 value) of the corresponding binary (resp.unary) cost function.Otherwise: We ignore here any binary costs.Since these are left untouched, they would contribute the same cost to any assignment before and after the EPT.
Suppose n − 1 variables are assigned 0 and that x i = 1.The cost of this assignment is c i (1) + j =i c j (0).In the reformulated problem, the cost of the assignment is l 0 + l 1 from c ∅ , c i (1) + t r − l 0 − l 1 − min(c i (0), r 0 ) from the unary cost of x i = 1, and j =i max(0, c j (0) − r 0 ) from the unary costs of x j = 0 for j = i.This sums to c i (1) + t r − min(c i (0), r 0 ) + j =i max(0, c j (0) − r 0 ).
If max c i (0) > r 0 , there exists a unique x k for which c k (0) = max c i (0).Then min(c i (0), r 0 ) simplifies to c i (0) for all i = k and to r 0 for i = k, while . As l 0 is the sum of all c j (0) except for c k (0), that works out to c 1 (1) + j =i c i (0), equivalent to the cost in the original problem.
Finally, assume all n variables are assigned 0, the cost of the assignment is We have t−t r = max c i (0)−r 0 , which is exactly the cost left in c k (0) if max c i (0) > r 0 and 0 otherwise.In either case the cost remains the same before and after the transformation, as long as a 0 is later projected to c ∅ .As all variables are assigned 0, the cost a 0 is indeed used by projecting to a lower arity cost function, so the cost in the reformulated problem is the same as in the original problem.
In general, we apply u → clq after node consistency has been enforced.Therefore, for each variable, either c i (0) = 0 or c i (1) = 0 and so if min c i (1) > 0, it has to be that t − l 0 = max c i (0) = 0.This means that either l 0 or l 1 will be non-zero.But unary costs change non-monotonically as other constraints move costs through the variable of the clique, so it is possible for both to occur at different times in the lifetime of the same constraint.

Issues with Virtual Arc Consistency.
Using clique constraints to improve lower bounds computed by VAC or any algorithm that converges to an arc consistent state is problematic.This includes algorithms such as MPLP [17,38,37], TRW-S [23] and other algorithms from the MRF community.We will show that the problem is that all these algorithms can only improve the lower bound by sequences of EPTs, but it is required to use sets of EPTs to fully exploit clique constraints.
As a hard constraint, the clique constraint is redundant, not only logically, but also in terms of propagation.Indeed, suppose a clique S contains values from three variables x, y and z, that the pairwise constraints are arc consistent, and let d ∈ D(y) such that v yd ∈ S and t xy , t yz be the supports of y = d in the corresponding binary constraints.Since t xy [x] and t yz [z] are values that may not be part of the clique, they are consistent with each other in the clique constraint and hence t xyz = t xy ∪ t yz is a support for all three variables simultaneously.We can extend this reasoning to an arbitrary number of variables, hence we can get global supports from pairwise supports.
The fact that clique constraints add no propagation strength to hard(C) means that adding clique constraints after VAC propagation will have no effect.Indeed, VAC can only improve the lower bound as long as hard(C) is arc inconsistent.Since the clique constraint is propagation redundant, if hard(C) is arc consistent, it will remain so after adding the clique constraint.
Empirically, we have observed the same is often true after EDAC, even though it does not necessarily converge to a virtually arc consistent state.Moreover, even if the clique constraint exists before we enforce VAC, the fact that VAC does not have a unique fixpoint means that we cannot predict whether the fixpoint that it does reach will use the clique constraint optimally.Hence, we need to devise a method to exploit clique constraints in a virtually arc consistent problem. 1. extend(x, 0, xy, 1/2) 2. extend(x, 0, xz, 1/2) 3. extend(z, 0, yz, 1/2) 4. project(xy, y, 1, 1/2) 5. project(xz, z, 1, 1/2) 6. project(yz, y, 1, 1/2) 7. project0(y, 1) 8. project0(z, 1/2) The reformulated problem has c xy (1, 1) = c yz (1, 1) = c xz (1, 1) = k and c xy (0, 0) = c yz (0, 0) = c xz (0, 0) = 1/2.Note that actually running VAC would perform a more convoluted series of moves: in the first iteration, a conflict involves only two variables, say x and y.That allows it to move 1 unit of cost from x = 0 to y = 1, and to project cost 1 to c ∅ .In the next iteration, the conflict involves all 3 variables and it moves 1/2 a unit of cost from z = 0 to x = 1 and from there to y = 0 and another 1/2 a unit directly from z = 0 to y = 1, projecting another 1/2 to c ∅ .
Since this reformulated problem is VAC, adding a clique constraint will do nothing, but solving the linear relaxation detects that we can improve the lower bound by the following set of operations 2 : More generally, we can derive a specific method for propagating cliques in virtually arc consistent instances by extending our reasoning to binary costs.In the following, let n = |S|.Since (1−x i1 ) = x i0 for binary domains, the constraint can be written either as xi1∈S x i0 ≥ n−1 or equivalently xi1∈S x i1 ≤ 1.Thus, either n−1 or n variables must be assigned 0, meaning either n 2 or n−1 2 binary 0, 0 tuples will be used.This means xi1,xj1∈S,i<j These constraints can be further strengthened by observing that if we assign x i = 1, then none of the binary tuples c ij (0, 0) for j = i are used.Thus we can treat these binary tuples as blocks, one for each variable, at least n − 1 of which have to be used.This is captured by the following system: We can incorporate (3) into propagation of the clique constraint.Let base i = j<k∈[1,n]\{i} c jk (0, 0) for all i ∈ [1, n], base = min{base i | i ∈ [1, n} and total = j<k∈[1,n] c jk (0, 0).We define the binary-to-clique transform, denoted as b → clq as the transformation which performs the following operations: 1. Add base to c ∅ 2. Set c ij (0, 0) = 0 for every binary constraint ij in the clique.3. Add cost total − base to a 0 4. For every variable i, add cost comp i = base i − base to c i (1).Proposition 2. The b → clq transform is an EPT.
Proof.Consider an arbitrary feasible solution of the subproblem.Since it is feasible, at least n − 1 variables are assigned 0, so we only need to consider the cases where n or n − 1 variables are 0.
Assume all n variables are assigned 0. The cost of this assignment in the original problem is total = j<k∈[1,n] c jk (0, 0).In the reformulated problem, the clique constraint entails cost a 0 = total − base, because we assign all zeroes.Together with the cost base projected to c ∅ , it gives total in the reformulated problem as well.
Assume exactly n − 1 variables are assigned 0 and that the variable assigned to 1 is X i .The cost of this assignment is base i = j<k∈[1,n]\{i} c jk (0, 0).In the reformulated problem, the cost of the assignment is base from c ∅ and base i −base from c i (1), giving base i , identical to the original problem.This transform involves a higher-order transformation, so it is tempting to think that it is stronger than the linear relaxation.Unfortunately, this is not the case.
Proposition 3. The b → clq transform can be expanded to a set of EPTs.

Proof (Sketch).
There exist already positive costs on the (0,0) tuple of binary cost functions.If the 1 value of one unary cost function has positive cost, we can extend it to the binary cost function and project it to the 0 value on the other variable involved.We can do this even if no such positive cost exists and create a temporary negative cost.However, we can now apply the u → clq transform, because we have positive costs on the 0 value of the unary cost functions.This projects costs back to the 1 value of the unary cost functions involved, hence covering the deficit created in the first step.
Convergence.As was observed in [28], EDAC may not converge when cost functions of higher arity exist.VAC is better behaved, but it may converge only as the number of iteration grows to infinity.It is straightforward to see that the presence of clique constraints does not raise any such issues: every time either the u → clq or b → clq transform is applied, the cost c ∅ is increased.As c ∅ cannot be increased past the global optimum, this means that application of these rules converges.Moreover, c ∅ is increased by an integer, so the number of iterations is also bounded by the cost of the global optimum.

Clique selection and ordering heuristic
Finding Cliques We implement detection of cliques as a preprocessing step.We construct a graph as described previously: there exists a vertex for each variablevalue pair and an edge between two vertices if c ∅ + c p (i) + c q (j) + c pq (i, j) ≥ k or if they represent two values of the same variable.We then use the Bron-Kerbosch algorithm [6] with degeneracy ordering to generate a set of cliques.In some cases, the number of cliques can be overwhelming, so we place a limit on the maximum number of cliques generated per top-level branch (which should roughly correspond to the number of cliques that contain a single vertex), as well as a global limit on the total number of cliques.We discard cliques S for which |varsof (S)| < 3, as cliques over 2 variables are simply subsets of binary cost functions and can propagate no better.
Selection and Ordering.The order of EPTs may have a large impact on the quality of the resulting lower bounds.
The above problem does not, of course, manifest itself when actually solving the linear relaxation of the problem.It is, however, an inherent limitation of algorithms like EDAC, which have no flexibility to process constraints in a different order in different passes.As we explained above, a more flexible algorithm like VAC would not help either, as clique constraints are redundant with respect to propagation on the hard problem.Therefore, our only recourse is to select an order of propagation before performing the actual propagation.We can choose this order either before search or dynamically at each node of the search.Here, we chose to select the order just once before search begins.
We choose a greedy heuristic to select and order the initial clique constraint propagation.For that, we collect a bounded number of potential clique constraints, as described previously.We then use the classical Chvatal's set covering heuristic [7] to find the best clique which maximizes the product of current arity and current lower bound increase (by simulating the effect of its unary-toclique transform).We repeat this selection process followed by the corresponding unary-to-clique transform until all the remaining cliques do not increase the lower bound or have all their variables covered by another already-selected clique.Ties are broken by a lexicographic ordering on the scope of the cliques.We keep also all cliques found of arity 3 because they are natively managed by the ToulBar2 solver as ternary/triangle cost functions with dedicated EDAC soft arc consistency [35,31].

Related Work
The most related work is that of Atamtürk et al [4], who explore adding clique cuts in MIP solvers, not only during preprocessing but also during search.As we descend the search tree, more tuples become effectively hard, creating more cliques.This remains a future direction for us.Khemmoudj and Bennaceur [22] studied the use of binary cliques to improve lower bounds.These are used to obtain better approximations than EDAC to the optimum of the LP relaxation of a MaxCSP.In contrast to our work here, the strength of the LP relaxation is not improved.
Sontag et al [38] strengthen the LP relaxation by adding higher order cost functions, which may eventually make the relaxation as strong as the polytope of the integer program, at the cost of potentially making the LP explonentially larger.Later, Sontag et al [37] considered adding cuts that correspond to frustrated cycles in the graph, which is more efficient but less powerful.
Cliques can also be handled efficiently in settings outside of linear relaxations.For example, Narodytska and Bacchus [30] proposed a method for MaxSAT which applies max-resolution on cores extracted from the instance.This method is complete, i.e., will eventually produce the optimum of an instance.This method can perform equivalent reasoning to a clique cut in a polynomial number of steps and with cores that can be discovered in polynomial time.
On the subject of clique detection, Dixon [13], Ansotegui [3] and Biere et al [5] showed several techniques that may uncover cliques that are not explicitly present in the microstructure (called NAND graph in SAT when restricted to binary clauses), using both syntactic and semantic (propagation-based) information.1. Clique generation process: number of instances per benchmark category followed by maximum domain size (d), mean number of variables (n), cost functions (e), graph vertices, graph edges, cliques found, and selected cliques, followed by mean arity of selected cliques and CPU time in seconds to find and select cliques.A limit on the maximum number of cliques found was set to 10, 000.
We have implemented the clique generation and clique constraint propagation inside toulbar2 (version 0.9.8), an open-source WCSP solver in C++.Among the various benchmarks from [19] (available in LP, WCNF, WCSP, UAI, and MiniZinc formats) where cplex reports that clique cuts applied, we chose four problem categories, combinatorial auctions Auction/path, Auction/sched, maximum clique MaxClique, and satellite management SPOT5, a total of 252 instances, having binary forbidden tuples and initial unary cost functions such that the unary-to-clique transform increases the lower bound in preprocessing.The first three categories have Boolean domains, whereas SPOT5 has maximum domain size of 4. For each category, we report in Tab.1 the mean value of the size of the problem, the number of cliques found, the number of selected cliques among them and their arity, and the CPU time to find and select the cliques.We limit the maximum number of cliques found to 10,000 in order to control the computation time.The largest CPU time was 11.61 seconds for MaxClique/c-fat200-5 (n = 200 variables, e = 11, 627 cost functions, and 10,000 selected cliques of arity 3).The arity of selected cliques varies from 3 to 67 (MaxClique/san1000).
We compare solving time to find and prove optimality for toulbar2 exploiting cliques (denoted as toulbar2 clq ) against the original code without cliques (both using default options, including hybrid best-first search [1]), and against the CP solver gecode 3 , the MaxSAT solvers maxhs 2.51 [11,10] 2. Number of solved instances and mean solving computation time in seconds, for toulbar2 solver without using cliques compared to toulbar2 clq exploiting cliques, cplex, maxhs, eva and gecode.toulbar2 clq solving time does not take into account clique generation time (see Tab. 1).A CPU time limit of 1 hour was used for unsolved instances for reporting mean solving times.[30], and IBM-ILOG cplex 12.6.0.0 (using a direct encoding [19] and parameters EPAGAP, EPGAP, and EPINT set to zero to avoid premature stop).All computations were performed on a single core of AMD Opteron 6176 at 2.3 GHz and 8 GB of RAM with a 1-hour CPU time limit4 .In Tab. 2, we give the number of solved instances within a 1-hour CPU time limit.Among 252 instances, cplex solved 224 instances, maxhs 216, toulbar2 clq 213, eva 208, toulbar2 205, and gecode 137.For Auction, toulbar2 clq is more than two orders of magnitude faster than toulbar2, gecode (which cannot solve 57 Auction/path instances in 1 hour) and eva on Auction/path (cat paths 60 170 0005 instance unsolved in 1 hour).Still toulbar2 clq is one order of magnitude slower than cplex and maxhs.On MaxClique (resp.SPOT5), toulbar2 clq solved 6 (resp.2) more instances than without using cliques.For example, toulbar2 clq solved MaxClique/MANN a45 in 57.9 seconds (taking 0.24 supplementary seconds to generate the 330 selected cliques) whereas without using cliques it could not finish in 1 hour (maxhs took 28 seconds, cplex 93 sec., and eva and gecode could not solve in 1 hour).SPOT5/404 was solved in 6 seconds using 32 cliques and 88.7 seconds without using cliques (cplex took 0.02 seconds, eva 0.07 sec., maxhs 8 sec., and gecode could not solve in 1 hour).
Finally, we summarize the evolution of lower and upper bounds for each solver over all instances in Figure 1.Specifically, for each instance I we normalize all costs as follows: the initial lower bound produced by toulbar2 is 0; the bestbut potentially suboptimal -solution found by any solver is 1; the worst solution is 2.This normalization is invariant to translation and scaling.Additionally, we simply normalize time from 0 to 1, corresponding to 1 hour.A point x, y on the lower bound line for solver S in Figure 1 means that after normalized runtime x, solver S has proved on average over all instances a normalized lower bound of y and similarly for the upper bound.We show both the upper and lower bound curves for all solvers evaluated here, except gecode which produces no meaningful lower bound before it proves optimality.We observed that using cliques, it mainly improves lower bounds for toulbar2.For these benchmarks, cplex got the best lower bound curve and toulbar2 clq the best upper bound curve.

Conclusions
We have shown how the idea of clique cut originated from MIP can be exploited in the context of WCSPs.Using these cuts in WCSP is significantly more complicated than in integer programming, owing to a large degree to the fact that the fast specialized algorithms that are used in place of solving the linear relaxation have weaknesses which seem to be particularly exposed by clique constraints.To address these shortcomings, we provide two specific EPTs, unary-to-clique and binary-to-clique, which propagate isolated clique constraints optimally, even if costs are hidden in binary cost functions.We then gave an algorithm to greedily select and order a subset of potential cliques in preprocessing and do the propagation on these selected cliques during search.In an experimental evaluation, we have obtained large improvements over the existing complete solver ToulBar2 on several benchmarks, significantly reducing the gap to state-of-the-art solver cplex.

Definition 2 .
A WCSP C is node consistent (NC) if for every cost function c ∈ C with |scope(c)| = 1, there exists τ ∈ τ (c) with c(τ ) = 0 and for all τ

Fig. 1 .
Fig. 1.Normalized lower and upper bounds on 252 instances as time passes.
and eva 500a