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

Meta-Thompson Sampling

Branislav Kveton, Mikhail Konobeev, Manzil Zaheer, Chih-Wei Hsu, Martin Mladenov, Craig Boutilier, Csaba Szepesvári

Introduction

Thompson Sampling (TS) is a highly popular and effective algorithm for balancing exploration and exploitation in multi-armed bandits. However, its success relies heavily on the algorithm designer specifying a good prior distribution over the arms' mean rewards. This paper introduces Meta-Thompson Sampling (MetaTS), an algorithm that learns the prior distribution of rewards across multiple bandit tasks. By maintaining a "meta-posterior" over possible priors, MetaTS quickly adapts to the true environment, achieving near-optimal regret comparable to an oracle that knows the true prior.

The Problem: Unknown Priors in Thompson Sampling

In practice, the exact prior is often unknown. Instead, a designer might only know that the true prior belongs to a broader family of distributions (a "meta-prior"). For example, in a recommender system, a new user's preferences might strongly favor one of several specific genres, but the system doesn't know which genre a priori. Standard TS cannot adapt its prior across multiple users (tasks).

Graphical model of the meta-learning problem.

This paper formalizes the problem of meta-learning this unknown prior through sequential interactions across $m$ tasks to minimize the overall Bayes regret.

Meta-Thompson Sampling (MetaTS)

Instead of using a fixed, broad prior, MetaTS dynamically learns the prior by maintaining a distribution over possible priors, called the meta-posterior.

The algorithm operates in a simple loop:

  1. At the start of each new task (e.g., a new user), MetaTS samples an instance prior from its current meta-posterior.
  2. It then runs standard Thompson Sampling using this sampled prior for the duration of the task ($n$ rounds).
  3. After the task concludes, it updates the meta-posterior using the observed rewards in a standard Bayesian fashion.

To make this practical, the authors derive computationally efficient, closed-form updates for two specific settings: Bernoulli bandits using a categorical meta-prior, and Gaussian bandits using a Gaussian meta-prior. They also provide a general measure-theoretic formulation to show how the framework can be extended to other distributions.

Key Insights

  • Prior-Dependent Regret Bound: To analyze MetaTS, the authors derived a novel Bayes regret bound for standard TS that explicitly depends on the prior's variance. This mathematically proves the intuition that a more concentrated (certain) prior reduces the need for exploration and lowers regret.
  • Sublinear Cost of Meta-Learning: The regret of MetaTS over $m$ tasks decomposes into two parts: the regret of an "oracle" TS (which perfectly knows the true prior) that grows linearly with $m$, and the cost of learning the prior, which grows sublinearly ($\sqrt{m}$). Because the learning cost is sublinear, MetaTS becomes near-optimal as the number of tasks increases.
  • Smoothness of Thompson Sampling: The authors prove that the difference in expected rewards between running TS with two different priors is bounded linearly by the difference in their prior means. This smoothness is crucial for proving that learning a progressively better approximation of the prior is sufficient for good performance.

Key Results

Theoretical Guarantees: The Bayes regret bound for MetaTS over $m$ tasks of $n$ rounds is bounded by $\tilde{O}(m \sqrt{n} + n^2 \sqrt{m})$. In the "large $m$" regime (many tasks), the per-task regret approaches that of an oracle with perfect knowledge of the prior.

Empirical Performance: The paper evaluates the algorithms on synthetic datasets simulating Bernoulli, Gaussian, and Linear bandits.

Cumulative regret across tasks for Bernoulli, Gaussian, and Linear bandits.

In these experiments (20 tasks, 200 rounds each), MetaTS significantly outperforms an agnostic TS baseline (which just uses the broad, uninformative meta-prior). After just a few tasks, the regret accumulation rate (the slope of the regret curve) of MetaTS flattens out to match OracleTS.

Limitations and Future Work

The theoretical analysis is somewhat conservative, assuming that every arm is pulled at least once per task (e.g., forced pulls in the last $K$ rounds). This guarantees that the meta-posterior concentrates, allowing the authors to bypass the highly complex task of bounding exactly how a misspecified TS explores. Furthermore, the rigorous regret bounds are currently restricted to Gaussian bandits, though the algorithm itself is more general.

Future work includes extending the theoretical analysis beyond Gaussian bandits without requiring forced pulls, and analyzing this meta-learning approach in contextual bandits (like linear bandits), which are heavily used in real-world personalization systems.

Summary updated

BibTeX
@inproceedings{kveton2021meta,
  author = {Branislav Kveton and Mikhail Konobeev and Manzil Zaheer and Chih-Wei Hsu and Martin Mladenov and Craig Boutilier and Csaba Szepesvári},
  title = {{Meta-Thompson Sampling}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=hK0BV4OA97A},
}
Figure