SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\left[ \mathcal {W L} _ {r} \right] _ {\mathcal {P} _ {k}} := \left(\mathcal {W} _ {0} \cap \mathcal {S} _ {\mathcal {P} _ {k}} ^ {2}\right) \times \left(\mathcal {L} _ {r} ^ {\infty} [ 0, 1 ] \cap \mathcal {S} _ {\mathcal {P} _ {k}} ^ {1}\right)
$$
is called the space of SBMs or step graphon-signals with respect to  $\mathcal{P}_k$ . Recall that  $\widetilde{\mathcal{W}\mathcal{L}_r}$  is the space of equivalence classes of graphon-signals with zero  $\delta_{\square}$  distance, with the  $\delta_{\square}$  metric (defined on arbitrary representatives). By abuse of terminology, we call elements of  $\widetilde{\mathcal{W}\mathcal{L}_r}$  also graphon-signals.
Theorem C.1. The metric space  $(\widetilde{\mathcal{WL}_r},\delta_\square)$  is compact.
The proof is a simple extension of [25, Lemma 8] from the case of graphon to the case of graphonsignal. The proof relies on the notion of martingale. A martingale is a sequence of random variables for which, for each element in the sequence, the conditional expectation of the next value in the sequence is equal to the present value, regardless of all prior values. The Martingale convergence theorem states that for any bounded martingale  $\{M_n\}_n$  over the probability space  $X$ , the sequence  $\{M_n(x)\}_n$  converges for almost every  $x \in X$ , and the limit function is bounded (see [12, 35]).
Proof. [Proof of Theorem C.1] Consider a sequence  $\{[(W_n, f_n)]\}_{n \in \mathbb{N}} \subset \widehat{\mathcal{WL}_r}$ , with  $(W_n, f_n) \in \mathcal{WL}_r$ . For each  $k$ , consider the equipartition into  $m_k$  intervals  $\mathcal{I}_{m_k}$ , where  $m_k = 2^{30 \lceil (r^2 + 1) \rceil k^2}$ . By Corollary B.11, there is a measure preserving bijection  $\phi_{n,k}$  (up to nullset) such that
$$
\| (W _ {n}, f _ {n}) ^ {\phi_ {n, k}} - (W _ {n}, f _ {n}) _ {\mathcal {I} _ {m _ {k}}} ^ {\phi_ {n, k}} \| _ {\square ; r} <   1 / k,
$$
where  $(W_{n},f_{n})_{\mathcal{I}_{m_{k}}^{\phi_{n,k}}}$  is the projection of  $(W_{n},f_{n})^{\phi_{n,k}}$  upon  $\mathcal{I}_{m_k}$  (Definition B.10). For every fixed  $k$ , each pair of functions  $(W_{n},f_{n})_{\mathcal{I}_{m_{k}}^{\phi_{n,k}}}$  is defined via  $m_k^2 +m_k$  values in [0, 1]. Hence, since  $[0,1]^{m_k^2 +m_k}$  is compact, there is a subsequence  $\{n_j^k\}_{j\in \mathbb{N}}$ , such that all of these values converge. Namely, for each  $k$ , the sequence
$$
\left\{\left(W _ {n _ {j} ^ {k}}, f _ {n _ {j} ^ {k}}\right) _ {\mathcal {I} _ {m _ {k}}} ^ {\phi_ {n _ {j} ^ {k}, k}} \right\} _ {j = 1} ^ {\infty}
$$
converges pointwise to some step graphon-signal  $(U_{k},g_{k})$  in  $[\mathcal{WL}_{r}]_{\mathcal{P}_{k}}$  as  $j\to \infty$ . Note that  $\mathcal{I}_{m_l}$  is a refinement of  $\mathcal{I}_{m_k}$  for every  $l > k$ . As a result, by the definition of projection of graphon-signals to partitions, for every  $l > k$ , the value of  $(W_{n}^{\phi_{n,k}})_{\mathcal{I}_{m_k}}$  at each partition set  $I_{m_k}^i\times I_{m_k}^j$  can be obtained by averaging the values of  $(W_{n}^{\phi_{n,l}})_{\mathcal{I}_{m_l}}$  at all partition sets  $I_{m_l}^{i'}\times I_{m_l}^{j'}$  that are subsets of  $I_{m_k}^i\times I_{m_k}^j$ . A similar property applies also to the signal. Moreover, by taking limits, it can be shown that the same property holds also for  $(U_{k},g_{k})$  and  $(U_{l},g_{l})$ . We now see  $\{(U_k,g_k)\}_{k = 1}^\infty$  as a sequence of random variables over the standard probability space  $[0,1]^2$ . The above discussion shows that  $\{(U_k,g_k)\}_{k = 1}^\infty$  is a bounded martingale. By the martingale convergence theorem, the sequence  $\{(U_k,g_k)\}_{k = 1}^\infty$  converges almost everywhere pointwise to a limit  $(U,g)$ , which must be in  $\mathcal{WL}_r$ .
Lastly, we show that there exist increasing sequences  $\{k_z\in \mathbb{N}\}_{z = 1}^{\infty}$  and  $\{t_z = n_{j_z}^{k_z}\}_{z\in \mathbb{N}}$  such that  $(W_{t_z},f_{t_z})^{\phi_{t_z,k_z}}$  converges to  $(U,g)$  in cut distance. By the dominant convergence theorem, for each  $z\in \mathbb{N}$  there exists a  $k_{z}$  such that
$$
\left\| (U, g) - \left(U _ {k _ {z}}, g _ {k _ {z}}\right) \right\| _ {1} <   \frac {1}{3 z}.
$$
We choose such an increasing sequence  $\{k_z\}_{z\in \mathbb{N}}$  with  $k_{z} > 3z$ . Similarly, for every  $z\in \mathbb{N}$ , there is a  $j_{z}$  such that, with the notation  $t_z = n_{j_z}^{k_z}$ ,
$$
\left\| \left(U _ {k _ {z}}, g _ {k _ {z}}\right) - \left(W _ {t _ {z}}, f _ {t _ {z}}\right) _ {\mathcal {I} _ {m _ {k _ {z}}}} ^ {\phi_ {t _ {z}, k _ {z}}} \right\| _ {1} <   \frac {1}{3 z},
$$
and we may choose the sequence  $\{t_z\}_{z\in \mathbb{N}}$  increasing. Therefore, by the triangle inequality and by the fact that the  $L_{1}$  norm bounds the cut norm,
$$
\begin{array}{l} \delta_ {\square} \big ((U, g), (W _ {t _ {z}}, f _ {t _ {z}}) \big) \leq \| (U, g) - (W _ {t _ {z}}, f _ {t _ {z}}) ^ {\phi_ {t _ {z}, k _ {z}}} \| _ {\square} \\ \leq \left\| \left(U, g\right) - \left(U _ {k _ {z}}, g _ {k _ {z}}\right) \right\| _ {1} + \left\| \left(U _ {k _ {z}}, g _ {k _ {z}}\right) - \left(W _ {t _ {z}}, f _ {t _ {z}}\right) _ {\mathcal {I} _ {m _ {k _ {z}}}} ^ {\phi_ {t _ {z}, k _ {z}}} \right\| _ {1} \\ + \left\| \left(W _ {t _ {z}}, f _ {t _ {z}}\right) _ {\mathcal {I} _ {m _ {k _ {z}}}} ^ {\phi_ {t _ {z}, k _ {z}}} - \left(W _ {t _ {z}}, f _ {t _ {z}}\right) ^ {\phi_ {t _ {z}, k _ {z}}} \right\| \square \\ \leq \frac {1}{3 z} + \frac {1}{3 z} + \frac {1}{3 z} \leq \frac {1}{z}. \\ \end{array}
$$
The next theorem bounds the covering number of  $\widetilde{\mathcal{WL}_r}$
Theorem C.2. Let  $r > 0$  and  $c > 1$ . For every sufficiently small  $\epsilon > 0$ , the space  $\widehat{\mathcal{WL}_r}$  can be covered by
$$
\kappa (\epsilon) = 2 ^ {k ^ {2}} \tag {23}
$$
balls of radius  $\epsilon$  in cut distance, where  $k = \lceil 2^{2c / \epsilon^2}\rceil$
Proof. Let  $1 < c < c'$  and  $0 < \alpha < 1$ . Given an error tolerance  $\alpha \epsilon > 0$ , using Theorem B.8, we take the equipartition  $\mathcal{I}_n$  into  $n = 2^{\lceil \frac{2c}{\alpha^2\epsilon^2} \rceil}$  intervals, for which any graphon-signal  $(W,f) \in \widetilde{\mathcal{WL}_r}$  can be approximated by some  $(W,f)_n$  in  $[\widetilde{\mathcal{WL}_r}]_{\mathcal{I}_n}$ , up to error  $\alpha \epsilon$ . Consider the rectangle  $\mathcal{R}_{n,r} = [0,1]^{n^2} \times [-r,r]^n$ . We identify each element of  $[\widetilde{\mathcal{WL}_r}]_{\mathcal{I}_n}$  with an element of  $\mathcal{R}_{n,r}$  using the coefficients of (5). More accurately, the coefficients  $c_{i,j}$  of the step graphon are identifies with the first  $n^2$  entries of a point in  $\mathcal{R}_{n,r}$ , and the coefficients  $b_i$  of the step signals are identifies with the last  $n$  entries of a point in  $\mathcal{R}_{n,r}$ . Now, consider the quantized rectangle  $\tilde{\mathcal{R}}_{n,r}$ , defined as
$$
\tilde {\mathcal {R}} _ {n, r} = \big ((1 - \alpha) \epsilon \mathbb {Z} \big) ^ {n ^ {2} + 2 r n} \cap \mathcal {R} _ {n, r}.
$$
Note that  $\tilde{\mathcal{R}}_n$  consists of
$$
M \leq \lceil \frac {1}{(1 - \alpha) \epsilon} \rceil^ {n ^ {2} + 2 r n} \leq 2 ^ {\left(- \log \left((1 - \alpha) \epsilon\right) + 1\right) (n ^ {2} + 2 r n)}
$$
points. Now, every point  $x \in \mathcal{R}_{n,r}$  can be approximated by a quantized version  $x_{Q} \in \tilde{\mathcal{R}}_{n,r}$  up to error in normalized  $\ell_1$  norm
$$
\| x - x _ {Q} \| _ {1} := \frac {1}{M} \sum_ {j = 1} ^ {M} \left| x ^ {j} - x _ {Q} ^ {j} \right| \leq (1 - \alpha) \epsilon ,
$$
where we re-index the entries of  $x$  and  $x_{Q}$  in a 1D sequence. Let us denote by  $(W, f)_{Q}$  the quantized version of  $(W_{n}, f_{n})$ , given by the above equivalence mapping between  $(W, f)_{n}$  and  $\mathcal{R}_{n,r}$ . We hence have
$$
\| (W, f) - (W, f) _ {Q} \| _ {\square} \leq \| (W, f) - (W _ {n}, f _ {n}) \| _ {\square} + \| (W _ {n}, f _ {n}) - (W, f) _ {Q} \| _ {\square} \leq \epsilon .
$$
We now choose the parameter  $\alpha$ . Note that for any  $c' > c$ , there exists  $\epsilon_0 > 0$  that depends on  $c' - c$ , such that for any  $\epsilon < \epsilon_0$  there is a choice of  $\alpha$  (close to 1) such that
$$
M \leq \lceil \frac {1}{(1 - \alpha) \epsilon} \rceil^ {n ^ {2} + 2 r n} \leq 2 ^ {\left(- \log \left((1 - \alpha) \epsilon\right) + 1\right) (n ^ {2} + 2 r n)} \leq 2 ^ {k ^ {2}}
$$
where  $k = \lceil 2^{2c' / c^2} \rceil$ . This is shown similarly to the proof of Corollary B.7 and Theorem B.8. We now replace the notation  $c' \to c$ , which concludes the proof.
D Graphon-signal sampling lemmas
In this appendix, we prove Theorem 3.7. We denote by  $\mathcal{W}_1$  the space of measurable functions  $U:[0,1]\to [-1,1]$ , and call each  $U\in \mathcal{W}_1$  a kernel.
D.1 Formal construction of sampled graph-signals
Let  $W \in \mathcal{W}_0$  be a graphon, and  $\Lambda' = (\lambda_1', \ldots, \lambda_k') \in [0, 1]^k$ . We denote by  $W(\Lambda')$  the adjacency matrix
$$
W \left(\Lambda^ {\prime}\right) = \left\{W \left(\lambda_ {i} ^ {\prime}, \lambda_ {j} ^ {\prime}\right) \right\} _ {i, j \in [ k ]}.
$$
By abuse of notation, we also treat  $W(\Lambda')$  as a weighted graph with  $k$  nodes and the adjacency matrix  $W(\Lambda')$ . We denote by  $\Lambda = (\lambda_1, \ldots, \lambda_k): (\lambda_1', \ldots, \lambda_k') \mapsto (\lambda_1', \ldots, \lambda_k')$  the identity random variable in  $[0, 1]^k$ . We hence call  $(\lambda_1, \ldots, \lambda_k)$  random independent samples from  $[0, 1]$ . We call the random variable  $W(\Lambda)$  a random sampled weighted graph.
Given  $f \in \mathcal{L}_r^\infty[0,1]$  and  $\Lambda' = (\Lambda_1', \dots, \Lambda_k') \in [0,1]^k$ , we denote by  $f(\Lambda')$  the discrete signal with  $k$  nodes, and value  $f(\lambda_i')$  for each node  $i = 1, \dots, k$ . We define the sampled signal as the random variable  $f(\Lambda)$ .
We then define the random sampled simple graph as follows. First, for a deterministic  $\Lambda' \in [0,1]^k$ , we define a 2D array of Bernoulli random variables  $\{e_{i,j}(\Lambda')\}_{i,j \in [k]}$  where  $e_{i,j}(\Lambda') = 1$  in probability
$W(\lambda_i', \lambda_j')$ , and zero otherwise, for  $i, j \in [k]$ . We define the probability space  $\{0, 1\}^{k \times k}$  with normalized counting measure, defined for any  $S \subset \{0, 1\}^{k \times k}$  by
$$
P _ {\Lambda^ {\prime}} (S) = \sum_ {\mathbf {z} \in S} \prod_ {i, j \in [ k ]} P _ {\Lambda^ {\prime}; i, j} \left(z _ {i, j}\right),
$$
$$
P _ {\Lambda^ {\prime}; i, j} (z _ {i, j}) = \left\{ \begin{array}{c l} W (\lambda_ {i} ^ {\prime}, \lambda_ {j} ^ {\prime}) & \text {i f} z _ {i, j} = 1 \\ 1 - W (\lambda_ {i} ^ {\prime}, \lambda_ {j} ^ {\prime}) & \text {i f} z _ {i, j} = 0. \end{array} \right.
$$
We denote the identity random variable by  $\mathbb{G}(W,\Lambda^{\prime}):\mathbf{z}\mapsto \mathbf{z}$ , and call it a random simple graph sampled from  $W(\Lambda^{\prime})$ .
Next we also allow to "plug" the random variable  $\Lambda$  into  $\Lambda'$ . For that, we define the joint probability space  $\Omega = [0,1]^k \times \{0,1\}^{k \times k}$  with the product  $\sigma$ -algebra of the Lebesgue sets in  $[0,1]^k$  with the power set  $\sigma$ -algebra of  $\{0,1\}^{k \times k}$ , with measure, for any measurable  $S \subset \Omega$ ,
$$
\mu (S) = \int_ {[ 0, 1 ] ^ {k}} P _ {\Lambda^ {\prime}} \left(S (\Lambda^ {\prime})\right) d \Lambda^ {\prime},
$$
$$
S \left(\Lambda^ {\prime}\right) \subset \{0, 1 \} ^ {k \times k} := \left\{\mathbf {z} = \left\{z _ {i, j} \right\} _ {i, j \in [ k ]} \in \left\{0, 1 \right\} ^ {k \times k} \mid \left(\Lambda^ {\prime}, \mathbf {z}\right) \in S \right\},
$$
We call the random variable  $\mathbb{G}(W,\Lambda):\Lambda^{\prime}\times \mathbf{z}\mapsto \mathbf{z}$  the random simple graph generated by  $W$ . We extend the domains of the random variables  $W(\Lambda)$ ,  $f(\Lambda)$  and  $\mathbb{G}(W,\Lambda^{\prime})$  to  $\Omega$  trivially (e.g.,  $f(\Lambda)(\Lambda ',\mathbf{z}) = f(\Lambda)(\Lambda ')$  and  $\mathbb{G}(W,\Lambda^{\prime})(\Lambda^{\prime},\mathbf{z}) = \mathbb{G}(W,\Lambda^{\prime})(\mathbf{z}))$ , so that all random variables are defined over the same space  $\Omega$ . Note that the random sampled graphs and the random signal share the same sample points.
Given a kernel  $U \in \mathcal{W}_1$ , we define the random sampled kernel  $U(\Lambda)$  similarly.
Similarly to the above construction, given a weighted graph  $H$  with  $k$  nodes and edge weights  $h_{i,j}$ , we define the simple graph sampled from  $H$  as the random variable simple graph  $\mathbb{G}(H)$  with  $k$  nodes and independent Bernoulli variables  $e_{i,j} \in \{0,1\}$ , with  $\mathbb{P}(e_{i,j} = 1) = h_{i,j}$ , as the edge weights. The following lemma is taken from [24, Equation (10.9)].
Lemma D.1. Let  $H$  be a weighted graph of  $k$  nodes. Then
$$
\mathbb {E} \left(d _ {\square} (\mathbb {G} (H), H)\right) \leq \frac {1 1}{\sqrt {k}}.
$$
The following is a simple corollary of Lemma D.1, using the law of total probability.
Corollary D.2. Let  $W \in \mathcal{W}_0$  and  $k \in \mathbb{N}$ . Then
$$
\mathbb {E} \big (d _ {\square} (\mathbb {G} (W, \Lambda), W (\Lambda)) \big) \leq \frac {1 1}{\sqrt {k}}.
$$
D.2 Sampling lemmas of graphon-signals
The following lemma, from [24, Lemma 10.6], shows that the cut norm of a kernel is approximated by the cut norm of its sample.
Lemma D.3 (First Sampling Lemma for kernels). Let  $U \in \mathcal{W}_1$ , and  $\Lambda \in [0,1]^k$  be uniform independent samples from  $[0,1]$ . Then, with probability at least  $1 - 4e^{-\sqrt{k} /10}$
$$
- \frac {3}{k} \leq \| U [ \Lambda ] \| _ {\square} - \| U \| _ {\square} \leq \frac {8}{k ^ {1 / 4}}.
$$
We derive a version of Lemma D.3 with expected value using the following lemma.
Lemma D.4. Let  $z:\Omega \to [0,1]$  be a random variable over the probability space  $\Omega$ . Suppose that in an event  $\mathcal{E}\subset \Omega$  of probability  $1 - \epsilon$  we have  $z < \alpha$ . Then
$$
\mathbb {E} (z) \leq (1 - \epsilon) \alpha + \epsilon .
$$
$$
\mathbb {E} (z) = \int_ {\Omega} z (x) d x = \int_ {\mathcal {E}} z (x) d x + \int_ {\Omega \setminus \mathcal {E}} z (x) d x \leq (1 - \epsilon) \alpha + \epsilon .
$$
As a result of this lemma, we have a simple corollary of Lemma D.3.
Corollary D.5 (First sampling lemma - expected value version). Let  $U \in \mathcal{W}_1$  and  $\Lambda \in [0,1]^k$  be chosen uniformly at random, where  $k \geq 1$ . Then
$$
\mathbb {E} \left| \left\| U [ \Lambda ] \right\| _ {\square} - \left\| U \right\| _ {\square} \right| \leq \frac {1 4}{k ^ {1 / 4}}.
$$
Proof. By Lemma D.4, and since  $6 / k^{1 / 4} > 4e^{-\sqrt{k} /10}$
$$
\mathbb {E} \left| \| U [ \Lambda ] \| _ {\square} - \| U \| _ {\square} \right| \leq \left(1 - 4 e ^ {- \sqrt {k} / 1 0}\right) \frac {8}{k ^ {1 / 4}} + 4 e ^ {- \sqrt {k} / 1 0} <   \frac {1 4}{k ^ {1 / 4}}.
$$
We note that a version of the first sampling lemma, Lemma D.3, for signals instead of kernels, is just a classical Monte Carlo approximation, when working with the  $L_{1}[0,1]$  norm, which is equivalent to the signal cut norm.
Lemma D.6 (First sampling lemma for signals). Let  $f \in \mathcal{L}_r^\infty[0,1]$ . Then
$$
\mathbb {E} \left| \| f (\Lambda) \| _ {1} - \| f \| _ {1} \right| \leq \frac {r}{k ^ {1 / 2}}.
$$
Proof. By standard Monte Carlo theory, since  $r^2$  bounds the variance of  $f(\lambda)$ , where  $\lambda$  is a random uniform sample from [0, 1], we have
$$
\mathbb {V} (\| f (\Lambda) \| _ {1}) = \mathbb {E} \big (| \| f (\Lambda) \| _ {1} - \| f \| _ {1} | ^ {2} \big) \leq \frac {r ^ {2}}{k}.
$$
Here,  $\mathbb{V}$  denotes variance, and we note that  $\mathbb{E}\| f(\Lambda)\| _1 = \frac{1}{k}\sum_{j = 1}^k |f(\lambda_j)| = \| f\| _1$ . Hence, by Cauchy Schwarz inequality,
$$
\mathbb {E} \left. | | f (\Lambda) | | _ {1} - | | f | | _ {1} \right| \leq \sqrt {\mathbb {E} \left(\left. | | f (\Lambda) | | _ {1} - | | f | | _ {1} \right| ^ {2}\right)} \leq \frac {r}{k ^ {1 / 2}}.
$$
We now extend [24, Lemma 10.16], which bounds the cut distance between a graphon and its sampled graph, to the case of a sampled graphon-signal.
Theorem D.7 (Second sampling lemma for graphon signals). Let  $r > 1$ . Let  $k \geq K_0$ , where  $K_0$  is a constant that depends on  $r$ , and let  $(W, f) \in \mathcal{WL}_r$ . Then,
$$
\mathbb {E} \Big (\delta_ {\square} \big ((W, f), (W (\Lambda), f (\Lambda)) \big) \Big) <   \frac {1 5}{\sqrt {\log (k)}},
$$
$$
\mathbb {E} \left(\delta_ {\square} \big ((W, f), (\mathbb {G} (W, \Lambda), f (\Lambda)) \big)\right) <   \frac {1 5}{\sqrt {\log (k)}}.
$$
The proof follows the steps of [24, Lemma 10.16] and [4]. We note that the main difference in our proof is that we explicitly write the measure preserving bijection that optimizes the cut distance. While this is not necessary in the classical case, where only a graphon is sampled, in our case we need to show that there is a measure preserving bijection that is shared by the graphon and the signal. We hence write the proof for completion.
Denote a generic error bound, given by the regularity lemma Theorem B.8 by  $\epsilon$ . If we take  $n$  intervals in the Theorem B.8, then the error in the regularity lemma will be, for  $c$  such that  $2c = 3$ ,
$$
\lceil 3 / \epsilon^ {2} \rceil = \log (n)
$$
$$
3 / \epsilon^ {2} + 1 \geq \log (n).
$$
For small enough  $\epsilon$ , we increase the error bound in the regularity lemma to satisfy
$$
4 / \epsilon^ {2} > 3 / \epsilon^ {2} + 1 \geq \log (n).
$$
More accurately, for the equipartition to intervals  $\mathcal{I}_n$ , there is  $\phi' \in S_{[0,1]}'$  and a piecewise constant graphon signal  $([W^{\phi}]_n, [f^{\phi}]_n)$  such that
$$
\left\| W ^ {\phi^ {\prime}} - \left[ W ^ {\phi^ {\prime}} \right] _ {n} \right\| _ {\square} \leq \alpha \frac {2}{\sqrt {\log (n)}}
$$
$$
\left\| f ^ {\phi^ {\prime}} - \left[ f ^ {\phi^ {\prime}} \right] _ {n} \right\| _ {\square} \leq (1 - \alpha) \frac {2}{\sqrt {\log (n)}},
$$
for some  $0 \leq \alpha \leq 1$ . If we choose  $n$  such that
$$
n = \lceil \frac {\sqrt {k}}{r \log (k)} \rceil ,
$$
then an error bound in the regularity lemma is
$$
\left\| W ^ {\phi^ {\prime}} - \left[ W ^ {\phi^ {\prime}} \right] _ {n} \right\| _ {\square} \leq \alpha \frac {2}{\sqrt {\frac {1}{2} \log (k) - \log (\log (k)) - \log (r)}}
$$
$$
\left\| f ^ {\phi^ {\prime}} - \left[ f ^ {\phi^ {\prime}} \right] _ {n} \right\| _ {\square} \leq (1 - \alpha) \frac {2}{\sqrt {\frac {1}{2} \log (k) - \log (\log (k)) - \log (r)}},
$$
for some  $0 \leq \alpha \leq 1$ . Without loss of generality, we suppose that  $\phi'$  is the identity. This only means that we work with a different representative of  $[(W,f)] \in \widetilde{\mathcal{WL}_r}$  throughout the proof. We hence have
$$
d _ {\square} (W, W _ {n}) \leq \alpha \frac {2 \sqrt {2}}{\sqrt {\log (k) - 2 \log (\log (k)) - 2 \log (r)}}
$$
$$
\| f - f _ {n} \| _ {1} \leq (1 - \alpha) \frac {4 \sqrt {2}}{\sqrt {\log (k) - 2 \log (\log (k)) - 2 \log (r)}},
$$
for some step graphon-signal  $(W_{n},f_{n})\in [\mathcal{WL}_{r}]_{\mathcal{I}_{n}}$
Now, by the first sampling lemma (Corollary D.5),
$$
\mathbb {E} \left| d _ {\square} \left(W (\Lambda), W _ {n} (\Lambda)\right) - d _ {\square} \left(W, W _ {n}\right) \right| \leq \frac {1 4}{k ^ {1 / 4}}.
$$
Moreover, by the fact that  $f - f_n \in \mathcal{L}_{2r}^\infty[0,1]$ , Lemma D.6 implies that
$$
\mathbb {E} \left| \| f (\Lambda) - f _ {n} (\Lambda) \| _ {1} - \| f - f _ {n} \| _ {1} \right| \leq \frac {2 r}{k ^ {1 / 2}}.
$$
$$
\begin{array}{l} \mathbb {E} \left(d _ {\square} \left(W (\Lambda), W _ {n} (\Lambda)\right)\right) \leq \mathbb {E} \left| d _ {\square} \left(W (\Lambda), W _ {n} (\Lambda)\right) - d _ {\square} \left(W, W _ {n}\right) \right| + d _ {\square} (W, W _ {n}) \\ \leq \frac {1 4}{k ^ {1 / 4}} + \alpha \frac {2 \sqrt {2}}{\sqrt {\log (k) - 2 \log (\log (k)) - 2 \log (r)}}. \\ \end{array}
$$
Similarly, we have
$$
\begin{array}{l} \mathbb {E} \| f (\Lambda) - f _ {n} (\Lambda) \| _ {1} \leq \mathbb {E} | \| f (\Lambda) - f _ {n} (\Lambda) \| _ {1} - \| f - f _ {n} \| _ {1} | + \| f - f _ {n} \| _ {1} \\ \leq \frac {2 r}{k ^ {1 / 2}} + (1 - \alpha) \frac {4 \sqrt {2}}{\sqrt {\log (k) - 2 \log (\log (k)) - 2 \log (r)}}. \\ \end{array}
$$
Now, let  $\pi_{\Lambda}$  be a sorting permutation in  $[k]$ , such that
$$
\pi_ {\Lambda} (\Lambda) := \left\{\Lambda_ {\pi_ {\Lambda} ^ {- 1} (i)} \right\} _ {i = 1} ^ {k} = \left(\lambda_ {1} ^ {\prime}, \dots , \lambda_ {k} ^ {\prime}\right)
$$
is a sequence in a non-decreasing order. Let  $\{I_k^i = [i - 1,i) / k\}_{i = 1}^k$  be the intervals of the equipartition  $\mathcal{I}_k$ . The sorting permutation  $\pi_{\Lambda}$  induces a measure preserving bijection  $\phi$  that sorts the intervals  $I_k^i$ . Namely, we define, for every  $x\in [0,1]$ ,
$$
\text {i f} x \in I _ {k} ^ {i}, \quad \phi (x) = J _ {i, \pi_ {\Lambda} (i)} (x), \tag {24}
$$
where  $J_{i,j}:I_k^i\to I_k^j$  are defined as  $x\mapsto x - i / k + j / k$  , for all  $x\in I_k^i$
By abuse of notation, we denote by  $W_{n}(\Lambda)$  and  $f_{n}(\Lambda)$  the induced graphon and signal from  $W_{n}(\Lambda)$  and  $f_{n}(\Lambda)$  respectively. Hence,  $W_{n}(\Lambda)^{\phi}$  and  $f_{n}(\Lambda)^{\phi}$  are well defined. Note that the graphons  $W_{n}$  and  $W_{n}(\Lambda)^{\phi}$  are stepfunctions, where the set of values of  $W_{n}(\Lambda)^{\phi}$  is a subset of the set of values of  $W_{n}$ . Intuitively, since  $k \gg m$ , we expect the partition  $\{[\lambda_i',\lambda_{i + 1}')\}_{i = 1}^k$  to be "close to a refinement" of  $\mathcal{I}_n$  in high probability. Also, we expect the two sets of values of  $W_{n}(\Lambda)^{\phi}$  and  $W_{n}$  to be identical in high probability. Moreover, since  $\Lambda'$  is sorted, when inducing a graphon from the graph  $W_{n}(\Lambda)$  and "sorting" it to  $W_{n}(\Lambda)^{\phi}$ , we get a graphon that is roughly "aligned" with  $W_{n}$ . The same philosophy also applied to  $f_{n}$  and  $f_{n}(\Lambda)^{\phi}$ . We next formalize these observations.
For each  $i \in [n]$ , let  $\lambda_{j_i}'$  be the smaller point of  $\Lambda'$  that is in  $I_n^i$ , set  $j_i = j_{i+1}$  if  $\Lambda' \cap I_n^i = \emptyset$ , and set  $j_{n+1} = k + 1$ . For every  $i = 1, \ldots, n$ , we call
$$
J _ {i} := \left[ j _ {i} - 1, j _ {i + 1} - 1\right) / k
$$
the  $i$ -th step of  $W_{n}(\Lambda)^{\phi}$  (which can be the empty set). Let  $a_{i} = \frac{j_{i} - 1}{k}$  be the left edge point of  $J_{i}$ . Note that  $a_{i} = |\Lambda \cap [0, i / n)| / k$  is distributed binomially (up to the normalization  $k$ ) with  $k$  trials and success in probability  $i / n$ .
$$
\begin{array}{l} \left\| W _ {n} - W _ {n} (\Lambda) ^ {\phi} \right\| _ {\square} \leq \left\| W _ {n} - W _ {n} (\Lambda) ^ {\phi} \right\| _ {1} \\ = \sum_ {i} \sum_ {k} \int_ {I _ {n} ^ {i} \cap J _ {i}} \int_ {I _ {n} ^ {k} \cap J _ {k}} \left| W _ {n} (x, y) - W _ {n} (\Lambda) ^ {\phi} (x, y) \right| d x d y \\ + \sum_ {i} \sum_ {j \neq i} \sum_ {k} \sum_ {l \neq k} \int_ {I _ {n} ^ {i} \cap J _ {j}} \int_ {I _ {n} ^ {k} \cap J _ {l}} \left| W _ {n} (x, y) - W _ {n} (\Lambda) ^ {\phi} (x, y) \right| d x d y \\ = \sum_ {i} \sum_ {j \neq i} \sum_ {k} \sum_ {l \neq k} \int_ {I _ {n} ^ {i} \cap J _ {j}} \int_ {I _ {n} ^ {k} \cap J _ {l}} \left| W _ {n} (x, y) - W _ {n} (\Lambda) ^ {\phi} (x, y) \right| d x d y \\ = \sum_ {i} \sum_ {k} \int_ {I _ {n} ^ {i} \backslash J _ {i}} \int_ {I _ {n} ^ {k} \backslash J _ {k}} \left| W _ {n} (x, y) - W _ {n} (\Lambda) ^ {\phi} (x, y) \right| d x d y \\ \leq \sum_ {i} \sum_ {k} \int_ {I _ {n} ^ {i} \backslash J _ {i}} \int_ {I _ {n} ^ {k} \backslash J _ {k}} 1 d x d y \leq 2 \sum_ {i} \int_ {I _ {n} ^ {i} \backslash J _ {i}} 1 d x d y \\ \leq 2 \sum_ {i} (| i / n - a _ {i} | + | (i + 1) / n - a _ {i + 1} |). \\ \end{array}
$$
$$
\begin{array}{l} \mathbb {E} \| W _ {n} - W _ {n} (\Lambda) ^ {\phi} \| _ {\square} \leq 2 \sum_ {i} \left(\mathbb {E} | i / n - a _ {i} | + \mathbb {E} | (i + 1) / n - a _ {i + 1} |\right) \\ \leq 2 \sum_ {i} \left(\sqrt {\mathbb {E} (i / n - a _ {i}) ^ {2}} + \sqrt {\mathbb {E} \left((i + 1) / n - a _ {i + 1}\right) ^ {2}}\right) \\ \end{array}
$$
By properties of the binomial distribution, we have  $\mathbb{E}(ka_i) = ik / n$ , so