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

Metadata-based Multi-Task Bandits with Bayesian Hierarchical Models

Runzhe Wan, Lin Ge, Rui Song

Overview

In the world of Multi-Armed Bandits (MAB), an agent learns to pick the best "arm" (action) by balancing exploration and exploitation. Standard MABs start with zero knowledge, which is highly inefficient when dealing with thousands of similar tasks—such as finding the right ad for millions of different users.

This paper introduces Multi-Task Thompson Sampling (MTTS), a framework that uses task-specific "metadata" (like user demographics or product categories) to share knowledge across thousands of related bandit tasks. By leveraging Bayesian Hierarchical Models, the algorithm provides a "warm start" for new tasks while remaining robust to individual differences that metadata alone cannot predict. This approach significantly reduces cumulative regret compared to learning each task from scratch.

The Problem: Blind Spots in Existing Bandit Models

While "Multi-Task" and "Contextual" bandits exist, they have significant limitations when applied to large-scale, related tasks:

  1. Multi-Task Bandits often ignore "metadata"—static features about the task itself, such as a user's age or a product's brand.
  2. Contextual Bandits typically assume a perfect, deterministic relationship between features and rewards. If that relationship is even slightly "noisy" or non-linear (a problem known as realizability), these models can fail spectacularly, leading to linear regret (errors that grow indefinitely).

The core question the authors address is: How can we use metadata to share information across tasks without being crippled by the unique quirks of individual tasks?

The MTTS Framework

The authors propose MTTS, built on a three-layer Bayesian Hierarchical Model to capture task relations:

  • Layer 1 (Global Prior): Learns the general relationship between metadata and rewards across all tasks.
  • Layer 2 (Inter-task): Uses the metadata and the global parameters to create a task-specific prior. Crucially, it treats the task's mean reward as a random variable. This allows for "inter-task heterogeneity"—meaning two users with identical demographics can still have different preferences.
  • Layer 3 (Intra-task): Handles the actual reward observations for a specific task.
Tasks clustered by metadata showing inter-task variance

The algorithm continuously aggregates data from all tasks to refine the global model, which in turn provides better "starting guesses" for new tasks. To maintain practicality at scale, the authors also introduce MTTS-approx, a computationally efficient version that updates the global model in batches rather than after every single interaction.

Key Insights

  • The "Rough First Impression" Analogy: MTTS mimics human learning. We use features (metadata) to form a "first impression" of a situation, but remain flexible enough to adjust that impression as we gain direct experience.
  • Robustness to Model Mismatch: Unlike standard contextual bandits that might force a user to fit a rigid linear trend, the hierarchical model acknowledges that metadata is informative but not definitive, preventing the "linear regret" trap.
  • Information Pooling: Even if the agent only interacts with a specific user a few times, it can make highly informed decisions by "borrowing" strength from thousands of other users with similar metadata.

Key Results

The researchers evaluated MTTS using both synthetic simulations (Gaussian & Bernoulli Bandits) and real-world data (MovieLens 1M, treating users as tasks and movie genres as arms).

  • Theoretical Guarantee: The paper provides mathematical proof that MTTS achieves sublinear multi-task regret. This confirms that the "price of not knowing the prior" vanishes as the number of tasks increases.
Comparison of MTTS and baselines showing theoretical regret bounds
  • Superior Performance: In Gaussian simulations, MTTS achieved only 53.3% to 68.2% of the regret seen by "Individual-TS" (which learns each task in isolation).
  • Real-World Success: On the MovieLens dataset, MTTS significantly outperformed baselines like "One-Size-Fits-All" (which ignores individual differences) and "Linear-TS" (which is too rigid). It successfully used demographic data to jump-start movie recommendations for new users.

Limitations and Future Work

While powerful, the current MTTS framework has a few limitations. The theoretical analysis assumes that certain variance components (how much tasks differ from the mean) are known upfront; in practice, these must be estimated (e.g., using Empirical Bayes). Additionally, the model currently focuses on static task features. Future work could extend this to "Dynamic Contextual Multi-Task Bandits," where situational context changes over time, or integrate deep learning architectures to handle very high-dimensional metadata like raw images or text.

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