Bayesian Nonparametric Thompson Sampling for Multi-Armed Bandits
Organizations: Department of Applied Physics and Applied Mathematics Data Science Institute Columbia University New York City, NY 10027
Abstract
In stochastic multi-armed bandits, rewards are generated by an unknown distribution; the world's reward uncertainty induces the exploration-exploitation trade-off. Thompson sampling (TS) addresses this trade-off elegantly, but requires knowing the reward model's parametric form to sample from its posterior and compute per-arm expected rewards ---which limits its applicability as it demands per-scenario model specification and hyperparameter tuning. We here adopt Bayesian nonparametric (BNP) mixture models to remove this requirement, extending TS to arbitrary reward distributions. We model each arm's unknown reward distribution with an independent BNP Gaussian mixture, which can approximate any continuous reward density, and adapts its complexity to sequentially observed data. Embedding the BNP mixture model into TS yields Nonparametric TS, an algorithm that sequentially learns the reward model that best approximates the true, yet unknown, per-arm reward distribution, avoiding case-by-case model specification and hyperparameter tuning. We empirically demonstrate that () Nonparametric TS matches the regret performance of Oracle TS policies that know the true reward model; () it favorably compares (in cumulative regret and volatility) to a suite of state-of-the-art alternatives across multimodal, outlier-contaminated, and non-exponential-family reward distributions; and () its Bayesian nonparametric inference remains computationally practical and accurate for regret minimization.
Figures & tables
| Scenario | Reward model | Oracle TS |
|---|---|---|
| Contextual linear Gaussian | Eq. ( 4 ) | Agrawal and Goyal, 2013b () |
| Gaussian mixture ( A , B ) | Eq. ( 8 )–( 9 ) | Urteaga and Wiggins, (2018) † |
| Outlier-contaminated | Eq. ( 10 ) | Urteaga and Wiggins, (2018) † |
| Exponentially distributed | Eq. ( 11 ) | N/A |
| Algorithm | Cumulative regret (rel.) |
|---|---|
| Nonparametric TS | 189.9 13.0 (0%) |
| NeuralBootstrapped | 210.9 47.4 (11%) |
| MultitaskGP | 213.6 22.0 (13%) |
| NeuralLinear | 398.5 18.2 (110%) |
| BNNVariationalGaussian | 827.4 193.1 (336%) |
| Algorithm | Scenario A | Scenario B |
|---|---|---|
| Nonparametric TS | 27.5 70.7 (0%) | 44.1 70.4 (0%) |
| LinearGaussian TS | 51.2 (87%) | 65.4 (48%) |
| NeuralLinear | 57.0 (108%) | 78.1 (77%) |
| BNNAlphaDiv | 197.4 (619%) | 325.7 (638%) |
| Algorithm | Cumulative regret (rel.) |
|---|---|
| Nonparametric TS | 100.0 188.9 (0%) |
| NeuralParamNoise | 130.7 (31%) |
| LinearGaussian TS | 142.1 (42%) |
| MultitaskGP | 532.7 (433%) |
| BNNAlphaDiv | 611.6 (512%) |
| Algorithm | Cumulative regret (rel.) |
|---|---|
| Nonparametric TS | 67.9 119.4 (0%) |
| NeuralLinear | 94.2 (39%) |
| LinearGaussian TS | 116.4 (71%) |
| BNNAlphaDiv | 153.5 (126%) |
| MultitaskGP | 197.2 (191%) |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Value |
|---|---|
| training freq | 1 |
| training epochs | 50 |
| activation | tf.nn.relu |
| layer size | 50 |
| batch size | 512 |
| init scale | 0.3 |
| Algorithm | Details |
|---|---|
| NeuralLinear | Network and last-layer posterior updated every iteration; prior . |
| NeuralRMS | RMS optimizer, default parameters. |
| NeuralBootstrapped | networks/datasets, . |
| NeuralParamNoise | Noise ; -greedy, 300 samples. |
| NeuralDropoutRMS | Dropout probability (keep probability ), RMS optimizer. |
| BNNVariationalGaussian | Independent Gaussian weight noise, ; 100 initial training steps. |
| Hyperparameter | Value |
|---|---|
| training freq | 1 |
| training epochs | 50 |
| learn embeddings | True |
| task latent dim | 5 |
| max num points | 1000 |
| batch size | 512 |
| Algorithm | Linear Gaussian | Sparse Linear Gaussian |
|---|---|---|
| Nonparametric TS | 189.9 13.0 (0%) | 157.4 12.4 (0%) |
| NeuralLinear | 398.5 18.2 (109.9%) | 334.6 16.4 (112.6%) |
| NeuralBootstrapped | 210.9 47.4 (11.1%) | 176.1 46.6 (11.9%) |
| NeuralRMS | 256.9 69.2 (35.3%) | 208.7 65.0 (32.6%) |
| NeuralDropoutRMS | 382.9 87.1 (101.6%) | 334.9 92.3 (112.7%) |
| NeuralParamNoise | 241.0 59.3 (26.9%) | 199.1 62.1 (26.5%) |
| Algorithm | Scenario A | Scenario B |
|---|---|---|
| Nonparametric TS | 27.5 70.7 (0%) | 44.1 70.4 (0%) |
| LinearGaussian TS | 51.2 99.3 (86.5%) | 65.4 89.9 (48.3%) |
| NeuralLinear | 57.0 91.6 (107.6%) | 78.1 95.0 (77.0%) |
| NeuralBootstrapped | 137.9 220.2 (402.0%) | 166.9 267.8 (278.4%) |
| NeuralRMS | 147.0 227.5 (435.2%) | 183.3 282.4 (315.5%) |
| NeuralDropoutRMS | 143.3 224.6 (421.7%) | 182.6 282.1 (313.8%) |
| Algorithm | Cumulative regret |
|---|---|
| Nonparametric TS | 100.0 188.9 (0%) |
| LinearGaussian TS | 142.1 200.9 (42.1%) |
| NeuralLinear | 196.8 273.6 (96.9%) |
| NeuralBootstrapped | 214.4 546.0 (114.5%) |
| NeuralRMS | 218.2 556.3 (118.3%) |
| NeuralDropoutRMS | 196.5 510.8 (96.5%) |
| Algorithm | Cumulative regret |
|---|---|
| Nonparametric TS | 67.9 119.4 (0%) |
| LinearGaussian TS | 116.4 129.2 (71.5%) |
| NeuralLinear | 94.2 125.7 (38.8%) |
| NeuralBootstrapped | 138.6 179.9 (104.2%) |
| NeuralRMS | 143.7 173.7 (111.8%) |
| NeuralDropoutRMS | 110.7 174.0 (63.1%) |
| Algorithm | Cumulative regret |
|---|---|
| Nonparametric TS | 1392.8 66.0 (0%) |
| LinearGaussian TS | 1358.6 66.2 ( 2.5%) |
| NeuralLinear | 1392.5 68.1 (0.0%) |
| NeuralBootstrapped | 1352.0 139.2 ( 2.9%) |
| NeuralRMS | 1400.8 170.8 (0.6%) |
| NeuralDropoutRMS | 1400.1 167.6 (0.5%) |