Contextual Thompson Sampling via Generation of Missing Data

Kelly W. Zhang, Tiffany Tianhui Cai, Hongseok Namkoong, Daniel Russo
2/10/2025
cs.LGcs.AIstat.ML

No official code found. Best implementation: namkoong-lab/ts-gen (1 star, last commit 2025-10-24).

Abstract

We introduce a framework for Thompson sampling (TS) contextual bandit algorithms, in which the algorithm's ability to quantify uncertainty and make decisions depends on the quality of a generative model that is learned offline. Instead of viewing uncertainty in the environment as arising from unobservable latent parameters, our algorithm treats uncertainty as stemming from missing, but potentially observable outcomes (including both future and counterfactual outcomes). If these outcomes were all observed, one could simply make decisions using an "oracle" policy fit on the complete dataset. Inspired by this conceptualization, at each decision-time, our algorithm uses a generative model to probabilistically impute missing outcomes, fits a policy using the imputed complete dataset, and uses that policy to select the next action. We formally show that this algorithm is a generative formulation of TS and establish a state-of-the-art regret bound. Notably, our regret bound depends on the generative model only through the quality of its offline prediction loss, and applies to any method of fitting the "oracle" policy.

View on arXivView PDF

Code Implementations(1)

Code for Contextual Thompson Sampling via Generation of Missing Data

10Shell, PythonOct 24, 202512 months ago

Similar Papers

Cite this paper

@article{zhang2025contextual,
  title  = {Contextual Thompson Sampling via Generation of Missing Data},
  author = {Kelly W. Zhang and Tiffany Tianhui Cai and Hongseok Namkoong and Daniel Russo},
  year   = {2025},
  eprint = {2502.07064},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.07064v2}
}

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/2502.07064.svg)](https://codeofpaper.com/paper/2502.07064)

Discussion