Learning Representations for Axis-Aligned Decision Forests through Input Perturbation

Sebastian Bruch, Jan Pfeifer, Mathieu Guillame-Bert

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)$.

A standard decision forest (a) and its corresponding piecewise constant output function (b).

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.

The effect of input perturbation on the decision forest output. As the noise level $\sigma$ increases, the sharp boundaries of the original function (a) become increasingly smooth (b-d), enabling gradient-based learning.

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

Abstract

Axis-aligned decision forests have long been the leading class of machine learning algorithms for modeling tabular data. In many applications of machine learning such as learning-to-rank, decision forests deliver remarkable performance. They also possess other coveted characteristics such as interpretability. Despite their widespread use and rich history, decision forests to date fail to consume raw structured data such as text, or learn effective representations for them, a factor behind the success of deep neural networks in recent years. While there exist methods that construct smoothed decision forests to achieve representation learning, the resulting models are decision forests in name only: They are no longer axis-aligned, use stochastic decisions, or are not interpretable. Furthermore, none of the existing methods are appropriate for problems that require a Transfer Learning treatment. In this work, we present a novel but intuitive proposal to achieve representation learning for decision forests without imposing new restrictions or necessitating structural changes. Our model is simply a decision forest, possibly trained using any forest learning algorithm, atop a deep neural network. By approximating the gradients of the decision forest through input perturbation, a purely analytical procedure, the decision forest directs the neural network to learn or fine-tune representations. Our framework has the advantage that it is applicable to any arbitrary decision forest and that it allows the use of arbitrary deep neural networks for representation learning. We demonstrate the feasibility and effectiveness of our proposal through experiments on synthetic and benchmark classification datasets.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
YelpInput-perturbation fine-tuning with Random Forest and Universal Sentence EncoderAccuracy0.9530+0.08 vs baselinesplit: test · fine-tuned · embedding=Universal Sentence Encoder · classifier=Random Forest
Source quote
L256: Yelp │ 0.8717 │ 0.9530 │ +9.3%
GLUE · QQPInput-perturbation fine-tuning with GBDT and Universal Sentence EncoderAccuracy0.8303+0.05 vs baselinesplit: test · fine-tuned · subset=QQP · embedding=Universal Sentence Encoder · classifier=GBDT
Source quote
L260: GLUE QQP │ 0.7598 │ 0.8303 │ +9.3%
GLUE · STT2Input-perturbation fine-tuning with GBDT and Universal Sentence EncoderAccuracy0.8257+0.05 vs baselinesplit: test · fine-tuned · subset=SST-2 · embedding=Universal Sentence Encoder · classifier=GBDT
Source quote
L258: GLUE STT2 │ 0.7764 │ 0.8257 │ +6.3%
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
YelpInitial Random Forest on Universal Sentence Encoder embeddings baselineAccuracy0.8717split: test · fine-tuned · embedding=Universal Sentence Encoder · classifier=Random Forest
Source quote
L256: Yelp │ 0.8717 │ 0.9530 │ +9.3%
GLUE · QQPInitial GBDT on Universal Sentence Encoder embeddings baselineAccuracy0.7598split: test · fine-tuned · subset=QQP · embedding=Universal Sentence Encoder · classifier=GBDT
Source quote
L260: GLUE QQP │ 0.7598 │ 0.8303 │ +9.3%
GLUE · STT2Initial GBDT on Universal Sentence Encoder embeddings baselineAccuracy0.7764split: test · fine-tuned · subset=SST-2 · embedding=Universal Sentence Encoder · classifier=GBDT
Source quote
L258: GLUE STT2 │ 0.7764 │ 0.8257 │ +6.3%
BibTeX
@misc{bruch2020learning,
  author = {Sebastian Bruch and Jan Pfeifer and Mathieu Guillame-Bert},
  title = {{Learning Representations for Axis-Aligned Decision Forests through Input Perturbation}},
  year = {2020},
  eprint = {2007.14761},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.14761},
}
Figure