Abstract
Neural Random Forests (NRF) represent a hybrid approach that reformulates traditional Random Forests into a differentiable neural network architecture. By initializing a network with the structure of a pre-trained forest and smoothing decision boundaries with gradient-based optimization, NRFs achieve superior performance on small-to-medium datasets compared to standard Random Forests and standalone Neural Networks.
Introduction
Machine learning practitioners often face a dilemma when working with small-to-medium datasets. Random Forests (RF) are robust and require minimal tuning but are constrained by axis-aligned splits that create "boxy" or "stair-like" decision surfaces. These structures often struggle to model complex relationships, especially when features are highly correlated.
Conversely, Neural Networks (NN) offer high flexibility and smooth boundaries but are prone to overfitting and sensitive to initialization on limited data. Neural Random Forests (NRF) address this gap by using the structural prior of a decision tree to initialize a neural network, which is then refined via backpropagation.
Methodology: From Trees to Tensors
The core innovation of NRF is a mathematical mapping that transforms a regression tree into a three-layer neural network. This process involves three key steps:
1. The Mapping Architecture
The transformation follows a specific hierarchy where internal split nodes and leaf nodes are mapped to hidden layers:
- First Hidden Layer ($\mathcal{H}$): Each neuron corresponds to an internal split node in the tree.
- Second Hidden Layer ($\mathcal{L}$): Each neuron represents a leaf node.
- Output Layer: Aggregates the values from the leaf nodes to produce a final prediction.
2. Differentiable Smoothing
To enable gradient-based training, the "hard" threshold functions of standard trees (e.g., $x > \alpha$) are replaced with "soft" differentiable functions like the hyperbolic tangent (tanh). This transition makes the entire forest architecture differentiable, allowing for fine-tuning of split points and leaf values.
3. Training Strategies
The authors propose two primary training methods:
- Independent Training (Method 1): Each tree is converted into a small network and optimized individually. The final ensemble averages their outputs, preserving the traditional forest logic. This method often yields better results due to implicit regularization.
- Joint Training (Method 2): All trees are concatenated into a single large network and trained simultaneously, allowing for co-adaptation across the ensemble.
Experimental Evaluation
The NRF model was benchmarked against several UCI Machine Learning Repository datasets, ranging from small benchmarks (Auto MPG, Housing) to high-dimensional (Communities and Crime) and large-scale (Protein Tertiary Structure) data.
Key Findings
- Performance Gains: NRFs consistently outperformed the base Random Forests from which they were derived across all tested datasets.
- Regularization via Structure: The tree-based initialization acts as a powerful "warm start," providing an inductive bias that prevents the overfitting common in randomly initialized networks.
- Oblique Boundaries: Unlike axis-aligned trees, NRFs can learn diagonal decision boundaries through gradient updates, better capturing correlations between features.
- Efficiency: NRFs are naturally sparse, connecting only the neurons that represent valid paths in the original tree structure, leading to a more parameter-efficient model than fully connected NNs.
Discussion and Limitations
While NRFs show significant promise, they are not without limitations. Bayesian Additive Regression Trees (BART) still frequently outperform NRFs, suggesting that BART might provide an even better structural prior for network initialization. Additionally, the current mapping is restricted to two hidden layers, and the computational overhead of independent training can be significant without parallelization.
Conclusion
Neural Random Forests successfully marry the interpretability and robustness of decision trees with the optimization power of neural networks. By treating the tree structure as a starting point rather than a final product, NRFs offer a compelling alternative for regression tasks on datasets where traditional deep learning might struggle.
Summary updated