Corrections to ``The Method of Gaps: Exact Expressions for the Generalization Error of Supervised Learning Algorithms''
Samir M. Perlaza
Abstract
In this paper, a counterexample to Lemma 5 of the paper referenced in the title is provided. Consequently, the formulation of the method of data-driven gaps presented in the referenced paper relies on an additional assumption, namely, that the conditional distribution of the training dataset given the learned model has identical data-point-specific marginals. To overcome this limitation, a generalized formulation of the method of data-driven gaps that does not rely on Lemma 5 and does not require the training samples to be independent or identically distributed is presented. Through this formulation, the applicability of the method of data-driven gaps is extended to a broader class of data distributions and randomized learning algorithms.
Index Terms
Generalization Error, Supervised Learning, Worst-Case Data Generating Probability Measure; Gibbs Algorithm, Hypothesis tests, and Pythagorean Identities.
I. CONTEXT AND COUNTER EXAMPLE TO LEMMA 5 IN [1]
In [1, Lemma 5], it is asserted that, for an arbitrary randomized learning algorithm, independent and identically distributed (i.i.d.) training samples induce a conditional distribution of the training dataset given the learned model whose data-point-specific marginals are identical. Although this property is satisfied by certain learning algorithms, particularly those that are invariant under permutations of the training data points, it does not hold in general. For instance, Gibbs algorithms based on the empirical risk, as studied in [2]–[4] and references therein, satisfy this property because their learning rules are invariant under permutations of the training data points. In contrast, Gibbs algorithms based on a weighted empirical risk, such as those studied in [5]–[7], need not satisfy this property when different weights are assigned to different training data points.
The formulation of the method of data-driven gaps presented in [1], which constitutes one of the two variants of the method of gaps, relies on [1, Lemma 5]. Consequently, the results derived from this lemma require an additional assumption, namely, that the conditional distribution of the training dataset given the learned model has identical data-point-specific marginals. In particular, the equality asserted in [1, Equation 39] must be imposed as an additional assumption for the results in [1, Lemmas 6 and 7] and [1, Theorems 16–18, 20, and 21], insofar as their derivations rely on [1, Lemma 5].
To overcome this limitation, a generalized formulation of the method of data-driven gaps that does not rely on [1, Lemma 5] is presented. Specifically, Lemmas 1 and 2 generalize [1, Lemmas 6 and 7], respectively, without requiring the training data points to be independent or identically distributed, or their conditional marginal distributions given the learned model to be identical. These generalizations extend the applicability of the method of data-driven gaps to a broader class of training-data distributions and randomized learning algorithms.
Building on Lemmas 1 and 2, generalized versions of [1, Theorems 16–18, 20, and 21] are also established. These results retain the corresponding expressions for the generalization error while replacing the data-point-specific marginal and conditional marginal measures with their respective averages. As a consequence, neither the i.i.d. assumption on the training data nor the equality of their conditional marginal distributions given the learned model is required.
A. The Error in the Proof of [1, Lemma 5]
The proof of [1, Lemma 5] correctly establishes in [1, Equation 44] that, if PZ∈△((X×Y)n) is the product measure induced by a probability measure PZ∈△(X×Y), as assumed in [1, Equation 22], then, for all m∈{1,2,…,n} and all measurable sets A⊆X×Y,
PZ(A)=∫PZm∣Θ=θ(A)dPΘ(θ),(1)
Samir M. Perlaza is with the College of Computing, Université Mohamed VI Polytechnique (UM6P), Ben Guerir, 43150, Morocco; also with the Centre Inria d'Université Côte d'Azur, INRIA, 06902 Sophia Antipolis, France; also with the Department of Electrical and Computer Engineering at Princeton University, Princeton, NJ 08544 USA; and also with the GAATI Mathematics Laboratory at the University of French Polynesia, 98702 Faaa, French Polynesia (e-mail: samir.perlaza@um6p.ma).
where PΘ is defined in [1, Equation 28], and PZm∣Θ, defined in [1, Equation 38], is a conditional marginal of the probability measure PZ∣Θ in [1, Equation 35].
The error in the proof arises from an incorrect application of [8, Theorem 5.3.1]. Specifically, it is asserted that, for any pair (i,j)∈{1,2,…,n}2, the equality
∫PZi∣Θ=θ(A)dPΘ(θ)=∫PZj∣Θ=θ(A)dPΘ(θ),(2)
which holds for every measurable set A⊆X×Y, implies that
PΘ({θ∈M:PZi∣Θ=θ(A)=PZj∣Θ=θ(A)})=1.(3)
However, equality of the integrals over the entire set of models M does not imply almost-sure equality of their integrands. Consequently, the conclusion in (3) is not justified, as further demonstrated by the counterexample presented below.
For a fixed measurable set A⊆X×Y, from [8, Theorem 1.6.11], it is sufficient for the conclusion in (3) to hold that, for every measurable set C⊆M,
∫CPZi∣Θ=θ(A)dPΘ(θ)=∫CPZj∣Θ=θ(A)dPΘ(θ),(4)
which is a condition that is not assumed in the statement of [1, Lemma 5]. The assumptions of [1, Lemma 5] guarantee the equality in (4) only when C=M, which is insufficient to establish the conclusion in (3).
B. The Counter-Example
Consider the case in which X=Y={0,1} and M={0,ν1,ν2,ν1+ν2}, with 0<ν1<ν2<+∞. Consider also an algorithm PΘ∣Z such that for all θ∈M,
PΘ∣Z=z({θ})=1{θ=x1y1ν1+x2y2ν2},(5)
where z=((x1,y1),(x2,y2)). Datasets are sampled from a product measure PZ∈△((X×Y)2) induced by a measure PZ∈△(X×Y) that satisfies
PZ({(0,0)})=1−PZ({(1,1)})=β,(6)
for some β∈(0,1). Hence, the measure PΘ in [1, Equation 28] satisfies for all θ∈M,
Hence, from (17) and (18), it follows that for all θ∈{ν1,ν2},
PZ1∣Θ=θ({(0,0)})=PZ2∣Θ=θ({(0,0)}).(19)
Moreover, from (8), the set {ν1,ν2} has probability 2β(1−β)>0 under PΘ. Consequently, the data-point-specific conditional marginal measures are not identical PΘ-almost surely, which contradicts the assertion of [1, Lemma 5].
II. THE METHOD OF DATA-DRIVEN GAPS
In this section, the two steps of the method of data-driven gaps are reformulated to accommodate a broader class of training-data distributions PZ and randomized learning algorithms PΘ∣Z. This leads to more general expressions for the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and avoids using [1, Lemma 5].
A. Step One
The first step of the method of data-driven gaps consists in writing the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] in terms of the functional G:M×△(X×Y)×△(X×Y) in [1, Equation 19]. To achieve such an objective, consider the marginal measures of the probability measure PZ, denoted by PZm∈△(X×Y), with m∈{1,2,…,n}, and note that for all measurable subsets A⊆(X×Y),
PZm(A)=PZ(Bm),(20)
where the set Bm⊆(X×Y)n is such that
Bm=A1×A2×⋯×Am×⋯×An,(21)
with At=X×Y if t∈{1,2,…,n}∖{m}, and Am=A.
Consider also the marginal measures of the probability measure PZ∣Θ=θ in [1, Equation 35], denoted by PZm∣Θ=θ∈△(X×Y), with θ∈M and m∈{1,2,…,n}, which satisfies for all measurable subsets A⊆(X×Y),
PZm∣Θ=θ(A)=PZ∣Θ=θ(Bm),
(22) where the set Bm is defined in (21). Consider also the measures PˉZ∈△(X×Y) and PˉZm∣Θ=θ∈△(X×Y∣M) such that for all measurable sets A,
These measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are well-defined probability measures even when data points are neither independent nor identically distributed, and when the learning algorithm is not invariant under permutations of the training data points. These measures can be respectively interpreted as the “average” marginal measure of the joint measure PZ and the average conditional marginal measure given a model θ of the joint conditional measure PZ∣Θ=θ. Using this notation, the following lemma formalizes the first step of the method of data-driven gaps and shows that the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] depends exclusively on such “average” measures PˉZ and PˉZ∣Θ.
Lemma 1: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous; and
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous.
Then,
G(PΘ∣Z,PZ)=∫G(θ,PˉZ,PˉZ∣Θ=θ)dPΘ(θ),(25)
where the functional G is defined in [1, Equation 19]; and the probability measures PˉZ and PˉZ∣Θ=θ are defined in (23) and (24), respectively.
Proof: The proof is presented in Appendix A.
Lemma 1 is a generalization of [1, Lemma 6] that does not rely on [1, Lemma 5].
B. Step Two
The second step of the method of data-driven gaps is formalized as follows.
Lemma 2: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that:
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous;
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
where the functional G is defined in [1, Equation 19]. Hence, using (27) in (25) completes the proof.
Lemma 2 is a generalization of [1, Lemma 7] that does not rely on [1, Lemma 5].
III. EXPLICIT EXPRESSIONS OBTAINED VIA THE METHOD OF DATA-DRIVEN GAPS
All explicit expressions for the generalization error G(PΘ∣Z,PZ) defined in [1, Equation 11] and presented in Section VI of [1] can be generalized using Lemmas 1 and 2, without relying on [1, Lemma 5].
The key distinction between the generalized expressions and their original counterparts lies in the probability measures involved. Specifically, the generalized expressions do not explicitly involve data-point-specific marginal measures of PZ or data-point-specific conditional marginal measures of PZ∣Θ. Instead, they are formulated in terms of the average of all data-point-specific marginal measures, namely, the measure PˉZ defined in (23), and the average of all data-point-specific conditional marginal measures, namely, the measure PˉZ∣Θ defined in (24). Consequently, the training data points are required neither to be independent nor to be identically distributed, and their conditional marginal distributions given the learned model are not required to be identical.
The proofs of these generalized expressions follow the same lines as those presented in [1], with only minor algebraic modifications. Accordingly, only the steps that differ from the original proofs are detailed. Furthermore, since the analysis of the various equivalent expressions for the generalization error G(PΘ∣Z,PZ) presented in [1] extends naturally to their generalized counterparts, no additional analysis is provided. Instead, the presentation is focused on clearly stating the generalized results and establishing their validity through concise proofs.
The following is a generalization of [1, Theorem 16].
Theorem 3: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that:
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous;
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
where the probability measure PZ^∣Θ=θ(PS,β) is defined in [1, Equation 51]; and β∈JPS, with JPS in [1, Equation 50].
Proof: From Assumptions (a), (b) and (c), Lemma 2 holds. Then, by following the same steps as in the proof of [1, Theorem 16], it follows that the differences D(PˉZ∣Θ=θ∥PZ^∣Θ=θ(PS,β))−D(PˉZ∣Θ=θ∥PS) and D(PˉZ∥PS)−D(PˉZ∥PZ^∣Θ=θ(PS,β)) in (26) respectively satisfy the following equalities:
Plugging both (29) and (30) into (26) yields (28), which completes the proof.
The following is a generalization of [1, Theorem 17].
Theorem 4: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that:
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous;
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
and ηˉ and η are respectively defined in [1, Equations 125 and 126]; and the set Cη is defined in [1, Equation 122].
Proof: The proof follows the same steps as those in the proof of [1, Theorem 17].
The following is a generalization of [1, Theorem 18].
Theorem 5: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that:
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous;
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
where the probability measure PZ^∣Θ=θ(PS,β) is defined in [1, Equation 51]; and β∈JPS, with JPS in [1, Equation 50].
Proof: From Assumptions (a), (b) and (c), Lemma 2 holds. Then, by following the same steps as in the proof of [1, Theorem 18], it follows that the difference ∫(D(PˉZ∣Θ=θ∥PS)−D(PˉZ∥PS))dPΘ(θ) and the term ∫D(PˉZ∥PZ^∣Θ=θ(PS,β))dPΘ(θ) in (26) respectively satisfy the following equalities:
The proof ends by using the equalities (34) and (36) in (26), which yields (33).
The following theorem is a generalization of [1, Theorem 20].
Theorem 6: Consider the generalization error G(PΘ∣Z,PZ) in [1, Equation 11] and assume that:
(a) For all z∈(X×Y)n, the probability measures PΘ∣Z=z and PΘ in [1, Equation 28] are mutually absolutely continuous;
(b) For all θ∈M, the probability measures PZ∣Θ=θ and PZ in [1, Equation 35] are mutually absolutely continuous; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
where the probability measure PZ^∣Θ=θ(PS,β) is defined in [1, Equation 51]; and β∈JPS, with JPS in [1, Equation 50].
Proof: The proof of Theorem 6 is presented in Appendix B.
The following lemma is a generalization of [1, Lemma 21].
Lemma 7: Consider two probability measures PZ∈△((X×Y)n) and PΘ∈△(M); and two conditional probability measures PΘ∣Z∈△(M∣(X×Y)n) and PZ∣Θ∈△((X×Y)n∣M) and assume that:
(a) The measures PZ,PΘ,PΘ∣Z and PZ∣Θ satisfy [1, Equation 28] and [1, Equation 35];
(b) For all θ∈M, the probability measure PZ∣Θ=θ is absolutely continuous with respect to PZ; and
(c) For all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are both mutually absolutely continuous with respect to PS∈△(X×Y) in [1, Equation 51].
where the probability measure PZ^∣Θ=θ(PS,β) is defined in [1, Equation 51]; and β∈JPS, with JPS in [1, Equation 50].
Proof: Note that Assumption (c) implies that for all θ∈M, the probability measures PˉZ in (23) and PˉZ∣Θ=θ in (24) are mutually absolutely continuous. Using this observation, the proof follows the same steps of the proof of [1, Lemma 21] by replacing PZ and PZ∣Θ by PˉZ and PˉZ∣Θ, respectively.
REFERENCES
[1] S. M. Perlaza and X. Zou, “The method of gaps: Exact expressions for the generalization error of supervised learning algorithms,” To appear in IEEE Transactions on Information Theory, vol. DOI 10.1109/TIT.2026.3732982, 2026.
[2] S. M. Perlaza, G. Bisson, I. Esnaola, A. Jean-Marie, and S. Rini, “Empirical risk minimization with relative entropy regularization,” IEEE Transactions on Information Theory, vol. 70, no. 7, pp. 5122 – 5161, Jul. 2024.
[3] G. Aminian, Y. Bu, L. Toni, M. R. D. Rodrigues, and G. W. Wornell, “Information-theoretic characterizations of generalization error for the Gibbs algorithm,” IEEE Transactions on Information Theory, vol. 70, no. 1, pp. 632–655, Jan. 2024.
[4] A. Xu and M. Raginsky, “Information-theoretic analysis of generalization capability of learning algorithms,” in Proceedings of the International Conference on Neural Information Processing Systems (NeurIPS), vol. 30, Dec. 2017, pp. 1–10.
[5] Y. Bermudez, S. M. Perlaza, and I. Esnaola, “Decentralized machine learning with centralized performance guarantees via Gibbs algorithms,” in Proceedings of the IEEE International Symposium on Information Theory (ISIT), Guangzhou, China, Jun. 2026.
[6] —, “Equivalence between nested Gibbs measures and log-linear combinations of Gibbs measures,” in Proceedings of the IEEE Information Theory Workshop (ITW), Tempe AZ, USA, Nov. 2026, pp. 1–6.
[7] —, “Machine unlearning for Gibbs supervised learning algorithms,” in Proceedings of the IEEE International Symposium on Information Theory (ISIT), Guangzhou, China, Jun. 2026.
[8] R. B. Ash and C. A. Doleans-Dade, Probability and Measure Theory, 2nd ed. Burlington, MA, USA: Harcourt Academic Press, 2000.
[9] Y. Bermudez, G. Bisson, I. Esnaola, and S. M. Perlaza, “Proofs for folklore theorems on the Radon-Nikodym derivative,” INRIA, Centre Inria d’Université Côte d’Azur, Sophia Antipolis, France, Tech. Rep. RR-9591, July 2025.
APPENDIX A PROOF OF LEMMA 1
The proof is essentially algebraic and follows from [1, Definition 4]. More specifically,
where the equality in (39) follows from [1, Equation 9]; the equality in (40) follows by exchanging the order of the integrals [8, Theorem 2.6.6]; and the equality in (41) follows from [1, Equation 8].
where the equality (42) follows from Assumption (a) and [9, Theorem 2]; the equality in (43) follows by exchanging the order of the integrals [8, Theorem 2.6.6]; the equality in (44) follows from [9, Theorem 10]; the equality in (45) follows from [1, Equations 7 and 8]; the equality in (46) follows from [8, Theorem 1.6.3]; the equality in (47) follows from the fact that for all t∈{1,2,…,n}, the measure PZt is absolutely continuous with PˉZ and thus, [9, Theorem 2] holds; the equality in (48) follows by exchanging the order of the integrals [8, Theorem 2.6.6]; and the equality in (49) follows from the fact that for all (x,y)∈suppPˉZ,
where the equality (52) follows from Assumption (a) and [9, Theorem 2]; the equality in (53) follows by exchanging the order of the integrals [8, Theorem 2.6.6]; the equality (54) follows from Assumption (b) and [9, Theorem 11]; the equality in (55) follows from [9, Theorem 2]; the equality in (56) follows from [1, Equation 7]; the equality in (57) follows from [8, Theorem 1.6.3]; the equality in (58) follows from the fact that for all t∈{1,2,…,n}, the measure PZt∣Θ=θ is absolutely continuous with PˉZ∣Θ=θ and thus, [9, Theorem 2] holds; the equality in (59) follows by exchanging the order of the integrals [8, Theorem 2.6.6]; and the equality in (60) follows from the fact that for all θ∈M and for all (x,y)∈suppPˉZ∣Θ=θ,
where the equality in (64) follows from [1, Equation 21]. This completes the proof.
APPENDIX B PROOF OF THEOREM 6
The proof follows from [1, Lemma 19], which holds under Assumptions (a), (b), and (c) and does not rely on [1, Lemma 5]. More specifically, the proof consists of re-writing the difference Rν(PZ∣Θ=μ)−Rμ(PZ∣Θ=μ) in [1, Equation 137] using the functional G in [1, Equation 21]. Note that for all (ν,μ)∈M×M,
where the equality in (65) follows from [1, Equation 8]; the equality in (66) follows from [1, Equation 7]; the equality in (67) follows from [8, Theorem 1.6.3]; the equality in (68) follows from [9, Theorem 2]; and the equality in (69) follows from (62).