NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Metadata-based Multi-Task Bandits with Bayesian Hierarchical Models

Runzhe Wan, Lin Ge, Rui Song

Introduction

The Multi-Armed Bandit (MAB) problem is a fundamental framework for decision-making under uncertainty, balancing the exploration of new options with the exploitation of known high-reward arms. In modern applications like personalized medicine or e-commerce, practitioners often face thousands of related MAB tasks simultaneously. While these tasks are distinct—representing different patients or products—they frequently share underlying structures.

Traditional approaches either pool all data, ignoring task-specific nuances, or treat tasks as entirely independent, missing opportunities for knowledge transfer. This paper addresses this gap by introducing metadata-based multi-task bandits. By leveraging task-specific features (metadata) available before interaction begins, agents can "jump-start" learning for new tasks, significantly reducing cumulative regret.

The MTTS Framework

The authors propose Multi-Task Thompson Sampling (MTTS), a framework built upon a three-layer Bayesian Hierarchical Model (BHM). This structure allows the model to share information globally while maintaining task-specific flexibility:

  1. Prior Layer: A global parameter $\theta$ captures the general relationship between task metadata and rewards.
  2. Inter-task Layer: For each task $i$, expected rewards $r_i$ are sampled based on its metadata $x_i$ and the global parameter $\theta$. This layer accounts for "random effects," acknowledging that metadata may not explain all variance.
  3. Intra-task Layer: Observed rewards are generated from the task-specific reward distribution $r_i$.
The MTTS algorithm uses a hierarchical model to update global parameters and task-specific priors.

The algorithm continuously refines its estimate of $\theta$ as it interacts with various tasks. When a new task arrives, MTTS uses the current global knowledge and the task's metadata to form an informative prior, enabling efficient Thompson Sampling from the first pull.

Modeling Task Relationships with Metadata

The power of the MTTS framework lies in its ability to handle various types of metadata. The authors demonstrate how different metadata structures influence the distribution of mean rewards across tasks, allowing for flexible knowledge transfer.

Different metadata settings: (a) constant metadata (meta-MAB), (b) categorical metadata (task clusters), and (c) continuous metadata.

As shown in the figure above, metadata can range from simple constants to complex continuous variables. In the categorical case (b), tasks naturally cluster, while continuous features (c) allow for smooth transitions in reward expectations. MTTS adapts to these structures, outperforming "one-size-fits-all" (OSFA) models that ignore task differences and "Linear-TS" models that assume metadata explains everything.

Key Insights and Results

The paper validates MTTS through extensive simulations and theoretical analysis:

  • Sublinear Multi-Task Regret: The authors prove a theoretical bound of $O(\sqrt{N})$ for multi-task regret. This implies that as the number of tasks $N$ increases, the agent becomes increasingly proficient at learning the global metadata-reward relationship.
  • The Jump-Start Effect: By using metadata to inform initial priors, MTTS significantly reduces regret in the early stages of a task. In Gaussian simulations, MTTS achieved cumulative regret between 53.3% and 68.2% of that incurred by learning tasks in isolation.
  • Robustness to Bias: Unlike rigid models, the BHM's task-specific layer allows MTTS to eventually learn the unique characteristics of a task, even if the initial metadata-based prediction was inaccurate.

Conclusion and Future Work

MTTS provides a robust solution for large-scale multi-task learning where metadata is available. While the current work assumes known noise variances and static metadata, it paves the way for extensions into Contextual Multi-task Bandits, where arm features change over time. Additionally, future research into more computationally efficient "batch" updates will be crucial for scaling to millions of concurrent tasks.

Summary updated

BibTeX
@inproceedings{wan2021metadata,
  author = {Runzhe Wan and Lin Ge and Rui Song},
  title = {{Metadata-based Multi-Task Bandits with Bayesian Hierarchical Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=nW4xl2CjcVg},
}
Figure