Overfitting has a limitation: a model-independent
generalization gap bound based on Rényi entropy
January 01, 1970
Will further scaling up of machine learning models continue to bring success? A significant challenge in answering this question lies in understanding generalization gap, which is the impact of overfitting. Understanding generalization gap behavior of increasingly large-scale machine learning models remains a significant area of investigation, as conventional analyses often link error bounds to model complexity, failing to fully explain the success of extremely large architectures. This research introduces a novel perspective by establishing a model-independent upper bound for generalization gap applicable to algorithms whose outputs are determined solely by the data’s histogram, such as empirical risk minimization or gradient-based methods. Crucially, this bound is shown to depend only on the Rényi entropy of the data-generating distribution, suggesting that a small generalization gap can be maintained even with arbitrarily large models, provided the data quantity is sufficient relative to this entropy. This framework offers a direct explanation for the phenomenon where generalization performance degrades significantly upon injecting random noise into data, where the performance degrade is attributed to the consequent increase in the data distribution’s Rényi entropy. Furthermore, we adapt the no-free-lunch theorem to be data-distribution-dependent, demonstrating that an amount of data corresponding to the Rényi entropy is indeed essential for successful learning, thereby highlighting the tightness of our proposed generalization bound.
overfitting, Renyi entropy, generalization gap, PAC Bayes
In fields such as natural language processing and video generation, machine learning (deep learning) using large-scale neural networks (NNs) with extremely high-dimensional parameters, trained on large-scale data, has recently achieved practical success in many areas (e.g., ChatGPT [1]–[4], Gemini [5], [6], LLaMA [7], [8], Claude [9], Qwen [10]–[12], DeepSeek [13], [14], Hunyuan [15], PaLM-E [16], etc.). Will machine learning continue to succeed by using extremely large machine learning models on even larger datasets in the future? This question can be rephrased as whether such extremely large models can reduce the expected risk, which is a quantification of the performance badness in machine learning. The expected risk is decomposed into the empirical risk, i.e., the loss on the training data, and the generalization gap, i.e., the difference between the expected risk and the empirical risk. When using large-scale machine learning models, it is not trivial whether the generalization gap can be made small.
Many existing analytical results suggest that the generalization gap worsens as the scale of the machine learning model increases. For example, although the worst-case generalization gap considering all hypotheses within the model can be evaluated using Rademacher complexity [17]–[19], existing generalization gap analyses for NNs using Rademacher complexity depend on some measure of the NN’s scale, such as the number of layers, the dimension of hidden layers, or the norm of weights [20]–[27]. Therefore, they cannot explain the small generalization gap of extremely large models. Generalization gap theories for cases where NNs can be compressed in some sense have also been studied within the Rademacher complexity framework [28]–[30] and the PAC-Bayes framework [31], [32], but they still depend on the scale of the NN, and it is not trivial under what circumstances NNs can be efficiently compressed. Even when limiting the analysis to the generalization gap of the hypothesis that minimizes the empirical risk, theories such as the Akaike Information Criterion (AIC) [33] for regular models and the more general framework of local Rademacher complexity [34], [35] also assert that the generalization gap increases as the model becomes larger [36], [37]. Generalization gap analyses for hypotheses selected by more practical optimization methods, such as stochastic gradient methods (e.g., [38], [39]), also provide upper bounds on generalization gap that increase with the scale of the model, thus failing to explain the small generalization gap of ultra-large models. Moreover, it is not even guaranteed that ultra-large models used in the future will be constructed using NNs.
The above-mentioned upper bounds on generalization gap strongly depend on the model’s construction. If a model-independent generalization gap theory could be developed, it would encourage the introduction of ultra-large models (which might include completely novel NN layers, or might not even be NNs). Such a model-independent theory is not impossible if we focus on the unevenness of a distribution. For example, if the true distribution of the data were concentrated at a single point, the generalization gap would be zero regardless of the machine learning model’s construction. It has been known that in classification problems, the generalization gap on real data is small, whereas if the same model is applied to random labels, the empirical risk can be made small while the expected risk is naturally large, leading to an extremely large generalization gap, even when using the same model [40]. This cannot be explained in principle by focusing only on the model’s construction. These observations suggest the necessity of focusing on the distribution in generalization gap analysis.
This paper shows for the first time that when using a machine learning algorithm whose hypothesis is determined by the histogram of the training data (a.k.a.a symmetric algorithm), such as training error minimization by exhaustive search or gradient methods, there exists an upper bound on the generalization gap determined solely by the Rényi entropy of the data-generating distribution. Here, Rényi entropy is a quantity that represents how far a probability distribution is from a uniform distribution. In other words, the theorem of this research asserts that if the data-generating distribution is uneven in the sense that it is far from a uniform distribution, the generalization gap will be small, regardless of the specific content or scale of the set of hypotheses included in the model. Our bound does not depend on the set of hypotheses that the machine learning model comprises (e.g., the number of parameters, norms, etc.), or the property of the true hypothesis (the norm, sparseness, etc.). It can also apply to non-smooth and non-convex loss functions, as long as they are bounded. Our generalization gap upper bound provides a clear and quantitative answer to the question of why the generalization gap increases when a part of the data is replaced with random numbers generated from a uniform distribution [40], which could not be explained by existing theories that evaluate generalization gap by the size of the function space: it is because it increases the Rényi entropy, on which the generalization gap depends exponentially. This is an advantage of the theory in this paper, which depends only on the distribution. Furthermore, this research also shows that the sufficient condition for the length of training data for generalization, derived from the aforementioned generalization gap upper bound, is tight. Specifically, we extend the previously known no-free-lunch theorem for uniform distributions and show that, for non-uniform distributions, a data length of the order of the exponential of Rényi entropy is necessary for successful learning.
The main contributions of this research are as follows:
We derived a novel generalization gap upper bound that depends only on Rényi entropy, holding under the sole assumption that the algorithm is symmetric and independent of the specific construction of the machine learning model, and showed with a concrete example that it is not vacuous.
We successfully explained the phenomenon where the generalization gap deteriorates by randomizing labels even when using the same machine learning model, from the perspective of an increase in Rényi entropy.
We derived a novel no-free-lunch theorem for non-uniform distributions, showing that the exponential of Rényi entropy governs the data length required for learning, and that the aforementioned generalization gap upper bound is tight.
There is a large body of research on the generalization gap of large-scale machine learning models, especially NNs, particularly using Rademacher complexity (e.g., [20]–[27], [41]–[44]). As already mentioned, these depend strongly on the scale of the NN, while not using information about the distribution in the final generalization gap upper bound. Our theory, on the other hand, depends on the distribution but not on the scale of the model. A major technical difference is that the theory in this paper actively utilizes the fact that the data space is always a countable set. Since machine learning is always implemented on computers, both the data space and the model are necessarily at most countable sets. This paper actively uses this fact, which allows us to apply the method of types [45], leading us to non-tritival upper bounds. Upper bounds on generalization gap in PAC-Bayes theory [46] have also been derived for large-scale machine learning models [31], [32]. This research also uses the countable hypothesis bound, a type of PAC-Bayes theory. Still, it differs significantly technically in that we use a prior distribution on the data space, which makes our theory model-independent, whereas conventional methods use a prior distribution on the parameter space, which causes the dependency on the size of the model. Some generalization gap analyses insist that they are model-independent [47], [48]. However, they mean the applicability of their theories is model-independent, not the upper bounds’ value. For example, they depend on the norm of the true hypothesis parameter [47], the trace of the covariance matrix and the step size of the optimization algorithm, all of which tends to be large in large-scale machine learning models. In contrast, our upper bounds are model-independent in the sense of their specific values. Sibson’s \(\alpha\) mutual information, which is closely related to Rényi entropy, has been used to derive generalization gap bounds (e.g., [49]). However, the bounds depend not on the data distribution but the mutual information between the training data and algorithm’s outcome (similar to [50], [51]), which can be vacuous when we effectively reduce the empirical error. In contrast, our generalization gap bounds are valid and non-vacuous even when we completely minimize the objective function.
The organization of the remainder of the paper In Section 3, we provide the preliminaries for stating our results. Specifically, typical learning theory settings, symmetry of an algorithm, and Rényi entropy are introduced. In Section 4, we provide our main theorem, a model-independent generalization gap bound determined by the data distribution Rényi entropy. The section also explain the dependency of the generalization gap on data property demonstrated in previous work [40]. It also includes generalization gap bounds for specific scenarios. Section 5 provides a novel no-free-lunch theorem for non-uniform distributions, showing the tightness of our generalization gap upper bound.
The set of all non-negative integers is denoted by \(\mathbb{N}\). Note that \(0 \in \mathbb{N}\). The set of all real numbers is denoted by \(\mathbb{R}\). When \(\mathcal{X}\) and \(\mathcal{Y}\) are sets, \(\mathcal{X} \times \mathcal{Y}\) denotes the Cartesian product of \(\mathcal{X}\) and \(\mathcal{Y}\), and \(\mathcal{Y}^{\mathcal{X}}\) denotes the set of all maps from \(X\) to \(Y\). That is, \[\mathcal{Y}^{\mathcal{X}} = \{ f \mid f : \mathcal{X} \to \mathcal{Y} \}.\] For a set \(\mathcal{X}\) and \(n \in \mathbb{N}\), the Cartesian product of \(n\) copies of \(\mathcal{X}\) is denoted by \(\mathcal{X}^n\). When the generating distribution of a random variable \(Z\) is “\(Q\)”, it is written as \(Z \sim Q\). \(Q^n\) denotes the \(n\)-fold product measure of \(Q\). That is, \(Q^n\) is the distribution followed by a sequence of random variables \(\boldsymbol{\mathit{X}} := (X_1,X_2,\dots,X_n)\) composed of \(n\) independent random variables \(X_1,X_2,\dots,X_n \sim Q\). For a random variable \(Z \sim Q\) on a set \(\mathcal{Z}\) and a real-valued function \(\phi : \mathcal{Z} \to \mathbb{R}\) on \(\mathcal{Z}\), the expected value of \(\phi(Z)\) is written as \(\mathbb{E}_{Z \sim Q}\phi(Z)\). Also, the probability that an event \(A(Z)\) depending on \(Z\) occurs is written as \(\mathbb{P}_{Z \sim Q}(A(Z))\). All logarithms in this paper are natural logarithms \(\ln\). All the distributions to appear in this paper are discrete ones on an at most countable set, since computers can handle those sets only. Hence, we identify probability mass functions with probability measures. That is, when a probability measure \(Q\) on an at most countable set \(\mathcal{A}\) is given, \(Q(\{a\})\) for \(a \in \mathcal{A}\) is simply written as \(Q(a)\), and \(Q\) is regarded as a probability mass function.
In the remainder of this section, we prepare for rigorously formulating the problem setting of this paper. Specifically, in Section 3.1, we introduce the premise that the data space is at most countable, which is maintained consistently throughout this paper, and explain why it always holds. In Section 3.2, we rigorously define the quantities we wish to evaluate in this paper, namely risks and generalization gaps, and intuitively explain why the at-most countability of the data space assumed in Section 3.1 has a significant theoretical impact. In Section 3.3, we rigorously define symmetric algorithms, which are the subject of this paper. Examples include important and typical algorithms such as empirical risk minimization and gradient methods. In Section 3.4, we introduce and rigorously define Rényi entropy, which plays a central role in the evaluation of the generalization gap in this paper.
In this subsection, regarding the premise consistently placed in this paper that the data space is an at most countable set (i.e., a finite set or a countably infinite set), we explain why this is an assumption that can be unconditionally made in the context of machine learning using computers, and what significant impact this premise has on theory.
In this paper, we posit the following premise.
Premise 1. The data space is always an at most countable set (i.e., a finite set or a countably infinite set). That is, there always exists an injection from the data space to the set of natural numbers.
In this paper, we call the above a premise rather than an assumption. This is because, as long as a computer is used, the above premise always holds. The reason why the above premise always holds as long as a computer is used is that the set consisting of all values that can be input into a computer is a countably infinite set. More specifically, any input to a computer is a finite binary sequence, but the set collecting all finite binary sequences \(\{0, 1\}^* \mathrel{\vcenter{:}}= \bigcup_{L=0}^{+\infty} \{0, 1\}^L\) is a countably infinite set. As long as a computer is used, the data space is a subset of the set \(\{0, 1\}^*\) collecting all such finite binary sequences, so it is at most countably infinite.
We have explained that the premise that the data space is an at most countable set can always be safely posited. Why this premise is theoretically important will be explained in Remark [rem:CountabilityMatters] of Section 3.2.
In this section, we rigorously define the quantities we wish to evaluate in this paper, namely risks and generalization gaps, and intuitively explain why the at-most countability of the data space assumed in Section 3.1 has a significant theoretical impact.
Definition 1 (Definition of Risk). Let \(\mathcal{Z}\) be a countable data space, \(\mathcal{H}_{\mathrm{all}}\) be the whole hypothesis set, and \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) be a loss function defined on \(\mathcal{Z}\) and \(\mathcal{H}_{\mathrm{all}}\). Also, let \(Q\) be a (discrete) probability measure on \(\mathcal{Z}\), and consider a data sequence of length \(n \in \mathbb{N}\), \(\boldsymbol{\mathit{z}} := (z_1,z_2,\dots,z_n) \in \mathcal{Z}^n\). At this time, the expected risk function \(\mathrm{Risk}_{(\ell,Q)} : \mathcal{H}_{\mathrm{all}} \to \mathbb{R}\) on \(Q\) and the empirical risk function \(\mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})} : \mathcal{H}_{\mathrm{all}} \to \mathbb{R}\) on \(\boldsymbol{\mathit{z}}\) are defined respectively as follows: \[\mathrm{Risk}_{(\ell,Q)}(h) := \mathbb{E}_{Z \sim Q} \ell(h,Z), \qquad \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h) := \frac{1}{n} \sum_{i=1}^n \ell(h,z_i).\] Furthermore, the generalization gap function \(\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{z}})} : \mathcal{H}_{\mathrm{all}} \to \mathbb{R}\) on \(Q\) and \(\boldsymbol{\mathit{z}}\) is defined by \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{z}})}(h) := \mathrm{Risk}_{(\ell,Q)}(h) - \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h).\] When clear from the context, \(\ell\) is omitted.
The loss \(\ell(h,z)\) quantifies how bad the hypothesis \(h \in \mathcal{H}_{\mathrm{all}}\) is on the data point \(z \in \mathcal{Z}\). Therefore, using the loss function \(\ell\) and the true data generating distribution \(Q\), the goal of machine learning can be formulated as finding \(h \in \mathcal{H}_{\mathrm{all}}\) that minimizes the expected risk \(\mathrm{Risk}_{(\ell,Q)}(h)\) as much as possible. What is important is that the true data generating distribution \(Q\) is unknown, so \(\mathrm{Risk}_{(\ell,Q)}(h)\) cannot be directly calculated. On the other hand, \(\mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h)\) can be calculated on the training data sequence \(\boldsymbol{\mathit{z}} \in \mathcal{Z}^n\). Therefore, for the output \(h\) of a machine learning algorithm, when the empirical risk \(\mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h)\) is calculated, we are interested in how much it differs from the expected risk \(\mathrm{Risk}_{(\ell,Q)}(h)\), i.e., the generalization gap \(\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{z}})}(h)\). This is why the evaluation of generalization gap is important in the field of machine learning. The phenomenon where the generalization gap becomes large is called overfitting.
Since the above definition is somewhat abstract, let us look at how actual problems fit into the above definition, using a classification problem as an example. Note that the definition of a classification problem below is broad, so please be aware that it includes not only classical binary classification but also practical Chat AI.
Example 1 (Classification Problem). In the case of a classification problem, the data space is given by the Cartesian product of the input data space \(\mathcal{X}\) and the output data space \(\mathcal{Y}\), i.e., \(\mathcal{Z} = \mathcal{X} \times \mathcal{Y}\). For a deterministic classification problem, the whole hypothesis set is the set of all maps from \(\mathcal{X}\) to \(\mathcal{Y}\), i.e., \(\mathcal{H}_{\mathrm{all}} = \mathcal{Y}^{\mathcal{X}}\). Then, the 0-1 loss \[\ell_\textrm{0-1} : \mathcal{Y}^{\mathcal{X}} \times (\mathcal{X} \times \mathcal{Y}) \to \mathbb{R}\] is defined as \[\ell_\textrm{0-1}(f,(x,y)) := \mathbb{1}(y \neq f(x)) := \begin{cases} 1 & \text{if } y \neq f(x),\\ 0 & \text{otherwise,} \end{cases}\] where \(f \in \mathcal{Y}^{\mathcal{X}}\), \(x \in \mathcal{X}\), and \(y \in \mathcal{Y}\). At this time, the expected risk of \(f \in \mathcal{H}_{\mathrm{all}} = \mathcal{Y}^{\mathcal{X}}\) is \[\mathrm{Risk}_{(\ell,Q)}(f) = \mathbb{E}_{Z \sim Q} \ell(f,Z) = \mathbb{P}_{(X,Y)\sim Q}(Y \neq f(X)),\] which is the misclassification rate of \(f\) in the true distribution, so this is exactly what we want to minimize in a classification problem. Considering a natural language chatbot (Chat AI), both the input data set and the output data set can be infinite. They are sets of finite-length strings \[\Sigma^{*} := \Sigma^{0} \cup \Sigma^{1} \cup \Sigma^{2} \dotsc,\] Here, \(\Sigma\) is a character set (e.g., all ASCII characters) and is a finite set, and for \(l \in \mathbb{N}\), \(\Sigma^{l}\) is the set of all strings of length \(l\).
In many contexts of learning theory [17]–[27], the data space is a subset of a real vector space, and the data generating distribution is often assumed to be a continuous probability distribution on that set. That is, it was common to assume a situation where a probability density function \(q\) exists, and for any Lebesgue measurable set \(A\), the probability \(\mathop{\mathrm{Pr}}(z \in A)\) that the generated data \(z \in \mathbb{R}^d\) (\(d\) is the dimension of the data space) is contained in the set \(A\) is always given by the integral of \(q\) over \(A\): \[\mathop{\mathrm{Pr}}(z \in A) = \int \mathbb{1} \{z \in A\} q (z) d z,\] where \(\mathbb{1} \{z \in A\}\) is the characteristic function that returns 1 if \(z \in A\) and 0 otherwise. What is notable about this situation of continuous probability distributions is that, with probability 1, the training data sequence determining the empirical risk and the newly generated data determining the expected risk become “unrelated.” Specifically, when considering a training data sequence \((z_1, z_2, ..., z_n)\) of length \(n\) generated from the probability distribution defined by the probability density function \(q\), and a random variable \(Z\) generated from the probability distribution also defined by \(q\), the probability that \(Z \in \{z_1, z_2, ..., z_n\}\) is zero. This fact is evident from the property that the measure of a finite set is always zero in continuous probability distributions; this means that, with probability 1, the set formed by the training data sequence and the support of the singleton set consisting of the newly generated data do not overlap. This implies that, on continuous probability distributions, no relationship can be expected between the expected risk and the empirical risk without additional assumptions regarding the loss function. Therefore, to obtain a meaningful generalization gap, assumptions that restrict the relationship of loss values at different data points, such as Lipschitz continuity of the loss function, are necessary.
In contrast, this paper takes as a premise that the data space is an at most countable set. For a probability distribution on an at most countable data space, a probability mass function is always defined. When considering a training data sequence \((z_1, z_2, ..., z_n)\) of length \(n\) generated from the probability distribution defined by a certain probability mass function \(Q\), and a random variable \(Z\) generated from the probability distribution also defined by \(Q\), the probability that \(Z \in \{z_1, z_2, ..., z_n\}\) is always positive. Therefore, as long as the loss function is a function uniquely determined by the input, the expected risk and the empirical risk cannot be completely unrelated. Consequently, there is a possibility of obtaining a meaningful generalization gap without constraints on the function class.
Machine learning referred to the process in which a machine determines a single hypothesis from a data sequence using a learning algorithm. Let us strictly define the learning algorithm below.
Definition 2 (Model and Learning Algorithm). A subset \(\mathcal{H} \subset \mathcal{H}_{\mathrm{all}}\) of the whole hypothesis set is called a model. A map \[\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H},\] from the set of finite data sequences \[\mathcal{Z}^{*} := \mathcal{Z}^{0} \cup \mathcal{Z}^{1} \cup \mathcal{Z}^{2} \cup \dotsc\] to the model \(\mathcal{H}\) is called a learning algorithm.
The empirical risk function is determined by the histogram of the data sequence and does not depend on the order of appearance of each data point. In other words, in a typical setting, we are not interested in the order of the training data points. This means that information about the order of the data sequence can be disregarded. Therefore, when considering algorithms, it is natural to consider algorithms whose output is determined by the histogram of the data sequence and does not depend on the order of appearance of each data point. Such algorithms are called symmetric algorithms (e.g., [52]).
Below, we start by defining symmetric maps more generally.
Definition 3 (Symmetry of a Map). For a data space \(\mathcal{Z}\), a map \(\phi : \mathcal{Z}^{*} \to \mathcal{T}\) from the set of finite data sequences \(\mathcal{Z}^{*} := \mathcal{Z}^{0} \cup \mathcal{Z}^{1} \cup \mathcal{Z}^{2} \cup \dotsc\) to some set \(\mathcal{T}\) is symmetric if, for any permutation \(\sigma \in \mathfrak{S}_{n}\) of \(n\) elements, \[\phi(z_1,z_2,\dots,z_n) = \phi(z_{\sigma(1)},z_{\sigma(2)},\dots,z_{\sigma(n)})\] holds.
In other words, \(\phi\) is symmetric means that \(\phi(\boldsymbol{\mathit{z}})\) is determined solely by the histogram of \(\boldsymbol{\mathit{z}}\) and does not depend on the order of appearance of the data.
Example 2 (Important symmetric maps in machine learning).
Empirical risk function: When a hypothesis \(h \in \mathcal{H}_{\mathrm{all}}\) is fixed, the empirical risk considered as a function of the data sequence, \(\mathrm{EmpRisk}_{(\ell,\cdot)}(h) : \mathcal{Z}^{*} \to \mathbb{R}\), is a symmetric map (real-valued function). This can be seen from the fact that the empirical risk depends only on the histogram of the data, not on its order.
Gradient of empirical risk: When hypotheses are identified with elements of a real vector space (i.e., parameterized by real vectors), its gradient in that real vector space, \(\nabla \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h)\), is a symmetric map (real vector-valued function).
Definition 4 (Symmetry of a Learning Algorithm). A learning algorithm \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H} \subset \mathcal{H}_{\mathrm{all}}\) is symmetric if \(\mathfrak{A}\) is symmetric as a map in the sense of Definition 3.
Example 3 (Examples of Symmetric Learning Algorithms). As a simple observation, if each step of a learning algorithm depends on the data sequence only through symmetric functions, then the learning algorithm is symmetric. Important examples are listed below.
Empirical risk minimization by exhaustive search: This can be written as \[\mathfrak{A}(\boldsymbol{\mathit{z}}) = \mathop{\mathrm{argmin}}_{h \in \mathcal{H}} \mathrm{EmpRisk}_{(\boldsymbol{\mathit{z}})}(h).\] The fact that this empirical risk minimization is a symmetric learning algorithm follows from the fact that the empirical risk is a symmetric function with respect to the data sequence.
Gradient method with a fixed initial point: This is a general term for methods where the initial hypothesis is \(h_0 \in \mathcal{H}\), the hypothesis \(h_t \in \mathcal{H}\) at step \(t\) is selected depending on the history of past empirical risk gradients \((\nabla \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{z}})}(h_\tau))_{\tau=0}^{t-1}\) and the history of past selected hypotheses \((h_\tau)_{\tau=0}^{t-1}\), and the stopping condition also depends only on these. Note that this formulation allows the use of gradient information for \(\tau < t-1\), so it includes algorithms that use auxiliary variables in practice (e.g., Nesterov’s accelerated gradient method [53], BFGS method [54]–[56]). Gradient methods are symmetric learning algorithms because the gradient of the empirical risk is a symmetric (real vector-valued) map with respect to the data sequence.
In this paper, we only consider deterministic symmetric methods, but do not consider stochastic symmetric algorithms. Since stochastic symmetric algorithms include algorithms widely used in modern machine learning, including stochastic gradient descent and Adam [57], extending this paper’s discussion to those algorithms is important future work.
The unevenness of a distribution has a large impact on generalization gap. To give an extreme example, no matter how large-scale a machine learning model is used, if the data distribution degenerates to a single point, the generalization gap is zero. Even if not so extreme, there is an intuition that if the data is skewed, the generalization gap will be small. As an example, as already mentioned, even in practical deep learning models, there are known cases where replacing part of the data with uniform random numbers causes a sharp increase in generalization gap [40]. This section introduces Rényi entropy as an indicator to quantify the unevenness of a distribution.
Definition 5. Let \(\alpha \in [0,+\infty]\). The \(\alpha\)-Rényi entropy \(H_\alpha(Q) \in [0,+\infty]\) of a discrete probability distribution \(Q\) defined on an at most countable set \(\mathcal{Z}\) is defined as follows: \[H_\alpha(Q) = \begin{cases} \displaystyle \sum_{z \in \mathcal{Z}} Q(z)\, \ln \frac{1}{Q(z)}, & \text{if } \alpha = 1,\\[1.2ex] \displaystyle \ln \bigl|\mathrm{supp}(Q)\bigr|, & \text{if } \alpha = 0,\\[1.2ex] \displaystyle - \ln \left(\max_{z \in \mathcal{Z}} Q(z) \right), & \text{if } \alpha = \infty,\\[1.2ex] \displaystyle \frac{1}{1-\alpha} \ln \left( \sum_{z \in \mathcal{Z}} Q(z)^{\alpha} \right), & \text{otherwise,} \end{cases}\] where \(\mathrm{supp}(Q) := \{ z \in \mathcal{Z} \mid Q(z) > 0 \}\).
\(H_\alpha(Q)\) represents, in some sense, the “unevenness” or “effective support size” (logarithm thereof) of the distribution \(Q\). This can also be understood from the following observations:
For any fixed \(\alpha \in [0,+\infty]\), \(H_\alpha(Q)\) takes its minimum value of \(0\) if and only if \(Q\) is a point measure (i.e., \(\exists z \in \mathcal{Z}, Q(z) = 1\)).
If the support set \(\mathcal{Z}\) is finite, then for any fixed \(\alpha \in [0,+\infty]\), \(H_\alpha(Q)\) takes its maximum value \(\log |\mathcal{Z}|\) if and only if \(Q\) is a uniform distribution on \(\mathcal{Z}\).
Note that, for a fixed probability distribution \(Q\), \(H_\alpha(Q)\) is continuous and monotonically non-increasing with respect to \(\alpha\). This is because as \(\alpha\) increases, the weights of elements with small probability mass are reduced, effectively ignoring them.
This section presents the quantitative relation among the generalization gap and Rényi entropy and the training data size. Section 4.1 provides generalization gap upper bound determined by the Rényi entropy and the training data length. By solving the inequality with respect to the training data length, Section 4.2 provides a sufficient condition with respect to the training data length to keep the generalization gap lower than the given aimed standard. Based on the inequalities provided by those sections, Section 4.3 explains why mixing noise worsens the generalization gap. Section 4.4 provides specific formulae of the generalization gap upper bound and the sufficient condition with respect to the training data size for typical distributions.
This section presents the main theorem of this paper, the generalization gap bound theorem determined by Rényi entropy. The following is the main theorem, which gives a probabilistic upper bound on the generalization gap when the number of data points is fixed.
Theorem 1 (Generalization Gap Bound by Rényi Entropy). Fix a whole hypothesis set \(\mathcal{H}_{\mathrm{all}}\) and a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on a data space \(\mathcal{Z}\) which is an at most countable set. Define \[\mathrm{DI}(\ell) := \sup_{h \in \mathcal{H}_{\mathrm{all}},\, z \in \mathcal{Z}} \ell(h,z) - \inf_{h \in \mathcal{H}_{\mathrm{all}},\, z \in \mathcal{Z}} \ell(h,z) \in [0,+\infty]\] (“\(\mathrm{DI}\)” means the diameter of the image). Let \(\mathcal{Z}^{*} := \mathcal{Z}^{0} \cup \mathcal{Z}^{1} \cup \mathcal{Z}^{2} \cup \dotsc\) be the set of all finite-length data sequences, and let \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}_{\mathrm{all}}\) be a symmetric machine learning algorithm in the sense of Definition 4. Let \(Q\) be a probability distribution on \(\mathcal{Z}\), and for \(\alpha \in [0,1]\), define \(\kappa_{(Q,\alpha)} : \mathbb{N}\to \mathbb{R}\) by \[\kappa_{(Q,\alpha)}(n) := n^{\alpha} \exp\left((1-\alpha) H_\alpha(Q)\right),\] and define \(\kappa^{*}_{(Q)} : \mathbb{N}\to \mathbb{R}\) by \[\kappa^{*}_{(Q)}(n) := \min_{\alpha \in [0,1]} \kappa_{(Q,\alpha)}(n).\]
When \(n \in \mathbb{N}_{>0}\) and \(\boldsymbol{\mathit{Z}} = (Z_1,Z_2,\dots,Z_n) \sim Q^{n}\), i.e., \(Z_1,Z_2,\dots,Z_n \sim Q\) independently, for any \(\delta_1,\delta_2,\delta_3 > 0\), the following holds with probability at least \(1 - (\delta_1 + \delta_2 + \delta_3)\): \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left(\mathfrak{A}(\boldsymbol{\mathit{Z}})\right) \leq \mathrm{DI}(\ell) \sqrt{ \frac{ \left(\kappa^{*}_{(Q)}(n) + \sqrt{ \tfrac{n}{2} \ln \tfrac{2}{\delta_3} } \right) \left( 3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_2} \right) + \ln \tfrac{1}{\delta_1} }{2n} }.\]
Theorem 1 holds regardless of the construction of each hypothesis \(h\), the structure of the hypothesis set \(\mathcal{H}\), or the relationship between the hypothesis and the loss function \(\ell\). No matter how complex a function an individual \(h\) is, no matter how many parameters \(\mathcal{H}\) has or how complex a model it is constructed with, and no matter how discontinuously \(\ell\) behaves with respect to \(h\) or \(z\), Theorem 1 holds. In that sense, Theorem 1 is model-independent.
Let \[\alpha^{*} := \mathop{\mathrm{argmin}}_{\alpha \in [0,1]} \kappa_{(Q,\alpha)}(n).\] In this case, the upper bound of Theorem 1 is roughly of the order \(\sqrt{ n^{\alpha^{*}-1} \exp\left( (1-\alpha^{*}) H_{\alpha^{*}}(Q) \right) }\) If we ignore the dependence of \(\alpha^{*}\) on \(H_\alpha(Q)\), the upper bound is exponential w.r.t.the Rényi entropy. A more detailed discussion will be provided later.
To minimize the right-hand side, one should minimize \(n^\alpha \exp\left((1-\alpha)H_\alpha(Q)\right)\) with respect to \(\alpha\). Since Rényi entropy is a non-increasing function of \(\alpha\), \(\exp\left((1-\alpha)H_\alpha(Q)\right)\) is a decreasing function in the range \(\alpha \in [0,1]\). On the other hand, \(n^\alpha\) is an increasing function of \(\alpha\). To obtain a good upper bound, it is necessary to determine a good \(\alpha\) within this trade-off. As an extreme case, if we consider \(\alpha=1\), then \(n^\alpha \exp\left((1-\alpha)H_\alpha(Q)\right) = n.\) In this case, the right-hand side becomes \(O(\ln n)\), which is a vacuous bound that does not converge to \(0\) even if \(n\) is increased. Therefore, an appropriate choice of \(\alpha\) is essential.
There exist distributions \(Q\) for which Rényi entropy \(H_\alpha(Q)\) always diverges in the range \(\alpha \in [0,1]\). This is equivalent to the divergence of Shannon entropy \(H_1(Q)\). For example, a probability distribution on \(\mathcal{Z} = \mathbb{N}\) with \[Q(k) := \frac{1}{C (k+2)(\ln(k+2))^{2}},\] where \[C := \sum_{k' = 0}^{+\infty} \frac{1}{(k'+2)(\ln(k'+2))^{2}} < +\infty,\] is such an example. If Rényi entropy \(H_\alpha(Q)\) always diverges in the range \(\alpha \in [0,1]\), the upper bound of Theorem 1 is vacuous. However, this is a pathological case, and in such cases, as will be discussed later, it includes cases where learning from finite-length training data is known to be impossible in the sense of the no-free-lunch theorem. Also, as will be discussed later, the upper bound of Theorem 1 is usually not vacuous even when the tail probability of \(Q\) decays according to a power law.
The previous section provided an upper bound on the generalization gap when the data length is fixed. Conversely, we are often interested in the sufficient condition for the data length to achieve a target generalization gap. Essentially, this involves solving Theorem 1 for \(n\), but expressing the sufficient condition for data length using elementary functions is a somewhat tedious task because it involves the inverse function of a product of a polynomial and a logarithmic function. This section presents the result of that task and shows that Rényi entropy, i.e., the unevenness of the data distribution, has a significant impact on the sufficient condition for data length to achieve small generalization gap. The following theorem is the mathematical statement.
Theorem 2 (Sufficient condition for data length determined by Rényi entropy). Assume the same situation as in Theorem 1. That is, fix a whole hypothesis set \(\mathcal{H}_{\mathrm{all}}\), a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on a data space \(\mathcal{Z}\) which is an at most countable set, define \(\mathrm{DI}(\ell)\) similarly, and let \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}_{\mathrm{all}}\) be a symmetric machine learning algorithm in the sense of Definition 4.
For a (discrete) probability measure \(Q\) on \(\mathcal{Z}\), define the extended real-valued functions \(\nu_{(Q,\alpha)} : (0,1] \to [0,+\infty)\) and \(\widetilde{\nu}_{(Q,\alpha)} : (0,1]^{2} \to [0,+\infty)\) by \[\nu_{(Q,\alpha)}(\varepsilon) := \left( \frac{24 H_\alpha(Q) \ln \frac{12}{\varepsilon^{2}(1-\alpha)}}{\varepsilon^{2}} \right)^{\frac{1}{1-\alpha}} \exp\left( H_\alpha(Q) \right),\] \[\widetilde{\nu}_{(Q,\alpha)}(\delta,\varepsilon) := \left( \frac{36 \ln \frac{6\pi}{\delta}}{\varepsilon^{2}} \right)^{\frac{1}{1-\alpha}} \exp\left( H_\alpha(Q) \right).\]
Also, define \(\omega : (0,1]^{2} \to [0,+\infty)\) by \[\omega(\delta,\varepsilon) = \max \left\{ \frac{324 \ln \frac{3}{\delta}}{\varepsilon^{4}} \left( \ln \frac{9 \sqrt{2 \ln \frac{3}{\delta}}}{\varepsilon^{2}} \right)^{2}, \, \frac{3}{2 \varepsilon^{2}} \ln \frac{3}{\delta} \right\}.\]
Fix any \((\delta,\varepsilon) \in (0,1)^{2}\). If for some \(\alpha \in [0,1]\), \[n > \max \Bigl\{ \nu_{(Q,\alpha)}(\varepsilon), \widetilde{\nu}_{(Q,\alpha)}(\delta,\varepsilon), \omega(\delta,\varepsilon) \Bigr\}\] holds, then, when \(\boldsymbol{\mathit{Z}} = (Z_1,Z_2,\dots,Z_n) \sim Q^{n}\), with probability at least \(1-\delta\), \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})} \left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) < \mathrm{DI}(\ell)\, \varepsilon.\]
Theorem 2 is model-independent in the same sense as stated in Remark [rem:ModelIndependent].
In large-scale problems, \(H_\alpha(Q)\) usually becomes large, but \(\omega(\delta,\varepsilon)\) does not depend on \(H_\alpha(Q)\). Also, if \(H_\alpha(Q) \gg \ln\frac{1}{\delta}\), then \(\nu_{(Q,\alpha)}(\varepsilon) \gg \widetilde{\nu}_{(Q,\alpha)}(\delta,\varepsilon)\). Therefore, \(\nu_{(Q,\alpha)}\) is the main term. The specific form of \(\nu_{(Q,\alpha)}\) implies that the data length should be at least proportional to \(\exp(H_\alpha(Q))\), the exponential of the Rényi entropy.
It is known that deep learning models used in practical image recognition have low generalization gap on original data (both training error rate and test error rate are low), but if the data labels are randomized, the generalization gap becomes extremely large (training error rate is low, but test error rate is high) [40]. This phenomenon cannot be explained in principle by theories that focus only on the function class represented by the model. This section provides a direct explanation for this phenomenon from the perspective of an increase in Rényi entropy. More specifically, replacing a part of the data with uniform random numbers increases the Rényi entropy. Quantitatively, the following holds.
Let a random variable \(X\) on \(\mathcal{X}\) follow a probability distribution \(Q\). Let a random variable \(Y\) on a finite set \(\mathcal{Y}\) be given by \(Y = f(X)\) using a deterministic function \(f\). Let a random variable \(Y'\) on \(\mathcal{Y}\) follow a uniform distribution on \(\mathcal{Y}\) independently of \(X\). Then, for any \(\alpha \in [0,+\infty]\), \[H_\alpha(X,Y') = H_\alpha(X,Y) + \ln |\mathcal{Y}|.\]
Proof. Since the probability distribution of \((X,Y)\) is effectively the same as the probability distribution of \(X\), \(H_\alpha(X,Y) = H_\alpha(X) = H_\alpha(Q)\). Also, from the independence of \(X\) and \(Y'\), it follows that \(H_\alpha(X,Y') = H_\alpha(X) + H_\alpha(Y')\). Since \(Y'\) follows a uniform distribution, \(\forall \alpha \in [0,+\infty], H_\alpha(Y') = \ln |\mathcal{Y}|\). ◻
When Rényi entropy increases additively, there is an exponential effect on the generalization gap.
Theorem 3 (Deterioration of generalization gap caused by an increase in Rényi entropy). Suppose that for two probability distributions \(Q\) and \(Q'\), there exists some \(C \ge 0\) such that \[\forall \alpha \in [0,1], \quad H_\alpha(Q') \ge H_\alpha(Q) + C.\] Then, for any \(n \in \mathbb{N}\), \[\kappa^{*}_{(Q')}(n) \ge \exp\left( (1-\alpha'^{*}) C \right) \, \kappa^{*}_{(Q)}(n),\] where \[\alpha'^{*} := \mathop{\mathrm{argmin}}_{\alpha \in [0,1]} \exp\left( (1-\alpha) H_\alpha(Q') \right) n^{\alpha}.\] Also, for any \(\alpha \in [0,1]\) and any \((\delta,\varepsilon) \in (0,1]^{2}\), \[\max\bigl\{ \nu_{(Q',\alpha)}(\varepsilon),\, \widetilde{\nu}_{(Q',\alpha)}(\delta,\varepsilon) \bigr\} \ge \exp(C)\, \max\bigl\{ \nu_{(Q,\alpha)}(\varepsilon),\, \widetilde{\nu}_{(Q,\alpha)}(\delta,\varepsilon) \bigr\}.\]
According to Theorem 1, the main term of the upper bound on generalization gap was \(O\left( \sqrt{ \kappa^{*}_{(Q)}(n) / n \cdot \ln n } \right)\). Therefore, the generalization gap for the probability distribution \(Q'\) is roughly \(\sqrt{\exp(C)^{1-\alpha^{*}}}\) times worse than for \(Q\). Considering the example in Proposition [prp:labels], \(C = \ln |\mathcal{Y}|\), so in the case of uniform labels \((X,Y')\), the generalization gap is \(\sqrt{|\mathcal{Y}|^{\,1-\alpha^{*}}}\) times worse than in the case of deterministic labels \((X,Y)\). When \(\alpha'^{*} = 1\), the inequality \(\kappa^{*}_{(Q')}(n) \ge \exp\left( (1-\alpha'^{*})C \right) \kappa^{*}_{(Q)}(n)\) is meaningless, but such cases are when Theorem 1 gives a vacuous upper bound, and as we will see in a later example, such cases are rare.
Furthermore, the sufficient data length \(n\) to make the generalization gap less than or equal to \(\mathrm{DI}(\ell) \varepsilon\) is effectively given by \(\max\bigl\{ \nu_{(Q',\alpha)}(\varepsilon), \widetilde{\nu}_{(Q',\alpha)}(\delta,\varepsilon) \bigr\}.\) Therefore, applying the above theorem, the sufficient condition for data length in the case of probability distribution \(Q'\) is \(\exp(C)\) times worse than for \(Q\). Considering the example in Proposition [prp:labels] again, in the case of uniform labels \((X,Y')\), the sufficient condition for data length is \(|\mathcal{Y}|\) times worse than in the case of deterministic labels \((X,Y)\). This is why the generalization gap deteriored when the labels were replaced with random labels in [40].
| Type of Distribution | Condition | Generalization Gap | Sufficient Data Length |
|---|---|---|---|
| finite set | |||
| distribution | |||
| \(\exists C >0,\) | |||
| \(r \in (0,1),\) | |||
| \(q_j \le C r^{j}\) | |||
| distribution | |||
| \(\gamma>1,\) | |||
| \(q_j \le C (j+1)^{-\gamma}\) |
Let’s see how generalization gap is suppressed through specific probability distributions. First, let’s look at the relatively trivial case where \(\mathcal{Z}\) is a finite set, and that is the only assumption. In this case, which includes the uniform distribution, the Rényi entropy is finite, so a meaningful generalization gap upper bound can be obtained. Next, we discuss cases where \(\mathcal{Z}\) may be a countably infinite set. Theorem 1 asserted that the generalization gap becomes smaller if the unevenness of the data distribution is larger. In other words, the faster the tail of the probability distribution decays, the smaller the generalization gap. Here, we compare the case where the tail of the probability distribution decays exponentially and the case where it decays according to a power law, and see that the generalization gap upper bound is smaller for exponential decay, but the upper bound of Theorem 1 is not vacuous, i.e., converges to \(0\) as \(n \to +\infty\) even for power-law decay. Phenomena with power-law decaying distributions, such as Zipf’s law [58], frequently appear especially in natural languages [59]–[66]. Therefore, whether machine learning generalizes for phenomena following these distributions is an important problem. Due to space limitations, only the main terms are shown in Table 1. See Section 10 for details.
The No-free-lunch theorem in the context of machine learning (e.g., [67]) formulates a certain theoretical limitation of machine learning, especially supervised learning. Specifically, it means that even if information that the input-output relationship is a deterministic function is given, any machine learning algorithm will fail in the worst case regarding the input distribution and input-output relationship if there is not enough training data of a length corresponding to the size of the input data space. The following is a more specific version in [68].
Theorem 4 (No-free-lunch theorem). Consider a learning problem from a domain set \(\mathcal{X}\) to a codomain set \(\mathcal{Y}\) such that \(|\mathcal{Y}| \ge 1\), i.e., \(\mathcal{Y} \neq \emptyset\). For a probability measure \(Q\) on \(\mathcal{X}\), a ground truth map \(f_0 : \mathcal{X} \to \mathcal{Y}\), denote the 0-1 risk of a hypothesis map \(f : \mathcal{X} \to \mathcal{Y}\) on \(Q\) and \(f_0\) by \(\mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ (\mathrm{id}_{\mathcal{X}}, f_0))}(f)\), which is defined by \[\mathrm{Risk}_{(Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1}, \ell_\textrm{0-1})}(f) = \mathbb{P}_{X \sim Q} ( f(X) \neq f_0(X) ).\] Then, for any map (learning algorithm) \(\mathfrak{A} : (\mathcal{X} \times \mathcal{Y})^{*} \to (\mathcal{X} \to \mathcal{Y})\), any nonnegative integer (training data size) \(n\) that satisfies \(n \le \frac{1}{2} |\mathcal{X}|\), any finite positive integer \(p\) satisfying \(1 \le p \le |\mathcal{Y}|\), and any \(\varepsilon \in (0,1)\), there exist a ground truth map \(f_0 : \mathcal{X} \to \mathcal{Y}\) and a finite subset \(\underline{\mathcal{X}} \subset \mathcal{X}\) such that \(Q = \mathrm{Uniform}(\underline{\mathcal{X}})\), i.e., the uniform distribution on \(\underline{\mathcal{X}}\), satisfies both the following inequalities: \[\mathbb{E}_{\boldsymbol{\mathit{Z}} \sim (Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1})^{n}} \mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ (\mathrm{id}_{\mathcal{X}},f_0))} \left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \ge \mu_{\mathrm{err}} := \frac{p-1}{2p},\] \[\mathbb{P}_{\boldsymbol{\mathit{Z}} \sim (Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1})^{n}} \left( \mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ(\mathrm{id}_{\mathcal{X}},f_0))} \left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \ge \varepsilon \right) \ge \delta := \frac{\mu_{\mathrm{err}} - \varepsilon}{1 - \varepsilon} = \frac{p - 1 - 2p\varepsilon}{2p - 2p\varepsilon}.\]
We are interested in the cases where \(|\mathcal{Y}| \ge 2\) and we can take \(p\) so that \(p \ge 2\). If \(p \ge 2\), then \(\mu_{\mathrm{err}} \ge \frac{1}{4}\) and \(\delta \ge \frac{1 - 4\varepsilon}{4 - 4\varepsilon}\). Moreover, if \(\varepsilon = \frac{1}{8}\), then \(\delta \ge \frac{1}{7}\).
The statement (and the original proof in [67]) says that the worst distribution is the uniform distribution, in which the training data size should be at least half of the data space size. It has often been pointed out that the situation where the input distribution is uniform is unlikely to apply to real data, and thus has little implication for real-world machine learning [69], [70]. On the other hand, we have seen in Theorem 2 that the sufficient condition about the training data length is almost of the order of the exponential of the Rényi entropy (recall Remark [rem:DataLengthRenyiRelation]), which can be much smaller than the data space cardinality. It implies that if we know that Rényi entropy is small, then the original no-free-lunch theorem no longer holds since the uniform distribution is no longer allowed. Now, we have two questions. (1) Is there a no-free-lunch theorem where the distribution is uneven, or its Rényi entropy has an upper limit? (2) If yes, is it consistent with Theorem 2? The answers are yes for both.
Theorem 5 (No-free-lunch theorem: the Rényi entropy version). Consider the same setting as in Theorem 4. Specifically, consider a learning problem from a domain set \(\mathcal{X}\) to a codomain set \(\mathcal{Y}\) such that \(|\mathcal{Y}| \ge 1\), i.e., \(\mathcal{Y} \neq \emptyset\). For a probability measure \(Q\) on \(\mathcal{X}\), a ground truth map \(f_0 : \mathcal{X} \to \mathcal{Y}\), denote the 0-1 risk of a hypothesis map \(f : \mathcal{X} \to \mathcal{Y}\) on \(Q\) and \(f_0\) by \(\mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ (\mathrm{id}_{\mathcal{X}}, f_0))}(f)\), which is defined by \[\mathrm{Risk}_{(Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1}, \ell_\textrm{0-1})}(f) = \mathbb{P}_{X \sim Q} ( f(X) \neq f_0(X) ).\] Fix an arbitrary nonnegative integer \(n_0\). Then, the following statement holds. For any map (learning algorithm) \(\mathfrak{A} : (\mathcal{X} \times \mathcal{Y})^{*} \to (\mathcal{X} \to \mathcal{Y})\), any nonnegative integer (training data size) \(n\) that satisfies \(n \le n_{0}\), any finite positive integer \(p\) satisfying \(1 \le p \le |\mathcal{Y}|\), and any \(\varepsilon \in (0,1)\), there exist a ground truth map \(f_0 : \mathcal{X} \to \mathcal{Y}\) and a distribution \(Q\) on \(\mathcal{X}\) satisfying \[\exp\left( H_\alpha(Q) \right) \le 2 n_{0} \quad \textrm{for all } \alpha \in [0,1]\] such that both the inequalities of Theorem 4 hold; that is, both the following inequalities hold: \[\mathbb{E}_{\boldsymbol{\mathit{Z}} \sim (Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1})^{n}} \mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ(\mathrm{id}_{\mathcal{X}},f_0))} \left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \ge \mu_{\mathrm{err}} := \frac{p-1}{2p},\] \[\mathbb{P}_{\boldsymbol{\mathit{Z}} \sim (Q \circ (\mathrm{id}_{\mathcal{X}}, f_0)^{-1})^{n}} \left( \mathrm{Risk}_{(\ell_\textrm{0-1},\, Q \circ (\mathrm{id}_{\mathcal{X}},f_0))} \left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \ge \varepsilon \right) \ge \delta := \frac{\mu_{\mathrm{err}} - \varepsilon}{1 - \varepsilon} = \frac{p - 1 - 2p\varepsilon}{2p - 2p\varepsilon}.\]
Proof. Consider \(\mathcal{X}' \subset \mathcal{X}\) such that \(|\mathcal{X}'| = 2 n_0\). Then \(Q = \mathrm{Uniform}(\mathcal{X}')\) satisfies \(\exp(H_\alpha(Q)) = 2 n_0\), and since \(\frac{1}{2}|\mathcal{X}'| = n_0\), we obtain Theorem 5 by applying Theorem 4 with \(\mathcal{X} = \underline{\mathcal{X}} = \mathcal{X}'\). ◻
Theorem 5 essentially states that if an upper bound (\(2 n_{0}\) in the statement) on \(\exp(H_\alpha(Q))\) is given, learning will fail in the worst case if the training data length is not at least half (i.e., \(n_0\) in the statement) of that upper bound (\(2 n_{0}\)). We remark that Theorem 2 has stated that the sufficient condition with respect to the training data for a good generalisation was also almost proportional to \(\exp(H_\alpha(Q))\), as stated in Remark [rem:DataLengthRenyiRelation]. In this sense, Theorem 2 is tight with respect to the dependency on \(H_\alpha(Q)\). Note that the theorem statement itself does not depend on \(\alpha\). This is because the constructed worst case is a uniform distribution, and the Rényi entropy of a uniform distribution does not depend on the order \(\alpha\).
As stated in Remark [rem:InfiniteEntropy], if Rényi entropy diverges, Theorems 1 and 2 give vacuous upper bounds. However, as also stated in Remark [rem:InfiniteEntropy], such cases are pathological, and since the no-free-lunch theorem discussed in Section 5 applies unconditionally, such cases are inherently unlearnable without additional assumptions.
Can we explain why existing deep learning and other large-scale machine learning models are successful by measuring the Rényi entropy in the environments where they succeed, using the theorems of this research? The answer, unfortunately, is no in practical terms. To reliably estimate the Rényi entropy of a probability distribution, a data size that overwhelmingly exceeds the number of elements in the data space is naturally required [71]. This is equivalent to or greater than the data size sufficient for the success of machine learning, as suggested by Remarks [rem:ModelIndependent] and [rem:DataLengthModelIndependent]. In other words, it is difficult to explain the success of actual large-scale machine learning models using the theory of this research.
However, this is not a drawback specific to this research. There are many attempts to explain the success of deep learning by assuming the true hypothesis class, but in applications where large-scale machine learning models are successful, estimating the true hypothesis class is usually more difficult than the success of the machine learning model itself. And, due to the existence of the no-free-lunch theorem, the success of machine learning cannot be explained without making assumptions about the true hypothesis class or the class of distributions. Due to these circumstances, in general, learning theories for large-scale machine learning models should be regarded not as explaining actual applications, but as showing one possible scenario for the future success of large-scale machine learning models. This paper consists only of mathematical results, which is inevitable.
The phenomenon known as double descent [72], where the generalization gap first increases and then decreases again as the scale of the machine learning model is increased, is known. However, the magnitude of the effect of the double descent phenomenon is known to depend, for example, on the number of training epochs [73], and thus depends on the specific configuration of the learning algorithm. For this reason, the double descent phenomenon cannot be explained in principle within the framework of this paper.
However, experimental results from double descent research also show that when the model scale becomes sufficiently large, the generalization gap is stable with respect to changes in model scale (entering the so-called modern regime). Therefore, for the motivation of this paper, which is to understand the conditions for the success of ultra-large models on large-scale data, double descent is not a direct problem. The test error in the deteriorating part during double descent is also known experimentally to decrease with the number of data points in regions with a certain amount of data or more (e.g., Figure 11 in [73]). Although the theory of this paper does not directly explain the double descent phenomenon, it is not inconsistent with related experimental results.
As already stated in Remarks [rem:ModelIndependent] and [rem:DataLengthModelIndependent], Theorems 1 and 2 are model-independent. The absence of assumptions about the model is an advantage in terms of wide applicability. On the other hand, as a general principle of theoretical analysis, the fewer assumptions a theorem has, the weaker its conclusion.
As stated in the previous section, it is impossible to know the appropriate class containing the true hypothesis or the appropriate class containing the true distribution in actual applications, and it is also impossible to know the appropriate class of models corresponding to them. Therefore, both creating theories with wide applicability at the cost of weaker conclusions and creating theories that provide strong conclusions at the risk of not being theoretically applicable to actual applications are important, and it is not the case that only one is important. This research belongs to the former category in the sense that it makes no assumptions about the model. On the other hand, the direction of trying to obtain stronger conclusions by also placing some assumptions on the smoothness as a function of the model or its information-theoretic complexity is an interesting avenue for future work.
Section 9 in Appendix provides a comprehensive proof of the main theorem (Theorem 1) and explains how the non-trivial generalization gap upper bound can be obtained on the countable data space setting through the method of type. Section 10 in Appendix presents the detail results of what we have introduced in Section 4.4. Specifically, it provides generalization gap bounds and sufficient data lengths for scenarios where the data space is finite, or the data-generating distribution exhibits exponential or power-law decay. Finally, Section 11 in Appendix offers proofs for other supporting theorems and propositions.
In this paper, we derived a model-independent generalization gap upper bound and showed that, under only the assumption that the algorithm is symmetric, there exists a probabilistic upper bound on the generalization gap determined by Rényi entropy, which does not depend on the specific construction or scale of the model. These probabilistic upper bounds directly explain existing experimental results where the behavior of the generalization gap of the same model changes when labels are replaced with a uniform distribution. We also confirmed that the behavior of generalization gap is affected by the unevenness of the distribution using examples of specific probability distributions. While the probabilistic upper bounds on generalization gap provide sufficient conditions for training data length, by extending the no-free-lunch theorem to situations where Rényi entropy is known, we also showed that these upper bounds are, in a sense, necessary conditions.
One interesting future work direction is to extend our framework to stochastic symmetric algorithms, including stochastic gradient descent method and its variants, as already discussed in Remark [rem:FutureStochastic]. Other future directions and limitations are discussed in Appendix. While there is room for extension, the current version of our model-independent generalization gap bounds succussfully justifies the use of even larger machine learning models in the future for real-world problems where the data distribution often deviates significantly from uniform.
Theorem 1 is shown by the Countable Hypothesis Bound theorem (e.g., Theorem 7.7 in [67]). First, we look at the Countable Hypothesis Bound theorem. The Countable Hypothesis Bound theorem can also be regarded as a special version of the PAC-Bayes bound [46].
Theorem 6 (Countable Hypothesis Bound Theorem). Fix a support set \(\mathcal{Z}\), a universal hypothesis set \(\mathcal{H}_{\mathrm{all}}\), and a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on them. Fix a hypothesis set \(\mathcal{H} \subset \mathcal{H}_{\mathrm{all}}\) which is an at most countable set, and a surjective map (numbering) \(h : \mathbb{N}\to \mathcal{H}\) from the set of natural numbers to \(\mathcal{H}\). Also, let \(w : \mathbb{N}\to [0,1]\) be a sub-probability mass function on the set of natural numbers. That is, \(\sum_{j=0}^{+\infty} w(j) \le 1\) holds. Fix an arbitrary probability distribution \(P\) on \(\mathcal{Z}\). If \(\boldsymbol{\mathit{Z}} \sim P^{n}\), then for any \((\delta,\varepsilon) \in (0,1]^{2}\), with probability at least \(1-\delta\), the following holds simultaneously for all \(j \in \mathbb{N}\): \[\mathrm{Risk}_{(\ell, P)}(h(j)) - \mathrm{EmpRisk}_{(\ell, \boldsymbol{\mathit{Z}})}(h(j)) < \mathrm{DI}(\ell)\sqrt{\frac{\ln \frac{1}{w(j)\delta}}{2n}} = \mathrm{DI}(\ell)\sqrt{\frac{\ln \frac{1}{w(j)} + \ln \frac{1}{\delta}}{2n}}.\]
Proof. First, confirm the concentration inequality for a single hypothesis.
Lemma 1. Fix an arbitrary \(h \in \mathcal{H}\). Let \(\boldsymbol{\mathit{Z}} \sim P^{n}\). For any \((\delta,\varepsilon) \in (0,1]^{2}\), if \[n \ge \frac{(\mathrm{DI}(\ell))^{2}}{2\varepsilon^{2}} \ln \frac{2}{\delta},\] then with probability at least \(1-\delta\), \[\bigl|\mathrm{Risk}_{(\ell,P)}(h) - \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{Z}})}(h)\bigr| \le \varepsilon.\] In other words, for any \(\delta \in (0,1]\), with probability at least \(1-\delta\), \[\mathrm{Risk}_{(\ell,P)}(h) - \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{Z}})}(h) \le \mathrm{DI}(\ell)\sqrt{\frac{\ln \frac{1}{\delta}}{2n}}.\]
Proof. From Hoeffding’s inequality, with probability \(1 - 2 \exp\!\left(- \frac{2 n \varepsilon^{2}}{(\mathrm{DI}(\ell))^{2}}\right)\), \[\mathrm{Risk}_{(\ell,P)}(h) - \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{Z}})}(h) \le \varepsilon.\] It is clear from here. ◻
Define the set \(A_{j} \subset \mathcal{Z}^{n}\) as \[A_{j} := \Bigl\{ \boldsymbol{\mathit{z}} \in \mathcal{Z}^{n} \;\Bigm|\; \mathrm{Risk}_{(\ell,P)}(h(j)) - \mathrm{EmpRisk}_{(\ell, \boldsymbol{\mathit{z}})}(h(j)) \ge \mathrm{DI}(\ell)\sqrt{\frac{\ln \frac{1}{w(j)\delta}}{2n}} \Bigr\}.\] Applying Lemma 1 with \(\delta \leftarrow w(j)\delta\), we have \[\mathbb{P}_{\boldsymbol{\mathit{Z}} \sim P^{n}}(\boldsymbol{\mathit{Z}} \in A_{j}) \le w(j)\delta.\] What needs to be proven is \[\mathbb{P}_{\boldsymbol{\mathit{Z}} \sim P^{n}}\left( \forall j \in \mathbb{N},\, \boldsymbol{\mathit{Z}} \notin A_{j} \right) \ge 1-\delta.\] This holds from the following: \[\mathbb{P}_{\boldsymbol{\mathit{Z}} \sim P^{n}}\left( \forall j,\, \boldsymbol{\mathit{Z}} \notin A_{j} \right) = 1 - \mathbb{P}_{\boldsymbol{\mathit{Z}} \sim P^{n}}\left( \boldsymbol{\mathit{Z}} \in \bigcup_{j=0}^{+\infty} A_{j} \right) \ge 1 - \sum_{j=0}^{+\infty} \mathbb{P}_{\boldsymbol{\mathit{Z}} \sim P^{n}}(\boldsymbol{\mathit{Z}} \in A_{j}) \ge 1 - \delta,\] where the last inequality used \(\sum_{j=0}^{+\infty} w(j) \le 1\). ◻
When applying the Countable Hypothesis Bound theorem, the problem is how to define the sub-probability distribution \(w\) on the hypothesis set \(\mathcal{H}\). Note that in Theorem 6, \(w\) is formally a sub-probability distribution on \(\mathbb{N}\), but if we consider the case where \(h\) is a bijection, \(w\) can be interpreted as a sub-probability distribution on \(\mathcal{H}\). That is, the problem is how to assign a sub-probability mass \(w(h)\) to each hypothesis \(h \in \mathcal{H}\).
Since we want to obtain a model-independent generalization gap upper bound, we want to assign a sub-probability mass that does not depend on the construction of \(h\). Therefore, what we should consider is the sub-probability mass based on the data \(\boldsymbol{\mathit{z}}\) when the output of the learning algorithm is \(h\). Then, when \(h\) is output by the learning algorithm \(\mathfrak{A}\), we want to choose \(w : \mathcal{H} \to [0,1]\) such that \(\ln \frac{1}{w(h)}\) is as small as possible.
At this time, considering a general learning algorithm \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}\), the effective hypothesis set is \(\{ \mathfrak{A}(\boldsymbol{\mathit{z}}) \mid \boldsymbol{\mathit{z}} \in \mathcal{Z}^{n} \}\). In the worst case, if \(\boldsymbol{\mathit{z}} \ne \boldsymbol{\mathit{z}}'\), then \(\mathfrak{A}(\boldsymbol{\mathit{z}}) \ne \mathfrak{A}(\boldsymbol{\mathit{z}}')\) always holds, which is equivalent to \(\bigl|\{ \mathfrak{A}(\boldsymbol{\mathit{z}}) \mid \boldsymbol{\mathit{z}} \in \mathcal{Z}^{n} \}\bigr| = |\mathcal{Z}|^{n}\) if \(\mathcal{Z}\) is a finite set.
Suppose for some \(h \in \mathcal{H}\) there exists \(\boldsymbol{\mathit{z}} \in \mathcal{Z}^{n}\) such that \(h = \mathfrak{A}(\boldsymbol{\mathit{z}})\). If \(\boldsymbol{\mathit{Z}} \sim Q^{n}\), then \[\mathbb{P}(h = \mathfrak{A}(\boldsymbol{\mathit{Z}})) = Q^{n}(\boldsymbol{\mathit{z}}) = \prod_{i=1}^{n} Q(z_{i}).\] In this case, from a fundamental theorem of information theory, no matter how \(w\) is defined, the expected value of \(\ln \frac{1}{w(\mathfrak{A}(\boldsymbol{\mathit{Z}}))}\) cannot be less than \(n H_{1}(Q)\), where \(Q\) is the distribution that generates each \(Z_{i}\). Substituting a function linear in \(n\) into the \(\ln \frac{1}{w(h)}\) part of the Countable Hypothesis Bound theorem, the upper bound on generalization gap does not converge to \(0\) in the limit \(n \to +\infty\). Thus, no meaningful upper bound is obtained.
However, if \(\mathfrak{A}\) is symmetric, then if \(\mathcal{Z}\) is a finite set, \[\bigl|\{ \mathfrak{A}(\boldsymbol{\mathit{z}}) \mid \boldsymbol{\mathit{z}} \in \mathcal{Z}^{n} \}\bigr| = \frac{(|\mathcal{Z}| + n - 1)!}{(|\mathcal{Z}| - 1)!\, n!} \le (|\mathcal{Z}| + n - 1)^{|\mathcal{Z}|-1}\] is polynomial in \(n\), which is much smaller than \(|\mathcal{Z}|^{n}\). Therefore, a much larger sub-probability mass can be assigned to each element of \(\{ \mathfrak{A}(\boldsymbol{\mathit{z}}) \mid \boldsymbol{\mathit{z}} \in \mathcal{Z}^{n} \}\) than in the non-symmetric case, and the linearity of \(\ln \frac{1}{w(h)}\) with respect to \(n\) can be avoided. This is, essentially, the method of types [45], which has developed information theory. This is the main trick of our non-trivial generalization gap bound. Here, the countability of the data space \(\mathcal{Z}\) is actively used.
The specific assignment uses the probability mass with which that hypothesis is actually selected. Below, if necessary, add dummy elements to make \(\mathcal{Z}\) a countably infinite set, and let \(z : \mathbb{N}\to \mathcal{Z}\) be a fixed bijection (numbering).
First, convert the symmetric algorithm \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}\) that returns a hypothesis from a data sequence into an equivalent algorithm \(\mathfrak{A}' : \mathbb{N}^{\mathbb{N}} \to \mathcal{H}\) that returns a hypothesis from a histogram. Here, \(\mathfrak{A}(\boldsymbol{\mathit{z}}) = \mathfrak{A}'(\mathrm{Hist}_{\boldsymbol{\mathit{z}}})\). \(\mathrm{Hist}_{\boldsymbol{\mathit{z}}}\) is the histogram of \(\boldsymbol{\mathit{z}}\), and if \(\boldsymbol{\mathit{n}} = (n_{0},n_{1},\dots) = \mathrm{Hist}_{\boldsymbol{\mathit{z}}}\), then \[n_{j} = \sum_{i=1}^{n} \mathbb{1}(z_{i} = z(j)).\]
Below, for simplicity, assume that if \(\boldsymbol{\mathit{n}} \ne \boldsymbol{\mathit{n}}'\), then \(\mathfrak{A}'(\boldsymbol{\mathit{n}}) \ne \mathfrak{A}'(\boldsymbol{\mathit{n}}')\). If this does not hold, a larger sub-probability mass can be assigned, so the generalization gap upper bound can be made smaller, and thus we do not need to consider it. In this case, define \(w(h)\) as \[w(h) := \mathbb{P}_{\boldsymbol{\mathit{Z}} \sim Q^{n}}\left( \mathfrak{A}'(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}) = h \right).\] Then, \(w(h)\) as a distribution is eventually equivalent to the multinomial distribution \(\mathrm{Mult}_{(Q,n)}\) induced by an i.i.d.discrete distribution with data length \(n\) and probability distribution \(Q\). Here, \[\mathrm{Mult}_{(Q,n)}(n_{0},n_{1},\dots) := \binom{n}{n_{0},n_{1},\dots} \prod_{j=0}^{+\infty} q_{j}^{n_{j}},\] where \(q_{j} = Q(z(j))\) for \(j \in \mathbb{N}\).
Henceforth, we evaluate the self-entropy \(\ln \frac{1}{\mathrm{Mult}_{(Q,n)}(\boldsymbol{\mathit{n}})}\) of the multinomial distribution. In particular, we are interested in a probabilistic upper bound.
What we want to evaluate is a probabilistic non-asymptotic upper bound on the following normalized self-entropy of a histogram \((n_{0},n_{1},\dots)\) on the multinomial distribution induced by \(n\) i.i.d.data points generated by the discrete distribution \(Q\) defined on \(\mathcal{Z}\): \[\frac{1}{n} I_{(Q,n)}(n_{0},n_{1},\dots) := \frac{1}{n} \ln \frac{1}{\mathrm{Mult}_{(Q,n)}(\boldsymbol{\mathit{n}})} = - \frac{1}{n} \ln \left( \binom{n}{n_{0},n_{1},\dots} \prod_{j=0}^{+\infty} q_{j}^{n_{j}} \right). \label{def-SelfEntropy}\tag{1}\] Here, \(n_{j}\) corresponds to the number of data points whose value is \(z(j)\).
For factorials, the following formula is used.
Lemma 2 (Robbins’ Stirling’s Formula [74]). For any \(n \in \mathbb{N}_{>0}\), where \(\mathbb{N}_{>0} := \{1, 2, ...\}\), there exists \[\frac{1}{12 n + 1} < \theta_{n} < \frac{1}{12 n}\] such that \[n! = \sqrt{2\pi}\, n^{n + 1/2} e^{-n} e^{\theta_{n}}, \quad\text{i.e.}\quad \ln n! = \left(n + \tfrac{1}{2}\right) \ln n - n + \tfrac{1}{2} \ln(2\pi) + \theta_{n}.\]
Thus, for \((n_{1},\dots,n_{k}) \in \mathbb{N}_{>0}^{k}\), \[(2\pi)^{\frac{1-k}{2}} \frac{n^{n + 1/2}}{\prod_{i=1}^{k} n_{i}^{\,n_{i} + 1/2}} \exp(A) \;<\; \binom{n}{n_{1},\dots,n_{k}} \;<\; (2\pi)^{\frac{1-k}{2}} \frac{n^{n + 1/2}}{\prod_{i=1}^{k} n_{i}^{\,n_{i} + 1/2}} \exp(B),\] where \[A = \frac{1}{12n+1} - \sum_{j=1}^{k} \frac{1}{12n_{j}}, \qquad B = \frac{1}{12n} - \sum_{j=1}^{k} \frac{1}{12n_{j}+1}.\]
Lemma 3 (Multinomial Coefficient Estimation). Let \(\boldsymbol{\mathit{n}} \in \mathbb{N}_{>0}^{k}\), and let \(n = \|\boldsymbol{\mathit{n}}\|_{1} := \sum_{j=0}^{k-1} n_{j}\). There exists \(\theta_{(n,\boldsymbol{\mathit{n}})}\) such that \(|\theta_{(n,\boldsymbol{\mathit{n}})}| \le \frac{k}{12n}\) and \[\ln \binom{n}{n_{1},n_{2},\dots,n_{k}} = n H_{1}\left(\frac{\boldsymbol{\mathit{n}}}{n}\right) + \frac{1}{2}\left( \ln n - \sum_{j=1}^{k} \ln n_{j} \right) + \frac{1}{2}(k-1)\ln(2\pi) + \theta_{(n,\boldsymbol{\mathit{n}})}.\] Here, \(H_{1}(\boldsymbol{\mathit{n}}/n)\) is the Shannon entropy (i.e., Rényi entropy of order \(1\)) when the normalized histogram \(\boldsymbol{\mathit{n}}/n\) is regarded as a discrete probability distribution.
Proof. It can be derived as follows using Lemma 2. \[\begin{align} \ln \binom{n}{n_{1},\dots,n_{k}} &= \left(n + \frac{1}{2}\right) \ln n - \sum_{j=1}^{k} \left(n_{j} + \frac{1}{2}\right) \ln n_{j} - \frac{1}{2}(k-1)\ln(2\pi) + \theta_{n} - \sum_{j=1}^{k} \theta_{n_{j}} \\ &= n\left(- \sum_{j=1}^{k} \frac{n_{j}}{n} \ln \frac{n_{j}}{n}\right) + \frac{1}{2}\left(\ln n - \sum_{j=1}^{k} \ln n_{j}\right) + \frac{1}{2}(k-1)\ln(2\pi) + \theta_{(n,\boldsymbol{\mathit{n}})} \\ &= n H_{1}\left(\frac{\boldsymbol{\mathit{n}}}{n}\right) + \frac{1}{2}\left(\ln n - \sum_{j=1}^{k} \ln n_{j}\right) + \frac{1}{2}(k-1)\ln(2\pi) + \theta_{(n,\boldsymbol{\mathit{n}})}, \end{align}\] where \(\theta_{(n,\boldsymbol{\mathit{n}})} := \theta_{n} - \sum_{i=1}^{k} \theta_{n_{i}}\) satisfies \(|\theta_{(n,\boldsymbol{\mathit{n}})}| \le \frac{k}{12n}\). ◻
Lemma 4 (Upper Bound on the Self-Entropy of a Multinomial Distribution). Let \(\boldsymbol{\mathit{q}} := (q_{0},q_{1},\dots)\), where \(q_{j} = Q(z(j))\). Then, for the self entropy of the multinomial distribution defined by 1 , we have \[\frac{1}{n} I_{(Q,n)}(n_{0},n_{1},\dots) \le D_{\mathrm{KL}}\left( \frac{\boldsymbol{\mathit{n}}}{n} \,\bigg\|\, \boldsymbol{\mathit{q}} \right) + \frac{\|\boldsymbol{\mathit{n}}\|_{0} - 1}{2n} \ln n + \frac{\|\boldsymbol{\mathit{n}}\|_{0}}{2n} \ln(2\pi).\] Here, \(D_{\mathrm{KL}}\) is the Kullback–Leibler divergence, and the normalized non-negative sequences \(\boldsymbol{\mathit{n}}/n\) and \(\boldsymbol{\mathit{q}}\) are regarded as discrete probability distributions.
Proof. We have \[\begin{align} \frac{1}{n} I_{(Q,n)}(n_{0},n_{1},\dots) &= - \frac{1}{n} \ln \binom{n}{n_{0},n_{1},\dots} \prod_{j=0}^{+\infty} q_{j}^{\,n_{j}} \\ &= - \frac{1}{n} \ln \binom{n}{n_{0},n_{1},\dots} - \sum_{j=0}^{+\infty} \frac{n_{j}}{n} \ln q_{j} \\ &= - \frac{1}{n} \ln \binom{n}{n_{0},n_{1},\dots} - \sum_{j=0}^{+\infty} \frac{n_{j}}{n} \ln \frac{q_{j}}{n_{j}/n} - \sum_{j=0}^{+\infty} \frac{n_{j}}{n} \ln \frac{n_{j}}{n} \\ &= - \frac{1}{n} \ln \binom{n}{n_{0},n_{1},\dots} + D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{n}}}{n} \,\bigg\|\, \boldsymbol{\mathit{q}} \right) + H_{1}\left(\frac{\boldsymbol{\mathit{n}}}{n}\right). \end{align}\]
Let \(\|\boldsymbol{\mathit{n}}\|_{0} := \sum_{j=0}^{+\infty} \mathbb{1}(n_{j} > 0)\), and let \(\tilde{\boldsymbol{\mathit{n}}} \in \mathbb{N}^{\|\boldsymbol{\mathit{n}}\|_{0}}\) be the sequence formed by collecting only the positive elements of \(\boldsymbol{\mathit{n}}\) (the order does not affect the discussion). For example, if \(\boldsymbol{\mathit{n}} = (0,3,4,0,1,0,0,0,\dots)\), then \(\tilde{\boldsymbol{\mathit{n}}} = (3,4,1)\). In this case, \[\binom{n}{n_{0},n_{1},\dots} = \binom{n}{\tilde{n}_{0},\tilde{n}_{1},\dots,\tilde{n}_{\|\boldsymbol{\mathit{n}}\|_{0}-1}}, \qquad H_{1}\left(\frac{\boldsymbol{\mathit{n}}}{n}\right) = H_{1}\left(\frac{\tilde{\boldsymbol{\mathit{n}}}}{n}\right).\] From this, \[\frac{1}{n} I_{(Q,n)}(n_{0},n_{1},\dots) = - \frac{1}{n} \ln \binom{n}{\tilde{n}_{0},\dots,\tilde{n}_{\|\boldsymbol{\mathit{n}}\|_{0}-1}} + D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{n}}}{n} \,\bigg\|\, \boldsymbol{\mathit{q}} \right) + H_{1}\left(\frac{\tilde{\boldsymbol{\mathit{n}}}}{n}\right).\] For the binomial part, using Lemma 3, and noting that \(H_{1}(\tilde{\boldsymbol{\mathit{n}}}/n)\) cancels out, we obtain \[\begin{align} \frac{1}{n} I_{(Q,n)}(n_{0},n_{1},\dots) &= D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{n}}}{n} \,\bigg\|\, \boldsymbol{\mathit{q}} \right) + \frac{1}{2n}\left(\sum_{j=0}^{\|\boldsymbol{\mathit{n}}\|_{0}-1} \ln \tilde{n}_{j} - \ln n\right) + \frac{\|\boldsymbol{\mathit{n}}\|_{0}-1}{2n} \ln(2\pi) + \frac{\theta_{(n,\tilde{\boldsymbol{\mathit{n}}})}}{n} \\ &\le D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{n}}}{n} \,\bigg\|\, \boldsymbol{\mathit{q}} \right) + \frac{\|\boldsymbol{\mathit{n}}\|_{0}-1}{2n} \ln n + \frac{\|\boldsymbol{\mathit{n}}\|_{0}}{2n} \ln(2\pi). \end{align}\] ◻
Lemma 5 (KL Upper Bound). Let \(\boldsymbol{\mathit{q}} := (q_{0},q_{1},\dots)\), where \(q_{j} = Q(z(j))\). For any \(k \in \mathbb{N}_{>0}\) and \(\varepsilon > 0\), \[\mathbb{P}_{\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}}\left( D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \middle\| \boldsymbol{\mathit{q}} \right) > \varepsilon \;\text{ and }\; \|\boldsymbol{\mathit{N}}\|_{0} = k \right) \le (n+1)^{k-1} \exp(-n\varepsilon).\] Here, \(D_{\mathrm{KL}}\) is the Kullback–Leibler divergence, and the normalized non-negative sequences \(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}}\) and \(\boldsymbol{\mathit{q}}\) are regarded as discrete probability distributions.
Proof. In this proof, \(\mathcal{Z}\) is identified with the set of natural numbers \(\mathbb{N}\), and \(Q\) is defined on \(\mathbb{N}\). Recall that we define the frequency \(\mathrm{Freq}_{\boldsymbol{\mathit{Z}}}\) of \(\boldsymbol{\mathit{Z}}\) by \(\mathrm{Freq}_{\boldsymbol{\mathit{Z}}} := \frac{\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}}{\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{1}}\).
Let \(\boldsymbol{\mathit{Z}} = (Z_{1},\dots,Z_{n}) \sim Q^{n}\), i.e., \(Z_{1},\dots,Z_{n}\) are i.i.d.random variables generated by \(Q\). We can construct \(\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}\) by \(\boldsymbol{\mathit{N}} := \mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\), where the histogram \(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\) is \(\mathbb{N}^{\mathbb{N}}\)-valued, whose \(j\)-th element is \[[\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}]_{j} = \sum_{i=1}^{n} \mathbb{1}(Z_{i} = z(j)).\]
Now we have \[Q^{n}(\boldsymbol{\mathit{Z}}) = \prod_{j=0}^{+\infty} q_{j}^{[\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}]_{j}} = \prod_{j=0}^{+\infty} q_{j}^{N_{j}}.\] That is, \[\begin{align} - \frac{1}{n} \ln Q^{n}(\boldsymbol{\mathit{Z}}) &= - \sum_{j=0}^{+\infty} \frac{N_{j}}{n} \ln q_{j} \notag \\ &= - \sum_{j=0}^{+\infty} \frac{N_{j}}{n} \ln \frac{q_{j}}{N_{j}/n} - \sum_{j=0}^{+\infty} \frac{N_{j}}{n} \ln \frac{N_{j}}{n} \notag \\ &= D_{\mathrm{KL}}\left( \frac{\boldsymbol{\mathit{N}}}{n}\middle\| \boldsymbol{\mathit{q}} \right) + H_{1}\left( \frac{\boldsymbol{\mathit{N}}}{n} \right) = D_{\mathrm{KL}}\left( \frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}}\middle\| \boldsymbol{\mathit{q}} \right) + H_{1}\left( \frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \right). \label{eqn-QHD} \end{align}\tag{2}\]
Define \[\mathcal{P}_{n,k} := \{ \boldsymbol{\mathit{p}} \in \mathbb{N}^{\mathbb{N}} \mid \|\boldsymbol{\mathit{p}}\|_{0} = k \}.\] We have the following, using \(\boldsymbol{\mathit{N}} = \mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\) and \(\mathrm{Freq}_{\boldsymbol{\mathit{Z}}} := \frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}}\): \[\begin{align} &\mathbb{P}_{\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}}\left( D_{\mathrm{KL}} \left(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \middle\| \, \boldsymbol{\mathit{q}}\right) > \varepsilon \text{ and } \|\boldsymbol{\mathit{N}}\|_{0} = k \right) \\ &= \mathbb{P}_{\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}}\left( D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \middle\| \, \boldsymbol{\mathit{q}}\right) > \varepsilon \text{ and } \left\|\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}}\right\|_{0} = k \right) \\ &= \mathbb{P}_{\boldsymbol{\mathit{Z}} \sim Q^{n}}\left( D_{\mathrm{KL}} \left(\mathrm{Freq}_{\boldsymbol{\mathit{Z}}} \middle\| \, \boldsymbol{\mathit{q}}\right) > \varepsilon \text{ and } \|\mathrm{Freq}_{\boldsymbol{\mathit{Z}}}\|_{0} = k \right) \\ &= \sum_{\hat{\boldsymbol{\mathit{p}}} \in \mathcal{P}_{n,k}} \mathbb{1}\left( D_{\mathrm{KL}}(\hat{\boldsymbol{\mathit{p}}} \,\|\, \boldsymbol{\mathit{q}}) > \varepsilon \right) \, \mathbb{P}_{\boldsymbol{\mathit{Z}} \sim Q^{n}}\left( \mathrm{Freq}_{\boldsymbol{\mathit{Z}}} = \hat{\boldsymbol{\mathit{p}}} \right) \\ &= \sum_{\hat{\boldsymbol{\mathit{p}}} \in \mathcal{P}_{n,k}} \mathbb{1}\left( D_{\mathrm{KL}}(\hat{\boldsymbol{\mathit{p}}} \,\|\, \boldsymbol{\mathit{q}}) > \varepsilon \right) \sum_{\boldsymbol{\mathit{z}} \in \{ \boldsymbol{\mathit{z}}' \mid \mathrm{Freq}_{\boldsymbol{\mathit{z}}'} = \hat{\boldsymbol{\mathit{p}}} \}} Q^{n}(\boldsymbol{\mathit{z}}) \\ &\le \sum_{\hat{\boldsymbol{\mathit{p}}} \in \mathcal{P}_{n,k}} \exp\left( n H_{1}(\hat{\boldsymbol{\mathit{p}}}) \right) \exp\left( -n(\varepsilon + H_{1}(\hat{\boldsymbol{\mathit{p}}})) \right) \\ &\le (n-1)^{k-1} \exp(-n \varepsilon). \end{align}\] Here we used the fact that for a fixed type the number of sequences of that type is at most \(\exp(n H_{1}(\hat{\boldsymbol{\mathit{p}}}))\), and the bound 2 . ◻
Lemma 6. When \(\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}\), the following holds with probability at least \(1-\delta\): \[D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \middle\|\, Q \right) \le \frac{1}{n} \left( (\|\boldsymbol{\mathit{N}}\|_{0}-1) \ln(n-1) + \ln \tfrac{1}{\delta} \right).\]
Proof. From Lemma 5, \[\delta = (n-1)^{k-1} \exp(-n\varepsilon) \iff \varepsilon = \frac{1}{n}\left( (k-1)\ln(n-1) + \ln \tfrac{1}{\delta} \right).\] Therefore, for \(\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}\), with probability at least \(1-\delta\), \[D_{\mathrm{KL}}\left(\frac{\boldsymbol{\mathit{N}}}{\|\boldsymbol{\mathit{N}}\|_{1}} \middle\|\, Q \right) \le \frac{1}{n}\left( (\|\boldsymbol{\mathit{N}}\|_{0}-1)\ln(n-1) + \ln \tfrac{1}{\delta} \right).\] ◻
Lemma 7 (Concentration inequality for \(\|\boldsymbol{\mathit{N}}\|_{0}\)). When \(\boldsymbol{\mathit{N}} \sim \mathrm{Mult}_{(Q,n)}\), the following holds with probability at least \(1-\delta\): \[\bigl| \|\boldsymbol{\mathit{N}}\|_{0} - \mathbb{E}\|\boldsymbol{\mathit{N}}\|_{0} \bigr| < \sqrt{ \frac{n}{2} \ln \frac{2}{\delta} }.\]
Proof. \(\boldsymbol{\mathit{N}}\) can be constructed using \(\boldsymbol{\mathit{X}} \sim Q^{n}\) as \(\boldsymbol{\mathit{N}} = \mathrm{Hist}_{\boldsymbol{\mathit{X}}}\). If \(\boldsymbol{\mathit{x}}, \boldsymbol{\mathit{x}}' \in \mathbb{N}^{n}\) differ only in the \(i\)-th component, which are \(x_{i}\) and \(x_{i}'\) respectively, then \[\bigl| \|\mathrm{Hist}_{\boldsymbol{\mathit{x}}}\|_{0} - \|\mathrm{Hist}_{\boldsymbol{\mathit{x}}'}\|_{0} \bigr| \le 1.\] Therefore, applying McDiarmid’s inequality to \(\|\mathrm{Hist}_{\boldsymbol{\mathit{x}}}\|_{0}\) completes the proof. ◻
Lemma 8 (Upper bound of the expectation of \(\|\boldsymbol{\mathit{N}}\|_{0}\) using Rényi entropy). For any \(Q\) and \(\alpha \in [0,1]\), (assuming \(0^{0} = 0\),) \[\mathbb{E}_{\boldsymbol{\mathit{N}} \sim \mathrm{Mult}(Q,n)} \bigl[ \|\boldsymbol{\mathit{N}}\|_{0} \bigr] \le n^{\alpha} \sum_{j=0}^{+\infty} q_{j}^{\alpha} = n^{\alpha} \exp\left( (1-\alpha) H_{\alpha}(Q) \right).\]
Proof. For \(x \in [0,1]\), we have \(x \le x^{\alpha}\) if \(\alpha \in [0,1]\). Therefore \(y \ge 0 \Rightarrow \min\{1,y\} \le y^{\alpha}\).
\[\mathbb{E}_{\boldsymbol{\mathit{N}} \sim \mathrm{Mult}(Q,n)} \bigl[ \|\boldsymbol{\mathit{N}}\|_{0} \bigr] = \sum_{j=0}^{+\infty} \left( 1 - (1 - q_{j})^{n} \right) \le \sum_{j=0}^{+\infty} \min\{1, n q_{j}\} \le n^{\alpha} \sum_{j=0}^{+\infty} q_{j}^{\alpha} = n^{\alpha} \exp\left( (1-\alpha) H_{\alpha}(Q) \right).\] ◻
Proof of Theorem 1. From the countable hypothesis bound theorem (Theorem 6) with \[w(h) = \mathrm{Mult}_{(Q,n)}(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}})\] where \(\boldsymbol{\mathit{Z}}\) satisfies \(\mathfrak{A}(\boldsymbol{\mathit{Z}}) = h\), the following inequality holds with probability \(1-\delta_{1}\): \[\mathrm{Risk}_{(\ell,Q)}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) - \mathrm{EmpRisk}_{(\ell,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \le \mathrm{DI}(\ell) \sqrt{ \frac{ - \ln \mathrm{Mult}_{(Q,n)}(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}) + \ln \tfrac{1}{\delta_{1}} }{2n} }.\] Also, from the evaluation of self-entropy (Lemma 4) by Stirling’s inequality, it always holds that \[- \frac{1}{n} \ln \mathrm{Mult}_{(Q,n)}(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}) \le D_{\mathrm{KL}}\left( \frac{\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}}{n} \middle\|\, Q \right) + \frac{\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{0} - 1}{2n} \ln n + \frac{\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{0}}{2n} \ln(2\pi).\] Also, from the concentration inequality (Lemma 6) for \(D_{\mathrm{KL}}(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}/n \,\|\, Q)\), with probability \(1-\delta_{2}\), \[D_{\mathrm{KL}}\left( \mathrm{Hist}_{\boldsymbol{\mathit{Z}}}/n \,\|\, Q \right) \le \frac{1}{n}\left( (\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{0} - 1)\ln(n-1) + \ln \tfrac{1}{\delta_{2}} \right).\] That is, with probability at least \(1-\delta_{2}\), \[- \frac{1}{n} \ln \mathrm{Mult}_{(Q,n)}(\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}) \le \frac{\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{0}}{2n} \left( 3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}} \right).\] Furthermore, by Lemmas 7 and 8, for any \(\alpha \in [0,1]\), with probability at least \(1-\delta_{3}\), \[\|\mathrm{Hist}_{\boldsymbol{\mathit{Z}}}\|_{0} \le n^{\alpha} \exp\left( (1-\alpha) H_{\alpha}(Q) \right) + \sqrt{\frac{n}{2} \ln \frac{1}{\delta_{3}} } = \kappa_{(Q,\alpha)}(n) + \sqrt{\frac{n}{2} \ln \frac{1}{\delta_{3}} }.\] This completes the proof. ◻
If it is known that the data space \(\mathcal{Z}\) is a finite set, then at least \(H_{0}(Q) = \ln |\mathcal{Z}|\) can be said, so the following holds.
Corollary 1 (Generalization gap upper bound for a finite set). Fix a universal hypothesis set \(\mathcal{H}_{\mathrm{all}}\), a data space \(\mathcal{Z}\) which is a finite set, and a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on their Cartesian product. Define \(\mathrm{DI}(\ell)\) as in Theorem 1. Let \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}_{\mathrm{all}}\) be a symmetric machine learning algorithm in the sense of Definition 4.
When \(n \in \mathbb{N}_{>0}\) and \(\boldsymbol{\mathit{Z}} = (Z_{1},\dots,Z_{n}) \sim Q^{n}\), for any \(\delta_{1},\delta_{2},\delta_{3} > 0\), the following holds with probability at least \(1-(\delta_{1}+\delta_{2}+\delta_{3})\): \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \le \mathrm{DI}(\ell) \sqrt{ \frac{ \left( |\mathcal{Z}| + \sqrt{ \tfrac{n}{2} \ln \tfrac{2}{\delta_{3}} } \right) \left( 3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}} \right) + \ln \tfrac{1}{\delta_{1}} }{2n} }.\] Alternatively, for any \(\delta,\varepsilon > 0\), if \[n > \max \Bigl\{ 24 |\mathcal{Z}| \ln |\mathcal{Z}| \cdot \frac{1}{\varepsilon^{2}} \ln \frac{12}{\varepsilon^{2}},\; \omega(\delta,\varepsilon) \Bigr\},\] then, when \(\boldsymbol{\mathit{Z}} \sim Q^{n}\), with probability at least \(1-\delta\), \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) < \mathrm{DI}(\ell)\,\varepsilon.\]
The required data size when \(\mathcal{Z}\) is a finite set is \(O(|\mathcal{Z}| \ln |\mathcal{Z}|)\), which is the same order as the coupon collector’s problem with \(|\mathcal{Z}|\) coupons.
Corollary 1 holds whenever \(\mathcal{Z}\) is a finite set, but it does not use the unevenness of the probability distribution. As a result, the conclusion that a data length of \(O(|\mathcal{Z}|\ln|\mathcal{Z}|)\) is sufficient is obtained, but this conclusion is not very interesting in real-world machine learning because \(|\mathcal{Z}|\) is large. This section and the next section derive better generalization gap upper bounds by actively using information about the decay rate of the probability distribution.
Corollary 2 (Generalization gap upper bound for exponentially decaying probability distributions). Fix a universal hypothesis set \(\mathcal{H}_{\mathrm{all}}\), a data space \(\mathcal{Z}\) which is a countably infinite set, and a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on their Cartesian product. Define \(\mathrm{DI}(\ell)\) as in Theorem 1. Let \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}_{\mathrm{all}}\) be a symmetric machine learning algorithm in the sense of Definition 4.
Assume that the (discrete) probability distribution \(Q\) decays exponentially. That is, assume there exist a bijection (numbering) \(z : \mathbb{N}\to \mathcal{Z}\) and \(r \in (0,1)\), \(C > 0\) such that for \(j \in \mathbb{N}\), \(Q(z(j)) \le C r^{j}\).
When \(n \in \mathbb{N}_{>0}\) and \(\boldsymbol{\mathit{Z}} = (Z_{1},\dots,Z_{n}) \sim Q^{n}\), for any \(\delta_{1},\delta_{2},\delta_{3} > 0\), the following holds with probability at least \(1-(\delta_{1}+\delta_{2}+\delta_{3})\): \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \le \mathrm{DI}(\ell) \sqrt{ \frac{ \left( \tfrac{eC}{\ln \frac{1}{r}} (\ln n + \ln \tfrac{1}{r}) + \sqrt{ \tfrac{n}{2} \ln \tfrac{2}{\delta_{3}} } \right) \left( 3\ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}} \right) + \ln \tfrac{1}{\delta_{1}} }{2n} }.\] Alternatively, for any \(\delta,\varepsilon \in (0,1]\), if \(n > \omega(\delta,\varepsilon)\) and, letting \(\tilde{C} := \max\{C,1\}\), \[\begin{align} n > {} & \max \left\{ \frac{36 e \tilde{C}}{\varepsilon^{2} \ln \frac{1}{r}} \left( \ln \frac{36 e \tilde{C}}{\varepsilon^{2} \ln \frac{1}{r}} \right)^{2}, \frac{12 e \tilde{C}}{\varepsilon^{2}} \left( 3 + \frac{\ln \frac{6 \pi e^{3}}{\delta}}{\ln \frac{1}{r}} \right) \ln \left( \frac{6 e \tilde{C}}{\varepsilon^{2}} \left( 3 + \frac{\ln \frac{6 \pi e^{3}}{\delta}}{\ln \frac{1}{r}} \right) \right), \frac{6 e \tilde{C}}{\varepsilon^{2}} \left( 1 + \frac{1}{\ln \frac{1}{r}} \right) \ln \frac{2 \pi}{\delta} \right\}, \end{align}\] then, when \(\boldsymbol{\mathit{Z}} \sim Q^{n}\), with probability at least \(1-\delta\), \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) < \mathrm{DI}(\ell)\,\varepsilon.\]
In Corollary 2, the main term of the sufficient condition for data length \(n\) is \[O\!\left( \frac{1}{\varepsilon^{2} \ln \frac{1}{r}} \left( \ln \tfrac{1}{\varepsilon^{2} \ln \frac{1}{r}} \right)^{2} \right)\] with respect to \(\varepsilon\) and \(r\). The faster the tail probability decays, i.e., the smaller \(r\) is, the smaller the required data length. Also, the order with respect to \(\varepsilon\) is roughly \(1/\varepsilon^{2}\), which is an order often shown in many learning theories (e.g., global Rademacher complexity).
For example, in natural language, phenomena with power-law decaying distributions, such as Zipf’s law [58], frequently appear [59]–[66]. Therefore, whether machine learning generalizes for phenomena following these distributions is an important problem.
In fact, it can be said that even for power-law decaying probability distributions, generalization is possible, although it requires more training data compared to the case of exponentially decaying distributions, as follows.
Corollary 3 (Generalization gap upper bound for power-law decaying probability distributions). Fix a universal hypothesis set \(\mathcal{H}_{\mathrm{all}}\), a data space \(\mathcal{Z}\) which is a countably infinite set, and a loss function \(\ell : \mathcal{H}_{\mathrm{all}} \times \mathcal{Z} \to \mathbb{R}\) defined on their Cartesian product. Define \(\mathrm{DI}(\ell)\) as in Theorem 1. Let \(\mathfrak{A} : \mathcal{Z}^{*} \to \mathcal{H}_{\mathrm{all}}\) be a symmetric machine learning algorithm in the sense of Definition 4.
Assume that the (discrete) probability distribution \(Q\) decays according to a power law. That is, assume there exist a bijection (numbering) \(z : \mathbb{N}\to \mathcal{Z}\) and \(C>0\), \(\gamma > 1\) such that for \(j \in \mathbb{N}\), \(Q(z(j)) \le C (j+1)^{-\gamma}\).
When \(n \in \mathbb{N}_{>0}\) and \(\boldsymbol{\mathit{Z}} = (Z_{1},\dots,Z_{n}) \sim Q^{n}\), for any \(\delta_{1},\delta_{2},\delta_{3} > 0\), the following holds with probability at least \(1-(\delta_{1}+\delta_{2}+\delta_{3})\): \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) \le \mathrm{DI}(\ell) \sqrt{ \frac{ \left( \tfrac{e \tilde{C}}{\gamma-1} n^{\frac{1}{\gamma}} (\ln n + \gamma) + \sqrt{ \tfrac{n}{2} \ln \tfrac{2}{\delta_{3}} } \right) \left( 3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}} \right) + \ln \tfrac{1}{\delta_{1}} }{2n} },\] where \(\tilde{C} := \max\{C,1\}\).
Alternatively, for any \(\delta,\varepsilon \in (0,1]\), if \(n > \omega(\delta,\varepsilon)\) and \[\begin{align} n > \max \Biggl\{ & \left( \frac{9 e \tilde{C}}{\varepsilon^{2}(\gamma-1)} \right)^{\frac{\gamma}{\gamma-1}} \left( \frac{4\gamma}{\gamma-1} \Bigl[ \ln \frac{2\gamma}{\gamma-1} + \frac{1}{2} \ln \frac{9 e \tilde{C}}{\varepsilon^{2}(\gamma-1)} \Bigr]_{+} \right)^{\frac{2\gamma}{\gamma-1}}, \\ & \left( \frac{6 e \tilde{C}}{2 \varepsilon^{2}} \left( \frac{3\gamma}{\gamma-1} + \frac{1}{\gamma-1} \ln \frac{2\pi}{\delta_{2}} \right) \right)^{\frac{\gamma}{\gamma-1}} \left( \frac{2\gamma}{\gamma-1} \bigl[ \ln \frac{\gamma}{\gamma-1} + \ln \left( \frac{6 e \tilde{C}}{2 \varepsilon^{2}} \left( \frac{3\gamma}{\gamma-1} + \frac{1}{\gamma-1} \ln \frac{2\pi}{\delta_{2}} \right) \right) \bigr]_{+} \right)^{\frac{\gamma}{\gamma-1}}, \\ & \left( \frac{6 e \tilde{C} \gamma}{\varepsilon^{2}(\gamma-1)} \ln \frac{2\pi}{\delta_{2}} \right)^{\frac{\gamma}{\gamma-1}} \Biggr\}, \end{align}\] then, when \(\boldsymbol{\mathit{Z}} \sim Q^{n}\), with probability at least \(1-\delta\), \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) < \mathrm{DI}(\ell)\,\varepsilon.\]
In Corollary 3, looking at the dependence on \(\gamma\) of the part related to \(\varepsilon\) in the main term of the sufficient condition for data length \(n\), it is \[O\!\left( \left( \frac{1}{\varepsilon^{2}(\gamma-1)} \right)^{\frac{\gamma}{\gamma-1}} \left( \ln \tfrac{1}{\varepsilon^{2}} \right)^{\frac{2\gamma}{\gamma-1}} \right).\] The larger \(\gamma\) is, the faster the decay. Also, the order with respect to \(\varepsilon\) is roughly \(\varepsilon^{-2\gamma/(\gamma-1)}\). Noting that \(\gamma > 1\), the dependence on \(1/\varepsilon\) is worse than in the exponential-decay case (Corollary 2), but generalization still occurs with finite-length data.
The following lemma is repeatedly used in these proofs.
Lemma 9. For \(\rho \ge 0\) and \(b > 0\), if \[n > \left( \frac{2 [\ln \frac{1}{b\rho}]_{+}}{b\rho} \right)^{\frac{1}{\rho}},\] then \[\frac{\ln n}{n^{\rho}} < b.\] Here, if \(\rho = 0\), then \(\left( \frac{2 [\ln \frac{1}{b\rho}]_{+}}{b\rho} \right)^{\frac{1}{\rho}} = +\infty\), meaning a vacuous statement.
Here, for \(x \in \mathbb{R}\), \([x]_{+} := \max\{x,0\}\) is defined.
Proof. If \(\rho = 0\), the lemma makes no assertion, so we do not need to consider it. Below, we consider \(\rho \in (0,1]\).
We divide into cases based on the relationship between \(b\) and \(\rho\).
First, if \(b \ge \frac{1}{\rho}\), then \((\ln n) / n^{\rho}\) takes its maximum value \(\frac{1}{e\rho}\) in the range \(n \in (0,+\infty)\) at \(n = \exp(\frac{1}{\rho})\). Therefore, if \(b \ge \frac{1}{\rho}\), noting that \([\ln \frac{1}{b\rho}]_{+} = 0\), if \[n > \left( \frac{2 [\ln \frac{1}{b\rho}]_{+}}{b\rho} \right)^{\frac{1}{\rho}} (=0),\] then \((\ln n)/n^{\rho} \le \frac{1}{e\rho} < \frac{1}{\rho} \le b\).
If \(b \in (0, \frac{1}{\rho})\), noting that \([\ln \frac{1}{b\rho}]_{+} = \ln \frac{1}{b\rho}\), from the assumption \[n > \left( \frac{2 \ln \frac{1}{b\rho}}{b\rho} \right)^{\frac{1}{\rho}},\] we have \[\frac{\ln n}{n^{\rho}} < \frac{b\rho}{2 \ln \frac{1}{b\rho}} \cdot \frac{1}{\rho} \left( \ln (2 \ln \tfrac{1}{b\rho}) + \ln \tfrac{1}{b\rho} \right).\] Here, generally for \(x > 0\), \(\ln (2x) < x\), so \[\ln (2 \ln \tfrac{1}{b\rho}) + \ln \tfrac{1}{b\rho} < 2 \ln \tfrac{1}{b\rho}.\] From this, \[\frac{b\rho}{2 \ln \frac{1}{b\rho}} \cdot \frac{1}{\rho} \left( \ln (2 \ln \tfrac{1}{b\rho}) + \ln \tfrac{1}{b\rho} \right) < \frac{b\rho}{2 \ln \frac{1}{b\rho}} \cdot \frac{1}{\rho} (2 \ln \tfrac{1}{b\rho}) = b\] can be said, completing the proof. ◻
Lemma 9 can be easily extended as follows.
Lemma 10. For \(\lambda > 0\), \(\rho \ge 0\), and \(b > 0\), if \[n > \left( \frac{2\lambda [\ln \frac{\lambda}{b^{\frac{1}{\lambda}} \rho}]_{+}}{b^{\frac{1}{\lambda}} \rho} \right)^{\frac{\lambda}{\rho}} = \frac{1}{b^{\frac{1}{\rho}}} \left( \frac{2\lambda}{\rho} \bigl[ \ln \tfrac{\lambda}{\rho} + \tfrac{1}{\lambda} \ln \tfrac{1}{b} \bigr]_{+} \right)^{\frac{\lambda}{\rho}},\] then \[\frac{(\ln n)^{\lambda}}{n^{\rho}} < b.\] Here, if \(\rho = 0\), then \(\left( \frac{2 [\ln \frac{1}{b\rho}]_{+}}{b\rho} \right)^{\frac{1}{\rho}} = +\infty\), meaning a vacuous statement.
Proof. Since \[\frac{(\ln n)^{\lambda}}{n^{\rho}} < b \iff \frac{\ln n}{n^{\frac{\rho}{\lambda}}} < b^{\frac{1}{\lambda}},\] we can apply Lemma 9 by setting \(\rho \leftarrow \frac{\rho}{\lambda}\) and \(b \leftarrow b^{\frac{1}{\lambda}}\). ◻
Proof of Theorem 2. From Theorem 1, \[\mathrm{GenGap}_{(\ell,Q,\boldsymbol{\mathit{Z}})}\left( \mathfrak{A}(\boldsymbol{\mathit{Z}}) \right) < \mathrm{DI}(\ell) \sqrt{ A_{1} + A_{2} + A_{3} },\] where \[\begin{align} A_{1} &:= \frac{ n^{\alpha} \exp((1-\alpha)H_{\alpha}(Q)) (3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}}) }{2n}, \\ A_{2} &:= \frac{ \sqrt{\frac{n}{2} \ln \frac{2}{\delta_{3}}} (3 \ln n + \ln(2\pi) + \ln \tfrac{1}{\delta_{2}}) }{2n}, \\ A_{3} &:= \frac{ \ln \tfrac{1}{\delta_{1}} }{2n}. \end{align}\] Therefore, it is sufficient to show \(A_{1} < \varepsilon^{2}/3\), \(A_{2} < \varepsilon^{2}/3\), and \(A_{3} < \varepsilon^{2}/3\) all hold.
First, from the assumption, \[n > \frac{3}{2\varepsilon^{2}} \ln \frac{1}{\delta_{1}}.\] From this, \[A_{3} = \frac{\ln \frac{1}{\delta_{1}}}{2n} < \frac{\varepsilon^{2}}{3}.\]
Decompose \(A_{1} = A_{1,1} + A_{1,2}\) where \[A_{1,1} := \frac{3 \exp((1-\alpha)H_{\alpha}(Q)) n^{\alpha} \ln n}{2n}, \quad A_{1,2} := \frac{ \exp((1-\alpha)H_{\alpha}(Q)) n^{\alpha} \ln \frac{2\pi}{\delta_{2}} }{2n}.\] It is sufficient to show \(A_{1,1} < \varepsilon^{2}/4\) and \(A_{1,2} < \varepsilon^{2}/12\).
First, show \(A_{1,1} < \varepsilon^{2}/4\). Let \(y := \varepsilon^{2}/12\). Using Lemma 9 with \(\rho = 1-\alpha\) and \(b = y / \exp((1-\alpha)H_{\alpha}(Q))\), the condition \[n > \left( \frac{ 2 (1-\alpha) H_{\alpha}(Q) [ \ln \frac{1}{y(1-\alpha)} ]_{+} }{ y (1-\alpha) } \exp((1-\alpha)H_{\alpha}(Q)) \right)^{1/(1-\alpha)}\] is sufficient. This is satisfied by the assumption \[n > \left( \frac{24 H_{\alpha}(Q) \ln \frac{12}{\varepsilon^{2}(1-\alpha)}}{\varepsilon^{2}} \right)^{1/(1-\alpha)} \exp(H_{\alpha}(Q)).\]
Next, show \(A_{1,2} < \varepsilon^{2}/12\). This immediately follows from the assumption \[n > \left( \frac{36 \ln \frac{6\pi}{\delta}}{\varepsilon^{2}} \right)^{1/(1-\alpha)} \exp(H_{\alpha}(Q)) = \left( \frac{36 \exp((1-\alpha)H_{\alpha}(Q)) \ln \frac{6\pi}{\delta} }{\varepsilon^{2}} \right)^{1/(1-\alpha)}\] that \[A_{1,2} = \frac{ \exp((1-\alpha)H_{\alpha}(Q)) n^{\alpha} \ln \frac{2\pi}{\delta_{2}} }{2n} < \frac{\varepsilon^{2}}{12}.\] From the above, \(A_{1} = A_{1,1} + A_{1,2} < \varepsilon^{2}/4 + \varepsilon^{2}/12 = \varepsilon^{2}/3\).
Decompose \(A_{2} = A_{2,1} + A_{2,2}\) where \[A_{2,1} := \frac{ 3 \ln n \sqrt{ \frac{n}{2} \ln \tfrac{2}{\delta_{3}} } }{2n}, \quad A_{2,2} := \frac{ \ln \frac{2\pi}{\delta_{2}} \sqrt{ \frac{n}{2} \ln \tfrac{2}{\delta_{3}} } }{2n}.\] It is sufficient to show \(A_{2,1} < \varepsilon^{2}/12\) and \(A_{2,2} < \varepsilon^{2}/4\).
For \(A_{2,1}\), using Lemma 9 with \(b = \varepsilon^{2}/(9 \sqrt{ 2 \ln \tfrac{2}{\delta_{3}} })\) and \(\rho = 1/2\), from the assumption \[n > \left( \frac{18 \sqrt{ \ln \tfrac{2}{\delta_{3}} } }{\varepsilon^{2}} \bigl[ \ln \frac{9 \sqrt{ 2 \ln \tfrac{2}{\delta_{3}} }}{\varepsilon^{2}} \bigr]_{+} \right)^{2},\] we can say \[\frac{\ln n}{\sqrt{n}} < \frac{ \varepsilon^{2} }{ 9 \sqrt{ 2 \ln \tfrac{2}{\delta_{3}} } }.\] This gives \[A_{2,1} = \frac{ 3 \ln n \sqrt{ \frac{n}{2} \ln \tfrac{2}{\delta_{3}} } }{2n} < \frac{ \varepsilon^{2} }{12}.\]
For \(A_{2,2}\), from the assumption \[n > \left( \frac{18 \sqrt{ \ln \tfrac{2}{\delta_{3}} } }{\varepsilon^{2}} \bigl[ \ln \frac{9 \sqrt{ 2 \ln \tfrac{2}{\delta_{3}} }}{\varepsilon^{2}} \bigr]_{+} \right)^{2} > \frac{8 (\ln \frac{2\pi}{\delta_{2}})^{2} \ln \tfrac{1}{\delta_{3}}}{\varepsilon^{4}},\] we have \[A_{2,2} = \frac{ \ln \frac{2\pi}{\delta_{2}} \sqrt{ \frac{n}{2} \ln \tfrac{2}{\delta_{3}} } }{2n} < \frac{\varepsilon^{2}}{4}.\] Therefore \[A_{2} = A_{2,1} + A_{2,2} < \frac{\varepsilon^{2}}{12} + \frac{\varepsilon^{2}}{4} = \frac{\varepsilon^{2}}{3}.\]
From the above, since \(A_{1} < \varepsilon^{2}/3\), \(A_{2} < \varepsilon^{2}/3\), and \(A_{3} < \varepsilon^{2}/3\) are all shown, the proof is complete. ◻
Proof of Corollary 2. We treat the case where \(Q\) has an exponentially decaying tail.
Let \(z : \mathbb{N}\to \mathcal{Z}\) be a numbering as in the statement, and for \(j \in \mathbb{N}\), define \(q_j := Q(z(j))\). By the assumption of exponential decay, there exist constants \(C>0\) and \(r \in (0,1)\) such that \(q_j \le C r^j\) for all \(j \in \mathbb{N}\).
If \(\alpha \in (0,1]\), then \[\sum_{j=0}^{+\infty} q_j^{\alpha} \;\le\; C^{\alpha} \sum_{j=0}^{+\infty} (r^j)^{\alpha} \;\le\; \frac{C^{\alpha}}{1 - r^{\alpha}}.\] Allowing the right-hand side to be \(+\infty\) when \(\alpha=1\), we obtain, for all \(\alpha \in [0,1]\), \[\exp\bigl((1-\alpha) H_{\alpha}(Q)\bigr) \;=\; \sum_{j=0}^{+\infty} q_j^{\alpha} \;\le\; \frac{C^{\alpha}}{1 - r^{\alpha}}.\]
Using this, we bound \(\kappa_{Q}(n)\): \[\kappa_{Q}(n) := \min_{\alpha \in [0,1]} n^{\alpha} \sum_{j=0}^{+\infty} q_j^{\alpha} \;\le\; \min_{\alpha \in [0,1]} \frac{(C n)^{\alpha}}{1 - r^{\alpha}}.\]
Define \(\tilde{\alpha}\) by \[\frac{1}{1 - r^{\tilde{\alpha}}} \;=\; \frac{\ln(e n) - \ln r}{-\ln r} \;=\; \frac{\ln(e n)}{\ln((e n)/r)}.\] This is equivalent to \[r^{\tilde{\alpha}} = \frac{\ln(e n)}{\ln((e n)/r)} \quad\iff\quad \tilde{\alpha} = \frac{ \ln\!\left(1 + \dfrac{\ln \frac{1}{r}}{\ln(e n)}\right) }{ \ln \frac{1}{r} }.\] Since \(n \ge 1\) implies \(\ln(e n)\ge 1\), we have \[0 = \ln 1 < \tilde{\alpha} < \frac{1}{\ln(e n)} \le 1,\] where the second inequality follows from the general bound \(\ln(1+x) < x\) for \(x>0\), applied with \(x = \frac{\ln(1/r)}{\ln(e n)}\).
Moreover, \[n^{\tilde{\alpha}} = n^{-\frac{\ln\left(1 - \frac{\ln r}{\ln(e n)}\right)}{\ln r}} \le n^{1/\ln(e n)} < n^{1/\ln n} = e.\] Since \(\tilde{\alpha} \in (0,1)\), we also have \(C^{\tilde{\alpha}} \le \tilde{C}\), where \(\tilde{C} := \max\{C,1\}\). Hence \[\kappa_{Q}(n) \le \frac{C^{\tilde{\alpha}} n^{\tilde{\alpha}}}{1 - r^{\tilde{\alpha}}} \le \frac{e \tilde{C}}{\ln \frac{1}{r}} \bigl(\ln n + \ln\tfrac{e}{r}\bigr).\] Substituting this bound into Theorem 1 yields the first (non-asymptotic) inequality of Corollary 2.
For the second claim, we substitute the above bound on \(\kappa_{Q}(n)\) into the sufficient condition in Theorem 2. The main term that comes from \(\kappa_{Q}(n)\) in Theorem 1 is \[\frac{1}{2n} \,\kappa_{Q}(n)\, \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr) \;\le\; \frac{e \tilde{C}}{2 n \ln \frac{1}{r}} \bigl(\ln n + \ln\tfrac{e}{r}\bigr) \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr).\] To guarantee that the total generalization-gap bound is at most \(\mathrm{DI}(\ell)\,\varepsilon\), it suffices to require that this term is at most \(\varepsilon^{2}/3\). Thus a sufficient condition is \[\frac{e \tilde{C}}{2 n \ln \frac{1}{r}} \bigl(\ln n + \ln\tfrac{e}{r}\bigr) \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr) < \frac{\varepsilon^{2}}{3}.\]
It is sufficient that the following three inequalities holds: \[\frac{3 e \tilde{C}}{2 \ln \frac{1}{r}} \cdot \frac{(\ln n)^{2}}{n} < \frac{\varepsilon^{2}}{6}, \quad \frac{e \tilde{C}}{2 \ln \frac{1}{r}} \bigl(3 \ln\tfrac{e}{r} + \ln\tfrac{2\pi}{\delta_{2}}\bigr) \cdot \frac{\ln n}{n} < \frac{\varepsilon^{2}}{12}, \quad \frac{e \tilde{C}}{2 n \ln \frac{1}{r}} \ln\tfrac{e}{r}\, \ln\tfrac{2\pi}{\delta_{2}} < \frac{\varepsilon^{2}}{12}.\]
Applying Lemma 10 to the first two terms, and solving the last inequality directly for \(n\), we obtain the following sufficient conditions: \[n > \frac{36 e \tilde{C}}{\varepsilon^{2} \ln \frac{1}{r}} \left( \ln \frac{36 e \tilde{C}}{\varepsilon^{2} \ln \frac{1}{r}} \right)^{2}, \quad n > \frac{12 e \tilde{C}}{\varepsilon^{2}} \left( 3 + \frac{\ln \frac{6 \pi e^{3}}{\delta_{2}}}{\ln \frac{1}{r}} \right) \ln\!\left( \frac{6 e \tilde{C}}{\varepsilon^{2}} \left( 3 + \frac{\ln \frac{6 \pi e^{3}}{\delta_{2}}}{\ln \frac{1}{r}} \right) \right), \quad n > \frac{6 e \tilde{C}}{\varepsilon^{2}} \left( 1 + \frac{1}{\ln \frac{1}{r}} \right) \ln \frac{2\pi}{\delta_{2}}.\] ◻
Proof of Corollary 3. We now treat the power-law decay case.
Assume that there exist constants \(C>0\) and \(\gamma>1\) such that \(q_j := Q(z(j)) \le C (j+1)^{-\gamma}\) for all \(j \in \mathbb{N}\) For \(\alpha \in (1/\gamma,1]\), we have \[\begin{align} \sum_{j=0}^{+\infty} q_j^{\alpha} &\le C^{\alpha} \sum_{j=0}^{+\infty} (j+1)^{-\alpha\gamma} \\ &\le C^{\alpha} + C^{\alpha} \int_{0}^{+\infty} (x+1)^{-\alpha\gamma}\,dx \\ &= C^{\alpha} + C^{\alpha} \int_{1}^{+\infty} x^{-\alpha\gamma}\,dx \\ &= C^{\alpha} + \frac{C^{\alpha}}{\alpha\gamma - 1} = C^{\alpha} \frac{\alpha\gamma}{\alpha\gamma - 1}. \end{align}\]
For the first inequality in the corollary, we bound \[\begin{align} \kappa_{Q}(n) &:= \inf_{\alpha \in (1/\gamma,1]} n^{\alpha} \sum_{j=0}^{+\infty} q_j^{\alpha} \\ &\le \inf_{\alpha \in (1/\gamma,1]} n^{\alpha} C^{\alpha} \sum_{j=0}^{+\infty} (j+1)^{-\alpha\gamma} \\ &\le \inf_{\alpha \in (1/\gamma,1]} n^{\alpha} C^{\alpha} \frac{\alpha\gamma}{\alpha\gamma - 1}. \end{align}\] Choose \[\alpha_{n} := \frac{1}{\gamma} + \left(1 - \frac{1}{\gamma}\right) \frac{1}{\ln(e n)}.\] Then \(\alpha_{n} \in (1/\gamma,1]\) for \(n\) large enough, and a direct calculation gives \[\begin{align} n^{\alpha_{n}} C^{\alpha_{n}} \frac{\alpha_{n}\gamma}{\alpha_{n}\gamma - 1} &\le n^{\frac{1}{\gamma} + (1 - \frac{1}{\gamma}) \frac{1}{\ln(e n)}} \,\tilde{C}\, \frac{1 + \frac{\gamma - 1}{\ln(e n)}}{\frac{\gamma - 1}{\ln(e n)}} \\ &\le \tilde{C}\, n^{\frac{1}{\gamma} + \frac{1}{\ln n}} \left( \frac{\ln n + 1}{\gamma - 1} + 1 \right) \\ &= \frac{e \tilde{C}}{\gamma - 1}\, n^{1/\gamma} (\ln n + \gamma), \end{align}\] where again \(\tilde{C} := \max\{C,1\}\). Therefore, \[\kappa_{Q}(n) \le \frac{e \tilde{C}}{\gamma - 1}\, n^{1/\gamma} (\ln n + \gamma),\] and substituting into Theorem 1 yields the first inequality in Corollary 3.
For the second inequality, the contribution of \(\kappa_{Q}(n)\) in Theorem 1 is bounded by \[\frac{1}{2n} \,\kappa_{Q}(n)\, \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr) \;\le\; \frac{e \tilde{C}}{2(\gamma-1)n^{1-1/\gamma}} (\ln n + \gamma) \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr).\] To ensure that the overall generalization-gap bound is at most \(\mathrm{DI}(\ell)\,\varepsilon\), it is sufficient that \[\frac{e \tilde{C}}{2(\gamma-1)n^{1-1/\gamma}} (\ln n + \gamma) \bigl(3 \ln n + \ln(2\pi) + \ln\tfrac{1}{\delta_{2}}\bigr) < \frac{\varepsilon^{2}}{3}.\]
This is implied by the conjunction of the following three inequalities: \[\frac{3 e \tilde{C}}{2(\gamma-1)} \cdot \frac{(\ln n)^{2}}{n^{1-1/\gamma}} < \frac{\varepsilon^{2}}{6}, \quad \frac{e \tilde{C}}{2(\gamma-1)} \bigl(3\gamma + \ln\tfrac{2\pi}{\delta_{2}}\bigr) \cdot \frac{\ln n}{n^{1-1/\gamma}} < \frac{\varepsilon^{2}}{12}, \quad \frac{e \tilde{C}}{2(\gamma-1)} \gamma \ln\tfrac{2\pi}{\delta_{2}} \cdot \frac{1}{n^{1-1/\gamma}} < \frac{\varepsilon^{2}}{12}.\]
Applying Lemma 10 to the first two, and solving the third inequality directly for \(n\), we obtain the following sufficient conditions: \[\begin{align} n &> \left( \frac{9 e \tilde{C}}{\varepsilon^{2}(\gamma-1)} \right)^{\frac{\gamma}{\gamma-1}} \left( \frac{4\gamma}{\gamma-1} \Bigl[ \ln \frac{2\gamma}{\gamma-1} + \frac{1}{2} \ln \frac{9 e \tilde{C}}{\varepsilon^{2}(\gamma-1)} \Bigr]_{+} \right)^{\frac{2\gamma}{\gamma-1}}, \\ n &> \left( \frac{6 e \tilde{C}}{2\varepsilon^{2}} \left( \frac{3\gamma}{\gamma-1} + \frac{1}{\gamma-1} \ln \frac{2\pi}{\delta_{2}} \right) \right)^{\frac{\gamma}{\gamma-1}} \left( \frac{2\gamma}{\gamma-1} \Bigl[ \ln \frac{\gamma}{\gamma-1} + \ln\!\left( \frac{6 e \tilde{C}}{2\varepsilon^{2}} \left( \frac{3\gamma}{\gamma-1} + \frac{1}{\gamma-1} \ln \frac{2\pi}{\delta_{2}} \right) \right) \Bigr]_{+} \right)^{\frac{\gamma}{\gamma-1}}, \\ n &> \left( \frac{6 e \tilde{C} \gamma}{\varepsilon^{2}(\gamma-1)} \ln \frac{2\pi}{\delta_{2}} \right)^{\frac{\gamma}{\gamma-1}}. \end{align}\] ◻
Proof of Theorem 3. We establish the two claimed inequalities.
For \(\kappa^{*}_{(Q')}(n)\), we have \[\begin{align} \kappa^{*}_{(Q')}(n) &= \exp\bigl((1-\alpha'^{*}) H_{\alpha'^{*}}(Q')\bigr) n^{\alpha'^{*}} \\ &= \exp\bigl((1-\alpha'^{*})\bigl(H_{\alpha'^{*}}(Q') - C\bigr)\bigr) n^{\alpha'^{*}} \exp\bigl((1-\alpha'^{*}) C\bigr) \\ &\ge \min_{\alpha \in [0,1]} \Bigl[ \exp\bigl((1-\alpha)\bigl(H_{\alpha}(Q') - C\bigr)\bigr) n^{\alpha} \Bigr] \exp\bigl((1-\alpha'^{*}) C\bigr) \\ &\ge \exp\bigl((1-\alpha'^{*}) C\bigr) \kappa^{*}_{(Q)}(n), \end{align}\] where in the last step we used the assumed relationship between \(H_{\alpha}(Q')\) and \(H_{\alpha}(Q)\) that appears in the statement of the theorem.
For the second claim, concerning \(\max\bigl\{\nu_{(Q',\alpha)}(\varepsilon), \widetilde{\nu}_{(Q',\alpha)}(\delta,\varepsilon)\bigr\}\), the inequality follows immediately by substituting \(H_{\alpha}(Q') \ge H_{\alpha}(Q) + C\) (and the corresponding relation for \(Q'\) vs.\(Q\)) into the explicit definitions of \(\nu_{(\cdot,\alpha)}\) and \(\widetilde{\nu}_{(\cdot,\alpha)}\), and comparing the resulting expressions term by term with those for \(Q\). ◻