# Opinion dynamics on signed graphs and graphons

Raoul Prisant, Federica Garin, Paolo Frasca

*Abstract*—In this paper, we make use of graphon theory to study opinion dynamics on large undirected networks. The opinion dynamics models that we take into consideration allow for negative interactions between the individuals, whose opinions can thus grow apart. We consider both the repelling and the opposing models of negative interactions, which have been studied in the literature. We define the repelling and the opposing dynamics on signed graphons and we show that their initial value problem solutions exist and are unique. We then show that, in a suitable sense, the graphon dynamics is a good approximation of the dynamics on large graphs that converge to a graphon. This result applies to large random graphs that are sampled according to a graphon (W-random graphs), for which we provide a new convergence result under very general assumptions; in particular, the graphs' average degrees only need to grow faster than $log n$.

*Index Terms*—Graphons; W-random graphs; graph Laplacian; signed graphs; opinion dynamics; social networks

## I. INTRODUCTION

The control systems community has developed a keen interest in the analysis of mathematical models of opinion dynamics on social networks. A key question in this research, which has been summarized by several survey papers [1]–[5], has been to determine whether or not the individuals in the social network reach a consensus, whereby their opinions are in agreement [6]. A popular feature of non-agreement models is the presence of negative (i.e. antagonistic) interactions between individuals [3], [7]: indeed, negative interactions counter the positive interactions that are commonplace in social influence models and that lead individuals to conform with their peers.

Opinion dynamics take place on social networks, which can be very large, and their analysis needs to cope with such scale. A useful instrument in this perspective is the theory of graph limits, and particularly of graphons [8]. Using graphons to study dynamical systems on networks is currently a very active area of research. Some works have focused on relevant properties of the networks [9]–[11], while others have considered dynamical systems on graphons, including random walks [12], interacting particle systems [13], epidemics [14], [15], opinion dynamics [16], [17], synchronization [18], [19], and general control systems [20]–[22].

In this paper we consider opinion dynamics on signed graphs and we define their graphon counterparts. More precisely, we consider both the so-called *repelling model* and the *opposing model*, two extensions of the classical French-DeGroot model that allow the agents to have negative interactions [3]. After showing, in Theorem 1, the existence and uniqueness of the solutions to these two dynamics on signed

graphons, we offer two main contributions. First, in Theorem 2 we estimate the approximation error between solutions on signed graphs and solutions on signed graphons. The error bound in Theorem 2 readily implies the convergence of the solutions on signed graphs to solutions on a signed graphon, provided the sequence of graphs converges to the graphon as the number of individuals $n$ goes to infinity. Second, in Theorem 5 we prove that these sufficient conditions are general enough to apply to sequences of random signed graphs sampled from signed graphons. Our analysis distinguishes itself from the literature by making the weakest assumptions on the regularity of the graphons and by allowing for *sparse* sampled graphs, whose average degree only needs to grow faster than $log n$. These features are enabled by two results of independent interest: Theorem 3, which contains new convergence conditions for sparse graphs that are sampled according to graphons (also known as W-random graphs), and Theorem 4, which provides tight estimates of the maximum and the average degrees of these sampled graphs.

*Related work:* Several papers have considered opinion dynamics on graphons, related Laplacian-based dynamics on graphons, or the properties of graphon Laplacians. The overwhelming majority of works assume non-negative interactions, including [10], [12], [23], [24]. Papers [16], [25] contain a study of graphon opinion dynamics with non-negative, but possibly time-varying, interactions. Other works have considered more general, nonlinear, Laplacian-based dynamics on networks. For instance, the well-known work by Medvedev [26], [27] covers nonlinear dynamics such as the Kuramoto model of synchronization. Signed graphons have been sometimes considered in the literature [28], but rarely as a dynamical model, even though the importance of large-scale signed social networks has long been recognized [29]. Recently, the paper [30] has considered the repelling dynamics on signed graphs and has proved the existence of solutions for piece-wise constant graphons. Our results are more general than the latter as they cover the opposing dynamics, include explicit approximation bounds, consider the case of random sampled graphs, and make much more general assumptions on the regularity of the graphons. A more detailed discussion of our contributions compared to prior work is deferred to Section V.

*Outline:* In Section II, we recall the relevant models of opinion dynamics on signed graphs and we define their graphon counterparts. We then prove that the latter have complete classical solutions from any initial condition. In Section III, we prove a bound on the error between solutions of the dynamics on graphs with $n$ nodes and solutions of the graphon dynamics. In Section IV we show that this bound implies that solutions converge, when $n \to \infty$, for large random graphs sampled from signed graphons. Section V contains a detailed comparison with the literature and Section VI an illustrative example, before concluding remarks in Section VII.

<footnote>All authors are with Univ. Grenoble Alpes, CNRS, Inria, Grenoble INP, GIPSA-lab, 38000 Grenoble, France (e-mails: raoul.prisant@gipsa-lab.fr; fed-erica.garin@inria.fr; paolo.frasca@gipsa-lab.fr).</footnote>

<footnote>This work has been partly supported by the French National Research Agency through grant COCOON ANR-22-CE48-0011.</footnote>
## II. OPINION DYNAMICS ON GRAPHS AND GRAPHONS

In this section, we recall established models of opinion dynamics on signed graphs and we define their counterparts on signed graphons. On our way to the latter, we recall the necessary preliminaries about graphons and about random graphs sampled from graphons.

### A. Opinion dynamics on signed graphs

Opinion dynamics study the evolution of the opinions of interacting individuals [1], [2]. The interaction network is modeled by an undirected graph $G_n$, where the nodes $v_i$ represent the individuals and the edges $e_{ij}$ represent an interaction between $v_i$ and $v_j$. In general, a weight matrix $A^{(n)}$ can be assigned to determine the strength of each connection. For the scope of this paper, we will take symmetric matrices $A^{(n)}$ with entries $A_{ij}^{(n)} \in \{-1, 0, +1\}$, where value +1 represents a positive interaction, that is, the two individuals trust each other and therefore their opinions grow closer, value 0 means lack of interaction, and value -1 represents the interaction between individuals who dislike each other and whose opinions tend to grow apart. Here, $A^{(n)}$ is a given matrix, but we highlight the dependence on the size $n$ in the notation, since throughout the paper we will consider sequences of graphs of increasing size.

Two relevant ways of defining an opinion dynamics associated with such signed graphs have been considered in the literature [3, Sect. 2.5.2]. The first is the so-called *repelling model*, in which the opinion of each node $i$ is modeled as $u_i^{(n)} \in \mathbb{R}$, and its evolution in time is determined by the differential equation

$$ egin{cases} \dot{u}_i^{(n)}(t) = \alpha_n \sum_{j=1}^{n} A_{ij}^{(n)} (u_j^{(n)}(t) - u_i^{(n)}(t)), \\ u_i^{(n)}(0) = g_i^{(n)}, \end{cases} \quad (1) $$

where $n$ is the number of nodes and $g_i^{(n)}$ the initial opinion of node $i$. The second is the *opposing model*, also known as Altafini model, in which the evolution in time of the opinion is instead described by the equation

$$ egin{cases} \dot{u}_i^{(n)}(t) = \alpha_n \left( \sum_{j=1}^{n} A_{ij}^{(n)} u_j^{(n)}(t) - \sum_{j=1}^{n} |A_{ij}^{(n)}| u_i^{(n)}(t) \right), \\ u_i^{(n)}(0) = g_i^{(n)}. \end{cases} \quad (2) $$

In both dynamics, the positive coefficient $\alpha_n$ is a “speed parameter” that we let depend on $n$: although it could be made to disappear by rescaling the time variable, its explicit presence will be useful in order to let $\alpha_n$ go to zero to “compensate” for an increased number of potential interactions when $n$ is large.

Following [3], we observe that in both dynamics the positive interactions are consistent with the classical DeGroot's rule of social interactions, which postulates that the opinions of trustful social members are attractive to each other [31]. Along a negative link, the opposing rule [7] postulates that the interaction will drive a node state to be attracted by the opposite of its neighbor's state; the repelling rule [32] postulates that the two node states will repel each other instead of being attractive.

### B. Graphs and graphons

When studying opinion dynamics on a society scale, the dimension of the graph becomes too large to deal with. To address this problem, we will make use of *graphons*, which are usually defined as symmetric measurable functions $W: I^2 \to [0, 1]$, where $I = [0, 1]$. Throughout this paper, we will define *signed graphons* to be symmetric measurable functions $W: I^2 \to [-1, 1]$. We shall instead refer to bounded symmetric measurable functions taking values in $\mathbb{R}$ simply as kernels. We define the degree of a kernel $W$ as the function $d_W: I \to \mathbb{R}^+$ such that $d_W(x) = \int_I W(x, y) dy$.

For every kernel $W$, we can define an integral operator $T_W: L^2(I) \to L^2(I)$ by:

$$ (T_W f)(x) := \int_I W(x, y) f(y) dy. $$

Notice that $T_{W_1+W_2} = T_{W_1} + T_{W_2}$ for any two kernels $W_1, W_2$. We will equip the space of kernels with the operator norm defined as

$$ \|T_W\| := \sup_{\|f\|_2=1} \|T_W f\|_2. $$

In order to compare (possibly signed) graphons and graphs of different sizes, it is useful to represent a graph as a piece-wise constant graphon. To do this, we partition the interval $I$ in $n$ intervals $I_i = (\frac{i-1}{n}, \frac{i}{n}]$ for $i = 1, \dots, n$, and set $W_n(x, y) = \sum_{i,j} A_{ij}^{(n)} \mathbb{1}_{I_i}(x) \mathbb{1}_{I_j}(y)$, that is, $W_n(x, y) = A_{ij}^{(n)}$, for all $(x, y) \in I_i \times I_j$. Informally, we can then see a graphon as the limit of a sequence of graphs, as for $n \to \infty$ the interval of length $\frac{1}{n}$ corresponding to each node has size that goes to 0, so that $I$ becomes a continuum of nodes. To make this idea precise, in this paper we will use the distance induced by the operator norm. Hence, we will say that a sequence of graphs (seen as its associated graphons $W_n$) converges to a graphon $W$ if $\|T_{W_n} - T_W\|$ goes to zero. This convergence notion among graphons is equivalent to the notion induced by the more popular cut norm; see [33, Lemma E.6]. Other (non-equivalent) norms are also used in the literature, such as the $L^2$ norm $\|W_n - W\|_2$ that is used in [26].

### C. Sampled graphs

The graph sequences of main interest for this paper are sequences of sampled graphs. The latter are widely studied in the literature for graphons with values in $[0, 1]$. For values in $[-1, 1]$, the natural extension is the following [34].

**Definition 1 (Sampled signed graphs):** Given a graphon $W$ and a set of points $X_i \in [0, 1]$ with $i = 1, \dots, n$, a sampled signed graph is a random graph with adjacency matrix $A^{(n)}$ such that

$$ A_{ij}^{(n)} = \mathrm{sign}(W(X_i, X_j)) \cdot \eta_{ij}, $$

where $\eta_{ij} \sim \mathrm{Ber}(\varepsilon_n|W(X_i, X_j)|)$ are independent Bernoulli random variables, for all $i < j$, and $\varepsilon_n \in (0, 1]$ is a parameter describing the sparsity of the adjacency matrix of the sampled signed graph. $\square$

If $\varepsilon_n = 1$, when we sample from a graphon $W$ with positive values, we have, for instance, that $W(X_i, X_j) = 0.5$ corresponds to a 50% chance of edge $(i, j)$ existing (i.e. $A_{ij}^{(n)} = 1$). The definition is then a natural extension to negative values, where $W(X_i, X_j) = -0.5$ means there is a 50% chance of a negative
edge existing between nodes i and j. If $\epsilon_n < 1$, the probability of an edge existing between any couple of nodes is reduced, so that the obtained graph is sparser.

When convenient, with a slight abuse of vocabulary, we will call 'graph sampled from the graphon $W$' also the piece-wise constant graphon $W_n(x,y) = \sum_{i,j} A_{ij}^{(n)} 1_{I_i}(x) 1_{I_j}(y)$ associated with the actual graph.

For the points $\{X_i\}$, we consider two possible definitions.

**Definition 2 (Latent variables):** For each $n$, consider $n$ points $X_1, \dots, X_n$ in the interval $I$, defined as follows:

1) Deterministic latent variables: $X_i = \frac{i}{n}$,

2) Stochastic latent variables: $X_i = U_{(i)}$, where $U_1, \dots, U_n$ are i.i.d. uniform in $I$ and $U_{(1)}, \dots, U_{(n)}$ is the corresponding order statistics. $\square$

### D. Opinion dynamics on signed graphons

In analogy to the graph case, for the repelling model we can define the dynamics on the graphon as

$$ \left\{ \begin{array}{l} \frac{\partial u}{\partial t}(x,t) = \int_I W(x,y)(u(y,t) - u(x,t)) \, dy \\ u(x,0) = g(x), \end{array} \right. \qquad (3) $$

where $I = [0, 1]$, $u : I \times \mathbb{R}^+ \to \mathbb{R}$ is the opinion distribution and $g : I \to \mathbb{R}$ is the initial opinion distribution, whereas for the opposing model, we can write

$$ \left\{ \begin{array}{l} \frac{\partial u}{\partial t}(x,t) = \int_I W(x,y)u(y,t) \, dy - \int_I |W(x,y)|u(x,t) \, dy \\ u(x,0) = g(x). \end{array} \right. \qquad (4) $$

Existence and uniqueness of solutions of (3) is given in [26, Theorem 3.2]; a slight modification of its proof allows to obtain the same for (4) as well.

**Theorem 1 (Existence and uniqueness):** Assume that $W \in L^\infty(I^2)$ and $g \in L^\infty(I)$. Then, there exists a unique solution of (3), $u \in C^1(\mathbb{R}^+; L^\infty(I))$. The same holds for (4).

*Proof:* The statement concerning (3) is [26, Theorem 3.2]. The proof for (4) can be obtained by a very similar contraction argument, which we report for completeness. First, notice that $|W(x,y)| = W(x,y) + 2W^{-}(x,y)$, where $W^{-}(x,y) = \max\{-W(x,y), 0\}$ is the negative part of $W$. With this, we can see that the integro-differential equation in (4) is equivalent to the integral equation $u = Ku$ with $K$ defined as

$$ (Ku)(x,t) = g(x) + \int_{0}^{t} \int_{I} |W(x,y)| (u(y,s) - u(x,s)) \, dy \, ds \\ + 2 \int_{0}^{t} \int_{I} W^{-}(x,y) u(y,s) \, dy \, ds. $$

Consider $M_g$ the space of functions $u \in C([0, \tau]; L^\infty(I))$ such that $u(x,0) = g(x)$, with the norm $\|v\|_{M_g} = \max_{t \in [0, \tau]} \sup_{x \in I} |v(x,t)|$. Clearly $K : M_g \to M_g$. The goal is to show that $K$ is a contraction, for some sufficiently small $\tau$. From the definition of $K$,

$$ (Ku - Kv)(x,t) = \int_{0}^{t} \int_{I} |W(x,y)| (u(y,s) - v(y,s)) \, dy \, ds \\ + \int_{0}^{t} \int_{I} |W(x,y)| (-u(x,s) + v(x,s)) \, dy \, ds \\ + 2 \int_{0}^{t} \int_{I} W^{-}(x,y) (u(y,s) - v(y,s)) \, dy \, ds. $$

from which it is easy to see that

$$ |(Ku - Kv)(x,t)| \le \|W\|_{\infty} \left[ 3 \int_{0}^{t} \int_{I} |u(y,s) - v(y,s)| \, dy \, ds \right. \\ \left. \qquad + \int_{0}^{t} |u(x,s) - v(x,s)| \, ds \right]. $$

This bound is the same as in the proof of [26, Theorem 3.2], except for the factor 3 in the first term in the right-hand side. The conclusion then follows in a similar way:

$$ 3 \int_{0}^{t} \int_{I} |u(y,s) - v(y,s)| \, dy \, ds + \int_{0}^{t} |u(x,s) - v(x,s)| \, ds \\ \le 4t \max_{s \in [0,t]} \|u(\cdot, s) - v(\cdot, s)\|_{L^{\infty}(I)}, $$

which does not depend on $x$, and hence

$$ \begin{aligned} \|Ku - Kv\|_{M_g} &\le 4\|W\|_{\infty} \max_{t \in [0, \tau]} \max_{s \in [0, t]} \|u(\cdot, s) - v(\cdot, s)\|_{L^{\infty}(I)} \\ &\le 4\|W\|_{\infty} \tau \max_{t \in [0, \tau]} \|u(\cdot, t) - v(\cdot, t)\|_{L^{\infty}(I)} = 4\|W\|_{\infty} \tau \|u - v\|_{M_g}. \end{aligned} $$

Choosing $\tau = 1/(8\|W\|_\infty)$, this ensures that $K$ is a contraction. By Banach contraction theorem, this ensures existence and uniqueness of solution $u \in M_g$. The argument can then be iterated on further intervals $[k\tau, (k+1)\tau]$ to extend the result to the real line. Furthermore, since the integrand (in time) in the definition of $K$ is continuous, $u$ is continuously differentiable. Thus, we have a classical solution. $\square$

## III. BOUNDS ON THE APPROXIMATION ERRORS

The objective of this section is to compare the solutions of (1) to the solutions of (3) (and analogously for solutions of (2) and of (4)) for large values of $n$. Since these solutions belong to different spaces, it is necessary to explain how this comparison will be made. The following lemma is instrumental to a fair comparison.

**Lemma 1 (Graph dynamics as graphon dynamics):** Let $A^{(n)}$ be the adjacency matrix of a graph, and $W_n(x,y) = \sum_{i,j} A_{ij}^{(n)} 1_{I_i}(x) 1_{I_j}(y)$ be its associated graphon, where $I_i = (\frac{i-1}{n}, \frac{i}{n}]$, $1_{I_i}(x) = 1$ if $x \in I_i$ and $0$ otherwise. Define $g_n(x) = \sum_{i=1}^{n} g_i^{(n)} 1_{I_i}(x)$, and $u_n(x,t) = \sum_{i=1}^{n} u_i^{(n)}(t) 1_{I_i}(x)$.

If $u^{(n)}(t)$ is solution of (1), then $u_n(x,t)$ is solution of

$$ \left\{ \begin{array}{l} \frac{\partial u_n}{\partial t}(x,t) = n\alpha_n \int_I W_n(x,y)(u_n(y,t) - u_n(x,t)) \, dy \\ u_n(x,0) = g_n(x). \end{array} \right. \qquad (5) $$

Analogously, if $u^{(n)}(t)$ is solution of (2), then $u_n(x,t)$ is solution of

$$ \left\{ \begin{array}{l} \frac{\partial u_n}{\partial t}(x,t) = n\alpha_n \left( \int_I W_n(x,y)u_n(y,t) \, dy - \int_I |W_n(x,y)|u_n(x,t) \, dy \right) \\ u_n(x,0) = g_n(x). \end{array} \right. \qquad (6) $$

*Proof:* We detail the proof for the repelling model. From the definition of $u_n(x,t)$, we have

$$ \frac{\partial u_n(x,t)}{\partial t} = \sum_{i=1}^{n} \frac{\mathrm{d}u_i^{(n)}(t)}{\mathrm{d}t} 1_{I_i}(x), $$
which means that, for any $i$, for all $x \in I_i$,

$$
\begin{align*}
\frac{\partial u_n(x,t)}{\partial t} = \frac{du_i^{(n)}(t)}{\partial t} &= \sum_{j=1}^{n} \alpha_n A_{ij} (u_j^{(n)}(t) - u_i^{(n)}(t)) \\
&= \sum_{j=1}^{n} n \alpha_n \int_{I_j} W_n(x,y) (u_n(y,t) - u_n(x,t)) dy \\
&= n \alpha_n \int_I W_n(x,y) (u_n(y,t) - u_n(x,t)) dy.
\end{align*}
$$

The proof for the opposing model is analogous.

Notice that (5) and (6) are particular cases of (3) and (4), respectively, where the graphon $W$ and the initial condition $g$ are piece-wise constant. Hence, Theorem 1 on existence and uniqueness of classical solutions applies to (5) and (6) as well. This implies that (1) and (2) respectively have the equivalent formulations (5) and (6) which use graphons, so that we can now directly compare $u(x,t)$ and $u_n(x,t)$.

Before stating the main theorem (Theorem 2), we prove a property that will be useful in the theorem's proof.

**Proposition 1:** Let $W(x,y): I^2 \to [-1,1]$ be a signed graphon and $f \in L^2(I)$ be a function. Then, it holds

$$ \left| \int_{I^2} (W(x,y)f(x)^2 - W(x,y)f(x)f(y)) \, dx dy \right| \le 2 \|d_{|W|}\|_{\infty} \|f\|_2^2. $$

*Proof:* By the triangle inequality,

$$ \begin{align*}
\left| \int_{I^2} (W(x,y)f(x)^2 - W(x,y)f(x)f(y)) \, dx dy \right| \\
\le \int_{I^2} |W(x,y)f(x)^2| \, dx dy + \int_{I^2} |W(x,y)f(x)f(y)| \, dx dy. \quad (7)
\end{align*} $$

For the first term, using Tonelli's Theorem and Hölder's inequality, we can write

$$ \begin{align*}
\int_{I^2} |W(x,y)f(x)^2| \, dx dy &= \int_I f(x)^2 (\int_I |W(x,y)| \, dy) \, dx \\
&= \int_I f(x)^2 d_{|W|}(x) \, dx \le \|d_{|W|}\|_{\infty} \|f^2\|_1 = \|d_{|W|}\|_{\infty} \|f\|_2^2.
\end{align*} $$

Using this expression and Hölder's inequality, we can write the second term of (7) as

$$ \begin{align}
\int_{I^2} |W(x,y)| |f(x)| |f(y)| \, dx dy \tag{8} \\
&= \int_{I^2} \left( \sqrt{|W(x,y)|} |f(x)| \right) \left( \sqrt{|W(y,x)|} |f(y)| \right) \, dx dy \nonumber \\
&\le \|f\sqrt{|W|}\|_2^2 = \int_{I^2} |W(x,y)f(x)^2| \, dx dy \le \|d_{|W|}\|_{\infty} \|f\|_2^2. \nonumber
\end{align} $$

Adding the two terms yields the statement.

**Remark 1 (Spectrum of the graphon Laplacian operator):** For a non-negative graphon $W$, Proposition 1 implies

$$ \langle f, L_W f \rangle \le 2 \|d_W\|_{\infty} \|f\|_2^2, $$

where $L_W: L^2(I^2) \to L^2(I^2)$ is the graphon Laplacian operator defined by $L_W f(x) = \int_I W(x,y)(f(x) - f(y)) dy$ and $\langle \cdot, \cdot \rangle$ denotes the $L^2$ inner product. $L_W$ is a self-adjoint operator with domain $L^2(I)$ and hence its spectrum $\sigma(L_W)$ satisfies $\inf \sigma(L_W) = \inf_{f: \|f\|_2=1} \langle f, L_W f \rangle$ and $\sup \sigma(L_W) = \sup_{f: \|f\|_2=1} \langle f, L_W f \rangle$ (see e.g. [35, Theorem 2.19]). Hence, by Proposition 1, together with the fact that $\langle f, L_W f \rangle \ge 0$ for all $f$ (see [16]),

$$ \sigma(L_W) \subseteq [0, 2 \|d_W\|_{\infty}]. $$

This is the extension to graphons of the well-known result for Laplacian matrices of graphs, whose eigenvalues lie in the interval $[0, 2d_{(n)}]$ where $d_{(n)}$ is the maximum degree (as it is easy to show by Gershgorin Circle Theorem). $\square$

We are now ready to state the main result of this section. We will use the notation $\|(u-u_n)(\cdot,t)\|_2$ for the $L^2$ norm of $u-u_n$ in the $x$ variable only.

**Theorem 2 (Approximation error estimates):** Let $W: I^2 \to [-1,1]$ be a signed graphon, and let $g \in L^\infty(I)$, $W_n$ and $g_n$ be as in Lemma 1. If $u_n$ and $u$ are solutions of (5) and (3), respectively, then for all $t \in [0,T]$

$$ \| (u - u_n)(\cdot, t) \|_{2}^{2} \le \left( \| g - g_n \|_{2} + \frac{C_{u,T}}{n \alpha_n \| d_{|W_n|} \|_{\infty}} \| T_{W - n \alpha_n W_n} \| \right) \exp(2n \alpha_n \| d_{|W_n|} \|_{\infty} T), $$

where $C_{u,T} = \essup_{t \in [0,T], x \in I}$ $|u(x,t)|$ (which is finite by Theorem 1).

If $u_n$ and $u$ are solutions of (6) and (4), respectively, then for all $t \in [0, T]$

$$ \| (u - u_n)(\cdot, t) \|_{2}^{2} \le \exp(4n \|d_{|W_n|}\|_{\infty} \alpha_n T) \left[ \|g - g_n\|_{2} + \frac{C_{u,T}}{n \alpha_n \|d_{|W_n|}\|_{\infty}} \left( \|T_{W^+} - n \alpha_n T_{W_n^+}\| + \|T_{W^-} - n \alpha_n T_{W_n^-}\| \right) \right], $$

where $W = W^+ - W^-$ denotes the decomposition of $W$ in its positive part $W^+ = \max(W, 0)$ and its negative part $W^- = \max(-W, 0)$.

*Proof:* We will use the short-hand notations $\xi_n(x,t) = u_n(x,t) - u(x,t)$ and $\tilde{W}_n(x,y) = n\alpha_n W_n(x,y) - W(x,y)$. We begin by the repelling case. From (3) and (5), we have

$$ \frac{\partial \xi_n(x,t)}{\partial t} = n \alpha_n \int_I W_n(x,y) (u_n(y,t) - u_n(x,t)) dy - \int_I W(x,y) (u(y,t) - u(x,t)) dy. $$

We add the following zero term to the right-hand side: $-n\alpha_n \int_I W_n(x,y)(u(y,t) - u(x,t)) dy + n\alpha_n \int_I W_n(x,y)(u(y,t) - u(x,t)) dy$, to obtain

$$ \frac{\partial \xi_n(x,t)}{\partial t} = n \alpha_n \int_I W_n(x,y) (\xi_n(y,t) - \xi_n(x,t)) dy \\ + \int_I \tilde{W}_n(x,y) (u(y,t) - u(x,t)) dy. $$

Then, we multiply both sides by $\xi_n(x,t)$ and integrate over $I$

$$ \int_I \frac{\partial \xi_n(x,t)}{\partial t} \xi_n(x,t) \, dx = n \alpha_n \int_{I^2} W_n(x,y) (\xi_n(y,t) - \xi_n(x,t)) \xi_n(x,t) \, dx dy \\ + \int_{I^2} \tilde{W}_n(x,y) (u(y,t) - u(x,t)) \xi_n(x,t) \, dx dy. \quad (9) $$

For the left-hand side, notice that

$$ \int_I \frac{\partial \xi_n(x,t)}{\partial t} \xi_n(x,t) \, dx = \frac{1}{2} \int_I \frac{\partial (\xi_n(x,t))^2}{\partial t} \, dx = \frac{1}{2} \frac{d}{dt} \| \xi_n(\cdot, t) \|_2^2. \quad (10) $$
By using Proposition 1 with $f(x) = \xi(x, t)$, we estimate the first term of the right-hand side of (9) as follows:

$$ \left| n\alpha_n \int_{I^2} W_n(x,y)(\xi_n(y,t) - \xi_n(x,t))\xi_n(x,t) \,dx\,dy \right| \le 2n\alpha_n \|d_{|W_n|}\|_{\infty} \|\xi_n\|_2^2, \quad (11) $$

while for the second term we have

$$ \left| \int_{I^2} \tilde{W}_n(x,y)(u(y,t) - u(x,t))\xi_n(x,t) \,dx\,dy \right| \le \left| \int_{I^2} \tilde{W}_n(x,y)u(y,t)\xi_n(x,t) \,dx\,dy \right| + \left| \int_{I^2} \tilde{W}_n(x,y)u(x,t)\xi_n(x,t) \,dx\,dy \right|. \quad (12) $$

Recalling the definition of the integral operator $T_W$ associated with a graphon $W$, we have

$$ \left| \int_{I^2} \tilde{W}_n(x,y)u(y,t)\xi_n(x,t) \,dx\,dy \right| = \left| \int_I (T_{\tilde{W}_n}\xi_n(\cdot,t))(y)u(y,t) \,dy \right| \le \|(T_{\tilde{W}_n}\xi_n)(\cdot,t)u(\cdot,t)\|_1. $$

Then, by Hölder inequality,

$$ \begin{aligned} \|(T_{\tilde{W}_n}\xi_n)(\cdot,t)u(\cdot,t)\|_1 &\le \|(T_{\tilde{W}_n}\xi_n)(\cdot,t)\|_2 \|u(\cdot,t)\|_2 \\ &\le \|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)\|_2 \|u(\cdot,t)\|_2 \le \|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)\|_2 \|u(\cdot,t)\|_{\infty}. \end{aligned} $$

Similarly, for the second term in (12),

$$ \left| \int_{I^2} \tilde{W}_n(x,y)u(x,t)\xi_n(x,t) \,dx\,dy \right| = \left| \int_I (T_{\tilde{W}_n}(\xi_n(\cdot,t)u(\cdot,t))) (y) \,dy \right| \le \|T_{\tilde{W}_n}(\xi_n(\cdot,t)u(\cdot,t))\|_1, $$

and

$$ \begin{aligned} \|T_{\tilde{W}_n}(\xi_n(\cdot,t)u(\cdot,t))\|_1 &\le \|T_{\tilde{W}_n}(\xi_n(\cdot,t)u(\cdot,t))\|_2 \\ &\le \|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)u(\cdot,t)\|_2 \le \|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)\|_2 \|u(\cdot,t)\|_{\infty}. \end{aligned} $$

We have obtained that for the second term in (9):

$$ \left| \int_{I^2} \tilde{W}_n(x,y)(u(y,t) - u(x,t))\xi_n(x,t) \,dx\,dy \right| \le 2\|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)\|_2 \|u(\cdot,t)\|_{\infty} \le 2C_{u,T} \|T_{\tilde{W}_n}\| \|\xi_n(\cdot,t)\|_2, \quad (13) $$

with $C_{u,T} = \ess\sup_{t\in[0,T], x\in I} |u(x,t)|$, which is finite, since $u$ is continuous in time and essentially bounded in space, by Theorem 1.

Combining (9), (10), (11) and (13), we have

$$ \begin{aligned} & \frac{1}{2} \frac{d}{dt} \|\xi_n(\cdot, t)\|_2^2 \\ &\le 2n\alpha_n \|d_{|W_n|}\|_{\infty} \|\xi_n(\cdot, t)\|_2^2 + 2C_{u,T} \|T_{\tilde{W}_n}\| \|\xi_n(\cdot, t)\|_2. \end{aligned} \quad (14) $$

This is similar to the estimate obtained in [26, Eq. (4.16)], but with different constants, $\|T_{\tilde{W}_n}\|$ instead of $\|\tilde{W}_n\|_2$, and the presence of the scaling factor $\alpha_n$. Then, the argument can then be concluded along the same lines as [26], as follows. To ‘divide by $\|\xi_n(\cdot,t)\|$’ avoiding the risk to divide by zero, one defines an auxiliary function $\phi_\delta(t) = \sqrt{\|\xi_n(\cdot,t)\|_2^2 + \delta}$, for any $\delta > 0$. From (14),

$$ \frac{1}{2} \frac{d}{dt} \phi_\delta(t)^2 \le 2n\alpha_n \|d_{|W_n|}\|_{\infty} \phi_\delta(t)^2 + 2C_{u,T} \|T_{\tilde{W}_n}\| \phi_\delta(t) $$

and, by chain rule and dividing by $\phi_\delta(t)$,

$$ \frac{d}{dt} \phi_\delta(t) \le 2n\alpha_n \phi_\delta(t) + 2C_{u,T} \|T_{\tilde{W}_n}\|. $$

With notation $a = 2n\alpha_n \|d_{|W_n|}\|_{\infty}$, $b = 2C_{u,T} \|T_{\tilde{W}_n}\|$, we have

$$ \frac{d}{dt} \phi_\delta(t) \le a\phi_\delta(t) + b. $$

By Grönwall's lemma, $\phi_\delta(t) \le \zeta(t)$ where $\frac{d}{dt}\zeta(t) = a\zeta(t) + b$ and $\zeta(0) = \phi_\delta(0)$. Solving the ODE, we have

$$ \zeta(t) = e^{at} (\phi_\delta(0) + \frac{b}{a}(1 - e^{-at})). $$

Since $a > 0, b > 0, \phi_\delta(0) > 0$ and $t \in [0, T]$,

$$ \begin{aligned} \zeta(t) &\le e^{aT} (\phi_\delta(0) + \frac{b}{a}) \\ &= e^{2n\alpha_n \|d_{|W_n|}\|_{\infty} T} \left( \phi_\delta(0) + \frac{C_{u,T}}{n\alpha_n \|d_{|W_n|}\|_{\infty}} \|T_{\tilde{W}_n}\| \right). \end{aligned} $$

Since $\phi_\delta(t) \le \zeta(t)$ and $\delta$ is arbitrary, this gives the conclusion.

Now we consider the opposing case. From (4) and (6), recalling that $|W_n(x,y)| = W_n(x,y) + 2W_n^-(x,y)$, we have

$$ \begin{aligned} \frac{\partial \xi_n(x,t)}{\partial t} &= n\alpha_n \int_I |W_n(x,y)| (u_n(y,t) - u_n(x,t)) \,dy \\ &\quad - \int_I |W(x,y)| (u(y,t) - u(x,t)) \,dy \\ &\quad - 2n\alpha_n \int_I W_n^-(x,y)u_n(y,t) \,dy + 2 \int_I W^-(x,y)u(y,t) \,dy. \end{aligned} $$

We add the following zero term to the right-hand side: $-n\alpha_n \int_I |W_n(x,y)| (u(y,t) - u(x,t)) \,dy + n\alpha_n \int_I |W_n(x,y)| (u(y,t) - u(x,t)) \,dy - 2n\alpha_n \int_I W_n^-(x,y)u(y,t) \,dy + 2n\alpha_n \int_I W_n^-(x,y)u(y,t) \,dy$. Then we multiply both sides by $\xi_n(x,t)$ and integrate in $I$ in the $x$ variable. We obtain:

$$ \begin{aligned} & \int_I \frac{\partial \xi_n(x,t)}{\partial t} \xi_n(x,t) \,dx \\ &= n\alpha_n \int_{I^2} |W_n(x,y)| (\xi_n(y,t) - \xi_n(x,t)) \xi_n(x,t) \,dx \,dy \\ &\quad + \int_{I^2} (n\alpha_n |W_n(x,y)| - |W(x,y)|) (u(y,t) - u(x,t)) \xi_n(x,t) \,dx \,dy \\ &\quad - 2n\alpha_n \int_{I^2} W_n^-(x,y) \xi_n(y,t) \xi_n(x,t) \,dx \,dy \\ &\quad - 2 \int_{I^2} (n\alpha_n W_n^-(x,y) - W^-(x,y)) u(y,t) \xi_n(x,t) \,dx \,dy. \end{aligned} \quad (15) $$

Compare (15) with (9). The left-hand side is the same and the first two terms of the right-hand side are almost the same, with the only difference that $W_n(x,y)$ and $W(x,y)$ are now replaced by $|W_n(x,y)|$ and $|W(x,y)|$. Hence, (10), (11) and (13) still apply, except that $\|T_{\tilde{W}_n}\|$ is replaced by $\|T_{n\alpha_n|W_n|-|W|}\|$. In the following, we take care of the remaining terms, which were not present in (9).

Recalling the calculations done in (8), we have

$$ \begin{aligned} & \left| 2n\alpha_n \int_{I^2} W_n^-(x,y)\xi_n(y,t)\xi_n(x,t) \,dx\,dy \right| \\ &\le 2n\alpha_n \int_{I^2} |W_n^-(x,y)| |\xi_n(y,t)| |\xi_n(x,t)| \,dx\,dy \\ &= 2n\alpha_n \|d_{W_n^-}\|_{\infty} \|\xi_n(\cdot,t)\|_2^2 \le 2n\alpha_n \|d_{|W_n|}\|_{\infty} \|\xi_n(\cdot,t)\|_2^2. \end{aligned} $$
For the last term,

$$
\begin{align*}
& \left| 2 \int_I (n \alpha_n W_n^-(x,y) - W^-(x,y)) u(y,t) \xi_n(x,t) \, dx dy \right| \\
& \le 2 \int_I |(T_{n \alpha_n} W_n^--W^- \xi_n)(\cdot,t))(y)| |u(y,t)| dy \\
& = 2 \|(T_{n \alpha_n} W_n^--W^- \xi_n)(\cdot,t)) u(\cdot,t)\|_1 \\
& \le 2 \|(T_{n \alpha_n} W_n^--W^- \xi_n)(\cdot,t)) \|_2 \|u(\cdot,t)\|_\infty \\
& \le 2 \|T_{n \alpha_n} W_n^--W^-\| \|\xi_n(\cdot,t)\|_2 C_{u,T}.
\end{align*}
$$

Collecting the upper bounds for all four terms in the right-hand
side of (15), we get

$$
\frac{1}{2} \frac{d}{dt} \|\xi_n(\cdot, t)\|_2^2 \le 4n\alpha_n \|d_{|W_n|}\|_{\infty} \|\xi_n(\cdot, t)\|_2^2 \\
\qquad + 2C_{u,T} \left( \|T_{n\alpha_n|W_n|-|W|}\| + \|T_{n\alpha_n|W_n|-W^-}\| \right) \|\xi_n(\cdot, t)\|_2.
$$

Using $|W| = W^+ + W^-$, $T_{W_1+W_2} = T_{W_1} + T_{W_2}$ and triangle inequality, we have $\|T_{n\alpha_n|W_n|-|W|}\| \le \|T_{n\alpha_n|W_n^+}-T_{W^+}\| + \|T_{n\alpha_n|W_n^-}-T_{W^-}\|$. Hence,

$$
\frac{1}{2} \frac{d}{dt} \|\xi_n(\cdot, t)\|_2^2 \le 4n\alpha_n \|d_{|W_n|}\|_{\infty} \|\xi_n(\cdot, t)\|_2^2 \\
+ 4C_{u,T} \left( \|T_{n\alpha_n} W_n^+ - T_{W^+}\| + \|T_{n\alpha_n} W_n^- - T_{W^-}\| \right) \|\xi_n(\cdot, t)\|_2,
$$

which is the analogous of (14). The conclusion
then follows by the same technique involving $\phi_\delta$
and Grönwall's lemma, with $a = 4n\alpha_n \|d_{|W_n|}\|_{\infty}$ and
$b = 4C_{u,T} (\|T_{n\alpha_n} W_n^+ - T_{W^+}\| + \|T_{n\alpha_n} W_n^- - T_{W^-}\|)$.
■

Theorem 2 implies that, so long as the initial conditions
converge and the finite graphs (weighted by $n\alpha_n$) converge to
the graphon and have bounded degrees, then the dynamics on
the finite graphs converge to the dynamics on the graphon, in
the sense that solutions converge on bounded intervals.

IV. CONVERGENCE OF SOLUTIONS FOR SAMPLED GRAPHS

The goal of this section is to apply Theorem 2 and provide
conditions for solutions of opinion dynamics on large graphs
that are sampled from graphons to converge, as $n \to \infty$, to
solutions of opinion dynamics on graphons. Subsection IV-A
is dedicated to the analysis of the term $\|T_{n\alpha_n}W_n - T_W\|$ when
$W$ is a non-negative graphon, proving its convergence to zero
when $n\alpha_n = \varepsilon_n^{-1}$ in Theorem 3. In Subsection IV-B, we prove
Theorem 4, stating that, for a non-negative graphon and for
$n\alpha_n = \varepsilon_n^{-1}$, the term $n\alpha_n\|d_{W_n}\|_{\infty}$ is bounded both from above
and from below. Next, in Subsection IV-C, we extend these
two theorems to signed graphons. As a last step, in Subsec-
tion IV-D, we consider the term $\|g - g_n\|_2$ relative to the initial
conditions, and show its convergence to zero in Proposition 13.
In Subsection IV-E, we combine the previous results to derive
sufficient conditions for convergence in Theorem 5. These
conditions include choosing $\varepsilon_n = \omega(\log n/n)$. Here, $\omega$ and the
symbols $o, O, \Omega$ and $\Theta$, used throughout this section, are the
Bachmann-Landau notations.<fnref n="1" />

A. *Convergence of sampled graphs – non-negative graphon*

In this subsection, we study the convergence to zero of
$\|\bar{T}_{\epsilon_n^{-1}W_n} - T_W\|$. Almost sure convergence of sampled graphs
to graphons is well-known under very mild assumptions, but
most results are given in ‘cut distance’, i.e., in cut norm but up
to a suitable unknown measure-preserving transformation (see
e.g. [8], Coroll. 11.34 for the case with deterministic latent
variables and Prop. 11.32 for the case with stochastic latent
variables). This is equivalent to almost sure convergence in
cut norm, up to an unknown permutation of vertices of each
graph in the sequence of graphs [36, Lemma 5.3]. Having
chosen points $X_i$ in an increasing order, it is natural to hope that
vertices are already ordered in the most useful way and might
not need further permutation to obtain convergence. Moreover,
the equivalence between operator norm and cut norm from [33,
Lemma E.6] does not apply because $\epsilon_n^{-1}W_n$ can be unbounded.
The desired convergence in operator norm is proved in [9]
under some regularity assumption on the graphon.

**Proposition 2 (f9, Thm. 1):** Let $W: I^2 \to [0,1]$ be a piecewise Lipschitz graphon and $W_n$ a graph sampled from $W$ with either deterministic or stochastic latent variables. If $\epsilon_n = n^{-\tau}$ for some $\tau \in [0,1)$, then almost surely $\|T_{\epsilon_n^{-1}W_n} - T_W\| \to 0$ for $n \to \infty$. $\square$

In this subsection, we will obtain Theorem 3, which shows
that the same holds true under minimal assumptions. To
do this, we build upon several results from the literature,
going beyond the most classical proof techniques as in [8],
which involve subgraph densities and only give results in cut
distance.

Before starting, we observe that, when W is a graphon
taking values in [0, 1], so that (W_n - W) takes values in [-1, 1],
convergence in L^1 norm implies convergence in operator norm,
thanks to the following result.

**Proposition 3:** Let $W: I^2 \to [-1, 1]$ be a signed graphon.
Then, it holds that $\|T_W\| \le \sqrt{\|W\|_1}$.

*Proof:* Let $W$ be a signed graphon, we have

$$
\|T_W\|^2 = \sup_{\|u\|_2=1} \|T_W u\|_2^2 = \sup_{\|u\|_2=1} \int_I \left( \int_I W(x,y) u(y) \, dy \right)^2 \, dx.
$$

Using the Cauchy-Schwarz inequality and $\|u\|_2 = 1$, we obtain

$$
\left( \int_I W(x,y) u(y) \, dy \right)^2 \le \|W(x, \cdot)\|_2^2 \|u\|_2^2 = \int_I W(x,y)^2 \, dy.
$$

Since $W$ takes values in $[-1,1]$, it holds that $W(x,y)^2 \le |W(x,y)|$, from which

$$
\|T_W\|^2 \le \int_{I \times I} W(x,y)^2 \, dx dy \le \int_{I \times I} |W(x,y)| \, dx dy = \|W\|_1.
$$

<figure><img src="image_1.png" /></figure>

Having chosen deterministic or stochastic latent variables $X_1, \dots, X_n$ as in Definition 2, we will consider the weighted graph $\bar{G}_n$ having $n$ vertices and adjacency matrix $\bar{A}^{(n)}$ with $\bar{A}_{ij}^{(n)} = W(X_i, X_j)$. We will denote by $\bar{W}_n$ the associated piecewise constant graphon $\bar{W}_n(x, y) = \sum_{i,j} W(X_i, X_j) \mathbb{1}_{I_i}(x) \mathbb{1}_{I_j}(y)$. To prove the convergence of $\varepsilon_n^{-1}W_n$ to $W$, we will use $\bar{W}_n$ as an intermediary.

We start by studying the convergence of $\bar{W}_n$ to $W$. This is
done in a different way (and under different assumptions) for
the case of deterministic and of stochastic latent variables.

<footnote n="1">¹The Bachmann–Landau symbols are defined as follows: $f(n) = o(g(n))$ if $\frac{f(n)}{g(n)} \to 0$ for $n \to \infty$; $f(n) = \omega(g(n))$ if $g(n) = o(f(n))$; $f(n) = O(g(n))$ if there exist constants $M, N$ s.t. $|f(n)| \le M|g(n)|$ for $n > N$; $f(n) = \Omega(g(n))$ if $g(n) = O(f(n))$; and $f(n) = \Theta(g(n))$ if both $f(n) = O(g(n))$ and $f(n) = \Omega(g(n))$.</footnote>
In the case with deterministic latent variables, the following convergence result holds.

**Proposition 4:** Let $W: I^2 \to [0,1]$ be an almost everywhere continuous graphon and let $\bar{W}_n(x,y) = \sum_{i,j} W(X_i, X_j) \mathbb{1}_{I_i}(x) \mathbb{1}_{I_j}(y)$, where $X_i = i/n$. Then,

$$ \|\bar{W}_n - W\|_1 \to 0 \text{ for } n \to \infty. $$

**Proof:** The proof uses the following simple argument, mentioned in [26], from the proof of [37, Lemma 2.5]. The first step is to notice that for almost every point $(x,y)$ there is point-wise convergence of $\bar{W}_n(x,y)$ to $W(x,y)$. Indeed, for almost every $(x,y)$, $W$ is continuous at $(x,y)$, and $\bar{W}_n(x,y) = W(x_n, y_n)$ for some $(x_n, y_n)$ such that $\|(x_n, y_n) - (x,y)\|_2 \le \sqrt{2}/n \to 0$ (since $(x_n, y_n) = (i/n, j/n)$ where $i, j$ are the indexes such that $(x,y) \in I_i \times I_j$), and hence $\bar{W}_n(x,y) \to W(x,y)$. From this pointwise (almost everywhere) convergence, the desired $L^1$ convergence is obtained by Lesbesgue dominated convergence theorem, having noticed that $|\bar{W}_n(x,y) - W(x,y)| \le 2$. ■

In the case with stochastic latent variables, convergence of $\bar{W}_n$ to $W$ is obtained in [34, Theorem 2.14(a)], where it is stated for a wider class of graphons, possibly unbounded, which includes as a particular case the more classical graphons considered in this paper. Notice that, with stochastic latent variables, no regularity assumption is needed.

**Proposition 5 ([34, Theorem 2.14(a)]):** Let $W: I^2 \to [0,1]$ be a graphon and let $\bar{W}_n(x,y) = \sum_{i,j} W(X_i, X_j) \mathbb{1}_{I_i}(x) \mathbb{1}_{I_j}(y)$ where $X_1, \dots, X_n$ are the stochastic latent variables. Then $\|\bar{W}_n - W\|_1 \to 0$ a.s., for $n \to \infty$. □

After having studied the convergence of $\bar{W}_n$ to $W$, one needs to study the convergence of $\varepsilon_n^{-1}W_n$ to $\bar{W}_n$. Notice that $\varepsilon_n \bar{A}^{(n)}$ is the expectation of $A^{(n)}$ conditioned on $X_1, \dots, X_n$. Hence, convergence of $\varepsilon_n^{-1}A^{(n)}$ to $\bar{A}^{(n)}$ is a concentration result that has been obtained in the literature about inhomogeneous Erdős-Rényi graphs.

**Proposition 6 ([38, Theorem 5.2]):** Let $A^{(n)}$ be a random adjacency matrix with expected value $\varepsilon_n \bar{A}^{(n)}$ and independently drawn edges. Let $b_n = n \varepsilon_n \max_{ij} \bar{A}_{ij}^{(n)}$. If $b_n = \Omega(\log n)$, then, for any $r > 0$, there exists a constant $C > 0$ such that

$$ \Pr(\|A^{(n)} - \varepsilon_n \bar{A}^{(n)}\| \le C\sqrt{b_n}) \ge 1 - n^{-r}, $$

where $\|A^{(n)}\|$ is the spectral norm of the matrix $A^{(n)}$. □

**Remark 2:** The spectral norm of an adjacency matrix is related to the operator norm of the associated graphon through the relationship $\|T_{W_n}\| = \frac{1}{n}\|A^{(n)}\|$. Indeed, since $A^{(n)}$ is self-adjoint, $\|A^{(n)}\|$ is equal to the greatest eigenvalue (in absolute value) of $A^{(n)}$. Similarly, $\|T_{W_n}\|$ is equal to the greatest eigenvalue (in absolute value) of $T_{W_n}$, see e.g. [39]. Finally, it is easy to see that $\lambda$ is an eigenvalue of $A^{(n)}$ if and only if $\lambda/n$ is an eigenvalue of $T_{W_n}$. □

By noticing that $\max_{ij} \bar{A}_{ij}^{(n)} = \|\bar{W}_n\|_{\infty}$, we can use Proposition 6 to obtain the following result, where we denote $b_n = n \varepsilon_n \max_{ij} \bar{A}_{ij}^{(n)} = n \varepsilon_n \|\bar{W}_n\|_{\infty}$.

**Proposition 7:** Let $W: I^2 \to [0,1]$ be a graphon and let $\bar{W}_n$ and $W_n$ be the above-described weighted graph and sampled graph, with either deterministic or stochastic latent variables. Then, for $n \to \infty$, if $b_n = \Omega(\log n)$, then

$$ \|T_{\varepsilon_n^{-1}W_n} - T_{\bar{W}_n}\| \to 0 \text{ a.s.} $$

**Proof:** We have

$$ \|T_{\varepsilon_n^{-1}W_n} - T_{\bar{W}_n}\| = \frac{1}{n\varepsilon_n} \|A^{(n)} - \varepsilon_n \bar{A}^{(n)}\|. \quad (16) $$

From Proposition 6, taking $r > 1$ we can use Borel-Cantelli Lemma to get $\|A^{(n)} - \varepsilon_n \bar{A}^{(n)}\| = O(\sqrt{b_n})$ almost surely. Since $b_n = n\varepsilon_n \|\bar{W}_n\|_{\infty} \le n\varepsilon_n$, substituting this inequality in (16) yields

$$ \|T_{\varepsilon_n^{-1}W_n} - T_{\bar{W}_n}\| = O\left(\frac{\sqrt{b_n}}{n\varepsilon_n}\right) = O\left(\frac{1}{\sqrt{n\varepsilon_n}}\right) \to 0 \text{ a.s.} \quad (17) $$

Notice that Proposition 7 requires to assume $b_n = \Omega(\log n)$ to obtain convergence of $\varepsilon_n^{-1}W_n$ to $\bar{W}_n$. The following remark will show that such assumption is often satisfied. Moreover, Proposition 8 will allow us to study the case in which this assumption does not hold; in this case, we will directly obtain the convergence of $\varepsilon_n^{-1}W_n$ to $W$, without using $\bar{W}_n$ as an intermediary. ■

**Remark 3:** Provided $\varepsilon_n = \omega(\log n/n)$, the condition "$b_n = \Omega(\log n)$" in Proposition 7 is always satisfied when $\|W\|_1 > 0$. Indeed, $\|\bar{W}_n\|_{\infty} \ge \|\bar{W}_n\|_1 \to \|W\|_1$ by Propositions 4 and 5 and the reverse triangle inequality. Therefore, $b_n = n\varepsilon_n \|\bar{W}_n\|_{\infty} = \omega(\log n)\Omega(1) = \omega(\log n)$. □

**Proposition 8:** Let $W: I^2 \to [0,1]$ be a graphon and $W_n$ be a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. If $\varepsilon_n = \omega(\log n/n)$ and $b_n = O(\log n)$, then almost surely $\|T_{\varepsilon_n^{-1}W_n} - T_W\| \to 0$ for $n \to \infty$. ■

**Proof:** By Remark 3, if $b_n = O(\log n/n)$, then necessarily $\|W\|_1 = 0$, which in turn implies $\|T_W\| = 0$ by Proposition 3. Next, define $d_{(n)}$ and $\tilde{d}_{(n)}$ as the maximum degree of, respectively, $A^{(n)}$ and $\bar{A}^{(n)}$. Notice that $\frac{1}{n}\tilde{d}_{(n)} \le \max_{ij} \bar{A}_{ij}^{(n)}$, and that, since $b_n = O(\log n)$, we have $\max_{ij} \bar{A}_{ij}^{(n)} = O(\frac{\log n}{n\varepsilon_n}) \to 0$. As we will show later in Lemma 2, $\frac{1}{n\varepsilon_n}|d_{(n)} - \varepsilon_n \tilde{d}_{(n)}| \to 0$ a.s., which, since $\frac{1}{n}\tilde{d}_{(n)} \to 0$, implies $\frac{1}{n\varepsilon_n}d_{(n)} \to 0$ a.s.. Furthermore, by Gershgorin's Circle Theorem, $\|T_{\varepsilon_n^{-1}W_n}\| = \frac{1}{n\varepsilon_n}\|A^{(n)}\| \le \frac{1}{n\varepsilon_n}d_{(n)}$, which goes to 0. The convergence $\|T_{\varepsilon_n^{-1}W_n}\| \to 0$, together with $\|T_W\| = 0$, yields the statement. ■

We now have all the ingredients to obtain the following convergence result, analogous to Proposition 2 under milder assumptions.

**Theorem 3 (Convergence of sampled graphs):** Let $W: I^2 \to [0,1]$ be a graphon and $W_n$ be a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. If $\varepsilon_n = \omega(\log n/n)$, then almost surely $\|T_{\varepsilon_n^{-1}W_n} - T_W\| \to 0$ for $n \to \infty$.

**Proof:** If $b_n = \Omega(\log n)$, then Propositions 4, 5 and 3 combined together give $\|\bar{W}_n - W\| \to 0$ a.s., which, when further combined with Proposition 7, yields the result by the triangle inequality. If $b_n = O(\log n)$, the result is given by Proposition 8. Finally, if $b_n$ is neither $\Omega(\log n)$, nor $O(\log n)$, then fix any $c_0 > 0$ and consider the two subsequences, one with the terms $\ge c_0 \log n$ and the other with the terms $< c_0 \log n$. Applying the arguments above to these subsequences yields the result. ■
## B. Bounds on the degree of sampled graphs

In the bounds of Theorem 2, the term $n\alpha_n\|d_{|W_n|}\|_\infty$ appears both as exponent and as denominator. We will show that if $n\alpha_n = \varepsilon_n^{-1}$ and $\varepsilon_n = \omega(\log n/n)$, then $n\alpha_n\|d_{|W_n|}\|_\infty$ is almost surely bounded both from above and from below, which implies that, for $n$ that goes to infinity, $(n\alpha_n\|d_{|W_n|}\|_\infty)^{-1}$ and $\exp(n\alpha_n\|d_{|W_n|}\|_\infty T)$ are almost surely bounded (for all finite $T$ in the latter expression). These bounds are based on the following analysis of the distribution of the degrees of sampled graphs, which we detail in this subsection for the case of non-negative graphons (Theorem 4) and then, in the next subsection, extend to signed graphons.

We start with the bound from above. Consider the graph $G_n$, sampled from the non-negative graphon $W$, and the associated piece-wise constant graphon $W_n$. We consider the nodes' degrees $d_i$, and use the label $(i)$ to denote the degrees reordered in increasing order $d_{(1)} \le \cdots \le d_{(n)}$. We define the normalized degrees $\delta_i = \frac{d_i}{n}$ and notice that $\delta_{(n)}$ is equal to $\|d_{W_n}\|_\infty$. Indeed, due to $W_n$ being piece-wise constant, we have

$$ \|d_{W_n}\|_{\infty} = \ess\sup_{x \in I} d_{W_n}(x) = \max_{x \in I} d_{W_n}(x) = \max_{i} \frac{d_i}{n} = \delta_{(n)}. $$

Similarly, $\|d_{\bar{W}_n}\|_\infty = \bar{\delta}_{(n)}$, where $\bar{\delta}_{(i)} = \frac{d_{(i)}}{n}$, with $\bar{d}_{(1)} \le \cdots \le \bar{d}_{(n)}$ being the reordered degrees of $\bar{G}_n$.

In order to study $\delta_{(n)}$, we need the following lemma.

**Lemma 2:** Let $W: I^2 \to [0,1]$ be a graphon. If $n$ is large enough, then with probability at least $1 - \nu$ the normalized degrees of graphs $\bar{G}_n$ and $G_n$ sampled from $W$ satisfy:

$$ \max_{i=1,\dots,n} |\varepsilon_n^{-1} \delta_{(i)} - \bar{\delta}_{(i)}| \le \sqrt{\frac{\log(2n/\nu)}{n \varepsilon_n}}. \quad (18) $$

*Proof:* This is [40, Lemma I], extended by the straightforward addition of the scaling factors $\varepsilon_n$.

With this, we are ready to prove that $\varepsilon_n^{-1}\|d_{W_n}\|_\infty$ is bounded from above.

**Proposition 9:** Let $W: I^2 \to [0,1]$ be a graphon and $W_n$ be a graph sampled from $W$, with either deterministic or stochastic latent variables. If $\varepsilon_n = \omega(\log n/n)$, then

$$ \varepsilon_n^{-1} \|d_{W_n}\|_\infty = O(1) \text{ a.s.} $$

*Proof:* From Lemma 2, if we take $\nu = n^{-a}$ for some $a > 1$ and use Borel-Cantelli Lemma, we obtain almost sure convergence:

$$ \max_i |\varepsilon_n^{-1} \delta_{(i)} - \bar{\delta}_{(i)}| = O\left(\sqrt{\frac{\log n}{n \varepsilon_n}}\right) \text{ a.s..} \quad (19) $$

Taking $\varepsilon_n = \omega(\log n/n)$, $\max_i |\varepsilon_n^{-1} \delta_{(i)} - \bar{\delta}_{(i)}| \to 0$ almost surely. Since this holds for all $i$, it holds in particular for $i=n$, which we have shown to be $\delta_{(n)} = \|d_{W_n}\|_\infty$. We have

$$ |\varepsilon_n^{-1} \|d_{W_n}\|_\infty - \|d_{\bar{W}_n}\|_\infty| \to 0 \text{ a.s..} $$

Since $\|d_{\bar{W}_n}\|_\infty \le 1$, this gives $\varepsilon_n^{-1}\|d_{W_n}\|_\infty = O(1)$ a.s., concluding the proof.

Moving on to the lower bound, we start by pointing out that the average (normalized) degree of a piece-wise constant graphon is equal to its $L^1$ norm. Indeed,

$$ \begin{aligned} \|W_n\|_1 &= \int_{I^2} |W_n(x,y)| \, dx \, dy = \sum_{i,j} \int_{I_i \times I_j} |W_n(x,y)| \, dx \, dy \\ &= \sum_{i,j} \frac{1}{n^2} |W(X_i, X_j)| = \frac{1}{n} \sum_i \sum_j \frac{W(X_i, X_j)}{n} = \frac{1}{n} \sum_i \frac{d_i}{n}. \end{aligned} $$

As the maximum degree is greater than or equal to the average degree, we have

$$ \delta_{(n)} = \|d_{W_n}\|_{\infty} \ge \|W_n\|_1. $$

We now show that $\varepsilon_n^{-1}\|W_n\|_1 \to \|W\|_1$. For this, we have convergence of $\|\bar{W}_n\|_1$ to $\|W\|_1$ (Propositions 4 and 5), and we now introduce a lemma that states the convergence of $\varepsilon_n^{-1}\|W_n\|_1$ to $\|\bar{W}_n\|_1$. It is a concentration result, obtained by recalling that $\bar{W}_n$ is the expectation of $W_n$ (conditioned on $X_1, \dots, X_n$ in the case of stochastic latent variables).

**Lemma 3:** Let $W: [0,1]^2 \to [0,1]$ be a graphon and $W_n$ be a graph sampled from $W$, with either stochastic or deterministic latent variables. Then, for any $t \in (0,1)$

$$ \mathrm{Pr}(|\varepsilon_n^{-1} \|W_n\|_1 - \|\bar{W}_n\|_1| \ge t \|\bar{W}_n\|_1) \le 2e^{-t^2 \varepsilon_n \frac{n^2}{6} \|\bar{W}_n\|_1}. $$

If $\|\bar{W}_n\|_1$ is not vanishing for $n \to \infty$, and if $n\varepsilon_n \to \infty$, then

$$ |\varepsilon_n^{-1} \|W_n\|_1 - \|\bar{W}_n\|_1| \to 0 \text{ a.s.} $$

*Proof:* All along this proof, in the case of stochastic latent variables, probabilities and expectations are meant conditioned on $X_1, \dots, X_n$.

Recall that $\frac{n^2}{2}\|W_n\|_1 = E_n = \sum_i \sum_{j>i} \eta_{ij}$, where $\eta_{ij}$ are independent Bernoulli random variables, $\eta_{ij}$ having mean $\varepsilon_n W(X_i, X_j)$. Notice that there are $m$ terms in the summation, where $m = \frac{n(n-1)}{2} \le \frac{n^2}{2}$. Then notice that $\varepsilon_n \frac{n^2}{2} \|\bar{W}_n\|_1 = \sum_i \sum_{j>i} \varepsilon_n W(X_i, X_j) = E(E_n)$. By the Chernoff bound for independent Bernoulli random variables, we have, for any $t \in (0,1)$

$$ \mathrm{Pr}(|E_n - EE_n| \ge t EE_n) \le 2e^{-t^2 EE_n / 3}, $$

$$ \mathrm{Pr}(|\frac{n^2}{2}\|W_n\|_1 - \varepsilon_n \frac{n^2}{2}\|\bar{W}_n\|_1| \ge t \varepsilon_n \frac{n^2}{2}\|\bar{W}_n\|_1) \le 2e^{-t^2 \varepsilon_n \frac{n^2}{2} \|\bar{W}_n\|_1 / 3}, $$

$$ \mathrm{Pr}(|\varepsilon_n^{-1} \|W_n\|_1 - \|\bar{W}_n\|_1| \ge t \|\bar{W}_n\|_1) \le 2e^{-t^2 \varepsilon_n \frac{n^2}{6} \|\bar{W}_n\|_1}. $$

We want both $t\|\bar{W}_n\|_1$ and $2\exp(-t^2\varepsilon_n \frac{n^2}{6}\|\bar{W}_n\|_1)$ to go to zero. To achieve this, we can choose $t$ such that $t^2\|\bar{W}_n\|_1^2 = \frac{1}{n\varepsilon_n}$, which, if $\|\bar{W}_n\|_1$ is not vanishing, implies that $t \in (0,1)$ for a sufficiently large $n$. Indeed, since $\|\bar{W}_n\|_1 \le 1$, then $t^2\|\bar{W}_n\|_1 \ge t^2\|\bar{W}_n\|_1^2$, thus, $-t^2\varepsilon_n \frac{n^2}{6}\|\bar{W}_n\|_1 \le -t^2\varepsilon_n \frac{n^2}{6}\|\bar{W}_n\|_1^2 = -\frac{n}{6}$, which makes the exponential go to zero summably. Since with this choice of $t$ we also have that $t\|\bar{W}_n\|_1 = \frac{1}{\sqrt{n\varepsilon_n}} \to 0$, we can apply Borel-Cantelli Lemma to obtain the statement.

With this lemma, we can obtain the result we need.

**Proposition 10:** Let $W: I^2 \to [0,1]$ be a graphon, such that $\|W\|_1 > 0$, and $W_n$ be a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. Then $\varepsilon_n^{-1}\|W_n\|_1 = \Omega(1)$ almost surely.

*Proof:* Throughout this proof, convergences are meant almost surely. Propositions 4 and 5 imply $\|\bar{W}_n - W\|_1 \to 0$
and thus, by reverse triangle inequality, $||\tilde{W}_n||_1 - ||W||_1 \to 0$, which implies $||\tilde{W}_n||_1 \to ||W||_1$. If $||W||_1 > 0$, then, from Lemma 3, $|\varepsilon_n^{-1}||W_n||_1 - ||\tilde{W}_n||_1 \to 0$. Combining the two convergences, we have $\varepsilon_n^{-1}||W_n||_1 \to ||W||_1 > 0$. As $||W||_1$ is a constant, this yields the statement. ■

Since the maximum degree is greater than the average degree, $\varepsilon_n^{-1}||W||_1 \le \varepsilon_n^{-1}||d_{W_n}||_\infty$, and combining Proposition 9 and Proposition 10, we obtain the main result of this section.

**Theorem 4:** Let $W: [0, 1]^2 \to [0, 1]$ be a graphon, such that $||W||_1 > 0$, and $W_n$ be a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. If $\varepsilon_n = \omega(\log n/n)$, then almost surely $\varepsilon_n^{-1}||d_{W_n}||_\infty = \Theta(1)$ and $\varepsilon_n^{-1}||W||_1 = \Theta(1)$, where $||d_{W_n}||_\infty$ and $||W||_1$ are respectively the maximum and the average normalized degrees of the sampled graph. □

### C. Signed graphons: sampled graphs and degree

In the previous Subsections IV-A and IV-B, we have shown, for non-negative graphons, that the sequence of sampled graphs converges to the graphon and that the degree is bounded. In this subsection, we show that these results also hold for signed graphons.

To extend the results of Subsection IV-A, we highlight the equivalence between the positive and negative parts of a graph sampled from a signed graphon, and the graphs sampled from the positive and negative parts of a signed graphon.

**Remark 4:** Let $W = W^+ - W^-$ be a signed graphon and $A^{(n)} = A^+ - A^-$ the adjacency matrix of a signed graph sampled from $W$, where the superscripts “+” and “-” refer to the positive and negative parts of $W$ and $A^{(n)}$, respectively. Let $\tilde{A}_+$ and $\tilde{A}_-$ be the adjacency matrices of graphs sampled from, respectively, $W^+$ and $W^-$. Then, it is clear that $\tilde{A}_+$, $\tilde{A}_-$, and $\tilde{A}^{(n)} = \tilde{A}_+ - \tilde{A}_-$ have the same distributions of $A^+$, $A^-$, and $A^{(n)}$, respectively. □

This remark, together with Theorem 3, implies the following proposition.

**Proposition 11:** Let $W: I^2 \to [-1, 1]$ be a signed graphon and $W_n$ a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. If $n\varepsilon_n \to \infty$, then almost surely $||T_{\varepsilon_n^{-1}W_n^+} - T_{W^+}||_\infty \to 0$, $||T_{\varepsilon_n^{-1}W_n^-} - T_{W^-}||_\infty \to 0$, and $||T_{\varepsilon_n^{-1}W_n} - T_W||_\infty \to 0$ for $n \to \infty$. □

Moving on to the extension of the results of Subsection IV-B, all the results concern the norm of the degree $||d_{W_n}||_\infty$, where $W_n$ is sampled from a non-negative graphon $W$. In the bounds of Theorem 2, it is actually the term $||d_{|W_n|}||_\infty$ that appears, where $W_n$ is sampled from a signed graphon.

**Remark 5:** Let $W$ be a signed graphon, $A^{(n)}$ be the adjacency matrix of a graph sampled from $W$, and $\tilde{A}^{(n)}$ be the adjacency matrix of a graph sampled from $|W|$. Then, $\tilde{A}^{(n)}$ and $|A^{(n)}|$ (the absolute value being applied entry-wise) have the same distribution. □

This remark and Theorem 4 imply the following result.

**Proposition 12:** Let $W: I^2 \to [-1, 1]$ be a signed graphon such that $||W||_1 > 0$, and $W_n$ be a graph sampled from $W$, with either deterministic (under the additional assumption that $W$ is a.e. continuous) or stochastic latent variables. If $\varepsilon_n = \omega(\log n/n)$, then $\varepsilon_n^{-1}||d_{|W_n|}||_\infty = \Theta(1)$ and $\varepsilon_n^{-1}||W||_1 = \Theta(1)$ almost surely. □

### D. Convergence of initial conditions

In order to have convergence of the solutions of the two different dynamics, we need to have compatible initial conditions. Given the initial condition $g(x)$ for the dynamics on the graphon, we choose to define the initial condition of the dynamics on the sampled graph $g_n(x)$ as a piece-wise constant function by assigning the value $g(X_i)$ to the entire interval $I_i$. We now show that with this definition, the term $||g_n - g||_2$ present in Theorem 2 goes to zero as $n$ increases.

**Proposition 13 (Convergence of initial conditions):** Given $g: I \to \mathbb{R}$ and given $X_1, \dots, X_n \in I$, define the piece-wise constant function $g_n(x) = g(X_i)$ for all $x \in I_i$.

1) If $X_1, \dots, X_n$ are deterministic latent variables, if $g$ is bounded and almost everywhere continuous, then $\lim_{n \to \infty} ||g_n - g||_2 = 0$.

2) If $X_1, \dots, X_n$ are stochastic latent variables, if $g \in L^2(I)$, then $\lim_{n \to \infty} ||g_n - g||_2 = 0$ almost surely.

*Proof:* 1) Preliminarily, observe that since $g$ is almost everywhere continuous, for almost all $x$ we have $\lim_{h \to 0} |g(x+h) - g(x)| = 0$. In the case of deterministic latent variables, for all $i$, for all $x \in I_i$, $g_n(x) = g(X_i)$, with $|X_i - x| \le \frac{1}{n}$, which goes to zero when $n \to \infty$. Hence, for almost all $x$ we have $\lim_{n \to \infty} |g_n(x) - g(x)| = 0$. From this pointwise (almost everywhere) convergence we can obtain convergence in $L^2$ norm, using the Lebesgue dominated convergence theorem.

2) The proof in the case of stochastic latent variables is inspired by the proof of [34, Theorem 2.14(a)], but with significant modifications, to obtain convergence in $L^2$ norm instead of $L^1$ norm (different choice of the function used to approximate $g$ and different proof of its convergence).

A first part of the proof is to define a suitable function $\gamma_m$ and prove that $||\gamma_m - g||_2 \to 0$ for $m \to \infty$. Consider the positive and negative parts $g^+$ and $g^-$ of $g$, and define $\gamma_m(x) = \gamma_m^+(x) - \gamma_m^-(x)$, where

$$ \gamma_m^+(x) = \sum_{j=1}^{m} \tilde{\gamma}_j^+ 1_{J_j}(x), \quad \tilde{\gamma}_j^+ = \sqrt{m \int_{J_j} (g^+(\xi))^2 d\xi} $$

is a piece-wise constant function over intervals $J_1 = [0, \frac{1}{m}]$ and $J_j = (\frac{j-1}{m}, \frac{j}{m}]$ for $j = 2, \dots, m$, and $\gamma_m^-$ has an analogous definition, just replacing $g^+$ with $g^-$. The notation $\gamma_m = \gamma_m^+ - \gamma_m^-$ is adopted for convenience, but clearly $\gamma_m^+$ and $\gamma_m^-$ might not be the positive and negative parts of $\gamma_m$.

The assumption $g \in L^2(I)$ also implies that $g^+ \in L^2(I)$ and hence $(g^+)^2$ is integrable. Since $(\gamma_m^+(x))^2 = m \int_{J_j} (g^+(\xi))^2 d\xi$ with $J_j$ an interval of length $1/m$ containing $x$, and $(g^+)^2$ is integrable, then when $m \to \infty$ by Lebesgue differentiation theorem $(\gamma_m^+(x))^2 \to (g^+(x))^2$ pointwise a.e.; $g^+$ being non-negative, this further implies $\gamma_m^+(x) \to g^+(x)$ pointwise almost everywhere. Now notice that $||\gamma_m^+||_2^2 = \sum_j \frac{1}{m}(\tilde{\gamma}_j^+)^2 = \sum_j \int_{J_j} (g^+(\xi))^2 d\xi = ||g^+||_2^2$. This, together with pointwise a.e. convergence, ensures convergence in $L^2$ norm (i.e., $||\gamma_m^+ - g^+||_2 \to 0$) by an extension of Scheffé's Lemma, which is proved as follows. The function defined by $\psi_m(x) = 4[(\gamma_m^+(x))^2 + (g^+(x))^2] - (\gamma_m^+(x) - g^+(x))^2$ is non-negative, since $(\gamma_m^+(x) - g^+(x))^2 \le (2 \max(\gamma_m^+(x), g^+(x)))^2 = 4 \max((\gamma_m^+(x))^2, (g^+(x))^2) \le 4[(\gamma_m^+(x))^2 + (g^+(x))^2]$. By applying Fatou's Lemma to $\psi_m$, we have $\int_I \liminf_m \psi_m(x) dx \le$
$\liminf_m \int_I \psi_m(x) dx$. Thanks to pointwise convergence a.e., the left-hand side is equal to $4\|g^+\|_2^2 + 4\|g^+\|_2^2 - 0$. Thanks to $\|\gamma_m^+\|_2 = \|g^+\|_2$ for all $m$, the right-hand side is equal to $4\|g^+\|_2^2 + 4\|g^+\|_2^2 - \limsup_m \|\gamma_m^+ - g^+\|_2^2$. Hence, we have obtained $\limsup_m \|\gamma_m^+ - g^+\|_2^2 \le 0$ and, since clearly $\liminf_m \|\gamma_m^+ - g^+\|_2^2 \ge 0$, we conclude that $\lim_m \|\gamma_m^+ - g^+\|_2^2 = 0$. The same proof steps can be used to show that $\lim_m \|\gamma_m^+ - g^-\|_2 = 0$ and hence also $\lim_m \|\gamma_m - g\|_2 = 0$ by triangle inequality.

The final goal of this proof is to show that $\lim_{n \to \infty} \|g_n - g\|_2 = 0$ a.s., which can be equivalently rephrased as: for all $\varepsilon > 0$, $\Pr(\limsup_n \|g_n - g\|_2 \le \varepsilon) = 1$.

Fix an arbitrary $\varepsilon > 0$, and fix $m$ such that $\|\gamma_m - g\|_2 < \varepsilon/2$ (which surely exists, since we have shown above that $\|\gamma_m - g\|_2 \to 0$ for $m \to \infty$). For the rest of the proof $m$ will be fixed, and $\gamma_m$ will be denoted $\gamma$ so as to emphasize this.

For any $n$, recall the notation $I_1, \dots, I_n: I_i = (\frac{i-1}{n}, \frac{i}{n}]$, and define $\tilde{g}_n(x) = \sum_{j=1}^n \gamma(X_i) \mathbb{1}_{I_i}(x)$. The next step is to show that $\|\tilde{g}_n - \gamma\|_1 \to 0$ for $n \to \infty$. To do so, define $N_j$ the number of points from $X_1, \dots, X_n$ that fall within the interval $J_j$. Notice that $N_j \sim \text{Binomial}(n, \frac{1}{m})$ and hence it has expected value $\frac{n}{m}$ and, by Hoeffding inequality, for any $t_n > 0$, $\Pr(|N_j - n/m| \ge t_n) \le 2\exp(-2t_n^2/n)$ and hence $\Pr(\cup_{j=1,\dots,m}\{|N_j - n/m| \ge t_n\}) \le 2m\exp(-2t_n^2/n)$. By taking $t_n$ such that $t_n = o(n)$ and $\exp(-2t_n^2/n)$ goes to zero fast enough to be summable (for example $t_n = n^{2/3}$), we can apply Borel-Cantelli Lemma and obtain that, for $n \to \infty$, almost surely for all $j$ we have $N_j = \frac{n}{m} + o(n)$. Now recall that $\tilde{g}_n(x)$ is constant equal to $\tilde{\gamma}_1$ on intervals $I_1, \dots, I_{N_1}$, equal to $\tilde{\gamma}_2$ on intervals $I_{N_1+1}, \dots, I_{N_1+N_2}$, \dots, equal to $\tilde{\gamma}_j$ on intervals $I_{N_1+\dots+N_{j-1}+1}, \dots, I_{N_1+\dots+N_{j-1}+N_j}$, having taken the notation $\tilde{\gamma}_j = \tilde{\gamma}_j^+ - \tilde{\gamma}_j^-$. Compare this with $\gamma(x)$, which is constant equal to $\tilde{\gamma}_1$ on intervals $I_1, \dots, I_{[n/m]}$, equal to $\tilde{\gamma}_2$ on intervals $I_{[n/m]+1}, \dots, I_{[2n/m]}$, \dots, equal to $\tilde{\gamma}_j$ on intervals $I_{[(j-1)n/m]+1}, \dots, I_{[jn/m]}$. Notice that in case $m/n$ is not integer there are $m$ intervals $I_{[jn/m]}$ ($j = 1, \dots, m$) that fall across $J_j$ and $J_{j+1}$ and where $\gamma$ might take two different values. Counting these $m$ intervals and all intervals where $\gamma(x)$ and $\tilde{g}(x)$ take a different constant value, we find at most $m|N_1 - \lfloor n/m \rfloor| + (m-1)|N_2 - 2\lfloor n/m \rfloor| + \dots + |N_m - m\lfloor n/m \rfloor|$, which almost surely is $o(n)$ for $n \to \infty$. Hence, almost surely the number of intervals (each of length $1/n$) where $\gamma - \tilde{g}_n$ is not ensured to be zero is $o(n)$. Finally, $\gamma$ has a finite maximum $\Gamma$ (since it is piece-wise constant and each value $\tilde{\gamma}_j$ is finite because $g^+, g^- \in L^2(I)$), and hence on the intervals where it is non-zero, $|\tilde{g}(x) - \gamma(x)| \le 2\Gamma$. In conclusion, almost surely for $n \to \infty$ we have $\|\gamma - \tilde{g}_n\|_1 \le \frac{1}{n}2\Gamma o(n) = o(1)$.

Finally, we consider $\|g_n - \tilde{g}_n\|_2^2 = \int_I \sum_{i=1}^n (g(X_i) - \gamma(X_i))^2 \mathbb{1}_{I_i}(x) dx = \frac{1}{n} \sum_{i=1}^n (g(X_i) - \gamma(X_i))^2$, which tends a.s. to its expectation $\int_I (g(x) - \gamma(x))^2 dx = \|g - \gamma\|_2^2$ by the Strong Law of Large Numbers.

The conclusion is obtained using the triangle inequality

$$\|g - g_n\|_2 \le \|g - \gamma\|_2 + \|\gamma - \tilde{g}_n\|_2 + \|\tilde{g}_n - g_n\|_2$$

and recalling the three intermediate results obtained above: $\|g - \gamma\|_2 \le \varepsilon/2$, and almost surely $\lim_{n \to \infty} \|\gamma - \tilde{g}_n\|_2 = 0$ and $\lim_{n \to \infty} \|\tilde{g}_n - g_n\|_2 = \|g - \gamma\|_2 \le \varepsilon/2$. This implies that almost surely $\limsup_{n \to \infty} \|g - g_n\|_1 \le \varepsilon$ and concludes the proof. ■

Notice that the assumption that $g$ is bounded and a.e. continuous cannot be removed in the case of deterministic

latent variables: indeed, these are the assumptions under which Riemann sums converge to the Riemann integral of $g$. Random latent variables allow for lighter assumptions, in relation with the fact that Riemann sums using random intervals converge a.s. to the integral under milder assumptions, given by the Strong Law of Large Numbers.

### E. Convergence of solutions

We are now ready to combine the results from this section, namely Propositions 11, 12 and 13, with Theorem 2 to conclude our main convergence result.

**Theorem 5 (Convergence of solutions on sampled graphs):** Let $W: I \to [-1, 1]$ be a signed graphon such that $\|W\|_1 > 0$, and let $u$ be a solution to (3) (respectively, to (4)). For each $n \in \mathbb{N}$, consider stochastic latent variables $X_1, \dots, X_n$ as in Definition 2 and let $W_n$ be a graph with $n$ nodes, sampled from $W$ as per Definition 1 with $\varepsilon_n$ such that $\varepsilon_n = \omega(\log n/n)$, and let $u_n$ be the solution to (1) (respectively, to (2)). Assume that the initial conditions are $g \in L^\infty(I)$ for (3) and (4), and $g_n(x) = \sum_i g(X_i) \mathbb{1}_{I_i}(x)$ for (1) and (2). If $\alpha_n = \frac{1}{n\varepsilon_n}$, then for any fixed $T > 0$ almost surely

$$\max_{t \in [0, T]} \|u_n(\cdot, t) - u(\cdot, t)\|_2 \to 0 \quad \text{for } n \to \infty.$$

If moreover $W$ is almost everywhere continuous and $g$ is almost everywhere continuous and bounded, then the same holds also in the case with deterministic latent variables. □ The correct choice of the scaling relationship between $\alpha_n$ and $\varepsilon_n$ is crucial to prevent the right-hand sides of (1) and (2) from either diverging or vanishing for large $n$, and therefore to obtain a meaningful convergence result (on bounded intervals of length $T$). Notice that $n\varepsilon_n$ is almost surely the average degree of the sampled graph, per Proposition 12. Hence $\alpha_n$ can be interpreted as ensuring that agents are influenced by averages of their neighbors opinions, as opposed to sums of the opinions (not weighted by the number of interactions).

## V. DISCUSSION

We devote this section to a detailed comparison between our results and prior work, both by ourselves and by other authors.

This paper significant extends our preliminary account [17]. Indeed, we include both a speed parameter $\alpha_n$ in the dynamics and a sampling parameter $\varepsilon_n$ in sampling the graphs, which allow for much greater generality in the sparsity of the sampled graphs (in [17] we had $\varepsilon_n = 1$ and $\alpha_n = \frac{1}{n}$, whereas here $\varepsilon_n = \omega(\log n/n)$ and $\alpha_n = \frac{1}{n\varepsilon_n}$). In order to achieve this generality, a significantly revised analysis was necessary because a straightforward addition of the parameter $\alpha_n$ in the proof of [17, Theorem 2] would result in a term $n\alpha_n$ in the argument of the exponential, which would make the bound diverge when set equal to $\varepsilon_n^{-1}$. Instead, the term $n\alpha_n \|d|_{W_n}\|_\infty$ is constant when $n\alpha_n = \varepsilon_n^{-1}$, as shown in Section IV-B, so that the bound can go to 0 when the conditions of Theorem 5 are satisfied. Moreover, in Section IV we make much weaker (in fact, the weakest possible) assumptions on the regularity of the graphon.

More generally, these same elements (presence of scaling parameters to accommodate sparse graphs and no regularity
requirements) distinguish our work from the rest of the litera-
ture. A key reference is the seminal work by Medvedev [26].
Compared to the latter, we restrict ourselves to linear dynam-
ics, but we consider signed graphons, we add the scalings α_n
and ε_n, and we obtain a stronger upper bound, which involves
|||T_{W-nα_n}W_n|||, whereas [26] considers ||W - W_n||_2. Having the
operator norm is essential to apply the result to sampled
graphs, for which |||T_{W-nα_n}W_n||| vanishes for large n under mild
assumptions, while this is not the case for ||W - W_n||_2. Indeed,
a counterexample is provided [26, Ex. 2.3], which considers
the graphs sampled from the constant graphon W(x,y) ≡ p
(i.e., the Erdős-Rényi graphs).

Multiple types of sampled graphs were considered in Medvedev’s later paper [18]. Albeit with a different definition of the sampling probability (equal to $W(X_i, X_j)$ in our paper, and equal to $n^2 \int_{I_i \times I_j} W(x,y) dxdy$ in [18]), our definition of sampled graphs is covered by the analysis of [18], which however requires $W$ to be non-negative and more restrictive sampling weights $\epsilon_n = \omega(n^{-1/2})$. The latter limitation has recently been removed in [19], where the authors allow for sampling weights as small as $\epsilon_n = \omega(\log n/n)$ and obtain the stronger $L^\infty$ convergence, but require the graphon to be non-negative and $C^1$. Moreover, [19] presents convergence results in probability, instead of almost surely as in this paper.

VI. SIMULATIONS

In this section, we illustrate our results with simulations.
We consider the same setting as in [17], but we add the
parameter $\epsilon_n$ (which can be considered equal to 1 in [17])
in the sampling procedure and $\alpha_n = (n\epsilon_n)^{-1}$ in the dynamics.
In Figure 1, we show the plot of the approximation errors
for different values of $n$ and different definitions of $\epsilon_n$. As
expected from Theorem 5, the error decreases with $n$, but can
increase with time. We can observe that the approximation
errors for the repelling and the opposing dynamics show
different behaviors. The former grows unbounded with time,
whereas the latter grows for a while before decreasing to zero.
This difference is explained by the fact that, in our examples,
the solutions of the repelling dynamics are unbounded, thus
allowing for unbounded errors, whereas the solutions of the
opposing dynamics converge to zero, thus eventually making
the error go to zero as well. Illustrative plots of the mentioned
solutions can be found in [17] for $\epsilon_n = 1$. We also observe
that the error is smaller when $\epsilon_n$ is larger. This is consistent
with our analysis; indeed, inspecting the proofs of convergence
reveals that the only dependence on $\epsilon_n$ appears in expression
(17), which gives a decay rate $O(\frac{1}{\sqrt{n\epsilon_n}})$.

VII. CONCLUSION

In this paper we considered two models of opinion dynamics
with antagonistic interactions (the repelling and the opposing
model), and we extended them to graphons. We showed
existence and uniqueness of solutions and stated bounds on the
error between graph and graphon solutions. We then showed
that these bounds go to zero if we take a sequence of (possibly
sparse) graphs sampled from a graphon, as the number of
nodes goes to infinity.

<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /><figcaption>Fig. 1. Evolution in time of the $L^2$ norm of the approximation error. Top: repelling dynamics. Bottom: opposing dynamics.</figcaption></figure>

These results prove graphons to be a helpful tool to handle
large networks with antagonistic interactions, as we have
shown how dynamics on the graphon well approximate their
finite-dimensional versions. A line of future work, which we
have started in [41], is understanding the properties of the
graphon dynamics itself, such as its behavior as time goes to
infinity.

REFERENCES

[1] A. V. Proskurnikov and R. Tempo, “A tutorial on modeling and analysis of dynamic social networks. Part I,” *Annual Reviews in Control*, vol. 43, pp. 65–79, 2017.

[2] —, “A tutorial on modeling and analysis of dynamic social networks. Part II,” *Annual Reviews in Control*, vol. 45, pp. 166–190, 2018.

[3] G. Shi, C. Altafini, and J. S. Baras, “Dynamics over signed networks,” *SIAM Review*, vol. 61, no. 2, pp. 229–257, 2019.

[4] Y. Tian and L. Wang, “Dynamics of opinion formation, social power evolution, and naïve learning in social networks,” *Annual Reviews in Control*, vol. 55, pp. 182–193, 2023.

[5] C. Bernardo, C. Altafini, A. Proskurnikov, and F. Vasca, “Bounded confidence opinion dynamics: A survey,” *Automatica*, vol. 159, p. 111302, 2024.

[6] N. E. Friedkin, “The problem of social control and coordination of complex systems in sociology: A look at the community cleavage problem,” *IEEE Control Systems Magazine*, vol. 35, no. 3, pp. 40–51, 2015.

[7] C. Altafini, “Consensus problems on networks with antagonistic interactions,” *IEEE Transactions on Automatic Control*, vol. 58, no. 4, pp. 935–946, 2012.

[8] L. Lovász, *Large Networks and Graph Limits*. American Mathematical Society, 2012.
[9] M. Avella-Medina, F. Parise, M. T. Schaub, and S. Segarra, "Centrality measures for graphons: Accounting for uncertainty in networks," *IEEE Transactions on Network Science and Engineering*, vol. 7, no. 1, pp. 520-537, 2020.

[10] R. Vizuete, F. Garin, and P. Frasca, "The Laplacian spectrum of large graphs sampled from graphons," *IEEE Transactions on Network Science and Engineering*, vol. 8, no. 2, pp. 1711-1721, 2021.

[11] M.-A. Belabbas, X. Chen, and T. Başar, "On the H-property for step-graphons and edge polytopes," *IEEE Control Systems Letters*, vol. 6, pp. 1766-1771, 2021.

[12] J. Petit, R. Lambiotte, and T. Carletti, "Random walks on dense graphs and graphons," *SIAM Journal on Applied Mathematics*, vol. 81, no. 6, pp. 2323-2345, 2021.

[13] S. Allmeier and N. Gast, "Accuracy of the graphon mean field approximation for interacting particle systems," *arXiv preprint arXiv:2405.08623*, 2024.

[14] J.-F. Delmas, P. Frasca, F. Garin, V. C. Tran, A. Velleret, and P.-A. Zitt, "Individual based SIS models on (not so) dense large random networks," *ALEA, Lat. Am. J. Probab. Math. Stat.*, vol. 21, p. 1375-1405, 2024.

[15] S. Erol, F. Parise, and A. Teytelboym, "Contagion in graphons," *Journal of Economic Theory*, vol. 211, p. 105673, 2023.

[16] B. Bonnet, N. Pouradier Duteil, and M. Sigalotti, "Consensus formation in first-order graphon models with time-varying topologies," *Mathematical Models and Methods in Applied Sciences*, vol. 32, no. 11, pp. 2121-2188, 2022.

[17] R. Prisant, F. Garin, and P. Frasca, "Opinion dynamics on signed graphs and graphons: Beyond the piece-wise constant case," in *IEEE Conference on Decision and Control*, Milan, Italy, Dec. 2024, pp. 5430-5435, Extended version: https://arxiv.org/abs/2404.08372.

[18] G. S. Medvedev, "The continuum limit of the Kuramoto model on sparse random graphs," *Communications in Mathematical Sciences*, vol. 17, no. 4, p. 883-898, 2019.

[19] S. V. Nagpal, G. G. Nair, S. H. Strogatz, and F. Parise, "Synchronization in random networks of identical phase oscillators: A graphon approach," *arXiv preprint arXiv:2403.13998*, 2024.

[20] S. Gao and P. E. Caines, "The control of arbitrary size networks of linear systems via graphon limits: An initial investigation," in *IEEE Conference on Decision and Control*, 2017, pp. 1052-1057.

[21] ——, "Graphon control of large-scale networks of linear systems," *IEEE Transactions on Automatic Control*, vol. 65, no. 10, pp. 4090-4105, 2019.

[22] ——, "Subspace decomposition for graphon LQR: Applications to VLSNs of harmonic oscillators," *IEEE Transactions on Control of Network Systems*, vol. 8, no. 2, pp. 576-586, 2021.

[23] U. von Luxburg, M. Belkin, and O. Bousquet, "Consistency of spectral clustering," *The Annals of Statistics*, pp. 555-586, 2008.

[24] J. Bramburger and M. Holzer, "Pattern formation in random networks using graphons," *SIAM Journal on Mathematical Analysis*, vol. 55, no. 3, pp. 2150-2185, 2023.

[25] N. Ayi and N. Pouradier Duteil, "Mean-field and graph limits for collective dynamics models with time-varying weights," *Journal of Differential Equations*, vol. 299, pp. 65-110, 2021.

[26] G. S. Medvedev, "The nonlinear heat equation on dense graphs and graph limits," *SIAM Journal on Mathematical Analysis*, vol. 46, no. 4, pp. 2743-2766, 2014.

[27] ——, "The nonlinear heat equation on W-random graphs," *Archive for Rational Mechanics and Analysis*, vol. 212, pp. 781-803, 2014.

[28] L. Lovász, "Subgraph densities in signed graphons and the local Simonovits-Sidorenko conjecture," *The Electronic Journal of Combinatorics*, pp. P127-P127, 2011.

[29] G. Facchetti, G. Iacono, and C. Altafini, "Computing global structural balance in large-scale signed social networks," *Proceedings of the National Academy of Sciences*, vol. 108, no. 52, pp. 20953-20958, 2011.

[30] G. Aletti and G. Naldi, "Opinion dynamics on graphon: The piecewise constant case," *Applied Mathematics Letters*, vol. 133, p. 108227, 2022.

[31] M. H. DeGroot, "Reaching a consensus," *Journal of the American Statistical association*, vol. 69, no. 345, pp. 118-121, 1974.

[32] G. Shi, M. Johansson, and K. H. Johansson, "How agreement and disagreement evolve over random dynamic networks," *IEEE Journal on Selected Areas in Communications*, vol. 31, no. 6, pp. 1061-1071, 2013.

[33] S. Janson, *Graphons, cut norm and distance, couplings and rearrangements*. NYJM Monographs, 2013, vol. 24.

[34] C. Borgs, J. Chayes, H. Cohn, and Y. Zhao, "An $L^p$ theory of sparse graph convergence I: Limits, sparse random graph models, and power law distributions," *Transactions of the American Mathematical Society*, vol. 372, no. 5, pp. 3019-3062, 2019.

[35] G. Teschl, *Mathematical Methods in Quantum Mechanics: With Applications to Schrödinger Operators*. AMS, 2014.

[36] C. Borgs, J. Chayes, L. Lóvasz, V. Sós, and K. Vesztergombi, "Convergent sequences of dense graphs I: Subgraph frequencies, metric properties and testing," *Advances in Mathematics*, vol. 219, no. 6, pp. 1801-1851, 2008.

[37] ——, "Limits of randomly grown graph sequences," *European J. Combinatorics*, vol. 32, pp. 985-999, 2011.

[38] J. Lei and A. Rinaldo, "Consistency of spectral clustering in stochastic block models," *Ann. Statist.*, vol. 43, no. 1, 2015.

[39] S. Gao and P. E. Caines, "Spectral representations of graphons in very large network systems control," in *IEEE Conference on Decision and Control*, 2019, pp. 5068-5075.

[40] F. Garin, P. Frasca, and R. Vizuete, "Corrections to and improvements on results from "The Laplacian spectrum of large graphs sampled from graphons"," *arXiv preprint arXiv:2407.14422*, 2024.

[41] R. Prisant, F. Garin, and P. Frasca, "The asymptotic behavior of the Altafini model on signed graphons," in *European Control Conference, Thessaloniki, Greece, Jun. 2025*.

<figure><img src="image_4.png" /></figure>

**Raoul Prisant** received the Master degree in applied mathematics from Politecnico di Torino, Turin, Italy, in 2023. He is currently a Ph.D. student in GIPSA-Lab, Grenoble, France. His research interests include multi-agent systems, which was already the focus of his Bachelor and Master thesis, and which has become the topic of his Ph.D., specializing in dynamics on large network systems.

<figure><img src="image_5.png" /></figure>

**Federica Garin** (Member, IEEE) received the B.S., M.S., and Ph.D. degrees in applied mathematics from Politecnico di Torino, Turin, Italy, in 2002, 2004, and 2008, respectively. Since 2010, she has been an Inria Researcher with GIPSA-Lab, Grenoble France, where she is currently serving as head of the Automatic Control and Diagnostics Department. In 2008 and 2009, she was a Postdoctoral Researcher with Università di Padova, Padua, Italy. She is Associate Editor of IEEE Control Systems Letters and Secretary of the European Control Association (EUCA). Her current research interests include the theory of networks and control systems, in particular large-scale network systems.

<figure><img src="image_6.png" /></figure>

**Paolo Frasca** (Senior Member, IEEE) received the Ph.D. degree from the Politecnico di Torino, Turin, Italy, in 2009. He was an Assistant Professor at the University of Twente, Enschede, Netherlands, from 2013 to 2016. Since October 2016, he has been a CNRS Researcher at GIPSA-Lab, Grenoble, France, where he leads the Dynamics and Control of Networks (DANCE) group. His research interests include control systems and network theory, with applications in transportation and social networks. Dr. Frasca has served as an Associate Editor for

several conferences and journals, including the IEEE Control Systems Letters and Automatica.