{
  "File Number": "1059",
  "Title": "On Margins and Generalisation for Voting Classifiers",
  "Limitation": "We speculate that this arises partially due to the irreducible factors appearing in those bounds; for example the FO or f2 bounds can never be tighter than twice the train loss of the associated Gibbs classifier, while ours has no such limitation. This result is quite valuable as it demonstrates that Theorem 2 can be readily used in an algorithm-free manner: the choice of learning algorithm is up to the practitioner, but the bound will then often provide an excellent guarantee on the obtained weights θ. Finally, in Figure 3, our optimisation-friendly variant bound Theorem 3 is seen to be competitive in terms of test error while giving an improved-or-equal final bound on all datasets. When considering the less-common setting of binary stumps (see Appendix C) we found that sometimes this objective converged to a sub-optimal local minimum. We speculate that this arises due to the highly non-convex nature of the objective combined with a strong K-inflating gradient signal from the O(e−Kγ 2\n) term. Thus future work to improve these results even further could start with the use of the quasi-convex small-kl relaxation from Thiemann et al. (2017). We note however that this is overall less important than our main results, as both our bounds are still extremely tight when used in an algorithm-free way and applied to the output of another algorithm as discussed above. Overall, we note that in many cases (a majority in Figure 2) our main bound of Theorem 2 is very close to the test set bound and thus cannot actually be improved any further, with the problem of providing sharp guarantees based on the training data alone effectively solved in many cases. Conclusion. We obtain empirically very strong generalisation bounds for voting classifiers using margins. We believe these are highly relevant to the community, since voting-based classifiers and margin-maximising algorithms are among the most popular and influential in machine learning. Dirichlet majority votes have already obtained excellent results in the stochastic setting (Zantedeschi et al., 2021), but our new result in Theorem 4 showing they are well-approximated by their mean should open new directions in the more conventional deterministic setting. Our results also have practical relevance: for example, in the strong voter machine learning workflow described above, instead of setting data aside as a test set, this data can be freed up to learn even stronger voters, since a strong out-of-sample ensemble guarantee can still be provided even without a test set. In future work we hope to expand these results further to other (non-majority) voting schemes like those with score-output voters (as in e.g. Schapire et al., 1998), and ensembles of voters with finite VC dimension.",
  "Reviewer Comment": "Reviewer_3: This paper, although very dense, is making important contributions to the understanding of ensemble classifiers, in particular to the margin argument of why such classifiers generalize. It struck me as very insightful to be able to use the stochastic voting bound to prove the majority voting result. That the result also turns out to tighter than prior work as well as empirically perform well makes it very strong (and cool!). On the whole, I think this is a strong paper that is using very insightful connections from recent prior work to improve the state of the art generalization bounds on voting classifiers.\nQuestions:\nTwo minor points: I would have liked to see a precise statement of Zantedeschi et al's bound in section 2.3. In particular, I missed the intuition behind \"the use of such Dirichlet distributions...allows the correlation between voters to be more carefully considered.\" Second, I missed why in figure 2 the \"our bound\" results change for every baseline.\nLimitations:\nThere is no specific limitations section, but the authors do describe gaps between their results and empirical results as well as cases when their bounds may not be accurate (albeit very briefly)\nEthics Flag: No\nSoundness: 3 good\nPresentation: 3 good\nContribution: 4 excellent\n\nReviewer_4: The contribution appears to bring a significant improvement compared to the state of the art, even though it is not that original, since it is close to a result by Zantedeschi et al. (2021). I found it technically sound. It is noticeable that the paper is very well written (clear).\nQuestions:\nA few typos should be corrected. Two examples : -line 93 : complimentary -> complementary -line 470 : pac-bayesian -> PAC-Bayesian\nLimitations:\nNot applicable\nEthics Flag: No\nSoundness: 4 excellent\nPresentation: 4 excellent\nContribution: 3 good\n\nReviewer_5: I like to paper and I do not have much to discuss about it to be honest. The paper combines different aspects from theory into a non-trivial, novel bound. It is well-written and easy to follow. The quality of the math seems sound, although I admit that I did only skimmed the appendix. I believe the use of the Dirichlet posterior is an interesting idea and can be used to as a starting point for future research. I have some minor remarks regarding the references that can easily be fixed for a camera ready and some question wrt. to the weights of each member in the ensemble (see below). In short:\n(+) Novel and non-trivial combination of different results from literature\n(+) Generally well-written and comparably easy to follow\n(+) Decent empirical evaluation\n(-) High test error in the empirical evaluation (see my question below)\n(-) The citations should be improved for more consistency. I suggest to double-check references {1,14,16,17,23,24,26,36,47} via https://dblp.uni-trier.de/ and copy/paste the extended Bibkeys\nQuestions:\nIn the appendix you write that you initialize\nθ\nuniformly in\n[\n0.01\n,\n1\n]\nand then optimize over it. I assumed that one would initialize\nθ\nas the weight of each ensemble member for random forests, i.e.\nθ\ni\n=\n1\n/\n|\nH\n|\nin the case of random forest. Why do you use different values here? Did I miss something?\nThe results in Fig 1. / 2. are comparably bad to e.g. classic RF. For example, a vanilla RF has a performance around\n>\n97\n% on mnist whereas you report errors in the range of\n10\n−\n20\n%. I understand that raw performance is not the main focus of this paper (and hence I dont really care), but I am curios why there is this large performance gap. Do you think this is because\nθ\nis optimized afterwards?\nI expected a generalization bound to be used as a \"plug in\" explanation for any voting classifier, e.g. as in Theorem 2. Now I wonder what the impact of\nθ\nis here. From my point of view,\nθ\nare simply the weights of the individual classifiers (e.g. equal for Random Forests or (normalized) floats for boosting). Is there any harm in using Theorem 2 to compute the error of, e.g. AdaBoost and if not, did you try that?\nLimitations:\nThere might be some limitations wrt. to\nθ\n, but I am not sure about this. Please see my question above.\nEthics Flag: No\nSoundness: 3 good\nPresentation: 3 good\nContribution: 3 good",
  "Limitations_refined": "We speculate that this arises partially due to the irreducible factors appearing in those bounds; for example the FO or f2 bounds can never be tighter than twice the train loss of the associated Gibbs classifier, while ours has no such limitation. This result is quite valuable as it demonstrates that Theorem 2 can be readily used in an algorithm-free manner: the choice of learning algorithm is up to the practitioner, but the bound will then often provide an excellent guarantee on the obtained weights θ. Finally, in Figure 3, our optimisation-friendly variant bound Theorem 3 is seen to be competitive in terms of test error while giving an improved-or-equal final bound on all datasets. When considering the less-common setting of binary stumps (see Appendix C) we found that sometimes this objective converged to a sub-optimal local minimum. We speculate that this arises due to the highly non-convex nature of the objective combined with a strong K-inflating gradient signal from the O(e−Kγ 2\n) term. Thus future work to improve these results even further could start with the use of the quasi-convex small-kl relaxation from Thiemann et al. (2017). We note however that this is overall less important than our main results, as both our bounds are still extremely tight when used in an algorithm-free way and applied to the output of another algorithm as discussed above. Overall, we note that in many cases (a majority in Figure 2) our main bound of Theorem 2 is very close to the test set bound and thus cannot actually be improved any further, with the problem of providing sharp guarantees based on the training data alone effectively solved in many cases.",
  "abstractText": "We study the generalisation properties of majority voting on finite ensembles of classifiers, proving margin-based generalisation bounds via the PAC-Bayes theory. These provide state-of-the-art guarantees on a number of classification tasks. Our central results leverage the Dirichlet posteriors studied recently by Zantedeschi et al. (2021) for training voting classifiers; in contrast to that work our bounds apply to non-randomised votes via the use of margins. Our contributions add perspective to the debate on the “margins theory” proposed by Schapire et al. (1998) for the generalisation of ensemble classifiers.",
  "1 Introduction": "Weighted ensemble methods are among the most widely-used and effective algorithms known in machine learning. Variants of boosting (Freund and Schapire, 1997; Chen and Guestrin, 2016) are state-of-the-art in a wide variety of tasks (Shwartz-Ziv and Armon, 2022; Nielsen, 2016) and methods such as random forest (Breiman, 2001) are among the most commonly-used in machine learning competitions (see, e.g., Bell and Koren, 2007; Uriot et al., 2021), valued both for their excellent results and interpretability. Even when these algorithms do not directly produce the best learners for a task, the best performance in competitions is often obtained by an ensemble of “strong learners”—the output of a collection of different algorithms trained on the data—contrasted to the weak learners usually considered in the ensemble learning literature.\nAmong the oldest ideas to explain the performance of ensemble classifiers, and machine learning methods in general, is the concept of margins. First introduced to analyse the Perceptron algorithm (Novikoff, 1962), margins relate closely to the idea of confidence in predictions in ensemble learning, with a large margin implying that a considerable weighted fraction of voters chose the same answer. This was first leveraged to obtain early margin-based generalisation bounds for ensembles by Schapire et al. (1998), in an attempt to understand the excellent generalisation of boosting, a surprising result given classical Vapnik-Chervonenkis theory. This “margins theory” was explored further in a number of works (Wang et al., 2008; Gao and Zhou, 2013; Grønlund et al., 2020) and is among the leading explanations for the success of such methods and boosting in particular.\nThe same thread of margin bounds for ensemble methods has also been taken up in parallel in PAC-Bayes theory by Langford and Seeger (2001); Biggs and Guedj (2022b). PAC-Bayes provides a natural framework both for deriving margin bounds, and for considering ensemble methods in general, particularly majority votes where the largest-weighted ensemble prediction is taken. Within\n36th Conference on Neural Information Processing Systems (NeurIPS 2022).\nthe framework, the weightings are typically considered as the parameter of a categorical distribution over individual voters. PAC-Bayes theorems (see the comprehensive surveys of Guedj, 2019; Alquier, 2021) then directly provide generalisation bounds for the performance of this “randomised” proxy for the majority vote, a.k.a. Gibbs classifier. These can then be de-randomised by such margin-based techniques, or through a variety of oracle bounds (Langford and Shawe-Taylor, 2003; Shawe-Taylor and Hardoon, 2009; Lacasse et al., 2010; Masegosa et al., 2020), motivating new learning algorithms (Lacasse et al., 2006; Roy et al., 2011; Germain et al., 2015; Laviolette et al., 2017; Lorenzen et al., 2019; Viallard et al., 2021; Wu et al., 2021).\nUniquely among PAC-Bayesian approaches, Zantedeschi et al. (2021) instead consider Dirichlet distributions over the voters. Any sample from this distribution already implies a vector of voting weights, and it is on the performance and optimisation of these “stochastic majority votes” they primarily focus. As an aside, they provide an oracle result which allows their bounds to be derandomised, but this introduces an irreducible factor such that the bound on the true fixed vote can never be less than double that of the stochastic version. It also neglects to leverage the generally high confidence of predictions obtained by their algorithm.\nOur contribution. By combining tools from margin bounds and the use of Dirichlet majority votes, we provide a new margin bound for non-randomised majority votes. This is in contrast to Zantedeschi et al. (2021) which primarily considers stochastic majority votes. Our bound empirically compares very favourably to existing margin bounds and in contrast to them are applicable to multi-class classification. Remarkably, our empirical results are also sharper than existing PAC-Bayesian ones, even when the algorithm optimising those bounds is used.\nOur primary tool is a new result relating the margin loss of these stochastic votes to the misclassification loss of the non-randomised ones in a surprisingly sharp way. This tool can additionally be utilised alongside a further idea from Zantedeschi et al. (2021) to obtain an alternative form of the bound which is more amenable to optimisation. Through this work we provide further support to the margins theory for ensembles, showing that near-sharp bounds based on margins alone can be obtained on a variety of real-world tasks.\nOutline. The rest of this section introduces the problem setup, notation and summarises main results. Section 2 provides background on PAC-Bayes, Dirichlet majority votes and margin bounds, relating them to our new results. Section 3 states and summarises our new theoretical results, giving the most relevant proofs (all remaining proofs are deferred to appendices). Section 4 empirically evaluates these new results before we conclude with an overall discussion in Section 5.",
  "1.1 Notation and setting": "Majority voting algorithms combine the predictions of a finite set of “base” classifiers, H, from X to Y = [c] := {1, . . . , c}. The classifiers hi ∈ H take the form hi : X → Y for i ∈ [d] so that |H| = d. Majority votes consider as set of weightings θ in ∆d, the simplex, and return the highest-weighted overall prediction. Using the indicator function IA of a set A, this is expressed as\nfθ(x) = argmax k∈Y\n∑ i∈[d] θiIhi(x)=k.\nWe are primarily interested in learning a weighting θ with small misclassification risk (and guarantees of this) based on a sample S ∼ Dm, where D ∈ M+1 (X × Y) is the data-generating distribution and m ∈ N+ the sample size. We let M+1 (A) denote the set of probability measures on a set A. For h ∈ H the misclassification loss is ℓ0(h, x, y) := Ih(x) ̸=y, the misclassification out-of-sample risk is L0(h) := E(x,y)∼Dℓ0(h, x, y) and a hat denotes the in-sample estimate of this quantity, L̂0(h) := E(x,y)∼Uniform(S)ℓ0(h, x, y). In a slight abuse of notation we will also often write the risk of the majority vote L0(θ) = L0(fθ) and similarly for its empirical counterpart.\nThe margin of majority vote fθ on example (x, y) is derived from the minimal gap between the total weight assigned to the true class y and to any other predicted class:\nM(θ, x, y) := 1\n2\n∑\ni:hi(x)=y\nθi − 1\n2 max k ̸=y\n∑\ni:hi(x)=k\nθi.\nThe corresponding margin loss is ℓγ(θ, x, y) := IM(θ,x,y)≤γ for margin γ ≥ 0, with the corresponding in-sample and out-of-sample risks notated as L̂γ(θ) and Lγ(θ) respectively.",
  "1.2 Overview of results": "Our main result is a margin bound of the following form: with high probability ≥ 1 − δ over the sample, simultaneously for any θ ∈ ∆d and K > 0,\nL(θ) ≤ O ( L̂γ(θ) + e −Kγ2 + DDir(Kθ,1) + log mδ\nm\n) (1)\nwhere DDir(α,β) is the KL divergence between Dirichlet random vectors with parameters α and β, with 1 a vector of ones implying a uniform Dirichlet prior distribution on the simplex. The term e−Kγ 2\nis a de-randomisation penalty. The parameterK is chosen freely in an arbitrary data-dependent way to balance the requirements of the different terms: it must be large enough to decrease this exponential term, while too-large a parameter increases the KL divergence from the uniform prior. This result is surprisingly strong; in particular there is no dependence on the dimensionality (i.e., number of voters d) in the exponential term, an advantage discussed further in Section 3.2.\nIn Equation (1), L̂γ(θ) is the 0-1 valued γ-margin loss which enables comparison with existing margin bounds for trained weighted ensembles. We further consider a second scenario, where the generalization bound is also used to train the model itself. We note that the γ-margin loss L̂γ(θ) appearing in Equation (1) has null gradients, so the bound cannot be directly optimised by gradient descent. To rectify this we also prove a variation of the bound, replacing the above loss by its expectation under a Dirichlet stochastic vote, Eξ∼Dir(Kθ)L̂γ(ξ), which is bounded in differentiable closed form to give an alternative, optimisation-friendly bound.\nIn our evaluations we focus on these two complementary scenarios, obtaining state-of-the-art empirical results. Across different scenarios and tasks our results outperform both existing margin bounds (including a sharpened version of the result from Biggs and Guedj (2022b) which may be of independent interest), and PAC-Bayes bounds, even when it is not used as the objective. Further, in contrast to existing margin bounds our results also hold for multi-class majority votes.",
  "2.1 PAC-Bayes bounds": "PAC-Bayes bounds are among the tightest known generalisation bounds, as for example the only framework in which non-vacuous generalisation bounds for neural networks have been obtained (see e.g. Dziugaite and Roy, 2017, 2018; Zhou et al., 2019; Letarte et al., 2019; Dziugaite et al., 2021; Perez-Ortiz et al., 2021; Biggs and Guedj, 2021, 2022a). However, unlike many other such bounds they usually apply to randomised Gibbs(-like) prediction functions rather than deterministic ones. These are typically re-drawn for every new test evaluation. Thus a high-probability bound is obtained on the expectation of the risk w.r.t. the PAC-Bayes posterior Q, with the complexity of Q ∈ M+1 (H) appearing in the bound in terms of a Kullback-Leibler (KL) divergence from a pre-chosen PAC-Bayes prior P ∈ M+1 (H) (which is not required to be a true prior in the Bayesian sense – see the discussion in Guedj, 2019). A particularly sharp (as discussed in Foong et al., 2021) and widely-used result is given in Theorem 1, valid for any bounded loss function ℓ with values in [0, 1].\nTheorem 1 (Seeger et al. (2001); Maurer (2004)). For any D ∈ M+1 (X × Y), m ∈ N+, prior P ∈ M+1 (H) and δ ∈ (0, 1), with probability ≥ 1 − δ over S ∼ Dm, simultaneously for all Q ∈ M+1 (H)\nEh∼QL(h) ≤ kl−1 ( Eh∼QL̂(h), 1\nm\n( KL(Q,P ) + log 2 √ m\nδ\n))\nwhere the generalised inverse kl−1(u, c) := sup{v ∈ [0, 1] : kl(u, v) ≤ c} and kl(u, v) := u log uv + (1− u) log 1−u1−v is a KL divergence between Bernoulli random variables.\nThe above bound uses the inverse small-kl function which will be seen in our later results and a number of pre-existing ones. To lend intuition we note that kl−1(u, c) ∈ O(u + c), giving\nEquation (1) from Theorem 2 when using a uniform prior. The following upper bounds are also useful: kl−1(u, c) ≤ u + √ c/2 giving “slow-rates” and kl−1(u, c) ≤ u + √ 2cu + 2c. From this\nwe can see that when the loss L̂ → 0 then the overall rate improves to O(1/m), so the small-kl formulation interpolates between the traditional fast and slow rate regimes of learning theory.",
  "2.2 Margin bounds": "In the learning theory literature there exists a rich tradition of using the concept of a margin, which quantifies the confidence of predictions, to explain generalisation. This is particularly evident in the case of voting algorithms such as boosting, where traditional Vapnik-Chervonenkis based techniques predict classical overfitting which is not ultimately observed. The “margins theory” was developed by Schapire et al. (1998) to explain this discrepancy. By considering the weightings θ as the parameter of a categorical distribution, they proved a bound of the form (holding with probability greater than 1 − δ over the sample, as for all bounds in this section) L0(θ) ≤ Lγ(θ) + Õ ( 1\nγ √ m\n) . Although\nthere was initially some debate about the validity of the theory (Breiman, 1999), eventually Gao and Zhou (2013, Theorem 4) provided the following improved bound which further supported that a large-margin voting classifier could generalise: simultaneously for any γ > √ 2/d and θ ∈ ∆d,\nL0(θ) ≤ kl−1 ( L̂γ(θ), 1\nm\n( 2 log(2d)\nγ2 log\n2m2 log d + log dm δ\n)) + log d\nm . (2)\nMore recently, a similar bound (proved through a PAC-Bayesian method based on Seeger et al. (2001)) was proved in Biggs and Guedj (2022b, Theorem 8). Here we give a bound provided as an intermediate step in their proof that is strictly (and empirically considerably) sharper than their final result: for any fixed margin γ > 0, simultaneously for any θ ∈ ∆d\nL0(θ) ≤ kl−1 ( L̂γ(θ) + 1\nm ,\n1\nm\n(⌈ 2γ−2 logm ⌉ log d+ log 2 √ m\nδ\n)) + 1\nm . (3)\nSince γ ∈ (0, 12 ) for non-vacuous results, a union bound argument can be used to extend the above to fixed-precision γ, and this result has the advantage of being valid for small γ as are often observed empirically.\nOur contributions. Firstly we mention the smaller contribution of the improved form of the bound from Biggs and Guedj (2022b) given in Equation (3); a proof is given in Appendix B alongside further refinements and evaluation. However we show that in many cases even this improved version and Equation (2) give weak or vacuous results. As a result of this weakness (and thus perhaps null result for the margins theory applied to voting classifiers) we present a new margin bound in Theorem 2 based on Dirichlet distributions as a theoretical intermediate step. This is also valid in the multi-class case, unlike the above results which are only for binary classification. Empirically the bound is observed to give an enormous improvement in tightness than the existing margin bounds and in some cases is near-sharp.",
  "2.3 Dirichlet stochastic majority votes": "In most results from the PAC-Bayes framework, and in the proof of the existing results given in Section 2.2, the majority vote weightings θ are considered the parameters of a categorical distribution over voters. Zantedeschi et al. (2021) instead consider PAC-Bayesian bounds (specifically, Theorem 1) applied to a hypothesis class of majority votes of the form fξ, where ξ ∼ Dir(α) is drawn from a Dirichlet distribution with parameter α. This distribution has mean Eξ = α/ ∑d i=1 αi with a larger\nsum ∑d\ni=1 αi giving a more concentrated or peaked distribution (see Appendix A for more details).\nSince ξ is randomised, the bounds from Zantedeschi et al. (2021) apply to “stochastic majority votes” rather than the more typical deterministic ones we consider here. However, the use of such Dirichlet distributions over voters in the PAC-Bayes bounds rather than the more usual categorical ones is a major step forward as it allows the correlation between voters to be more carefully considered. This is because with a categorical distribution, the expected Gibbs risk is simply an average of the losses of individual predictors, without taking into account how well the combination of their predictions performs. Conversely, the Dirichlet distribution gives a (stochastic) majority vote of predictors, so if\nthe errors of base voters are de-correlated, the better performance that results from their combination can be accounted for in the bound. We will utilise and de-randomise these stochastic majority votes as a stepping stone to bounds for deterministic predictors fθ directly.\nAs is common in the PAC-Bayes literature, Zantedeschi et al. (2021) use their new bound as an optimisation objective to obtain a new algorithm, here using stochastic gradient descent. The bound with Dirichlet posterior obtained directly from Theorem 1 includes the expected misclassification loss with respect to the Dirichlet parameters, Eξ∼Dir(α)ℓ(fξ, x, y), which has null gradient for any sampled ξ. They therefore additionally upper bound this term by the differentiable closed form\nEξ∼Dir(α)ℓ(fξ, x, y) ≤ I 1 2\n∑\ni:hi(x)=y\nαi, ∑\ni:hi(x) ̸=y αi\n, (4)\nwhere Iz(a, b) is the regularised incomplete beta function, which has a sigmoidal shape. The inequality is sharp in the binary classification case, and is used in the training objective and final evaluation of their method. As an aside, Zantedeschi et al. (2021) also proved an oracle bound which allows their result to be de-randomised, but this introduces a irreducible factor of two. This bound, which holds with probability at least 1−δ over the sample for any θ ∈ ∆d,K > 0 is given by\nL0(θ) ≤ 2 kl−1 ( Eξ∼Dir(Kθ)L̂0(ξ), DDir(Kθ,β) + log 2 √ m δ\nm\n) .\nOur contributions. Firstly, we provide a new margin bound for majority vote algorithms utilising Dirichlet posteriors as a theoretical stepping stone. We show that this bound gives sharper bounds on the misclassification loss than the bound from Zantedeschi et al. (2021), doing better than the irreducible factor, even when applied to the output of their algorithm. We show further that the bound is also tighter when applied to the outputs of other PAC-Bayes algorithms derived from “categorical”type posteriors. Finally, we give an altered form of the bound involving the expectation of the margin loss Eξ∼Dir(α)ℓγ(fξ, x, y) and a result analogous to Equation (4) for this case. Through this we are able to obtain a new PAC-Bayes objective which is compared to existing PAC-Bayes optimisation methods.",
  "3 Main results": "Our main results use the idea of Dirichlet stochastic majority votes from Zantedeschi et al. (2021) as an intermediate step to prove new margin bounds for deterministic majority votes. In this section, first we give our main result in Theorem 2 and discuss further. In Section 3.1 we give an alternative bound obtained by a very similar method which is more amenable to optimisation, and we provide proofs for these results in Section 3.2.\nThe central step in these proofs is in constructing a proxy Dirichlet distribution ξ ∼ Dir(Kθ) over voters, the loss of which is bounded à la PAC-Bayes, and de-randomised using margins to obtain bounds directly for fθ. The primary complexity term appearing in our bounds is therefore DDir(Kθ,β), the KL divergence between Dirichlet distributions with parameters Kθ and β respectively. As with PAC-Bayes priors, β can be chosen in arbitrary sample-independent fashion, but we typically choose it as a vector of ones, giving a uniform distribution on the simplex as prior as in Equation (1). The bounds also involve a de-randomisation penalty of O(e−Kγ 2\n) where γ is the margin appearing in the loss; this term upper bounds the difference between our randomised proxy ξ and its mean θ and gets smaller with K as the distribution concentrates tightly around its mean. This parameter K can be optimised in any data-dependent way to obtain the tightest final bound. Theorem 2. For any D ∈ M+1 (X × Y), m ∈ N+, margin γ > 0, δ ∈ (0, 1), and prior β ∈ Rd+, with probability at least 1− δ over the sample S ∼ Dm simultaneously for every θ ∈ ∆d and K > 0,\nL0(θ) ≤ kl−1 ( L̂γ(θ) + e −(K+1)γ2 , DDir(Kθ,β) + log 2 √ m δ\nm\n) + e−(K+1)γ 2 .\nTheorem 2 differs from the existing margin bounds of Equations (2) and (3), and Schapire et al. (1998) in a specific and significant way, with θ appearing not only in the loss function L̂γ(θ), but also\nin the KL complexity term. Empirically we find our bound to be an improvement but it is possible to generate scenarios where the pre-existing bounds are non-vacuous while ours is not, since the KL divergence is unbounded for certain choices of θ, for example when one of the components is exactly zero. This difference arises because the existing bounds all use the idea of a categorical distribution with parameter θ in their proofs (which has KL divergence from a uniform prior upper bounded by log d), while we use a Dirichlet. This gains us the surprisingly tight de-randomisation result (Theorem 4) used in all proofs.",
  "3.1 PAC-Bayes bound as objective": "We note here that it is non-trivial to directly obtain a training objective for optimisation from Theorem 2, due to the non-differentiability of the margin loss L̂γ(θ). Therefore, in order to compare results with a wide variety of methods that optimise PAC-Bayes bounds (including those used by Zantedeschi et al., 2021, as baselines), we obtain a relaxed and differentiable formulation in Theorem 3 for direct optimisation. Theorem 3. Under the conditions of Theorem 2 the following bound also holds\nL0(θ) ≤ kl−1 ( Eξ∼Dir(Kθ)L̂γ(ξ), DDir(Kθ,β) + log 2 √ m δ\nm\n) + e−4(K+1)γ 2 .\nUsing the incomplete Beta function Iz(a, b) we also have the following result, which is sharp in the binary classification case,\nEξ∼Dir(α)ℓγ(ξ, x, y) ≤ I 1 2+γ\n∑\ni:hi(x)=y\nαi, ∑\ni:hi(x)̸=y\nαi\n.\nTheorem 3 has a stronger PAC-Bayesian flavour than Theorem 2, with an expected loss under some distribution appearing (complicating the final optimisation ofK), while Theorem 2 takes a form much closer to that of a classical margin bound. The second part of the result is analogous to Equation (4) used by Zantedeschi et al. (2021). We combine both parts to calculate the overall bound in closed form and obtain gradients for optimisation.",
  "3.2 Proof of main results": "The proof of Theorems 2 and 3 essentially follow from applying a simple PAC-Bayesian bound in combination with the key Theorem 4 below. In some sense this is our most important and novel result. Our whole approach is largely motivated by its surprising tightness; in particular there is no dependence on the dimension, which is avoided by careful use of the aggregation property of the Dirichlet distribution. This surprise arises because to obtain a tightly concentrated Dirichlet distribution on ξ ∼ Dir(α), the concentration parameter K =∑di=1 αi must grow linearly with the dimension. In fact, even a uniform distribution (which will be less peaked than our final posterior) has ∑d i=1 αi = d, so the de-randomisation step is effectively very cheap in higher dimensions. Theorem 4. Let θ ∈ ∆d and K > 0. Then for any γ > 0 and (x, y), ℓ0(θ, x, y) ≤ Eξ∼Dir(Kθ)ℓγ(ξ, x, y) + e−4(K+1)γ 2 ,\nEξ∼Dir(Kθ)ℓγ(ξ, x, y) ≤ ℓ2γ(θ, x, y) + e−4(K+1)γ 2 .\nFor our proofs we first recall the aggregation property of the Dirichlet distribution: if (ξ1, . . . , ξd) ∼ Dir((α1, . . . , αd)), then (ξ1, . . . , ξd−1 + ξd) ∼ Dir((α1, . . . , αd−1 + αd)). We further note the following crucial concentration-of-measure result. The aforementioned lack of dimensionality in Theorem 4 is possible because Theorem 5 depends only on ∑d i=1 αi, and this value is unchanged by aggregation, which avoids the dimension dependence that would otherwise be introduced by the requirement ∥u∥2 = 1 below. Theorem 5 (Marchal and Arbel, 2017). Let X ∼ Dir(α), t > 0, and u ∈ Rd with ∥u∥2 = 1. Then\nPX {u · (X − EX) > t} ≤ exp ( −2 ( d∑\ni=1\nαi + 1\n) t2 ) .\nProof of Theorem 2 and Theorem 3. The proof of our main results is completed by applying the PACBayes bound Theorem 1 with the γ-margin loss to a Dirichlet prior and posterior with parameters β and Kθ respectively. Substituting the first part of Theorem 4 gives the first part of Theorem 3, and additionally substituting the second part and re-scaling γ → γ/2 gives Theorem 2. For the second part of Theorem 3, define w = {i : hi(x) = y} for fixed (x, y) so W := ∑ i∈w ξi ∼\nBeta (∑ i∈w αi, ∑ i/∈w αi ) by the aggregation property of the Dirichlet distribution. Then\nEξℓγ(ξ, x, y) ≤ Eξ { W ≥ 1 2 − γ } = 1− I 1 2−γ\n∑\nj∈w αj , ∑ i/∈w αj\n= I 1\n2+γ\n∑\nj /∈w αj , ∑ i∈w αj\n\nusing Iai−maxj ̸=i aj≤2γ ≤ Iai−∑j ̸=i aj≤2γ = I∑j ̸=i aj≥ 12−γ for a ∈ ∆ c (with equality for c = 2 classes), and that Iz(a, b) is the CDF of a Beta distribution with parameters (a, b).\nProof of Theorem 4. Define γ2 > γ1 such that γ := γ2 − γ1, and α = Kθ. From the trivial inequality Ix∈A − Ix∈B ≤ Ix∈AIx/∈B we derive\n∆ := ℓγ1(θ, x, y)− Eξ∼Dir(α)ℓγ2(ξ, x, y) = Eξ∼Dir(α)[IM(θ,x,y)≤0 − IM(ξ,x,y)≤γ ] ≤ Eξ∼Dir(α)[IM(θ,x,y)≤0IM(ξ,x,y)>γ ] ≤ Eξ∼Dir(α)[IM(ξ,x,y)−M(θ,x,y)>γ ]\n= Pξ∼Dir(α)    ∑\ni:hi(x)=y\nξi −max j′ ̸=y\n∑\ni:hi(x)=k′\nξi − ∑\ni:hi(x)=y\nθi +max j ̸=y\n∑\ni:hi(x)=k\nθi > 2γ\n≤ Pξ∼Dir(α)    ∑\ni:hi(x)=y\nξi − ∑\ni:hi(x)=k\nξi − ∑\ni:hi(x)=y\nθi + ∑\ni:hi(x)=k\nθi > 2γ\nwhere in the last inequality we set k = argmaxk ̸=y ∑ i:hi(x)=k θi, and use that maxj ∑ i:hi(x)=j\nθi− maxj ∑ i:hi(x)=j ξi ≤ maxj ∑ i:hi(x)=j θi− ∑ i:hi(x)=k\nξi for any k. We rewrite the above in vector form (with inner product denoted u · v) as\n∆ ≤ Pξ∼Dir(α) {\n1√ 2 [ 1 −1 0 ] ︸ ︷︷ ︸ u · (  ∑ i:hi(x)=y ξi∑ i:hi(x)=k ξi∑ i:hi(x)/∈{k,y} ξi\n︸ ︷︷ ︸ ξ̃\n−\n∑ i:hi(x)=y θi∑\ni:hi(x)=k θi∑\ni:hi(x)/∈{k,y} θi\n\n︸ ︷︷ ︸ Eξ̃\n) > √ 2γ }\n= Pξ̃∼Dir(α̃) { u · (ξ̃ − Eξ̃) > √ 2γ }\nwhere by the aggregation property of the Dirichlet distribution ξ̃ ∼ Dir(α̃) with\nα̃ :=\n∑\ni:hi(x)=y\nαi, ∑\ni:hi(x)=k\nαi, ∑\ni:hi(x)/∈{k,y} αi\nT\n.\nApplying Theorem 5 we obtain ∆ ≤ e−4( ∑ i α̃i+1)γ 2 = e−4( ∑d i=1 αi+1)γ 2\n. This gives the first inequality by setting γ1 = 0, γ2 = γ. Setting γ1 = γ, γ2 = 2γ and swapping θ and ξ gives an almost identical proof (with some signs reversed) of the second inequality.",
  "4 Empirical evaluation": "In this section we empirically validate our results against existing PAC-Bayesian and margin bounds on several classification datasets from UCI (Dua and Graff, 2017), LIBSVM1 and Zalando (Xiao et al., 2017). Since our main result in Theorem 2 is not associated with any particular algorithm, we use θ outputted from PAC-Bayes-derived algorithms to evaluate this result\n1https://www.csie.ntu.edu.tw/~cjlin/libsvm/\nagainst other margin bounds (Figure 1) and PAC-Bayes bounds (Figure 2). We then compare optimisation of our secondary result Theorem 3 with optimising those PAC-Bayes bounds directly (Figure 3). All generalisation bounds given are evaluated with a probability 1−δ=0.95. Further details not provided here including tabulated results, description of datasets, training mechanisms and compute are provided in Appendix C. The code for reproducing the results is available at https://github.com/vzantedeschi/dirichlet-margin-bound.\nStrong and weak voters. Similarly to Zantedeschi et al. (2021) we consider both using dataindependent and data-dependent voters. This brings our experimental setup in line with a common workflow for machine learning practicioners: the training set is sub-divided into a set for training several different strong algorithms, and a second set on which the weightings of these are optimised. More specifically, the weak voter setting, used only for binary classification, uses axis-aligned decision stumps (denoted stumps), with thresholds evenly spread over the input space (6 per feature and per class). The stronger voters (denoted rf ) are learned from half of the training data, while the other half is used for evaluating and optimising the different generalisation bounds (note this reduces m). These take the form of random forests (Breiman, 2001) of M=10 trees optimising Gini impurity score on n2 bagged samples and √ d drawn features for each tree, with unbounded maximal depth.\nOptimising γ and K in bounds. In reporting margin bounds we optimise over a grid of margin γ values in (0, 12 ), and additionally over K for Theorem 2. Since Theorem 2 and Equation (3) as stated require a fixed margin, we apply a union bound over the values in the grid, replacing δ in these bounds with δ/N where N is the number of grid points.\nExisting PAC-Bayes bounds. We compare to state-of-the-art PAC-Bayesian bounds (and derived algorithms) for weighted majority vote classifiers: the First Order (Langford and Shawe-Taylor, 2003), the Second Order (Masegosa et al., 2020), Binomial (Lacasse et al., 2010) (with the number of voters set to 100) and the two Chebyshev-Cantelli-based (Wu et al., 2021) empirical bounds from categorical-type Gibbs classifiers with parameter θ, and we refer to these as FO, SO, Bin, CCPBB and CCTND respectively (more details are given in Appendix C). We denote by f2 the factor two bound derived in Zantedeschi et al. (2021, Annex A.4) from Dirichlet majority votes. All prior distributions for PAC-Bayes bounds, including ours, are set to uniform. We also refer by the same names to the outputs of optimising these bounds with stochastic gradient descent; details on training and initialisation are given in Appendix C.\nDescription of figures. In Figure 1 we compare Theorem 2 with the existing margin bound of Equation (2) and the improved Biggs and Guedj (2022b) bound given in Equation (3). Since Equation (3) is strictly better than the original result and the latter was vacuous in almost all cases considered (see Appendix B), we do not include it. All datasets are for binary classification as the existing results only cover this case, and the θ values considered are the outputs of either the FOor f2-optimisation using either the weak or the strong voters described above. Figure 2 extends this evaluation of Theorem 2 to improve generalisation results, by applying it to the models optimised with the PAC-Bayes bounds FO, SO, Bin and f2 as objective. In this case, we consider both binary and multiclass datasets. In Figure 3 we directly compare the outputs of optimising state-of-the-art PAC-Bayesian bounds with our optimisation-ready variant result Theorem 3. These experiments were carried out on strong voters, as standard in the literature (e.g. Lorenzen et al., 2019; Masegosa et al., 2020; Wu et al., 2021).",
  "5 Discussion and conclusion": "We observe overall that in many cases the existing margin and PAC-Bayes bounds are insufficient to explain the generalisation observed, while our new bound is consistently tight, and sometimes sharp (i.e. it approaches the true test error).\nFigure 1 demonstrates that existing margin bounds can be insufficient to explain the generalisation observed, which could be construed as a null result for the “margins theory”. However, our new bound obtains empirically very sharp results in almost all cases, reaffirming to the theory. Note that due to the non-convexity of our bound, the reported values are local minima and can potentially be improved by applying a thorougher search for the optimal K, still giving a similarly valid bound. For instance, simply by enlarging the search space for K our bound drops to 0.36± 0.10 on ADULT with decision stumps as voters, beating existing bounds also in this setting. Unlike the existing results, θ also arises in the complexity (KL divergence) term and so the bound is not equally tight for every θ at\nfixed margin loss. Further examination of this property could add additional nuance and perspective to the theory.\nWhen comparing to existing PAC-Bayes bounds in Figure 2, remarkably Theorem 2 is always tighter than just using the bound which is being optimised. We speculate that this arises partially due to the irreducible factors appearing in those bounds; for example the FO or f2 bounds can never be tighter than twice the train loss of the associated Gibbs classifier, while ours has no such limitation. This result is quite valuable as it demonstrates that Theorem 2 can be readily used in an algorithm-free manner: the choice of learning algorithm is up to the practitioner, but the bound will then often provide an excellent guarantee on the obtained weights θ.\nFinally, in Figure 3, our optimisation-friendly variant bound Theorem 3 is seen to be competitive in terms of test error while giving an improved-or-equal final bound on all datasets. When considering the less-common setting of binary stumps (see Appendix C) we found that sometimes this objective converged to a sub-optimal local minimum. We speculate that this arises due to the highly non-convex nature of the objective combined with a strong K-inflating gradient signal from the O(e−Kγ 2\n) term. Thus future work to improve these results even further could start with the use of the quasi-convex small-kl relaxation from Thiemann et al. (2017). We note however that this is overall less important than our main results, as both our bounds are still extremely tight when used in an algorithm-free way and applied to the output of another algorithm as discussed above.\nOverall, we note that in many cases (a majority in Figure 2) our main bound of Theorem 2 is very close to the test set bound and thus cannot actually be improved any further, with the problem of providing sharp guarantees based on the training data alone effectively solved in many cases.\nConclusion. We obtain empirically very strong generalisation bounds for voting classifiers using margins. We believe these are highly relevant to the community, since voting-based classifiers and margin-maximising algorithms are among the most popular and influential in machine learning. Dirichlet majority votes have already obtained excellent results in the stochastic setting (Zantedeschi et al., 2021), but our new result in Theorem 4 showing they are well-approximated by their mean should open new directions in the more conventional deterministic setting.\nOur results also have practical relevance: for example, in the strong voter machine learning workflow described above, instead of setting data aside as a test set, this data can be freed up to learn even stronger voters, since a strong out-of-sample ensemble guarantee can still be provided even without a test set.\nIn future work we hope to expand these results further to other (non-majority) voting schemes like those with score-output voters (as in e.g. Schapire et al., 1998), and ensembles of voters with finite VC dimension.",
  "Acknowledgements": "The experiments presented in this paper were carried out using the Grid’5000 testbed, supported by a scientific interest group hosted by Inria and including CNRS, RENATER and several Universities as well as other organizations (see https://www.grid5000.fr). F.B. acknowledges the support of the EPSRC grant EP/S021566/1. V.Z. contributed to this work while being supported from the French National Agency for Research, grant ANR-18-CE23-0015-02. B.G. acknowledges partial support by the U.S. Army Research Laboratory, U.S. Army Research Office, U.K. Ministry of Defence and the U.K. Engineering and Physical Sciences Research Council (EPSRC) under grant number EP/R013616/1; B.G. also acknowledges partial support from the French National Agency for Research, grants ANR-18-CE40-0016-01 and ANR-18-CE23-0015-02.",
  "Reviewer Summary": "Reviewer_3: On Margins and Generalisation for Voting Classifiers\nIn this paper, the authors take a generalization bound for stochastic majority votes from prior work and show how to derive a new margin bound for majority vote algorithms using Dirichlet priors. As stepping stone they prove a new result relating the misclassification loss to the stochastic voting loss. This bound is empirically verified to have better characteristics in that it comes closer to accurately predicting test set error than related work. The authors also derive an optimizable target version of their bound which appears to yield good results compared to other similar approaches in the literature on a variety of datasets.\n\nReviewer_4: This paper deals with the theory of (multi-category) pattern classification. The authors introduce a new PAC-Bayes bound for majority voting of finite ensembles of classifiers. It is based on Dirichlet posteriors. A variant is proposed to serve as the objective function of a training algorithm (train the model itself). Those two bounds are compared with the state-of-the-art ones in the framework of an empirical study.\n\nReviewer_5: The paper \"On Margins and Generalisation for Voting Classifiers\" proposes a novel generalization bound for voting classifiers (i.e. ensembles) using a Dirichlet posterior over the ensemble members. The novel bound explores a new direction for generalization bounds for ensembles and also seems to have decent results in practice. The paper is generally well-written and easy to follow. The theoretical contribution is clearly stated and the experimental evaluation seems decent."
}