Fast, Precise Thompson Sampling for Bayesian Optimization

David SweetBDU @ NeurIPS 2024

TL;DR

This paper introduces Stagger Thompson Sampling (STS), a novel algorithm that significantly improves the performance and efficiency of Thompson Sampling for Bayesian Optimization. STS achieves faster convergence and more precise identification of optima compared to existing methods, even in high-dimensional spaces, by intelligently adapting its sampling strategy.

What Problem Does This Paper Address?

Bayesian Optimization (BO) is a powerful technique for optimizing expensive black-box functions, commonly used in scientific experiments and engineering simulations. The goal is to find the optimal configuration of parameters with the fewest function evaluations. Thompson Sampling (TS) is a popular strategy for selecting which parameters to evaluate next, known for its excellent performance in simpler multi-armed bandit problems. However, when applied to the continuous, high-dimensional problems typical in BO, standard TS implementations often underperform compared to other acquisition functions like Expected Improvement (EI) or Upper Confidence Bound (UCB). This is because efficiently sampling from the probability distribution of the optimal parameter (p*(x)) in continuous spaces is challenging, leading to inefficient exploration and slower convergence.

Methods

The core contribution is the Stagger Thompson Sampler (STS). Unlike standard TS, which often relies on uniformly sampling candidate points and then selecting the best, STS employs a more sophisticated approach:

  • Initialization: Instead of random initialization, STS initializes its search with a guess of the maximizer, derived from the current mean of the Gaussian Process model (argmax μ(x)).
  • Perturbation Strategy: The key innovation is the "stagger" perturbation. Instead of perturbing uniformly in Euclidean space, STS perturbs along a line towards a target point, but the length of this perturbation is sampled from a log-uniform distribution (e⁻ᵏᵁ). This allows STS to more precisely locate the maximizer, especially when the probability density of the optimum is concentrated in a small region.
  • Metropolis-Hastings (Approximation): While a full Metropolis-Hastings acceptance step could be used, STS, similar to the PSS algorithm it builds upon, uses a simplified approach. It draws a joint sample from the Gaussian Process at the current point and the perturbed point and accepts the point that yields a higher sampled value. This is described as "iterated Thompson sampling."

STS is presented as an improvement over the P-Star Sampler (PSS), which also uses a Hit-and-Run sampler but with a Gaussian proposal. STS's log-uniform perturbation is argued to be simpler and more effective, avoiding the need for adaptive proposal scaling.

Datasets

Not discussed in the paper. The paper evaluates its methods on a suite of standard benchmark test functions (Ackley, Dixon-Price, Griewank, Levy, Michalewicz, Rastrigin, Rosenbrock, Sphere, and Stybtang) across various dimensions (3, 30, 100, 300) and batch sizes. These functions are randomly distorted to add variety and prevent methods from exploiting specific function properties.

Key Insights and Ideas

  • The "Curse of Dimensionality" in TS: Standard TS struggles in high dimensions because the probability of uniformly sampling a point near the true optimum decreases exponentially with dimension. This makes finding the peak of p*(x) very inefficient.
  • Log-Uniform Perturbations for Precision: The log-uniform "stagger" perturbation is crucial. It allows the sampler to explore regions with high probability density more effectively, leading to more precise samples of the maximizer compared to uniform perturbations.
  • Initialization Matters: Starting the search from an informed guess (argmax μ(x)) rather than a random point significantly speeds up convergence.
  • STS as a General Improvement: STS is shown to outperform not only standard TS but also other acquisition functions and even a more recent specialized sampler (PSS) in terms of speed and precision.
  • Synergy with Batching Methods: STS integrates well with batching strategies like Minimal Terminal Variance (MTV), demonstrating that it can be a powerful component in more complex BO frameworks.

Key Results

  • Superior Performance: STS consistently outperforms standard TS, PSS, and other popular acquisition functions (EI, UCB, CMA-ES, random search) across various dimensions and batch sizes in terms of maximizing the function value.
  • Speed and Precision: STS finds higher function values more quickly than other methods. It also produces samples that are closer to the true maximizer (lower RMSE) and more precisely estimate the probability of being optimal.
  • High-Dimensional Robustness: STS performs well even in high-dimensional settings (up to 300 dimensions) without requiring any modifications, unlike some other methods.
  • Efficiency: STS is computationally faster than PSS and standard TS with a large number of candidates.
  • MTV Integration: When used as the sampling mechanism within the MTV batching algorithm, STS achieves performance comparable to or better than PSS within MTV.

Limitations and Future Work

  • Hyperparameter Tuning: While the paper mentions a hyperparameter k for the log-uniform distribution and a parameter M for the number of Hit-and-Run iterations, it doesn't extensively explore their optimal values across all scenarios. However, Appendix B suggests that M=30 is near-optimal for STS.
  • Comparison to Specialized High-Dimensional Methods: The authors note that while STS performs well in high dimensions, future work could involve comparing it more directly to methods specifically designed for high-dimensional BO.
  • Further Exploration of MTV: The paper demonstrates STS's effectiveness within MTV, suggesting that further research into combining advanced batching strategies with STS could yield even greater gains.

Summary updated

BibTeX
@inproceedings{sweet2024fast,
  author = {David Sweet},
  title = {{Fast, Precise Thompson Sampling for Bayesian Optimization}},
  booktitle = {BDU @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=SAFIkA4Lap},
}
Figure