A Tutorial on Thompson Sampling
About
Thompson sampling is an algorithm for online decision problems where actions are taken sequentially in a manner that must balance between exploiting what is known to maximize immediate performance and investing to accumulate new information that may improve future performance. The algorithm addresses a broad range of problems in a computationally efficient manner and is therefore enjoying wide use. This tutorial covers the algorithm and its application, illustrating concepts through a range of examples, including Bernoulli bandit problems, shortest path problems, product recommendation, assortment, active learning with neural networks, and reinforcement learning in Markov decision processes. Most of these problems involve complex information structures, where information revealed by taking an action informs beliefs about other actions. We will also discuss when and why Thompson sampling is or is not effective and relations to alternative algorithms.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Intent Classification | Banking77 (test) | Accuracy84.7 | 196 | |
| Online Conversion Optimization | Criteo Uplift 100K users (held-out set) | Total Conversions37 | 20 | |
| Software Sprint Management Strategy Comparison | Sprint scenario Standard | Lead time (h/sprint)26.1 | 11 | |
| Strategy optimization for manufacturing production | Manufacturing Standard Production scenario | Lead time (h/sprint)26.97 | 11 | |
| Hyperparameter Optimization | HPO-B PRS ≤ 0.10, n=32 (Low partition) | Mean Hit@1 Accuracy8.3 | 5 | |
| Hyperparameter Optimization | HPO-B PRS > 0.15, n=16 (High PRS partition) | Mean Hit@131 | 5 | |
| Ranking performance | N=75 programming decisions | Strict Hit@101.3 | 5 | |
| Bayesian Optimization | Buchwald no-transfer prior | Hit@1 Accuracy19.7 | 4 | |
| Reaction condition discovery | C-N Cross-Coupling with Isoxazoles (CNCCI) 2 (full) | L1+B111.84 | 4 | |
| Bayesian Optimization | Buchwald structured prior | Hit@1 Accuracy40.4 | 4 |