SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Lemma B.1 (Equitizing partitions). Let  $\mathcal{P}_k$  be a partition of  $[0,1]$  into  $k$  sets (generally not of the same measure). Then, for any  $n > k$  there exists an equipartition  $\mathcal{E}_n$  of  $[0,1]$  into  $n$  sets such that any function  $F\in S_{\mathcal{P}_k}^d$  can be approximated in  $L_{1}[0,1]^{d}$  by a function from  $F\in S_{\mathcal{E}_n}^d$  up to small error. Namely, for every  $F\in S_{\mathcal{P}_k}^d$  there exists  $F^{\prime}\in S_{\mathcal{E}_n}^d$  such that
$$
\| F - F ^ {\prime} \| _ {1} \leq d \| F \| _ {\infty} \frac {k}{n}.
$$
Proof. Let  $\mathcal{P}_k = \{P_1, \ldots, P_k\}$  be a partition of  $[0, 1]$ . For each  $i$ , we divide  $P_i$  into subsets  $\mathbf{P}_i = \{P_{i,1}, \ldots, P_{i,m_i}\}$  of measure  $1/n$  (up to the last set) with a residual, as follows. If  $\mu(P_i) < 1/n$ , we choose  $\mathbf{P}_i = \{P_{i,1} = P_i\}$ . Otherwise, we take  $P_{i,1}, \ldots, P_{i,m_i-1}$  of measure  $1/n$ , and  $\mu(P_{i,m_i}) \leq 1/n$ . We call  $P_{i,m_i}$  the remainder.
We now define the sequence of sets of measure  $1 / n$
$$
\mathcal {Q} := \left\{P _ {1, 1}, \dots , P _ {1, m _ {1} - 1}, P _ {2, 1}, \dots , P _ {2, m _ {2} - 1}, \dots , P _ {k, 1}, \dots , P _ {k, m _ {k} - 1} \right\}, \tag {10}
$$
where, by abuse of notation, for any  $i$  such that  $m_i = 1$ , we set  $\{P_{i,1},\ldots ,P_{i,m_i - 1}\} = \emptyset$  in the above formula. Note that in general  $\cup \mathcal{Q}\neq [0,1]$ . We moreover define the union of residuals  $\Pi \coloneqq P_{1,m_1}\cup P_{2,m_2}\cup \dots \cup P_{k,m_k}$ . Note that  $\mu (\Pi) = 1 - \mu (\cup \mathcal{Q}) = 1 - k\frac{1}{n} = h / n$ , where  $k$  is the number of elements in  $\mathcal{Q}$ , and  $h = n - k$ . Hence, we can partition  $\Pi$  into  $h$  parts  $\{\Pi_1,\dots \Pi_h\}$  of measure  $1 / n$  with no residual. Thus we have obtained the equipartition of  $[0,1]$  to  $n$  sets of measure  $1 / n$
$$
\mathcal {E} _ {n} := \left\{P _ {1, 1}, \dots , P _ {1, m _ {1} - 1}, P _ {2, 1}, \dots , P _ {2, m _ {2} - 1}, \dots , S _ {k, 1}, \dots , S _ {k, m _ {k} - 1}, \Pi_ {1}, \Pi_ {2}, \dots , \Pi_ {h} \right\}. \tag {11}
$$
For convenience, we also denote  $\mathcal{E}_n = \{Z_1,\ldots ,Z_n\}$
$$
F (x) = \sum_ {j = (j _ {1}, \dots , j _ {d}) \in [ k ] ^ {d}} c _ {j} \prod_ {l = 1} ^ {d} \mathbb {1} _ {P _ {j _ {l}}} (x _ {l}) \in \mathcal {S} _ {\mathcal {P} _ {k}} ^ {d}.
$$
We can write  $F$  with respect to the equipartition  $\mathcal{E}_n$  as
$$
F (x) = \sum_ {j = (j _ {1}, \ldots , j _ {d}) \in [ n ] ^ {d}; \forall l = 1, \ldots , d, Z _ {j _ {l}} \not \subset \Pi} \tilde {c} _ {j} \prod_ {l = 1} ^ {d} \mathbb {1} _ {Z _ {j _ {l}}} (x _ {l}) + E (x),
$$
for some  $\{\tilde{c}_j\}$  with the same values as the values of  $\{c_j\}$ . Here,  $E$  is supported in the set  $\Pi^{(d)} \subset [0,1]^d$ , defined by
$$
\Pi^ {(d)} = \left(\Pi \times [ 0, 1 ] ^ {d - 1}\right) \cup \left([ 0, 1 ] \times \Pi \times [ 0, 1 ] ^ {d - 2}\right) \cup \ldots \cup \left([ 0, 1 ] ^ {d - 1} \times \Pi\right).
$$
Consider the step function
$$
F^{\prime}(x) = \sum_{\substack{j = (j_{1},\ldots ,j_{d})\in [n]^{d};  \forall l = 1,\ldots ,d,  Z_{j_{l}}\not\subset\Pi}}\tilde{e}_{j}\prod_{l = 1}^{d}\mathbb{1}_{Z_{j_{l}}}(x_{l})\in \mathcal{S}_{\mathcal{E}_{n}}^{d}.
$$
Since  $\mu (\Pi) = k / n$ , we have  $\mu (\Pi^{(d)}) = dk / n$ , and so
Lemma B.2. Let  $\{Q_1, Q_2, \ldots, Q_m\}$  partition of  $[0, 1]$ . Let  $\{I_1, I_2, \ldots, I_m\}$  be a partition of  $[0, 1]$  into intervals, such that for every  $j \in [m]$ ,  $\mu(Q_j) = \mu(I_j)$ . Then, there exists a measure preserving bijection  $\phi: [0, 1] \to [0, 1] \in S_{[0,1]}'$  such that
$$
\phi (Q _ {j}) = I _ {j}
$$
Proof. By the definition of a standard probability space, the measure space induced by  $[0,1]$  on a non-null subset  $Q_{j} \subseteq [0,1]$  is a standard probability space. Moreover, each  $Q_{j}$  is atomless, since  $[0,1]$  is atomless. Since there is a measure-preserving bijection (up to null-set) between any two atomless standard probability spaces, we obtain the result.
Lemma B.3. Let  $\mathcal{S} = \{S_{j} \subset [0,1]\}_{j=0}^{m-1}$  be a collection of measurable sets (that are not disjoint in general), and  $d \in \mathbb{N}$ . Let  $\mathcal{C}_S^d$  be the space of functions  $F: [0,1]^d \to \mathbb{R}$  of the form
$$
F (x) = \sum_ {j = (j _ {1}, \dots , j _ {d}) \in [ m ] ^ {d}} c _ {j} \prod_ {l = 1} ^ {d} \mathbb {1} _ {S _ {j _ {l}}} (x _ {l}),
$$
for some choice of  $\{c_j\in \mathbb{R}\}_{j\in [m]^d}$ . Then, there exists a partition  $\mathcal{P}_k = \{P_1,\dots ,P_k\}$  into  $k = 2^m$  sets, that depends only on  $\mathcal{S}$ , such that
$$
\mathcal {C} _ {\mathcal {S}} ^ {d} \subset \mathcal {S} _ {\mathcal {P} _ {k}} ^ {d}.
$$
Proof. The partition  $\mathcal{P}_k = \{P_1, \ldots, P_k\}$  is defined as follows. Let
$$
\tilde {\mathcal {P}} = \left\{P \subset [ 0, 1 ] \mid \exists x \in [ 0, 1 ], P = \cap \{S _ {j} \in \mathcal {S} | x \in S _ {j} \} \right\}.
$$
We must have  $|\tilde{\mathcal{P}}| \leq 2^m$ . Indeed, there are at most  $2^m$  different subsets of  $\mathcal{S}$  for the intersections. We endow an arbitrarily order to  $\tilde{\mathcal{P}}$  and turn it into a sequence. If the size of  $\tilde{\mathcal{P}}$  is strictly smaller than  $2^m$ , we add enough copies of  $\{\emptyset\}$  to  $\tilde{\mathcal{P}}$  to make the size of the sequence  $2^m$ , that we denote by  $\mathcal{P}_k$ , where  $k = 2^m$ .
The following simple lemma is proved similarly to Lemma B.3. We give it without proof.
Lemma B.4. Let  $\mathcal{P}_k = \{P_1, \ldots, P_k\}$ ,  $\mathcal{Q}_m = \{Q_1, \ldots, Q_k\}$  be two partitions. Then, there exists a partition  $\mathcal{Z}_{km}$  into  $km$  sets such that for every  $d$ ,
$$
\mathcal {S} _ {\mathcal {P} _ {k}} ^ {d} \subset \mathcal {S} _ {\mathcal {Z} _ {m k}} ^ {d}, \quad a n d \quad \mathcal {S} _ {\mathcal {Q} _ {m}} ^ {d} \subset \mathcal {S} _ {\mathcal {Z} _ {m k}} ^ {d}.
$$
4Namely, there is a measure preserving bijection  $\phi$  between two co-null sets  $C_1$  and  $C_2$  of [0, 1], such that  $\phi(Q_j \cap C_1) = I_j \cap C_2$ .
B.2 List of graphon-signal regularity lemmas
The following lemma from [25, Lemma 4.1] is a tool in the proof of the weak regularity lemma.
Lemma B.5. Let  $\mathcal{K}_1, \mathcal{K}_2, \ldots$  be arbitrary nonempty subsets (not necessarily subspaces) of a Hilbert space  $\mathcal{H}$ . Then, for every  $\epsilon > 0$  and  $v \in \mathcal{H}$  there is  $m \leq \lceil 1 / \epsilon^2 \rceil$  and  $v_i \in \mathcal{K}_i$  and  $\gamma_i \in \mathbb{R}$ ,  $i \in [m]$ , such that for every  $w \in \mathcal{K}_{m+1}$
$$
\left| \left\langle w, v - \left(\sum_ {i = 1} ^ {m} \gamma_ {i} v _ {i}\right) \right\rangle \right| \leq \epsilon \| w \| \| v \|. \tag {12}
$$
The following theorem is an extension of the graphon regularity lemma from [25] to the case of graphon-signals. Much of the proof follows the steps of [25].
Theorem B.6 (Weak regularity lemma for graphon-signals). Let  $\epsilon, \rho > 0$ . For every  $(W, f) \in \mathcal{WL}_r$  there exists a partition  $\mathcal{P}_k$  of  $[0,1]$  into  $k = \lceil r / \rho \rceil \left(2^{2\lceil 1 / \epsilon^2 \rceil}\right)$  sets, a step function graphon  $W_k \in S_{\mathcal{P}_k}^2 \cap \mathcal{W}_0$  and a step function signal  $f_k \in S_{\mathcal{P}_k}^1 \cap \mathcal{L}_r^\infty[0,1]$ , such that
$$
\left\| W - W _ {k} \right\| _ {\square} \leq \epsilon \quad \text {a n d} \left\| f - f _ {k} \right\| _ {\square} \leq \rho . \tag {13}
$$
Proof. We first analyze the graphon part. In Lemma B.5, set  $\mathcal{H} = \mathcal{L}^2 ([0,1]^2)$  and for all  $i\in \mathbb{N}$ , set
$$
\mathcal {K} _ {i} = \mathcal {K} = \left\{\mathbb {1} _ {S \times T} \mid S, T \subset [ 0, 1 ] \text {m e a s u r a b l e} \right\}.
$$
Then, by Lemma B.5, there exists  $m \leq \lceil 1 / \epsilon^2 \rceil$  two sequences of sets  $S_m = \{S_i\}_{i=1}^m$ ,  $\mathcal{T}_m = \{T_i\}_{i=1}^m$ , a sequence of coefficients  $\{\gamma_i \in \mathbb{R}\}_{i=1}^m$ , and
$$
W _ {\epsilon} ^ {\prime} = \sum_ {i = 1} ^ {m} \gamma_ {i} \mathbb {1} _ {S _ {i} \times T _ {i}},
$$
such that for any  $V\in \mathcal{K}$  , given by  $V(x,y) = \mathbb{1}_S(x)\mathbb{1}_T(y)$  , we have
$$
\begin{array}{l} \left| \int V (x, y) \left(W (x, y) - W _ {\epsilon} ^ {\prime} (x, y)\right) d x d y \right| = \left| \int_ {S} \int_ {T} \left(W (x, y) - W _ {\epsilon} ^ {\prime} (x, y)\right) d x d y \right| (14) \\ \leq \epsilon \| \mathbb {1} _ {S \times T} \| \| W \| \leq \epsilon . (15) \\ \end{array}
$$
We may choose exactly  $m = \lceil 1 / \epsilon^2\rceil$  by adding copies of the empty set to  $\mathcal{S}_m$  and  $\mathcal{T}_m$ , if the constant  $m$  guaranteed by Lemma B.5 is strictly less than  $\lceil 1 / \epsilon^2\rceil$ . Let  $W_{\epsilon}(x,y) = (W_{\epsilon}'(x,y) + W_{\epsilon}'(y,x)) / 2$ . By the symmetry of  $W$ , it is easy to see that (15) is also true when replacing  $W_{\epsilon}'$  by  $W_{\epsilon}$ . Indeed,
$$
\begin{array}{l} \left| \int V (x, y) \left(W (x, y) - W _ {\epsilon} (x, y)\right) d x d y \right| \\ \begin{array}{l}\leq 1 / 2\bigg|\int V(x,y)\big(W(x,y) - W_{\epsilon}^{\prime}(x,y)\big)dxdy\bigg| + 1 / 2\bigg|\int V(y,x)\big(W(x,y) - W_{\epsilon}^{\prime}(x,y)\big)dxdy\bigg|\\ \leq \epsilon . \end{array} \\ \end{array}
$$
Consider the concatenation of the two sequences  $\mathcal{T}_m, \mathcal{S}_m$  given by  $\mathcal{V}_{2m} = \mathcal{T}_m \cup \mathcal{S}_m$ . Note that in the notation of Lemma B.3,  $W_{\epsilon} \in \mathcal{C}_{\mathcal{V}_{2m}}^2$ . Hence, by Lemma B.3, there exists a partition  $\mathcal{Q}_n$  into  $n = 2^{2m} = 2^{2\lceil \frac{1}{\epsilon^2} \rceil}$  sets, such that  $W_{\epsilon}$  is a step graphon with respect to  $\mathcal{Q}_n$ .
To analyze the signal part, we partition the range of the signal  $[-r,r]$  into  $j = \lceil r / \rho \rceil$  intervals  $\{J_i\}_{i=1}^j$  of length less or equal to  $2\rho$ , where the left edge point of each  $J_i$  is  $-r + (i - 1)\frac{\rho}{r}$ . Consider the partition of  $[0,1]$  based on the preimages  $\mathcal{V}_j = \{Y_i = f^{-1}(J_i)\}_{i=1}^j$ . It is easy to see that for the step signal
$$
f _ {\rho} (x) = \sum_ {i = 1} ^ {j} a _ {i} \mathbb {1} _ {Y _ {i}} (x),
$$
where  $a_{i}$  the midpoint of the interval  $Y_{i}$ , we have
$$
\| f - f _ {\rho} \| _ {\square} \leq \| f - f _ {\rho} \| _ {1} \leq \rho .
$$
Lastly, by Lemma B.4, there is a partition  $\mathcal{P}_k$  of  $[0,1]$  into  $k = \lceil r / \rho \rceil \left(2^{2\lceil 1 / \epsilon^2\rceil}\right)$  sets such that  $W_{\epsilon} \in S_{\mathcal{P}_{k}}^{2}$  and  $f_{\rho} \in S_{\mathcal{P}_{k}}^{1}$ .
Corollary B.7 (Weak regularity lemma for graphon-signals - version 2). Let  $r > 0$  and  $c > 1$ . For every sufficiently small  $\epsilon > 0$  (namely,  $\epsilon$  that satisfies (17)), and for every  $(W, f) \in \mathcal{WL}_r$  there exists a partition  $\mathcal{P}_k$  of  $[0,1]$  into  $k = \left(2^{\lceil 2c / \epsilon^2 \rceil}\right)$  sets, a step graphon  $W_k \in S_{\mathcal{P}_k}^2 \cap \mathcal{W}_0$  and a step signal  $f_k \in S_{\mathcal{P}_k}^1 \cap \mathcal{L}_r^\infty[0,1]$ , such that
$$
d _ {\square} \big ((W, f), (W _ {k}, f _ {k}) \big) \leq \epsilon .
$$
Proof. First, evoke Theorem B.6, with errors  $\| W - W_k \|_{\square} \leq \nu$  and  $\| f - f_k \|_{\square} \leq \rho = \epsilon - \nu$ . We now show that there is some  $\epsilon_0 > 0$  such that for every  $\epsilon < \epsilon_0$ , there is a choice of  $\nu$  such that the number of sets in the partition, guaranteed by Theorem B.6, satisfies
$$
k (\nu) := \lceil r / (\epsilon - \nu) \rceil \left(2 ^ {2 ^ {\lceil 1 / \nu^ {2} \rceil}}\right) \leq 2 ^ {\lceil 2 c / \epsilon^ {2} \rceil}.
$$
Denote  $c = 1 + t$ . In case
$$
\nu \geq \sqrt {\frac {2}{2 (1 + 0 . 5 t) / \epsilon^ {2} - 1}}, \tag {16}
$$
$$
2 ^ {2 \lceil 1 / \nu^ {2} \rceil} \leq 2 ^ {2 (1 + 0. 5 t) / \epsilon^ {2}}.
$$
On the other hand, for
$$
\nu \leq \epsilon - \frac {r}{2 ^ {t / \epsilon^ {2}} - 1},
$$
$$
\left\lceil r / (\epsilon - \nu) \right\rceil \leq 2 ^ {2 (0. 5 t) / \epsilon^ {2}}.
$$
The reconcile these two conditions, we restrict to  $\epsilon$  such that
$$
\epsilon - \frac {r}{2 ^ {t / \epsilon^ {2}} - 1} \geq \sqrt {\frac {2}{2 (1 + 0 . 5 t) / \epsilon^ {2} - 1}}. \tag {17}
$$
There exists  $\epsilon_0$  that depends on  $c$  and  $r$  (and hence also on  $t$ ) such that for every  $\epsilon < \epsilon_0$  (17) is satisfied. Indeed, for small enough  $\epsilon$ ,
$$
\frac {1}{2 ^ {t / \epsilon^ {2}} - 1} = \frac {2 ^ {- t / \epsilon^ {2}}}{1 - 2 ^ {- t / \epsilon^ {2}}} <   2 ^ {- t / \epsilon^ {2}} <   \frac {\epsilon}{r} \Big (1 - \frac {1}{1 + 0 . 1 t} \Big),
$$
$$
\epsilon - \frac {r}{2 ^ {t / \epsilon^ {2}} - 1} > \epsilon (1 + 0. 1 t).
$$
Moreover, for small enough  $\epsilon$
$$
\sqrt {\frac {2}{2 (1 + 0 . 5 t) / \epsilon^ {2} - 1}} = \epsilon \sqrt {\frac {1}{(1 + 0 . 5 t) - \epsilon^ {2}}} <   \epsilon / (1 + 0. 4 t).
$$
Hence, for every  $\epsilon <  \epsilon_0$  , there is a choice of  $\nu$  such that
$$
k (\nu) = \lceil r / (\epsilon - \nu) \rceil \left(2 ^ {2 \lceil 1 / \nu^ {2} \rceil}\right) \leq 2 ^ {2 (0. 5 t) / \epsilon^ {2}} 2 ^ {2 (1 + 0. 5 t) / \epsilon^ {2}} \leq 2 ^ {\lceil 2 c / \epsilon^ {2} \rceil}.
$$
Lastly, we add as many copies of  $\emptyset$  to  $\mathcal{P}_{k(\nu)}$  as needed so that we get a sequence of  $k = 2^{[2c / \epsilon^2]}$  sets.
Theorem B.8 (Regularity lemma for graphon-signals - equipartition version). Let  $c > 1$  and  $r > 0$ . For any sufficiently small  $\epsilon > 0$ , and every  $(W, f) \in \mathcal{WL}_r$  there exists  $\phi \in S_{[0,1]}'$ , a step function graphon  $[W^{\phi}]_n \in \mathcal{S}_{\mathcal{L}_n}^2 \cap \mathcal{W}_0$  and a step signal  $[f^{\phi}]_n \in \mathcal{S}_{\mathcal{L}_n}^1 \cap \mathcal{L}_r^\infty[0,1]$ , such that
$$
d _ {\square} \left(\left(W ^ {\phi}, f ^ {\phi}\right), \left(\left[ W ^ {\phi} \right] _ {n}, \left[ f ^ {\phi} \right] _ {n}\right)\right) \leq \epsilon , \tag {18}
$$
where  $\mathcal{I}_n$  is the equipartition of [0, 1] into  $n = 2^{\lceil 2c / \epsilon^2 \rceil}$  intervals.
Proof. Let  $c = 1 + t > 1$ ,  $\epsilon > 0$  and  $0 < \alpha, \beta < 1$ . In Corollary B.7, consider the approximation error
$$
d _ {\square} \big ((W, f), (W _ {k}, f _ {k}) \big) \leq \alpha \epsilon .
$$
with a partition  $\mathcal{P}_k$  into  $k = 2^{\lceil \frac{2(1 + t / 2)}{(\epsilon\alpha)^2}\rceil}$  sets. We next equatize the partition  $\mathcal{P}_k$  up to error  $\epsilon \beta$ . More accurately, in Lemma B.1, we choose
$$
n = \lceil 2 ^ {\frac {2 (1 + 0 . 5 t)}{(\epsilon \alpha) ^ {2}} + 1} / (\epsilon \beta) \rceil ,
$$
and note that
$$
n \geq 2 ^ {\lceil \frac {2 (1 + 0 . 5 t)}{(\epsilon \alpha) ^ {2}} \rceil} \lceil 1 / \epsilon \beta \rceil = k \lceil 1 / \epsilon \beta \rceil .
$$
By Lemma B.1 and by the fact that the cut norm is bounded by  $L_{1}$  norm, there exists an equipartition  $\mathcal{E}_n$  into  $n$  sets, and step functions  $W_{n}$  and  $f_{n}$  with respect to  $\mathcal{E}_n$  such that
$$
\| W _ {k} - W _ {n} \| _ {\square} \leq 2 \epsilon \beta \quad \text {a n d} \quad \| f _ {k} - f _ {n} \| _ {1} \leq r \epsilon \beta .
$$
Hence, by the triangle inequality,
$$
d _ {\square} \big ((W, f), (W _ {n}, f _ {n}) \big) \leq d _ {\square} \big ((W, f), (W _ {k}, f _ {k}) \big) + d _ {\square} \big ((W _ {k}, f _ {k}), (W _ {n}, f _ {n}) \big) \leq \epsilon (\alpha + (2 + r) \beta).
$$
In the following, we restrict to choices of  $\alpha$  and  $\beta$  which satisfy  $\alpha + (2 + r)\beta = 1$ . Consider the function  $n: (0,1) \to \mathbb{N}$  defined by
$$
n (\alpha) := \lceil 2 ^ {\frac {4 (1 + 0 . 5 t)}{(\epsilon \alpha) ^ {2}} + 1} / (\epsilon \beta) \rceil = \lceil (2 + r) \cdot 2 ^ {\frac {9 (1 + 0 . 5 t)}{4 (\epsilon \alpha) ^ {2}} + 1} / (\epsilon (1 - \alpha)) \rceil .
$$
Using a similar technique as in the proof of Corollary B.7, there is  $\epsilon_0 > 0$  that depends on  $c$  and  $r$  (and hence also on  $t$ ) such that for every  $\epsilon < \epsilon_0$ , we may choose  $\alpha_0$  (that depends on  $\epsilon$ ) which satisfies
$$
n \left(\alpha_ {0}\right) = \lceil (2 + r) \cdot 2 ^ {\frac {2 (1 + 0 . 5 t)}{(\epsilon \alpha_ {0}) ^ {2}} + 1} / \left(\epsilon \left(1 - \alpha_ {0}\right)\right) \rceil <   2 ^ {\lceil \frac {2 c}{\epsilon^ {2}} \rceil}. \tag {19}
$$
Moreover, there is a choice  $\alpha_{1}$  which satisfies
$$
n \left(\alpha_ {1}\right) = \lceil (2 + r) \cdot 2 ^ {\frac {2 (1 + 0 . 5 t)}{\left(\epsilon \alpha_ {1}\right) ^ {2}} + 1} / \left(\epsilon \left(1 - \alpha_ {1}\right)\right) \rceil > 2 ^ {\lceil \frac {2 c}{\epsilon^ {2}} \rceil}. \tag {20}
$$
We note that the function  $n:(0,1)\to \mathbb{N}$  satisfies the following intermediate value property. For every  $0 < \alpha_{1} < \alpha_{2} < 1$  and every  $m\in \mathbb{N}$  between  $n(\alpha_1)$  and  $n(\alpha_2)$ , there is a point  $\alpha \in [\alpha_1,\alpha_2]$  such that  $n(\alpha) = m$ . This follows the fact that  $\alpha \mapsto (2 + r)\cdot 2^{\frac{2(1 + 0.5t)}{(\epsilon\alpha)^2} +1} / (\epsilon (1 - \alpha))$  is a continuous function. Hence, by (19) and (20), there is a point  $\alpha$  (and  $\beta$  such that  $\alpha +(2 + r)\beta = 1$ ) such that
$$
n (\alpha) = n = \lceil 2 ^ {\frac {2 (1 + 0 . 5 t)}{(\epsilon \alpha) ^ {2}} + 1} / (\epsilon \beta) \rceil = 2 ^ {\lceil 2 c / \epsilon^ {2} \rceil}.
$$
By a slight modification of the above proof, we can replace  $n$  with the constant  $n = \lceil 2^{\frac{2c}{\epsilon^2}} \rceil$ . As a result, we can easily prove that for any  $n' \geq 2^{\lceil \frac{2c}{\epsilon^2} \rceil}$  we have the approximation property (18) with  $n'$  instead of  $n$ . This is done by choosing an appropriate  $c' > c$  and using Theorem B.8 on  $c'$ , giving a constant  $n' = \lceil 2^{\frac{2c'}{\epsilon^2}} \rceil \geq 2^{\lceil \frac{2c}{\epsilon^2} \rceil} = n$ . This leads to the following corollary.
Corollary B.9 (Regularity lemma for graphon-signals - equipartition version 2). Let  $c > 1$  and  $r > 0$ . For any sufficiently small  $\epsilon > 0$ , for every  $n \geq 2^{\left[\frac{2c}{\epsilon^2}\right]}$  and every  $(W, f) \in \mathcal{WL}_r$ , there exists  $\phi \in S_{[0,1]}'$  a step function graphon  $[W^\phi]_n \in S_{\mathcal{I}_n}^2 \cap \mathcal{W}_0$  and a step function signal  $[f^\phi]_n \in S_{\mathcal{I}_n}^1 \cap \mathcal{L}_r^\infty[0,1]$ , such that
$$
d _ {\square} \left(\left(W ^ {\phi}, f ^ {\phi}\right), \left([ W ^ {\phi} ] _ {n}, [ f ^ {\phi} ] _ {n}\right)\right) \leq \epsilon ,
$$
Next, we prove that we can use the average of the graphon and the signal in each part for the approximating graphon-signal. For that we define the projection of a graphon signal upon a partition.
Definition B.10. Let  $\mathcal{P}_n = \{P_1, \ldots, P_n\}$  be a partition of  $[0, 1]$ , and  $(W, f) \in \mathcal{WL}_r$ . We define the projection of  $(W, f)$  upon  $(\mathcal{S}_{\mathcal{P}}^2 \times \mathcal{S}_{\mathcal{P}}^1) \cap \mathcal{WL}_r$  to be the step graphon-signal  $(W, f)_{\mathcal{P}_n} = (W_{\mathcal{P}_n}, f_{\mathcal{P}_n})$  that attains the value
$$
W _ {\mathcal {P} _ {n}} (x, y) = \int_ {P _ {i} \times P _ {j}} W (x, y) d x d y, f _ {\mathcal {P} _ {n}} (x) = \int_ {P _ {i}} f (x) d x
$$
for every  $(x,y)\in P_i\times P_j$
At the cost of replacing the error  $\epsilon$  by  $2\epsilon$ , we can replace  $W'$  with its projection. This was shown in [1]. Since this paper does not use the exact same setting as us, for completeness, we write a proof of the claim below.
Corollary B.11 (Regularity lemma for graphon-signals - projection version). For any  $c > 1$ , and any sufficiently small  $\epsilon > 0$ , for every  $n \geq 2^{\lceil \frac{8c}{\epsilon^2} \rceil}$  and every  $(W, f) \in \mathcal{WL}_r$ , there exists  $\phi \in S_{[0,1]}'$  such that such that
$$
d _ {\square} \Big (\left(W ^ {\phi}, f ^ {\phi}\right), \left([ W ^ {\phi} ] _ {\mathcal {I} _ {n}}, [ f ^ {\phi} ] _ {\mathcal {I} _ {n}}\right) \Big) \leq \epsilon .
$$
We first prove a simple lemma.
Lemma B.12. Let  $\mathcal{P}_n = \{P_1, \ldots, P_n\}$  be a partition of  $[0, 1]$ , and Let  $V, R \in S_{\mathcal{P}_n}^2 \cap \mathcal{W}_0$ . Then, the supremum of
$$
\sup  _ {S, T \subset [ 0, 1 ]} \left| \int_ {S} \int_ {T} (V (x, y) - R (x, y)) d x d y \right| \tag {21}
$$
is attained for  $S, T$  of the form
$$
S = \bigcup_ {i \in s} P _ {i}, \quad T = \bigcup_ {j \in t} P _ {j},
$$
where  $t, s \subset [n]$ . Similarly for any two signals  $f, g \in S_{\mathcal{P}_n}^1 \cap \mathcal{L}_r^\infty[0,1]$ , the supremum of
$$
\sup  _ {S \subset [ 0, 1 ]} \left| \int_ {S} (f (x) - g (x)) d x \right| \tag {22}
$$
is attained for  $S$  of the form
$$
S = \bigcup_ {i \in s} P _ {i},
$$
where  $s\subset [n]$
Proof. First, by Lemma A.1, the supremum of (21) is attained for some  $S, T \subset [0,1]$ . Given the maximizers  $S, T$ , without loss of generality, suppose that
$$
\int_ {S} \int_ {T} \big (V (x, y) - R (x, y) \big) d x d y > 0.
$$
we can improve  $T$  as follows. Consider the set  $t \subset [n]$  such that for every  $j \in t$
$$
\int_ {S} \int_ {T \cap P _ {j}} (V (x, y) - R (x, y)) d x d y > 0.
$$
By increasing the set  $T \cap P_j$  to  $P_j$ , we can only increase the size of the above integral. Indeed,
$$
\begin{array}{l} \int_ {S} \int_ {P _ {j}} (V (x, y) - R (x, y)) d x d y = \frac {\mu (P _ {j})}{\mu (T \cap P _ {j})} \int_ {S} \int_ {T \cap P _ {j}} (V (x, y) - R (x, y)) d x d y \\ \geq \int_ {S} \int_ {T \cap P _ {j}} (V (x, y) - R (x, y)) d x d y. \\ \end{array}
$$
Hence, by increasing  $T$  to
$$
T ^ {\prime} = \bigcup_ {\{j | T \cap P _ {j} \neq \emptyset \}} P _ {j},
$$
$$
\int_ {S} \int_ {T ^ {\prime}} (V (x, y) - R (x, y)) d x d y \geq \int_ {S} \int_ {T} (V (x, y) - R (x, y)) d x d y.
$$
We similarly replace each  $T \cap P_j$  such that
$$
\int_ {S} \int_ {T \cap P _ {j}} (V (x, y) - R (x, y)) d x d y \leq 0
$$
by the empty set. We now repeat this process for  $S$ , which concludes the proof for the graphon part.
For the signal case, let  $f = f_{+} - f_{-}$ , and suppose without loss of generality that  $\| f\|_{\square} = \| f\|_{1}$ . It is easy to see that the supremum of (22) is attained for the support of  $f_{+}$ , which has the required form.
Proof. Proof of Corollary B.11 Let  $W_{n} \in S_{\mathcal{P}_{n}} \cap \mathcal{W}_{0}$  be the step graphon guaranteed by Corollary B.9, with error  $\epsilon / 2$  and measure preserving bijection  $\phi \in S_{[0,1]}'$ . Without loss of generality, we suppose that  $W^{\phi} = W$ . Otherwise, we just denote  $W' = W^{\phi}$  and replace the notation  $W$  with  $W'$  in the following. By Lemma B.12, the infimum underlying  $\| W_{\mathcal{P}_n} - W_n \|_0$  is attained for some
$$
S = \bigcup_ {i \in s} P _ {i}  , \quad T = \bigcup_ {j \in t} P _ {j}.
$$
We now have, by definition of the projected graphon,
$$
\begin{array}{l} \| W _ {n} - W _ {\mathcal {P} _ {n}} \| _ {\square} = \left| \sum_ {i \in s, j \in t} \int_ {P _ {i}} \int_ {P _ {j}} \left(W _ {\mathcal {P} _ {n}} (x, y) - W _ {n} (x, y)\right) d x d y \right| \\ = \left| \sum_ {i \in s, j \in t} \int_ {P _ {i}} \int_ {P _ {j}} \left(W (x, y) - W _ {n} (x, y)\right) d x d y \right| \\ = \left| \int_ {S} \int_ {T} (W (x, y) - W _ {n} (x, y)) d x d y \right| = \| W _ {n} - W \| _ {\square}. \\ \end{array}
$$
$$
\| W - W _ {\mathcal {P} _ {n}} \| _ {\square} \leq \| W - W _ {n} \| _ {\square} + \| W _ {n} - W _ {\mathcal {P} _ {n}} \| _ {\square} <   2 \| W _ {n} - W \| _ {\square}.
$$
A similar argument shows
$$
\| f - f _ {\mathcal {P} _ {n}} \| _ {\square} <   2 \| f _ {n} - f \| _ {\square}.
$$
$$
d _ {\square} \Big (\left(W ^ {\phi}, f ^ {\phi}\right), \left([ W ^ {\phi} ] _ {\mathcal {I} _ {n}}, [ f ^ {\phi} ] _ {\mathcal {I} _ {n}}\right) \Big) \leq 2 d _ {\square} \Big (\left(W ^ {\phi}, f ^ {\phi}\right), \left([ W ^ {\phi} ] _ {n}, [ f ^ {\phi} ] _ {n}\right) \Big) \leq \epsilon .
$$
C Compactness and covering number of the graphon-signal space
In this appendix we prove Theorem 3.6.
Given a partition  $\mathcal{P}_k$ , recall that