SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \mathcal {R} _ {T} \left(\left(g ^ {*}, \theta_ {0} ^ {*}, \theta_ {1} ^ {*}\right), x _ {1: T}, y _ {1: T}, \mathcal {Q} ^ {\mathrm {V C}}\right) - \log m _ {\epsilon} - 2 \log n \\ \leq \sum_ {j \in \{0, 1 \}} \log \left(\left( \begin{array}{c} n _ {j} (g _ {i ^ {*}}; x _ {1: T}) \\ k _ {j} (g _ {i ^ {*}}; x _ {1: T}, y _ {1: T}) \end{array} \right) (\theta_ {j} ^ {*}) ^ {k _ {j} (g ^ {*}; x _ {1: T}, y _ {1: T})} (1 - \theta_ {j} ^ {*}) ^ {n _ {j} (g ^ {*}; x _ {1: T}) - k _ {j} (g ^ {*}; x _ {1: T}, y _ {1: T})}\right) \\ = \sum_ {j \in \{0, 1 \}} \log \left(\binom {n _ {j} (g _ {i ^ {*}}; x _ {1: T})} {k _ {j} (g _ {i ^ {*}}; x _ {1: T}, y _ {1: T})}\right) \binom {n _ {j} (g ^ {*}; x _ {1: T})} {k _ {j} (g ^ {*}; x _ {1: T}, y _ {1: T})} ^ {- 1}. \\ \end{array}
$$
$$
\begin{array}{l} \left. \binom {n _ {j} \left(g ^ {*}; x _ {1: T}\right)} {k _ {j} \left(g ^ {*}; x _ {1: T}, y _ {1: T}\right)} \left(\theta_ {j} ^ {*}\right) ^ {k _ {j} \left(g ^ {*}; x _ {1: T}, y _ {1: T}\right)} \left(1 - \theta_ {j} ^ {*}\right) ^ {n _ {j} \left(g ^ {*}; x _ {1: T}\right) - k _ {j} \left(g ^ {*}; x _ {1: T}, y _ {1: T}\right)}\right) \\ \leq \sum_ {j \in \{0, 1 \}} \log \left(\binom {n _ {j} \left(g _ {i ^ {*}}; x _ {1: T}\right)} {k _ {j} \left(g _ {i ^ {*}}; x _ {1: T}, y _ {1: T}\right)} \binom {n _ {j} \left(g ^ {*} ; x _ {1: T}\right)} {k _ {j} \left(g ^ {*} ; x _ {1: T}, y _ {1: T}\right)} ^ {- 1}\right) \tag {9} \\ \end{array}
$$
where (9) follows since for any natural numbers  $k \leq n$  and  $\theta \in [0,1]$  we have  $\binom{n}{k}\theta^{k}(1-\theta)^{n-k} \leq 1$ . Now, note that
$$
\begin{array}{l} \log \frac {\binom {n} {k}}{\binom {n ^ {\prime}} {k ^ {\prime}}} = \log \frac {n !}{n ^ {\prime} !} + \log \frac {k ^ {\prime} !}{k !} + \log \frac {(n ^ {\prime} - k ^ {\prime}) !}{(n - k) !} \\ \leq \log \frac {(n ^ {\prime} + | n - n ^ {\prime} |) !}{n ^ {\prime} !} + \log \frac {(k + | k - k ^ {\prime} |) !}{k !} + \log \frac {((n - k) + | n - n ^ {\prime} | + | k - k ^ {\prime} |) !}{(n - k) !} \\ \end{array}
$$
If  $|k - k'|, |n - n'| \leq \delta$ , and  $\max \{n, n'\} \leq N$  then by for example [Bhatt and Kim, 2021, Proposition 6] we have that
$$
\begin{array}{l} \log \frac {\binom {n} {k}}{\binom {n ^ {\prime}} {k ^ {\prime}}} \leq 2 \delta \log (n ^ {\prime} + 2 \delta) + 2 \delta \log (k + 2 \delta) + 4 \delta \log ((n - k) + 4 \delta) \\ \leq 1 6 \delta \log N. \tag {10} \\ \end{array}
$$
We now wish to use this bound in (9). For this, we will recall the definitions of  $n_0(g;x_{1:T})$  and  $k_0(g;x_{1:T},y_{1:T})$  for a particular function  $g$  and observe that for two functions  $g,g^{\prime}$  we have that both  $|n_0(g;x_{1:T}) - n_0(g';x_{1:T})|,|k_0(g;x_{1:T},y_{1:T}) - k_0(g';x_{1:T},y_{1:T})|\leq d_H(g(x_{1:T}),g'(x_{1:T}))$  where  $d_H(\cdot ,\cdot)$  denotes the Hamming distance and  $g(x_{1:T}):= (g(x_1),\ldots ,g(x_T))\in \{0,1\} ^T$ . Thus, by using (10) in (9) with  $\delta = d_H(g^* (x_{1:T}),g_i^* (x_{1:T}))$ ,  $N = T$ , we get
$$
\mathcal {R} _ {T} \left(\left(g ^ {*}, \theta_ {0} ^ {*}, \theta_ {1} ^ {*}\right), x _ {1: T}, y _ {1: T}, \mathcal {Q} ^ {\mathrm {V C}}\right) \leq \log m _ {\epsilon} + 2 \log T + 3 2 d _ {H} \left(g ^ {*} \left(x _ {1: T}\right), g _ {i ^ {*}} \left(x _ {1: T}\right)\right) \log T. \tag {11}
$$
Note that (11) has effectively removed any dependence on  $y, \theta_0^*, \theta_1^*$ . We then have for some absolute constant  $C$ , (recalling the definition of  $i^*$  and  $\mathcal{F}$  from earlier)
$$
\mathcal {R} _ {T} \left(\mathcal {F}, \sigma , \mathcal {Q} ^ {\mathrm {V C}}\right) \leq C \log m _ {\epsilon} + C \log T \max  _ {\mathcal {D}: \sigma - \text {s m o o t h e d}} \mathbb {E} \left[ \sup  _ {g ^ {*} \in \mathcal {G}} \min  _ {i \in [ m _ {\epsilon} ]} d _ {H} \left(g ^ {*} \left(X _ {1: T}\right), g _ {i} \left(X _ {1: T}\right)\right) \right]. \tag {12}
$$
Finally, we can control the last term in (12) by the following result, which follows from the coupling lemma and variance sensitive upper bounds on suprema over VC classes.
Lemma D.3 (Lemma 3.3 of Haghtalab et al. [2021]).
$$
\mathbb {E} \left[ \sup  _ {g ^ {*} \in \mathcal {G}} \min  _ {i \in [ m ]} d _ {H} (g ^ {*} (X _ {1: T}), g _ {i} (X _ {1: T})) \right] \leq \sqrt {\frac {\epsilon}{\sigma} T \log T d \log \left(\frac {1}{\epsilon}\right)} + T \log T \frac {\epsilon}{\sigma}
$$
Plugging the above into (12) and taking  $\epsilon = \frac{\sigma}{T^2}$  gives us
$$
\mathcal {R} _ {T} (\mathcal {F}, \sigma , \mathcal {Q} ^ {\mathrm {V C}}) \leq O \left(d \log \left(\frac {T}{\sigma}\right)\right).
$$
E Proof of Lemma 4.2
Proof. Note that this proof holds for general loss functions. Let  $\mathcal{R}_T$  denote the regret.
$$
\begin{array}{l} \mathcal {R} _ {T} \leq \mathbb {E} \left[ \sum_ {i = 1} ^ {T} \ell \left(h _ {t}, s _ {t}\right) - \inf  _ {h \in \mathcal {F}} \sum_ {i = 1} ^ {T} \ell \left(h, s _ {t}\right) \right] \\ = \mathbb {E} \left[ \sum_ {i = 1} ^ {T} \ell (h _ {t}, s _ {t}) - \sum_ {t = 1} ^ {T} \ell (h _ {t + 1}, s _ {t}) + \sum_ {t = 1} ^ {T} \ell (h _ {t + 1}, s _ {t}) - \inf _ {h \in \mathcal {F}} \sum_ {i = 1} ^ {T} \ell (h, s _ {t}) \right] \\ \end{array}
$$
$$
= \mathbb {E} \left[ \sum_ {i = 1} ^ {T} \ell (h _ {t}, s _ {t}) - \sum_ {t = 1} ^ {T} \ell (h _ {t + 1}, s _ {t}) \right] + \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \ell (h _ {t + 1}, s _ {t}) - \inf _ {h \in \mathcal {F}} \sum_ {i = 1} ^ {T} \ell (h, s _ {t}) \right]
$$
Let us focus on the second term.
$$
\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \ell (h _ {t + 1}, s _ {t}) - \inf _ {h \in \mathcal {F}} \sum_ {i = 1} ^ {T} \ell (h, s _ {t}) \right] \\ \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \ell \left(h _ {t + 1}, s _ {t}\right) - \inf  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {i = 1} ^ {T} \ell \left(h, s _ {t}\right) + \inf  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {i = 1} ^ {T} \ell \left(h, s _ {t}\right) - \inf  _ {h \in \mathcal {F}} \sum_ {i = 1} ^ {T} \ell \left(h, s _ {t}\right) \right] \\ \leq 2 \alpha T + \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \ell \left(h _ {t + 1}, s _ {t}\right) - \inf  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {i = 1} ^ {T} \ell \left(h, s _ {t}\right) \right] (13) \\ \leq 2 \alpha T + \mathbb {E} \left[ \sum_ {t = 1} ^ {N} \ell \left(h _ {t}, \tilde {s} _ {t}\right) - \ell \left(h ^ {*}, \tilde {s} _ {t}\right) \right] (14) \\ \leq 2 \alpha T + \mathbb {E} \left[ \sup  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {t = 1} ^ {N} \ell (h, \tilde {s} _ {t}) - \ell \left(h ^ {*}, \tilde {s} _ {t}\right) \right] \\ \end{array}
$$
where  $h^{*} = \inf_{h\in \mathcal{F}_{\alpha}}\sum_{i = 1}^{T}\ell (h,s_{t})$ . (13) follows by comparing the optimal of the truncated class with the whole class, see [Cesa-Bianchi and Lugosi, 2006, Lemma 9.5]. (14) follows from the Be-the-leader lemma Cesa-Bianchi and Lugosi [2006].
F Proof of Lemma 4.3
Denote by  $R^{(t)} = (N^{(t)}, \{\widetilde{s}_i\}_{i \in N^{(t)}})$  the fresh randomness generated at the beginning of time  $t$ , which is independent of  $\{s_\tau\}_{\tau < t}$  generated by the adversary. Let  $Q_t$  be the distribution of the learner's action  $h_t \in \mathcal{H}$  in Algorithm 1, Formally,
$$
r ^ {t} (x) = \sum_ {i = 1} ^ {N ^ {(t + 1)}} \widetilde {y} _ {i} ^ {(t + 1)} \cdot {\bf 1} (\widetilde {x} _ {i} ^ {(t + 1)} = x) + \sum_ {\tau = 1} ^ {t} y _ {\tau} \cdot {\bf 1} (x _ {\tau} = x).
$$
Let  $\mathcal{P}^t$  be the distribution of  $r^t$ . The reason why we introduce this notion is that  $h_t$  in Algorithm 1 only depends on the vector  $r^{t-1}$ .
The main step in the proof is to introduce an independent sample from the distribution  $\mathcal{D}_t$  in order to decouple the dependence of the distribution  $\mathcal{Q}_{t + 1}$  on the test point  $s_t$ .
$$
\begin{array}{l} \underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t} \sim \mathcal {Q} _ {t}} {\mathbb {E}} \left[ \ell \left(h _ {t}, s _ {t}\right) \right] - \underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t}\right) \right] \\ = \underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t} \sim \mathcal {Q} _ {t}} {\mathbb {E}} \left[ \ell \left(h _ {t}, s _ {t}\right) \right] - \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) \right] \\ + \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) \right] - \underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t}\right) \right] (15) \\ = \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t} \sim \mathcal {Q} _ {t}} {\mathbb {E}} \left[ \ell \left(h _ {t}, s _ {t} ^ {\prime}\right) \right] - \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathbb {E} _ {s _ {t} \sim \mathcal {D} _ {t}} \left[ \mathcal {Q} _ {t + 1} \right]} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) \right] (16) \\ + \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) \right] - \underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {h _ {t + 1} \sim \mathcal {Q} _ {t + 1}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t}\right) \right] \\ \end{array}
$$
where we get (15) by adding and subtracting the middle term corresponding to evaluating the loss on an independent sample  $s_t'$  and (16) by observing that  $s_t$  and  $s_t'$  are equally distributed. Since the second term is the same in the required equation, we can focus on the first term.
$$
\underset {h _ {t} \sim \mathcal {Q} _ {t}} {\mathbb {E}} \left[ \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \left[ \ell \left(h _ {t}, s _ {t} ^ {\prime}\right) \right] \right] - \underset {h _ {t + 1} \sim \widetilde {\mathcal {Q}} _ {t + 1}} {\mathbb {E}} \left[ \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) \right] \right]. \tag {17}
$$
Here we use the notation  $\widetilde{\mathcal{Q}_{t + 1}} = \mathbb{E}_{s_t\sim \mathcal{D}_t}[\mathcal{Q}_{t + 1}]$  for the mixture distribution. In order to bound this, we look a variational interpretation of the  $\chi^2$  distance between two distributions  $P$  and  $Q$ .
Lemma F.1 (Hammersley-Chapman-Robbins bound). For any pair of measures  $P$  and  $Q$  and any measurable function  $h: \mathcal{X} \to \mathbb{R}$ , we have
$$
\begin{array}{l} \left| \mathbb {E} _ {X \sim P} [ h (X) ] - \mathbb {E} _ {X \sim Q} [ h (X) ] \right| \leq \sqrt {\chi^ {2} (P , Q) \cdot \operatorname {V a r} _ {X \sim Q} (h (X))} \\ \leq \sqrt {\frac {1}{2} \chi^ {2} (P , Q) \cdot \mathbb {E} _ {X , X ^ {\prime} \sim Q} \left(h (X) - h (X ^ {\prime})\right) ^ {2}}. \\ \end{array}
$$
Applying this to (17), we get
$$
\begin{array}{l} \underset {h _ {t} \sim \mathcal {Q} _ {t}} {\mathbb {E}} \left[ \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \left[ \ell (h _ {t}, s _ {t} ^ {\prime}) \right] \right] - \underset {h _ {t + 1} \sim \widetilde {\mathcal {Q} _ {t + 1}}} {\mathbb {E}} \left[ \underset {s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \left[ \ell (h _ {t + 1}, s _ {t} ^ {\prime}) \right] \right] \\ \leq \sqrt {\frac {1}{2} \chi^ {2} (\underset {s _ {t} \sim \mathcal {D} _ {t}} {\mathbb {E}} [ \mathcal {Q} _ {t + 1} ] , \mathcal {Q} _ {t}) \cdot \mathbb {E} _ {h _ {t} , h _ {t} ^ {\prime} \sim \mathcal {Q} _ {t}} \left(\mathbb {E} _ {s _ {t} \sim \mathcal {D} _ {t}} \left[ \ell (h _ {t} , s _ {t}) - \ell (h _ {t} ^ {\prime} , s _ {t}) \right]\right) ^ {2}}. \\ \end{array}
$$
as required. As noted before, for the particular use in our analysis a simpler version of the lemma similar to Haghtalab et al. [2022] suffices but we include the general version since we believe such a version is useful in providing improved regret bounds for the problem.
G Upper Bounding  $\chi^2$  Distance: Proof of Lemma 4.4
In this section, we will focus on bounding the  $\chi^2$  distance between the distribution of actions at time steps. The reasoning in this section closely follows Haghtalab et al. [2022]. We reproduce it here for completeness.
We assume that  $\mathcal{X}$  is discrete. Define
$$
n _ {0} (x) = \sum_ {i = 1} ^ {N} \mathbf {1} (\widetilde {x} _ {i} = x, \widetilde {y} _ {i} = 0) \quad \text {a n d} \quad n _ {1} (x) = \sum_ {i = 1} ^ {N} \mathbf {1} (\widetilde {x} _ {i} = x, \widetilde {y} _ {i} = 1).
$$
As each  $\widetilde{x}_i$  is uniformly distributed on  $\mathcal{X}$  and  $\widetilde{y}_i\sim \mathcal{U}(\{0,1\})$ , by the subsampling property of the Poisson distribution, the  $2|\mathcal{X}|$  random variables  $\{n_0(x),n_1(x)\}_{x\in \mathcal{X}}$  are i.i.d. distributed as  $\mathrm{Poi}(n / 2|\mathcal{X}|)$ .
Since the historic data is only a translation, it suffices to consider the distributions at time  $t = 0$  and  $t = 1$ . Let  $n_0^1 (x) = n_0(x) + \mathbf{1}(x_1 = x,y_1 = 0)$  with  $n_1^1$  defined similarly. Let  $P$  and  $Q$  be the probability distributions of  $\{n_0(x),n_1(x)\}_{x\in \mathcal{X}}$  and  $\{n_0^1 (x),n_1^1 (x)\}_{x\in \mathcal{X}}$ , respectively. Note that the output of the oracle depends only on this vector and thus by the data processing inequality it suffices to bound  $\chi^2 (P,Q)$ .
Note that the distribution  $P$  is a product Poisson distribution:
$$
P (\{n _ {0} (x), n _ {1} (x) \}) = \prod_ {x \in \mathcal {X}} \prod_ {y \in \{0, 1 \}} \mathbb {P} (\operatorname {P o i} (n / 2 | \mathcal {X} |) = n _ {y} (x)).
$$
As for the distribution  $Q$ , it could be obtained from  $P$  in the following way: the smooth adversary draws  $x^{\star} \sim \mathcal{D}$ , independent of  $\{n_0(x), n_1(x)\}_{x \in \mathcal{X}} \sim P$ , for some  $\sigma$ -smooth distribution  $\mathcal{D} \in \Delta_{\sigma}(\mathcal{X})$ . He then chooses a label  $y^{\star} = y(x^{\star}) \in \{0, 1\}$  as a function of  $x^{\star}$ , and sets
$$
n _ {y (x ^ {\star})} ^ {1} (x ^ {\star}) = n _ {y (x ^ {\star})} (x ^ {\star}) + 1, \qquad \text {a n d} \qquad n _ {y} ^ {1} (x) = n _ {y} (x), \quad \forall (x, y) \neq (x ^ {\star}, y (x ^ {\star})).
$$
Consequently, given a  $\sigma$ -smooth distribution  $\mathcal{D}$  and a labeling function  $y:\mathcal{X}\to \{0,1\}$  used by the adversary, the distribution  $Q$  is a mixture distribution  $Q = \mathbb{E}_{x^{\star}\sim \mathcal{D}^{\mathcal{X}}}[Q_{x^{\star}}]$ , with
$$
Q _ {x ^ {\star}} (\{n _ {0} ^ {1} (x), n _ {1} ^ {1} (x) \}) = \mathbb {P} (\operatorname {P o i} (n / 2 | \mathcal {X} |) = n _ {y (x ^ {\star})} (x ^ {\star}) - 1) \times \prod_ {(x, y) \neq (x ^ {\star}, y (x ^ {\star}))} \mathbb {P} (\operatorname {P o i} (n / 2 | \mathcal {X} |) = n _ {y} (x)).
$$
We will use the Ingster method to control the  $\chi^2$  between the mixture distribution  $Q$  and the base distribution  $P$ .
Lemma G.1 (Ingster's  $\chi^2$  method). For a mixture distribution  $\mathbb{E}_{\theta \sim \pi}[Q_{\theta}]$  and a generic distribution  $P$ , the following identity holds:
$$
\chi^ {2} \left(\underset {\theta \sim \pi} {\mathbb {E}} [ Q _ {\theta} ], P\right) = \underset {\theta , \theta^ {\prime} \sim \pi} {\mathbb {E}} \left[ \underset {x \sim P} {\mathbb {E}} \left(\frac {Q _ {\theta} (x) Q _ {\theta^ {\prime}} (x)}{P (x) ^ {2}}\right) \right] - 1,
$$
where  $\theta^{\prime}$  is an independent copy of  $\theta$
Let  $x_1^\star, x_2^\star$  be an arbitrary pair of instance. Using the closed-form expressions of distributions  $P$  and  $Q_{x^{\star}}$ , it holds that
$$
\frac {Q _ {x _ {1} ^ {\star}} Q _ {x _ {2} ^ {\star}}}{P ^ {2}} = \frac {2 | \mathcal {X} | n _ {y (x _ {1} ^ {\star})} (x _ {1} ^ {\star})}{n} \cdot \frac {2 | \mathcal {X} | n _ {y (x _ {2} ^ {\star})} (x _ {2} ^ {\star})}{n}.
$$
Using the fact that  $\{n_0(x), n_1(x)\}_{x \in \mathcal{X}}$  are i.i.d. distributed as  $\mathrm{Poi}(n/2|\mathcal{X}|)$  under  $P$ , we have
$$
\underset {\{n _ {0} (x), n _ {1} (x) \} \sim P} {\mathbb {E}} \left(\frac {Q _ {x _ {1} ^ {\star}} (\{n _ {0} ^ {1} (x) , n _ {1} ^ {1} (x) \}) Q _ {x _ {2} ^ {\star}} (\{n _ {0} ^ {1} (x) , n _ {1} ^ {1} (x) \})}{P (\{n _ {0} (x) , n _ {1} (x) \}) ^ {2}}\right) = 1 + \frac {2 | \mathcal {X} |}{n} \cdot \mathbf {1} (x _ {1} ^ {\star} = x _ {2} ^ {\star}).
$$
We will use the fact that the probability of collision between two independent draws  $x_{1}^{\star}, x_{2}^{\star} \sim \mathcal{D}$  is small. That is using the Lemma G.1, we have
$$
\begin{array}{l} \sqrt {\frac {\chi^ {2} (Q , P)}{2}} = \sqrt {\frac {\chi^ {2} (\mathbb {E} _ {x ^ {\star} \sim \mathcal {D}} [ Q _ {x ^ {\star}} ] , P)}{2}} = \sqrt {\frac {| \mathcal {X} |}{n} \cdot \underset {x _ {1} ^ {\star} , x _ {2} ^ {\star} \sim \mathcal {D}} {\mathbb {E}} [ \mathbf {1} (x _ {1} ^ {\star} = x _ {2} ^ {\star}) ]} \\ = \sqrt {\frac {| \mathcal {X} |}{n} \sum_ {x \in \mathcal {X}} \mathcal {D} (x) ^ {2}} \leq \sqrt {\frac {| \mathcal {X} |}{n} \sum_ {x \in \mathcal {X}} \mathcal {D} (x) \cdot \frac {1}{\sigma | \mathcal {X} |}} = \frac {1}{\sqrt {\sigma n}}, \\ \end{array}
$$
where the last inequality follows from the definition of a  $\sigma$ -smooth distribution.
H Upper Bounding Generalization Error: Proof of Lemma 4.5
The proof of the theorem is similar to the [Haghtalab et al., 2022, Section 4.2.2]. In our setting, we need to deal with general losses. We shall need the following property of smooth distributions which is a slightly strengthened version of the coupling lemma in Theorem 2.1 shown in Haghtalab et al. [2022].
Lemma H.1. Let  $X_{1},\dots ,X_{m}\sim Q$  and  $P$  be another distribution with a bounded likelihood ratio:  $dP / dQ\leq 1 / \sigma$  . Then using external randomness  $R$  , there exists an index  $I = I(X_{1},\dots ,X_{m},R)\in$ $[m]$  and a success event  $E = E(X_{1},\dots ,X_{m},R)$  such that  $\operatorname *{Pr}[E^c ]\leq (1 - \sigma)^m$  , and
$$
(X _ {I} \mid E, X _ {\backslash I}) \sim P.
$$
Fix any realization of the Poissonized sample size  $N \sim \mathrm{Poi}(n)$ . Choose  $m$  in Lemma H.1. Since for any  $\sigma$ -smooth  $\mathcal{D}_t$ , it holds that
$$
\frac {\mathcal {D} _ {t} (s)}{\mathcal {U} (\mathcal {X} \times \{0 , 1 \}) (s)} = \frac {\mathcal {D} _ {t} (x)}{\mathcal {U} (\mathcal {X}) (x)} \cdot \frac {\mathcal {D} _ {t} (y \mid x)}{\mathcal {U} (\{0 , 1 \}) (y)} \leq \frac {2}{\sigma},
$$
the premise of Lemma H.1 holds with parameter  $\sigma /2$  for  $P = \mathcal{D}_t, Q = \mathcal{U}(\mathcal{X}\times \{0,1\})$ . Consequently, dividing the self-generated samples  $\widetilde{s}_1,\dots ,\widetilde{s}_N$  into  $N / m$  groups each of size  $m$ , and running the procedure in Lemma H.1, we arrive at  $N / m$  independent events  $E_{1},\dots ,E_{N / m}$ , each with probability at least  $1 - (1 - \sigma /2)^{m}\geq 1 - T^{-2}$ . Moreover, conditioned on each  $E_{j}$ , we can pick an element  $u_{j}\in \{\widetilde{s}_{(j - 1)m + 1},\dots ,\widetilde{s}_{jm}\}$  such that
$$
(u _ {j} \mid E _ {j}, \{\widetilde {s} _ {(j - 1) m + 1}, \dots , \widetilde {s} _ {j m} \} \backslash \{u _ {j} \}) \sim \mathcal {D} _ {t}.
$$
For notational simplicity we denote the set of unpicked samples  $\{\widetilde{s}_{(j - 1)m + 1},\dots ,\widetilde{s}_{jm}\} \backslash \{u_j\}$  by  $v_{j}$ . As a result, thanks to the mutual independence of different groups and  $s_t\sim \mathcal{D}_t$  conditioned on  $s_{1:t - 1}$  (note that we draw fresh randomness at every round), for  $E\triangleq \cap_{j\in [N / m]}E_{j}$  we have
$$
\left(u _ {1}, \dots , u _ {N / m}, s _ {t}\right) \mid \left(E, s _ {1: t - 1}, v _ {1}, \dots , v _ {N / m}\right) \stackrel {\mathrm {i d}} {\sim} \mathcal {D} _ {t}.
$$
Let us denote  $h_{t + 1} = O_{t + 1}(\widetilde{s}_1,\dots ,\widetilde{s}_N,s_{1:t - 1},s_t)$  the output of the algorithm at time  $t$  when  $\widetilde{s}_1,\dots ,\widetilde{s}_N$  denotes the hallucinated data points and  $s_{1:t - 1},s_t$  denotes the observed data points. We will use the fact that  $O_{t + 1}$  is a permutation invariant function. Consequently, for each  $j\in [N / m]$  we have
$$
\begin{array}{l} \underset {s _ {t} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t}\right) \mid E \right] \\ = \underset {s _ {t} \sim \mathcal {D} _ {t}, \widetilde {s} _ {1}, \dots , \widetilde {s} _ {N}} {\mathbb {E}} \left[ \ell \left(O _ {t + 1} \left(\widetilde {s} _ {1}, \dots , \widetilde {s} _ {N}, s _ {1: t - 1}, s _ {t}\right), s _ {t}\right) \mid E \right] \\ = \mathbb {E} _ {v, s _ {1: t - 1} | E} \left(\mathbb {E} _ {s _ {t}, u _ {1}, \dots , u _ {N / m}} \left[ \ell \left(O _ {t + 1} \left(s _ {1: t - 1}, v, u _ {1}, \dots , u _ {N / m}, s _ {t}\right), s _ {t}\right) \mid E, s _ {1: t - 1}, v \right]\right) \\ = \mathbb {E} _ {v, s _ {1: t - 1} | E} \left(\mathbb {E} _ {s _ {t}, u _ {1}, \dots , u _ {N / m}} \left[ \ell \left(O _ {t + 1} \left(s _ {1: t - 1}, v, u _ {1}, \dots , u _ {j - 1}, s _ {t}, u _ {j + 1}, \dots , u _ {N / m}, u _ {j}\right), u _ {j}\right) \mid E (k 8) _ {t - 1}, v \right]\right) \\ = \mathbb {E} _ {v, s _ {1: t - 1} | E} \left(\mathbb {E} _ {s _ {t}, u _ {1}, \dots , u _ {N / m}} [ \ell \left(O _ {t + 1} \left(s _ {1: t - 1}, v, u _ {1}, \dots , u _ {N / m}, s _ {t}\right), u _ {j}\right) \mid E, s _ {1: t - 1}, v ]\right) \tag {19} \\ = \underset {s _ {t} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} [ \ell (h _ {t + 1}, u _ {j}) \mid E ], \\ \end{array}
$$
where (18) follows from the conditional iid (and thus exchangeable) property of  $(u_{1},\dots ,u_{N / m},s_{t})$  after the conditioning, and (19) is due to the invariance of the  $O_{t + 1}$  after any permutation of the inputs. On the other hand, if  $s_t^\prime ,u_1^\prime ,\dots ,u_{N / m}^\prime$  are independent copies of  $s_t\sim \mathcal{D}_t$ , by independence it is clear that
$$
\underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} [ \ell (h _ {t + 1}, s _ {t} ^ {\prime}) \mid E ] = \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} [ \ell (h _ {t + 1}, u _ {j} ^ {\prime}) \mid E ], \quad \forall j \in [ N / m ].
$$
Consequently, using the shorthand  $u_0 = s_t$ ,  $u_0' = s_t'$ , we have
$$
\begin{array}{l} \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} \left[ \ell \left(h _ {t + 1}, s _ {t} ^ {\prime}\right) - \ell \left(h _ {t + 1}, s _ {t}\right) \mid E \right] \\ = \frac {1}{N / m + 1} \underset {s _ {t}, s _ {t} ^ {\prime} \sim \mathcal {D} _ {t}, R ^ {(t + 1)}} {\mathbb {E}} \left[ \sum_ {j = 0} ^ {N / m} \left(\ell \left(h _ {t + 1}, u _ {j} ^ {\prime}\right) - \ell \left(h _ {t + 1}, u _ {j}\right)\right) \Bigg | E \right] \\ \leq \frac {1}{N / m + 1} \underset {u _ {0}, \dots , u _ {N / m}, u _ {0} ^ {\prime}, \dots , u _ {N / m} ^ {\prime} \sim \mathcal {D} _ {t}} {\mathbb {E}} \left[ \sup  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {j = 0} ^ {N / m} \left(\ell \left(h, u _ {j} ^ {\prime}\right) - \ell \left(h, u _ {j}\right)\right) \right] \\ \leq \frac {2 \alpha}{N / m + 1} \underset {u _ {0}, \dots , u _ {N / m} \sim \mathcal {D} _ {t}} {\mathbb {E}} \underset {\epsilon_ {1} \dots \epsilon_ {N / m}} {\mathbb {E}} \left[ \sup  _ {h \in \mathcal {F} _ {\alpha}} \sum_ {j = 0} ^ {N / m} \epsilon_ {j} h (u _ {j}) \right] \\ \leq \frac {1}{\alpha} \operatorname {R a d} \left(\mathcal {F} _ {\alpha}, N / m\right). \\ \end{array}
$$
The last inequality uses the fact that the algorithm always outputs a function in  $\mathcal{F}_{\alpha}$ . Further, we have used the Ledoux-Talagrand contraction inequality.