TL;DR
This paper introduces Langevin Monte Carlo Thompson Sampling (LMC-TS), a novel algorithm for contextual bandits that directly samples from the posterior distribution using MCMC methods. This approach avoids the computationally expensive Laplace approximation used in traditional Thompson sampling, leading to greater efficiency, especially in high-dimensional settings, while achieving competitive performance and theoretical regret bounds.
What Problem Does This Paper Address?
Contextual bandit problems involve an agent learning to make sequential decisions by observing context and receiving rewards. A key challenge is balancing exploration (trying new actions to learn more) and exploitation (choosing the action believed to be best). Thompson Sampling is a popular strategy for this, but existing methods rely on approximating the posterior distribution of model parameters with a Gaussian distribution (Laplace approximation). This approximation becomes computationally prohibitive and potentially inaccurate in high-dimensional scenarios or when reward functions are complex (e.g., non-linear). The paper addresses this by proposing a method that bypasses this costly and potentially inaccurate approximation.
Methods
The core innovation is the use of Langevin Monte Carlo (LMC) to directly sample from the posterior distribution of the model parameters. Instead of computing a Laplace approximation and then sampling from a Gaussian, LMC-TS uses noisy gradient descent updates. This process, inspired by Langevin dynamics in physics, allows for sampling from complex distributions with arbitrary accuracy by running the LMC steps for a sufficient number of iterations (an "epoch"). The algorithm is designed to be flexible, accommodating various reward models (linear, generalized linear, and neural networks) by simply defining an appropriate loss function for the LMC sampler.
Datasets
The paper evaluates LMC-TS on:
- Synthetic datasets: Generated for linear, logistic, and quadratic contextual bandit problems.
- Real-world datasets:
- UCI machine learning datasets: Shuttle, MagicTelescope, Mushroom, and Covertype.
- CIFAR10 image dataset.
These datasets are used to construct contextual bandit problems by transforming N-class classification tasks into scenarios where an arm's reward is 1 if it matches the correct class and 0 otherwise.
Key Insights and Ideas
- LMC as a superior posterior sampler: The paper demonstrates that LMC can effectively sample from complex posterior distributions without relying on potentially inaccurate Gaussian approximations, especially in high-dimensional settings.
- Computational efficiency gains: By avoiding the Cholesky decomposition required for sampling from high-dimensional Gaussians, LMC-TS offers significant computational advantages.
- Generality and flexibility: The LMC-TS framework is adaptable to a wide range of contextual bandit models (linear, GLM, neural) by simply changing the loss function, making it a versatile tool.
- Theoretical guarantees match the state-of-the-art: For linear contextual bandits, LMC-TS achieves the same optimal sublinear regret bound as existing Thompson sampling algorithms, validating its theoretical soundness.
Key Results
- Theoretical Regret Bound: For linear contextual bandits, LMC-TS achieves an $\tilde{O}(d\sqrt{dT})$ regret bound, matching the best known bounds for Thompson sampling algorithms.
- Empirical Performance: LMC-TS consistently outperforms baseline algorithms across various simulated and real-world datasets, including linear, logistic, quadratic, and neural contextual bandits. It shows particular strength in high-dimensional neural bandit problems.
- Computational Efficiency: Experiments on the CIFAR10 dataset show LMC-TS is significantly faster than NeuralTS (a Laplace approximation-based method), especially in the arm selection phase, due to avoiding matrix inversions and sampling from high-dimensional Gaussians. For 1000 rounds on CIFAR10, LMC-TS took 662.7 seconds compared to NeuralTS's 776.0 seconds.
Limitations and Future Work
- Epoch Length Dependency: The theoretical analysis shows that the epoch length (number of LMC steps per round) can depend on the condition number of the covariance matrix, which can be large. While empirical results suggest a small number of iterations is often sufficient, this is a theoretical consideration. The authors mention that using Newton's method could potentially remove this dependency.
- Future Directions: The authors suggest exploring the theoretical performance of LMC-TS in more general contextual bandit settings beyond linear bandits, given its efficiency and flexibility. They also highlight that the algorithm's ability to handle non-conjugate posteriors and general reward models makes it promising for future research.
Summary updated