On Margins and Generalisation for Voting Classifiers

Felix Biggs, Valentina Zantedeschi, Benjamin Guedj

Ensemble methods like Random Forests and Boosting are foundational tools in machine learning, celebrated for their robust performance and resistance to overfitting. However, their success presents a theoretical paradox: classical learning theory suggests that such complex models, which boast massive numbers of parameters, should severely overfit the training data.

Presented at NeurIPS 2022, this research provides a significant leap forward in resolving this paradox. By leveraging PAC-Bayes theory and Dirichlet distributions, the authors derive new, state-of-the-art generalization bounds for majority voting classifiers. Unlike previous theories that often produced "vacuous" results (error bounds exceeding 100%), these new bounds are remarkably tight, independent of the number of voters, and can even serve as a practical objective for training high-performance ensembles.

The Theoretical Gap: Margins and Randomization

To explain why ensembles generalize so well, researchers have historically relied on "margins theory." A margin measures the "confidence" of a vote—specifically, the gap between the weight assigned to the correct class and the weight assigned to the runner-up. While intuitive, the mathematical guarantees (or bounds) derived from margin theory have traditionally been quite loose.

Furthermore, most existing PAC-Bayesian bounds apply only to randomized classifiers, where a single voter is selected at random to make a prediction. In practice, however, machine learning practitioners almost exclusively use deterministic majority votes. The central problem addressed by this paper is the glaring lack of tight, non-randomized, and multi-class compatible guarantees that accurately explain the success of real-world ensemble learning.

Methodology: A PAC-Bayesian Approach

The authors tackle this gap using PAC-Bayes theory, a framework that provides high-probability guarantees on the gap between training error and true test error. Their novel methodology rests on four key pillars:

  1. Dirichlet Posteriors: Instead of the standard approach of using categorical distributions over voters, the researchers employ Dirichlet distributions. This shift allows them to treat the voting weights as a continuous random vector on a simplex, better accounting for the correlations between different voters rather than treating them as isolated entities.
  2. De-randomization via Margins: The authors use a "stochastic majority vote" as a theoretical bridge. By applying a new concentration-of-measure result, they successfully relate the risk of this stochastic proxy back to the deterministic majority vote used in practice.
  3. Dimensionality Independence: A major technical achievement of this work is proving that the "penalty" for having many voters does not grow with the number of voters ($d$). This effectively bypasses the "curse of dimensionality" that plagues many alternative bounds.
  4. Differentiable Bounds: The authors formulate a variation of their bound that is fully differentiable. This means the bound itself can be used directly as a loss function for gradient descent, allowing models to be trained to explicitly optimize their own generalization guarantees.

Key Insights and Empirical Validation

The researchers evaluated their theoretical bounds on a wide variety of binary and multi-class classification tasks from the UCI repository, LIBSVM, and Zalando (Fashion-MNIST). They tested their framework against both weak learners (Decision Stumps) and strong learners (Random Forests).

Superior Tightness and Near-Sharpness

The empirical results demonstrated that the new bounds consistently outperformed existing margin bounds. In many cases where previous bounds were vacuous (near 1.0), the new bound was "near-sharp"—meaning the mathematical guarantee was remarkably close to the actual observed test error on datasets like Mushrooms.

Outperforming PAC-Bayes Baselines

Even when compared to state-of-the-art PAC-Bayesian bounds, the new framework provided tighter guarantees. Crucially, it avoids the "factor of two" penalty usually incurred when de-randomizing a Gibbs classifier. Furthermore, the framework handles multi-class problems naturally through its definition of margins across the simplex, bypassing the binary-only limitations of older theories.

Algorithm-Agnostic Application and Optimization

The derived bounds can be applied to any existing ensemble—such as a pre-trained XGBoost or Random Forest model—to extract a valid performance guarantee without altering how the model was initially trained. When the differentiable bound was used as a training objective, the resulting models achieved competitive test errors while maintaining significantly better generalization guarantees than models trained with standard objectives.

Limitations and Future Directions

While a major step forward, the authors note a few limitations to their approach:

  • Non-Convexity: The bound is non-convex, meaning optimization can sometimes get stuck in local minima. This was observed on the Adult dataset, where a more thorough hyperparameter search was required to improve results.
  • Zero-Weight Sensitivity: Because the bound relies on the KL divergence between Dirichlet distributions, the mathematics can become undefined if the weights of certain voters are pushed exactly to zero.

Looking ahead, the authors suggest extending this framework to "score-output" voters—where base models output class probabilities rather than discrete labels—and exploring the theoretical implications of ensembles with an infinite number of potential voters. Overall, this work provides a rigorous, practical, and highly accurate mathematical foundation for one of machine learning's most reliable techniques.

Summary updated

BibTeX
@inproceedings{biggs2022margins,
  author = {Felix Biggs and Valentina Zantedeschi and Benjamin Guedj},
  title = {{On Margins and Generalisation for Voting Classifiers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=xvLWypz8p8},
}
Figure