Feel-Good Thompson Sampling for Contextual Bandits: a Markov Chain Monte Carlo Showdown

Emile Anand, Sarah Liaw
7/21/2025
cs.LG

Official code: SarahLiaw/ctx-bandits-mcmc-showdown (7 stars, MIT, last commit 2025-10-24).

Abstract

Thompson Sampling (TS) is widely used to address the exploration/exploitation tradeoff in contextual bandits, yet recent theory shows that it does not explore aggressively enough in high-dimensional problems. Feel-Good Thompson Sampling (FG-TS) addresses this by adding an optimism bonus that biases toward high-reward models, and it achieves the asymptotically minimax-optimal regret in the linear setting when posteriors are exact. However, its performance with \emph{approximate} posteriors -- common in large-scale or neural problems -- has not been benchmarked. We provide the first systematic study of FG-TS and its smoothed variant (SFG-TS) across eleven real-world and synthetic benchmarks. To evaluate their robustness, we compare performance across settings with exact posteriors (linear and logistic bandits) to approximate regimes produced by fast but coarse stochastic-gradient samplers. Ablations over preconditioning, bonus scale, and prior strength reveal a trade-off: larger bonuses help when posterior samples are accurate, but hurt when sampling noise dominates. FG-TS generally outperforms vanilla TS in linear and logistic bandits, but tends to be weaker in neural bandits. Nevertheless, because FG-TS and its variants are competitive and easy-to-use, we recommend them as baselines in modern contextual-bandit benchmarks. Finally, we provide source code for all our experiments in https://github.com/SarahLiaw/ctx-bandits-mcmc-showdown.

View on arXivView PDF

Code Implementations(1)

MIT

Feel-Good Thompson Sampling for Contextual Bandits: a Markov Chain Monte Carlo Showdown

71Shell, PythonJul 18, 202512 months agoMIT

Similar Papers

Cite this paper

@article{anand2025feelgood,
  title  = {Feel-Good Thompson Sampling for Contextual Bandits: a Markov Chain Monte Carlo Showdown},
  author = {Emile Anand and Sarah Liaw},
  year   = {2025},
  eprint = {2507.15290},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.15290v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.15290.svg)](https://codeofpaper.com/paper/2507.15290)

Discussion