Why do Random Forests Work? Understanding Tree Ensembles as Self-Regularizing Adaptive Smoothers

Alicia Curth, Alan Jeffares, Mihaela van der SchaararXiv 2024

Abstract

Despite their remarkable effectiveness and broad application, the drivers of success underlying ensembles of trees are still not fully understood. In this paper, we highlight how interpreting tree ensembles as adaptive and self-regularizing smoothers can provide new intuition and deeper insight to this topic. We use this perspective to show that, when studied as smoothers, randomized tree ensembles not only make predictions that are quantifiably more smooth than the predictions of the individual trees they consist of, but also further regulate their smoothness at test-time based on the dissimilarity between testing and training inputs. First, we use this insight to revisit, refine and reconcile two recent explanations of forest success by providing a new way of quantifying the conjectured behaviors of tree ensembles objectively by measuring the effective degree of smoothing they imply. Then, we move beyond existing explanations for the mechanisms by which tree ensembles improve upon individual trees and challenge the popular wisdom that the superior performance of forests should be understood as a consequence of variance reduction alone. We argue that the current high-level dichotomy into bias- and variance-reduction prevalent in statistics is insufficient to understand tree ensembles -- because the prevailing definition of bias does not capture differences in the expressivity of the hypothesis classes formed by trees and forests. Instead, we show that forests can improve upon trees by three distinct mechanisms that are usually implicitly entangled. In particular, we demonstrate that the smoothing effect of ensembling can reduce variance in predictions due to noise in outcome generation, reduce variability in the quality of the learned function given fixed input data and reduce potential bias in learnable functions by enriching the available hypothesis space.

Introduction

Random Forests (RF) and Gradient Boosting Machines (GBM) have long been the standard for tabular data. However, the theoretical justification for their superiority over single decision trees remains a subject of debate. While the traditional view attributes their success to variance reduction via bagging, this explanation fails to account for the performance of "interpolating" forests that perfectly fit training data or the success of boosting. This paper proposes a new perspective: tree ensembles act as adaptive and self-regularizing smoothers.

The Linear Smoother Perspective

The authors frame tree ensembles as linear smoothers, where a prediction $\hat{f}(x_0)$ is a weighted average of training labels: $$\hat{f}(x_0) = \sum_{i=1}^n w_i(x_0) y_i$$ This framework allows for the quantification of smoothing using the effective number of parameters ($p^0_{\hat{s}}$). By measuring this metric, the researchers can objectively analyze how ensemble size, feature randomness ($m$), and data dissimilarity ($\delta$) influence model behavior.

Self-Regularization and the "Spiked-Smooth" Property

A key contribution of this work is the quantitative validation of the "spiked-smooth" property. While an interpolating forest behaves like a 1-Nearest Neighbor (1-NN) model on training data (fitting points exactly), it transitions to $k$-NN-like behavior ($k > 1$) on unseen data.

Crucially, this smoothing is self-regularizing at test time. As a test point $x_{test}$ moves further from the training set, the ensemble automatically increases its degree of smoothing without retraining. This adaptive behavior provides a form of regularization that is intrinsic to the ensemble structure.

Beyond Variance Reduction: Reducing Representation Bias

The paper challenges the "variance-reduction-only" dogma by showing that ensembling also reduces representation bias. A single tree is limited by its axis-aligned splits, but an ensemble—being a weighted average of many such trees—can represent a much richer and smoother set of functions.

Ensembling individual interpolating trees (A, B) creates a more complex and smoother hypothesis space (C), reducing representation bias.

As illustrated in the figure above, individual trees (A and B) create simple partitions. Their ensemble (C) creates a more granular and expressive hypothesis space. This expansion of the hypothesis space allows forests to outperform trees even in noiseless settings where variance reduction is not the primary driver of success.

Conclusion

By viewing tree ensembles as self-regularizing adaptive smoothers, we gain a more nuanced understanding of their success. They do not just reduce variance; they fundamentally expand the model's expressive capacity and automatically tune their complexity based on the input data. This perspective reconciles existing theories and suggests that similar mechanisms may underlie the generalization of other overparameterized models, such as neural networks.

Summary updated

BibTeX
@misc{curth2024why,
  author = {Alicia Curth and Alan Jeffares and Mihaela van der Schaar},
  title = {{Why do Random Forests Work? Understanding Tree Ensembles as Self-Regularizing Adaptive Smoothers}},
  year = {2024},
  eprint = {2402.01502},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.01502},
}
Figure