SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Thus, there is a constant  $C > 0$  such that for any  $\tilde{f} -\tilde{g}\in (\mathfrak{F}_{\delta ,\mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}})$  satisfying  $\left\| \tilde{f} -\tilde{g}\right\|_{L_2}\leq \mathfrak{r}$ , it holds with probability at least  $1 - e^{-t}$  that
$$
\left(\mathcal {L} ^ {\mathrm {a d v}} (f) - \mathcal {L} ^ {\mathrm {a d v}} (g)\right) - \left(\hat {\mathcal {L}} ^ {\mathrm {a d v}} (f) - \hat {\mathcal {L}} ^ {\mathrm {a d v}} (g)\right) \leq C \left(\Phi (\mathfrak {r}) + L _ {\ell} \mathfrak {r} \sqrt {\frac {t}{N}} + \frac {t L _ {\ell} B _ {\tilde {f}}}{N}\right). \tag {51}
$$
We denote the above event by  $\mathcal{E}_3(\mathfrak{r})$ . Note that Event  $\mathcal{E}_3(\mathfrak{r})$  is conditioned on Event  $\mathcal{E}_2(\mathfrak{r})$ .
Step (2.2.2): Upper bound the probability of Event  $\mathcal{E}_2(\mathfrak{r})\coloneqq \left\{\left\| \tilde{f} -\tilde{g}\right\|_{L_2}\leq \mathfrak{r}\right\}$ . We further bound the probability of Event  $\mathcal{E}_2(\mathfrak{r})$  in which  $\left\| \tilde{f} -\tilde{g}\right\|_{L_2}\leq \mathfrak{r}$  holds. Generally speaking,  $\tilde{f}$  and  $\tilde{g}$  are date dependent and we can only bound the empirical  $L_{2}$ -distance between them. However, the local Rademacher complexity is characterized by the population  $L_{2}$ -norm. Thus, we need to bound the population  $L_{2}$ -distance between  $\tilde{f}$  and  $\tilde{g}$ . Motivated by [43], we use the ratio type empirical process to bound the bound the population  $L_{2}$ -distance.
According to Assumption 11, their exists a function  $\phi :[0,\infty)\to [0,\infty)$  such that
$$
\dot {R} _ {\mathfrak {r}} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \leq \phi (\mathfrak {r}) \text {a n d} \phi (2 \mathfrak {r}) \leq 2 \phi (\mathfrak {r}), (\forall \mathfrak {r} > 0).
$$
Define the quantity  $\Gamma(\mathfrak{r}) := \mathbb{E}\left[\sup_{h}\left(\frac{1}{N}\sum_{i=1}^{N}\varepsilon_{i}h^{2}(\underline{\mathbf{x}}_{i},y_{i})\big|h\in(\mathfrak{F}_{\delta,\mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}):\|h\|_{L_{2}}\leq \mathfrak{r}\right)\right]$ . Then, we have
$$
\begin{array}{l} \Gamma (\mathfrak {r}) = \mathbb {E} \left[ \sup  _ {h} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \varepsilon_ {i} h ^ {2} \left(\underline {{\mathbf {x}}} _ {i}, y _ {i}\right) \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right): \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] \\ \stackrel {(i)} {\leq} 2 B _ {\hat {f}} \mathbb {E} \left[ \sup  _ {h} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \varepsilon_ {i} h (\underline {{\mathbf {x}}} _ {i}, y _ {i}) \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right): \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] \\ \leq 2 B _ {\tilde {f}} \dot {R} _ {\mathfrak {r}} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \stackrel {(i i)} {\leq} 2 B _ {\tilde {f}} \phi (\mathfrak {r}), \\ \end{array}
$$
where  $(i)$  is by the Talagrand's contraction lemma (Lemma 30).
We can verify that the square  $h^2(\cdot)$  of any function  $h \in \mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  satisfies
(i) its  $L_{\infty}$ -norm is upper bounded by  $B_{\hat{f}}^{2}$ , i.e.,  $\left\| h^{2}\right\|_{L_{\infty}} = \sup_{(\underline{\mathbf{x}},y)}|h^{2}(\underline{\mathbf{x}},y)|\leq B_{\hat{f}}^{2}$ .
(ii) its second-order moment satisfies  $\mathbb{E}_{\underline{\mathbf{x}},y}\left[(h^{2}(\underline{\mathbf{x}},y)^{2})\right] \leq \mathbb{E}_{\underline{\mathbf{x}},y}\left[B_{\tilde{f}}^{2}(h^{2}(\underline{\mathbf{x}},y))\right] = B_{\tilde{f}}^{2}\mathbb{E}_{\underline{\mathbf{x}},y}\left[h^{2}(\underline{\mathbf{x}},y)\right]$ .
Thus,  $h^2$  satisfy the conditions in Eq. (7.6) and Eq. (7.7) of [42] with parameters  $B = B_{\tilde{f}}^2$ ,  $V = B_{\tilde{f}}^2$  and  $\vartheta = 1$ . Noting that we have upper bounded  $\Gamma(\mathfrak{r})$  by  $2B_{\tilde{f}}\phi(\mathfrak{r})$ , then by the peeling trick [42, Eq. (7.17)], we can show for any  $\mathfrak{r} > \inf\{\sqrt{\mathbb{E}[h^2]} : h \in (\mathfrak{F}_{\delta,\mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}) : \|h\|_{L_2} \leq \mathfrak{r}\}$  and  $t > 0$  that
$$
\mathbb {P} \left[ \sup  _ {h \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}} \frac {\| h \| _ {L _ {2}} ^ {2} - \| h \| _ {S} ^ {2}}{\| h \| _ {L _ {2}} ^ {2} + \mathfrak {r} ^ {2}} \geq 8 \frac {2 B _ {\tilde {f}} \phi (\mathfrak {r})}{\mathfrak {r} ^ {2}} + B _ {\tilde {f}} \sqrt {\frac {2 t}{\mathfrak {r} ^ {2} N}} + B _ {\tilde {f}} ^ {2} \frac {2 t}{\mathfrak {r} ^ {2} N} \right] \leq e ^ {- t}.
$$
We further define a function  $\mathfrak{r}_* = \mathfrak{r}_*(t)$  as
$$
\mathfrak {r} _ {*} (t) := \inf  \left\{\mathfrak {r} > 0 \left| \frac {1 6 B _ {\tilde {f}} \phi (\mathfrak {r})}{\mathfrak {r} ^ {2}} + B _ {\tilde {f}} \sqrt {\frac {2 t}{\mathfrak {r} ^ {2} N}} + B _ {\tilde {f}} ^ {2} \frac {2 t}{\mathfrak {r} ^ {2} N} \leq \frac {1}{2} \right. \right\}, \tag {52}
$$
which is useful to bound the ratio of the empirical  $L_{2}$ -norm and the population  $L_{2}$ -norm of an elements  $h \in \mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  with probability at least  $1 - e^{t}$ :
$$
\frac {\| h \| _ {L _ {2}} ^ {2} - \| h \| _ {S} ^ {2}}{\| h \| _ {L _ {2}} ^ {2} + \mathfrak {r} _ {*} ^ {2}} \leq \frac {1}{2} \quad \Rightarrow \quad \| h \| _ {L _ {2}} ^ {2} \leq 2 (\| h \| _ {S} ^ {2} + \mathfrak {r} _ {*} ^ {2}).
$$
Recalling that  $\left\| \tilde{f} - \tilde{g} \right\|_S \leq \hat{\mathfrak{r}}$ , we obtain that the probability of Event  $\mathcal{E}_2(\mathfrak{r})$  with  $\mathfrak{r} = \sqrt{2(\mathfrak{r}^2 + \mathfrak{r}_*^2(t))}$  is at least  $1 - e^{-t}$ .
Step 2.3: Combining Events  $\mathcal{E}_1, \mathcal{E}_2(\mathfrak{t}), \mathcal{E}_3(\mathfrak{t})$ . By combining Eqs. (46), (47), (51) and (48) along with their underlying events  $\mathcal{E}_1, \mathcal{E}_2(\mathfrak{t}), \mathcal{E}_3(\mathfrak{t})$ , we obtain
$$
\begin{array}{l} \mathcal {L} ^ {\mathrm {a d v}} (f) - \hat {\mathcal {L}} ^ {\mathrm {a d v}} (f) \leq \frac {C _ {1} L _ {\ell} B _ {\tilde {f}}}{\sqrt {N}} \sqrt {\mathrm {c} \sum_ {l = 1} ^ {L} r _ {l} \left(d _ {l - 1} + d _ {l}\right) \log \left(9 (L + 1)\right)} + B \sqrt {\frac {t}{2 N}} \\ + C _ {2} \left(\Phi (\dot {\mathfrak {t}}) + L _ {\ell} \dot {\mathfrak {t}} \sqrt {\frac {t}{N}} + \frac {t L _ {\ell} B _ {\tilde {f}}}{N}\right), \\ \end{array}
$$
with probability at least  $1 - 4e^{-t}$ .
E.1 Several Useful Results
According to Theorem 12, it remains to upper bound  $\Phi (\mathfrak{t})$ . In this subsection, we derive upper bounds on  $\Phi (\mathfrak{r})$  in terms of covering numbers of the considered function sets  $\mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  and  $\mathfrak{F}_{\delta ,\mathbf{r}}^{\mathrm{adv}}$ .
Consider the supremum of the empirical  $L_{2}$ -norm of any function  $(\tilde{f} - \tilde{g}) \in (\mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}})$  on sample  $S = \{(\underline{\mathbf{x}}_i, y_i)\}_{i=1}^N$  when the population  $L_{2}$ -norm is bounded by a given radius  $\mathfrak{r} > 0$  as follows
$$
\beta_ {S} = \beta_ {S} (\mathfrak {r}) = \sup  \left\{\left\| \tilde {f} - \tilde {g} \right\| _ {S} \mid \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r}, \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}}, \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} \right\}. \tag {53}
$$
Recall that we have assumed  $\dot{R}_{\mathfrak{r}}(\mathfrak{F}_{\delta,\mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}) \leq \phi(\mathfrak{r})$ . We now give an explicit example of  $\phi(\mathfrak{r})$  in terms of the sum of covering entropy of  $\mathfrak{F}_{\delta,\mathbf{r}}^{\mathrm{adv}}$  and  $\mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$
$$
\begin{array}{l} \dot {R} _ {\mathfrak {r}} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \\ \stackrel {(i)} {\leq} \mathbb {E} _ {S} \hat {R} _ {\mathfrak {r}} \left(\left\{\left(\tilde {f} - \tilde {g}\right) \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right), \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \right\}\right) \\ \stackrel {(i i)} {\leq} \inf  _ {a} \left[ a + \mathbb {E} _ {S} \int_ {a} ^ {\beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left(\left\{\left(\tilde {f} - \tilde {g}\right) \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \right\}\right) , \| \cdot \| _ {S} , \epsilon)}{N}} \mathrm {d} \epsilon \right] \\ \stackrel {(i i i)} {\leq} \frac {1}{N} + \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left(\left\{\left(\tilde {f} - \tilde {g}\right) \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \right\}\right) , \| \cdot \| _ {S} , \epsilon)}{N} d \epsilon \\ \stackrel {(i v)} {\leq} \frac {1}{N} + \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {\log \mathsf {N} (\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \| \cdot \| _ {S} , \epsilon / 2) + \log \mathsf {N} (\mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \| \cdot \| _ {S} , \epsilon / 2)}{N}} \mathrm {d} \epsilon \\ =: \phi (\mathfrak {r}), \tag {54} \\ \end{array}
$$
where  $(i)$  is the definition of localized Rademacher complexity;  $(ii)$  is due to Dudley's inequality (Lemma 31);  $(iii)$  is obtained by letting  $a = 1 / N$ ;  $(iv)$  holds by Lemma 34.
Lemma 26. We can upper bound  $\Phi (\mathfrak{r})$  by using  $\phi (\mathfrak{r})$  as follows
$$
\Phi (\mathfrak {r}) \leq C L _ {\ell} \phi (\mathfrak {r}). \tag {55}
$$
Proof. Recall that  $\Phi(\mathfrak{r})$  is the average Rademacher complexity of the function set
$$
\left\{\ell \circ \tilde {f} - \ell \circ \tilde {g} \mid \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r}, \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}}, \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} \right\}.
$$
As  $\ell(\cdot)$  is  $L_{\ell}$ -Lipschitz, we have for any functions  $\tilde{f} \in \mathfrak{F}_{\delta,\mathbf{r}}^{\mathrm{adv}}$ ,  $\tilde{g} \in \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  satisfying  $\left\| \tilde{f} - \tilde{g} \right\|_{L_2} \leq \mathfrak{r}$
$$
\begin{array}{l} \sup  _ {\tilde {f}, \tilde {g}} \left\| \ell \circ \tilde {f} - \ell \circ \tilde {g} \right\| _ {S} = \sup  _ {\tilde {f}, \tilde {g}} \sqrt {\sum_ {i = 1} ^ {N} \frac {1}{N} \left(\ell (\tilde {f} (\underline {{\mathbf {x}}} _ {i} , y _ {i}) - \ell (\tilde {g} (\underline {{\mathbf {x}}} _ {i} , y _ {i}))\right) ^ {2}} \\ \stackrel {(i)} {\leq} \sup  _ {\tilde {f}, \tilde {g}} \sqrt {\sum_ {i = 1} ^ {N} \frac {1}{N} \left(L _ {\ell} (\tilde {f} (\underline {{\mathbf {x}}} _ {i} , y _ {i}) - \tilde {g} (\underline {{\mathbf {x}}} _ {i} , y _ {i}))\right) ^ {2}} \\ = \sup  _ {\tilde {f}, \tilde {g}} L _ {\ell} \sqrt {\sum_ {i = 1} ^ {N} \frac {1}{N} \left(\tilde {f} \left(\underline {{\mathbf {x}}} _ {i} , y _ {i}\right) - \tilde {g} \left(\underline {{\mathbf {x}}} _ {i} , y _ {i}\right)\right) ^ {2}} \\ = L _ {\ell} \sup  _ {\tilde {f}, \tilde {g}} \left\| \tilde {f} - \hat {g} \right\| _ {S} \\ = L _ {\ell} \beta_ {S}, \\ \end{array}
$$
where  $(i)$  holds because the loss function  $\ell$  is  $L_{\ell}$ -Lischitz continuous.
To bound  $\Phi (\mathfrak{r})$ , we first bound the its empirical version using the Dudley's inequality (Lemma 31) up to a constant as follows
$$
\begin{array}{l} \inf _ {a > 0} \left[ a + \int_ {a} ^ {L _ {\ell} \beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left(\{\ell \circ \tilde {f} - \ell \circ \tilde {g} \mid \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \}\right) , \| \cdot \| _ {S} , \epsilon)}{N}} \mathrm {d} \epsilon \right] \\ \stackrel {(i)} {\leq} \frac {L _ {\ell}}{N} + \int_ {L _ {\ell} / N} ^ {L _ {\ell} \beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left( \right.\left\{ \right.\ell \circ \tilde {f} - \ell \circ \tilde {g} \mid \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \}\left. \right) , \| \cdot \| _ {S} , \epsilon)}{N}   \mathrm {d} \epsilon \\ \stackrel {(i i)} {\leq} \frac {L _ {\ell}}{N} + \int_ {L _ {\ell} / N} ^ {L _ {\ell} \beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left(\{\tilde {f} - \tilde {g} \mid \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \}\right) , \| \cdot \| _ {S} , \epsilon / L _ {\ell})}{N} \mathrm {d} \epsilon \\ \stackrel {(i i i)} {\leq} \frac {L _ {\ell}}{N} + \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {\log \mathsf {N} \left(\{\tilde {f} - \tilde {g} \mid \tilde {f} \in \mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \tilde {g} \in \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \left\| \tilde {f} - \tilde {g} \right\| _ {L _ {2}} \leq \mathfrak {r} \}\right) , \| \cdot \| _ {S} , t)}{N} L _ {\ell} \mathrm {d} t \\ = L _ {\ell} \phi (\mathfrak {r}), \tag {56} \\ \end{array}
$$
where in (i) we let  $a = L_{\ell} / N$ ; (ii) holds by the Lipschitzness of  $\ell$  and the definition of covering number; we use change of variable  $t = \epsilon / L_{\ell}$  in (iii).
By taking expectations on the RHS of Eq. (56) with respect to the sample  $S$ , we obtain Eq. (55).
To determine an appropriate radius of the population  $L_{2}$ -norm  $\dot{\mathfrak{r}} = 2\sqrt{\hat{\mathfrak{r}}^2 + \mathfrak{r}_*^2}$ , we need to compute the value of  $\mathfrak{r}_{*}$  of satisfying Eq. (52). Using Eq. (54), we show how to compute  $\phi(\mathfrak{r})$  when the covering numbers of  $\mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}}$  and  $\mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  satisfy a special bound.
Lemma 27 (Adapted from Lemma 3 in Ref. [43]). Suppose that the covering numbers of  $\mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}}$  and  $\mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}}$  satisfy
$$
\sup  _ {S} \log \mathsf {N} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\text {a d v}}, \| \cdot \| _ {S}, \epsilon / 2\right) + \sup  _ {S} \log \mathsf {N} \left(\mathfrak {F} _ {\mathbf {r}} ^ {\text {a d v}}, \| \cdot \| _ {S}, \epsilon / 2\right) \leq a _ {1} + a _ {2} \log \left(\epsilon^ {- 1}\right) + a _ {3} \epsilon^ {- 2 q} \tag {57}
$$
for some  $q \leq 1$ . Then, it holds that
(I) The bound  $\phi(\mathfrak{r})$  of the local Rademacher complexity  $\dot{R}_{\mathfrak{r}}(\mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}})$  of radius  $\mathfrak{r}$  can be upper bounded as
$$
\begin{array}{l} \phi (\mathfrak {r}) \leq C \max  \left\{\frac {1}{N} + B _ {\tilde {f}} \frac {a _ {1} + a _ {2} \log N}{N} + \mathfrak {r} \sqrt {\frac {a _ {1} + a _ {2} \log N}{N}}, \right. \tag {58} \\ C _ {q} \left[ \frac {1}{N} + \left(\frac {a _ {3} B _ {\tilde {f}} ^ {1 - q}}{N}\right) ^ {\frac {1}{1 + q}} + \mathfrak {r} ^ {1 - q} \sqrt {\frac {a _ {3}}{N}} \right] \}, \\ \end{array}
$$
for a universal constant  $C > 0$  and a constant  $C_q > 0$  which only depends on  $q \leq 1$ .
(II) In particular, the quantity  $\mathfrak{r}_*(t)$  satisfying Eq. (52) can be upper bounded as
$$
\mathfrak {r} _ {*} ^ {2} (t) \leq C \left[ B _ {\tilde {f}} \frac {a _ {1} + a _ {2} \log N}{N} + \left(\frac {a _ {3}}{N}\right) ^ {\frac {1}{1 + q}} \left(B _ {\tilde {f}} ^ {\frac {1 - q}{1 + q}} + 1\right) + \frac {1 + t B _ {\tilde {f}}}{N} \right].
$$
Proof of Lemma 27. According to Eq. (54) which gives  $\phi (\mathfrak{r})$  and the definition of  $\beta_{S}$  in Eq. (53), we need to upper bound
$$
\begin{array}{l} \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {\log \mathrm {N} (\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} , \| \cdot \| _ {S} , \epsilon / 2) + \log \mathrm {N} (\mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}} , \| \cdot \| _ {S} , \epsilon / 2)}{N}} \mathrm {d} \epsilon \\ \leq \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {a _ {1} + a _ {2} \log (\epsilon^ {- 1}) + a _ {3} \epsilon^ {- 2 q}}{N}} d \epsilon \\ \leq \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {a _ {1} + a _ {2} \log (\epsilon^ {- 1})}{N}} d \epsilon + \mathbb {E} _ {S} \int_ {1 / N} ^ {\beta_ {S}} \sqrt {\frac {a _ {3} \epsilon^ {- 2 q}}{N}} d \epsilon \\ \leq \sqrt {a _ {1} + a _ {2} \log N} \sqrt {\mathbb {E} _ {S} \beta_ {S}} + \frac {\sqrt {a _ {3}}}{1 - q} \mathbb {E} _ {S} \beta_ {S} ^ {1 - q} \\ \leq \underbrace {\sqrt {a _ {1} + a _ {2} \log N} \sqrt {2 B _ {\tilde {f}} \phi (\mathfrak {r}) + \mathfrak {r} ^ {2}}} _ {\textbf {I}} + \underbrace {\frac {\sqrt {a _ {3}}}{1 - q} \left(2 B _ {\tilde {f}} \phi (\mathfrak {r}) + \mathfrak {r} ^ {2}\right) ^ {\frac {1 - q}{2}}} _ {\textbf {I I}}. \\ \end{array}
$$
Hence, if  $\mathbf{I} \geq \mathbf{II}$ , then
$$
\begin{array}{l} \phi (\mathfrak {r}) \leq C \left(\frac {1}{N} + \sqrt {\frac {a _ {1} + a _ {2} \log N}{N}} + \sqrt {2 B _ {\tilde {f}} \phi (\mathfrak {r}) + \mathfrak {r} ^ {2}}\right) \\ \leq \frac {C}{N} + C ^ {2} B _ {\tilde {f}} \frac {a _ {1} + a _ {2} \log N}{N} + C \mathfrak {r} \sqrt {\frac {a _ {1} + a _ {2} \log N}{N}} + \frac {\phi (\mathfrak {r})}{2}, \\ \end{array}
$$
$$
\phi (\mathfrak {r}) \leq \frac {2 C}{N} + 2 C ^ {2} B _ {\tilde {f}} \frac {a _ {1} + a _ {2} \log N}{N} + 2 C \mathfrak {r} \sqrt {\frac {a _ {1} + a _ {2} \log N}{N}}.
$$
If  $\mathbf{I} < \mathbf{II}$ , then by using Young's inequality we obtain
$$
\begin{array}{l} \phi (\mathfrak {r}) \leq C \left(\frac {1}{N} + \frac {\sqrt {a _ {3}}}{1 - q} \left(2 B _ {\tilde {f}} \phi (\mathfrak {r}) + \mathfrak {r} ^ {2}\right) ^ {\frac {1 - q}{2}}\right) \\ \leq \frac {C}{N} + C \left(q \left(\frac {c _ {1} ^ {1 - q} C ^ {2} a _ {3}}{N (1 - q) ^ {2}}\right) ^ {\frac {1}{1 + q}} + (1 - q) \frac {2 B _ {\tilde {f}} \phi (\mathfrak {r})}{c _ {1}} + \sqrt {\frac {a _ {3}}{N (1 - q)} \mathfrak {r} ^ {2 (1 - q)}}\right), \\ \end{array}
$$
for any  $c_{1} > 0$ . Thus, by taking  $c_{1} = 4C(1 - q)B_{\hat{f}}$ , we obtain
$$
\begin{array}{l} \phi (\mathfrak {r}) \leq \frac {2 C}{N} + 2 q C \left(\frac {(4 C (1 - q) B _ {\tilde {f}}) ^ {1 - q} C ^ {2} a _ {3}}{N (1 - q) ^ {2}}\right) ^ {\frac {1}{1 + q}} + 2 C \sqrt {\frac {a _ {3}}{N (1 - q)} \mathfrak {r} ^ {2 (1 - q)}} \\ \leq \frac {2 C}{N} + \frac {2 q C ^ {2} \cdot 4 ^ {\frac {1 - q}{1 + q}}}{1 - q} \left(\frac {B _ {\tilde {f}} ^ {1 - q} a _ {3}}{N}\right) ^ {\frac {1}{1 + q}} + \frac {2 C}{(1 - q)} \mathfrak {r} ^ {(1 - q)} \sqrt {\frac {a _ {3}}{N}} \\ \leq \frac {C _ {q}}{N} + C _ {q} \left(\frac {B _ {\tilde {f}} ^ {1 - q} a _ {3}}{N}\right) ^ {\frac {1}{1 + q}} + C _ {q} \mathfrak {r} ^ {(1 - q)} \sqrt {\frac {a _ {3}}{N}}, \\ \end{array}
$$
where  $C_q > 0$  is a universal constant only depending on  $q$ .
Then, we obtain the bound on  $\phi (\mathfrak{r})$  in Eq. (58). The bound on  $\mathfrak{r}_*^2$  can be obtained by simple calculations based on Eqs. (52) and (58).
Lemma 28. When the population  $L_{2}$ -norm of any function  $h = \tilde{f} - \tilde{g} \in (\mathfrak{F}_{\delta, \mathbf{r}}^{\mathrm{adv}} - \mathfrak{F}_{\mathbf{r}}^{\mathrm{adv}})$  is upper bounded by  $\mathfrak{r}$ , its squared empirical  $L_{2}$ -norm can be upper bounded as follows:
$$
\mathbb {E} _ {S} \left[ \sup  _ {h} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} h \left(\underline {{\mathbf {x}}} _ {i}, y _ {i}\right) ^ {2} \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \text {a n d} \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] \leq 2 B _ {\tilde {f}} \dot {R} _ {\mathfrak {r}} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) + \mathfrak {r} ^ {2}. \tag {59}
$$
Proof. The squared empirical  $L_{2}$ -norm can be upper bounded based on the population  $L_{2}$ -norm as follows
$$
\begin{array}{l} \mathbb {E} _ {S} \left[ \sup  \left(\frac {1}{N} \sum_ {i = 1} ^ {N} h (\underline {{\mathbf {x}}} _ {i}, y _ {i}) ^ {2} \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \text {a n d} \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] \\ \leq \mathbb {E} \left[ \sup  \left(\frac {1}{N} \sum_ {i = 1} ^ {N} h \left(\underline {{\mathbf {x}}} _ {i}, y _ {i}\right) ^ {2} - \mathbb {E} _ {\left(\underline {{\mathbf {x}}} _ {i}, y _ {i}\right)} \left[ h \left(\underline {{\mathbf {x}}}, y\right) ^ {2} \right] \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \text {a n d} \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] + \mathfrak {r} ^ {2} \\ \stackrel {(i)} {\leq} 2 \mathbb {E} _ {S, \varepsilon} \left[ \sup  \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \varepsilon_ {i} h (\underline {{\mathbf {x}}} _ {i}, y _ {i}) ^ {2} \mid h \in \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) \text {a n d} \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] + \mathfrak {r} ^ {2} \\ \stackrel {(i i)} {\leq} 2 B _ {\bar {f}} \mathbb {E} _ {S, \varepsilon} \left[ \sup  \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \varepsilon_ {i} h (\underline {{\mathbf {x}}} _ {i}, y _ {i}) \mid h \in (\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}): \| h \| _ {L _ {2}} \leq \mathfrak {r}\right) \right] + \mathfrak {r} ^ {2} \\ = 2 B _ {\tilde {f}} \dot {R} _ {\mathfrak {r}} \left(\mathfrak {F} _ {\delta , \mathbf {r}} ^ {\mathrm {a d v}} - \mathfrak {F} _ {\mathbf {r}} ^ {\mathrm {a d v}}\right) + \mathfrak {r} ^ {2} \\ \leq 2 B _ {\tilde {f}} \phi (\mathfrak {r}) + \mathfrak {r} ^ {2}, \tag {60} \\ \end{array}
$$
where  $(i)$  is due to the symmetrization argument [47] and  $\varepsilon = \{\varepsilon_{i}\}_{i = 1}^{N}$  are i.i.d. Rademacher variables, and  $(ii)$  holds because of the contraction inequality (Lemma 30).
E.2 Adversarial Generalization Gap under Assumption 13
Proof of Theorem 14. In this situation, we can see that for any  $1 \leq r_{l} \leq \min\{d_{l}, d_{l-1}\}$ , we can approximate  $\underline{\mathbf{W}}^{(l)}$  with its optimal tubal-rank- $r_{l}$  approximation tensor  $\underline{\mathbf{W}}_{r_{l}}^{(l)}$  according to [20, Theorem 3.7] and achieve the following approximation error bound on F-norm