kał, F.
Proc Natl Acad Sci U S A. 2007 June 19; 104(25): 10318–10323. Published online 2007 June 13. doi: 10.1073/pnas.0703685104. | PMCID: PMC1965511 |
The optimization (maximize the number of satisfied constraints) and counting (count the number of satisfying assignments) versions of this problems are defined straightforwardly. It is also convenient to represent CSP instances as factor graphs (2), i.e., bipartite graphs with vertex sets [N], [M] including an edge between node i [N] and a [M] if, and only if, the ith variable is involved in the ath constraint (compare Fig. 1). This representation allows one to define naturally a distance d(i, j) between variable nodes.
Ensembles of random CSPs (rCSPs) were introduced (see e.g., ref. 3) with the hope of discovering generic mathematical phenomena that could be exploited in the design of efficient algorithms. Indeed several search heuristics, such as Walk-SAT (4) and “myopic” algorithms (5) have been successfully analyzed and optimized over rCSP ensembles. The most spectacular advance in this direction has probably been the introduction of a new and powerful message passing algorithm (survey propagation, SP) (6). The original justification for SP was based on the (nonrigorous) cavity method from spin glass theory. Subsequent work proved that standard message passing algorithms (such as belief propagation, BP) can indeed be useful for some CSPs (7–9). Nevertheless, the fundamental reason for the (empirical) superiority of SP in this context remains to be understood and is a major open problem in the field. Building on a refined picture of the solution set of rCSP, this article provides a possible (and testable) explanation. We consider two ensembles that have attracted the majority of work in the field: (i) random k-SAT: each k-SAT instance with N variables and M = Nα clauses is considered with the same probability; (ii) q-COL on random graphs: the graph G is uniformly random among the ones over N vertices, with uniform degree l (the number of constraints is therefore M = Nl/2).
It is well known that rCSPs may undergo phase transitions as the number of constraints per variable α is varied.g The best known of such phase transitions is the SAT-UNSAT one: as α crosses a critical value αs(k) (that can, in principle, depend on N), the instances pass from being satisfiable to unsatisfiable with high probabilityh (10). For k-SAT, it is known that αs(2) = 1. A conjecture based on the cavity method was put forward in ref. 6 for all k ≥ 3 that implied in particular the values presented in Table 1 and αs(k) = 2k log 2 − (1 + log 2)/2 + O (2−k) for large k (11). Subsequently, it was proved that αs(k) = 2k log 2 − O(k), confirming this asymptotic behavior (12). An analogous conjecture for q-COL was proposed in ref. 13 yielding, for regular random graphs (14), the values reported in Table 1 and ls(q) = 2q log q − log q − 1 + o(1) for large q [according to our convention, random graphs are with high probability uncolorable if l ≥ ls(q)]. It was proved in refs. 12 and 15 that ls(q) = 2q log q − O(log q).
Even more interesting and challenging are phase transitions in the structure of the set N of solutions of rCSP's (“structural” phase transitions). Assuming the existence of solutions, a convenient way of describing is to introduce the uniform measure over solutions μ(x):
We shall now introduce a few possible “global” characterizations of the measure μ. Each one of these properties has its counterpart in the theory of Gibbs measures, and we shall partially adopt that terminology here (17).
To define the first of such characterizations, we let i [N] be a uniformly random variable index, denote as x the vector of variables whose distance from i is at least , and by μ(xi|x) the marginal distribution of xi given x. Then we say that the measure (Eq. 1) satisfies the uniqueness condition if for any given i [N],
Notice that the uniqueness threshold is far below the SAT-UNSAT threshold. Furthermore, several empirical studies (19, 20) pointed out that BP [as well as many other heuristics (4, 5)] is effective up to much larger values of the clause density. In a remarkable series of papers (6, 21), statistical physicists argued that a second structural phase transition is more relevant than the uniqueness one. Following this literature, we shall refer to this as the “dynamic phase transition” and denote the corresponding threshold as αd(k) [or ld(q)]. To precise this notion, we provide here two alternative formulations corresponding to two distinct intuitions. According to the first one, above αd(k) the variables (x1, …, xN) become globally correlated under μ. The criterion in 2 is replaced by one in which far apart variables x are themselves sampled from μ (“extremality” condition):
According to the second intuition, above αd(k), the measure (Eq. 1) decomposes into a large number of disconnected “clusters.” This means that there exists a partition {An}n=1 … of N (depending on the instance) such that: (i) one cannot find n such that μ(An) → 1; (ii) denoting by ϵA the set of configurations x N\A whose Hamming distance from A is at most Nϵ, we have μ(ϵAn)/μ(An)(1 − μ(An)) → 0 exponentially fast in N for all n and ϵ small enough. Notice that the measure μ can be decomposed as:
The above ideas are obviously related to the performance of algorithms. For instance, the correlation decay condition in Eq. 3 is likely to be sufficient for approximate correctness of BP on random formulae. Also, the existence of partitions as above implies exponential slowing down in a large class of Monte Carlo Markov chain sampling algorithms.i
Recently, some important rigorous results were obtained supporting this picture (22, 23). However, even at the heuristic level, several crucial questions remain open. The most important concern the distribution of the weights {wn}: are they tightly concentrated (on an appropriate scale) or not? A (somewhat surprisingly) related question is: can the absence of decorrelation above αd(k) be detected by probing a subset of variables bounded in N?
SP (6) can be thought as an inference algorithm for a modified graphical model that gives unit weight to each cluster (20, 24), thus tilting the original measure toward small clusters. The resulting performances will strongly depend on the distribution of the cluster sizes wn. Further, under the tilted measure, αd(k) is underestimated because small clusters have a larger impact. The correct value was never determined (but see ref. 16 for coloring). Mézard et al. (25) undertook the technically challenging task of determining the cluster size distribution without, however, clarifying several of its properties.
In this article we address these issues and unveil at least two unexpected phenomena. Our results are described in Results and Discussion and summarized in Fig. 2. Finally, we discuss the connection with the performances of SP. Some technical details of the calculation are collected in Cavity Formalism, Tree Reconstruction, and SP.
The formulation in terms of extremality condition (see Eq. 3) allows for an heuristic calculation of the dynamic threshold αd(k). Previous attempts were based instead on the cavity method, which is an heuristic implementation of the definition in terms of pure state decomposition (see Eq. 4). Generalizing the results of ref. 16, it is possible to show that the two calculations provide identical results. However, the first one is technically simpler and under much better control. As mentioned above we obtain, for all k ≥ 4 a value of αd(k) larger than the one quoted in refs. 6 and 11.
Further we determined the distribution of cluster sizes wn, thus unveiling a third “condensation” phase transition at αc(k) ≥ αd(k) (strict inequality holds for k ≥ 4 in SAT and q ≥ 4 in coloring, see below). For α < αc(k) the weights wn concentrate on a logarithmic scale [namely, −log wn is θ(N) with θ(N1/2) fluctuations]. Roughly speaking, the measure is evenly split among an exponential number of clusters.
For α > αc(k) [and < αs(k)] the measure is carried by a subexponential number of clusters. More precisely, the ordered sequence {wn} converges to a well known Poisson-Dirichlet process {wn}, first recognized in the spin glass context by Ruelle (26). This is defined by wn = xn/Σxn, where xn > 0 are the points of a Poisson process with rate x−1−m(α) and m(α) (0, 1). This picture is known in spin glass theory as one-step replica symmetry breaking (1RSB) and has been proven in ref. 27 for some special models. The Parisi 1RSB parameter m(α) is monotonically decreasing from 1 to 0 when α increases from αc(k) to αs(k) (see Fig. 3).
Remarkably, the condensation phase transition is also linked to an appropriate notion of correlation decay. If i(1), …, i(n) [N] are uniformly random variable indices, then, for α < αc(k) and any fixed n:
Dynamic Phase Transition and Gibbs Measure Extremality. A rigorous calculation of αd(k) along any of the two definitions provided above (compare Eqs. 3 and 4) remains an open problem. Each of the two approaches has, however, an heuristic implementation that we shall now describe. It can be proved that the two calculations yield equal results as further discussed in the last section.
The approach based on the extremality condition in Eq. 3 relies on an easy-to-state assumption and typically provides a more precise estimate. We begin by observing that, because of the Markov structure of μ, it is sufficient for Eq. 3 to hold that the same condition is verified by the correlation between xi and the set of variables at distance exactly from i, that we shall keep denoting as x. The idea is then to consider a large yet finite neighborhood of i. Given ≥ , the factor graph neighborhood of radius around i converges in distribution to the radius- neighborhood of the root in a well defined random tree factor graph T.
For coloring of random regular graphs, the correct limiting tree model T is coloring on the infinite l-regular tree. For random k-SAT, T is defined by the following construction. Start from the root variable node and connect it to l new function nodes (clauses), l being a Poisson random variable of mean kα. Connect each of these function nodes with k − 1 new variables and repeat. The resulting tree is infinite with nonvanishing probability if α > 1/k(k− 1). Associate a formula to this graph in the usual way, with each variable occurrence being negated independently with probability 1/2.
The basic assumption within the first approach is that the extremality condition in Eq. 3 can be checked on the correlation between the root and generation- variables in the tree model. On the tree, μ is defined to be a translation invariant Gibbs measure (17) associated to the infinite factor graphj T (which provides a specification). The correlation between the root and generation- variables can be computed through a recursive procedure (defining a sequence of distributions , see Eq. 15 below). The recursion can be efficiently implemented numerically yielding the values presented in Table 1 for k (resp. q) = 4, 5, 6. For large k (resp. q) one can formally expand the equations on P and obtain:
The second approach to the determination of αd(k) is based on the “cavity method” (6, 25). It begins by assuming a decomposition in pure states of the form 4 with two crucial properties: (i) if we denote by Wn the size of the nth cluster (and hence wn = Wn/Σ Wn), then the number of clusters of size Wn = eNs grows approximately as eNΣ(s); (ii) for each single-cluster measure μn, a correlation decay condition of the form 3 holds.
The approach aims at determining the rate function Σ(s), complexity: the result is expressed in terms of the solution of a distributional fixed point equation. For the sake of simplicity we describe here the simplest possible scenariok resulting from such a calculation (compare Fig. 4). For α < αd,−∞(k) the cavity fixed point equation does not admit any solution: no clusters are present. At αd,−∞(k) a solution appears, eventually yielding, for α > αd,+ a non-negative complexity Σ(s) for some values of s +. The maximum and minimum such values will be denoted by smax and smin. At a strictly larger value αd,0(k), Σ(s) develops a stationary point (local maximum). It turns out that αd,0(k) coincides with the threshold computed in refs. 6, 11, and 14. In particular, αd,0(4) ≈ 8.297, αd,0(5) ≈ 16.12, αd,0(6) ≈ 30.50 and ld,0(4) = 9, ld,0(5) = 13, ld,0(6) = 17. For large k (resp. q), αd,0(k) admits the same expansion as in Eqs. 6 and 7 with γd,0 = 1 − log 2. However, up to the larger value αd(k), the appearance of clusters is irrelevant from the point of view of μ. In fact, within the cavity method it can be shown that eN[s+Σ(s)] remains exponentially smaller than the total number of solutions Z: most of the solutions are in a single cluster. The value αd(k) is determined by the appearance of a point s with Σ′(s) = −1 on the complexity curve. Correspondingly, one has Z ≈ eN[Σ(s)+s]: most of the solutions are comprised in clusters of size about eNs. The entropy per variable = limN→∞ N−1 log Z remains analytic at αd(k).
Condensation Phase Transition. As α increases above αd, Σ(s) decreases: clusters of highly correlated solutions may no longer satisfy the newly added constraints. In Fig. 5Inset, we show the α dependency of Σ(s) for 4-SAT. In the large k limit, with α = ρ2k we get Σ(s) = log 2 − ρ − log 2 e−kρ + O(2−k), and s = log 2e−kρ + O(2−k).
The condensation point αc(k) is the value of α such that Σ(s) vanishes: above αc(k), most of the measure is contained in a subexponential number of large clustersl. Our estimates for αc(k) are presented in Table 1 [see also Fig. 4 for Σ(s) in the six-coloring] while in the large-k limit we obtain αc(k) = 2k log 2 − 3/2 log 2 + O(2−k) [recall that the SAT-UNSAT transition is at αs(k) = 2k log 2 − (1 + log 2)/2 + O(2−k)] and lc(q) = 2q log q − log q − 2 log 2 + o(1) [with the COL-UNCOL transition at ls(q) = 2q log q − log q − 1 + o(1)]. Technically, the size of dominating clusters is found by maximizing Σ(s) + s over the s interval on which Σ(s) ≥ 0. For α [αc(k), αs(k)], the maximum is reached at smax, with Σ(smax) = 0 yielding = smax. It turns out that the solutions are comprised within a finite number of clusters, with entropy eNsmax+Δ, where Δ = θ(1). The shifts Δ are asymptotically distributed according to a Poisson point process of rate e−m(α)Δ with m(α) = −Σ′(smax). This leads to the Poisson Dirichlet distribution of weights discussed above. Finally, the entropy per variable is nonanalytic at αc(k).
Let us conclude by stressing two points. First, we avoided the 3-SAT and three-coloring cases. These cases [as well as the three-coloring on Erdös-Rényi graphs (25)] are particular in that the dynamic transition point αd is determined by a local instability [a Kesten-Stigum (28, 29) condition, see also ref. 21], yielding αd(3) ≈ 3.86 and ld(3) = 6 (the case l = 5, q = 3 being marginal). Related to this is the fact that αc = αd: throughout the clustered phase, the measure is dominated by a few large clusters [technically, Σ(s) < 0 for all α > αd]. Second, we did not check the local stability of the 1RSB calculation. By analogy with ref. 30, we expect that an instability can modify the curve Σ(s) but not the values of αd and αc.
Algorithmic Implications. Two message passing algorithms were studied extensively on random k-SAT: BP and SP (mixed strategies were also considered in refs. 19 and 20). A BP message νu→v(x) between nodes u and v on the factor graph is usually interpreted as the marginal distribution of xu (or xv) in a modified graphical model. An SP message is instead a distribution over such marginals Pu→v(ν). The empirical superiority of SP is usually attributed to the existence of clusters (6): the distribution Pu→v(ν) is a survey of the marginal distribution of xu over the clusters. As a consequence, according to the standard wisdom, SP should outperform BP for α > αd(k).
This picture, however, has several problems. Let us list two of them. First, it seems that essentially local algorithms (such as message passing ones) should be sensitive only to correlations among finite subsets of the variablesm, and these remain bounded up to the condensation transition. Recall in fact that the extremality condition in Eq. 3 involves a number of variables unbounded in N, while the weaker in Eq. 5 is satisfied up to αc(k).
Second, it would be meaningful to weight uniformly the solutions when computing the surveys Pu→v(ν). In the cavity method jargon, this corresponds to using a 1RSB Parisi parameter r = 1 instead of r = 0 as is done in ref. 6. It is a simple algebraic fact of the cavity formalism that for r = 1 the means of the SP surveys satisfy the BP equations. Since the means are the most important statistics used by SP to find a solution, BP should perform roughly as SP. Both arguments suggest that BP should perform well up to the condensation point αc(k). We tested this conclusion on 4-SAT at α = 9.5 [αd(4), αc(4)], through the following numerical experiment (compare Fig. 6). (i) Run BP for tmax iterations. (ii) Compute the BP estimates νi(x) for the single-bit marginals and choose the one with largest bias. (iii) Fix xi = 0 or 1 with probabilities νi(0), νi(1). (iv) Reduce the formula accordingly (i.e., eliminate the constraints satisfied by the assignment of xi and reduce the ones violated). This cycle is repeated until a solution is found or a contradiction is encountered. If the marginals νi were correct, this procedure would provide a satisfying assignment sampled uniformly from μ. In fact, we found a solution with finite probability (≈0.4), despite the fact that α > αd(4). The experiment was repeated at α = 9 with a similar fraction of successes.
Above the condensation transition, correlations become too strong and the BP fixed point no longer describes the measure μ. Indeed the same algorithm proved unsuccessful at α = 9.7 [αc(4), αs(4)]. As mentioned above, SP can be regarded as an inference algorithm in a modified graphical model that weights preferentially small clusters. More precisely, it selects clusters of size eN with maximizing the complexity Σ(s). With respect to the new measure, the weak correlation condition in Eq. 5 still holds and allows one to perform inference by message passing.
Within the cavity formalism, the optimal choice would be to take r ≈ m(α) [0, 1). Any parameter corresponding to a non-negative complexity r [0, m(α)] should, however, give good results. SP corresponds to the choice r = 0 that has some definite computational advantages, since messages have a compact representation in this case (they are real numbers).
This section provides some technical elements of our computation. The reader not familiar with this topic should consult refs. 6, 11, 25, and 32 for a more extensive introduction. The expert reader will find a new derivation and some hints of how we overcame technical difficulties.
On a tree factor graph, the marginals of μ, Eq. 1 can be computed recursively. The edge of the factor graph from variable node i to constraint node a (respectively from a to i) carries “message” i→a (a→i), a probability measure on defined as the marginal of xi in the modified graphical model obtained by deleting constraint node a (resp. all constraint nodes around i apart from a). The messages are determined by the equations:
The log number of solutions, log Z, can be expressed as a sum of contributions that are local functions of the messages that solve Eqs. 8 and 9:
To move from trees to loopy graphs, we first consider an intermediate step in which the factor graph is still a tree but a subset of the variables, xB = {xj : j B} is fixed. We are therefore replacing the measure μ (compare Eq. 1), with the conditional one μ( · |xB). In physics terms, the variables in xB specify a boundary condition.
Notice that the measure μ( · |xB) still factorizes according to (a subgraph of) the original factor graph. As a consequence, the conditional marginals μ(xi|xB) can be computed along the same lines as above. The messages ηi→axB and νa→ixB obey Eq. 10, with an appropriate boundary condition for messages from B. Also, the number of solutions that take values xB on j B [call it Z(xB)] can be computed by using Eq. 11.
Next, we want to consider the boundary variables themselves as random variables. More precisely, given r , we let the boundary to be xB with probability
The log-partition function Φ(r) = log (r) admits an expression that is analogous to Eq. 11,
As mentioned, the above derivation holds for tree factor graphs. Nevertheless, the local recursion equations 10 and 13 can be used as an heuristics on loopy factor graphs as well. Further, although we justified Eq. 13 through the introduction of a random boundary condition xB, we can take B = and still look for nondegenerate solutions of such equations.
Starting from an arbitrary initialization of the messages, the recursions are iterated until an approximate fixed point is reached. After convergence, the distributions Pi→a, Qa→i can be used to evaluate the potential Φ(r) (compare Eq. 14). From this we compute the complexity function Σ(r) Φ(r) − rΦ′(r) that gives access to the decomposition of μ in pure states. More precisely, Σ(r) is the exponential growth rate of the number of states with internal entropy s = Φ′(r). This is how curves such as in Fig. 4 are traced.
In practice, it can be convenient to consider the distributions of messages Pi→a, Qa→i with respect to the graph realization. This approach is sometimes referred to as density evolution in coding theory. If one considers a uniformly random directed edge i → a (or a → i) in a rCSP instance, the corresponding message will be a random variable. After t parallel updates according to Eq. 13, the message distribution converges (in the N → ∞ limit) to a well defined law t (for variable to constraint messages) or t (for constraint to variable). As t → ∞, these converge to a fixed point , that satisfies the distributional equivalent of Eq. 13.
To be definite, let us consider the case of graph coloring. Since the compatibility functions are pairwise in this case (i.e., k = 2 in Eq. 1), the constraint-to-variable messages can be eliminated and Eq. 13 takes the form:
In general, finding messages distributions , that satisfy the distributional version of Eq. 13 is an extremely challenging task, even numerically. We adopted the population dynamics method (32), which represents the distributions by samples (this is closely related to particle filters in statistics). For instance, one represents by a sample of Ps, each encoded as a list of ηs. Since computer memory drastically limits the samples size, and thus the precision of the results, we worked in two directions: (i) we analytically solved the distributional equations for large k (in the case of k-SAT) or q (q-Col); and (ii) we identified and exploited simplifications arising for special values of r.
Let us briefly discuss the second point. Simplifications emerge for r = 0 and r = 1. The first case corresponds to SP. Refs. 6 and 11 showed how to compute efficiently Σ(r = 0) through population dynamics. Building on this, we could show that the clusters internal entropy s(r = 0) can be computed at a small supplementary cost.
The value r = 1 corresponds instead to the tree reconstruction problem (33): In this case (xB) (compare Eq. 12), coincides with the marginal of μ. Averaging Eq. 13 (and the analogous one for Qa→i) one obtains the BP equations (8 and 9), e.g., ʃ dPi→a(η) η = i→a. These remarks can be used to show that the constrained averages:
We thank J. Kurchan and M. Mézard for stimulating discussions. This work has been partially supported by the European Commission under Contracts EVERGROW and STIPCO.