Generalizing Hierarchical Bayesian Bandits

Imad Aouali, Branislav Kveton, Sumeet Katariya

Abstract

A contextual bandit is a popular framework for online learning to act under uncertainty. In practice, the number of actions is huge and their expected rewards are correlated. In this work, we introduce a general framework for capturing such correlations through a mixed-effect model where actions are related through multiple shared effect parameters. To explore efficiently using this structure, we propose Mixed-Effect Thompson Sampling (meTS) and bound its Bayes regret. The regret bound has two terms, one for learning the action parameters and the other for learning the shared effect parameters. The terms reflect the structure of our model and the quality of priors. Our theoretical findings are validated empirically using both synthetic and real-world problems. We also propose numerous extensions of practical interest. While they do not come with guarantees, they perform well empirically and show the generality of the proposed framework.

Introduction

Contextual bandits are a cornerstone of modern personalized systems, powering everything from digital advertising to content recommendation engines. However, these systems often face a "curse of dimensionality" when the number of possible actions is vast. Standard algorithms typically struggle in these environments because they either attempt to learn every action's parameters independently—which is statistically inefficient—or they rely on overly simplistic models that ignore the unique nuances of individual actions.

In reality, actions are rarely independent. For instance, a user's preference for one science fiction movie likely correlates with their interest in others within the same genre. This paper addresses the challenge of efficient exploration in large action spaces by modeling these correlations through a hierarchical "mixed-effect" framework.

The Mixed-Effect Framework

The core innovation is a two-level graphical model that captures how shared global traits (effects) influence individual action performance. In this model, each action $i$ is associated with a parameter $\theta_i$, which is sampled from a distribution centered around a weighted sum of shared "effect parameters" $\Psi$. Mathematically, this can be represented as $\theta_i \approx \sum (\text{weight} \times \text{effect}) + \text{noise}$.

Graphical model of the hierarchical mixed-effect bandit framework.

By leveraging this structure, the agent can "learn from neighbors." Taking a single action provides information about the shared effect parameters, which immediately updates the estimates for all other actions sharing those same effects. This interconnectedness makes exploration significantly more efficient than treating actions as isolated entities.

Mixed-Effect Thompson Sampling (meTS)

To navigate this hierarchical space, the authors propose Mixed-Effect Thompson Sampling (meTS). Unlike standard Thompson Sampling, meTS operates hierarchically in each round:

  1. Sample Shared Effects: It first samples the shared effect parameters from their joint posterior distribution.
  2. Sample Action Parameters: It then samples individual action parameters conditioned on those previously sampled shared effects.

For linear models, the authors provide closed-form posterior updates. For non-linear rewards, such as in logistic bandits, they utilize the Laplace approximation to maintain computational tractability.

One of the most significant practical advantages of meTS is its scalability. Maintaining a full joint posterior over thousands of actions is typically computationally prohibitive ($O(K^3)$). By exploiting the hierarchical structure, meTS reduces this complexity to $O(L^3 + K)$, where $L$ (the number of effects) is typically much smaller than $K$ (the number of actions).

Empirical Performance

The authors validated meTS using both synthetic environments and the MovieLens 1M dataset. In synthetic tests covering both linear and logistic reward settings, meTS consistently achieved lower cumulative regret than standard baselines like LinTS, LinUCB, and simpler hierarchical models like HierTS.

Cumulative regret for linear and logistic bandits (K=100, L=5, d=5).

On the MovieLens 1M dataset, the researchers used low-rank factorization and a Gaussian Mixture Model (GMM) to cluster movies into latent categories, treating these clusters as the shared effects. Even though the real-world data did not perfectly match the mathematical assumptions of the mixed-effect model, meTS-Lin and meTS-GLM outperformed all baselines, demonstrating the framework's robustness.

Conclusion and Future Work

The meTS framework provides a theoretically grounded and computationally efficient approach to handling large, correlated action spaces in contextual bandits. By decomposing regret into the cost of learning individual nuances versus shared global structure, the paper offers deep insights into hierarchical exploration.

Future research directions include learning the "mixing weights" (the relationships between actions and effects) online and extending the framework to deeper, multi-level hierarchies (e.g., Category $\to$ Sub-category $\to$ Item).

Summary updated

BibTeX
@inproceedings{aouali2023generalizing,
  author = {Imad Aouali and Branislav Kveton and Sumeet Katariya},
  title = {{Generalizing Hierarchical Bayesian Bandits}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
  url = {https://openreview.net/forum?id=zBvzwJ2ze0},
}
Figure