Abstract
This research explores the mechanics of Bayesian Classification and Regression Trees (CART), specifically focusing on the prior distribution model proposed by Chipman et al. (1998). While Bayesian CART offers a robust alternative to frequentist "greedy" algorithms, its performance is heavily dependent on two hyperparameters, $\alpha$ and $\beta$, which control tree size and shape. This study investigates how these hyperparameters interact with each other and the underlying data structure ($X$ matrix). Through analytical derivations using Catalan numbers and extensive simulations, the research demonstrates that default software settings often lead to underfitting. By tuning these priors and introducing a novel modification allowing $\alpha > 1$, researchers can achieve higher predictive accuracy and better stability, particularly in high-noise environments.
Introduction
Standard regression trees, such as those implemented in the frequentist rpart framework, utilize greedy algorithms that make locally optimal splits at each node. While efficient, these models often struggle with overfitting or failing to capture the global structure of the data. Bayesian CART addresses this by treating the tree structure itself as a random variable, allowing for the exploration of a "forest" of probable trees via Markov Chain Monte Carlo (MCMC) sampling.
However, the Bayesian approach requires the specification of a prior distribution. The most widely used prior, established by Chipman et al. (1998), defines the probability of a node splitting based on its depth $d$ as: $$P(split) = \alpha(1 + d)^{-\beta}$$ Despite its popularity, the internal dynamics of $\alpha$ and $\beta$ are often treated as a "black box." This paper summarizes an in-depth study into how these parameters, alongside the available data, dictate the behavior of the resulting models.
The Interplay of Hyperparameters
The research clarifies the roles of the two primary hyperparameters:
- $\alpha$ (Size): Traditionally viewed as the base probability of a split.
- $\beta$ (Shape): Controls the rate at which the probability of splitting decays as the tree grows deeper.
One of the study's key findings is the "coupling" of these parameters. It is possible to achieve the same average number of leaves using many different combinations of $\alpha$ and $\beta$. However, the variance of the tree size changes significantly depending on the choice. Specifically, selecting high values for both $\alpha$ and $\beta$ results in a prior with much lower variance, meaning the algorithm is more certain about the intended tree size. Conversely, low values for both parameters create a "flatter" prior with high uncertainty.
The Influence of the Design Matrix ($X$)
A significant contribution of this work is the discovery that the prior distribution is not independent of the data. The number of unique observations in the explanatory variables ($X$) imposes a physical limit on tree growth. If the dataset contains few unique values, the tree cannot expand beyond a certain point, regardless of the hyperparameter settings. This implies that the prior is implicitly constrained by the design matrix, a factor often overlooked in standard Bayesian CART applications.
Analytical and Simulation Results
The author employed a multi-stage methodology to validate these observations:
- Analytical Derivation: For simplified cases (where $\beta = 0$), the author used Catalan numbers to derive exact formulas for the expected number of leaves and the variance of tree size.
- Simulations: To analyze more complex scenarios, 50,000 trees were simulated. These simulations confirmed that increasing the number of distinct observations in $X$ significantly increases the average number of leaves in the prior distribution.
- The "Pinball" Modification: The author proposed a modification to the splitting probability that allows $\alpha$ to exceed 1. This provides researchers with tighter control over tree growth, enabling the creation of larger trees with very low variance—a configuration that was mathematically impossible under the original 1998 constraints.
Empirical Performance
The study tested these insights using synthetic data and real-world benchmarks, including the New York Air Quality dataset and a motorcycle accident simulation.
In the motorcycle accident benchmark—a non-linear dataset measuring head acceleration—tuning the hyperparameters to center the prior on the expected tree complexity increased the $R^2$ from 0.75 (using default settings) to 0.80. Furthermore, in synthetic scenarios with low signal-to-noise ratios, the tuned Bayesian models consistently outperformed frequentist trees, demonstrating superior resilience to noise.
Conclusion
The research concludes that the "default" hyperparameters provided by popular R packages like tgp are frequently suboptimal for complex, non-linear functions. By understanding the relationship between $\alpha$, $\beta$, and the $X$ matrix, practitioners can better regularize their models. The proposed modification allowing $\alpha > 1$ offers a promising path for future implementations in Bayesian Additive Regression Trees (BART), potentially further narrowing the gap between probabilistic modeling and high-performance machine learning.
Summary updated