The Challenge of Reward Modeling in Contextual Bandits
In contextual bandits, algorithms must balance exploring new actions and exploiting known rewards based on a user's current context (e.g., personalizing interventions in a mobile health app). The success of these algorithms hinges entirely on the quality of their reward models.
Currently, practitioners face a frustrating trade-off:
- Linear Models: Simple and interpretable, but unable to capture the complex, nonlinear interactions inherent in human behavior.
- Neural/Kernel Methods: Highly expressive but notoriously "brittle." They are difficult to tune in online settings where standard cross-validation isn't possible.
- Tree Ensembles (Random Forests/XGBoost): The gold standard for tabular data, but lacking a native Bayesian structure. Thompson Sampling requires sampling from a posterior distribution to balance exploration and exploitation. Existing tree-based bandits rely on heuristics that break theoretical guarantees and yield poor uncertainty estimates.
To bridge this gap, researchers introduce Bayesian Forest Thompson Sampling (BFTS), a method that leverages Bayesian Additive Regression Trees (BART) to provide a robust, out-of-the-box solution for contextual bandits.
The BFTS Methodology
Instead of standard decision trees, BFTS employs BART, a "sum-of-trees" ensemble where each tree acts as a weak learner contributing a small amount to the final prediction.
- Arm-wise Modeling: BFTS fits an independent BART ensemble for every possible action (arm).
- Principled Exploration: Because BART is a fully probabilistic model, it yields a well-defined posterior distribution. BFTS uses Markov Chain Monte Carlo (MCMC) to draw samples from this posterior, enabling true Thompson Sampling.
- Computational Efficiency: Running MCMC at every step is computationally prohibitive. BFTS mitigates this using a batched refresh schedule (updating on a logarithmic scale) and "cold-start" MCMC to prevent chains from getting stuck in local modes.
- Theoretical Guarantees: The authors derive an information-theoretic Bayesian regret bound of $\widetilde{\mathcal{O}}(K\sqrt{T})$ for ideal posterior sampling under a correctly specified Bayesian design, proving the algorithm is mathematically sound.
Experimental Evaluation
The researchers evaluated BFTS across three distinct environments:
- Synthetic Benchmarks: Environments with linear rewards, nonlinear "Friedman" functions (designed to test tree models), and a "SynBART" scenario perfectly matching the model's assumptions.
- OpenML Benchmarks: Nine diverse real-world classification datasets (e.g., Adult, Mushroom, MNIST) converted into contextual bandit problems.
- Drink Less Case Study: A real-world micro-randomized trial simulation for a behavior-change app aimed at reducing hazardous drinking.
Key Insights and Results
BFTS demonstrates that BART is an ideal middle ground for contextual bandits, excelling at messy, tabular data (handling sparsity and varying scales) while providing the principled uncertainty needed for Thompson Sampling.
- Superior Performance: BFTS achieved the best average rank (1.63) across eight synthetic scenarios, significantly outperforming Neural Thompson Sampling (3.00) and tree-based heuristics. It also showed substantial regret reductions on tabular OpenML datasets like MagicTelescope and Shuttle.
- Real-World Impact: In the Drink Less mHealth trial, BFTS improved estimated user engagement by 38.2% over the original random policy, outperforming the best-tuned linear, neural, and tree-ensemble baselines.
- Uncertainty Calibration: A major advantage of BFTS is its uncertainty diagnostics. While heuristic tree models (like XGBoostTS) often "under-cover" (producing overly narrow confidence intervals that miss the truth), BFTS maintains near-nominal 95% coverage, leading to highly efficient exploration.
- Hyperparameter Robustness: Unlike neural approaches that require meticulous tuning of learning rates and architectures, BFTS performs exceptionally well using standard default settings—a crucial feature for real-world online deployment.
- Interpretability: As a tree-based model, BFTS allows practitioners to track variable importance. In the Drink Less study, it correctly identified "days since download" and "age" as primary drivers of user engagement.
Limitations and Future Directions
While powerful, BFTS has a few limitations:
- Scaling with Actions ($K$): Because it models each arm independently, computational cost and regret bounds grow linearly with the number of actions. It struggles on tasks with many arms (e.g., MNIST with $K=10$) compared to joint models.
- MCMC Mixing: The BART posterior is complex and multimodal. Although decisions remain stable, MCMC chains do not always mix perfectly in the parameter space.
- Extrapolation: Like most tree models, BART can be overconfident when encountering data far outside its training distribution. Future work may explore "grafting" Gaussian Processes onto the leaves to address this.
- Stationarity Assumption: The current iteration assumes rewards remain static over time, though the Bayesian framework naturally extends to drifting, non-stationary environments.
Summary updated