The cavity method for counting spanning subgraphs subject to local constraints

# The cavity method for counting spanning subgraphs subject to local constraints

Justin Salez111INRIA-École Normale Supérieure - France. Email: justin.salez@ens.fr
###### Abstract

Using the theory of negative association for measures and the notion of random weak limits of sparse graphs, we establish the validity of the cavity method for counting spanning subgraphs subject to local constraints in asymptotically tree-like graphs. Specifically, the corresponding free entropy density is shown to converge along any sequence of graphs whose random weak limit is a tree, and the limit is directly expressed in terms of the unique solution to a limiting cavity equation. On a Galton-Watson tree, the latter simplifies into a recursive distributional equation which can be solved explicitely. As an illustration, we provide an explicit-limit formula for the matching number of an Erdős-Rényi random graph with fixed average degree and diverging size, for any .

## 1 Introduction

The general framework we consider is that of a finite graph , in which spanning subgraphs are weighted according to their local aspect around each vertex as follows :

 μ(F) = ∏i∈Vμi(F∩Ei). (1)

Here, a spanning subgraph is identified with its egde-set , and each is a given non-negative function over the subsets of . We call the global measure induced by the local measures . Of particular interest in combinatorial optimization is the number

 M(G) = max{|F|:F∈supp(μ)}, (2)

which is the maximum possible size of a spanning subgraph satisfying the local contraint at every node . More generally, counting the weighted number of spanning subgraphs of each given size in , i.e. determining the generating polynomial

 Z(G;t) = ∑F⊆Eμ(F)t|F| (3)

is a fundamental task, of which many combinatorial problems are special instances. Intimately related to this is the study of a random spanning subgraph sampled from the Gibbs-Boltzmann law :

 PtG(F=F) = μ(F)t|F|Z(G;t), (4)

where is a variable parameter called the activity. In particular, the expected size of is called the energy and is connected to via the elementary identity

 U(G;t) = tddtlogZ(G;t). (5)

Our concern is the behavior of these quantities in the infinite volume limit : , .

Originating from spin glass theory [26], the cavity method is a powerful nonrigorous technique for evaluating such asymptotics on graphs that are locally tree-like. Essentially, the heuristic consists in neglecting cycles in order to obtain an approximate local fixed point equation for the marginals of the Gibbs-Boltzmann law. Despite its remarkable practical efficiency and the mathematical confirmation of its analytical predictions for various important models [31, 1, 20, 28, 7, 16, 13], this ansatz is still far from being completely understood, and the exact conditions for its validity remain unknown. More precisely, two crucial questions arise in presence of cycles :

1. convergence : is there a unique, globally attractive fixed point to the cavity equation ?

2. correctness : if yes, does it have any relation to the Gibbs-Boltzmann marginals ?

In this paper, we exhibit a general condition under which the cavity method is valid for counting spanning subgraphs subject to local constaints. Specifically, we positively answer question 1 for arbitrary finite graphs (Theorem 2), under the only assumption that each local measure enjoys a certain form of negative association which we call the cavity-monotone property, and which simply boils down to ultra-log-concavity in the exchangeable case. Regarding question 2, we use the framework of local weak convergence [8, 4] and the notion of unimodularity [3] to prove asymptotical correctness for any sequence of graphs whose random weak limit is concentrated on trees (Theorem 4). This includes many classical sequences of diluted graphs, such as random regular graphs, Erdős-Rényi random graphs with fixed average degree, or more generally random graphs with a prescribed degree distribution. In all these examples, the limit is a unimodular Galton-Watson (UGW) tree. Thanks to the distributional self-similarity of such a tree, the cavity equation simplifies into a recursive distributional equation which may be solved explicitely. As a motivation, let us first describe the implications of our work in the special case of b-matchings.

A famous combinatorial structure that fits in the above framework is obtained by fixing and taking for all : the induced global measure is then nothing but the counting measure for matchings in , i.e. spanning subgraphs with maximum degree at most . The reader is refered to the monograph [30] for a complete survey on matchings, and to [24] for the important case of matchings (). The associated quantities and are important graph invariants respectively known as the matching number and matching polynomial. Determining is a classical example of a computationally hard problem [32], although efficient approximation algorithms have been designed [6, 5]. The mathematical properties of have been investigated in detail, notably in the case for the purpose of understanding monomer-dimer systems [21, 10]. Interestingly, the geometry of the complex zeros of has been proven to be quite remarkable (see [21] for , [29] for , and [34] for the general case). Regarding , the first results in the infinite volume limit were obtained by Karp and Sipser [23] for the Erdős-Rényi random graph with average degree on vertices :

 1nM1(Gn)P−−−→n→∞1−tc+e−ctc+ctce−ctc2, (6)

where is the smallest root of . The analysis has then been extended to random graphs with a log-concave degree profile [12], and finally to any graph sequence that converges in the local weak sense [13]. Contrastingly, only little is known for : to the best of our knowledge, the limit of is only known to exist in the Erdős-Rényi case [19], and could not be explicitely determined. As a special case of our main result, it will follow that

###### Theorem 1 (b−matchings in locally tree-like graphs)

For any sequence of finite graphs satisfying and whose random weak limit is concentrated on trees, the limits

 fb(L):=limn→∞1|Vn|logZb(Gn;t) and mb(L):=limn→∞Mb(Gn)|Vn|

exist and depend only on the random weak limit . When is a UGW tree, we have the explicit formula

 mb(L):=mins∈[0,1]{b−b2gb(s)−b2(gb∘fb)(s)+c2fb(s)(fb∘fb)(s)},

where are defined in terms of the degree generating function as follows :

 c=ϕ′(1), fb(s)=1cb−1∑k=0skϕ(k+1)(1−s)k! and gb(s)=b∑k=0skϕ(k)(1−s)k!.

Moreover, any where the above minimum is achieved must be a root of .

For example, in the case of Erdős-Rényi random graphs with average degree on vertices, the random weak limit is a.s. the law of a UGW tree with Poisson(c) degree distribution, and hence,

 1nMb(Gn)a.s.−−−→n→∞mins∈[0,1]{b−b2φb+1(s)−b2(φb+1∘φb)(s)+c2φb(s)(φb∘φb)(s)},

where we have set

 φb(s)=e−ctb−1∑k=0cskk!.

Since any where the minimum is achieved must satisfy , we recover exactly (6) in the special case of matchings ().

The paper is organized as follows : in section 2, we recall the basic notions and properties pertaining to measures over subsets, which will be of constant use throughout the paper. In section 3, we define and study the cavity equation associated to a finite network. In section 4, we extend the results to infinite networks that arise as local weak limits of finite networks. Finally, section 5 is devoted to the study of the cavity equation in the limit of infinite activity, and to its explicit resolution in the case of matchings.

## 2 Preliminaries

In this section, we define the important notions pertaining to (non-negative) measures over the subsets of an arbitrary finite ground set . Later on, these will be specialized to the local measures attached to the vertices of a graph . First, is caracterized by its multivariate generating polynomial

 Z(w) = ∑F⊆Eμ(F)wF, (7)

where and . Since is affine in each , it can be decomposed as

 Z(w) = weZ/e(w′)+Z∖e(w′), (8)

where and , are the multi-affine polynomials with ground set respectively obtained from by setting the variable to (deletion) and differentiating with respect to (contraction). By definition, the cavity ratio of the pair is then simply the multi-affine rational function

 Γeμ(w′) = Z/e(w′)Z∖e(w′). (9)

When positive values are assigned to the variables (a so-called external field), we may consider the probability distribution A quantity of interest is the expected size of when viewed as a function of the external field. We call this the energy :

 Uμ(w) = Ewμ[|F|]. (10)

From the decomposition (8), it follows immediately that

 Pwμ(e∈F) = weΓeμ(w′)1+weΓeμ(w′), hence Uμ(w) = ∑e∈EweΓeμ(w′)1+weΓeμ(w′). (11)

Note that the supremum of the energy is exactly the rank of : The following properties will be of crucial importance throughout the paper.

###### Definition 1 (Cavity-monotone measures)

The measure is called

• Rayleigh if every two distinct ground elements are negatively correlated in :

 ∀w>0,Pwμ(e∈F,f∈F)≤Pwμ(e∈F)Pwμ(f∈F).
• Size-increasing if every ground element positively influences the total size :

 ∀w>0,Ewμ[|F|1(e∈F)]>Ewμ[|F|]Pwμ(e∈F).
• Cavity-monotone if its satisfies and the two above properties.

Rayleigh measures were introduced in the context of matroid theory [33], but soon found their place in the modern theory of negative dependence for probability measures [27, 22]. Cavity-monotone measures will play a major role in our study, for the following elementary reason.

###### Lemma 1 (Monotony of energy and cavity ratios)
 μ(∅)>0 ⟺ the cavity ratios Γeμ,e∈E are % well-defined on [0,∞)×…×[0,∞). μ is Rayleigh ⟺ the cavity ratios Γeμ,e∈E are % non-increasing in each variable. μ is size-increasing ⟺ the energy Uμ is increasing in each % variable; ⟺ for each e∈E and w>0,t↦tΓeμ(tw′) is increasing.

Proof. Differentiating the corresponding quantities and playing with the definition of easily yields

 ∂Γeμ(w′)∂wf = (Pwμ(e∈F,f∈F)−Pwμ(e∈F)Pwμ(f∈F))/wewfPwμ(e∉F)2. ∂Uμ(w)∂we = ∂tΓeμ(tw′)∂t =
###### Remark 1 (Matroids)

Interestingly, the support of a cavity-monotone measure admits a remarkable structure : it follows from [33, Theorem 4.6] that for Rayleigh with , is a matroid:

• is not empty ;

• If and , then ;

• If and , then such that .

The cavity-monotone property admits a particularly simple caracterization in the important case where is exchangeable, i.e. for some non-negative coefficients :

###### Lemma 2 (The exchangeable case)

An exchangeable measure is cavity-monotone if and only if

1. is log-concave, i.e. for all , and

2. the support is an interval containing and .

In particular, so is the measure describing the local constraints of a matching.

Proof of Lemma 2. The result essentially follows from the work of Pemantle [27]. Indeed, Theorem 2.7 therein guarantees that is Rayleigh if and only if the sequence is log-concave and its support is an interval. That the latter must contain is nothing but the last property in the definition of a cavity-monotone measure. That it is not reduced to is imposed by the strict inequality in the size-increasing property. Conversely, let us show that any exchangeable measure with and is indeed size-increasing. Fix an external field . By Lemma 2.9 in [27], the law obtained from by conditionning on the event is stochastically increasing in . By Proposition 1.2 in [27], this implies in particular that for every , the following weak inequality holds :

 Ewμ[|F|∣∣e∈F]≥Ewμ[|F|].

Note that the condition guarantees that this conditional expectation is well-defined. Since we have not yet used the fact that , the above inequality remains true if one changes the coefficient to . Setting it then back to its initial (positive) value does not affect the left-hand side, but strictly decreases the right-hand side, hence the desired strict inequality.

## 3 The cavity equation on finite networks

Let be a finite graph at the vertices of which some local measures are specified. We call the resulting object a network. A configuration is an assignment of numbers to every oriented edge . Starting from a configuration , we define a new configuration by

 yi→j=Γijμi(xk→i:k∈∂i∖j), (12)

where denotes the set of all neighbors of . Each may be thought of as a message sent by to along the edge , and as a local rule for propagating messages. For , the fixed point equation

 x=tΓG(x) (13)

is called the cavity equation at activity on the network . Its relation to the global measure induced by the is revealed by the following well-known result.

###### Lemma 3 (Validity on trees)

Assume that is finite and acyclic. Then, for every activity ,

1. convergence : the cavity equation admits a unique solution , which can be reached from any initial configuration by iterating a number of times equal to the diameter of ;

2. correctness : for every , the exact marginal law of under the Gibbs-Boltzmann law is given by directly imposing the external field onto the local measure .

The important consequence is that on trees, the energy can be determined using only local operations :

 U(G;t) = 12∑i∈VUμi(xj→i(t):j∈∂i) = ∑ij∈Exj→i(t)xi→j(t)t+xj→i(t)xi→j(t), (14)

where the second equality is obtained by applying (11) to each .

Proof of Lemma 3 . When is a leaf, the message defined by equation (12) does not depend at all on the initial configuration . Iterating this argument immediately proves the convergence part, and we now focus on correctness. Let be a finite tree, a vertex, and a neighbour of . We let denote the subtree induced by and all vertices that the edge separates from . Now assume that is equipped with local measures, and let inherit from these local measures, except for which we replace by the trivial local measure with constant value . With these notations, any spanning subgraph can be uniquely decomposed as the disjoint union of a subset and a spanning subgraph on each , with . Thus, writing for the global measure on the network , we have for any ,

 μG(F)t|F| = μ∘(I)∏i∈It|Fi|+1μGi→∘(Fi∪i∘)∏i∉It|Fi|μGi→∘(Fi).

Fixing and summing over all possible values for , we obtain

 PtG(F∩E∘=I) = Cμ∘(I)∏i∈IPtGi→∘(i∘∈F)∏i∉IPtGi→∘(i∘∉F). = C′μ∘(I)∏i∈IPtGi→∘(i∘∈F)PtGi→∘(i∘∉F),

where are normalizing constants that do not depend on . This already proves that the law of can be obtained from the local measure by imposing on each edge the external field

 xi→∘(t):=PtGi→∘(i∘∈F)PtGi→∘(i∘∉F). (15)

In turn, this ratio can now be computed by applying the result to the vertex in the network :

 PtGi→∘(i∘∈F)PtGi→∘(i∘∉F) = tΓi∘μi(xk→i(t):k∈∂i∖∘),

which shows that the configuration defined on by (15) satisfies the cavity equation (13).

There are two distinct parts in Lemma 3 : convergence and correctness. As we will now show, the former extends to arbitrary graphs under the only assumption that each local measure is cavity-monotone. Henceforth, such a network will be called a cavity-monotone network.

###### Theorem 2 (Convergence on finite cavity-monotone networks)

On a finite cavity-monotone network, the cavity equation admits a unique, globally attractive fixed point at any activity .

Proof. Fixing and starting with the minimal configuration , we set inductively

 xk+1(t):=tΓG(xk(t)),

for all . By Lemma 1, the Rayleigh property of the local measures ensures that is coordinate-wise non-increasing on the space of configurations. Therefore, the limiting configuration

 x−(t):=limk→∞↑x2k(t) and x+(t):=limk→∞↓x2k+1(t) (16)

exist, and any fixed point must satisfy Moreover, is clearly continuous with respect to the product topology on configurations, so that and . Thus, the existence of unique globally attractive solution to (13) boils down to the equality

 x−(t)=x+(t). (17)

Now applying (11) to the local measure at a fixed vertex yields

 Uμi(x−j→i(t):j∈∂i) = ∑j∈∂ix−j→i(t)x+i→j(t)t+x−j→i(t)x+i→j(t), Uμi(x+j→i(t):j∈∂i) = ∑j∈∂ix+j→i(t)x−i→j(t)t+x+j→i(t)x−i→j(t).

Summing over all vertices , we therefore obtain

 ∑i∈VUμi(x−j→i(t):j∈∂i) = ∑ij∈E(x−j→i(t)x+i→j(t)t+x−j→i(t)x+i→j(t)+x+j→ix−i→j(t)t+x+j→i(t)x−i→j(t)) = ∑i∈VUμi(x+j→i(t):j∈∂i).

This implies (17), since by Lemma 1 each is strictly increasing in every coordinate.

## 4 The limit of infinite volume

In the previous section, we have established existence and uniqueness of a cavity solution on any finite cavity-monotone network. Our concern now is its asymptotical meaning as the size of the underlying graph tends to infinity. Following the principles of the objective method [4], we will replace the asymptotical analysis of our finite networks by the direct study of their infinite limits.

### 4.1 Random weak limits

We first briefly recall the framework of local convergence, introduced by Benjamini and Schramm [8] and developped further by Aldous and Steele [4]. Examples of successful uses include [3, 9, 18, 25, 15, 14, 13, 16]. Here, a network will be simply a denumerable graph whose vertices are equipped with local measures . A rooted network is a network together with the specification of a particular vertex , called the root. For , we write if there exists a bijection that preserves

• the root : ;

• the support of the local measures : , with .

• the values of the local measures, up to : .

We let denote the set of all locally finite connected rooted networks considered up to the isomorphism relation . In the space , a sequence converges locally to if for every radius and every , there is such that

 n≥nk⟹[Gn,∘n]k\lx@stackrelε≡[G,∘]k,

where denotes the finite rooted network obtained by keeping only the vertices lying at graph-distance at most from . It is not hard to construct a distance which metrizes this notion of convergence and turns into a complete separable metric space. We can thus import the usual machinery of weak convergence of probability measures on Polish spaces (see e.g. [11]).

Uniform rooting is a natural procedure for turning a finite deterministic network into a random element of : one simply chooses uniformly at random a vertex to be the root, and restrains to the connected component of . If is a sequence of finite networks and if the sequence of their laws under uniform rooting admits a weak limit , we call the random weak limit of the sequence . In [3], it was shown that any such limit enjoys a remarkable invariance property known as unimodularity : let denote the space of locally finite connected networks with an ordered pair of distinguished adjacent vertices , taken up to the natural isomorphism relation and endowed with the natural topology. A measure is called unimodular if it satisfies the Mass-Transport Principle : for any Borel function ,

 L[∑i∈∂∘f(G,∘,i)]=L[∑i∈∂∘f(G,i,∘)], (18)

where we have written for the expectation with respect to . This is a deep and powerful notion, which we will now use to extend the results of section 3 to the infinite setting.

### 4.2 Main result : validity of the cavity method on unimodular trees

The definition of remains valid for any locally finite network . When the latter is cavity-monotone, the configurations introduced in the proof of Theorem 2 remain perfectly well-defined, and the convergence of the cavity method again boils down to the identity . However, the proof of the latter involves a summation over all edges, which is no longer valid in the infinite setting. Instead, the desired will be derived from unimodularity, and will thus hold for any random weak limit of finite networks. Indeed, applying the Mass-Transport Principle to the function

 f(G,∘,i):=x−i→∘(t)x+∘→i(t)t+x−i→∘(t)x+∘→i(t)

yields ( is Borel as the pointwise limit of continuous functions). Under the assumption , this expectation is finite, and the size-increasing property of then implies that almost surely, for all . This automatically extends to every oriented edge since under unimodularity, everything shows up at the root (another fruitful application of the Mass-Transport-Principle, see [3, Lemma 2.3]). We state this as a Theorem.

###### Theorem 3 (Convergence of the cavity method on unimodular networks)

Let be a unimodular probability measure supported by cavity-monotone networks. If , then the cavity equation admits a.-s. a unique, globally attractive solution at any activity .

By analogy with formula (14) in the finite case, the (now well-defined) quantity

 u(L;t)=12L[∑i∈∂∘xi→∘(t)x∘→i(t)t+xi→∘(t)x∘→i(t)] (19)

appears as a natural candidate for the limiting energy of any sequence of finite networks whose random weak limit is . Our second result is the validity of this cavity ansatz when is concentrated on trees.

###### Theorem 4 (Asymptotical correctness of the cavity method)

Let be a sequence of finite cavity-monotone networks admitting a random weak limit which is concentrated on cavity-monotone trees. Assume that the local rank at a uniformly chosen vertex is uniformly integrable as . Then,

 U(Gn;t)|Vn| −−−→n→∞ u(L;t). (20)

If and all the local measures take values in for a fixed compact , then

 1|Vn|logZ(Gn;t) −−−→n→∞ L[logμ∘(∅)]+∫t0u(L;s)sds, (21) M(Gn)|Vn| −−−→n→∞ m(L):=limt→∞↑u(L;t). (22)
###### Remark 2 (Large deviation principle)

Integrating (20) immediately implies that

 1|Vn|logZ(Gn;t)Z(Gn;1) −−−→n→∞ ∫t1u(L;s)sds.

It will later be checked that is continuous on (Remark 3). Therefore, denoting by a random spanning subgraph with the Gibbs-Boltzmann law , Gärtner-Ellis Theorem [17] guarantees that obeys a large deviation principle with rate and good rate function .

### 4.3 Proof of the main result

###### Lemma 4 (Tree approximation)

Let be a finite rooted cavity-monotone network, and let . If is a tree, then for every activity ,

 Uμ∘(x2ki→∘(t):i∈∂∘)≤EtG[|F∩E∘|]≤Uμ∘(x2k+1i→∘(t):i∈∂∘).

Proof. The proof makes use of a classical ingredient known as the spatial Markov property, which we first briefly recall. Let be a finite network and let be an induced subgraph. We let denote the boundary of , i.e. the set of edges having one end-point in and one in . Any boundary condition can be used to assign local measures to the vertices of , namely . Note that these local measures differ from the original ones only for vertices that are adjacent to the boundary. The resulting network is denoted by . Now, a spanning subgraph is clearly the disjoint union of a spanning subgraph of , a boundary condition and a spanning subgraph in . The product form of immediately yields :

 PtG(F=F)=PtS|B(F=Fint)PtG(F∩∂S=B)PtSc|B(F=Fext). (23)

In other words, conditionally on the boundary , the restrictions of to and are independent with law and , respectively. Applying this to the tree ,

 EtG[|F∩E∘|] = ∑B⊆∂SPtG(F∩∂S=B)EtS|B[|F∩E∘|] = ∑B⊆∂SPtG(F∩∂S=B)Uμ∘(x(B)i→∘(t):i∈∂∘),

where we have applied Lemma 3 to the tree , writing for the unique solution to the cavity equation at activity thereon. But by monotony of the cavity operator, each must satisfy . Using the size-increasing property of , we see that

 Uμ∘(x2ki→∘(t):i∈∂∘)≤Uμ∘(x(B)i→∘(t):i∈∂∘)≤Uμ∘(x2k+1i→∘(t):i∈∂∘),

and re-injecting this into the above equation finally yields the desired inequalities.

Let us now see how Lemma 4 implies the convergence (20). Let be a sequence of finite cavity-monotone networks admitting a random weak limit which is concentrated on cavity-monotone trees. Denote by the law under uniform rooting of , so that . We will use the short-hand , and for the indicator function that is a tree. Lemma 4 guarantees that for any finite cavity-monotone network and any vertex ,

 χk(G,∘)u2k(G,∘)≤EtG[|F|∩E∘]≤χk(G,∘)u2k+1(G,∘)+(1−χk(G,∘))rank(μ∘). (24)

As functions of , the left-hand side and right-hand side are continuous on , since they depend only on . Moreover, both are dominated by which is assumed to be uniformly integrable with respect to the sequence . Thus, their expectation under tends to their expectation under as . But is zero on the support of , so we are simply left with

 12L[Uμ∘(x2ki→∘(t):i∈∂∘)] ≤ liminfn→∞U(Gn;t)|Vn| ≤ limsupn→∞U(Gn;t)|Vn| ≤ 12L[Uμ∘(x2k+1i→∘(t):i∈∂∘)].

Since the random weak limit is unimodular, Theorem 3 finally implies that both the lower and upper bounds tend to as . Note that the requirement in Theorem 3 is here automatically fullfilled, by the uniform integrability assumption.

It now remains to show (21) and (22). The identity (5) implies that for any activity and any finite network satisfying ,

 1|V|logZ(G;t)=1|V|∑∘∈Vlogμ∘(∅)+∫t0U(G;s)s|V|ds.

Now take and let : the compactness assumption guarantees that is bounded uniformly in , so the first term converges to . As per the second one, it tends to because of (20), provided the uniform domination holds in Lebesgue’s dominated convergence Theorem. The latter fact is ensured by the first inequality in Lemma 5 below, combined with the compactness assumption and the fact that . The second inequality in Lemma 5 easily guarantees (22).

###### Lemma 5 (Uniform controls for the energy)

Let be a finite cavity-monotone network. As a function of the activity , the energy increases from to . Furthermore, the rate of convergence to these two extrema can be precisely controlled :

 ∀t>0,U(G;t) ≤ t∑ij∈EA(μi)A(μj); (25) ∀t>1,U(G;t) ≥ M(G)−1logt(|E|log2+∑i∈VlogA(μi)). (26)

where , with and .

Proof of Lemma 5. That the energy increases with the activity is equivalent by (5) to the convexity of , a direct consequence of Hölder’s inequality. This also implies that for any

 U(G;t)logt ≥ logZ(G;t)Z(G;1).

Clearly and and , so (26) follows. Regarding (25), we have for any