# Statistics for the triangle density in ergm and its mean-field approximation

Elena Magnanini WIAS Berlin.
<EMAIL_ADDRESS>Giacomo Passuello Dipartimento di Matematica “Tullio
Levi-Civita”, Università di Padova.
<EMAIL_ADDRESS>
###### Abstract

We consider the edge-triangle model (or Strauss model), and focus on the
asymptotic behavior of the triangle density when the size of the graph
increases to infinity. This random graph belongs to the class of exponential
random graphs, which follows the statistical mechanics approach of introducing
a Hamiltonian to weigh the probability measure on the state space of graphs.
In the analyticity region of the free energy, we prove a law of large numbers
for the triangle density. Along the critical curve, where analyticity breaks
down, we show that the triangle density concentrates with high probability in
a neighborhood of its typical value. A predominant part of our work is devoted
to the study of a mean-field approximation of the edge-triangle model, where
explicit computations are possible. In this setting we can go further, and
additionally prove a standard and non-standard central limit theorem at the
critical point, together with many concentration results obtained via large
deviations and statistical mechanics techniques. Despite a rigorous comparison
between these two models is still lacking, we believe that they are
asymptotically equivalent in many respects, therefore we formulate conjectures
on the edge-triangle model, partially supported by simulations, based on the
mean-field investigation.

Keywords: exponential random graphs, edge-triangle model, mean-field
approximation, large deviations, phase transition, standard and non-standard
limit theorems.

AMS Subject Classification 2010: 60F05, 60F15, 05C80, 60F10, 60B10.

###### Contents

  1. 1 Introduction
  2. 2 Models and background
    1. 2.1 Exponential random graphs
    2. 2.2 Presentation of the models
    3. 2.3 Notation and preliminaries
  3. 3 Main results
    1. 3.1 Edge-triangle model
    2. 3.2 Mean-field approximation
  4. 4 Proofs: edge-triangle model
    1. 4.1 Derivatives of the free energy
    2. 4.2 Key results on graph limits
    3. 4.3 Exponential convergence
    4. 4.4 SLLN
  5. 5 Proofs: mean-field approximation
    1. 5.1 Preliminaries
    2. 5.2 SLLN
    3. 5.3 Phase coexistence on the critical curve
    4. 5.4 Mean-field convergence error
    5. 5.5 CLT (off the critical curve)
    6. 5.6 Conditional measures
  6. 6 Conjectures and simulations
    1. 6.1 Conjectures and heuristics
    2. 6.2 Simulations

##  1 Introduction

Exponential random graphs are an ubiquitous class of models able to capture
common network tendencies, such as clustering. Clustering is typically related
to the presence of triangles in a graph. This can be easily motivated, for
example, in the context of social networks; if two people share a common
friend, or interest, it is more likely that they form a connection themselves.
One of the main questions among sociologists is to understand how connectivity
in local communities can affect the overall network structure [10, 21, 17,
18]. This can be done by introducing a probability measure that is a function
of the densities of certain given finite subgraphs (such as edges or
triangles), thus biasing their occurrence, and then analyzing the large-scale
properties of random networks sampled according to this distribution. Sampling
is typically performed by means of Monte Carlo methods, such as the Glauber
dynamics or the Metropolis–Hastings procedure [3]. By following a statistical
mechanics approach, the bias is encoded by a function called _Hamiltonian_ ,
contained in an exponential term, and the probability measure is then a _Gibbs
distribution_ [35, 33, 34]. Such class of graphs is particularly interesting
since the Gibbs measure has the special property, among all other
distributions (_ensemble_) over the space of simple graphs, to assign higher
probability to graphs that fit better some prescribed constraints imposed by a
given set of observations. This is of course very helpful if we want to build
a mathematical model that encodes properties that are similar to those
observed in a real network. Specifically, according to the Maximum Entropy
Principle introduced by Jaynes [24, 25], this distribution maximizes the so-
called _Gibbs entropy_ subject to the known constraints.

From a probabilistic perspective, exponential random graphs represent a
generalization of the dense Erdős-Rényi random graph [16], as their
probability distribution is obtained by tilting the Erdős-Rényi measure by an
exponential weight that contains different subgraph densities, thus
introducing some dependence between the random edges. Many important and
rigorous results on the model have been obtained so far [13, 12, 11],
sometimes imposing constraints on subgraph densities [26, 32].

Our analysis will be focused on the (unconstrained) edge-triangle model [37],
a two-parameter family of exponential random graphs in which dependence
between the random edges is defined through triangles, and its _mean-field_
approximation [5]. In both cases, a crucial point, which is also preparatory
for understanding phase transitions, is the derivation of the limiting _free
energy_. For the edge-triangle model, the analytical expression of this
function is known, together with its phase diagram, in a region of parameters
called _replica symmetric regime_ [13, 12], where it can be characterized as
the solution of a one-dimensional maximization problem. Inside the replica
symmetric region the analyticity of the free-energy may break down, thus
revealing a phase transition [12, 36, 2]. This happens along a critical curve
that ends in a critical point where the phase transition is of second order.
As expected, the edge-triangle model and its mean-field approximation share
the same limiting free energy, and this is a crucial property that motivates
all our analysis.

Regarding the first model, one of the key results of our paper is the
characterization of the limiting behavior of the triangle density (as the
graph size $n$ tends to infinity) within the replica-symmetric regime. Our
analysis provides a strong law of large numbers whenever the parameters
$(\alpha,h)$ (of triangles and edges, respectively) are taken outside the
critical curve, and proves that on the critical curve the triangle density
concentrates with high probability in a neighborhood of the free energy
maximizers. Our results extend to other graph statistics.

As mentioned, the predominant part of our investigation is concerned with the
mean-field approximation. Its major advantage is that the Hamiltonian can be
expressed as a function of the edge density, and exact computations are
possible (like in the _Curie–Weiss_ model). In this setting, we consider an
approximated triangle density for which we prove a central limit theorem
whenever the parameters lie outside the critical curve and away from the
critical point. We also characterize the fluctuations of the triangle density
at the critical point, presenting a non-standard central limit theorem with
scaling exponent $3/2$. Some heuristic computations based on large deviations
estimates, suggest that the triangle density in the edge-triangle model may
exhibit the same limiting behavior as the mean-field approximation. We then
formulate conjectures about fluctuations of the triangle density in the whole
replica symmetric regime (which also includes the critical curve and the
critical point).

The paper is organized as follows. In Sec. 2 we introduce the exponential
random graph family and we recall many results present in the literature. We
then focus on the edge-triangle model and its mean-field approximation and
collect some main properties. In Sec. 3 we state our results, first for the
edge-triangle model, and then for its mean-field approximation. Secs. 4–5 are
devoted to the proofs. Sec. 4 contains the proof of the strong law of large
numbers given in Thm. 3.1, which is based on the exponential convergence of
the sequence of triangle densities, together with the proof of Thm. 3.2, which
provides a concentration result valid on the critical curve. Thms. 3.3–3.4
generalize these statements to any simple graph. Sec. 5 is entirely devoted to
the mean-field model: we prove the analogs of the results derived for the
edge-triangle model in the previous section, sometimes in a stronger form, and
we can go further, by characterizing the fluctuations of the triangle density
up to the critical point (Thms. 3.7 and 3.8). These results are extended in
Thm. 3.13 to the critical curve under a suitable conditional measure. As a
byproduct of this analysis, in Props. 3.9 and 3.14, we determine the speed of
convergence of the average triangle density in the unconditional and
conditional settings. Finally, Sec. 6 is dedicated to a less rigorous
discussion, where we present the conjectures on the edge-triangle model
inspired by the analysis of its mean-field approximation, supported by both
heuristic computations and simulations.

##  2 Models and background

###  2.1 Exponential random graphs

As we pointed out before, exponential random graphs (ERGs) are a class of
random graphs where the probability measure over the state space is tilted by
a function called Hamiltonian, devised to enhance or decrease the probability
of certain structures in the graph. Before giving its definition we need to
introduce the notion of homomorphism density.

######  Definition 2.1 (homomorphism).

A homomorphism from a graph $H$ to a graph $G$ is a mapping (not necessarily
bijective) $\varphi:V(H)\rightarrow V(G)$ such that if $u,w$ are adjacent in
$H$, then $\varphi(u),\varphi(w)$ are adjacent in $G$.

Note that $\varphi$ preserves adjacency but not non-adjacency. We denote by
$|\text{hom}(H,G)|$ the number of homomorphism of a graph $H$ in $G$. For
example, if $H$ is a triangle then $|\text{hom}(H,G)|=6T_{n}(G)$, where
$T_{n}(G)$ denotes the number of triangles in $G$. If $H$ is not a complete
subgraph, the counting is more complicated. For example, if $H$ is a _two-
star_ 111A two-star is a path of length $2$, which has $3$ vertices and $2$
edges. (or _wedge_) and $G$ is a triangle, then $|\text{hom}(H,G)|=3\cdot
2^{2}$; indeed, there are three copies of $H$ in $G$ (one for each root) and
for each of them 4 possible homorphisms. We define the homomorphism density as

$t(H,G):=\frac{|\text{hom}(H,G)|}{|V(G)|^{|V(H)|}}.$ (2.1)

In this paper we deal with simple graphs on $n$ labeled vertices and we denote
by $\mathcal{G}_{n}$ the set of such graphs. For any $k\in\mathbb{N}$, we
consider $H_{1},H_{2},\dots,H_{k}$ 222Here the subscript denotes the
progressive numbering and has nothing to do with the number of vertices or
edges.  pre-chosen finite simple graphs (such as edges, stars, triangles,
cycles, …) weighted by a collection of real parameters contained in the vector
$\boldsymbol{\beta}=(\beta_{1},\dots,\beta_{k})$. The Hamiltonian is a
function $\mathcal{H}_{n;\boldsymbol{\beta}}:\mathcal{G}_{n}\to\mathbb{R}$
defined as

$\mathcal{H}_{n;\boldsymbol{{\beta}}}(G):=n^{2}\sum_{i=1}^{k}\beta_{i}t(H_{i},G)\,,\quad\mbox{
for }G\in\mathcal{G}_{n}.$ (2.2)

As probability measure on the space $\mathcal{G}_{n}$ we take the Gibbs
probability density

$\mu_{n;\boldsymbol{{\beta}}}(G):=\frac{\exp\left(\mathcal{H}_{n,\boldsymbol{{\beta}}}(G)\right)}{Z_{n;\boldsymbol{{\beta}}}},\quad\text{with
}Z_{n;\boldsymbol{{\beta}}}:=\sum_{G\in\mathcal{G}_{n}}\exp\left(\mathcal{H}_{n;\boldsymbol{{\beta}}}(G)\right),$
(2.3)

where the normalizing constant $Z_{n;\boldsymbol{\beta}}$ is called partition
function. Random graphs whose distribution is a Gibbs measure of the form
(2.3) are called exponential random graphs. We will denote the related Gibbs
measure and average by ${\mathbb{P}}_{n;\boldsymbol{{\beta}}}$ and
${\mathbb{E}}_{n;\boldsymbol{{\beta}}}$, respectively. Two crucial functions
for studying the model are the finite-size and infinite-size free energy:

$f_{n;\boldsymbol{{\beta}}}\,:=\frac{1}{n^{2}}\ln
Z_{n;\boldsymbol{{\beta}}}\,\quad\text{ and }\quad
f_{\boldsymbol{{\beta}}}\,:=\lim_{n\to+\infty}f_{n;\boldsymbol{{\beta}}}\,.$
(2.4)

A lack of analyticity in $f_{\boldsymbol{{\beta}}}$ characterizes the presence
of a phase transition. An explicit expression of this function has been
obtained in [13] when the vector of parameters $\boldsymbol{\beta}$ lies in a
specific region called _replica-symmetric regime_ (term borrowed from spin
glasses theory). As stated in [13, Thm. 4.1], if $\beta_{2},\dots,\beta_{k}$
are non-negative, then

$f_{\boldsymbol{{\beta}}}\,=\,\sup_{0\leq
u\leq\,1}\left(\sum_{i=1}^{k}\beta_{i}\,u^{E(H_{i})}-\frac{1}{2}I(u)\right),$
(2.5)

where $E(H_{i})$ denotes the number of edges in $H_{i}$ and $I(u):=u\ln
u+(1-u)\ln(1-u)$. Despite this result covers only non-negative values of the
parameters, the replica symmetric regime can be slightly extended including
(not too big) negative values of $\beta_{2},\dots,\beta_{k}$ (see [13], Thm.
4.2). More precisely, (2.5) holds whenever $\beta_{2},\dots,\beta_{k}$ are
such that

$\sum_{i=2}^{k}|\beta_{i}|E(H_{i})(E(H_{i})-1)<2\,.$ (2.6)

###  2.2 Presentation of the models

The _edge-triangle_ or _Strauss model_ [37] is obtained by considering only
the contribution of edges and triangles in the Hamiltonian (2.2). By
convention we assume $H_{1}$ to be a single edge and $H_{2}$ to be a triangle.
More precisely, by setting $\beta_{3}=\cdots=\beta_{k}=0$ in (2.2), we get

$\mathcal{H}_{n;\boldsymbol{\beta}}(G)=n^{2}\left[\beta_{1}t(H_{1},G)+\beta_{2}t(H_{2},G)\right]\qquad
G\in\mathcal{G}_{n}\,.$

Let $E_{n}(G)$ (resp. $T_{n}(G)$) denote the number of edges (resp. triangles)
in $G$. By recalling Def. 2.1 of homomorphism density, we have

$t(H_{1},G)=\frac{2E_{n}(G)}{n^{2}}\quad\text{ and }\quad
t(H_{2},G)=\frac{6T_{n}(G)}{n^{3}}.$ (2.7)

Therefore, by performing the change of variable $h:=2\beta_{1}$;
$\alpha:=6\beta_{2}$, we can equivalently consider

$\mathcal{H}_{n;{\alpha},h}(G)=\frac{{\alpha}}{n}T_{n}(G)+hE_{n}(G)\quad\text{
with }{\alpha},h\in{\mathbb{R}}\,.$ (2.8)

We will denote by ${\mathbb{P}}_{n;{\alpha},h}$ the Gibbs measure related to
this Hamiltonian, and by ${\mathbb{E}}_{n;{\alpha},h}$ the corresponding
expectation. Notice that in this setting condition (2.6) reads
$|\alpha|=6|\beta_{2}|<2$, and, therefore, the replica symmetric regime
coincides with the region $\alpha>-2$, $h\in\mathbb{R}$. The free energy (2.5)
reduces then to

$f_{{\alpha},h}\,=\,\sup_{0\leq u\leq
1}\left(\frac{\alpha}{6}u^{3}+\frac{h}{2}u-\frac{1}{2}I(u)\right)\,=\,\frac{{\alpha}}{6}{(u^{*})}^{3}+\frac{h}{2}u^{*}-\frac{1}{2}I(u^{*}),$
(2.9)

where $I(u)$ is defined below (2.5) and $u^{*}=u^{*}(\alpha,h)$ is a maximizer
that solves the fixed-point equation

$\frac{e^{\alpha\,u^{2}+h}}{1+e^{\alpha\,u^{2}+h}}=u\,.$ (2.10)

A numerical investigation of the optimizers of the free energy when $\alpha$
is negative and $|\alpha|$ is large has been done in [20]. Equation (2.10) can
admit more than one solution at which the supremum in (2.9) is attained, and
this denotes the presence of a phase transition inside the replica symmetric
regime. When the parameters $\alpha,h$ are chosen in this region, the edge-
triangle model, when $n$ goes to infinity, becomes indistinguishable from an
Erdős-Rényi graphon with connection probability $u^{*}$ (we refer the reader
to Sec. 4.2, where these notions are made precise). This remains true even
when the supremum is not unique; in this case the parameter $u^{*}$ is
randomly chosen according to some (unknown) probability distribution on the
set of solutions of (2.9) (see [13], Thm. 4.2). The effect of the phase
transition is then a jump between very different values of the limiting Erdős-
Rényi graphon $u^{*}$.

#### Phase diagram.

We recall that the limiting free energy $f_{\alpha,h}$ is well defined on the
whole replica symmetric regime $\alpha>-2$, $h\in\mathbb{R}$. However, the
fixed point equation (2.10) can admit more than one solution, and this is
strictly related to the loss of analyticity of $f_{\alpha,h}$. More precisely,
(2.10) has exactly one solution on the whole replica symmetric regime except
for a certain critical curve $\mathcal{M}^{rs}$ that starts at the critical
point $(\alpha_{c},h_{c}):=\left(\frac{27}{8},\ln 2-\frac{3}{2}\right)$ and
that can be written as $h=q(\alpha)$ for a (non-explicit) continuous and
strictly decreasing function $q$:

$\mathcal{M}^{rs}:=\left\\{(\alpha,h)\in(\alpha_{c},+\infty)\times(-\infty,h_{c}):h=q(\alpha)\right\\}.$
(2.11)

Figure 2.1: Illustration of the phase in replica symmetric regime taken from
[5]. The curve $\mathcal{M}^{rs}$ (2.11) represents the region of $(\alpha,h)$
where the optimization problem (2.9) admits two solutions. Inside the blue
region, that includes the critical point $(\alpha_{c},h_{c})$, the scalar
problem (2.9) admits a unique solution.

In [36, Prop. 3.2] it has been proved that off the curve $\mathcal{M}^{rs}$
the scalar problem (2.9) admits one solution, whereas it has exactly two
solutions along the curve $\mathcal{M}^{rs}$. The free energy is analytic on
the region $\mathcal{U}^{rs}\setminus\\{(\alpha_{c},h_{c})\\}$, where

$\mathcal{U}^{rs}:=\left((-2,+\infty)\,\times\mathbb{R}\right)\setminus\mathcal{M}^{rs}.$
(2.12)

Moreover, at the critical point $(\alpha_{c},h_{c})$ the second order partial
derivatives of $f_{\alpha,h}$ diverge (see [36], Thm. 2.1), therefore we
observe a second order phase transition. Finally, along the curve
$\mathcal{M}^{rs}$ the first order partial derivatives of $f_{\alpha,h}$ have
jump discontinuities, and we observe a first order phase transition. Fig. 2.1
provides a qualitative representation of the phase diagram.

#### Approximating the number of triangles.

As a consequence of the convergence of the ERG to the Erdős-Rényi graphon with
parameter $u^{*}$ (which holds in probability w.r.t. the so-called _cut
distance_ , see [13, Thm. 4.2]), we can heuristically approximate the triangle
density (as well as other graph-statistics) in the large $n$ limit. The Erdős-
Rényi random graph with parameter $u^{*}$ and $n$ vertices has, on average,
${u^{*}}^{3}\binom{n}{3}$ triangles and $u^{*}\binom{n}{2}$ edges. We observe
that

${u^{*}}^{3}\binom{n}{3}\approx\frac{4}{3n^{3}}\left(u^{*}\binom{n}{2}\right)^{3}.$

What we expect is that the same holds, within the replica symmetric regime and
when $n$ is large, for the ERG. Thus, we introduce the approximated count of
triangles

$T_{n}(G)\approx\frac{4}{3n^{3}}E_{n}(G)^{3}=:\bar{T}_{n}(G).$ (2.13)

Alternatively, going back to Def. 2.1 of homomorphism density, we can
equivalently say that we approximate the number of triangles
$T_{n}(G)=\frac{n^{3}t(H_{2},G)}{6}$ (see (2.7)) with
$\bar{T}_{n}(G)=\frac{n^{3}t^{3}(H_{1},G)}{6}$.

#### Mean-field approximation.

Definition (2.13) leads to the following mean-field approximation, originally
introduced in [5], of the edge-triangle Hamiltonian (2.8):

$\bar{\mathcal{H}}_{n;\alpha,h}(G):=\frac{\alpha}{n}\bar{T}_{n}(G)+hE_{n}(G)\,,\quad\text{
for }G\in\mathcal{G}_{n}.$ (2.14)

We borrow this terminology from statistical mechanics, due to the similarities
with the _Curie–Weiss_ model (see e.g. [19, Chap. 2]), which we are going to
highlight further in the next paragraph. The big advantage of Hamiltonian
(2.14) is that it is just a function of the one dimensional parameter
$t(H_{1},G)=\frac{2E_{n}(G)}{n^{2}}$, taking values in
${\Gamma}_{n}:=\left\\{0,\frac{2}{n^{2}},\dots,1-\frac{1}{n}\right\\}$. We
denote by $\bar{{\mathbb{P}}}_{n;{\alpha},h}$ and
$\bar{{\mathbb{E}}}_{n;{\alpha},h}$ the corresponding measure and expectation,
respectively. Moreover, as usual, we define the finite size free energy as

$\bar{f}_{n;\alpha,h}:=\frac{1}{n^{2}}\ln\bar{Z}_{n;\alpha,h}.$ (2.15)

A crucial property of this approximated model is the following (see [5, Thm.
8.2]). Let $(\alpha,h)\in(-2,+\infty)\times\mathbb{R}$ and let $f_{\alpha,h}$
as in (2.9). Then

$\lim_{n\to+\infty}\bar{f}_{n;\alpha,h}=f_{\alpha,h}\,.$ (2.16)

In other words, the edge-triangle model and this mean-field approximation
share the same infinite volume free energy; this result will be extensively
used in the proofs of Sec. 5.

###  2.3 Notation and preliminaries

We denote by $\mathcal{E}_{n}$ the edge set of the complete graph on $n$
vertices, with elements labeled from 1 to $\binom{n}{2}$ and we set
$\mathcal{A}_{n}:=\\{0,1\\}^{\mathcal{E}_{n}}$. We observe that there is a
one-to-one correspondence between $\mathcal{A}_{n}$ and the set of $n\times n$
symmetric adjacency matrices with zeros on the diagonal and the graphs in
$\mathcal{G}_{n}$. As a consequence, to each graph $G\in\mathcal{G}_{n}$ we
can associate an element ${x}=(x_{i})_{i\in\mathcal{E}_{n}}\in\mathcal{A}_{n}$
where $x_{i}=1$ if the edge $i$ is present in $G$, and $x_{i}=0$ otherwise.
With an abuse of nomenclature, in the rest of the paper we will refer to the
elements of $\mathcal{A}_{n}$ as adjacency matrices, and we will write
$E_{n}(x)=E_{n}(G)$, $T_{n}(x)=T_{n}(G)$ and $\bar{T}_{n}(x)=\bar{T}_{n}(G)$
whenever $x\in\mathcal{A}_{n}$ is the adjacency matrix of a graph
$G\in\mathcal{G}_{n}$. This representation allows for the following equivalent
formulation of the Hamiltonians (2.8)–(2.14), as functions on
$\mathcal{A}_{n}$:

$\mathcal{H}_{n;\alpha,h}(x)=\frac{\alpha}{n}\sum_{\\{i,j,k\\}\in\mathcal{T}_{n}}x_{i}x_{j}x_{k}+h\sum_{i\in\mathcal{E}_{n}}x_{i},$
(2.17)
$\bar{\mathcal{H}}_{n;\alpha,h}(x)=\frac{4\alpha}{3n^{4}}\Big{(}\sum_{i\in\mathcal{E}_{n}}x_{i}\Big{)}^{3}+h\sum_{i\in\mathcal{E}_{n}}x_{i},$
(2.18)

where $\mathcal{T}_{n}:=\\{\\{i,j,k\\}\subset\mathcal{E}_{n}:\\{i,j,k\\}\text{
is a triangle}\\}$. The Gibbs probability $\mathbb{P}_{n;{\alpha},h}$ (resp.
$\bar{\mathbb{P}}_{n;{\alpha},h}$) will act consequently on $\mathcal{A}_{n}$.

######  Remark 2.2.

The sequence of measures $(\mathbb{P}_{n;\alpha,h})_{n\geq 1}$ (as well as
$(\bar{\mathbb{P}}_{n;\alpha,h})_{n\geq 1}$) satisfies proper consistency
conditions allowing for the application of Kolmogorov Existence Theorem (see,
for example, Appendix A.7 in [15]). As a consequence, there exists a unique
probability measure ${\mathbb{P}}_{{\alpha},h}$ on the space
$\left(\\{0,1\\}^{{\mathbb{N}}},\mathcal{B}(\\{0,1\\}^{{\mathbb{N}}})\right)$
with marginals corresponding to the measures ${\mathbb{P}}_{n;{\alpha},h}$,
for all $n\in{\mathbb{N}}$ (here $\mathcal{B}$ denotes the Borel
$\sigma-$algebra).

######  Remark 2.3.

Note that Hamiltonian (2.17) has the same form of the energy function
typically used in interacting particle systems. By making a parallelism with
the Curie–Weiss model, we can think of an ERG as a system where each edge is a
particle having a _spin_ ($0$ or $1$), which interacts with its neighbors. The
notion of “neighbor” depends on the specific choice of the subgraphs
$H_{1},\dots,H_{k}$; for the edge-triangle model, two edges are neighbors if
they are adjacent. This interaction is local, however, if we ignore the
relative position of edges, we recover (2.18):

$\sum_{\\{i,j,k\\}\in\mathcal{T}_{n}}x_{i}x_{j}x_{k}=\sum_{i\in{\mathcal{E}_{n}}}x_{i}\sum_{\begin{subarray}{c}j,k\in\mathcal{E}_{n}:\\\
\\{i,j,k\\}\in\mathcal{T}_{n}\end{subarray}}x_{j}x_{k}\approx\sum_{i\in{\mathcal{E}_{n}}}x_{i}\sum_{j,k\in\mathcal{E}_{n}}\frac{4x_{j}x_{k}}{3n^{3}}\,,$

where the factor $4$ appears when we replace the number of wedges roughly with
$\left(\frac{2}{n^{2}}\sum_{i\in{\mathcal{E}_{n}}}x_{i}\right)^{2}$, and
adjusting the normalization in accordance with the choice
$x=(x_{i})_{i\in{\mathcal{E}_{n}}}\equiv 1$. The factor $1/3$ avoids
overcounting.

We are interested in understanding the asymptotic behavior of the number of
triangles. Let $X=(X_{i})_{i\in\mathcal{E}_{n}}\in\mathcal{A}_{n}$ be the
random adjacency matrix of an ERG with law $\mu_{n;{\alpha},h}$. We consider
the random variables

$E_{n}\,\equiv\,E_{n}(X)=\,\sum_{i\in\mathcal{E}_{n}}X_{i}\,,$ (2.19)
$T_{n}\,\equiv\,T_{n}(X)=\,\sum_{\\{i,j,k\\}\in\mathcal{T}_{n}}X_{i}X_{j}X_{k}\,,$
(2.20)
$\bar{T}_{n}\,\equiv\,\bar{T}_{n}(X)=\,\frac{4}{3n^{3}}\Big{(}\sum_{i\in\mathcal{E}_{n}}X_{i}\Big{)}^{3}.$
(2.21)

We prove classical limit theorems of the sequences $(T_{n})_{n\geq 1}$ and
$(\bar{T}_{n})_{n\geq 1}$ inside the replica symmetric regime. A predominant
part of our results is concerned with the sequence $(\bar{T}_{n})_{n\geq 1}$,
since the mean-field approximation encoded by the Hamiltonian (2.18) allows
for explicit computations.

######  Definition 2.4.

For each $n\in\mathbb{N}$, we define the average and the variance of the
triangle density, respectively of the edge-triangle model and of the mean-
field approximation, as

$\displaystyle
m^{\Delta}_{n}({\alpha},h):=\frac{6{\mathbb{E}}_{n;{\alpha},h}\left(\frac{T_{n}}{n}\right)}{n^{2}}\quad\text{
and }\quad
v^{\Delta}_{n}({\alpha},h):=\partial_{\alpha}m^{\Delta}_{n}({\alpha},h)$
(2.22)
$\displaystyle\bar{m}^{\Delta}_{n}({\alpha},h):=\frac{6\bar{{\mathbb{E}}}_{n;{\alpha},h}\left(\frac{\bar{T}_{n}}{n}\right)}{n^{2}}\quad\text{
and
}\quad\bar{v}^{\Delta}_{n}({\alpha},h):=\partial_{\alpha}\bar{m}^{\Delta}_{n}({\alpha},h).$
(2.23)

It is easy to see that

$\displaystyle\frac{{\mathbb{E}}_{n;{\alpha},h}\left(T_{n}\right)}{n^{3}}=\partial_{{\alpha}}f_{n;{\alpha},h}\quad$
$\displaystyle\text{ and
}\quad\frac{\text{Var}_{n;{\alpha},h}\left(T_{n}\right)}{n^{3}}=\partial_{{\alpha}{\alpha}}f_{n;{\alpha},h}$
(2.24)
$\displaystyle\frac{\bar{{\mathbb{E}}}_{n;{\alpha},h}\left(\bar{T}_{n}\right)}{n^{3}}=\partial_{{\alpha}}\bar{f}_{n;{\alpha},h}\quad$
$\displaystyle\text{ and
}\quad\frac{\text{Var}_{n;{\alpha},h}\left(\bar{T}_{n}\right)}{n^{3}}=\partial_{{\alpha}{\alpha}}\bar{f}_{n;{\alpha},h},$

therefore, $m^{\Delta}_{n}({\alpha},h)=6\partial_{{\alpha}}f_{n;{\alpha},h}$
and $v^{\Delta}_{n}({\alpha},h)=6\partial_{{\alpha}{\alpha}}f_{n;{\alpha},h}$
(and the same holds for $\bar{m}^{\Delta}_{n}({\alpha},h)$ and
$\bar{v}^{\Delta}_{n}({\alpha},h)$, replacing $f_{n;{\alpha},h}$ with
$\bar{f}_{n;{\alpha},h}$). In the rest of the paper we will use the following
notation to distinguish the optimizer(s) of the scalar problem (2.9),
sometimes dropping the dependence on $(\alpha,h)$ to the sake of readability:

$\begin{cases}u_{0}^{*}({\alpha},h)&\text{ if
}({\alpha},h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\},\\\
u_{1}^{*}({\alpha},h)\text{ and }u_{2}^{*}({\alpha},h)&\text{ if
}({\alpha},h)\in\mathcal{M}^{rs},\\\ u_{c}^{*}(\alpha,h)=\frac{2}{3}&\text{ if
}({\alpha},h)=({\alpha}_{c},h_{c})\,.\end{cases}$ (2.25)

We are now ready for stating our results.

##  3 Main results

###  3.1 Edge-triangle model

######  Theorem 3.1 (SLLN for $T_{n}$).

For all $(\alpha,h)\in\mathcal{U}^{rs}$,

$\frac{6T_{n}}{n^{3}}\,\xrightarrow{\;\;\mathrm{a.s.}\;\;}{}\,{u^{*}_{0}}^{3}(\alpha,h)\qquad\text{w.r.t.
}\mathbb{P}_{{\alpha},h},\text{ as }n\to+\infty,$ (3.1)

where $u^{*}_{0}$ solves the maximization problem (2.9).

######  Theorem 3.2.

For all $(\alpha,h)\in\mathcal{M}^{rs}$ and for all sufficiently small
$\varepsilon>0$, there exists a constant $\tau=\tau(\varepsilon;\alpha,h)>0$
such that if

$J(\varepsilon):=({u_{1}^{*}}^{3}(\alpha,h)-\varepsilon,{u_{1}^{*}}^{3}(\alpha,h)+\varepsilon)\cup({u_{2}^{*}}^{3}(\alpha,h)-\varepsilon,{u_{2}^{*}}^{3}(\alpha,h)+\varepsilon),$

then, for large enough $n$

$\mathbb{P}_{n;\alpha,h}\left(\frac{6T_{n}}{n^{3}}\in
J(\varepsilon)\right)\geq 1-e^{-\tau n^{2}},$

where $u_{1}^{*}(\alpha,h)$ and $u_{2}^{*}(\alpha,h)$ are the two maximizers
of the scalar problem (2.9).

By replacing the triangle homomorphism density by the homomorphism density of
any simple graph, we immediately obtain the following generalizations of Thm.
3.1 and Thm. 3.2.

#### Generalization to a generic simple graph.

Fix $k\in\mathbb{N}$ with $k>2$. Let $H_{k}$, be a pre-chosen finite simple
graph (such as a square, a cycle, a clique …) with $E(H_{k})$ edges, and let
$t(H_{k},G)$ be the homomorphism density (2.1) of $H_{k}$. The following
theorems characterize the asymptotic behavior of $(t(H_{k},\cdot))_{n\geq
1}$333This notation implies that we are considering the sequence of random
variables. in the replica symmetric regime.

######  Theorem 3.3.

For all $(\alpha,h)\in\mathcal{U}^{rs}$,

$t(H_{k},\cdot)\,\xrightarrow{\;\;\mathrm{a.s.}\;\;}{}\,{u^{*}_{0}}^{E(H_{k})}(\alpha,h)\qquad\text{w.r.t.
}\mathbb{P}_{{\alpha},h},\text{ as }n\to+\infty,$ (3.2)

where $u^{*}_{0}$ solves the maximization problem (2.9).

######  Theorem 3.4.

For all $(\alpha,h)\in\mathcal{M}^{rs}$ and for all sufficiently small
$\varepsilon>0$, there exists a constant $\tau=\tau(\varepsilon;\alpha,h)>0$
such that if

$J(\varepsilon):=({u_{1}^{*}}^{E(H_{k})}(\alpha,h)-\varepsilon,{u_{1}^{*}}^{E(H_{k})}(\alpha,h)+\varepsilon)\cup({u_{2}^{*}}^{E(H_{k})}(\alpha,h)-\varepsilon,{u_{2}^{*}}^{E(H_{k})}(\alpha,h)+\varepsilon),$

then, for large enough $n$

$\mathbb{P}_{n;\alpha,h}\left(t(H_{k},\cdot)\in J(\varepsilon)\right)\geq
1-e^{-\tau n^{2}},$

where $u_{1}^{*}(\alpha,h)$ and $u_{2}^{*}(\alpha,h)$ are the two maximizers
of the scalar problem (2.9).

After having proved a SLLN, it would be natural to investigate the
fluctuations of the triangle density around its mean value. In Sec. 6 we
perform simulations and provide conjectures, also based on the mean-field
investigation of Sec. 5. It is in order to stress that the Yang-Lee theorem
[27, Thm. 2], which is a powerful tool when it comes to prove a central limit
theorem, is not applicable to our case, since $Z_{n;\alpha,h}$ does not admit
a polynomial representation in $z:=e^{\alpha}$.

###  3.2 Mean-field approximation

######  Theorem 3.5 (SLLN for $\bar{T}_{n}$).

For all $(\alpha,h)\in\mathcal{U}^{rs}$,

$\frac{6\bar{T}_{n}}{n^{3}}\,\xrightarrow{\;\;\mathrm{a.s.}\;\;}{}\,{u^{*}_{0}}^{3}(\alpha,h)\quad\text{
w.r.t. }\bar{\mathbb{P}}_{\alpha,h},\text{ as }n\to+\infty,$

where $u^{*}_{0}$ solves the maximization problem in (2.9).

######  Theorem 3.6.

For all $(\alpha,h)\in\mathcal{M}^{rs}$,

$\frac{6\bar{T}_{n}}{n^{3}}\,\xrightarrow{\;\;\mathrm{d}\;\;}{}\,\kappa\delta_{{u_{1}^{*}}^{3}(\alpha,h)}+(1-\kappa)\delta_{{u_{2}^{*}}^{3}(\alpha,h)}\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$

where $u_{1}^{*}$, $u_{2}^{*}$ solve the maximization problem in (2.9), and

$\kappa:=\frac{\sqrt{\left[{1-2\alpha\left(u_{1}^{*}\right)^{2}(1-u_{1}^{*})}\right]^{-1}}}{\sqrt{\left[{1-2\alpha\left(u_{1}^{*}\right)^{2}(1-u_{1}^{*})}\right]^{-1}}+\sqrt{\left[{1-2\alpha\left(u_{2}^{*}\right)^{2}(1-u_{2}^{*})}\right]^{-1}}}\,.$
(3.3)

######  Theorem 3.7 (CLT for $\bar{T}_{n}$).

If $({\alpha},h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$,

$\sqrt{6}\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}\bar{m}^{\Delta}_{n}({\alpha},h)}{n}\xrightarrow{\;\;\mathrm{d}\;\;}{}\mathcal{N}(0,\bar{v}_{0}^{\Delta}(\alpha,h))\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$

where $\mathcal{N}(0,\bar{v}_{0}^{\Delta}(\alpha,h))$ is a centered Gaussian
distribution with variance

$\bar{v}_{0}^{\Delta}(\alpha,h):=\frac{3{u^{*}_{0}}^{4}(\alpha,h)}{4c_{0}},$
(3.4)

being $c_{0}\equiv
c_{0}(\alpha,h):=\frac{1-2\alpha[u^{*}_{0}(\alpha,h)]^{2}[1-u^{*}_{0}(\alpha,h)]}{4u^{*}_{0}(\alpha,h)[1-u^{*}_{0}(\alpha,h)]}$.

######  Theorem 3.8 (Non-standard CLT for $\bar{T}_{n}$).

If $({\alpha},h)=(\alpha_{c},h_{c})$,

$6\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}\bar{m}^{\Delta}_{n}({\alpha}_{c},h_{c})}{n^{3/2}}\xrightarrow{\;\;\mathrm{d}\;\;}{}\bar{Y}\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha_{c},h_{c}},\text{ as }n\to+\infty,$

where $\bar{Y}$ is a generalized Gaussian random variable with Lebesgue
density $\bar{\ell}^{c}(y)\propto e^{-\frac{3^{8}}{2^{14}}y^{4}}$.

######  Proposition 3.9.

For all $(\alpha,h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$,

$\lim_{n\to+\infty}n\cdot\bar{\mathbb{E}}_{n;\alpha,h}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}({\alpha},h)\right|\right)={\mathbb{E}}(|\bar{X}|)\,,$
(3.5)

where $\bar{X}$ is a centered Gaussian random variable with variance
$6\bar{v}^{\Delta}_{0}(\alpha,h)=\frac{9{u^{*}_{0}}^{4}(\alpha,h)}{2c_{0}}$,
being $c_{0}\equiv
c_{0}(\alpha,h)=\frac{1-2\alpha[u^{*}_{0}(\alpha,h)]^{2}[1-u^{*}_{0}(\alpha,h)]}{4u^{*}_{0}(\alpha,h)[1-u^{*}_{0}(\alpha,h)]}>0$.
Moreover, at the critical point

$\lim_{n\to+\infty}\sqrt{n}\cdot\bar{\mathbb{E}}_{n;\alpha_{c},h_{c}}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u^{*}}^{3}({\alpha}_{c},h_{c})\right|\right)={\mathbb{E}}(|\bar{Y}|)\,,$
(3.6)

where $\bar{Y}$ is a generalized Gaussian random variable with Lebesgue
density $\bar{\ell}^{c}(y)\propto e^{-\frac{3^{8}}{2^{14}}y^{4}}$.

######  Corollary 3.10.

For all $(\alpha,h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$, we
have

$\lim_{n\to+\infty}n\cdot(\bar{m}^{\Delta}_{n}({\alpha},h)-{u_{0}^{*}}^{3}({\alpha},h))=0\,,$
(3.7)

while for $({\alpha},h)=({\alpha}_{c},h_{c})$

$\lim_{n\to+\infty}\sqrt{n}\cdot(\bar{m}^{\Delta}_{n}({\alpha}_{c},h_{c})-{u^{*}}^{3}({\alpha}_{c},h_{c}))=0\,.$
(3.8)

#### Generalization to a clique graph.

Precisely as we approximated the (random) number of triangles $T_{n}$ by
$\bar{T}_{n}\,=\,\frac{4\left(\sum_{i\in\mathcal{E}_{n}}X_{i}\right)^{3}}{3n^{3}}$,
we can approximate the random number of cliques with $\ell\geq 3$ vertices, by
444For a fixed graph $G$ with $n$ vertices, this is equivalent to say that we
approximate the number of cliques by
$\bar{K}_{n}(G)=\frac{n^{\ell}(t(H_{1},G))^{\binom{\ell}{2}}}{{\ell!}}$. If
$\ell=3$ we recover the definition of $\bar{T}_{n}(G)$.

$\bar{K}_{n}:=\left(\frac{2E_{n}}{n^{2}}\right)^{\binom{\ell}{2}}\cdot\frac{n^{\ell}}{{\ell!}}=\left(\frac{2\sum_{i\in\mathcal{E}_{n}}X_{i}}{n^{2}}\right)^{\binom{\ell}{2}}\cdot\frac{n^{\ell}}{{\ell!}}.$
(3.9)

We then recover the following generalizations of Thms 3.5–3.8.

######  Theorem 3.11.

Fix $\ell\in\mathbb{N}$, with $\ell\geq 3$. For all
$(\alpha,h)\in\mathcal{U}^{rs}$,

$\frac{{\ell!}\bar{K}_{n}}{n^{\ell}}\,\xrightarrow{\;\;\mathrm{a.s.}\;\;}{}\,{u^{*}_{0}}^{\binom{\ell}{2}}(\alpha,h)\quad\text{
w.r.t. }\bar{\mathbb{P}}_{\alpha,h},\text{ as }n\to+\infty,$ (3.10)

where $u^{*}_{0}$ solves the maximization problem in (2.9). For all
$(\alpha,h)\in\mathcal{M}^{rs}$,

$\frac{{\ell!}\bar{K}_{n}}{n^{\ell}}\,\xrightarrow{\;\;\mathrm{d}\;\;}{}\,\kappa\delta_{u_{1,\ell}^{*}(\alpha,h)}+(1-\kappa)\delta_{u_{2,\ell}^{*}(\alpha,h)}\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$ (3.11)

where $u_{1,\ell}^{*}:={u_{1}^{*}}^{\binom{\ell}{2}}(\alpha,h)$,
$u_{2,\ell}^{*}:={u_{2}^{*}}^{\binom{\ell}{2}}(\alpha,h)$, $u_{1}^{*}$,
$u_{2}^{*}$ solve the maximization problem in (2.9), and $\kappa$ is given in
(3.3).

######  Theorem 3.12 (Generalized CLT w.r.t. $\bar{\mathbb{P}}_{n;\alpha,h}$).

Let
$\bar{m}^{K}_{n}({\alpha},h):=\frac{{\ell!}\bar{{\mathbb{E}}}_{n;{\alpha},h}\left(\frac{\bar{K}_{n}}{n^{\ell-2}}\right)}{n^{2}}$,
with $\ell\in\mathbb{N}$, $\ell\geq 3$. If
$({\alpha},h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$, then

$\sqrt{{\ell!}}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}\bar{m}_{n}^{K}({\alpha},h)}{n}\xrightarrow{\;\;\mathrm{d}\;\;}{}\mathcal{N}(0,\bar{v}^{K}(\alpha,h))\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$

where $\mathcal{N}(0,\bar{v}^{K}(\alpha,h))$ is a centered Gaussian
distribution with variance

$\bar{v}^{K}(\alpha,h):=\Big{(}\tbinom{\ell}{2}{u_{0}^{*}}^{\binom{\ell}{2}-1}\Big{)}^{2}(2{\ell!}c_{0})^{-1}=\frac{\big{(}\tbinom{\ell}{2}{u^{*}}^{\binom{\ell}{2}-1}\big{)}^{2}}{2{\ell!}}\frac{4u^{*}_{0}(1-u^{*}_{0})}{1-2\alpha{u^{*}_{0}}^{2}(1-u_{0}^{*})}.$

If $({\alpha},h)=\\{({\alpha}_{c},h_{c})\\}$, then

${\ell!}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}\bar{m}^{K}_{n}({\alpha}_{c},h_{c})}{n^{3/2}}\xrightarrow{\;\;\mathrm{d}\;\;}{}\bar{W}\quad\text{
w.r.t. }\bar{\mathbb{P}}_{n;\alpha_{c},h_{c}},\text{ as }n\to+\infty,$

where $\bar{W}$ is a generalized Gaussian random variable with Lebesgue
density $\bar{\ell}_{K}^{c}(y)\propto e^{-(\gamma y)^{4}}$, with
$\gamma:=\frac{2^{\binom{\ell}{2}+1/2}}{3^{\binom{\ell}{2}}}\binom{\ell}{2}$.

#### Conditional measures.

When $({\alpha},h)$ lies in the multiplicity curve $\mathcal{M}^{rs}$, where
the solution of (2.10) is not unique, we can still characterize the limiting
behavior of the triangle density in the mean-field approximation, provided
that we constraint the edge density to be close to one of the maximizers of
the scalar problem (2.9). To this aim, we consider a conditioned model, as
follows. For $(\alpha,h)\in\mathcal{M}^{rs}$, let $u_{i}^{*}(\alpha,h)$
($i=1,2$) be the solutions of the scalar problem (2.9). For $n\in{\mathbb{N}}$
and any fixed $\delta\in(0,1)$, consider the event

$B_{u_{i}^{*}}\equiv
B_{u_{i}^{*}}(n,\delta):=\left\\{x\in\mathcal{A}_{n}\,:\,\left|\frac{2E_{n}(x)}{n^{2}}-u_{i}^{*}(\alpha,h)\right|\leq
n^{-{\delta}}\right\\},$ (3.12)

and define the conditional probability measures

$\hat{\mathbb{P}}_{n;\alpha,h}^{(i)}\left(\,\cdot\,\right):=\bar{\mathbb{P}}_{n;\alpha,h}\left(\,\cdot\,\left|B_{u_{i}^{*}}(n,\delta)\right.\right),\qquad\text{
for }i=1,\,2\,.$ (3.13)

We denote the corresponding averages by $\hat{\mathbb{E}}_{n;\alpha,h}^{(i)}$
and we set
$\hat{m}_{n}^{(i)}(\alpha,h):=\hat{\mathbb{E}}^{(i)}_{n;\alpha,h}\left(\frac{6\bar{T}_{n}}{n^{3}}\right)$.
The next statements represent the analog of the results presented in Subsec.
3.2, when the parameters belong to the multiplicity region $\mathcal{M}^{rs}$.

######  Theorem 3.13 (Conditional SLLN and CLT).

For $i=1,2$ and for all $(\alpha,h)\in\mathcal{M}^{rs}$,

$\frac{6\bar{T}_{n}}{n^{3}}\,\xrightarrow{\;\;\mathrm{a.s.}\;\;}{}\,u_{i}^{*}(\alpha,h)\quad\text{
w.r.t. }\hat{\mathbb{P}}^{(i)}_{\alpha,h},\text{ as }n\to+\infty,$ (3.14)

and

$\sqrt{6}\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}\hat{m}_{n}^{(i)}(\alpha,h)}{n}\,\xrightarrow{\;\;\mathrm{d}\;\;}{}\,\mathcal{N}(0,\bar{v}_{i}^{\Delta}(\alpha,h))\quad\text{
w.r.t. }\hat{\mathbb{P}}^{(i)}_{n;\alpha,h},\text{ as }n\to+\infty,$ (3.15)

where $\mathcal{N}(0,\bar{v}_{i}^{\Delta}(\alpha,h))$ is a centered Gaussian
distribution with variance
$\bar{v}_{i}^{\Delta}(\alpha,h):=\frac{3{{u^{4}_{i}}^{*}({\alpha},h)}}{4c_{i}}$,
being $c_{i}\equiv
c_{i}(\alpha,h):=\frac{1-2\alpha[u_{i}^{*}(\alpha,h)]^{2}[1-u_{i}^{*}(\alpha,h)]}{4u_{i}^{*}(\alpha,h)[1-u_{i}^{*}(\alpha,h)]}.$

######  Proposition 3.14.

For $i=1,2$ and for all $(\alpha,h)\in\mathcal{M}^{rs}$,

$\lim_{n\to+\infty}n\cdot\hat{\mathbb{E}}_{n;\alpha,h}^{(i)}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u_{i}^{*}}^{3}(\alpha,h)\right|\right)=\mathbb{E}\left(\left|\bar{X}^{(i)}\right|\right),$
(3.16)

$\bar{X}^{(i)}$ is a centered Gaussian random variable with variance
$6\bar{v}_{i}^{\Delta}(\alpha,h)=\frac{9{u_{i}^{*}({\alpha},h)}^{4}}{2c_{i}}$,
being $c_{i}\equiv
c_{i}(\alpha,h)=\frac{1-2\alpha[u_{i}^{*}(\alpha,h)]^{2}[1-u_{i}^{*}(\alpha,h)}{4u_{i}^{*}(\alpha,h)[1-u_{i}^{*}(\alpha,h)]}.$

######  Corollary 3.15.

For $i=1,2$ and for all $(\alpha,h)\in\mathcal{M}^{rs}$, we have

$\lim_{n\to+\infty}n\cdot\left(\hat{m}_{n}^{(i)}(\alpha,h)-{u_{i}^{*}}^{3}(\alpha,h)\right)=0,$

where we recall that
$\hat{m}_{n}^{(i)}(\alpha,h):=\hat{\mathbb{E}}^{(i)}_{n;\alpha,h}\left(\frac{6\bar{T}_{n}}{n^{3}}\right)$.

#### Beyond the edge-triangle model.

All the results stated in Subsec. 3.1 can be easily extended to the Gibbs
measure $\mathbb{P}_{\beta_{k},\beta_{1}}$, whose associated Hamiltonian is
obtained by setting $\beta_{i}=0$ for all $i\neq 1,k$ (with $k>2$) in (2.2),
i.e.

$\mathcal{H}_{n;\beta_{k},\beta_{1}}(G):=n^{2}\left[\beta_{k}t(H_{k},G)+\beta_{1}t(H_{1},G)\right]\,,\quad\mbox{
for }G\in\mathcal{G}_{n}.$

The limiting free energy is given by the scalar maximization problem (2.5) and
the replica symmetric region is defined by condition $\beta_{k}\geq 0$
combined with (2.6). The phase diagram has been fully characterized in [36,
Prop. 3.2] and is completely analogous to those represented in Fig. 2.1 for
the edge-triangle model. More precisely, problem (2.5) has exactly one
maximizer $u^{*}_{0}(\beta_{k},\beta_{1})$ on the whole replica symmetric
regime, and exactly two maximizers $u^{*}_{1}(\beta_{k},\beta_{1})$,
$u^{*}_{2}(\beta_{k},\beta_{1})$ along a certain critical curve
$\mathcal{M}^{rs}$ that starts at the critical point
$(\beta_{k}^{c},\beta_{1}^{c})=\frac{1}{2}\left(\frac{p^{p-1}}{(p-1)^{p}},\log(p-1)-\frac{p}{(p-1)}\right)$,
being $p:=E(H_{k})$. At criticality the unique maximizer coincides with
$u^{*}_{c}:=u^{*}(\beta^{c}_{k},\beta^{c}_{1})=\frac{p-1}{p}$.
In case $H_{k}$ is a clique with $\ell>3$ vertices, all the results of
Subsecs. 3.2–3.2 can be extended to the mean-field measure
$\bar{\mathbb{P}}_{n;\beta_{k},\beta_{1}}$ associated with
$\bar{\mathcal{H}}_{n;\beta_{k},\beta_{1}}(G):=\frac{\beta_{k}{\ell!}}{n^{\ell-2}}\bar{K}_{n}(G)+2\beta_{1}E_{n}(G)$,
being

$\bar{K}_{n}(G)=\frac{n^{\ell}(t(H_{1},G))^{\binom{\ell}{2}}}{{\ell!}}$

(see (3.9)). An equivalent version of Lem. 5.1, which is a crucial results for
all the proofs, can be obtained by studying the _energy function_
$g_{\beta_{k},\beta_{1}}(m):=\beta_{k}m^{p}+\beta_{1}m-{I(m)}/{2}$, for
$m\in{\Gamma}_{n}$, (which generalizes (5.3)), and exploiting its Taylor
expansion

$\displaystyle\begin{cases}g_{\beta_{k},\beta_{1}}(m)=g_{\beta_{k},\beta_{1}}(u_{i}^{*})-c_{i}(m-u^{*}_{i})^{2}+o(m-u^{*}_{i})^{3}&\mbox{
if }(\beta_{k},\beta_{1})\neq(\beta_{k}^{c},\beta_{1}^{c})\vspace{0.2cm}\\\
g_{\beta_{k},\beta_{1}}(m)=g_{\beta_{k},\beta_{1}}(u_{c}^{*})-\frac{p^{5}}{48(p-1)^{2}}(m-u_{c}^{*})^{4}+o(m-u_{c}^{*})^{5}&\mbox{
if }(\beta_{k},\beta_{1})=(\beta_{k}^{c},\beta_{1}^{c}),\end{cases}$

where $i\in\\{0,1,2\\}$ and
$c_{i}(\beta_{k},\beta_{1}):=-g^{\prime\prime}_{\beta_{k},\beta_{1}}(u^{*}_{i})/2=\frac{1-2p(p-1)\beta_{k}{u^{*}_{i}}^{p-1}(1-u^{*}_{i})}{4u^{*}_{i}(1-u^{*}_{i})}.$

##  4 Proofs: edge-triangle model

Before proving our main results, we show some basic properties of the
derivatives w.r.t. $\alpha$ of the free energy $f_{\alpha,h}$ given in (2.9).
It is convenient to consider the finite size free energy $f_{n;\alpha,h}$ and
the limiting free energy $f_{\alpha,h}$ as functions of $\alpha$.

###  4.1 Derivatives of the free energy

For the sake of readability, we set $f_{n,h}(\alpha):=f_{n;\alpha,h}$. We
point out that for every $n$, $f_{n,h}$ is a convex function of $\alpha$;
indeed the second derivative of $f_{n,h}$ is positive, because it is a
variance (see (2.24)). Furthermore, we recall that, for $(\alpha,h)$ in the
replica symmetric regime, $\lim_{n\to\infty}f_{n,h}(\alpha)$ exists and it is
given by $f_{h}(\alpha):=f_{\alpha,h}$, which is defined in (2.9). We are then
under the assumptions of the following lemma.

######  Lemma 4.1 ([15], Lemma V.7.5.).

Let $(f_{n})_{n\in{\mathbb{N}}}$ be a sequence of convex functions on an open
interval $A$ of ${\mathbb{R}}$ such that $f(t)=\lim_{n\to+\infty}f_{n}(t)$
exists for every $t\in A$. Let $(t_{n})_{n\in{\mathbb{N}}}$ be a sequence in
$A$ which converges to a point $t_{0}\in A$. If $f_{n}^{\prime}(t_{n})$ and
$f^{\prime}(t_{0})$ exist, then $\lim_{n\to+\infty}f_{n}^{\prime}(t_{n})$
exists and equals $f^{\prime}(t_{0})$.

Now let $(\alpha,h)\in\mathcal{U}^{rs}$, and
$m^{\Delta}(\alpha,h):=6f^{\prime}_{h}(\alpha)={u_{0}^{*}}^{3}(\alpha,h)$. As
a corollary of Lem. 4.1 we obtain

$\lim_{n\to+\infty}m^{\Delta}_{n}(\alpha,h)=\lim_{n\to+\infty}6f^{\prime}_{n,h}(\alpha)=6f^{\prime}_{h}(\alpha)=m^{\Delta}(\alpha,h).$
(4.1)

The following locally uniform convergence also holds.

######  Proposition 4.2.

Let $h\in\mathbb{R}$ and $\,\mathcal{U}^{rs}_{h}:=\\{{\alpha}\in(-2,+\
\infty):({\alpha},h)\in\mathcal{U}^{rs}\\}$. If $\,\mathcal{U}^{rs}_{h}$ is
non empty, then $f^{\prime}_{n,h}\longrightarrow f^{\prime}_{h}$, as
$n\to+\infty$, locally uniformly on $\,\mathcal{U}^{rs}_{h}$.

###### Proof.

We prove the statement by contradiction, therefore we assume that there exists
a compact set $A\subset\mathcal{U}^{rs}_{h}$ such that the convergence is not
uniform on $A$. If this is the case, there exists $\varepsilon>0$ and a
subsequence $(f_{n_{k};\alpha,h})_{k\in{\mathbb{N}}}$ of
$(f_{n;\alpha,h})_{n\in{\mathbb{N}}}$ such that for all $k\in{\mathbb{N}}$,

$\max_{\alpha\in
A}|f^{\prime}_{n_{k},h}({\alpha})-f^{\prime}_{h}({\alpha})|>\varepsilon.$
(4.2)

We recall that, since $(\alpha,h)\in\mathcal{U}^{rs}$, these derivatives are
continuous. From (4.2) we then deduce that for each $k\in{\mathbb{N}}$ there
exists $\alpha_{k}\in A$ such that

$|f^{\prime}_{n_{k},h}(\alpha_{k})-f^{\prime}_{h}(\alpha_{k})|>\varepsilon.$
(4.3)

We can pass to a converging subsequence
$(\alpha_{k_{\ell}})_{\ell\in{\mathbb{N}}}$ by compactness of $A$. If we
denote by $\alpha_{0}$ the limit of this subsequence, by continuity we have
$f^{\prime}_{n_{k_{\ell}},h}(\alpha_{k_{\ell}})\longrightarrow
f^{\prime}_{h}(\alpha_{0})$, as $\ell\to+\infty$. By triangle inequality, for
all $\ell\in{\mathbb{N}}$,

$\varepsilon<|f^{\prime}_{n_{k_{\ell}},h}(\alpha_{k_{\ell}})-f^{\prime}_{h}(\alpha_{k_{\ell}})|\leq|f^{\prime}_{n_{k_{\ell}},h}(\alpha_{k_{\ell}})-f^{\prime}_{h}(\alpha_{0})|+|f^{\prime}_{h}(\alpha_{0})-f^{\prime}_{h}(\alpha_{k_{\ell}})|.$
(4.4)

The l.h.s. is bounded away from zero due to (4.3), while the r.h.s. vanishes,
as $\ell\to+\infty$, due to Lem. 4.1 and the pointwise convergence
$f^{\prime}_{n_{k_{\ell}},h}(\alpha_{k_{\ell}})\longrightarrow
f^{\prime}_{h}(\alpha_{0})$, as $\ell\to+\infty$. We get the contradiction. ∎

In the next paragraph we provide a short overview of the main notions and
results on graph limits theory, relevant to the proof of Thm. 3.2. We refer
the reader to [7, 8, 9, 28, 29] for a thorough description of these concepts.

###  4.2 Key results on graph limits

Let $(G_{n})_{n\geq 1}$ be a sequence of simple graphs whose number of
vertices tends to infinity; the limit object of this sequence is a symmetric
measurable function on the unitary square called graphon. A crucial step for
understanding where this definition comes from, is to introduce the notion of
empirical graphon.

Figure 4.2:  Graph $H$ with $m=6$ vertices on the left and its empirical
graphon $g^{H}$ on the right. The gray regions are constantly equal to one,
whereas the white regions are constantly equal to zero (example from [23]).

Let $H$ be a finite simple graph $H$ with vertex set $[m]$. The empirical
graphon $g^{H}$, corresponding to $H$, is defined by

$g^{H}(x,y):=\left\\{\begin{array}[]{ll}1&\text{ if $\\{\lceil mx\rceil,\lceil
my\rceil\\}$ is an edge in $H$}\\\ 0&\text{ otherwise}\end{array},\right.$
(4.5)

where $(x,y)\in[0,1]^{2}$. In other words, $g^{H}$ is a step function
corresponding to the adjacency matrix of $H$ (see Fig. 4.2). It is important
to stress that any finite simple graph admits a graphon representation,
therefore the sequence $(G_{n})_{n\geq 1}$ can be equivalently turned into a
sequence of empirical graphons $(g^{G_{n}})_{n\geq 1}$. Very intuitively, if
we imagine to assign a black pixel to each block constantly equal to $1$
appearing in the step function $g^{H}$ (and conversely a white pixel to each
block constantly equal to $0$), then, as $n$ gets large, pixels become finer
and finer and the density of black pixels can be expressed as a number between
$0$ and $1$. It is then more natural to see that the limit of
$(g^{G_{n}})_{n\geq 1}$ can be represented by a measurable and symmetric
function $g:[0,1]^{2}\rightarrow[0,1]$ (called , indeed, graphon). The set of
all graphons is denoted by $\mathcal{W}$; also notice that empirical graphons
allow to represent all simple graphs as elements of the space $\mathcal{W}$.
The definition of convergence is formalized by making use of the notion of
homomorphism density $t(H,G_{n})$ (2.1) and its continuous analog, the so-
called subgraph density

$t(H,g):=\int_{[0,1]^{m}}\prod_{\\{i,j\\}\in\mathcal{E}(H)}g(x_{i},x_{j})\,dx_{1}\dots
dx_{m},$ (4.6)

where $\mathcal{E}(H)$ denotes the edge set of $H$. A sequence of graphs
$(G_{n})_{n\geq 1}$ is said to converge to the graphon $g$ if, for every
finite simple graph $H$,

$\lim_{n\to+\infty}t(H,G_{n})=t(H,g).$ (4.7)

Any sequence of graphs that converges in the appropriate way has a graphon as
limit, and vice-versa every graphon arises as the limit of an appropriate
graph sequence. Intuitively, the interval $[0,1]$ represents a continuum of
vertices and $g(x_{i},x_{j})$ corresponds to the probability of drawing the
edge $\\{x_{i},x_{j}\\}$. For instance, the Erdős-Rényi graphon is represented
by the function that is constantly equal to $p$ on the unit square. In order
to take into account the arbitrary labeling of the vertices when they are
embedded in the unit interval, one needs to introduce an equivalence relation
on $\mathcal{W}$. Let $\Sigma$ be the space of all bijections
$\sigma:[0,1]\rightarrow[0,1]$ preserving the Lebesgue measure. We say that
the functions $g_{1},g_{2}\in\mathcal{W}$ are equivalent, and we write
$g_{1}\sim g_{2}$, if $g_{2}(x,y)=g_{1}(\sigma(x),\sigma(y))$ for some
$\sigma\in\Sigma$. The quotient space under $\sim$ is denoted by
$\widetilde{\mathcal{W}}$ and $\tau:g\mapsto\widetilde{g}$ is the natural
mapping associating a graphon with its equivalence class. The space
$\widetilde{\mathcal{W}}$ can be equipped with the so-called cut distance that
turns $\widetilde{\mathcal{W}}$ into a compact metric space (see [30], Thm.
5.1). On the space $(\widetilde{\mathcal{W}},\delta_{\square})$ a large
deviation principle for the sequence of measures
($\widetilde{\mathbb{P}}_{n;p}^{\text{ER}})_{n\geq 1}$ of a dense Erdős-Rényi
random graph has been proved by Chatterjee and Varadhan in [14]. Here
$\widetilde{\mathbb{P}}_{n;p}^{\text{ER}}$ denotes the probability
distribution on $\widetilde{\mathcal{W}}$ induced by the Erdős-Rényi graph
$G=G(n,p)$ via the mapping $G\mapsto g^{G}\mapsto\widetilde{g}^{G}$. We report
below the large deviation principle:

######  Theorem 4.3 ([14], Thm. 2.3).

For each fixed $p\in(0,1)$, the sequence
$(\widetilde{\mathbb{P}}_{n;p}^{\text{ER}})_{n\geq 1}$ satisfies a large
deviation principle on the space $(\widetilde{\mathcal{W}},\delta_{\square})$,
with speed $n^{2}$ and rate function

$\mathcal{I}_{p}(\widetilde{g})=\frac{1}{2}\int_{0}^{1}\int_{0}^{1}I_{p}(g(x,y))\,dx\,dy,$
(4.8)

where $g$ is any representative element of the equivalence class
$\widetilde{g}$ and, for $u\in[0,1]$, we set
$I_{p}(u)=u\ln\frac{u}{p}+(1-u)\ln\frac{1-u}{1-p}$.

We will strongly rely on Thm. 4.3 for the proof of Thm. 3.2.

###  4.3 Exponential convergence

###### Proof of Theorem 3.2.

The proof consists in showing that the sequence of the laws of the triangle
density w.r.t. the measure $\mathbb{P}_{n;\alpha,h}$ is exponentially tight;
this is made by representing the measure $\mathbb{P}_{n;\alpha,h}$ as a tilted
probability measure on the space of graphons, that has as a priori measure the
Erdős-Rényi one. Let $H_{2}$ be a triangle. Note that the homomorphism density
defined in (2.1) is then $t(H_{2},G)=\frac{6T_{n}(G)}{n^{3}}$. An important
property that we are going to use is that
$t(\,\cdot\,,G)=t(\,\cdot\,,\tilde{g})$, where $\widetilde{g}$ is the image in
$\widetilde{\mathcal{W}}$ of the empirical graphon $g^{G}$ of $G$ and
$t(\cdot,\tilde{g})$ is the subgraph density (4.6). This allows us to extend
the edge-triangle Hamiltonian $\mathcal{H}_{n;\alpha,h}$ to the space
$\widetilde{\mathcal{W}}$ replacing homomorphism densities with subgraph
densities. Indeed, for all $G\in\mathcal{G}_{n}$,

${\mathbb{P}}_{n;\alpha,h}(G)=\frac{\exp\left(\mathcal{H}_{n;\alpha,h}(G)\right)}{\,\sum_{\widetilde{g}\in\widetilde{\mathcal{W}}}\,\sum_{G\in[\,\widetilde{g}\,]_{n}}\exp\left(\mathcal{H}_{n;\alpha,h}(G)\right)}=\frac{\exp\left(\mathcal{H}_{n;\alpha,h}(\widetilde{g})\right)\mathbbm{1}(g^{G}\in\widetilde{g})}{\,\sum_{\widetilde{g}\in\widetilde{\mathcal{W}}}\,|[\,\widetilde{g}\,]_{n}|\exp\left(\mathcal{H}_{n;\alpha,h}(\widetilde{g})\right)}\,,$
(4.9)

where
$[\,\widetilde{g}\,]_{n}:=\\{G\in\mathcal{G}_{n}:g^{G}\in\widetilde{g}\\}$ and
$|\cdot|$ denotes the cardinality of a set. Notice that thanks to fact that we
can replace the homomorphism density with the subgraph density, the internal
sum $\sum_{G\in[\,\widetilde{g}\,]_{n}}$ in the second term of (4.9) simply
reduces to the cardinality of the set $[\,\widetilde{g}\,]_{n}$. Since for
$p=\frac{1}{2}$ the Erdős-Rényi measure becomes uniform on $\mathcal{G}_{n}$,
we can equivalently write
$|[\,\widetilde{g}\,]_{n}|=2^{n(n-1)/2}\mathbb{P}_{n;\frac{1}{2}}^{\text{ER}}([\,\widetilde{g}\,]_{n})$.
As a consequence, from (4.9), we obtain

${\mathbb{P}}_{n;\alpha,h}(G)=\frac{2^{-n(n-1)/2}\exp\left(\mathcal{H}_{n;\alpha,h}(\widetilde{g})\right)\mathbbm{1}(g^{G}\in\widetilde{g})}{\sum_{\widetilde{g}\in\widetilde{\mathcal{W}}}\exp\left(\mathcal{H}_{n;\alpha,h}(\widetilde{g})\right)\widetilde{\mathbb{P}}_{n;\frac{1}{2}}^{\text{ER}}(\\{\widetilde{g}\\})}\,.$
(4.10)

We now express the Hamiltonian in terms of homomorphism densities; to do so,
we introduce the function

$U_{\alpha,h}(G):=\tfrac{\alpha}{6}t(H_{2},G)+\tfrac{h}{2}t(H_{1},G),$ (4.11)

so that $\mathcal{H}_{n;\alpha,h}(G)=n^{2}U_{\alpha,h}(G)$. For each $n\geq 1$
and each Borel set $\widetilde{A}\subseteq\widetilde{\mathcal{W}}$, we define
the probabilities

$\widetilde{\mathbb{Q}}_{n;\alpha,h}(\widetilde{A}):=\frac{\sum_{\widetilde{g}\in\widetilde{A}}\exp\left(n^{2}U_{\alpha,h}(\widetilde{g})\right)\widetilde{\mathbb{P}}_{n;\frac{1}{2}}^{\text{ER}}(\widetilde{g})}{\sum_{\widetilde{g}\in\widetilde{\mathcal{W}}}\exp\left(n^{2}U_{\alpha,h}(\widetilde{g})\right)\widetilde{\mathbb{P}}_{n;\frac{1}{2}}^{\text{ER}}(\widetilde{g})}.$
(4.12)

Since $U_{\alpha,h}$ is a continuous and bounded function on the metric space
$(\widetilde{W},\delta_{\square})$ (see [8, 9]), by [15, Thm. II.7.2], the
sequence $\\{\widetilde{\mathbb{Q}}_{n;\alpha,h}\\}_{n\geq 1}$ of probability
measures satisfies a large deviation principle with speed $n^{2}$ and rate
function

$\mathcal{I}_{\alpha,h}(\widetilde{g}):=\mathcal{I}_{\frac{1}{2}}(\widetilde{g})-U_{\alpha,h}(\widetilde{g})-\inf_{\widetilde{g}\in\widetilde{\mathcal{W}}}\left\\{\mathcal{I}_{\frac{1}{2}}(\widetilde{g})-U_{\alpha,h}(\widetilde{g})\right\\}.$
(4.13)

The function $\mathcal{I}_{\frac{1}{2}}$ is lower semicontinuous (see [14,
Lem. 2.1]), and, therefore $\mathcal{I}_{\alpha,h}$ is lower-semincontinuous
as well, as it is the sum of lower-semincontinuous functions; thus it admits a
minimizer on the compact space $\widetilde{\mathcal{W}}$. In particular, for
$(\alpha,h)\in\mathcal{M}^{rs}$ the minimizers of (4.13) are given by the set
$\widetilde{C}^{*}=\\{\widetilde{u}^{*}_{1},\widetilde{u}^{*}_{2}\\}$, where
$\widetilde{u}^{*}_{1}$ and $\widetilde{u}^{*}_{2}$ are the images in
$\widetilde{\mathcal{W}}$ of the solutions ${u}^{*}_{1},{u}^{*}_{2}$ to the
scalar problem (2.9) (we know that they are exactly two thanks to [36, Prop.
3.2]). For all sufficiently small $\varepsilon>0$, we define the open interval

$J(\varepsilon):=({u_{1}^{*}}^{3}-\varepsilon,{u_{1}^{*}}^{3}+\varepsilon)\cup({u_{2}^{*}}^{3}-\varepsilon,{u_{2}^{*}}^{3}+\varepsilon)$

and we consider the sets

$\widetilde{C}^{*}_{\varepsilon}:=\\{\tilde{g}\in\widetilde{\mathcal{W}}:t(H_{2},\widetilde{g})\notin
J(\varepsilon)\\}\quad\mbox{and}\quad
C^{*}_{\varepsilon}:=\left\\{G\in\mathcal{G}_{n}:\frac{6T_{n}(G)}{n^{3}}\notin
J(\varepsilon)\right\\}.$

It is important to observe that, due to (4.10) and (4.12),
$\widetilde{\mathbb{Q}}_{n;\alpha,h}(\widetilde{C}^{*}_{\varepsilon})=\mathbb{P}_{n;\alpha,h}\left(C^{*}_{\varepsilon}\right)$.
Moreover, $\widetilde{C}^{*}_{\varepsilon}$ does not contain any element of
$\widetilde{C}^{*}$, indeed, for the constant graphons
$\widetilde{u}^{*}_{i},i\in\\{1,2\\}$, it holds
$t(H_{2},\widetilde{u}^{*}_{i})={{u}^{*}_{i}}^{3}\in
J(\varepsilon)\Rightarrow\widetilde{C}^{*}_{\varepsilon}\cap\widetilde{C}^{*}=\emptyset$.
Hence, since $\widetilde{C}^{*}_{\varepsilon}$ is closed and does not contain
any minimizer of (4.13), Thm. II.7.2(b) in [15] guarantees that, for
sufficiently large $n$, there is some positive constant
$\tau=\tau(\widetilde{C}^{*}_{\varepsilon})$ such that
$\widetilde{\mathbb{Q}}_{n;\alpha,h}(\widetilde{C}^{*}_{\varepsilon})\leq
e^{-n^{2}\tau}$. The thesis follows since

$\mathbb{P}_{n;\alpha,h}\left(\frac{6T_{n}}{n^{3}}\in
J(\varepsilon)\right)=1-\widetilde{\mathbb{Q}}_{n;\alpha,h}(\widetilde{C}^{*}_{\varepsilon})\geq
1-e^{-n^{2}\tau}\,.\qed$

When $(\alpha,h)\in\mathcal{U}^{rs}$, namely we work in the uniqueness regime,
the proof above can be carried out exactly in the same way, and it gives
exponential convergence of the sequence $\left(6T_{n}/n^{3}\right)_{n\geq 1}$
to ${u_{0}^{*}}^{3}$. Indeed in $\mathcal{U}^{rs}$, the set of minimizers of
(4.13) coincides with the singleton
$\widetilde{C}^{*}=\\{\widetilde{u}_{0}^{*}\\}$, where $\widetilde{u}_{0}^{*}$
is the image in $\widetilde{\mathcal{W}}$ of the unique solution $u_{0}^{*}$
to the scalar problem (2.9). As pointed out in [5, Thm. 3.2], as a byproduct
of this proof, we obtain an LDP for $\widetilde{\mathbb{Q}}_{n;\alpha,h}$:

######  Remark 4.4 ([5], Rem. 7.5).

The sequence $(\widetilde{\mathbb{Q}}_{n;\alpha,h})_{n\geq 1}$ obeys a large
deviation principle on the space $(\widetilde{W},\delta_{\square})$, with
speed $n^{2}$ and rate function $\mathcal{I}_{\alpha,h}$.

###  4.4 SLLN

We are now ready to prove the strong law of large numbers stated in Thm. 3.1.

###### Proof of Theorem 3.1.

The thesis immediately follows as a consequence of Borel-Cantelli lemma, since
exponential convergence provided by Thm. 3.2 implies almost sure convergence
(see [15], Thm. II.6.4). We stress that this almost sure convergence holds
w.r.t. a probability measure ${\mathbb{P}}_{{\alpha},h}$ on the space
$\left(\\{0,1\\}^{{\mathbb{N}}},\mathcal{B}(\\{0,1\\}^{{\mathbb{N}}})\right)$,
with marginals corresponding to the measures ${\mathbb{P}}_{n;{\alpha},h}$,
for all $n\in{\mathbb{N}}$ (see Rem. 2.2). ∎

#### Generalization to a generic simple graph.

###### Proof of Thm. 3.4.

The first part of the proof follows exactly the same steps as Thm. 3.2. Then,
we define the open interval

$J(\varepsilon):=({u_{1}^{*}}^{E(H_{k})}-\varepsilon,{u_{1}^{*}}^{E(H_{k})}+\varepsilon)\cup({u_{2}^{*}}^{E(H_{k})}-\varepsilon,{u_{2}^{*}}^{E(H_{k})}+\varepsilon)$

and we consider the sets

$\widetilde{C}^{*}_{\varepsilon}:=\\{\tilde{g}\in\widetilde{\mathcal{W}}:t(H_{k},\widetilde{g})\notin
J(\varepsilon)\\}\quad\mbox{and}\quad
C^{*}_{\varepsilon}:=\left\\{G\in\mathcal{G}_{n}:t(H_{k},G)\notin
J(\varepsilon)\right\\}.$

Consider now the constant graphons $\widetilde{u}^{*}_{i},i\in\\{1,2\\}$. As
it happens for the triangle subgraph density, it holds
$t(H_{k},\widetilde{u}^{*}_{i})={{u}^{*}_{i}}^{E(H_{k})}\in
J(\varepsilon)\Rightarrow\widetilde{C}^{*}_{\varepsilon}\cap\widetilde{C}^{*}=\emptyset$.
Notice that if $H_{k}$ is, say, a path of length $E(H_{k})$, or a
$E(H_{k})$-star 555 A $E(H_{k})$-star is an undirected graph with $E(H_{k})$
edges meeting at a “root” vertex., or a clique with $E(H_{k})$ edges, this
distinction is not registered at the level of
$t(H_{k},\widetilde{u}^{*}_{i})$. Indeed, being $\widetilde{u}^{*}_{i}$ a
constant function, the subgraph density (4.6) returns in both cases the same
value ${{u}^{*}_{i}}^{E(H_{k})}$. The only difference is visible in the
homomorphism density $t(H_{k},G)$ that, depending on the subgraph we are
taking into account, contains a different constant. Since
$\widetilde{C}^{*}_{\varepsilon}$ is closed and does not include any minimizer
of (4.13), by Thm. II.7.2(b) in [15] we finally conclude that
$\mathbb{P}_{n;\alpha,h}\left(t(H_{k},\cdot)\in J(\varepsilon)\right)\geq
1-e^{-n^{2}\tau},\,$ being $\tau=\tau(\widetilde{C}^{*}_{\varepsilon})$ some
positive constant. ∎

###### Proof of Thm. 3.3.

When $(\alpha,h)\in\mathcal{U}^{rs}$, namely we work in the uniqueness regime,
the proof of Thm. 3.4 gives exponential convergence of the sequence
$\left(t(H_{k},\cdot)\right)_{n\geq 1}$ to ${u_{0}^{*}}^{E(H_{k})}$. The
almost sure convergence immediately follows as a consequence of Borel-Cantelli
lemma, as for the proof of Thm. 3.1. ∎

##  5 Proofs: mean-field approximation

###  5.1 Preliminaries

We start from some preliminaries that are preparatory to the proofs of this
section. First, we observe that the Hamiltonian
$\bar{\mathcal{H}}_{n;{\alpha},h}$ (given in (2.18)), which is defined on
$\mathcal{A}_{n}$, is actually a function of the edges density $m\equiv
m(x):=2E_{n}(x)/n^{2}$, $x\in\mathcal{A}_{n}$, taking values in the set
${\Gamma}_{n}:=\left\\{0,\frac{2}{n^{2}},\frac{4}{n^{2}},\frac{6}{n^{2}},\dots,1-\frac{1}{n}\right\\}$.
In particular, for all $x\in\mathcal{A}_{n}$ such that
$\frac{2E_{n}(x)}{n^{2}}=m$, we have

$\bar{\mathcal{H}}_{n;\alpha,h}(x)=\bar{\mathcal{H}}_{n;\alpha,h}(m)=n^{2}\left(\frac{\alpha}{6}m^{3}+\frac{h}{2}m\right).$
(5.1)

As a consequence, we can also write, with a little abuse of notation,

$\bar{\mathbb{P}}_{n;{\alpha},h}(A)=\sum_{m\in
A}\,\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;\alpha,h}}\,,\quad\text{
for }A\subseteq{\Gamma}_{n},$ (5.2)

where $\mathcal{N}_{m}:=\binom{\frac{n(n-1)}{2}}{\frac{n(n-1)m}{2}}$ coincides
with the number of adjacency matrices in $\mathcal{A}_{n}$ with edge density
$m$. From representation (5.2) arises another important function, that we call
_energy function_ ; for any $(\alpha,h)\in\mathbb{R}^{2}$, it is defined as

$g_{{\alpha},h}(m):=\frac{\alpha}{6}m^{3}+\frac{h}{2}m-\frac{I(m)}{2}\,,\quad\text{
for }m\in{\Gamma}_{n}.$ (5.3)

The first two terms coincide with the exponent in (5.2), whereas the entropic
term $I(m)$, defined below (2.5), comes from the Stirling approximation of the
binomial coefficient $\mathcal{N}_{m}$. Let $f_{{\alpha},h}$ be the infinite
volume free energy of the edge-triangle model, as given in (2.9), and let
$u^{*}_{i}$, $i=0,1,2$, or $u^{*}_{c}$ be a solution of (2.10), depending on
the range of $(\alpha,h)$. We stress that, by construction,
$g_{\alpha,h}(u^{*}_{i})=f_{{\alpha},h}$ if
$(\alpha,h)\neq(\alpha_{c},h_{c})$, and
$g_{\alpha_{c},h_{c}}(u^{*}_{c})=f_{{\alpha}_{c},h_{c}}$.

#### Neighborhoods of the maximizer(s).

Fix $0<\delta<1$. We will mainly work in the following neighborhoods of the
maximizer(s) (whose definition was anticipated in (3.12)):

$\displaystyle B_{u_{i}^{*}}$ $\displaystyle\equiv
B_{u_{i}^{*}}(n,{\delta})=\\{m\in{\Gamma}_{n}\,:\,|m-u_{i}^{*}|\leq
n^{-{\delta}}\\},\quad i=0,1,2\,$ (5.4) $\displaystyle B_{u_{c}^{*}}$
$\displaystyle\equiv
B_{u_{c}^{*}}(n,{\delta})=\\{m\in{\Gamma}_{n}\,:\,|m-u_{c}^{*}|\leq
n^{-{\delta}}\\}$ (5.5)

making extensively use of the Taylor expansions

$\displaystyle\begin{cases}g_{{\alpha},h}(m)-g_{{\alpha},h}(u_{i}^{*})=-c_{i}(m-u^{*}_{i})^{2}+k_{i}(m-u^{*}_{i})^{3}&\mbox{
if }(\alpha,h)\neq({\alpha}_{c},h_{c})\vspace{0.2cm}\\\
g_{{\alpha},h}(m)-g_{{\alpha},h}(u_{c}^{*})=-\frac{81}{64}(m-u_{c}^{*})^{4}+k_{c}(m-u_{c}^{*})^{5}&\mbox{
if }(\alpha,h)=({\alpha}_{c},h_{c}),\end{cases}$ (5.6)

where

$\displaystyle c_{i}$
$\displaystyle:=-\frac{g^{\prime\prime}_{{\alpha},h}(u_{i}^{*})}{2}=\frac{1-2\alpha(u_{i}^{*})^{2}(1-u_{i}^{*})}{4u_{i}^{*}(1-u_{i}^{*})}>0,$
(5.7) $\displaystyle k_{i}$
$\displaystyle:=g^{\prime\prime\prime}_{{\alpha},h}(\tilde{u}_{i})/6,\quad
k_{c}:=g^{(v)}_{{\alpha}_{c},h_{c}}(\tilde{u}_{c})/5!,$ (5.8)

for some $\tilde{u}_{i},\tilde{u}_{c}$ such that
$|\tilde{u}_{i}-u^{*}_{i}|<n^{-{\delta}}$,
$|\tilde{u}_{c}-u_{c}^{*}|<n^{-{\delta}}$.

#### Lattice sets.

As a result of suitable changes of variables, obtained as fluctuations of
$m\in\Gamma_{n}$, we will need to consider the following integration ranges:

$\displaystyle R^{(n)}_{i,\delta}$
$\displaystyle:=\left(-n^{1-\delta},n^{1-\delta}\right)\cap\left\\{-nu^{*}_{i},-nu^{*}_{i}+\frac{2}{n},\dots,-nu^{*}_{i}+(n-1)\right\\},$
(5.9) $\displaystyle R^{(n)}_{c,\delta}$
$\displaystyle:=\left(-n^{\frac{1}{2}-\delta},n^{\frac{1}{2}-\delta}\right)\cap\left\\{-\sqrt{n}u_{c}^{*},-\sqrt{n}u_{c}^{*}+\frac{2}{n^{\frac{3}{2}}},\dots,-\sqrt{n}u_{c}^{*}+\frac{n-1}{\sqrt{n}}\right\\},$
(5.10)

where $i=0,1,2$. The following lemma shows how the main contribution to
$\bar{Z}_{n;\alpha,h}$ is given by sums over these sets.

######  Lemma 5.1 ([5], Lemma 8.1).

Let $(\alpha,h)\in(-2,+\infty)\times\mathbb{R}$ and let $f_{\alpha,h}$ be the
infinite volume free energy of the edge-triangle model given in (2.9).

  * Fix ${\delta}\in(0,1)$. If $(\alpha,h)\neq({\alpha}_{c},h_{c})$ and $c_{i},k_{i}$ as in (5.7)–(5.8), let

$\displaystyle D_{i}^{(n)}:=\sum_{x\in
R^{(n)}_{i,\delta}}\frac{2}{n}\frac{e^{-c_{i}x^{2}+\frac{k_{i}}{n}x^{3}}}{\sqrt{\left(u_{i}^{*}+\frac{x}{n}\right)\left(1-u_{i}^{*}-\frac{x}{n}\right)}},\quad\text{for
$i=0,1,2$.}$ (5.11)

  * Fix ${\delta}\in\left(0,\frac{3}{8}\right)$. If $(\alpha,h)=(\alpha_{c},h_{c})$ and $k_{c}$ as in (5.8), let

$D_{c}^{(n)}:=\sum_{x\in
R^{(n)}_{c,\delta}}\frac{2}{n^{3/2}}\frac{e^{-\frac{81}{64}x^{4}+\frac{k_{c}}{\sqrt{n}}x^{5}}}{\sqrt{\left(u_{c}^{*}+\frac{x}{\sqrt{n}}\right)\left(1-u_{c}^{*}-\frac{x}{\sqrt{n}}\right)}}.$
(5.12)

Then, as $n\to+\infty$,

$\bar{Z}_{n;{\alpha},h}=\frac{e^{n^{2}f_{{\alpha},h}}}{2\sqrt{\pi}}\left(D^{(n)}(\alpha,h)\right)(1+o(1)),$
(5.13)

where

$D^{(n)}(\alpha,h):=\begin{cases}D_{0}^{(n)}&\text{ if
}(\alpha,h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}\\\\[5.69046pt]
D_{1}^{(n)}+D_{2}^{(n)}&\text{ if
}(\alpha,h)\in\mathcal{M}^{rs}\\\\[5.69046pt] D_{c}^{(n)}&\text{ if
}(\alpha,h)=(\alpha_{c},h_{c})\end{cases}.$

######  Remark 5.2.

Lemma 5.1 directly proves (2.16).

######  Remark 5.3.

The quantities defined in (5.11)–(5.12) are Riemann sums with volume elements
respectively given by $2/n$ and $2/n^{3/2}$. Indeed the points $x\in
R^{(n)}_{i}$, $i={0,1,2}$ (resp. inside $R^{(n)}_{c}$) are evenly spaced with
gaps of length $2/n$ (resp. $2/{n}^{3/2}$). Hence,

$\displaystyle D_{i}^{(n)}$
$\displaystyle\xrightarrow{\;n\to+\infty\;}D_{i}:=2\sqrt{\pi\left[{1-2\alpha\left(u_{i}^{*}\right)^{2}(1-u_{i}^{*})}\right]^{-1}},\qquad
i\in\\{0,1,2\\}$ (5.14) $\displaystyle D_{c}^{(n)}$
$\displaystyle\xrightarrow{\;n\to+\infty\;}D_{c}:=\frac{3}{\sqrt{2}}\int_{-\infty}^{\infty}e^{-\frac{81}{64}x^{4}}dx\approx
3.63\,,$ (5.15)

where for (5.15) we used $u^{*}_{c}=\frac{2}{3}$. Later, these terms will play
the role of normalization weights.

###  5.2 SLLN

###### Proof of Theorem 3.5..

By retracing the same passages of Thm. 3.2 we can prove exponential
convergence of the sequence $\left(6\bar{T}_{n}/n^{3}\right)_{n\in\mathbb{N}}$
to ${u_{0}^{*}}^{3}$. By multiplying and dividing (5.2) by $2^{\binom{n}{2}}$
we obtain the analog of representation (4.12) for the measure
$\bar{\mathbb{P}}_{n;{\alpha},h}$:

$\bar{\mathbb{P}}_{n;{\alpha},h}(A)=\frac{\sum_{m\in
A}\,e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}\mathbb{P}^{\text{ER}}_{n;\frac{1}{2}}(m)}{\sum_{m\in\Gamma_{n}}\,e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}\mathbb{P}^{\text{ER}}_{n;\frac{1}{2}}(m)}\,,\quad\text{
for }A\subseteq{\Gamma}_{n}.$ (5.16)

Indeed,
$\mathbb{P}^{\text{ER}}_{n;\frac{1}{2}}(m)=\mathcal{N}_{m}/2^{\binom{n}{2}}$,
where we recall that
$\mathcal{N}_{m}=\binom{\frac{n(n-1)}{2}}{\frac{n(n-1)m}{2}}$ coincides with
the number of adjacency matrices in $\mathcal{A}_{n}$ with edge density $m$.
The same steps of Thm. 3.2, which in particular rely on Ellis result [15, Thm.
II.7.2], lead then to

$\bar{\mathbb{P}}_{n;\alpha,h}\left(\frac{6\bar{T}_{n}}{n^{3}}\in
J(\varepsilon)\right)\geq 1-e^{-n^{2}\tau}\,.$ (5.17)

Here,
$J(\varepsilon):=({u_{0}^{*}}^{3}-\varepsilon,{u_{0}^{*}}^{3}+\varepsilon)$,
$\varepsilon>0$, being $u^{*}_{0}$ the unique maximizer of (2.9) (recall that
$(\alpha,h)\in\mathcal{U}^{rs}$), and $\tau$ a positive constant depending on
the complement set $J^{c}(\varepsilon)$. Finally, almost sure convergence
follows from exponential convergence as a consequence of Borel-Cantelli lemma
([15], Thm. II.6.4). ∎

###  5.3 Phase coexistence on the critical curve

###### Proof of Theorem 3.6..

We will determine the limit of

$\mathbb{\bar{E}}_{n;\alpha,h}\left[\varphi\left(6\bar{T}_{n}/n^{3}\right)\right],$

for any continuous and bounded real function $\varphi$. First we observe that,
since $m\equiv m(x)=\frac{2E_{n}(x)}{n^{2}}$, from definition (2.21) we obtain
$\bar{T}_{n}(x)=\frac{n^{3}m^{3}}{6}$. Then, using (5.2), we get:

$\bar{{\mathbb{E}}}_{n;{\alpha},h}\left[\varphi\left(\frac{6\bar{T}_{n}}{n^{3}}\right)\right]=\sum_{m\in{\Gamma}_{n}}\varphi(m^{3})\,\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;\alpha,h}}.$
(5.18)

We split the sum in (5.18) over the sets $B_{u_{1}^{*}}$, $B_{u_{2}^{*}}$
given in (5.4), and
$\mathcal{C}\equiv\mathcal{C}(n,{\delta}):={\Gamma}_{n}\setminus\left(B_{u_{1}^{*}}\cup
B_{u_{2}^{*}}\right)$,

considering the three contributions separately. First we observe that, from
[19, Chap. 2, Eq. (2.11)], there exists two positive constants $c$ and $C$
such that

$cne^{-\frac{n^{2}}{2}I(m)}\leq\mathcal{N}_{m}\leq Ce^{-\frac{n^{2}}{2}I(m)}.$
(5.19)

Whenever we work inside the sets $B_{u_{i}^{*}}$, $i={1,2}$, the bounds in
(5.19) can be made more precise, because $n^{-2}\ll m\ll 1-n^{-2}$ and,
consequently, $n^{2}m\to\infty$ and $n^{2}(1-m)\to\infty$, as $n\to\infty$.
Hence, the following Stirling approximation is valid

$\mathcal{N}_{m}=\frac{e^{-\frac{n^{2}}{2}I(m)}}{n\sqrt{\pi
m(1-m)}}(1+o(1))\,.$ (5.20)

This, together with Lemma 5.1, yields the following representation:

$\begin{split}\sum_{m\in
B_{u_{i}^{*}}}\varphi(m^{3})\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}}&=\sum_{m\in
B_{u_{i}^{*}}}\frac{2}{n}\frac{\varphi(m^{3})}{\sqrt{m(1-m)}}\frac{e^{-n^{2}\left(f_{{\alpha},h}-g_{{\alpha},h}(m)\right)}}{D_{1}^{(n)}+D_{2}^{(n)}}(1+o(1))\,,\end{split}$

where $i\in\\{1,2\\}$ and $g_{\alpha,h}$ is the energy function defined in
(5.3). By performing the change of variable $x=n(m-u_{i}^{*})$, and using the
Taylor expansion (5.6), we obtain:

$\begin{split}\sum_{m\in
B_{u_{i}^{*}}}\varphi(m^{3})\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}}=&\sum_{x\in
R_{i,\delta}^{(n)}}\frac{2}{n}\frac{\varphi((u_{i}^{*}+\frac{x}{n})^{3})}{\sqrt{(u_{i}^{*}+\frac{x}{n})(1-u_{i}^{*}-\frac{x}{n})}}\frac{e^{-c_{i}x^{2}+\frac{k_{i}}{n}x^{3}}}{D_{1}^{(n)}+D_{2}^{(n)}}(1+o(1))\\\
&\xrightarrow{\;\;n\to+\infty\;\;}\,\varphi({u_{i}^{*}}^{3})\frac{D_{i}}{D_{1}+D_{2}}\,,\end{split}$

where $D_{i}$ is defined in (5.14) and $R^{(n)}_{i,\delta}$, given in (5.9),
represents the range of values of $x$. To conclude the analysis, we show that
the sum over the remaining set $\mathcal{C}$ provides no contribution in the
limit. Outside the sets $B_{u_{i}^{*}}$, $i=1,2$, the Stirling approximation
(5.20) is not valid anymore. However, from (5.19) we deduce:

$\sum_{m\in\mathcal{C}}\mathcal{N}_{m}e^{n^{2}(\frac{{\alpha}}{6}m^{3}+\frac{h}{2}m)}\leq
Cn\sum_{m\in\mathcal{C}}e^{n^{2}g_{{\alpha},h}(m)}<\frac{C}{2}n^{3}e^{n^{2}\max_{m\in\mathcal{C}}g_{{\alpha},h}(m)},$
(5.21)

where the last inequality is due to the fact that $\mathcal{C}$ contains at
most $\binom{n}{2}$ points. Since $f_{{\alpha},h}=g_{{\alpha},h}(u^{*}_{i})$,
$i=1,2$ we obtain

$e^{n^{2}\max_{m\in\mathcal{C}}g_{{\alpha},h}(m)}=e^{n^{2}f_{{\alpha},h}}e^{-n^{2}(g_{{\alpha},h}(u^{*}_{i})-\max_{m\in\mathcal{C}}g_{{\alpha},h}(m))}\leq
e^{n^{2}f_{{\alpha},h}}e^{-kn^{2-2{\delta}}},$ (5.22)

where $k>0$ is a constant that does not depend on $n$ and $\delta\in(0,1)$.
The last inequality follows from the Taylor expansion (5.6), exploiting the
fact that $|m-u^{*}_{i}|>n^{-{\delta}}$ for $i=1,2$ and for all
$m\in\mathcal{C}$. As a consequence, from the rough Stirling approximation
(5.19) and the consequent rough bound $\bar{Z}_{n;{\alpha},h}\geq
cn^{-1}e^{n^{2}f_{{\alpha},h}}$, we get

$\frac{\sum_{m\in\mathcal{C}}\mathcal{N}_{m}e^{n^{2}(\frac{{\alpha}}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}}<c^{-1}Cn^{4}e^{-kn^{2-2\delta}}\xrightarrow{\;\;n\to+\infty\;\;}0,$
(5.23)

being $2-2\delta>0$ by assumption. In conclusion,

$\lim_{n\to+\infty}\bar{{\mathbb{E}}}_{n;{\alpha},h}\left[\varphi\left(\frac{6\bar{T}_{n}}{n^{3}}\right)\right]=\varphi({u_{1}^{*}}^{3})\frac{D_{1}}{D_{1}+D_{2}}+\varphi({u_{2}^{*}}^{3})\frac{D_{2}}{D_{1}+D_{2}}\,.$

This proves the thesis. ∎

###  5.4 Mean-field convergence error

###### Proof of Proposition 3.9.

Let $(\alpha,h)\in\mathcal{U}^{rs}$ and $u_{0}^{*}=u^{*}_{0}({\alpha},h)$ be
the unique maximizer which solves the fixed point equation (2.10). The proof
implements the same machinery of Thm. 3.6. First we observe that

$\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}=\sum_{m\in\Gamma_{n}}|m^{3}-{u_{0}^{*}}^{3}|\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}}.$
(5.24)

We split the average in (5.24) in two parts, one over $B_{u_{0}^{*}}$ given in
(5.4), and the other over
$\mathcal{C}\equiv\mathcal{C}(n,{\delta}):={\Gamma}_{n}\setminus
B_{u_{0}^{*}}$. The contribution of the average over $\mathcal{C}$ is
negligible, exploiting exactly the same argument in (5.21)–(5.23) with
$u_{0}^{*}$ in place of $u_{i}^{*}$ ($i=1,2$), and bounding, very roughly,
$|m^{3}-{u_{0}^{*}}^{3}|=|m-u_{0}^{*}|(m^{2}+mu_{0}^{*}+{u_{0}^{*}}^{2})$ by
the constant $3$. We now focus on the sum over $B_{u_{0}^{*}}$. By Lem. 5.1
and the Stirling approximation (5.20), we obtain

$\begin{split}\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}&=\sum_{m\in
B_{u_{0}^{*}}}|m^{3}-{u_{0}^{*}}^{3}|\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}}(1+o(1))\\\
&=\sum_{m\in
B_{u_{0}^{*}}}\frac{2}{n}\frac{|m^{3}-{u_{0}^{*}}^{3}|}{\sqrt{m(1-m)}}\frac{e^{-n^{2}(f_{{\alpha},h}-g_{{\alpha},h}(m))}}{D^{(n)}_{0}}(1+o(1))\,,\end{split}$
(5.25)

where we recall that $\bar{T}_{n}(x)=\frac{n^{3}m^{3}}{6}$ and $B_{u_{0}^{*}}$
is defined in (5.4). First, we analyze the case
$(\alpha,h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$ and then we
move to the critical point. From the Taylor expansion (5.6) we get

$\begin{split}\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}&=\sum_{m\in
B_{u_{0}^{*}}}\frac{2}{n}\frac{|m^{3}-{u_{0}^{*}}^{3}|}{\sqrt{m(1-m)}}\frac{e^{-n^{2}c_{0}(m-u_{0}^{*})^{2}+n^{2}k_{0}(m-u_{0}^{*})^{3}}}{D_{0}^{(n)}}(1+o(1)).\end{split}$
(5.26)

We now perform the change of variable $x=n(m-{u_{0}^{*}})$, and we use the
identity

$m^{3}-{u_{0}^{*}}^{3}=\left(u_{0}^{*}+\frac{x}{{n}}\right)^{3}-{u_{0}^{*}}^{3}=3{u_{0}^{*}}^{2}\frac{x}{{n}}+3{u_{0}^{*}}\frac{x^{2}}{n^{2}}+\frac{x^{3}}{n^{3}},$
(5.27)

thus obtaining

$\begin{split}n\cdot\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}&=\sum_{x\in
R_{0,\delta}^{(n)}}\frac{2}{n}\frac{|3{u_{0}^{*}}^{2}{x}+3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}|\cdot
e^{-c_{0}x^{2}+\frac{k_{0}}{n}x^{3}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}\cdot
D_{0}^{(n)}}(1+o(1)),\end{split}$

where $R_{0,\delta}^{(n)}$ is defined in (5.9) and the constants $c_{0}$ and
$k_{0}$ are given in (5.7)–(5.8). We can upper and lower bound the sum above
using the following chain of inequalities:
$|a|-|b|\leq||a|-|b||\leq|a+b|\leq|a|+|b|$, $a,b\in\mathbb{R}$, with
$a:=3{u_{0}^{*}}^{2}{x}$ and
$b:=3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}$. Consider the term

$\sum_{x\in R_{0,\delta}^{(n)}}\frac{2}{n}\frac{|3{u_{0}^{*}}^{2}{x}|\cdot
e^{-c_{0}x^{2}+\frac{k_{0}}{n}x^{3}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}\cdot
D_{0}^{(n)}}(1+o(1)),$ (5.28)

together with the sequence of probability densities

$\ell_{n}(x):=\frac{2}{n}\frac{e^{-c_{0}x^{2}+\frac{k_{0}}{n}x^{3}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}\cdot
D_{0}^{(n)}}\mathbbm{1}_{R_{0}^{(n)}}(x)\,,\quad x\in{\mathbb{R}}\,,$ (5.29)

where $D_{0}^{(n)}$ is the normalization weight defined in (5.11). If, for
every $n\in{\mathbb{N}}$, $X_{n}$ is a random variable with density
$\ell_{n}$, then

$\sum_{x\in R_{0,\delta}^{(n)}}\frac{2}{n}\frac{|3{u_{0}^{*}}^{2}{x}|\cdot
e^{-c_{0}x^{2}+\frac{k_{0}}{n}x^{3}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}\cdot
D_{0}^{(n)}}(1+o(1))={\mathbb{E}}(|3{u_{0}^{*}}^{2}X_{n}|)(1+o(1)).$ (5.30)

Collecting all contributions we have:

$\displaystyle{\mathbb{E}}(|3{u_{0}^{*}}^{2}X_{n}|)(1+o(1))-\left(\int_{\mathbb{R}}\left|3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}\right|\ell_{n}(x)dx\right)(1+o(1))$
(5.31) $\displaystyle\hskip 85.35826pt\leq
n\cdot\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}\leq$
$\displaystyle{\mathbb{E}}(|3{u_{0}^{*}}^{2}X_{n}|)(1+o(1))+\left(\int_{\mathbb{R}}\left|3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}\right|\ell_{n}(x)dx\right)(1+o(1)).$
(5.32)

Notice that, due to the convergence
$D_{0}^{(n)}\xrightarrow[]{n\to+\infty}D_{0}$ (see Rem. 5.3) and the Scheffé
Lemma, we obtain $X_{n}\xrightarrow[]{\;\;d\;\;}X$, where $X$ is a Gaussian
random variable with density

$\ell(x)=\sqrt{\frac{c_{0}}{\pi}}e^{-c_{0}x^{2}}\,,\quad x\in{\mathbb{R}}\,.$
(5.33)

Moreover, the random variables $X_{n}$ have finite exponential moments for any
sufficiently large $n$. Therefore, by the dominated convergence theorem,
applied to both bounds in (5.31)–(5.32), we obtain

$n\cdot\bar{{\mathbb{E}}}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{0}^{*}}^{3}\Big{|}\Big{)}\xrightarrow{\;\;n\to+\infty\;\;}\,3{u_{0}^{*}}^{2}{\mathbb{E}}(|X|).$

Indeed, the second summand in terms (5.31)–(5.32) vanishes, being
$3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}=o(1)$, for fixed $x$. Setting
$\bar{X}:=3{u_{0}^{*}}^{2}X$, and noticing that $X$ has variance
$(2c_{0})^{-1}$, we recover (3.5).
We now move to the critical case, so we consider
$({\alpha},h)=({\alpha}_{c},h_{c})$ and $u_{c}^{*}=u^{*}({\alpha}_{c},h_{c})$.
Here, the proof works exactly the same. We split the average in (5.24) in two
parts, one over $B_{u_{c}^{*}}$ given in (5.5), and the other over
$\mathcal{C}\equiv\mathcal{C}(n,{\delta}):={\Gamma}_{n}\setminus
B_{u_{c}^{*}}$. The contribution of the average over $\mathcal{C}$ is
negligible, exploiting the same argument in (5.21)–(5.23). This time, by
injecting the Taylor expansion (5.6) at the critical point in (5.22), and
using the fact that $|m-u_{c}^{*}|^{4}>n^{-4{\delta}}$ for $m\in\mathcal{C}$,
we get

$\frac{\sum_{m\in\mathcal{C}}\mathcal{N}_{m}e^{n^{2}(\frac{\alpha_{c}}{6}m^{3}+\frac{h_{c}}{2}m)}}{\bar{Z}_{n;{\alpha}_{c},h_{c}}}<c^{-1}Cn^{4}e^{-kn^{2-4\delta}}\xrightarrow{\;\;n\to+\infty\;\;}0,\qquad
k>0,$

since $\delta<3/8$ by assumption. We now restrict the average (5.24) to a sum
in $B_{u_{c}^{*}}$. In place of (5.26) we get:

$\begin{split}\bar{{\mathbb{E}}}_{n;\alpha_{c},h_{c}}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{c}^{*}}^{3}\Big{|}\Big{)}&=\sum_{m\in
B_{u_{c}^{*}}}\frac{2}{n^{\frac{3}{2}}}\frac{|m^{3}-{u_{c}^{*}}^{3}|e^{-n^{2}\frac{81}{64}(m-u_{c}^{*})^{4}+n^{2}{k_{c}}(m-u_{c}^{*})^{5}}}{\sqrt{m\left(1-m\right)}\cdot
D_{c}^{(n)}}(1+o(1)),\end{split}$

where $B_{u_{c}^{*}}$ is defined in (5.5), and the constant $k_{c}$ is given
in (5.8). Notice that here the Taylor expansion (5.6) provides the fourth-
order term $(m-u_{c}^{*})^{4}$ at the exponent, while Lem. 5.1 brings the
normalization weight $D_{c}^{(n)}$. After the change of variable
$y:=\sqrt{n}(m-{u_{c}^{*}})$, recalling that $u_{c}^{*}=\frac{2}{3}$ and by
means of the identity

$m^{3}-{u_{c}^{*}}^{3}=\Big{(}u_{c}^{*}+\frac{y}{\sqrt{n}}\Big{)}^{3}-{u_{c}^{*}}^{3}=\frac{4}{3}\frac{y}{\sqrt{n}}+2\frac{y^{2}}{n}+\frac{y^{3}}{n^{\frac{3}{2}}},$
(5.34)

we obtain

$\begin{split}\sqrt{n}\cdot\bar{{\mathbb{E}}}_{n;\alpha_{c},h_{c}}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{c}^{*}}^{3}\Big{|}\Big{)}&=\sum_{y\in
R_{c,\delta}^{(n)}}\frac{2}{n^{\frac{3}{2}}}\frac{|\frac{4}{3}{y}+2\frac{y^{2}}{\sqrt{n}}+\frac{y^{3}}{n}|\cdot
e^{-\frac{81}{64}y^{4}+\frac{k_{c}}{\sqrt{n}}y^{5}}}{\sqrt{\big{(}u_{c}^{*}+\frac{y}{\sqrt{n}}\big{)}\big{(}1-u_{c}^{*}-\frac{y}{\sqrt{n}}\big{)}}D_{c}^{(n)}}(1+o(1)),\end{split}$

where $R_{c,\delta}^{(n)}$ is given in (5.10). For every $n\in\mathbb{N}$, let
$Y_{n}$ be a real random variable with Lebesgue density

$\ell^{c}_{n}(y):=\frac{2}{n^{3/2}}\frac{e^{-\frac{81}{64}y^{4}+\frac{k_{c}}{\sqrt{n}}y^{5}}}{\sqrt{(u_{c}^{*}+\frac{y}{\sqrt{n}})(1-u_{c}^{*}-\frac{y}{\sqrt{n}})}\cdot
D_{c}^{(n)}}\,\mathbbm{1}_{R_{c,\delta}^{(n)}}(y)\,,\quad y\in{\mathbb{R}}\,.$
(5.35)

Notice that $D_{c}^{(n)}$ provides the right normalization rate. The random
variable $Y_{n}$ has finite exponential moments for any sufficiently large
$n$. By Scheffé Lemma and dominated convergence theorem, we conclude

$\sqrt{n}\cdot\bar{{\mathbb{E}}}_{n;\alpha_{c},h_{c}}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{c}^{*}}^{3}\Big{|}\Big{)}\xrightarrow{\;\;n\to+\infty\;\;}\,\frac{4}{3}{\mathbb{E}}(|Y|),$

where $Y$ is a generalized Gaussian random variable with Lebesgue density
$\ell^{c}(y)\propto e^{-\frac{81}{64}y^{4}}$. Setting $\bar{Y}:=\frac{4}{3}Y$,
since the scale parameter of $Y$ is $\frac{2^{3/2}}{3}$, we deduce that
$\bar{Y}$ is a generalized Gaussian random variable with scale parameter
$\frac{2^{7/2}}{3^{2}}$, thus proving the thesis. ∎

With the same strategy we can immediately prove the following corollary.

###### Proof of Corollary 3.10.

Recall that
$\bar{m}^{\Delta}_{n}({\alpha},h)=\bar{{\mathbb{E}}}_{n;{\alpha},h}\big{(}\frac{6\bar{T}_{n}}{n^{3}}\big{)}$.
By following the proof of Prop. 3.9, we obtain,

  * •

for all $(\alpha,h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$,

$n\cdot\left(\bar{m}^{\Delta}_{n}({\alpha},h)-{u_{0}^{*}}^{3}({\alpha},h)\right)={\mathbb{E}}\left(3{u_{0}^{*}}^{2}X_{n}\right)(1+o(1))+o(1)\,\xrightarrow{\;\;n\to+\infty\;\;}\,{\mathbb{E}}(\bar{X})=0,$

  * •

for $(\alpha,h)=({\alpha}_{c},h_{c})$

$\sqrt{n}\cdot\left(\bar{m}^{\Delta}_{n}({\alpha}_{c},h_{c})-{u^{*}}^{3}({\alpha}_{c},h_{c})\right)={\mathbb{E}}\Big{(}\frac{4}{3}Y_{n}\Big{)}(1+o(1))+o(1)\,\xrightarrow{\;\;n\to+\infty\;\;}\,{\mathbb{E}}(\bar{Y})=0.$

∎

###  5.5 CLT (off the critical curve)

We use Cor. 3.10 to prove Thms. 3.7 and 3.8. We start with Thm. 3.8 at the
critical point.

###### Proof of Theorem 3.8.

Let $u_{c}^{*}=u^{*}(\alpha_{c},h_{c})$. We consider the decomposition

$6\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}\bar{m}^{\Delta}_{n}({\alpha}_{c},h_{c})}{n^{3/2}}=\bar{U}_{n}+\sqrt{n}\left({u_{c}^{*}}^{3}-\bar{m}^{\Delta}_{n}({\alpha}_{c},h_{c})\right),$
(5.36)

where

$\bar{U}_{n}:=6\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}{u_{c}^{*}}^{3}}{n^{3/2}}.$

By (3.8) and Slutsky theorem, it is enough to study the convergence in
distribution of the variable
$6(\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}{u_{c}^{*}}^{3})/n^{3/2}$. We show
that, for any $t\in{\mathbb{R}}$,

$\bar{M}_{n}(t):=\bar{\mathbb{E}}_{n;\alpha_{c},h_{c}}\Big{(}e^{t\cdot\bar{U}_{n}}\Big{)}\,\xrightarrow{\;\;n\to+\infty\;\;}\,\int_{\mathbb{R}}e^{ty}\bar{\ell}^{c}(y)dy,$
(5.37)

where $\bar{\ell}^{c}$ is given in the statement. Again, we split the average
in (5.37) in two parts, one over $B_{u_{c}^{*}}$ given in (5.5), and the other
over
$\mathcal{C}\equiv\mathcal{C}(n,{\delta}):={\Gamma}_{n}\setminus\left(B_{u_{c}^{*}}\right)$.
We obtain:

$\displaystyle\sum_{m\in\mathcal{C}}\frac{\mathcal{N}_{m}e^{t\sqrt{n}(m^{3}-{u_{c}^{*}}^{3})+n^{2}(\frac{\alpha_{c}}{6}m^{3}+\frac{h_{c}}{2}m)}}{\bar{Z}_{n;{\alpha}_{c},h_{c}}}$
$\displaystyle\overset{\eqref{Stirling-
rough}}{\leq}\sum_{m\in\mathcal{C}}\frac{Ce^{3t\sqrt{n}+n^{2}g_{\alpha_{c},h_{c}}(m)}}{\bar{Z}_{n;{\alpha}_{c},h_{c}}}$
$\displaystyle\leq\frac{Cn^{3}e^{3t\sqrt{n}+n^{2}f_{{\alpha}_{c},h_{c}}-n^{2}(g_{{\alpha},h}(u^{*}_{c})-\max_{m\in\mathcal{C}}g_{{\alpha}_{c},h_{c}}(m))}}{\bar{Z}_{n;{\alpha}_{c},h_{c}}}$
$\displaystyle\leq
c^{-1}Cn^{3}e^{3t\sqrt{n}-kn^{2-4\delta}}\xrightarrow{\;\;n\to+\infty\;\;}0,$
(5.38)

for some constant $k>0$. In the second to last inequality we used that
$f_{{\alpha}_{c},h_{c}}=g_{{\alpha}_{c},h_{c}}(u^{*}_{c})$, and that the set
$\mathcal{C}$ contains at most $\binom{n}{2}$ elements. In the last inequality
we used the Taylor expansion (5.6) at the critical point, the rough bound
$\bar{Z}_{n;{\alpha},h}\geq cn^{-1}e^{n^{2}f_{{\alpha},h}}$ coming from
(5.19), and the fact that $|m-u_{c}^{*}|^{4}>n^{-4{\delta}}$ for
$m\in\mathcal{C}$. The assumption ${\delta}<3/8$ guarantees that
$2-4{\delta}>1/2$. As a consequence of (5.38), we can reduce the average in
(5.37) into a sum on $B_{u_{c}^{*}}$:

$\begin{split}\bar{M}_{n}(t)&=\sum_{m\in
B_{u_{c}^{*}}}\frac{\mathcal{N}_{m}e^{t\sqrt{n}(m^{3}-{u_{c}^{*}}^{3})+n^{2}(\frac{\alpha_{c}}{6}m^{3}+\frac{h_{c}}{2}m)}}{\bar{Z}_{n;{\alpha}_{c},h_{c}}}(1+o(1))\\\
&=\sum_{m\in
B_{u_{c}^{*}}}\frac{2}{n^{\frac{3}{2}}}\frac{e^{t\sqrt{n}(m^{3}-{u_{c}^{*}}^{3})-n^{2}(f_{{\alpha}_{c},h_{c}}-g_{{\alpha}_{c},h_{c}}(m))}}{\sqrt{m(1-m)}\cdot
D_{c}^{(n)}}(1+o(1))\,,\end{split}$ (5.39)

where the last identity is due to Lem. 5.1 and the Stirling approximation
(5.20). Injecting in (5.39) the Taylor expansion (5.6) at the critical point,
we get

$\begin{split}\bar{M}_{n}(t)&=\sum_{m\in
B_{u_{c}^{*}}}\frac{2}{n^{\frac{3}{2}}}\frac{e^{t\sqrt{n}(m^{3}-{u_{c}^{*}}^{3})-\frac{81}{64}n^{2}(m-u_{c}^{*})^{4}+k_{c}n^{2}(m-u_{c}^{*})^{5}}}{\sqrt{m(1-m)}\cdot
D_{c}^{(n)}}(1+o(1)).\end{split}$ (5.40)

By the change of variable $y=\sqrt{n}(m-u_{c}^{*})$, and recalling that
$u_{c}^{*}(\alpha_{c},h_{c})=\frac{2}{3}$, we find

$\begin{split}\bar{M}_{n}(t)&=\sum_{y\in
R_{c,\delta}^{(n)}}\frac{2}{n^{\frac{3}{2}}}\frac{e^{t(\frac{4}{3}y+2\frac{y^{2}}{\sqrt{n}}+\frac{y^{3}}{n})}\cdot
e^{-\frac{81}{64}y^{4}+k_{c}\frac{y^{5}}{\sqrt{n}}}}{\sqrt{\left(u_{c}^{*}+\frac{y}{\sqrt{n}}\right)\left(1-u_{c}^{*}-\frac{y}{\sqrt{n}}\right)}D_{c}^{(n)}}(1+o(1)).\end{split}$
(5.41)

Exploiting the range of $R_{c,\delta}^{(n)}$, given in (5.10), we observe that
$-n^{1/2-3\delta}<2\frac{y^{2}}{\sqrt{n}}+\frac{y^{3}}{n}<2n^{1/2-2\delta}+n^{1/2-3\delta}$.
By isolating the term

$\bar{M}^{*}_{n}(t):=\sum_{y\in
R_{c,\delta}^{(n)}}\frac{2}{n^{\frac{3}{2}}}\frac{e^{t\frac{4}{3}y}\cdot
e^{-\frac{81}{64}y^{4}+k_{c}\frac{y^{5}}{\sqrt{n}}}}{\sqrt{\left(u_{c}^{*}+\frac{y}{\sqrt{n}}\right)\left(1-u_{c}^{*}-\frac{y}{\sqrt{n}}\right)}D_{c}^{(n)}}(1+o(1))$
(5.42)

we obtain:

$e^{-tn^{1/2-3\delta}}\bar{M}^{*}_{n}(t)\leq\bar{M}_{n}(t)\leq
e^{t\left(2n^{1/2-2\delta}+n^{1/2-3\delta}\right)}\bar{M}^{*}_{n}(t).$ (5.43)

In (5.42) we recognize the probability density $\ell_{n}^{c}$ of the random
variable $Y_{n}$, introduced in (5.35). From (5.42) we then deduce that
$\bar{M}^{*}_{n}(t)={\mathbb{E}}(e^{t\frac{4}{3}Y_{n}})(1+o(1))\,$. By Scheffé
Lemma $Y_{n}$ converges in distribution to a generalized Gaussian random
variable $Y$ with Lebesgue density $\ell^{c}(y)\propto
e^{-\frac{81}{64}y^{4}}$, therefore

$\bar{M}^{*}_{n}(t)={\mathbb{E}}(e^{t\frac{4}{3}Y_{n}})(1+o(1))\xrightarrow{\;\;n\to+\infty\;\;}{\mathbb{E}}(e^{t\frac{4}{3}Y}).$

With the further constraint $\frac{1}{4}<\delta<\frac{3}{8}$, from (5.43) it
holds
$\bar{M}_{n}(t)\xrightarrow{n\to+\infty}{\mathbb{E}}(e^{t\frac{4}{3}Y}).$ By
setting $\bar{Y}:=\frac{4}{3}Y$ we conclude the proof. ∎

###### Proof of Theorem 3.7.

The proof runs exactly as for the critical case, therefore we provide below
only a sketch with the main differences. The object that we want to study is
in this case the random variable

$\sqrt{6}\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}\bar{m}^{\Delta}_{n}({\alpha},h)}{n}=\bar{V}_{n}+\frac{n}{\sqrt{6}}\big{(}{u^{*}}^{3}-\bar{m}^{\Delta}_{n}({\alpha},h)\big{)},$
(5.44)

where

$\bar{V}_{n}:=\sqrt{6}\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}{u_{0}^{*}}^{3}}{n}.$

By (3.7) and Slutsky theorem, it is enough to study the moment generating
function of of $\bar{V}_{n}$, restricting again the analysis on the
neighborhood $B_{u^{*}_{0}}$ (the contribution over the set
$\mathcal{C}\equiv\mathcal{C}(n,{\delta}):={\Gamma}_{n}\setminus
B_{u_{0}^{*}}$ can be treated as in (5.38), with $0<\delta<1$). To simplify
constants, we consider $\sqrt{6}\bar{V}_{n}$ instead of $\bar{V}_{n}$. We then
get:

$\begin{split}\bar{M}_{n}(t)&=\sum_{m\in
B_{u_{0}^{*}}}\frac{2}{n}\frac{1}{\sqrt{m(1-m)}}\frac{e^{t{n}(m^{3}-{u_{0}^{*}}^{3})-c_{0}n^{2}(m-u_{0}^{*})^{2}+k_{0}n^{2}(m-u_{0}^{*})^{3}}}{D_{0}^{(n)}}(1+o(1)).\\\
\end{split}$ (5.45)

The change of variable $x={n}(m-{u_{0}^{*}})$, identity (5.27), and the Taylor
expansion (5.6) yield

$\begin{split}\bar{M}_{n}(t)&=\sum_{x\in
R_{0,\delta}^{(n)}}\frac{2}{n}\frac{e^{t(3{u_{0}^{*}}^{2}{x}+3{u_{0}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}})}\cdot
e^{-c_{0}x^{2}+k_{0}\frac{x^{3}}{n}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}D_{0}^{(n)}}(1+o(1))\,.\end{split}$
(5.46)

As in the proof of Thm. 3.8, let

$\bar{M}^{**}_{n}(t):=\sum_{x\in
R_{0,\delta}^{(n)}}\frac{2}{n}\frac{e^{3t{u_{0}^{*}}^{2}x}\cdot
e^{-c_{0}x^{2}+k_{0}\frac{x^{3}}{n}}}{\sqrt{\left(u_{0}^{*}+\frac{x}{{n}}\right)\left(1-u_{0}^{*}-\frac{x}{{n}}\right)}D_{0}^{(n)}}(1+o(1)).$
(5.47)

Furthermore, by exploiting the range of $R_{0,\delta}^{(n)}$, given in (5.9)
we obtain

$e^{-tn^{1-3\delta}}\bar{M}^{**}_{n}(t)\leq\bar{M}_{n}(t)\leq
e^{t\left(3u_{0}^{*}n^{1-2\delta}+n^{1-3\delta}\right)}\bar{M}^{**}_{n}(t).$
(5.48)

In (5.47) we recognize the probability density $\ell_{n}$ of the random
variable $X_{n}$, introduced in (5.29); we then rewrite (5.47) as
$\bar{M}^{**}_{n}(t)={\mathbb{E}}(e^{3t{u_{0}^{*}}^{2}X_{n}})(1+o(1))$. By
Scheffé Lemma $X_{n}$ converges in distribution to a real random variable $X$
with Gaussian density $\ell$ given in (5.33), therefore

$\bar{M}^{**}_{n}(t)={\mathbb{E}}(e^{3t{u_{0}^{*}}^{2}X_{n}})(1+o(1))\xrightarrow{\;\;n\to+\infty\;\;}{\mathbb{E}}(e^{3t{u_{0}^{*}}^{2}X}).$

With the further constraint $\frac{1}{2}<\delta<1$, from (5.48), it holds
$\bar{M}_{n}(t)\xrightarrow{n\to+\infty}{\mathbb{E}}(e^{3t{u_{0}^{*}}^{2}X})$.
Note that $X$ is a centered Gaussian random variable with variance
$(2c_{0})^{-1}$, where $c_{0}\equiv
c_{0}({\alpha},h)=\frac{1-2\alpha[u_{0}^{*}(\alpha,h)]^{2}[1-u_{0}^{*}(\alpha,h)]}{4u_{0}^{*}(\alpha,h)[1-u_{0}^{*}(\alpha,h)]}.$
In conclusion, $\bar{V}_{n}$ converges in distribution to the centered
Gaussian random variable $3{u_{0}^{*}}^{2}X/\sqrt{6}$, with variance
$\bar{v}_{0}^{\Delta}({\alpha},h)=\frac{3{u^{*}_{0}}^{4}}{4c_{0}}$, as wanted.
∎

#### Generalization to a clique graph.

###### Proof of Thm. 3.11.

From Thm. 3.5 we know that
$\left(\frac{2E_{n}}{n^{2}}\right)^{3}\overset{\text{a.s.}}{\longrightarrow}{u_{0}^{*}}^{3}$
w.r.t. $\bar{\mathbb{P}}_{\alpha,h}$. By continuous mapping theorem it follows
that
$\left(\frac{2E_{n}}{n^{2}}\right)^{\binom{\ell}{2}}\overset{\text{a.s.}}{\longrightarrow}{u_{0}^{*}}^{\binom{\ell}{2}}$
w.r.t. $\bar{\mathbb{P}}_{\alpha,h}$, thus recovering (3.10).
In order to prove (3.11) one can proceed as in Thm. 3.6. The final goal is to
determine the limit of
$\mathbb{\bar{E}}_{n;\alpha,h}\left[\varphi\left(\frac{{\ell!}\bar{K}_{n}}{n^{\ell}}\right)\right]$
for any continuous and bounded real function $\varphi$. Since $m\equiv
m(x)=\frac{2E_{n}(x)}{n^{2}}$, from the definition of $\bar{K}_{n}$ we obtain
$\bar{K}_{n}(x)=\frac{n^{\ell}m^{\binom{\ell}{2}}}{{\ell!}}$. Using (5.2), we
get:

$\bar{{\mathbb{E}}}_{n;{\alpha},h}\left[\varphi\left(\frac{{\ell!}\bar{K}_{n}}{n^{\ell}}\right)\right]=\sum_{m\in{\Gamma}_{n}}\varphi(m^{\binom{\ell}{2}})\,\frac{\mathcal{N}_{m}e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;\alpha,h}}.$
(5.49)

One can then retrace exactly the same steps of the proof of Thm. 3.6, since
the unique difference consists in the factor $\varphi(m^{\binom{\ell}{2}})$.
Indeed, the measure (second factor in (5.49)) remains unchanged. ∎

###### Proof of Thm. 3.12.

We consider the decompositions

$\displaystyle\sqrt{{\ell!}}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}\bar{m}_{n}^{K}({\alpha},h)}{n}$
$\displaystyle=\bar{V}^{(\ell)}_{n}+\frac{n}{\sqrt{{\ell!}}}\big{(}{u^{*}_{0}}^{\binom{\ell}{2}}-\bar{m}^{K}_{n}({\alpha},h)\big{)},$
$\displaystyle{\ell!}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}\bar{m}^{K}_{n}({\alpha}_{c},h_{c})}{n^{3/2}}$
$\displaystyle=\bar{U}^{(\ell)}_{n}+\sqrt{n}\left({u_{c}^{*}}^{\binom{\ell}{2}}-\bar{m}^{K}_{n}({\alpha}_{c},h_{c})\right),$

where
$\bar{V}^{(\ell)}_{n}:=\sqrt{{\ell!}}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}{u_{0}^{*}}^{\binom{\ell}{2}}}{n}$
and
$\bar{U}^{(\ell)}_{n}:={\ell!}\,\frac{\frac{\bar{K}_{n}}{n^{\ell-2}}-\frac{n^{2}}{{\ell!}}{u_{c}^{*}}^{\binom{\ell}{2}}}{n^{3/2}}$.
One can easily check that Cor. 3.10 can be adapted to this setting. It is
enough to replace identities (5.27)–(5.34) respectively by
$\left(u_{0}^{*}+\frac{x}{n}\right)^{\binom{\ell}{2}}-{u_{0}^{*}}^{\binom{\ell}{2}}=\binom{\ell}{2}\left(u_{0}^{*}\right)^{\binom{\ell}{2}-1}\frac{x}{n}(1+o(1))$,
where $x:=n(m-{u_{0}^{*}})$, and
$\big{(}u_{c}^{*}+\frac{y}{\sqrt{n}}\big{)}^{\binom{\ell}{2}}-{u_{c}^{*}}^{\binom{\ell}{2}}=\binom{\ell}{2}\left(\frac{2}{3}\right)^{\binom{\ell}{2}-1}\frac{y}{\sqrt{n}}(1+o(1))$,
where $y:=\sqrt{n}(m-{u_{c}^{*}})$. Thanks to Cor. 3.10 and Slutsky theorem we
can reduce to study the convergence in distribution of the random variables
$\bar{V}^{(\ell)}_{n}$ and $\bar{U}^{(\ell)}_{n}$. Adapting the proof of Thm.
3.7 one can conclude that

$\displaystyle\bar{V}^{(\ell)}_{n}$
$\displaystyle\xrightarrow{\;\;\mathrm{d}\;\;}\bar{Q}:=\frac{\binom{\ell}{2}(u^{*}_{0})^{\binom{\ell}{2}-1}}{\sqrt{{\ell!}}}X$
$\displaystyle\quad\text{w.r.t. }\bar{\mathbb{P}}_{n;\alpha,h},\text{ as
}n\to+\infty,$ $\displaystyle\bar{U}^{(\ell)}_{n}$
$\displaystyle\xrightarrow{\;\;\mathrm{d}\;\;}\bar{W}:=\binom{\ell}{2}\left(\frac{2}{3}\right)^{\binom{\ell}{2}-1}Y$
$\displaystyle\quad\text{w.r.t. }\bar{\mathbb{P}}_{n;\alpha_{c},h_{c}},\text{
as }n\to+\infty,$

where $X$ is a centered Gaussian random variable with variance
$(2c_{0})^{-1}$, being $c_{0}$ defined in Thm. 3.7, and $Y$ has Lebesgue
density $\ell^{c}(y)\propto e^{-\frac{81}{64}y^{4}}$. Hence $\bar{Q}$ has
variance
$\bar{v}^{K}(\alpha,h):=\nicefrac{{\Big{(}\tbinom{\ell}{2}{u_{0}^{*}}^{\binom{\ell}{2}-1}\Big{)}^{2}}}{{2{\ell!}c_{0}}}$,
and $\bar{W}$ has scale parameter
$\frac{2^{\binom{\ell}{2}+1/2}}{3^{\binom{\ell}{2}}}\binom{\ell}{2}$, as
wanted. ∎

###  5.6 Conditional measures

###### Proof of Proposition 3.14.

Let $(\alpha,h)\in\mathcal{M}^{rs}$ and let $u^{*}_{i}=u^{*}_{i}({\alpha},h)$,
$i=1,2$ the two solutions of the scalar problem (2.9). The proof of this
proposition can be carried on exactly as the proof of the analog Prop. 3.9,
but in the conditional setting introduced in Subsec. 3.2. Without loss of
generality, we consider the case $i=1$:

$\displaystyle\hat{\mathbb{E}}_{n;{\alpha},h}^{(1)}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u_{1}^{*}}^{3}\right|\right)$
$\displaystyle=\sum_{m\in
B_{u^{*}_{1}}}|m^{3}-{u_{1}^{*}}^{3}|\frac{\mathcal{N}_{m}\,e^{n^{2}(\frac{\alpha}{6}m^{3}+\frac{h}{2}m)}}{\bar{Z}_{n;{\alpha},h}(B_{u_{1}^{*}})}$
$\displaystyle=\sum_{m\in
B_{u^{*}_{1}}}\frac{2}{n}\frac{|m^{3}-{u_{1}^{*}}^{3}|}{\sqrt{m(1-m)}}\frac{e^{-n^{2}(f_{{\alpha},h}-g_{{\alpha},h}(m))}}{D_{1}^{(n)}}(1+o(1)),$

where $\hat{\mathbb{E}}_{n;{\alpha},h}^{(1)}$ is the expectation associated
with the measure $\hat{\mathbb{P}}_{n;\alpha,h}^{(1)}$ defined in (3.13). The
Taylor expansion (5.6) and the change of variable $x=n(m-{u^{*}_{1}})$ yield

$n\cdot\hat{\mathbb{E}}^{(1)}_{n;{\alpha},h}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u_{1}^{*}}^{3}\right|\right)=\sum_{x\in
R^{(n)}_{1,\delta}}\frac{2}{n}\frac{|3{u_{1}^{*}}^{2}{x}+3{u_{1}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}|\cdot
e^{-c_{1}x^{2}+\frac{k_{1}}{n}x^{3}}}{\sqrt{\left(u_{1}^{*}+\frac{x}{{n}}\right)\left(1-u_{1}^{*}-\frac{x}{{n}}\right)}\cdot
D_{1}^{(n)}}(1+o(1)),$

where $R^{(n)}_{1,\delta}$ is as in (5.9). If $(X^{(1)}_{n})_{n\geq 1}$ is a
sequence of random variables with probability density

$\ell_{n}^{(1)}(x):=\frac{2}{n}\frac{e^{-c_{1}x^{2}+\frac{k_{1}}{n}x^{3}}}{{\sqrt{\left(u_{1}^{*}+\frac{x}{{n}}\right)\left(1-u_{1}^{*}-\frac{x}{{n}}\right)}}\cdot
D_{1}^{(n)}}\,\mathbbm{1}_{R^{(n)}_{1,\delta}}(x),\quad x\in{\mathbb{R}},$
(5.50)

where $D_{1}^{(n)}$ is the normalization weight defined in (5.11), we obtain,
as in (5.31)–(5.32),

$\displaystyle{\mathbb{E}}(|3{u_{1}^{*}}^{2}X^{(1)}_{n}|)(1+o(1))-\left(\int_{\mathbb{R}}\left|3{u_{1}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}\right|\ell^{(1)}_{n}(x)dx\right)(1+o(1))$
(5.51) $\displaystyle\hskip 85.35826pt\leq
n\cdot\hat{{\mathbb{E}}}^{(1)}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{1}^{*}}^{3}\Big{|}\Big{)}\leq$
$\displaystyle{\mathbb{E}}(|3{u_{1}^{*}}^{2}X^{(1)}_{n}|)(1+o(1))+\left(\int_{\mathbb{R}}\left|3{u_{1}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}\right|\ell^{(1)}_{n}(x)dx\right)(1+o(1)).$
(5.52)

Arguing as at the end of proof 3.9 we conclude

$n\cdot\hat{{\mathbb{E}}}^{1}_{n;{\alpha},h}\Big{(}\Big{|}\frac{6\bar{T}_{n}}{n^{3}}-{u_{1}^{*}}^{3}\Big{|}\Big{)}\xrightarrow{\;\;n\to+\infty\;\;}\,3{u_{1}^{*}}^{2}{\mathbb{E}}(|X^{(1)}|),$

where $X^{(1)}$ is a standard Gaussian variable with variance $(2c_{1})^{-1}$.
Indeed, the second summand in (5.51)–(5.52) vanishes, being
$3{u_{1}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}}=o(1)$, for fixed $x$. Setting
$\bar{X}^{(1)}:=3{u_{1}^{*}}^{2}X^{(1)}$, we obtain a random variable with
variance
$6\bar{v}_{1}^{\Delta}(\alpha,h)=\frac{9{u_{i}^{*}({\alpha},h)}^{4}}{2c_{1}}$,
as wanted. The same proof holds for the case $i=2$. ∎

###### Proof of Corollary 3.15.

The proof follows immediately, as for Cor. 3.10. ∎

As mentioned, the next theorem is the analog of Thm. 3.5 and Thm. 3.7, when
the edge density is conditioned to take values in a neighborhood of the two
maximizers of the scalar problem (2.9).

###### Proof of Theorem 3.13.

Let $(\alpha,h)\in\mathcal{M}^{rs}$ and let $u^{*}_{i}=u^{*}_{i}({\alpha},h)$,
$i=1,2$ the two solutions of the scalar problem (2.9). We focus on the case
$i=1$, being the case $i=2$ completely analogous. We start proving (3.14) via
exponential convergence, which again implies the _a.s._ convergence by a
standard Borel-Cantelli argument (see [15], Thm. II.6.4 and Rem. 2.2). We
define

$\mathcal{R}\equiv\mathcal{R}(\eta;n):=\left\\{m\in\Gamma_{n}:\eta\leq\left|m^{3}-{u_{1}^{*}}^{3}\right|<n^{-\delta}\right\\}.$

This is a circular crown of points with distance to ${u^{*}_{1}}^{3}$, between
$\eta$ and $n^{-\delta}$. Notice that for fixed $\eta$, for large $n$, the set
$\mathcal{R}$ is empty. When this does not hold, we have

$\displaystyle\hat{\mathbb{P}}^{(1)}_{n;\alpha,h}\left(\left|\frac{6\bar{T}_{n}}{n^{3}}-{u_{1}^{*}}^{3}\right|\geq\eta\right)$
$\displaystyle\leq\sum_{m\in\mathcal{R}}\frac{\mathcal{N}_{m}e^{n^{2}\left(\frac{\alpha}{6}m^{3}+\frac{h}{2}m\right)}}{\bar{Z}_{n;\alpha,h}(B_{u_{1}^{*}})}$
$\displaystyle\leq
Cc^{-1}n^{4}e^{-n^{2}(f_{\alpha,h}-\max_{m\in\mathcal{R}}g_{\alpha,h}(m))}$
$\displaystyle\leq
Cc^{-1}n^{4}e^{-n^{2}\min_{m\in\mathcal{R}}(f_{\alpha,h}-g_{\alpha,h}(m))},$
(5.53)

where in the second to last passage we used the rough bound
$\bar{Z}_{n;\alpha,h}(B_{u_{1}^{*}})\geq cn^{-1}e^{n^{2}f_{\alpha,h}}$ coming
from Stirling approximation (5.19). As stated in [36, Prop. 3.2], for
sufficiently large $n$, the function $f_{\alpha,h}-g_{\alpha,h}(m)$,
restricted to the neighborhood $B_{u_{1}^{*}}$, is positive, convex and admits
$u_{1}^{*}$ as unique zero. Hence

$\min_{m\in\mathcal{R}}(f_{\alpha,h}-g_{\alpha,h}(m))=\min\\{f_{\alpha,h}-g_{\alpha,h}(u_{1}^{*}-\eta),f_{\alpha,h}-g_{\alpha,h}(u_{1}^{*}+\eta)\\}>0,$

When $\mathcal{R}$ is nonempty, the probability in (5.53) vanishes, as
$n\to\infty$. This provides the desired exponential convergence, for every
choice of $\eta>0$. We now move to the proof of (3.15). By means of
decomposition (5.44), and Cor. 3.15 we can reduce our analysis to the random
variable

$\bar{V}^{(1)}_{n}:=\sqrt{6}\,\frac{\frac{\bar{T}_{n}}{n}-\frac{n^{2}}{6}{u_{1}^{*}}^{3}}{n},$

studying, for any $t\in{\mathbb{R}}$, its moment generating function

$\hat{M}_{n}(t):=\hat{\mathbb{E}}^{(1)}_{n;\alpha,h}\left(e^{t\bar{V}^{(1)}_{n}}\right).$

We consider $\sqrt{6}\bar{V}^{(1)}_{n}$ instead of $\bar{V}^{(1)}_{n}$ (to
simplify constants), and we follow the same line of arguments as in the proof
of Thm. 3.7. We get:

$\begin{split}\hat{M}_{n}(t)&=\sum_{m\in
B_{u_{1}^{*}}}\frac{2}{n}\frac{1}{\sqrt{m(1-m)}}\frac{e^{t{n}(m^{3}-{u_{1}^{*}}^{3})-c_{1}n^{2}(m-u_{1}^{*})^{2}+k_{1}n^{2}(m-u_{1}^{*})^{3}}}{D_{1}^{(n)}}(1+o(1)).\\\
\end{split}$ (5.54)

The change of variable $x={n}(m-{u_{1}^{*}})$, identity (5.27), and the Taylor
expansion (5.6) yield

$\begin{split}\hat{M}_{n}(t)&=\sum_{x\in
R_{1,\delta}^{(n)}}\frac{2}{n}\frac{e^{t(3{u_{1}^{*}}^{2}{x}+3{u_{1}^{*}}\frac{x^{2}}{n}+\frac{x^{3}}{n^{2}})}\cdot
e^{-c_{1}x^{2}+k_{1}\frac{x^{3}}{n}}}{\sqrt{\left(u_{1}^{*}+\frac{x}{{n}}\right)\left(1-u_{1}^{*}-\frac{x}{{n}}\right)}D_{1}^{(n)}}(1+o(1))\,,\end{split}$
(5.55)

where $R_{1,\delta}^{(n)}$ is defined in (5.9). By defining

$\hat{M}^{**}_{n}(t):=\sum_{x\in
R_{1,\delta}^{(n)}}\frac{2}{n}\frac{e^{3t{u_{1}^{*}}^{2}x}\cdot
e^{-c_{1}x^{2}+k_{1}\frac{x^{3}}{n}}}{\sqrt{\left(u_{1}^{*}+\frac{x}{{n}}\right)\left(1-u_{1}^{*}-\frac{x}{{n}}\right)}D_{1}^{(n)}}(1+o(1)),$
(5.56)

we observe that
$\hat{M}^{**}_{n}(t)={\mathbb{E}}(e^{3t{u_{1}^{*}}^{2}{X}^{(1)}_{n}})(1+o(1))\,$,
where, for each $n\in\mathbb{N}$, ${X}^{(1)}_{n}$ is a random variable with
density $\ell^{(1)}_{n}(x)$ given in (5.50).

Notice that ${X}^{(1)}_{n}$ converges in distribution to a centered Gaussian
random variable ${X}^{(1)}$ with variance $(2c_{1})^{-1}$, where $c_{1}\equiv
c_{1}({\alpha},h)=\frac{1-2\alpha[u_{1}^{*}(\alpha,h)]^{2}[1-u_{1}^{*}(\alpha,h)]}{4u_{1}^{*}(\alpha,h)[1-u_{1}^{*}(\alpha,h)]}.$

Therefore

$\bar{M}^{**}_{n}(t)={\mathbb{E}}(e^{3t{u_{1}^{*}}^{2}{X}^{(1)}_{n}})(1+o(1))\xrightarrow{\;\;n\to+\infty\;\;}{\mathbb{E}}(e^{3t{u_{1}^{*}}^{2}{X}^{(1)}}).$

With the further constraint $\frac{1}{2}<\delta<1$, exploiting the same bounds
as in (5.48), we also obtain the convergence
$\hat{M}_{n}(t)\xrightarrow{n\to+\infty}{\mathbb{E}}(e^{3t{u_{1}^{*}}^{2}{X}^{(1)}})$
for all $t\in{\mathbb{R}}$. In conclusion, $\bar{V}^{(1)}_{n}$ converges in
distribution to the centered Gaussian random variable
$3{u_{1}^{*}}^{2}{X}^{(1)}/\sqrt{6}$, with variance
$\bar{v}_{1}^{\Delta}({\alpha},h)=\frac{3{u^{*}_{1}}^{4}}{4c_{1}}$, as wanted.
The same proof works for $i=2$. ∎

##  6 Conjectures and simulations

The comparison between the mean-field approximation and the edge-triangle
model respectively encoded by Hamiltonian (2.17) and (2.18) remains an open
problem. We refer the reader to [5, Sec. 8.3] for a discussion on the main
difficulties in proving that they asymptotically coincide. However we believe
that this is the case, and we report a list of conjectures based on the
results obtained for the mean-field model. Some of them are supported by
heuristics computations and simulations.

###  6.1 Conjectures and heuristics

######  Conjecture 6.1.

For all $(\alpha,h)\in\mathcal{M}^{rs}$,

$\frac{6T_{n}}{n^{3}}\,\xrightarrow{\;\;\mathrm{d}\;\;}{}\,\kappa\delta_{{u_{1}^{*}}^{3}(\alpha,h)}+(1-\kappa)\delta_{{u_{2}^{*}}^{3}(\alpha,h)}\quad\text{
w.r.t. }{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$

where $u_{1}^{*}$, $u_{2}^{*}$ solve the maximization problem in (2.9), and

$\kappa=\frac{\sqrt{\left[{1-2\alpha\left(u_{1}^{*}\right)^{2}(1-u_{1}^{*})}\right]^{-1}}}{\sqrt{\left[{1-2\alpha\left(u_{1}^{*}\right)^{2}(1-u_{1}^{*})}\right]^{-1}}+\sqrt{\left[{1-2\alpha\left(u_{2}^{*}\right)^{2}(1-u_{2}^{*})}\right]^{-1}}}\,.$

######  Conjecture 6.2 (CLT for $T_{n}$).

If $({\alpha},h)\in\mathcal{U}^{rs}\setminus\\{({\alpha}_{c},h_{c})\\}$,

$\sqrt{6}\,\frac{\frac{{T}_{n}}{n}-\frac{n^{2}}{6}m^{\Delta}_{n}({\alpha},h)}{n}\xrightarrow{\;\;\mathrm{d}\;\;}{}\mathcal{N}(0,v_{0}^{\Delta}(\alpha,h))\quad\text{
w.r.t. }{\mathbb{P}}_{n;\alpha,h},\text{ as }n\to+\infty,$

where $\mathcal{N}(0,v_{0}^{\Delta}(\alpha,h))$ is a centered Gaussian
distribution with variance
$v_{0}^{\Delta}(\alpha,h)=\frac{3{u^{*}_{0}}^{4}(\alpha,h)}{4c_{0}}$, being
$c_{0}\equiv
c_{0}(\alpha,h):=\frac{1-2\alpha[u^{*}_{0}(\alpha,h)]^{2}[1-u^{*}_{0}(\alpha,h)]}{4u^{*}_{0}(\alpha,h)[1-u^{*}_{0}(\alpha,h)]}$.

######  Conjecture 6.3 (Non-standard CLT for ${T}_{n}$).

If $({\alpha},h)=(\alpha_{c},h_{c})$,

$6\,\frac{\frac{{T}_{n}}{n}-\frac{n^{2}}{6}m^{\Delta}_{n}({\alpha}_{c},h_{c})}{n^{3/2}}\xrightarrow{\;\;\mathrm{d}\;\;}{}Y\quad\text{
w.r.t. }{\mathbb{P}}_{n;\alpha_{c},h_{c}},\text{ as }n\to+\infty,$ (6.1)

where $Y$ is a generalized Gaussian random variable with Lebesgue density
${\ell}^{c}(y)\propto e^{-\frac{3^{8}}{2^{14}}y^{4}}$.

Having at hand a large deviation principle (see Rem. 4.4) allows to perform a
heuristic calculation to support Conjs. 6.2 and 6.3.

#### Heuristics on the CLT.

To guarantee convexity of the rate function $\mathcal{I}_{\alpha,h}$, we
restrict here to the region $(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R}$
(see [36], Prop. 3.2). Let us define the random variables

$\displaystyle V_{n}$
$\displaystyle:=\sqrt{6}\,\frac{\frac{T_{n}}{n}-\frac{n^{2}}{6}{u_{0}^{*}}^{3}(\alpha,h)}{n}=\frac{n}{\sqrt{6}}\left[\frac{6T_{n}}{n^{3}}-{u_{0}^{*}}^{3}(\alpha,h)\right],\qquad(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R},$
(6.2) $\displaystyle U_{n}$
$\displaystyle:=6\,\frac{\frac{T_{n}}{n}-\frac{n^{2}}{6}{u_{0}^{*}}^{3}(\alpha_{c},h_{c})}{n^{3/2}}=\sqrt{n}\left[\frac{6T_{n}}{n^{3}}-{u_{0}^{*}}^{3}(\alpha_{c},h_{c})\right],$
(6.3)

so that we obtain the following decomposition:

$\displaystyle\sqrt{6}\,\frac{\frac{T_{n}}{n}-\frac{n^{2}}{6}m^{\Delta}_{n}(\alpha,h)}{n}$
$\displaystyle=V_{n}+n({u_{0}^{*}}^{3}(\alpha,h)-m^{\Delta}_{n}(\alpha,h)),\qquad(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R}$
(6.4) $\displaystyle
6\,\frac{\frac{T_{n}}{n}-\frac{n^{2}}{6}m^{\Delta}_{n}(\alpha_{c},h_{c})}{n^{3/2}}$
$\displaystyle=U_{n}+\sqrt{n}({u_{0}^{*}}^{3}-m^{\Delta}_{n}(\alpha_{c},h_{c})).$
(6.5)

For all $(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R}$ let
$C_{\epsilon}:=\\{y\in[0,1]:|y^{3}-{u_{0}^{*}}^{3}(\alpha,h)|\geq\epsilon\\}$
where we assume
$0<\epsilon<\min\\{{u_{0}^{*}}^{3}(\alpha,h),1-{u_{0}^{*}}^{3}(\alpha,h)\\}$.
We claim:

$\displaystyle\mathbb{P}_{n;\alpha,h}\left(\frac{6T_{n}}{n^{3}}\in
C_{\epsilon}\right)\approx e^{-n^{2}\inf_{x\in C_{\epsilon}}I_{\alpha,h}(x)}$
(6.6)

where
$I_{\alpha,h}(x)=\frac{1}{2}I(x)-\frac{\alpha}{6}x^{3}-\frac{h}{2}x+f_{\alpha,h}$,
and $I(x)=x\ln x+(1-x)\ln(1-x)$. Note that we have used the LDP of Rem. 4.4,
exploiting the fact that whenever we work in replica symmetric regime, the
variational problem
$\inf_{\tilde{g}\in\widetilde{C}_{\epsilon}}\mathcal{I}_{\alpha,h}(\tilde{g})$
on the set
$\widetilde{C}_{\epsilon}:=\\{\tilde{g}\in\widetilde{W}:|t(H_{2},\tilde{g})-{u_{0}^{*}}^{3}(\alpha,h)|\geq\epsilon\\}$
reduces to the scalar problem on the r.h.s. of (6.6) (indeed
$\mathcal{I}_{\alpha,h}$ coincides with $I_{\alpha,h}$ when it is computed on
constant graphons).

Figure 6.3: Qualitative representation of $I_{\alpha,h}$ in
$\mathcal{U}^{rs}$. The red interval corresponds to the set $C_{\epsilon}$
defined below (6.5).

Moreover, since $(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R}$, the function
$I_{\alpha,h}$ is continuous, positive, and convex (see [36], Prop. 3.2);
furthermore, it admits a unique zero at $x=u_{0}^{*}$ 666To the sake of
readability in the following part of the text we omit the dependence on
$(\alpha,h)$. (see Fig. 6.3 for a qualitative representation $I_{\alpha,h}$).
As a consequence,

$\displaystyle\inf_{x\in C_{\epsilon}}I_{\alpha,h}(x)$
$\displaystyle=I_{\alpha,h}\left(\sqrt[3]{{u_{0}^{*}}^{3}\pm\epsilon}\right)=I_{\alpha,h}\left(u_{0}^{*}\pm\frac{\epsilon}{3{u_{0}^{*}}^{2}}+o(\epsilon^{2})\right),$
(6.7)

where in last passage we used the assumption
$0<\epsilon<\min\\{{u_{0}^{*}}^{3}(\alpha,h),1-{u_{0}^{*}}^{3}(\alpha,h)\\}$.
Set $\delta:=\frac{\epsilon}{3{u_{0}^{*}}^{2}}+o(\epsilon^{2})$; we determine
which is the order of the functions $I_{\alpha,h}(u_{0}^{*}\pm\delta)$ as
$\delta$ goes to zero. We obtain:

$\displaystyle I_{\alpha,h}(u_{0}^{*}\pm\delta)$
$\displaystyle=\pm\frac{\delta}{2}\left[\ln\frac{u_{0}^{*}}{1-u_{0}^{*}}-\alpha(u_{0}^{*})^{2}-h\right]+\frac{\delta^{2}}{2}\left[\frac{1}{2u_{0}^{*}(1-u_{0}^{*})}-\alpha
u_{0}^{*}\right]$ (6.8)
$\displaystyle\quad\pm\frac{\delta^{3}}{2}\left[\frac{2u_{0}^{*}-1}{6(u_{0}^{*})^{2}(1-u_{0}^{*})^{2}}-\frac{\alpha}{3}\right]+\frac{\delta^{4}}{24}\,\frac{3(u_{0}^{*})^{2}-3u_{0}^{*}+1}{(u_{0}^{*})^{3}(1-u_{0}^{*})^{3}}+o(\delta^{4}).$

  * •

If $(\alpha,h)\in(-2,\alpha_{c})\times\mathbb{R}$, then the first non-
vanishing coefficient in (6.8) is the coefficient of the second order term,
which equals $\frac{I_{\alpha,h}^{\prime\prime}(u_{0}^{*})}{2}$, and it is
strictly positive as $I_{\alpha,h}$ is strictly convex in the parameter range
we are considering. Therefore, we get

$I_{\alpha,h}(u_{0}^{*}\pm\delta)=\frac{I_{\alpha,h}^{\prime\prime}(u_{0}^{*})}{2}\delta^{2}+o(\delta^{2}),$
(6.9)

and, as $n\to\infty$,

$\displaystyle\mathbb{P}_{n;\alpha,h}\left(V_{n}\in
dx\right)=\mathbb{P}_{n;\alpha,h}\left(\tfrac{6T_{n}}{n^{3}}\in{u_{0}^{*}}^{3}+\frac{\sqrt{6}}{n}dx\right)$
$\displaystyle\overset{\eqref{LDP_cong}\eqref{Taylor}}{\approx}e^{-n^{2}I_{\alpha,h}\left(\sqrt[3]{{u_{0}^{*}}^{3}+\frac{\sqrt{6}}{n}x}\right)}dx$
$\displaystyle=e^{-\frac{I^{\prime\prime}_{\alpha,h}(u_{0}^{*})x^{2}}{3{u_{0}^{*}}^{4}}+o({x^{2}})}dy,$
(6.10)

where in the last equality we used (6.9) injecting
$\epsilon=\frac{{\sqrt{6}x}}{n}$ in the definition of $\delta$. In (6.10) we
recognize the density of a Gaussian random variable with variance
$\frac{3{u_{0}^{*}}^{4}}{2I^{\prime\prime}_{\alpha,h}(u_{0}^{*})}$. A direct
computation shows that $I^{\prime\prime}_{\alpha,h}(u_{0}^{*})=2c_{0}$ (where
$c_{0}$ is given in (5.7)), hence we recover the value (3.4) stated in Thm.
3.7.

  * •

If $(\alpha,h)=(\alpha_{c},h_{c})=\left(\frac{27}{8},\ln
2-\frac{3}{2}\right)$, since
$u_{0}^{*}=u_{0}^{*}(\alpha_{c},h_{c})=\frac{2}{3}$, (6.8) reduces to

$I_{\alpha,h}(u_{0}^{*}\pm\delta)=\frac{81}{64}\,\delta^{4}+o(\delta^{4}).$

As $n\to+\infty$, we find

$\displaystyle\mathbb{P}_{n;\alpha_{c},h_{c}}\left(U_{n}\in
dx\right)=\mathbb{P}_{n;\alpha_{c},h_{c}}\left(\tfrac{6T_{n}}{n^{3}}\in{u_{0}^{*}}^{3}+\tfrac{dx}{\sqrt{n}}\right)$
$\displaystyle\overset{\eqref{LDP_cong}\eqref{Taylor}}{\approx}e^{-n^{2}I_{\alpha_{c},h_{c}}\left(\sqrt[3]{{u_{0}^{*}}^{3}+\frac{{x}}{\sqrt{n}}}\right)}dx$
$\displaystyle=e^{-\frac{3^{8}}{2^{14}}\,{x^{4}}+o({x^{4}})}dx,$ (6.11)

where in the last equality we used (6.9) injecting
$\epsilon=\frac{{x}}{\sqrt{n}}$ in the definition of $\delta$. In (6.11) we
can immediately recognize the same density $\bar{\ell}^{c}$ stated in Thm.
3.8.

However, notice that the error terms appearing in (6.10)–(6.11) might be
relevant, as well as the _shift terms_ in (6.4)–(6.5), similarly to what
happens in [31, Thm. 1.4(c)] for the two-star model (indeed we don’t have the
equivalent of Cor. 3.10, which is valid instead for the mean-field model).
However, we believe that a subtle compensation among this two contributions
produces the conjectured results. In the next section, we show two simulations
that support Conj. 6.2.

###  6.2 Simulations

We perform a discrete-time Glauber dynamics, namely an ergodic reversible
Markov chain on $\mathcal{A}_{n}$ with stationary distribution
$\mathbb{P}_{n;\alpha,h}$. A step of the Glauber dynamics can be described as
follows:

  * 1.

Uniformly sample $\ell\in\mathcal{E}_{n}$, and let $x^{+}$ (resp. $x^{-}$) be
the adjacency matrix, with $x^{+}_{\ell}=1$ (resp. $x^{-}_{\ell}=0$), that
coincides with $x$ for all elements except for $x_{\ell}$. Let
$\mathcal{W}_{\ell}:=\\{\\{i,j\\}:i,j\in\mathcal{E}_{n},i\sim
j,\\{i,j,\ell\\}\in\mathcal{T}_{n}\Leftrightarrow x_{\ell}=1\\}$ the set of
two-stars insisting on the edge (or non-edge) $x_{\ell}$. Here, the symbol
$\sim$ denotes that the two edges $i$ and $j$ are neighbors.

  * 2.

Given the current state represented by $x\in\mathcal{A}_{n}$, the next state
is obtained by performing the transition $x\mapsto x^{+}$ (resp. $x\mapsto
x^{-}$) with probability

$p_{n}(x,\ell):=\frac{e^{\alpha\sum_{\\{i,j\\}\in\mathcal{W}_{\ell}}x_{i}x_{j}+h}}{1+e^{\alpha\sum_{\\{i,j\\}\in\mathcal{W}_{\ell}}x_{i}x_{j}+h}}\quad(\text{resp.\leavevmode\nobreak\
}1-p_{n}(x,\ell)\,)\,.$ (6.12)

The update probability (6.12) is given in [3, Lem. 3] (or equivalently [4],
pag. 18). Moreover in [3, Thm. 5] it has been proved that the mixing time of
the Glauber dynamics is $\Theta(n^{2}\ln(n))$ whenever
$(\alpha,h)\in\mathcal{U}^{rs}$.

Figure 6.4: The picture displays a simulation of the distribution of
$\sqrt{6}\,\frac{\frac{T_{n}}{n}-\frac{n^{2}}{6}m^{\Delta}_{n}(\alpha,h)}{n}$
obtained with $n=150$, $M=5000$ samples, and parameters $h=1$, ${\alpha}=\pm
1$ (histogram), and the pdf of the Gaussian distribution introduced in Conj.
6.2 (continuous line).

Pict. 6.4 shows a numerical simulation of the probability distribution of
(6.1) obtained with $n=150$ and $M=5000$ samples, both for negative and
positive values of $\alpha$. The picture also displays the Gaussian
probability density function given in Conj. 6.2, showing that it approximates
the histogram with good accuracy, thus supporting the conjecture.

######  Remark 6.4.

Note that, despite [3, Thm. 5] holds in $\mathcal{U}^{rs}$, which includes
$(\alpha_{c},h_{c})$, when we perform the Glauber dynamics at the critical
point, the mixing time that we observe is not $\Theta(n^{2}\ln(n))$, as we
would expect. We believe that the proximity of the point to the critical curve
$\mathcal{M}^{rs}$ where the mixing time is exponential (see [3, Thm. 6]), is
responsible for this behavior. As a consequence, the incredibly high
computational cost prevented us from getting an equivalent simulation for
supporting Conj. 6.3 and Conj. 6.1.

Acknowledgements. We would like to thank Alessandra Bianchi and Francesca
Collet for useful discussions and suggestions.
This research has been partially funded by the INdAM-GNAMPA Project, CUP
E53C23001670001.

## References

  * [1]
  * [2] D. Aristoff and L. Zhu. On the phase transition curve in a directed exponential random graph model. Adv. in Appl. Probab. 50(1):272–301, 2018
  * [3] S. Bhamidi, G. Bresler, and A. Sly. Mixing time of exponential random graphs. 49th Annual IEEE Symposium on Foundations of Computer Science. IEEE, 2008
  * [4] S. Bhamidi, J. Hannig, C.Y. Lee, and J. Nolen. The importance sampling technique for understanding rare events in Erdős-Rényi random graphs. Electron. J. Probab. 20(107): 1–30, 2015
  * [5] A. Bianchi, F. Collet and E. Magnanini. Limit Theorems for Exponential Random Graphs, arXiv:2105.06312, 2021.
  * [6] A. Bianchi, F. Collet and E. Magnanini. The GHS and other inequalities for the two-star model, ALEA Lat. Am. J. Probab. Math. Stat., 19(2): 1679–1695, 2022
  * [7] C. Borgs, J. Chayes, L. Lovász, V.T. Sós and K. Vesztergombi. Counting graph homomorphisms. In: M. Klazar, J. Kratochvil, M. Loebl, R. Thomas and P. Valtr (eds.) Topics in Discrete Mathematics. Algorithms and Combinatorics, vol. 26, pp. 315–371. Springer, Berlin, Heidelberg, 2006
  * [8] C. Borgs, J. Chayes, L. Lovász, V.T. Sós and K. Vesztergombi. Convergent sequences of dense graphs I. Subgraph frequencies, metric properties and testing. Adv. Math. 219(6): 1801–1851, 2008
  * [9] C. Borgs, J. Chayes, L. Lovász, V.T. Sós and K. Vesztergombi. Convergent sequences of dense graphs II. Multiway cuts and statistical physics. Ann. Math. 176(1): 151–219, 2012
  * [10] C.T. Butts, W. Shen, and F. Yin. Finite mixtures of ERGMs for modeling ensembles of networks. Bayesian Anal. 17(4): 1153–1191, 2022
  * [11] S. Chatterjee. Large deviations for random graphs. Lecture Notes in Mathematics 2197, 2017
  * [12] S. Chatterjee and P. Dey. Applications of Stein’s method for concentration inequalities. Ann. Probab. 38(6): 2443-2485, 2010
  * [13] S. Chatterjee and P. Diaconis. Estimating and understanding exponential random graph models. Ann. Stat. 41(5): 2428–2461, 2013
  * [14] S. Chatterjee and S.R.S. Varadhan. The large deviation principle for the Erdős-Rényi random graph. European J. Combin. 32(7): 1000–1017, 2011
  * [15] R.S. Ellis. Entropy, Large Deviations, and Statistical Mechanics. Springer, New York, 1985
  * [16] P. Erdős , A. Rényi. On the evolution of random graphs. Bull. Inst. Internat. Statist. 38: 343–347, 1961
  * [17] S.E. Fienberg. Introduction to papers on the modeling and analysis of network data. Ann. Appl. Stat. 4: 1–4, 2010
  * [18] S.E. Fienberg. Introduction to papers on the modeling and analysis of network data - II. Ann. Appl. Stat. 4: 533–534, 2010
  * [19] S. Friedli and Y. Velenik. Statistical Mechanics of Lattice Systems: A Concrete Mathematical Introduction. Cambridge: Cambridge University Press, 2017
  * [20] C. Giardinà, C. Giberti, E. Magnanini. Approximating the cumulant generating function of triangles in the Erdős-Rényi random graph. J. Stat. Phys. 182(2), Paper No. 23, 1–22, 2021
  * [21] S. Golshid Sharifnia and S. Saghaei. A statistical approach for social network change detection: an ERGM based framework. Comm. Statist. Theory Methods. 51(7): 2259–2280, 2022
  * [22] R.B. Griffiths, C.A. Hurst and S. Sherman. Concavity of magnetization of an Ising ferromagnet in a positive external field. J. Math. Phys. 11(3): 790–795, 1970
  * [23] F. den Hollander, M. Mandjes, A. Roccaverde, and N. Starreveld (2018). Ensemble equivalence for dense graphs.
  * [24] E.T. Jaynes Information theory and statistical mechanics. Phys. Rev. (4) 106: 620–630, 1957
  * [25] E.T. Jaynes Information theory and statistical mechanics. II. Phys. Rev. (2) 108: 171–190, 1957
  * [26] R. Kenyon, and M. Yin. On the asymptotics of constrained exponential random graphs. Journal of Applied Probability 54(1): 165-180, 2017
  * [27] T.D. Lee and C.N. Yang. Statistical theory of equations of state and phase transitions. I. Theory of condensation. Phys. Rev. 87(3): 404, 1952
  * [28] L. Lovász. Large Networks and Graph Limits. American Mathematical Society, Providence, 2012
  * [29] L. Lovász and B. Szegedy. Limits of dense graph sequences. J.Comb.Theory B 96(6): 933–957, 2006
  * [30] L. Lovász and B. Szegedy. Szemerédi’s lemma for the analyst. Geom. Funct. Anal. 17(1): 252–270, 2007
  * [31] S. Mukherjee and Y. Xu. Statistics of the two star ERGM. Bernoulli 29(1), 24–51, 2023
  * [32] J. Neeman, C. Radin, and L. Sadun. Typical large graphs with given edge and triangle densities. Probability Theory and Related Fields 186(3-4): 1167–1223, 2023
  * [33] M.E.J. Newman and J. Park. Solution of the two-star model of a network. Phys. Rev. E 70(6): 066146, 2004
  * [34] M.E.J. Newman and J. Park. Statistical mechanics of networks. Phys. Rev. E 70(3): 066117–066122, 2004
  * [35] M.E.J. Newman and J. Park. Solution for the properties of a clustered network. Phys. Rev. E 72(2): 026136, 2005
  * [36] C. Radin and M. Yin. Phase transitions in exponential random graphs. Ann. App. Probab. 23(6): 2458–2471, 2013
  * [37] D. Strauss. On a general class of models for interaction. SIAM Rev. 28(4): 513–527, 1986