Abstract
Neural Random Forest Imitation (NRFI) addresses the challenge of deploying differentiable models in "small data" regimes where deep learning typically overfits. By treating a trained Random Forest (RF) as a teacher, NRFI generates synthetic data to train a compact neural network student. This approach preserves the decision boundaries of the RF while enabling integration into end-to-end deep learning pipelines with up to 300x fewer parameters than previous mapping methods.
Introduction
In many real-world scenarios, such as medical diagnostics or industrial fault detection, available training data is scarce. While Random Forests (RFs) are robust in these "small data" regimes, they lack the differentiability required for modern deep learning architectures. Conversely, Neural Networks (NNs) often struggle with overfitting when data is limited. Previous attempts to bridge this gap by mapping RF structures directly into NNs resulted in massive, sparse architectures that scaled poorly. Neural Random Forest Imitation (NRFI) proposes a behavioral imitation approach rather than a structural one, decoupling model complexity from logic complexity.
The NRFI Framework
The NRFI process transforms a non-differentiable ensemble into a differentiable network through a four-stage imitation learning pipeline.
- Bottom-Up Weighting: Class distribution information is propagated from leaf nodes to the root of each decision tree, identifying paths likely to lead to specific target classes.
- Guided Routing (Data Generation): The decision process is reversed to generate synthetic training data. Starting at the root, paths are sampled based on calculated weights, and random input vectors are modified to satisfy the split conditions along those paths.
- Automatic Confidence Distribution: An optimization strategy (Equation 6 in the paper) balances the generated data, ensuring the student network learns from both high-agreement cases and critical decision boundaries.
- Imitation Learning: A compact, fully connected neural network is trained on this infinite stream of synthetic "input-target" pairs to mimic the RF’s decision logic.
Experimental Evaluation
The authors evaluated NRFI across nine classification benchmarks from the UCI Machine Learning Repository, including datasets like Car, Connect-4, Covertype, and Wisconsin Breast Cancer. The experiments specifically targeted low-sample scenarios (5, 10, 20, and 50 samples per class) to test the framework's robustness in data-constrained environments.
Results
NRFI demonstrated significant improvements in both efficiency and performance:
- Parameter Efficiency: On the Soybean dataset, NRFI achieved superior accuracy with only 2,676 parameters, compared to nearly 1 million parameters required by traditional mapping methods—a reduction of over 300x.
- Small-Data Robustness: With only 5 samples per class, NRFI consistently outperformed standard NNs. On the Car dataset, NRFI reached ~58% accuracy, surpassing the ~54% achieved by a standard NN.
- Generalization: Combining original training data with RF-generated synthetic data provided a "best of both worlds" effect, leading to better generalization than either the standalone RF or NN.
Discussion and Future Work
NRFI effectively uses synthetic data as a bridge, allowing NNs to learn underlying manifolds without the overfitting typical of small datasets. While currently optimized for classification, the "Guided Routing" logic could be adapted for regression tasks. A primary limitation is the "teacher dependency," where the student network's quality is capped by the initial RF's performance. Future research may explore extending this approach to other non-differentiable ensembles or using it for extreme model compression in mobile applications.
Summary updated