SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2018.
Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
Ohad Shamir. The sample complexity of learning linear predictors with the squared loss. Journal of Machine Learning Research, 16:3475-3486, 2015.
Alexander B Tsybakov. Introduction to nonparametric estimation. In Springer Series in Statistics, 2008.
Sara van de Geer. Empirical Processes in M-estimation, volume 6. Cambridge University Press, 2000.
Vladimir N. Vapnik. Statistical Learning Theory. John Wiley & Sons, Inc., 1998.
Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge University Press, 2019.
Liu Yang. Active learning with a drifting distribution. Advances in Neural Information Processing Systems (NeurIPS), 2011.
Bin Yu. Assouad, fano, and le cam. Festschrift for Lucien Le Cam: research papers in probability and statistics, 1997.
A Deferred Proofs
Proof of Proposition 3. For any  $i \geq 0$ , let  $\delta_i = 6\delta / [\pi^2 (i + 10)^2]$ . By using Assumption 1, we have that with probability at least  $1 - \delta_i$  it holds that
$$
\begin{array}{l} \| P _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i}} \| _ {\mathcal {F}} \leq \frac {C _ {\mathcal {F} , 1} + C _ {\mathcal {F} , 2} \sqrt {\ln (\pi^ {2} / 6) + \ln (1 / \delta) + 2 \ln (i + 1 0)}}{\sqrt {r _ {i}}} \\ \leq \frac {C _ {\mathcal {F} , 1} + \sqrt {2} C _ {\mathcal {F} , 2} \sqrt {\ln (\pi^ {2} / (6 \delta)) + \ln (i + 1 0)}}{\sqrt {r _ {i}}} \\ \leq \frac {C _ {\mathcal {F} , \delta}}{\sqrt {r _ {i}}} + C _ {\mathcal {F}, 2} \sqrt {\frac {2 \ln (i + 1 0)}{r _ {i}}} \\ \end{array}
$$
where in the second inequality we used the definition of  $C_{\mathcal{F},\delta}$  and the fact that  $\sqrt{x + y} \leq \sqrt{x} + \sqrt{y}$ . Additionally, the following equality holds
$$
\sum_ {i = 0} ^ {\infty} \delta_ {i} \leq \delta \left(\frac {6}{\pi^ {2}}\right) \sum_ {i = 1} ^ {\infty} 1 / i ^ {2} = \delta ,
$$
where in the last equality, we used the known fact that  $\sum_{i=1}^{\infty} 1 / i^{2} = \pi^{2} / 6$ . Thus, if we take an union bound over all  $i \geq 0$ , we have with probability at least  $1 - \delta$  it holds that
$$
\| P _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i}} \| _ {\mathcal {F}} \leq \frac {C _ {\mathcal {F} , \delta}}{\sqrt {r _ {i}}} + C _ {\mathcal {F}, 2} \sqrt {\frac {2 \ln (i + 1 0)}{r _ {i}}} \quad \forall i \geq 0.
$$
The statement follows by observing that the right-hand side of the above inequality is equal to  $S(r_i, \delta)$  for any  $i \geq 0$ .
Proof of Proposition 4. . We have
$$
U (r _ {i + 1}, \delta) - U (r _ {i}, \delta) = 2 1 [ S (r _ {i + 1}, \delta) - S (r _ {i}, \delta) ] + \| P _ {T} - P _ {T} ^ {r _ {i + 1}} \| _ {\mathcal {F}} - \| P _ {T} - P _ {T} ^ {r _ {i}} \| _ {\mathcal {F}}.
$$
By using the triangle inequality, we obtain
$$
\left\| P _ {T} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} \leq \left\| P _ {T} - P _ {T} ^ {r _ {i}} \right\| _ {\mathcal {F}} + \left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}},
$$
thus we have
$$
U \left(r _ {i + 1}, \delta\right) - U \left(r _ {i}, \delta\right) \leq 2 1 \left[ S \left(r _ {i + 1}, \delta\right) - S \left(r _ {i}, \delta\right) \right] + \left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}}. \tag {12}
$$
We use the triangle inequality and Proposition 3 to show that
$$
\begin{array}{l} \| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \| _ {\mathcal {F}} \leq \| P _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i}} \| _ {\mathcal {F}} + \| P _ {T} ^ {r _ {i + 1}} - \mathbb {P} _ {T} ^ {r _ {i + 1}} \| _ {\mathcal {F}} + \| \mathbb {P} _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i + 1}} \| _ {\mathcal {F}} \\ \leq \left\| \mathbb {P} _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} + S (r _ {i}, \delta) + S (r _ {i + 1}, \delta). \\ \end{array}
$$
If we plug the above inequality in (12) and use the assumption that  $\| \mathbb{P}_T^{r_i} - \mathbb{P}_T^{r_i + 1}\|_{\mathcal{F}}\leq 4S(r_i,\delta)$ , we obtain
$$
\begin{array}{l} U (r _ {i + 1}, \delta) - U (r _ {i}, \delta) \leq 2 1 [ S (r _ {i + 1}, \delta) - S (r _ {i}, \delta) ] + S (r _ {i + 1}, \delta) + 5 S (r _ {i}, \delta) \\ = 2 2 S \left(r _ {i + 1}, \delta\right) - 1 6 S \left(r _ {i}, \delta\right) \\ \end{array}
$$
If we expand the above upper bound by using the definition of the function  $S$ , we have
$$
\begin{array}{l} 2 2 S (r _ {i + 1}, \delta) - 1 6 S (r _ {i}, \delta) = \frac {C _ {\mathcal {F} , \delta}}{\sqrt {r _ {i + 1}}} [ 2 2 - 1 6 \sqrt {2} ] + C _ {\mathcal {F}, 2} \sqrt {\frac {2 \ln (i + 1)}{r _ {i + 1}}} \left[ 2 2 - 1 6 \sqrt {2} \sqrt {\frac {\ln (i + 1 0)}{\ln (i + 1 1)}} \right] \\ \leq 0, \\ \end{array}
$$
where the last inequality follows since  $22 - 16\sqrt{2} \leq 0$ , and  $22 - 16\sqrt{2}\sqrt{\ln(i + 10) / \ln(i + 11)} \leq 0$ . Thus, it holds that
$$
U (r _ {i + 1}, \delta) - U (r _ {i}, \delta) \leq 2 2 S (r _ {i + 1}, \delta) - 1 6 S (r _ {i}, \delta) \leq 0,
$$
and we can conclude that  $U(r_{i + 1},\delta)\leq U(r_i,\delta)$ .
Proof of Proposition 5. . Observe that by using the triangle inequality, it holds that
$$
\begin{array}{l} \left\| \mathbb {P} _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i} + 1} \right\| _ {\mathcal {F}} \leq \left\| P _ {T} ^ {r _ {i}} - \mathbb {P} _ {T} ^ {r _ {i}} \right\| _ {\mathcal {F}} + \left\| P _ {T} ^ {r _ {i} + 1} - \mathbb {P} _ {T} ^ {r _ {i} + 1} \right\| _ {\mathcal {F}} + \left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i} + 1} \right\| _ {\mathcal {F}} \\ \leq \left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} + S (r _ {i}, \delta) + S (r _ {i + 1}, \delta) \\ \leq \left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} + 2 S (r _ {i}, \delta), \\ \end{array}
$$
where in the second inequality we used Proposition 3. By assumption, we have that  $\| \mathbb{P}_T^{r_i} - \mathbb{P}_T^{r_{i + 1}}\|_{\mathcal{F}}\geq 4S(r_{i + 1},\delta)$ , hence
$$
\left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} \geq 2 S (r _ {i}, \delta) \tag {13}
$$
Observe that by triangle inequality, we have that
$$
\left\| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}} \leq \left\| P _ {T} - P _ {T} ^ {r _ {i}} \right\| _ {\mathcal {F}} + \left\| P _ {T} - P _ {T} ^ {r _ {i + 1}} \right\| _ {\mathcal {F}}.
$$
We use (2) and obtain that
$$
\begin{array}{l} \| P _ {T} ^ {r _ {i}} - P _ {T} ^ {r _ {i + 1}} \| _ {\mathcal {F}} \leq \max  _ {t <   r _ {i}} \| P _ {T} - P _ {T - t} \| _ {\mathcal {F}} + \max  _ {t <   r _ {i + 1}} \| P _ {T} - P _ {T - t} \| _ {\mathcal {F}} \\ \leq 2 \max _ {t <   r _ {i + 1}} \| P _ {T} - P _ {T - t} \| _ {\mathcal {F}}. \\ \end{array}
$$
By combining the above inequality with (13), we finally obtain that  $\max_{t < r_{i + 1}}\| P_T - P_{T - t}\|_{\mathcal{F}}\geq S(r_i,\delta)$
Proof of Lemma 6. We remind that  $\mathcal{F} = \{L_h:h\in \mathcal{H}\}$ . By using the definition of  $\| \cdot \|_{\mathcal{F}}$ , we have
$$
\begin{array}{l} \| \mathbb {P} _ {T} ^ {r} - \mathbb {P} _ {T} ^ {2 r} \| _ {\mathcal {F}} = \sup  _ {h \in \mathcal {H}} \left| \frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) - \frac {1}{2 r} \sum_ {t = T - 2 r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) \right| \\ = \frac {1}{2} \sup  _ {h \in \mathcal {H}} \left| \frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) - \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right) \right|. \\ \end{array}
$$
We can remove the absolute value by re-writing this expression as
$$
\begin{array}{l} \| \mathbb {P} _ {T} ^ {r} - \mathbb {P} _ {T} ^ {2 r} \| _ {\mathcal {F}} = \frac {1}{2} \max  \left\{\sup  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} (X _ {t}, Y _ {t}) - \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} (X _ {t}, Y _ {t})\right), \right. \\ \left. \sup  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right) - \frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right)\right) \right\}. \tag {14} \\ \end{array}
$$
Consider the first argument of the above maximum. We can observe that for any  $(X,Y)\in \mathcal{X}\times \mathcal{Y}$  it holds that  $L_{h}(X,Y) + L_{h}(X,1 - Y) = 1$ , thus we obtain that
$$
\begin{array}{l} \sup  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) - \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right)\right) \\ = \sup  _ {h \in \mathcal {H}} \left(1 - \frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, 1 - Y _ {t}\right) - \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right)\right) \\ = 1 - \inf  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, 1 - Y _ {t}\right) + \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right)\right) \tag {15} \\ \end{array}
$$
Similarly, we can demonstrate that the second term of the maximum is equal to:
$$
\begin{array}{l} \sup  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, Y _ {t}\right) - \frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right)\right) \\ = 1 - \inf  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) + \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, 1 - Y _ {t}\right)\right). \tag {16} \\ \end{array}
$$
Therefore, to compute the discrepancy (14), it is sufficient to solve the two empirical risk minimization problems in (15) and (16). To obtain the final statement, we can observe that for any  $(X,Y)$  and  $h\in \mathcal{H}$ , it holds that  $L_{h}(X,Y) = L_{1 - h}(X,1 - Y)$ . Thus, we can show that (16) is equivalent to:
$$
\begin{array}{l} 1 - \inf  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {h} \left(X _ {t}, Y _ {t}\right) + \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {h} \left(X _ {t}, 1 - Y _ {t}\right)\right) \\ = 1 - \inf  _ {h \in \mathcal {H}} \left(\frac {1}{r} \sum_ {t = T - r + 1} ^ {T} L _ {1 - h} \left(X _ {t}, 1 - Y _ {t}\right) + \frac {1}{r} \sum_ {t = T - 2 r + 1} ^ {T - r} L _ {1 - h} \left(X _ {t}, Y _ {t}\right)\right). \\ \end{array}
$$
Since  $\mathcal{H}$  is symmetric, i.e.  $1 - h\in \mathcal{H}\iff h\in \mathcal{H}$ , we can conclude that (15) and (16) have the same value. This concludes the proof.
Proof of Theorem 7. Since  $\mathcal{H}$  has VC-dimension  $\nu$ , by a standard argument we have that the family  $\mathcal{F} = \{L_h : h \in \mathcal{H}\}$  has VC-dimension upper bounded by  $2\nu$ , thus it satisfies Assumption 1 on the sample complexity for uniform convergence with  $C_{\mathcal{F},1} = O(\sqrt{\nu})$  and  $C_{\mathcal{F},2} = O(1)$ .
We can observe that since  $\mathcal{H}$  is symmetric, Lemma 6 shows that we can compute  $\| \mathbb{P}_T^r -\mathbb{P}_T^{2r}\|_{\mathcal{F}}$  for any  $r\geq 1$  by solving an empirical risk minimization problem. Since  $\mathcal{H}$  is computationally tractable, there exists a procedure that solves this problem, thus we also satisfy Assumption 2.
Remark: If the symmetry assumption does not hold, in the proof of Lemma 6 we show that we can still compute the discrepancy  $\left\| \mathbb{P}_T^r - \mathbb{P}_T^{2r} \right\|_{\mathcal{F}}$  by solving the two empirical risk minimization problems in (15) and (16).
Hence, we can use Algorithm 1 with the family  $\mathcal{F}$ , and let  $\hat{r}$  be the value returned by the algorithm. Theorem 1 guarantees that with probability at least  $1 - \delta$ , we have that
$$
\left\| P _ {T} - \mathbb {P} _ {T} ^ {\hat {r}} \right\| _ {\mathcal {F}} = O \left(\min  _ {r \leq T} \left[ \sqrt {\frac {\nu}{r}} + \max  _ {t <   r} \| P _ {T} - P _ {T - t} \| _ {\mathcal {F}} + \sqrt {\frac {\log (\log (r + 1) / \delta)}{r}} \right]\right). \tag {17}
$$
Now, we have that
$$
\begin{array}{l} P _ {T} \left(L _ {\hat {h}}\right) - P _ {T} \left(L _ {h ^ {*}}\right) = P _ {T} \left(L _ {\hat {h}}\right) - P _ {T} \left(L _ {h ^ {*}}\right) = P _ {T} \left(L _ {\hat {h}}\right) - \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {\hat {h}}\right) + \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {\hat {h}}\right) - P _ {T} \left(L _ {h ^ {*}}\right) \\ \leq P _ {T} \left(L _ {\hat {h}}\right) - \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {\hat {h}}\right) + \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {h ^ {*}}\right) - P _ {T} \left(L _ {h ^ {*}}\right) \\ \leq \left| P _ {T} \left(L _ {\hat {h}}\right) - \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {\hat {h}}\right) \right| + \left| \mathbb {P} _ {T} ^ {\hat {r}} \left(L _ {h ^ {*}}\right) - P _ {T} \left(L _ {h ^ {*}}\right) \right| \\ \leq 2 \| P _ {T} - \mathbb {P} _ {T} ^ {\tilde {r}} \| _ {\mathcal {F}}, \\ \end{array}
$$
where the first inequality is due to the definition of  $\hat{h}$ . Therefore, using (17), we have that with probability at least  $1 - \delta$ , it holds
$$
P _ {T} (L _ {\hat {h}}) - P _ {T} (L _ {h ^ {*}}) = O \left(\min  _ {r \leq T} \left[ \sqrt {\frac {\nu}{r}} + \max  _ {t <   r} \| P _ {T} - P _ {T - t} \| _ {\mathcal {F}} + \sqrt {\frac {\log (\log (r + 1) / \delta)}{r}} \right]\right).
$$
Proof of Theorem 9. The theorem is proven following the same structure as the proof of Theorem 7.
A.1 Lower Bound.
In this section, we prove the lower bound of Theorem 8. The proof structure is based on the work of Mazzetto and Upfal [2023]. We provide a simpler statement of their proof in our setting, and we remove the additional regularity assumption used in that work to characterize the drift error. We introduce the following notation.
We say that a distribution  $Q$  over  $\mathcal{Z}^n$  is a product distribution if it can be written as the product of  $n$  distributions over  $\mathcal{Z}$ , i.e.  $Q = Q_1 \times \ldots \times Q_n$ . For any  $n \geq 1$ , we can observe that since the random
variables  $Z_{1},\ldots ,Z_{n}$  are independent, their distribution can be described as a product distribution over  $\mathcal{Z}^n$  . Given two strings  $\tau ,\tau^{\prime}\in \{-1,1\}^{n}$  , we let  $\mathrm{hd}(\tau ,\tau^{\prime}) = \frac{1}{2}\| \tau -\tau^{\prime}\| _1$  be the Hamming distance between the two strings, i.e. the number of positions in which the two strings differ.
Let  $\nu$  be the VC dimension of the hypothesis class  $\mathcal{H}$ . We will construct a (later defined) family of product distributions  $\mathcal{Q} = \{Q^{(\tau)} = Q_1^{(\tau)}\times \ldots \times Q_T^{(\tau)}:\tau \in \{-1,1\}^\nu \}$  over  $\mathcal{Z}^T$  that are indexed by a string  $\tau \in \{-1,1\}^{\nu}$ . Intuitively, each distribution  $\mathcal{Q}^{(\tau)}$  is a possible candidate for the distribution of the random variables  $Z_{1},\dots,Z_{T}$ . We will show that for any algorithm  $\mathcal{A}$ , there exists a product distribution  $Q^{(\tau)}$  such that the classifier  $h_{\mathcal{A}}$  computed by  $\mathcal{A}$  using the samples  $Z_{1},\ldots ,Z_{T}$  from  $Q^{(\tau)}$  has large expected error. The proof is based on Assouad's Lemma. We provide a statement of this lemma that is an adaptation of its classical statement to our setting [Yu, 1997].
Lemma 10 (Assouad's Lemma). Let  $\mathcal{Q}$  be defined as above. For any function  $g:\mathcal{Z}^T\mapsto \{-1,1\}^\nu$  there exists  $\tau \in \{-1,1\}^\nu$  such that
$$
\mathop{\mathbb{E}}_{Z\sim Q^{(\tau)}}\operatorname {hd}\big(g(Z_{1},\ldots ,Z_{n}),\tau \big)\geq \frac{\nu}{2}\cdot \min_{\substack{\tau^{\prime},\tau^{\prime \prime}\\ \operatorname {hd}(\tau^{\prime},\tau^{\prime \prime}) = 1}}\| Q^{(\tau^{\prime})}\wedge Q^{(\tau^{\prime \prime})}\|_{1}
$$
Let  $\Delta_1 = 0, \Delta_2, \ldots, \Delta_T$  be the sequence defined in the statement of Theorem 8. We let  $\Phi : \{1, \ldots, T\} \mapsto \mathbb{R}$  be the function
$$
\Phi (r) = \left(\sqrt {\frac {\nu}{r}} + \Delta_ {r}\right).
$$
We let  $\Phi^{*} = \min_{r}\Phi (r)$ , and we remind that we assume  $\Phi^{*} < 1 / 3$  in the statement of Theorem. We build the family  $\mathcal{Q}$  based on the following value:
$$
\tilde {r} = \max  \left\{1 \leq r \leq T: \Delta_ {r} <   \sqrt {\frac {\nu}{r}} \right\}
$$
Proposition 11. The following holds:
$$
\Phi (\tilde {r}) \leq 3 \Phi^ {*}.
$$
Proof. Let  $r^* \in \{1, \dots, r\}$  be a value such that  $\Phi^* = \Phi(r^*)$ . The statement follows by exploiting the definition of  $\tilde{r}$ . We distinguish two cases. If  $\tilde{r} \geq r^*$ , we have that
$$
\frac {\Phi (\tilde {r})}{\Phi^ {*}} = \frac {\Delta_ {\tilde {r}} + \sqrt {\nu / \tilde {r}}}{\Delta_ {r ^ {*}} + \sqrt {\nu / r ^ {*}}} \leq \frac {2 \sqrt {\nu / \tilde {r}}}{\sqrt {\nu / r ^ {*}}} = 2 \sqrt {r ^ {*} / \tilde {r}} \leq 2
$$
Conversely, if  $r^* > \tilde{r}$ , we have that
$$
\frac {\Phi (\tilde {r})}{\Phi^ {*}} = \frac {\Delta_ {\tilde {r}} + \sqrt {\nu / \tilde {r}}}{\Delta_ {r ^ {*}} + \sqrt {\nu / r ^ {*}}} = \frac {\Delta_ {\tilde {r}} + \sqrt {\nu / (\tilde {r} + 1)} \sqrt {(\tilde {r} + 1) / \tilde {r}}}{\Delta_ {r ^ {*}} + \sqrt {\nu / r ^ {*}}} \leq 3 \Delta_ {\tilde {r} + 1} / \Delta_ {r ^ {*}} \leq 3
$$
In the first inequality we used the fact that the sequence  $\Delta_1, \ldots, \Delta_T$  is non-decreasing, and the inequality  $\sqrt{\nu / (\tilde{r} + 1)} \leq \Delta_{\tilde{r} + 1}$  due to the definition of  $\tilde{r}$ .
We define the family of product distributions  $\mathcal{Q}$  as follows. Let  $\overline{X}_1, \ldots, \overline{X}_\nu$  be a shatter set for the hypothesis class  $\mathcal{H}$ . We build the following family  $\mathcal{Q} = \{Q^{(\tau)} = Q_1^{[\tau]} \times \ldots \times Q_T^{[\tau]} : \tau \in \{-1, 1\}^\nu\}$  of product distributions over  $\mathcal{Z}^T = (\mathcal{X} \times \mathcal{Y})^T$  that are indexed by  $\tau \in \{-1, 1\}^\nu$ . They are defined as follows:
$$
\begin{array}{l} \operatorname * {P r} _ {(X, Y) \sim Q _ {t} ^ {(\tau)}} (Y = 1 | X = \overline {{X}} _ {i}) = \left\{ \begin{array}{l l} \frac {1}{2} + \frac {\tau_ {i}}{1 6 \sqrt {6}} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}} - \Delta_ {T - t + 1}\right) & \quad \text {i f} t > T - \tilde {r} \\ \frac {1}{2} & \quad \text {e l s e} \end{array} \right. \\ \operatorname * {P r} _ {(X, Y) \sim Q _ {t} ^ {(\tau)}} (X = \overline {{X}} _ {i}) = \frac {1}{\nu} \qquad \qquad \forall i \in \{1, \ldots , \nu \} \\ \end{array}
$$
Those distributions are well-defined. In fact, we have that for all  $t > T - \tilde{r}$ :
$$
\frac {1}{1 6 \sqrt {6}} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}} - \Delta_ {T - t + 1}\right) \leq \frac {1}{1 6 \sqrt {6}} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}}\right) \leq \frac {1}{1 6 \sqrt {6}} \Phi (\tilde {r}) \leq \frac {3}{1 0} \Phi^ {*} <   1 / 4 ,
$$
where we used Proposition 11. Given a classifier  $h\in \mathcal{H}$  and  $\tau \in \{-1,1\}^{\nu}$ , we remind that
$$
Q _ {T} ^ {(\tau)} (L _ {h}) = \Pr_ {(X, Y) \sim Q _ {T} ^ {(\tau)}} \left(h (X) \neq Y\right).
$$
We can observe that for any classifier  $h \in \mathcal{H}$  and  $t > T - \tilde{r}$ , it holds by construction that:
$$
\left| Q _ {T} ^ {(\tau)} (L _ {h}) - Q _ {T - t + 1} ^ {(\tau)} (L _ {h}) \right| = \frac {1}{1 6 \sqrt {6}} \Delta_ {T - t + 1} \leq \Delta_ {T - t + 1},
$$
and for any  $t \leq T - \tilde{r}$ , we have that
$$
\begin{array}{l} \left| Q _ {T} ^ {(\tau)} (L _ {h}) - Q _ {T - t} ^ {(\tau)} (L _ {h}) \right| = \frac {1}{1 6 \sqrt {6}} \left(\Delta_ {\tilde {r}} + \sqrt {\frac {\nu}{\tilde {r}}}\right) \leq \frac {1}{8 \sqrt {6}} \sqrt {\frac {\nu}{\tilde {r}}} = \frac {1}{8 \sqrt {6}} \sqrt {\frac {\nu}{\tilde {r} + 1}} \sqrt {\frac {\tilde {r} + 1}{\tilde {r}}} \\ \leq \frac {1}{8 \sqrt {3}} \Delta_ {\tilde {r} + 1} \leq \Delta_ {T - t + 1}, \\ \end{array}
$$
where the first and the second inequality are due to the definition of  $\tilde{r}$ , and the last inequality follows from the fact that the sequence  $\Delta_1, \ldots, \Delta_T$  is non-decreasing. Hence, if we let  $\mathcal{F} = \{L_h : h \in \mathcal{H}\}$ , it results that for  $\tau$  and for any  $1 \leq r \leq T$ , it holds that:
$$
\max  _ {t <   r} \| Q _ {T} ^ {(\tau)} - Q _ {T - t} ^ {(\tau)} \| _ {\mathcal {F}} \leq \Delta_ {r}. \tag {18}
$$
We also let  $L_{h^*}$  be the minimum loss that is achieved by a function  $h \in \mathcal{H}$  with respect to  $Q_T^{(\tau)}$ , i.e.  $L_{h^*}^\tau = \operatorname{argmin}_{L_h : h \in \mathcal{H}} Q_T^{(\tau)}(L_h)$ . By using the family  $\mathcal{Q}$  together with Assouad's Lemma, we can show the following.
Lemma 12. Let  $\mathcal{Q}$  be defined as above. Let  $\mathcal{A}:\mathcal{Z}^T\mapsto \mathcal{H}$  be any algorithm that observes a sequence of elements  $T$  elements from  $\mathcal{Z}$ , and it outputs a classifier  $h_{\mathcal{A}}$ . For any algorithm  $\mathcal{A}$ , there exists  $\tau \in \{-1,1\}^\nu$  such that if the input  $Z_{1},\ldots ,Z_{n}$  is sampled according to  $Q^{(\tau)}$ , then:
$$
\mathbb {E} \left[ Q _ {T} ^ {(\tau)} \left(L _ {h _ {\mathcal {A}}}\right) - Q _ {T} ^ {(\tau)} \left(L _ {h ^ {*}} ^ {\tau}\right) \right] \geq \frac {7 \sqrt {6} \Phi^ {*}}{7 6 8}.
$$
Proof. Let  $\tau \in \{-1,1\}^{\nu}$ . We can define  $\tau_{\mathcal{A}} = \left(2h_{\mathcal{A}}(\overline{X}_1) - 1,\dots ,2\cdot h_{\mathcal{A}}(\overline{X}_{\nu}) - 1\right)\in \{-1,1\}^{\nu}$ . We have that:
$$
\begin{array}{l} Q _ {T} ^ {(\tau)} \left(L _ {h _ {\mathcal {A}}} ^ {\tau}\right) = \left[ \frac {1}{2} - \frac {1}{1 6 \sqrt {6}} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}}\right) \right] + \frac {1}{8 \sqrt {6} \nu} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}}\right) \sum_ {i = 1} ^ {\nu} \mathbf {1} _ {\{\tau_ {\mathcal {A}, i} \neq \tau_ {i} \}} \\ = \left[ \frac {1}{2} - \frac {1}{1 6 \sqrt {6}} \left(\sqrt {\frac {\nu}{\tilde {r}}} + \Delta_ {\tilde {r}}\right) \right] + \frac {\Phi (\tilde {r})}{8 \sqrt {6} \nu} \mathrm {h d} \big (\tau_ {\mathcal {A}}, \tau \big) \\ \end{array}
$$
By construction of  $Q_T^{(\tau)}$ , we can observe that
$$
Q _ {T} ^ {(\tau)} \left(L _ {h ^ {*}} ^ {\tau}\right) = \left[ \frac {1}{2} - \frac {1}{1 6 \sqrt {6}} \left(\sqrt {\frac {d}{\tilde {r}}} + \Delta_ {\tilde {r}}\right) \right],
$$
hence, we have the following relation
$$
\begin{array}{l} Q _ {T} ^ {(\tau)} \left(L _ {h _ {\mathcal {A}}}\right) - Q _ {T} ^ {(\tau)} \left(L _ {h ^ {*}} ^ {\tau}\right) = \frac {\Phi (\tilde {r})}{8 \sqrt {6} \nu} \mathrm {h d} \left(\tau_ {\mathcal {A}}, \tau\right) \tag {19} \\ \Longrightarrow \mathbb {E} \left[ Q _ {T} ^ {(\tau)} \left(L _ {h _ {\mathcal {A}}}\right) - Q _ {T} ^ {(\tau)} \left(L _ {h ^ {*}} ^ {\tau}\right) \right] = \frac {\Phi (\tilde {r})}{8 \sqrt {6} \nu} \mathbb {E} \mathrm {h d} \left(\tau_ {\mathcal {A}}, \tau\right) \\ \end{array}
$$
Observe that  $\mathcal{A}$  can be seen as a map from  $\mathcal{Z}^T$  to  $\{-1, 1\}^\nu$  (i.e., the string  $\tau_{\mathcal{A}}$ ). Hence, we can apply Lemma 10: this implies that there exists  $\tau \in \{-1, 1\}^\nu$  such that
$$
\mathbb{E}\left[Q_{T}^{(\tau)}\left(L_{h_{\mathcal{A}}}\right) - Q_{T}^{(\tau)}\left(L_{h^{*}}^{\tau}\right)\right]\geq \frac{\Phi(\tilde{r})}{16\sqrt{6}}\min_{\substack{\tau^{\prime},\tau^{\prime \prime}\\ \operatorname {hd}(\tau^{\prime},\tau^{\prime \prime}) = 1}}\| Q^{(\tau^{\prime})}\wedge Q^{(\tau^{\prime \prime})}\|_{1}  .
$$
We are left to evaluate the right-hand side of the above inequality. We can use the following known relations that hold for any two distributions  $P$  and  $Q$  over  $\mathcal{Z}^T$  [Tsybakov, 2008]:
$$
\| P \wedge Q \| _ {1} = 1 - \frac {1}{2} \| P - Q \| _ {1}, \quad \| P - Q \| _ {1} \leq \sqrt {2 \mathrm {K L} (P , Q)} \tag {20}
$$