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

No Regrets for Learning the Prior in Bandits

Soumya Basu, Branislav Kveton, Manzil Zaheer, Csaba Szepesvari

Introduction

In many real-world machine learning applications, agents do not merely solve a single, isolated bandit problem; they face a sequence of related tasks. Consider a recommender system: every new user represents a distinct "task," and every interaction is a "round." While every user is unique, they often share underlying preferences.

Standard bandit algorithms, such as Thompson Sampling, typically treat every new task as a blank slate, ignoring any shared structure. Conversely, "meta-learning" approaches attempt to learn the distribution—the prior—from which these tasks are drawn. If an agent knows the prior, it can identify the optimal "arm" much faster.

The core challenge is that this prior is initially unknown. The agent must learn the meta-parameters (the parameters defining the prior) while simultaneously attempting to maximize rewards in the current task. Previous attempts at this meta-learning problem often suffered from high "regret"—the mathematical measure of lost opportunity—because they were either too aggressive or too conservative in handling uncertainty about the prior.

To address this, researchers have proposed AdaTS (Adaptive Thompson Sampling), a new meta-learning algorithm for multi-armed bandits that learns the underlying task prior across a sequence of related problems. By marginalizing out uncertainty in the prior's parameters rather than just sampling them, AdaTS achieves a significantly lower "price of learning," making it a truly "no-regret" approach for learning to learn.

Methods: The AdaTS Algorithm

AdaTS operates on a hierarchical Bayesian model to capture the shared structure across tasks:

  1. Meta-Prior ($Q$): The initial belief about the meta-parameters.
  2. Meta-Parameter ($\mu_*$): The "true" but unknown parameter that defines the task distribution.
  3. Task Prior ($P$): The distribution of task-specific parameters $\theta$, governed by $\mu_*$.
  4. Task Parameter ($\theta_{s,*}$): The specific mean rewards for the current task $s$.
Hierarchical Bayesian model of AdaTS

The Key Innovation: Marginalization over Sampling Standard Thompson Sampling (TS) samples a parameter from a posterior and acts optimally according to that sample. A previous meta-learning variant, MetaTS, sampled a version of the meta-parameter $\mu$ at the start of each task.

AdaTS takes a more "fully Bayesian" approach. Instead of sampling the meta-parameter, it marginalizes it out. It maintains a distribution over the meta-parameter (the meta-posterior) and uses it to compute an "uncertainty-adjusted task prior." By integrating over the uncertainty, AdaTS accounts for the fact that it doesn't know the prior perfectly, leading to more principled and efficient exploration.

Algorithm 1: AdaTS

The paper provides computationally efficient implementations of this algorithm for several settings, including Gaussian Bandits (using conjugate priors for closed-form updates), Linear Bandits (extending the logic to d-dimensional feature spaces), and Combinatorial Semi-Bandits (where multiple arms are pulled simultaneously).

Key Insights and Theoretical Results

  • The Power of Marginalization: The critical insight of AdaTS is that sampling the meta-parameter induces high variance and conservative behavior. By marginalizing over this uncertainty, AdaTS achieves much tighter regret bounds.
  • Minimal "Price of Learning": The authors prove that the extra regret incurred by not knowing the prior is only $O(\sqrt{mn})$. In the bandit setting, where the total regret is dominated by $O(m\sqrt{n})$, this means the cost of learning the prior becomes negligible as the agent faces more tasks.
  • Theoretical Superiority: AdaTS improves the "meta-learning" regret term from $O(\sqrt{mn^2})$ seen in prior work down to $O(\sqrt{mn})$. This represents a massive improvement as the number of rounds ($n$) per task grows.
  • Information-Theoretic Analysis: The theoretical proofs utilize mutual information to decouple the regret into two distinct parts: the cost of learning the meta-parameter and the cost of solving individual tasks. This framework is significantly more general than previous task-specific proof techniques.

Empirical Performance

The theoretical claims are supported by robust empirical evaluations:

  • Synthetic Simulations: In Gaussian and Linear bandit environments designed to test learning speed under different noise levels, AdaTS consistently outperformed standard Thompson Sampling (which ignores the hierarchy) and MetaTS.
  • MNIST Bandit Classification: The authors tested AdaTS on a real-world inspired task where the agent must learn to identify a specific digit (e.g., "1") across different tasks involving subsets of MNIST images. AdaTS learned the "meta-parameter" (the average look of a "1") almost instantly. By the second task, it was already performing near-optimally, whereas standard TS had to start from scratch every time.
  • Robustness: AdaTS demonstrated strong performance even when the "meta-prior" was misspecified, showing resilience when the agent's initial guesses about the environment were incorrect.

Limitations and Future Work

While AdaTS represents a significant step forward, it has a few limitations:

  • Gaussian Assumption: Most of the theoretical heavy lifting and efficient implementations rely on Gaussian distributions and conjugate priors. While the authors suggest a discretization method for Exponential Family distributions, it is less computationally elegant.
  • Known Covariance: The model assumes the agent knows the covariance ($\Sigma_0$) of the task parameters, even if it doesn't know the mean ($\mu_*$). Learning the covariance structure across tasks remains an open and more difficult problem.
  • Forced Exploration: The theoretical bounds for linear bandits require a small amount of "forced exploration" at the start of each task to ensure the agent learns about all dimensions of the meta-parameter. Finding ways to eliminate this requirement in practice is an area for future research.

Summary updated

BibTeX
@inproceedings{basu2021no,
  author = {Soumya Basu and Branislav Kveton and Manzil Zaheer and Csaba Szepesvari},
  title = {{No Regrets for Learning the Prior in Bandits}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=Mj6MVmGyMDb},
}
Figure