Random Forest for the Contextual Bandit Problem

Raphaël Féraud, Robin Allesiardo, Tanguy Urvoy, Fabrice ClérotAISTATS 2016

Authors: Tanguy Urvoy, Fabrice Clérot (Orange Labs)

Introduction

The contextual bandit problem is a fundamental challenge in online learning where an agent must select actions based on contextual information to maximize cumulative rewards. Unlike standard supervised learning, the agent only receives feedback for the chosen action, creating a classic exploration-exploitation trade-off. While linear models like LinUCB are computationally efficient, they often fail to capture complex, non-linear relationships between context and reward. Conversely, neural network-based approaches, while expressive, often lack theoretical guarantees and can be unstable in online settings.

This paper introduces BANDIT FOREST, a novel online random forest algorithm that bridges this gap. It provides a scalable, non-linear framework with strong theoretical foundations grounded in Probably Approximately Correct (PAC) theory.

The BANDIT FOREST Algorithm

BANDIT FOREST constructs an ensemble of $L$ online decision trees. The algorithm's strength lies in its structured approach to tree growth and action selection:

  1. Online Tree Construction: The algorithm builds trees of depth $D$ on-the-fly. Each node in the tree acts as a "decision stump" that evaluates contextual variables.
  2. Statistical Variable Selection: Instead of using standard heuristics (like Gini impurity), BANDIT FOREST employs a statistical stopping criterion. A variable is selected for a split only when the algorithm is mathematically confident (within a probability $\delta$) that it is the optimal choice. This leads to a sample complexity that scales logarithmically with the number of features ($O(\log M)$), making it highly effective for high-dimensional data.
  3. Action Pruning: Within each node or leaf, a "Successive Elimination" strategy is used to discard sub-optimal actions based on observed rewards.
  4. Ensemble Voting: The final action is determined by a vote among all trees in the forest that have completed their learning phase for the current context path.
Regret reduction as a function of the number of trees (L) in the forest, illustrating the performance gains of the ensemble approach.

Experimental Evaluation

The authors evaluated BANDIT FOREST on three large-scale datasets from the UCI repository: Forest Cover Type, Adult, and Census1990. These datasets were converted into bandit problems with up to 2.45 million instances and hundreds of binary features.

Key Results

  • Superiority over Linear Models: BANDIT FOREST consistently outperformed linear baselines such as LinUCB and Banditron. This confirms that the hierarchical, non-linear structure of decision trees captures reward patterns that linear models miss.
  • Competitive Performance: The algorithm proved competitive with NEURAL BANDIT (a committee of multi-layer perceptrons). While NeuralBandit performed slightly better on the Forest Cover Type dataset, BANDIT FOREST was superior on the Adult and Census1990 datasets.
  • Scalability: The logarithmic scaling with respect to the number of features was empirically validated, demonstrating the algorithm's suitability for "wide" datasets.
Comparative performance of BANDIT FOREST against linear and neural baselines on a large-scale dataset.

Discussion and Limitations

A key insight from the study is the trade-off between tree depth and sample complexity. While deeper trees can capture more complex interactions, the sample complexity grows exponentially with depth ($2^D$). Thus, BANDIT FOREST is most effective when a relatively shallow tree can capture the primary interactions among a large set of variables.

Currently, the algorithm assumes binary contextual variables and a stationary environment. Future work may involve extending the framework to handle continuous variables natively and adapting to non-stationary environments where reward distributions shift over time.

Conclusion

BANDIT FOREST offers a robust, theoretically-grounded alternative for contextual bandit problems. By combining the non-linear modeling power of random forests with PAC-style sample complexity guarantees, it provides a practical solution for high-dimensional, real-time decision-making tasks.

Summary updated

BibTeX
@inproceedings{feraud2016random,
  author = {Raphaël Féraud and Robin Allesiardo and Tanguy Urvoy and Fabrice Clérot},
  title = {{Random Forest for the Contextual Bandit Problem}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2016},
}
Figure