Equilibrium statistical mechanics on correlated random graphs

# Equilibrium statistical mechanics on correlated random graphs

Dipartimento di Fisica, Sapienza Università di Roma (Italy) GNFM Gruppo Nazionale per la Fisica Matematica

222e-mail:elena.agliari@fis.unipr.it

Dipartimento di Fisica, Università di Parma (Italy) INFN, Gruppo Collegato di Parma (Italy) Theoretische Polymerphysik, Albert-Ludwigs-Universität, Freiburg (Germany)

————————————————————————————————————

Abstract.

Biological and social networks have recently attracted enormous attention between physicists. Among several, two main aspects may be stressed: A non trivial topology of the graph describing the mutual interactions between agents exists and/or, typically, such interactions are essentially (weighted) imitative. Despite such aspects are widely accepted and empirically confirmed, the schemes currently exploited in order to generate the expected topology are based on a-priori assumptions and in most cases still implement constant intensities for links.
Here we propose a simple shift in the definition of patterns in an Hopfield model to convert frustration into dilution: By varying the bias of the pattern distribution, the network topology -which is generated by the reciprocal affinities among agents (the Hebbian kernel)- crosses various well known regimes (fully connected, linearly diverging connectivity, extreme dilution scenario, no network), coupled with small world properties, which, in this context, are emergent and no longer imposed a-priori.
The model is investigated at first focusing on these topological properties of the emergent network, then its thermodynamics is analytically solved (at a replica symmetric level) by extending the double stochastic stability technique, and presented together with its fluctuation theory for a picture of criticality: both a statistical mechanics and a topological phase diagrams are obtained.
Overall the picture depicted from statistical mechanics is quite intuitive: at least at equilibrium, dilution (of whatever kind) simply decreases the strength of the coupling felt by the spins, but leaves the paramagnetic/ferromagnetic flavors unchanged.
The main difference with respect to previous investigations and a naive picture is that within our approach replicas do not appear: instead of (multi)-overlaps as order parameters, we introduce a class of magnetizations on all the possible sub-graphs belonging to the main one investigated: As a consequence, for these objects a closure for a self-consistent relation is achieved.

## 1 Introduction to social and biological networks

The paper is organized as follows:

In this section we briefly introduce the reader to the state of the art in the applications of this model to investigation of collective effects in social and biological networks, then, in section , we present the model itself with all the related definitions. Section deals with the topological analysis: Techniques from graph theory are the tools. Section deals with the thermodynamical analysis: techniques from statistical mechanics are the tools. In section we present our discussion and outlooks.

Starting with a digression on social sciences, since the early investigations by Milgram [63], several efforts have been made to understand the structure of interactions occurring within a social system. Granovetter defined this field of science as ”a tool for linking micro and macro levels of sociological theories” [52] and gave fundamental prescriptions; in particular, he noticed that the stronger the link between two agents and the larger (on average) the overlap among the number of common nearest neighbors, i.e. high degree of cliqueness. Furthermore he noticed that weak ties play a fundamental role acting as bridges among sub-clusters of highly connected interacting agents [52, 53, 54]. As properly pointed out by Watts and Strogatz [71], from a topological viewpoint, the simplest Erdos-Renyi graphs [29] is unable to describe social systems, due to the uncorrelatedness among its links, which constraints the resulting degree of cliqueness to be relatively small [14]. Through a mathematical technique (rewiring), they obtained a first attempt in defining the so called ”small world” graph [72]: when trying to implement statistical mechanics on such a topology their network has been essentially seen as a chain of nearest neighbors overlapped on a sparse Erdos-Renyi graph [65, 24]. As the former can be solved via the transfer matrix, the latter via e.g. the replica trick, the model was already understood even from a statistical mechanics perspective (without introducing here a discussion on possible replica symmetry breaking in complex diluted systems [39, 20]).
Coupled to topological investigations, even the analysis of the kind of interactions (still within a ”statistical mechanics flavor”) started in the past decades in econometrics and, after McFadden described the discrete choice as a one-body theory with external fields [60], Brock and Durlauf went over and gave a clear positive interaction strength to social ties [32, 40].
Even thought clearly, as discussed for instance in [21], the role of anti-imitative actions is fundamental for collective decision capabilities, the largest part of interactions is imitative and this prescription will be followed trough the paper.

Somewhat close to social breakthrough, after the revolution of Watson and Crick, biological studies in the past fifty years gave raise to completely new field of science as genomics [42], proteinomics [46] and metabolic network investigations [59] which ultimately are strongly based on graph theories333It is in fact well established that complex organisms share roughly the same amount of genes with simpler ones. As a result the failure of a purely reductionism approach (more genes more complexity) seems raising and interest in their connections, their network of exchanges, is enormously increasing. [15]. Furthermore graph structure appears at various levels, i.e. in matching epitopal complementary among antibodies giving raise to the so called ”Jerne network” [58][66] for the immune system [18, 1], or at even larger scales of the biological world: from the so far exploited micro and meso, to such a macro as virus spreading worldwide [25], food web [64], and much more [34].
In these contexts, surely there is a disordered underlying structure, but thinking at it as ”completely random” is probably a too strong simplifying assumption. One of the strongest starting point when dealing with random coupling is their independence: for example Blake pointed out [28] that exons in haemoglobin correspond both to structural and functional units of protein, implicitly suggesting a not null level of correlation among the ”randomness” we have to deal with when trying a statistical mechanics approach. Not too different is the viewpoint of Coolen and coworkers [38][70].

From a completely different background, last step in this introduction is presenting the Hopfield model [56], which, instead, is the paradigmatic model for neural networks. Even though apparently far from topology investigations, in the Hopfield model there is a scalar product among the bit strings (the Hebbian kernel [55]): despite fully connected, the latter can be seen as a measure of the strength of the ties (which in that context must be both positive and negative as, in order to share statically memories over all neurons [10], it must use properties of spin glasses [17][22][62] as the key for having several minima in the fitness landscape). By varying tunable parameters (level of noise and amount of storage memories) the Hopfield model displays a region where is paramagnetic, a region where is a spin glass and a region where is a ”working memory” [11][12].
We are ready to introduce our starting idea: what happens if instead of using positive and negative values for the coupling in the Hebbian kernel of the Hopfield model, we use positive and null values?
We want to show that, even in this context, by varying the tunable parameters, we recover several topologies (on which ferromagnetic or paramagnetic behaviors may arise): fully connected scenario weighted and un-weighted, Erdös-Rényi graphs, linearly diverging connectivity, extreme dilutions, small world features, fully disconnected (that is no edges at all).
Despite a rich plethora of phenomena in graph theory is obtained, from equilibrium statistical mechanics perspective we find that all these networks behave not drastically differently, relating strong differences in dynamical features (in agreement with intuition), on which we plan to investigate soon.

## 2 The model: Definitions

Let us consider agents . In social framework (e.g. discrete choice in econometrics) for example means that the agent agrees a particular choice (and obviously disagreement in the case). In biological networks, may label a Kauffman gene (assuming undirected links) or a Jerne lymphocytes in such a way that represents expression or firing state respectively, while quiescence is assumed when .
The influence of external stimuli, representing e.g. medias in social networks or environmental variations imposing phenotypic changes via gene expression in proteinomics or viruses in immune networks, can be encoded by means of a one-body Hamiltonian term , with suitable for the particular phenomenon (as brilliantly done by McFadden intro the first class of problems [60][45], Eigen in the middle [68] and Burnet in the last class [35][19]). As for collective influences among agents modeling is by far harder.

In the model we are going to develop, each agent is endowed with a set of characters denoted by a binary string of length . For example, in social context this string may characterize the agent and each entry may have a social meaning (i.e. may take into account an attitude toward the opposite sex such that if , likes the opposite sex, otherwise if ; in the same way may accounts for smoking and so on up to ). In gene networks the overlap among bit strings may offer a measure of phylogenetic distance while in immunological context may offer the affinity matrix built up by strings standing for the antibodies (and anti-antibodies) produced by their corresponding lymphocytes.
Now we want to associate a weighted link among two agents by comparing how many similarities they share (note that does not contribute in this scheme, but only ), namely

 Jij=L∑μ=1ξμiξμj. (2.1)

This description naturally leads to the emergence of a hierarchical partition of the whole population into a series of layers, each layer being characterized by the sharing of an increasing number of characters. Of course, group membership, apart from defining individual identity, is a primary basis both for social and biological interactions and therefore acquaintanceship. As a result, the interaction strength between individual and increases with increasing similarity.

Hence, including both terms (one-body and two-bodies) the model we are describing reads off as

 HV(σ;ξ)=1VV∑i

formally identical to the Hopfield model.
The string characters are randomly distributed according to

 P(ξμi=+1)=1+a2,P(ξμi=0)=1−a2, (2.3)

in such a way that, by tuning the parameter , the concentration of non null-entries for the -th string can be varied. When there is no network and we are left with a non interacting spin system, while when we have that for any couple and (renormalization trough apart) we recover the standard Curie-Weiss model.

Further, when the pattern distribution is biased, somehow similarly to the correlations investigated by Amit and coworkers in neural scenarios [13]. Moreover, from Eq. we get , - apart which reduces to completely uncorrelated patterns.

As we will see, small values of give rise to highly correlated, diluted networks, while, as gets larger the network gets more and more connected and correlation among links vanishes.

Even though the theory is defined at each finite and , as standard in statistical mechanics, we are interested in the large behavior (such that, under central limit theorem permissions, deviations from averaged values become negligible and the theory predictive). To this task we find meaningful to let even diverge linearly with the system size (to bridge conceptually to high storage neural networks), such that defines as another control parameter. Finally, since we are interested in the regime of large and large we will often confuse with and with .

## 3 The emergent network

The set of strings together with the rule in eq. (2.1) generates a weighted graph describing the mutual interactions among nodes. The following investigation is just aimed at the study of its topological features, which, as well known, are intimately connected with the dynamical properties of phenomena occurring on the network itself (e.g. diffusion [26, 2, 5], transport [9, 7], critical properties [31, 8], coherent propagation [6], relaxation [44], just to cite a few). We first focus on the topology neglecting the role of weights and we say that two nodes and are connected whenever is strictly positive; disorder on couplings will be addressed in Sec. 3.2

It is immediate to see that the number of non-null (i.e. equal to ) entries occurring in a string is Bernoulli-distributed, namely

 P1(ρ;a,L)=(Lρ)(1+a2)ρ(1−a2)L−ρ, (3.1)

with average and variance, respectively,

 ¯ρa,L=L∑ρ=0ρP1(ρ;a,L)=(1+a2)L, (3.2) σ2a,L=¯¯¯¯¯ρ2a,L−¯ρ2a,L=(1−a24)L. (3.3)

Moreover, the probability that a string is made up of null entries only is , thus, since we are allowing repetitions among strings, the number of isolated nodes is at least .

Let us consider two strings and of length , with and non-null entries, respectively. Then, the probability that such strings display matching entries is

 Pmatch(k;ρi,ρj,L)=(Lk)(L−kρi−k)(L−ρiρj−k)(Lρi)(Lρj), (3.4)

which is just the number of arrangements displaying matchings over the number of all possible arrangements. As anticipated, for two agents to be connected it is sufficient that their coupling (see eq. (2.1)) is larger than zero, i.e. that they share at least one trait. Therefore, we have the following link probability

The previous expression shows that, in general, the link probability between two nodes does depend on the nodes considered through the related parameters and : When and are both large, the nodes are likely to be connected and vice versa. Another kind of correlation, intrinsic to the model, emerges due to the fact that, given , the node will be connected with all strings with non-null -th entry; this gives rise to a large (local) clustering coefficient (see section 3.4). Such a correlation vanishes when is sufficiently larger than , so that any generic couple has a relative large probability to be connected; in this case the resulting topology is well approximated by a highly connected, uncorrelated (Erdös-Renyi) random graph. Moreover, when we recover the fully-connected graph.

Finally, it is important to stress that, according to our assumptions, repetitions among strings are allowed and this, especially for finite and , can have dramatic consequences on the topology of the structure. In fact, the suppression of repetitions would spread out the distribution , allowing the emergence of strings with a large (with respect to the expected mean value ); such nodes, displaying a large number of connections, would work as hubs. On the other hand, recalling that the number of couples displaying perfect overlapping strings is , we have that in the thermodynamic limit and growing faster than , repetitions among strings have null measure.

### 3.1 Degree distribution

We focus the attention on an arbitrary string with non-null entries and we calculate the average probability that is connected to another generic string, which reads as

This result is actually rather intuitive as it states that, in order to be linked to , a generic node has to display at least a non-null entry corresponding to the non-null entries of . Notice that the link probability of eq. (3.6) corresponds to a mean-field approach where we treat all the remaining nodes in the average; accordingly, the degree distribution for gets

 Pdegree(z;ρ,a,V)=(Vz)[1−(1−a2)ρ]z(1−a2)ρ(V−z). (3.7)

Therefore, the number of null-entries controls the degree-distribution of the pertaining node: A large gives rise to narrow (i.e. small variance) distributions peaked at large values of . Notice that and, accordingly, are independent of .

More precisely, from eq. (3.7), the average degree for a string displaying non-null entries is

 ¯zρ=V[1−(1−a2)ρ], (3.8)

while the pertaining variance is

 σ2ρ=V[1−(1−a2)ρ](1−a2)ρ. (3.9)

Now, the overall distribution can be written as a combination of binomial distributions

 ¯Pdegree(z;a,L,V)=L∑ρ=0Pdegree(z;ρ,a,V)P1(ρ;a,L), (3.10)

where the overlap among two “modes”, say and , can be estimated through : Exploiting eqs. (3.8) and (3.9) we get

 σρ¯zρ+1−¯zρ=√1−(1−a2)ρ[√V(1−a2)ρ/2(1+a2)]−1∼√LV=√α, (3.11)

where the generic mode is confused with and the approximate result was derived by using the scaling , with (both these points are fully discussed in the next Section); also, the last passage holds rigorously in the thermodynamic limit of the high storage regime ( linearly diverging with ). Interestingly, for systems with different scaling regimes among and , for instance [18, 1], the distribution remains multi-modal because a vanishing overlap occurs among the single distributions : turns out to be an -modal distribution (see Fig. 3.1, upper panel); vice versa, for , the overall distribution gets mono-modal (see Fig. 3.1, lower panel). Briefly, we mention that for the ratio in the l.h.s. of eq. (3.11) still converges to a finite value approaching for , while for it diverges.

From eq. (3.10), the average degree for a generic node is

 ¯z=V∑z=0z¯Pdegree(z;a,L,V)=L∑ρ=0P1(ρ;a;L)¯zρ=V⎧⎨⎩1−[1−(1+a2)2]L⎫⎬⎭, (3.12)

where

 p=1−[1−(1+a2)2]L (3.13)

is the average link probability for two arbitrary strings and , which can be obtained by averaging over all possible string arrangements, namely, recalling eqs. (3.1) and (3.6),

 p = L∑ρi=0L∑ρj=0P1(ρi;a,L)P1(ρj;a,L)Plink(ρi,ρj;a,L) (3.14) = 1−(1−a2)2LL∑ρi=0L∑ρj=0(1+a1−a)ρi+ρj(Lρi)(L−ρiρj) = 1−[1−(1+a2)2]L.

Of course, eq. (3.14) could be obtained directly by noticing that the probability for the -th entries of two strings not to yield any contribute is , so that two strings are connected if there is at least one matching.

### 3.2 Coupling distribution

As explained in Sec. 2, the coupling among nodes and is given by the relative number of matching entries among the corresponding strings and . Eq.  (3.4) provides the probability for and to share a link of magnitude , namely . Following the same arguments as in the previous section we get the probability that a link stemming from has magnitude , that is

 ¯Pcoupling(J;ρi,a)=L∑ρj=0Pcoupling(J;ρi,ρj,L)P1(ρj;a,L)=(ρiJ)(1−a2)ρi−J(1+a2)J, (3.15)

which is just the probability that out of non-null entries are properly matched with the generic second node.

Similarly to , the overall coupling distribution can be written as the superposition , giving rise to a multimodal distribution. Each mode has variance and is peaked at

 ¯Jρ=ρ1+a2, (3.16)

which represents the average coupling expected for links stemming from a node with non-null entries. Nevertheless, by comparing and the standard deviation , we find that in the limit and the distribution gets mono-modal.

Anyhow, we can still define the average weighted degree expected for a node displaying non-null entries. Given that for the generic node , , we get

 ¯wρ=V¯Jρ=Vρ1+a2. (3.17)

Of course, one expects that the larger the coordination number of a node and the larger its weighted degree; such a correlation is linear only in the regime of low connectivity. In fact, by merging eq. (3.8) and eq. (3.17), one gets

 ¯wρ=(1+a2)log(1−¯zρV)log(1−a2)V≈¯zρ, (3.18)

where the last expression holds for and .

It is important to stress that (apart pathological cases which will be taken into account in the scaling later) the variance of scales as such that, despite the average of is , substituting with into eq. becomes meaningless in the thermodynamic limit as the variance of diverges as : This will affect drastically the thermodynamics whenever far from the Curie-Weiss limit.

It should be remarked that represents the average coupling for a link stemming from a node characterized by a string with non-null entries, where the average includes also non-existing links corresponding to zero coupling. On the other hand, the ratio directly provides the average magnitude for existing couplings. Moreover, the average magnitude for a generic link is

 ¯J=L∑ρ=0P1(ρ;a,L)¯Jρ=(1+a2)2. (3.19)

By comparing eq. (3.16) and eq. (3.19) we notice that the local energetic environment seen by a single node, i.e. , and the overall energetic environment, i.e. , scale, respectively, linearly and quadratically with : we will see in the thermodynamic dedicated section that (apart in the Curie-Weiss limit where global and local effects merge) despite the self-consistence relation (which is more sensible by local condition) will be influenced by , critical behavior will be found at coherently with a manifestation of a collective, global effect.

Anyhow, when is large and the coupling distribution is narrowly peaked at the mode corresponding to , the couplings can be rather well approximated by the average value , so that the disorder due to the weight distribution may be lost; as we will show this can occur in the regime of high dilution (). As for the other source of disorder (i.e. topological inhomogeneity), this can also be lost if is sufficiently larger than as we are going to show.

### 3.3 Scalings in the thermodynamic limit

In the thermodynamic limit and high-storage regime, is linearly divergent with and the average probability for two nodes to be connected (see eq. (3.13)) approaches a discontinuous function assuming value when , and value when . More precisely, as there exists a vanishingly small range of values for giving rise to a non-trivial graph; such a range is here recognized by the following scaling

 a=−1+γVθ, (3.20)

where and is a finite parameter.

First of all, we notice that, following eqs. (3.2) and (3.3),

 ¯ρ−1+γ/Vθ,αV=αγ2Vθ−1 (3.21) σ2−1+γ/Vθ,αV=αγ2Vθ−1(1−γ2Vθ)∼¯ρ−1+γ/Vθ,αV, (3.22)

where the last approximation holds in the thermodynamic limit and it is consistent with the convergence of the binomial distribution in eq. (3.1) to a Poissonian distribution. For , , so that when referring to a generic mode , we can take without loss of generality ; the case will be neglected as it corresponds to a disconnected graph.

Indeed, the probability for two arbitrary nodes to be connected gets

 p=1−[1−(1+a2)2]L=1−[1−γ24V2θ]αV→V→∞1−e−γ2αV1−2θ/4, (3.23)

so that we can distinguish the following regimes:

• ,   ,   Fully connected (FC) graph

• ,   ,   Linearly diverging connectivity
Within a mean-field description the Erdös-Rényi (ER) random graph with finite probability is recovered.

• ,   ,   Extreme dilution regime (ED)
In agreement with [84, 85], .

• ,   ,   Finite connectivity regime
Within a mean-field description corresponds to a percolation threshold.

Therefore, while controls the connectivity regime of the network, allows a fine tuning.

As for the average coupling (see eq. (3.19)) and the average weighted degree:

 ¯J=γ24V2θ, (3.24)
 ¯w=V¯J=γ24V2θ−1. (3.25)

Now, the average “effective coupling” , obtained by averaging only on existing links, can be estimated as

 ~J=¯J/p=⎧⎪ ⎪⎨⎪ ⎪⎩γ2/(4V2θ)% if θ<1/2γ2/[4V2θ(1−e−γ2α/4)] if θ=1/21/(αV)=1/L if 1/2<θ≤1 (3.26)

Interestingly, this results suggests that in the thermodynamic limit, for values of determined by eq. (3.20) with , nodes are pairwise either non-connected or connected due to one single matching among the relevant strings. This can be shown more rigorously by recalling the coupling distributions of eq. (3.15): In particular, for , neglecting higher order corrections, for the probability is , for the probability is . For this still holds for , which corresponds to a relatively high dilution regime, otherwise some degree of disorder is maintained, being that . On the other hand, for , while topological disorder is lost (FC), the disorder due to the coupling distribution is still present. However, notice that for and , gets peaked at and, again, disorder on couplings is lost so that a pure Curie-Weiss model is recovered.

This means that, for and , we can distinguish three main regions in the parameter space where the graph presents only topological disorder (), or only coupling disorder (), or both ().

In general, we expect that the the critical temperature scales like the connectivity times the average coupling and the system can be looked at as a fully connected with average coupling equal to or as a diluted network with effective coupling and connectivity given by ; in any case we get (crf. eq.).

### 3.4 Small-world properties

Small-world networks are endowed, by definition, with high cluster coefficient, i.e. they display sub-networks that are characterized by the presence of connections between almost any two nodes within them, and with small diameter, i.e. the mean-shortest path length among two nodes grows logarithmically (or even slower) with . While the latter requirement is a common property of random graphs [77, 78], the clustering coefficient deserves much more attention also due to the basic role it covers in biological [86, 87] and social networks [52, 53].

The clustering coefficient measures the likelihood that two neighbors of a node are linked themselves; a higher clustering coefficient indicates a greater “cliquishness”. Two versions of this measure exist [77, 78]: global and local; as for the latter the coefficient associated to a node tells how well connected the neighborhood of is. If the neighborhood is fully connected, is , while a value close to means that there are hardly any connections in the neighborhood.

The clustering coefficient of a node is defined as the ratio between the number of connections in the neighborhood of that node and the number of connections if the neighborhood was fully connected. Here neighborhood of node means the nodes that are connected to but does not include itself. Therefore we have

 ci=2Eizi(zi−1), (3.27)

where is the number of actual links present, while is the number of connections for a fully connected group of nodes. Of course, for the Erdös-Renyi graph where each link is independently drawn with a probability , one has , regardless of the node considered.

We now estimate the clustering coefficient for the graph , focusing the attention on a range of such that the average number of non-null entries per string is small enough for the link probability to be strictly lower than so that the topology is non trivial; to fix ideas and recalling last section . Let us consider a string displaying non-null entries, corresponding to the positions , and nearest-neighbors; the latter can be divided in groups: strings belonging to the -th group have . Neglecting the possibility that a nearest-neighbor can belong to more than one group contemporary (in the thermodynamic limit this is consistent with Eq. 3.26), we denote with the number of nodes belonging to the -th group, being , whose average value is (which, due to the above assumptions is larger than one). Now, nodes belonging to the same group are all connected with each other as they share at least one common trait, i.e. they form a clique; the contribute of intra-group links is

 (3.28)

while the contribute of inter-group links can be estimated as

 Einter≈ρ∑i,j=1,i≠jninj~p≈(zρ)2(ρ2)~p, (3.29)

where is the probability for two nodes linked to and belonging to different groups to be connected, and the sum runs over all possible couples of groups. Hence, the total number of links among neighbors is , where is the Kronecker delta returning if and zero otherwise; of course, for we have and .

Now, in the average, the probability is smaller than as it represents the probability for two strings of length and displaying an average number of non-null entries equal to to be connected. However, for and not too small the two probabilities converge so that by summing the two contributes in eq. (3.28) and (3.29) we get

 E≈12[(zρ)2ρ−z]+(zρ)2(ρ2)~p⇒c≈p+1ρ−1z−1>p, (3.30)

where in the last inequality we used . Therefore, it follows straightforward that is larger than the clustering coefficient expected for an ER graph displaying the same connectivity, that is .

From previous arguments it is clear that the SW effect gets more evident, with respect to the ER case taken as reference, when the network is highly diluted. This is confirmed by numerical data: Fig. 3.2 shows in the lower panel the clustering coefficient expected for the analogous ER graph, namely , while in the upper panel it shows the difference between the average local clustering coefficient and itself. Of course, when approaches , the graph gets fully connected and .

Finally we mention that when focusing on the low storage regime, a non-trivial distribution for couplings can give rise to interesting effects. Indeed, weak ties can be shown [88] to work as bridges connecting communities strongly linked up, as typical of real networks [52, 89]. Also, as often found in technological and biological networks, the graph under study display a “dissortative mixing” [77, 78], that is to say, high-degree vertices prefer to attach to low-degree nodes [88].

## 4 Thermodynamics

So far the emergent network has been exhaustively described by a random, correlated graph whose links are endowed with weights; we now build up a quantitative thermodynamics on such a structure.

Once the Hamiltonian is given (eq.  2.2), we can introduce the partition function as

 ZV(β;ξ)=∑σe−βHV(σ;ξ), (4.1)

the Boltzmann state as

 ω(.)=∑σ.e−βHV(σ;ξ)ZV(β;ξ), (4.2)

and the related free energy as

 A(β,α,a)=limV→∞1VElogZV(β;ξ), (4.3)

where averages over the quenched distributions of the affinities .
Once the free energy (or equivalently the pressure) is obtained, remembering that (calling the entropy and the internal energy)

 A(β,α,a)=−βf(β,α,a)=S(β,α,a)−βU(β,α,a),

the whole macroscopic properties, thermodynamics, can be derived due the Legendre structure of thermodynamic potentials [67].

### 4.1 Free energy trough extended double stochastic stability

For the sake of clearness now we expose in complete generality and details the whole plan dealing with a generic expectation on (i.e. ), then, we will study the scaling, in which must tend to more carefully.
With this palimpsest in mind, let us normalize the Hamiltonian in a more convenient form for this section (i.e. dividing by the , such that the effective coupling is bounded by ), and let us neglect the external field which can be implemented later straightforwardly.

 HV(σ;ξ)=1VLV∑ijL∑μξμiξμjσiσj. (4.4)

As a next step, through the Hubbard-Stratonovick transformation [67, 41], we map the partition function of our Hamiltonian into a bipartite Erdös-Rényi ferromagnetic random graph [3][47], whose parties are the former built by the agents and a new one built of by Gaussian variables , :

 Z(β;ξ)=∑σexp(−βHV(σ;ξ))=∑σ∫+∞−∞L∏μ=1dμ(zμ)exp(√βLVV∑iL∑μξi,μσizμ), (4.5)

where with we mean the Gaussian measure on the product space of the Gaussian party. Note that, even when goes to infinity linearly with (as in the high storage Hopfield model [11]), due to the normalization encoded into the affinity product of the ’s nor the -diagonal term contribute to the free energy (as happens in the neural network counterpart [23]), neither (but this will be clear at the end of the section) there is a true dependence by in the thermodynamics.
Furthermore, notice that the graph of the interactions among the two parties is now a simple, and no longer weighted, Erdös-Rényi [14]: so we started with a complex topology for a single party and we turned this problem in solving the thermodynamics for a simpler topology but paying the price of accounting for another party in interaction. The lack of weight on links will have fundamental importance when defining the order parameters.
Another approach to this is noticing that if we dilute -randomly- directly the Hopfield model (i.e. as checking for its robustness as already tested by Amit [10]) we push it on an Erdos-Renyi topology, while if we dilute its entries in pattern definitions (due to the Hebbian kernel) we have to deal with correlated dilution.
Consequently (strictly speaking assuming the existence of the limit) we want to solve for the following free energy:

 A(β,α,a)=limV→∞1VElog∑σ∫+∞−∞L∏μdμ(zμ)exp(√βLVV∑iL∑μξi,μσizμ). (4.6)

To this task we extend the method of the double stochastic stability recently developed in [23] in the context of neural networks. Namely we introduce independent random fields and , (whose probability distribution is the same as for the variables -as in every cavity approach-), which account for one-body interactions for the agents of the two parties. So our task is to interpolate among the original system and the one left with only these random perturbations: Let us use for such an interpolation; the trial free energy is then introduced as follows

 A(t) = limV→∞1VElog∑σ∫+∞−∞L∏μdμ(zμ)⋅ ⋅ exp(t√βLVVL∑iμξiμσizμ+(1−t)[L∑lc=1blcV∑iηiσi+V∑lb=1clbL∑μχμzμ),

where now and [with ], and [with ] are real numbers (possibly functions of ) to be set a posteriori.
As the theory is no longer Gaussian, we need infinite sets of random fields (mapping the presence of multi-overlaps in standard dilution[3][43] and no longer only the first two momenta of the distributions).
Of course we recover the proper free energy by evaluating the trial at , , which we want to obtain by using the fundamental theorem of calculus:

 A(1)=A(0)+∫10(∂A(t′)/∂t′)t′=tdt. (4.8)

To this task we need two objects: The trial free energy evaluated at and its -streaming .
Before outlining the calculations, some definitions are in order here to lighten the notation: taken as a generic function of the quenched variables we have

 Eηg(η)=V∑lb=0P(lb)g(ηlb)=V∑lb=0(Vlb)(1+a2)V−lb(1−a2)lbg(ηlb), (4.9) Eχg(χ)=L∑lc=0P(lc)g(χlc)=L∑lc=0(Llc)(1+a2)L−lc(1−a2)lcg(χlc), (4.10) Eξg(ξ)=V∑lb=0L∑lc=0(V)lb(Llc)(1+a2)lb+lc(1−a2)V+L−lb−lcδlblc=l, (4.11)

where is the probability that (out of random fields) are active, i.e. , so that the number of spins effectively contributing to the function is ; analogously, mutatis mutandis, for . Moreover, in the last equation we summed over the probability that in the bipartite graph a number of links out of the possible display a non-null coupling, i.e. ; interestingly, eq. (4.10) can be rewritten in terms of the above mentioned and . In fact, can be looked at as an matrix generated by the product of two given vectors like and , namely , in such a way that the number of non-null entries in the overall matrix is just given by the number of non-null entries displayed by times the number of non-null entries displayed by . Hence, is the product of and conditional to .

### 4.2 The ‘topologically microcanonical” order parameters

Starting with the streaming of eq. (4.1), this operation gives raise to the sum of three terms . The former when deriving the first contribution into the exponential, the last two terms when deriving the two contributions by all the and .

 A = +1V√βLVV,L∑i,μEξiμω(σizμ)=√αβ(1+a2)V,L∑lb,lcP(lb)P(lc)MlbNlc (4.12) B = −L∑lc=1blcVV∑iEηiω(σi)=−L∑lc=1blc(1+a2)V∑lb=0P(lb)Mlb (4.13) C = −V∑lb=1clbNL∑μEχμω(zμ)=−√αV∑lb=1clb(1+a2)L∑lc=0P(lc)Nlc, (4.14)

where we introduced the following order parameters

 Mlb=1VV∑iωlb+1(σi), (4.15) Nlc=1LL∑μωlc+1(zμ), (4.16)

and the Boltzmann states are defined by taking into account only terms among the elements of the party involved.
Of course the Boltzmann states are no longer the ones introduced into the definition (4.2) but the extended ones taking into account the interpolating structure of the cavity fields (which however will recover the originals of statistical mechanics when evaluated at ).
Namely, has only terms of the type in the Maxwell-Boltzmann exponential, ultimately accounting for the (all equivalent in distribution) values of , all the others being zero.
In the same way has only terms of the type in the Maxwell-Boltzmann exponential, ultimately accounting for the (all equivalent in distribution) values of , all the others being zero.
When dealing with we can decompose the latter accordingly to what discussed before. By these “partial Boltzmann states” we can define the averages of the order parameters as

 ⟨M⟩ = V−1∑lbP(lb)Mlb, (4.17) ⟨N⟩ = L−1∑lcP(lc)Nlc. (4.18)

These objects may deserve more explanations because, as a main difference with classical approaches [3][39][43], here replicas and their overlaps are not involved (somehow suggesting the implicit correctness of a replica symmetric scenario). Conversely, we do conceptually two (standard) operations when introducing our order parameters: at first we average over the (-extended) Boltzmann measure, then we average over the quenched distributions. Let us consider only one party for simplicity: during the first operation we do not take the whole party size but only a subsystem, say spins (whose distribution is symmetric with respect to for both the parties, for the dichotomic, Gaussians for the continuous one). Then, in the second average, for any from to the volume of the party, we consider all the possible links among these nodes in this subgraph. As the links connecting the nodes are always constant (i.e. equal to one due to the Hubbard-Stratonovich transformation ) in the intensity, the resulting associated energies are, in distribution and in the thermodynamic limit, all equivalent: We are introducing a family of microcanonical observables which sum up to a canonical one, in some sense close to the decomposition introduced in [22].

### 4.3 The sum rule

Let us now move on and consider the following source of the fluctuations of the order parameters, where stand for the replica symmetric values444strictly speaking there are no replicas here but configurations over different graphs. However the expression RS-approximation, meaning that we assume the probability distribution of the order parameters delta-like over their average (denoted with a bar) is a sort of self-averaging and is an hinge in disordered statistical mechanics such that we allow ourselves to retain the same expression with a little abuse of language. of the previously introduced order parameters:

 S = (1+a2)√αβV−1∑lbL−1∑lcP(lb)P(lc)((Mlb−¯Ml