SlowGuess/NeurIPS_2023_OCR huggingface dataset:
The strong learning rule  $A^{\star}$  is obtained by simulating the weak learner  $A$  on  $O(\log m / \gamma^{2})$  samples of constant size  $k$  (which are carefully sampled from the original input sample  $S$ ). Then,  $A^{\star}$  returns an aggregated hypothesis – the majority vote of the outputs of  $A$ . As it turns out,  $A^{\star}$  satisfies logarithmic KL-stability with respect to the prior  $\mathcal{P}^{\star}$  that is a mixture of majority votes of the original prior  $\mathcal{P}$ . The analysis involves a reduction to regret analysis of online learning using expert advice, and also uses properties of the KL-divergence.
3.1 Divergences
The Rényi  $\alpha$ -divergence is a measure of dissimilarity between distributions that generalizes many common dissimilarity measures, including the Bhattacharyya coefficient ( $\alpha = 1/2$ ), the Kullback-Leibler divergence ( $\alpha = 1$ ), the log of the expected ratio ( $\alpha = 2$ ), and the log of the maximum ratio ( $\alpha = \infty$ ).
Definition 3.1 (Rényi divergence; [Rény61, vEH14]). Let  $\alpha \in (1, \infty)$ . The Rényi divergence of order  $\alpha$  of the distribution  $\mathcal{P}$  from the distribution  $\mathcal{Q}$  is
$$
\mathrm {D} _ {\alpha} (\mathcal {P} \parallel \mathcal {Q}) = \frac {1}{\alpha - 1} \log \left(\mathbb {E} _ {x \sim \mathcal {P}} \left[ \left(\frac {\mathcal {P} (x)}{\mathcal {Q} (x)}\right) ^ {\alpha - 1} \right]\right).
$$
For  $\alpha = 1$  and  $\alpha = \infty$  the Rényi divergence is extended by taking a limit. In particular, the limit  $\alpha \to 1$  gives the Kullback-Leibler divergence,
$$
\mathrm {D} _ {1} (\mathcal {P} \parallel \mathcal {Q}) = \mathbb {E} _ {x \sim \mathcal {P}} \left[ \log \frac {\mathcal {P} (x)}{\mathcal {Q} (x)} \right] = \mathrm {K L} (\mathcal {P} \parallel \mathcal {Q}),
$$
$$
D _ {\infty} (\mathcal {P} \parallel \mathcal {Q}) = \log \left(\operatorname * {e s s} _ {\mathcal {P}} \sup  \frac {\mathcal {P} (x)}{\mathcal {Q} (x)}\right),
$$
with the conventions that  $0 / 0 = 0$  and  $x / 0 = \infty$  for  $x > 0$ .
3.2 Learning Theory
We use standard notation from statistical learning (e.g., [SB14]). Given a hypothesis  $h: \mathcal{X} \to \{0,1\}$ , the empirical loss of  $h$  with respect to a sample  $S = \{(x_1,y_1),\ldots ,(x_m,y_m)\}$  is defined as  $\mathrm{L}_S(h) = \frac{1}{m}\sum_{i = 1}^{m}\mathbb{1}[h(x_i)\neq y_i]$ . A learning rule  $A$  is interpolating if for every input sample  $S$ ,  $\mathbb{P}_{h\sim A(S)}[\mathrm{L}_S(h) = 0] = 1$ . The population loss of  $h$  with respect to a population distribution  $\mathcal{D}$  over  $\mathcal{X} \times \{0,1\}$  is defined as  $\mathrm{L}_{\mathcal{D}}(h) = \mathbb{P}_{(x,y)\sim \mathcal{D}}[h(x)\neq y]$ . A population  $\mathcal{D}$  over labeled examples is realizable with respect to a class  $\mathcal{H}$  if  $\inf_{h\in \mathcal{H}}\mathrm{L}_{\mathcal{D}}(h) = 0$ . We denote the set of all realizable population distributions of a class  $\mathcal{H}$  by Realizable  $(\mathcal{H})$ . Given a learning rule  $A$  and an input sample  $S$  of size  $m$ , the population loss of  $A(S)$  with respect to a population  $\mathcal{D}$  is defined as  $\mathbb{E}_{h\sim A(S)}[\mathrm{L}_{\mathcal{D}}(h)]$ .
A hypothesis class  $\mathcal{H}$  is Probably Approximately Correct (PAC) learnable if there exists a learning rule  $A$  such that for all  $\mathcal{D} \in \mathrm{Realizable}(\mathcal{H})$  and for all  $m \in \mathbb{N}$ , we have  $\mathbb{E}_{S \sim \mathcal{D}^m}[\mathrm{L}_{\mathcal{D}}(A(S))] \leq \varepsilon(m)$ , where  $\lim_{m \to \infty} \varepsilon(m) = 0$ .
Theorem 3.2 (PAC-Bayes Bound; [McA99, LSM01, McA03]; Theorem 31.1 in [SB14]). Let  $\mathcal{X}$  be a set, let  $\mathcal{H} \subseteq \{0,1\}^{\mathcal{X}}$ , and let  $\mathcal{D} \in \Delta(\mathcal{X} \times \{0,1\})$ . For any  $\beta \in (0,1)$  and for any  $\mathcal{P} \in \Delta(\mathcal{H})$
$$
\underset {S \sim \mathcal {D} ^ {m}} {\mathbb {P}} \left[ \forall \mathcal {Q} \in \Delta (\mathcal {H}): \mathrm {L} _ {\mathcal {D}} (\mathcal {Q}) \leq \mathrm {L} _ {S} (\mathcal {Q}) + \sqrt {\frac {\mathrm {K L} (\mathcal {Q} \| \mathcal {P}) + \ln (m / \beta)}{2 (m - 1)}} \right] \geq 1 - \beta .
$$
3.3 Definitions of Stability
Throughout the following section, let  $\mathcal{X}$  be a set called the domain, let  $\mathcal{H} \subseteq \{0,1\}^{\mathcal{X}}$  be a hypothesis class, and let  $m \in \mathbb{N}$  be a sample size. A randomized learning rule, or a learning rule for short, is a function  $A: (\mathcal{X} \times \{0,1\})^{*} \to \Delta(\{0,1\}^{\mathcal{X}})$  that takes a training sample and outputs a distribution over hypotheses. A population distribution is a distribution  $\mathcal{D} \in \Delta(\mathcal{X} \times \{0,1\})$  over labeled domain elements, and a prior distribution is a distribution  $\mathcal{P} \in \Delta(\{0,1\}^{\mathcal{X}})$  over hypotheses.
3.3.1 Differential Privacy
Differential privacy is a property of an algorithm that guarantees that the output will not reveal any meaningful amount of information about individual people that contributed data to the input (training data) used by the algorithm. See [DR14] for an introduction.
Definition 3.3. Let  $\varepsilon, \delta \in \mathbb{R}_{\geq 0}$ , and let  $\mathcal{P}$  and  $\mathcal{Q}$  be two probability measures over a measurable space  $(\Omega, \mathcal{F})$ . We say that  $\mathcal{P}$  and  $\mathcal{Q}$  are  $(\varepsilon, \delta)$ -indistinguishable and write  $\mathcal{P} \approx_{\varepsilon, \delta} \mathcal{Q}$ , if for every event  $\mathcal{O} \in \mathcal{F}$ ,  $\mathcal{P}(\mathcal{O}) \leq e^{\varepsilon} \cdot \mathcal{Q}(\mathcal{O}) + \delta$  and  $\overline{\mathcal{Q}(\mathcal{O})} \leq e^{\varepsilon} \cdot \overline{\mathcal{P}(\mathcal{O})} + \delta$ .
Definition 3.4 (Differential Privacy; [DR14]). Let  $\varepsilon, \delta \in \mathbb{R}_{\geq 0}$ . A learning rule  $A$  is  $(\varepsilon, \delta)$ -differentially private if for every pair of training samples  $S, S' \in (\mathcal{X} \times \{0,1\})^m$  that differ on a single example,  $A(S)$  and  $A(S')$  are  $(\varepsilon, \delta)$ -indistinguishable.
Typically,  $\varepsilon$  is chosen to be a small constant (e.g.,  $\varepsilon \leq 0.1$ ) and  $\delta$  is negligible (i.e.,  $\delta(m) \leq m^{-\omega(1)}$ ). When  $\delta = 0$  we say that  $A$  satisfies pure differentially privacy.
Definition 3.5 (Private PAC Learning).  $\mathcal{H}$  is privately learnable or DP learnable if it is PAC learnable by a learning rule  $A$  which is  $(\varepsilon(m), \overline{\delta(m)})$ -differentially-private, where  $\varepsilon(m) \leq 1$  and  $\delta(m) = m^{-\omega(1)}$ .  $A$  is pure DP learnable if the same holds with  $\delta(m) = 0$ .
3.3.2  $\mathsf{D}_{\alpha}$ -Stability and KL-Stability
Definition 3.6 ( $\mathsf{D}_{\alpha}$ -Stability). Let  $\alpha \in [1,\infty]$ . Let  $A$  be a learning rule, and let  $f:\mathbb{N}\to \mathbb{R}$  and  $\beta :\mathbb{N}\rightarrow [0,1]$  satisfy  $f(m) = o(m)$  and  $\beta (m) = o(1)$ .
1. A is distribution-independent  $\underline{\mathsf{D}}_{\alpha}$ -stable if
$$
\exists \operatorname {p r i o r} \mathcal {P} \forall \operatorname {p o p u l a t i o n} \mathcal {D} \forall m \in \mathbb {N}: \mathbb {P} _ {S \sim \mathcal {D} ^ {m}} [ \mathrm {D} _ {\alpha} (A (S) \| \mathcal {P}) \leq f (m) ] \geq 1 - \beta (m).
$$
2.  $A$  is distribution-dependent  $\underline{\mathrm{D}}_{\alpha}$  -stable if
$$
\forall \operatorname {p o p u l a t i o n} \mathcal {D} \exists \operatorname {p r i o r} \mathcal {P} _ {\mathcal {D}} \forall m \in \mathbb {N}: \mathbb {P} _ {S \sim \mathcal {D} ^ {m}} \left[ \mathrm {D} _ {\alpha} (A (S) \| \mathcal {P} _ {\mathcal {D}}) \leq f (m) \right] \geq 1 - \beta (m).
$$
The function  $f$  is called the divergence bound and  $\beta$  is called the confidence. The special case of  $\alpha = 1$  is referred to as KL-stability [McA99].
3.3.3 Perfect Generalization
Definition 3.7 (One-Way Perfect Generalization). Let  $A$  be a learning rule, and let  $\beta : \mathbb{N} \to [0,1]$  satisfy  $\beta(m) = o(1)$ .
1. Let  $\varepsilon : \mathbb{N} \to \mathbb{R}$  satisfy  $\varepsilon(m) = o(m)$ . A is  $\varepsilon$ -pure perfectly generalizing with confidence  $\beta$  if
$$
\exists p r i o r \mathcal {P} \forall \text {p o p u l a t i o n} \mathcal {D} \forall m \in \mathbb {N}: \mathbb {P} _ {S \sim \mathcal {D} ^ {m}} \left[ \forall \mathcal {O}: A (S) (\mathcal {O}) \leq e ^ {\varepsilon (m)} \mathcal {P} (\mathcal {O}) \right] \geq 1 - \beta (m).
$$
2. ([CLN+16]): Let  $\varepsilon, \delta \in \mathbb{R}_{\geq 0}$ . A is  $(\varepsilon, \delta)$ -approximately perfectly generalizing with confidence  $\beta$  if
$$
\forall \operatorname {p o p u l a t i o n} \mathcal {D} \exists \operatorname {p r i o r} \mathcal {P} _ {\mathcal {D}} \forall m \in \mathbb {N}: \mathbb {P} _ {S \sim \mathcal {D} ^ {m}} [ \forall \mathcal {O}: A (S) (\mathcal {O}) \leq e ^ {\varepsilon} \mathcal {P} _ {\mathcal {D}} (\mathcal {O}) + \delta ] \geq 1 - \beta (m).
$$
3.3.4 Replicability
Definition 3.8 (Replicability;  $[\mathrm{BGH}^{+}23$ , ILPS22]). Let  $\rho \in \mathbb{R}_{>0}$  and let  $\mathcal{R}$  be a distribution over random strings. A learning rule  $A$  is  $\rho$ -replicable if
$$
\forall p o p u l a t i o n \mathcal {D}, \forall m: \underset { \begin{array}{c} S _ {1}, S _ {2} \sim \mathcal {D} \\ r \sim \mathcal {R} \end{array} } {\mathbb {P}} [ A (S _ {1}; r) = A (S _ {2}; r) ] \geq \rho ,
$$
where  $r$  represents the random coins of  $A$ .
Remark 3.9. Note that both in  $[BGH^{+}23]$  and in [ILPS22] the definition of  $\rho$ -replicability is slightly different. In their definition, they treat the parameter  $\rho$  as the failure probability, i.e.,  $A$  is a  $\rho$ -replicable learning rule by their definition if the probability that  $A(S_{1};r) = A(S_{2};r)$  is at least  $1 - \rho$ .
There exists an alternative 2-parameter definition of replicability introduced in [ILPS22].
Definition 3.10  $((\eta, \nu)$ -Replicability;  $[\mathrm{BGH}^{+}23, \mathrm{ILPS}22]$ . Let  $\eta, \nu \in \mathbb{R}_{>0}$  and let  $\mathcal{R}$  be a distribution over random strings. Coin tosses  $r$  are  $\eta$ -good for a learning rule  $A$  with respect to a population distribution  $\mathcal{D}$  if there exists a canonical output  $h_r$  such that for every  $m$ ,  $\mathbb{P}_{S \sim \mathcal{D}^m}[A(S; r) = h_r] \geq \eta$ . A learning rule  $A$  is  $(\eta, \nu)$ -replicable if
$$
\forall \text {p o p u l a t i o n} \mathcal {D}: \mathbb {P} _ {r \sim \mathcal {R}} [ r \text {i s} \eta \text {- g o o d} ] \geq \nu .
$$
3.3.5 Global Stability
Definition 3.11 (Global Stability; [BLM20]). Let  $\eta > 0$  be a global stability parameter. A learning rule  $A$  is  $(m, \eta)$ -globally stable with respect to a population distribution  $\mathcal{D}$  if there exists a canonical output  $h$  such that  $\mathbb{P}[A(S) = h] \geq \eta$ , where the probability is over  $S \sim \mathcal{D}^m$  as well as the internal randomness of  $A$ .
3.3.6 MI-Stability
Definition 3.12 (Mutual Information Stability; [XR17, BMN+18]). A learning rule  $A$  is  $\mathsf{Ml}$ -stable if there exists  $f:\mathbb{N}\to \mathbb{N}$  with  $f = o(m)$  such that
$$
\forall \text {p o p u l a t i o n} \mathcal {D} \forall m \in \mathbb {N}: I (A (S), S) \leq f (m),
$$
3.3.7 TV-Stability
Definition 3.13 (TV-Stability; Appendix A.3.1 in [KKMV23]). Let  $A$  be a learning rule, and let  $f:\mathbb{N}\to \mathbb{N}$  satisfy  $f(m) = o(1)$ .
1. A is distribution-independent TV-stable if
$$
\exists \operatorname {p r i o r} \mathcal {P} \forall \operatorname {p o p u l a t i o n} \mathcal {D} \forall m \in \mathbb {N}: \mathbb {E} _ {S \sim \mathcal {D} ^ {m}} [ \operatorname {T V} (A (S), \mathcal {P}) ] \leq f (m).
$$
2.  $A$  is distribution-dependent TV-stable if
$$
\forall \operatorname {p o p u l a t i o n} \mathcal {D} \exists \operatorname {p r i o r} \mathcal {P} _ {\mathcal {D}} \forall m \in \mathbb {N}: \mathbb {E} _ {S \sim \mathcal {D} ^ {m}} [ \mathrm {T V} (A (S), \mathcal {P} _ {\mathcal {D}}) ] \leq f (m).
$$
3.3.8 Max Information
Definition 3.14. Let  $A$  be a learning rule, and let  $\varepsilon, \delta \in \mathbb{R}_{\geq 0}$ .  $A$  has  $(\varepsilon, \delta)$ -max-information with respect to product distributions if for every event  $\mathcal{O}$  we have
$$
\mathbb {P} [ (A (S), S) \in \mathcal {O} ] \leq e ^ {\varepsilon} \mathbb {P} [ (A (S), S ^ {\prime}) \in \mathcal {O} ] + \delta
$$
where are  $S, S'$  are independent samples drawn i.i.d from a population distribution  $\mathcal{D}$ .
SM is a Robert J. Shillman Fellow; he acknowledges support by ISF grant 1225/20, by BSF grant 2018385, by an Azrieli Faculty Fellowship, by Israel PBC-VATAT, by the Technion Center for Machine Learning and Intelligent Systems (MLIS), and by the European Union (ERC, GENERALIZATION, 101039692). HS acknowledges support by ISF grant 1225/20, and by the European Union (ERC, GENERALIZATION, 101039692). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them. JS was supported by DARPA (Defense Advanced Research Projects Agency) contract #HR001120C0015 and the Simons Collaboration on The Theory of Algorithmic Fairness.
[ABL+22] Noga Alon, Mark Bun, Roi Livni, Maryanthe Malliaris, and Shay Moran. Private and online learnability are equivalent. Journal of the ACM, 69(4):28:1-28:34, 2022. doi:10.1145/3526074.
[ALMM19] Noga Alon, Roi Livni, Maryanthe Malliaris, and Shay Moran. Private PAC learning implies finite Littlestone dimension. In Moses Charikar and Edith Cohen, editors, Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, Phoenix, AZ, USA, June 23-26, 2019, pages 852-860. ACM, 2019. doi:10.1145/3313276.3316312.
[AMSY23] Noga Alon, Shay Moran, Hilla Schefer, and Amir Yehudayoff. A unified characterization of private learnability via graph theory. CoRR, abs/2304.03996, 2023, 2304.03996. doi:10.48550/arXiv.2304.03996.
[AUZ23] Hilal Asi, Jonathan R. Ullman, and Lydia Zakynthinou. From robustness to privacy and back. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 1121-1146. PMLR, 2023. URL https://proceedings.mlr.press/v202/asi23b.html.
[BE02] Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2:499-526, 2002. URL http://jmlr.org/papers/v2/bousquet02a.html.
$\left[\mathrm{BGH}^{+}23\right]$  Mark Bun, Marco Gaboardi, Max Hopkins, Russell Impagliazzo, Rex Lei, Toniann Pitassi, Satchit Sivakumar, and Jessica Sorrell. Stability is stable: Connections between replicability, privacy, and adaptive generalization. In Barna Saha and Rocco A.
abs/2212.05050, 2022, 2212.05050. doi:10.48550/arXiv.2212.05050.
[MRT18] Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of Machine Learning. Adaptive computation and machine learning. MIT Press, second edition, 2018. URL https://mitpress.mit.edu/9780262039406.
[Phi62] David L. Phillips. A technique for the numerical solution of certain integral equations of the first kind. Journal of the ACM, 9(1):84-97, 1962. doi:10.1145/321105.321114.
[PNG22] Aditya Pradeep, Ido Nachum, and Michael Gastpar. Finite Littlestone dimension implies finite information complexity. In IEEE International Symposium on Information Theory, ISIT 2022, Espoo, Finland, June 26 - July 1, 2022, pages 3055-3060. IEEE, 2022. doi:10.1109/ISIT50566.2022.9834457.
[PW] Yury Polyanskiy and Yihong Wu. Information Theory: From Coding to Learning. Cambridge University Press. URL https://people.lids.mit.edu/yp/homepage/data/itbook-export.pdf. Unpublished manuscript, 2023.
[Rén61] Alfréd Rényi. On measures of entropy and information. In Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics, volume 4, pages 547-562. University of California Press, 1961.
[SB14] Shai Shalev-Shwartz and Shai Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. doi:https://doi.org/10.1017/CBO9781107298019.
[SF12] Robert E. Schapire and Yoav Freund. Boosting: Foundations and Algorithms. MIT Press, 2012. doi:https://doi.org/10.7551/mitpress/8291.001.0001.
[She90] Saharon Shelah. Classification Theory: And the Number of Non-Isomorphic Models, volume 92 of Studies in Logic and the Foundations of Mathematics. North-Holland, second edition, 1990.
[Tik43] A. N. Tikhonov. On the stability of inverse problems. Proceedings of the USSR Academy of Sciences, 39:195-198, 1943. URL https://api_semanticscholar.org/CorpusID:202866372.
[vEH14] Tim van Erven and Peter Harremoës. Rényi divergence and Kullback-Leibler divergence. IEEE Trans. Inf. Theory, 60(7):3797-3820, 2014. doi:10.1109/TIT.2014.2320500.
[XR17] Aolin Xu and Maxim Raginsky. Information-theoretic analysis of generalization capability of learning algorithms. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 2524-2533, 2017. URL https://proceedings.neurips.cc/paper/2017/ hash/ad71c82b22f4f65b9398f76d8be4c615-AAbstract.html.
A Proof for Theorem 2.2 (Stability Boosting)
A.1 Information Theoretic Preliminaries
Lemma A.1 (Monotonicity of Rényi divergence; Theorem 3 in [vEH14]). Let  $0 \leq \alpha < \beta \leq \infty$ . Then  $\mathsf{D}_{\alpha}(\mathcal{P} \parallel \mathcal{Q}) \leq \mathsf{D}_{\beta}(\mathcal{P} \parallel \mathcal{Q})$ . Furthermore, the inequality is an equality if and only if  $\mathcal{P}$  equals the conditional  $\mathcal{Q}(\cdot \mid A)$  for some event  $A$ .
Lemma A.2 (Data Processing Inequality; Theorem 9 and Eq. 13 in [vEH14]). Let  $\alpha \in [0,\infty ]$ . Let  $X$  and  $Y$  be random variables, and let  $F_{Y|X}$  be the law of  $Y$  given  $X$ . Let  $\mathcal{P}_Y$ ,  $\mathcal{Q}_Y$  be the distributions of  $Y$  when  $X$  is sampled from  $\mathcal{P}_X$ ,  $\mathcal{Q}_X$ , respectively. Then
$$
\mathsf {D} _ {\alpha} \left(\mathcal {P} _ {Y} \| \mathcal {Q} _ {Y}\right) \leq \mathsf {D} _ {\alpha} \left(\mathcal {P} _ {X} \| \mathcal {Q} _ {X}\right).
$$
One interpretation of this is that processing an observation makes it more difficult to determine whether it came from  $\mathcal{P}_X$  or  $\mathcal{Q}_X$ .
Definition A.3 (Conditional KL-divergence; Definition 2.12 in [PW]). Given joint distributions  $\mathcal{P}(x,y),\mathcal{Q}(x,y)$  , the KL-divergence of the marginals  $\mathcal{P}(y|x),\mathcal{Q}(y|x)$  is
$$
\operatorname {K L} \left(\mathcal {P} (y | x) \| \mathcal {Q} (y | x)\right) = \sum_ {x} \mathcal {P} (x) \sum_ {y} \mathcal {P} (y | x) \log \frac {\mathcal {P} (y | x)}{\mathcal {Q} (y | x)}.
$$
Lemma A.4 (Chain Rule for KL-divergence; Theorem 2.13 in [PW]). Let  $\mathcal{P}(x,y)$ ,  $\mathcal{Q}(x,y)$  be joint distributions. Then,
$$
\mathsf {K L} (\mathcal {P} (x, y) \parallel \mathcal {Q} (x, y)) = \mathsf {K L} (\mathcal {P} (x) \parallel \mathcal {Q} (x)) + \mathsf {K L} (\mathcal {P} (y | x) \parallel \mathcal {Q} (y | x)).
$$
Lemma A.5 (Conditioning increases KL-divergence; Theorem 2.14(e) in [PW]). For a distribution  $\mathcal{P}_X$  and conditional distributions  $\mathcal{P}_{Y|X}$ ,  $\mathcal{Q}_{Y|X}$ , let  $\mathcal{P}_Y = \mathcal{P}_{Y|X} \circ \mathcal{P}_X$  and  $\mathcal{Q}_Y = \mathcal{Q}_{Y|X} \circ \mathcal{P}_X$ , where 'o' denotes composition (see Section 2.4 in [PW]) Then
$$
\mathsf {K L} \left(\mathcal {P} _ {Y} \| \mathcal {Q} _ {Y}\right) \leq \mathsf {K L} \left(\mathcal {P} _ {Y | X} \| \mathcal {Q} _ {Y | X} \mid \mathcal {P} _ {X}\right),
$$
with equality if and only if  $\mathsf{KL}\Big(\mathcal{P}_{X|Y} \parallel \mathcal{Q}_{X|Y} \mid P_Y\Big) = 0$ .
A.2 Online Learning Preliminaries
Following is some basic background on the topic of online learning with expert advice. This will be useful in the proof of Theorem 2.2.
Let  $Z = \{z_{1},\ldots ,z_{m}\}$  be a set of experts and  $I$  be a set of instances. For any instance  $i\in I$  and expert  $z\in Z$ , following the advice of expert  $z$  on instance  $i$  provides utility  $u(z,i)\in \{0,1\}$ .
The online learning setting is a perfect-information, zero-sum game between two players, a learner and an adversary. In each round  $t = 1,\ldots ,T$  :
1. The learner chooses a distribution  $w_{t} \in \Delta (Z)$  over the set of experts.
2. The adversary chooses an instance  $i_t \in I$ .
3. The learner gains utility  $u_{t} = \mathbb{E}_{z\sim w_{t}}[u(z,i_{t})]$ .
The total utility of a learner strategy  $\mathcal{L}$  for the sequence of instances chosen by the adversary is
$$
U (\mathcal {L}, T) = \sum_ {t = 1} ^ {T} u _ {t}.
$$
The regret of the learner is the difference between the utility of the best expert and the learner's utility. Namely, for each  $z \in Z$ , let
$$
U (z, T) = \sum_ {t = 1} ^ {T} u (z, i _ {t})
$$
be the utility the learner would have gained had they chosen  $w_{t}(z) = \mathbb{1}$  ( $z = z_{j}$ ) for all  $t \in [T]$ . Then the regret is
$$
\operatorname {R e g r e t} (\mathcal {L}, T) = \max  _ {z \in Z} U (z, T) - U (\mathcal {L}, T).
$$
There are several well-studied algorithms for online learning using expert advice that guarantee regret sublinear in  $T$  for every possible sequence of  $T$  instances. A classic example is the Multiplicative Weights algorithm (e.g., Section 21.2 in [SB14]), which enjoys the following guarantee.
Theorem A.6 (Online Regret Bound). In the setting of online learning with expert advice, there exists a learner strategy  $\mathcal{L}$  such that for any sequence of  $T$  instances selected by the adversary,
$$
\operatorname {R e g r e t} (\mathcal {L}, T) \leq \sqrt {2 T \log (m)},
$$
where  $m$  is the number of experts.
A.3 Proof
Theorem (Theorem 2.2, Restatement). Let  $\mathcal{X}$  be a set, let  $\mathcal{H} \subseteq \{0,1\}^{\mathcal{X}}$  be a hypothesis class, and let  $A$  be a learning rule. Assume there exists  $k \in \mathbb{N}$  and  $\gamma > 0$  such that
$$
\forall \mathcal {D} \in \operatorname {R e a l i z a b l e} (\mathcal {H}): \mathbb {E} _ {S \sim \mathcal {D} ^ {k}} [ \mathrm {L} _ {\mathcal {D}} (A (S)) ] \leq \frac {1}{2} - \gamma , \tag {6}
$$
$$
\forall \mathcal {D} \in \operatorname {R e a l i z a b l e} (\mathcal {H}): \mathbb {E} _ {S \sim \mathcal {D} ^ {k}} [ \mathrm {K L} (A (S) \| \mathcal {P}) ] \leq b. \tag {7}
$$
$$
\mathbb {P} _ {S \sim \mathcal {D} ^ {m}} [ \mathrm {K L} (A ^ {\star} (S) \| \mathcal {P} ^ {\star}) \leq b ^ {\star} (m) = O (\log (m)) ] = 1, \tag {8}
$$
$$
\mathbb {E} _ {S \sim \mathcal {D} ^ {m}} \left[ \mathrm {L} _ {\mathcal {D}} \left(A ^ {\star} (S)\right) \right] \leq \varepsilon^ {\star} (m) = O \left(\sqrt {\frac {\log (m)}{m}}\right). \tag {9}
$$
-  $\gamma, b > 0$ ;  $m, k \in \mathbb{N}$ .
-  $\dot{S} = \{(x_1, y_1), \ldots, (x_m, y_m)\}$  is an  $\mathcal{H}$ -realizable sample.
-  $\mathcal{O}_S$  is the online learning algorithm of Appendix A.2, using expert set  $S$ .
$T = \lceil 8\log (m) / \gamma^2\rceil +1.$
-  $A$  satisfies Eqs. (6) and (7) (with respect to  $k, b, \gamma$ ).
$A^{\star}(S)$
$w_{t}\gets$  expert distribution chosen by  $\mathcal{O}_S$  for round  $t$
sample  $S_{t}\gets (w_{t})^{k}$
while  $\mathsf{KL}(A(S_t)\parallel \mathcal{P})\geq 2b / \gamma$
$f_{t}\gets A(S_{t})$
$\mathcal{O}_S$  receives instance  $f_{t}$  and gains utility  $\mathbb{E}_{(x,y)\sim w_t}[\mathbb{1}(f_t(x)\neq y)]$
return  $\operatorname{Maj}(f_1, \ldots, f_T)$
See Remark A.7
Algorithm 1: The stability-boosted learning rule  $A^{\star}$ , which uses  $A$  as a subroutine.