Abstract
Decision forests are highly effective for tabular data but lack differentiability, preventing their integration into end-to-end deep learning pipelines. We present a method to make standard axis-aligned decision forests differentiable by perturbing inputs with Gaussian noise. By calculating the expected output analytically, we enable gradient-based optimization of data representations (embeddings) specifically for the forest's structure. Experimental results on synthetic and real-world text datasets demonstrate significant performance gains through forest-guided fine-tuning.
Introduction
Decision forests, including Random Forests and Gradient Boosted Decision Trees (GBDTs), are dominant models for tabular data due to their speed and interpretability. However, their reliance on discrete, axis-aligned splits makes them non-differentiable. Consequently, they cannot be trained alongside neural networks using standard backpropagation, excluding them from the "representation learning" revolution seen in other domains.
Methodology
The core innovation is Input Perturbation, which allows a "hard" decision forest to be treated as a differentiable function of its input.
Architecture and Smoothing
Consider an encoder $\mathcal{E}$ that transforms raw data into an embedding $z$, which is then fed into a decision forest $\mathcal{F}$. To bridge the differentiability gap, we treat the input to the forest as a distribution $z + \epsilon$, where $\epsilon \sim \mathcal{N}(0, \sigma^2 I)$.
Instead of the discontinuous output of the forest at a single point, we compute the expected value of the output over the Gaussian distribution. Because the forest uses axis-aligned splits, this integral can be calculated analytically using the Cumulative Distribution Function (CDF). This makes the entire pipeline differentiable and computationally efficient.
Experimental Evaluation
The authors evaluated the approach on synthetic 2D classification problems and large-scale text benchmarks.
Synthetic Data
In tests with diagonal decision boundaries (e.g., $x_1 > x_2$), the neural network successfully learned to rotate and scale the data so that the fixed axis-aligned splits of the forest could achieve perfect classification.
Text Benchmarks
Using the Universal Sentence Encoder (USE) as a base, the model was fine-tuned on several tasks. Significant improvements were observed on larger datasets:
- Yelp Reviews: Accuracy increased by +9.3% (from 0.8717 to 0.9530).
- Quora Question Pairs (QQP): Accuracy increased by +9.3% (from 0.7598 to 0.8303).
- GLUE SST2: Accuracy increased by +6.3%.
- IMDB: Accuracy increased by +5.6%.
On smaller datasets like GLUE CoLA or MRPC, results were less stable, likely due to the forest's capacity to overfit the limited samples without needing refined representations.
Conclusion
By smoothing the input rather than the model, we preserve the efficiency of axis-aligned decision forests while enabling them to guide representation learning. This method allows for the end-to-end training of hybrid models that combine the strengths of deep learning and decision forests, particularly for tasks where fine-tuning embeddings is critical for performance.
Summary updated