Language Model Embeddings Can Be Sufficient for Bayesian Optimization
Tung Nguyen, Qiuyi Zhang, Bangding Yang, Chansoo Lee, Jorg Bornschein, Yingjie Miao, Sagi Perel, Yutian Chen, Xingyou Song
TL;DR
This paper introduces embed-then-regress, a framework that uses language-model embeddings of string representations to perform in-context regression within Bayesian Optimization. By freezing a pretrained string embedder and training a Transformer Neural Process as the regressor, the approach yields calibrated predictions and competitive optimization performance against GP-based baselines across synthetic, combinatorial, and hyperparameter tuning tasks. Pretraining on diverse offline evaluations enables generalization to unseen objective functions, suggesting broad applicability beyond traditional tabular inputs. The work highlights the potential of flexible, string-based representations to expand the scope and efficiency of black-box optimization in real-world settings.
Abstract
Bayesian Optimization is ubiquitous in experimental design and black-box optimization for improving search efficiency. However, most existing approaches rely on regression models which are limited to fixed search spaces and structured, tabular input features. This paper explores the use of LLM embeddings over string inputs for in-context regression in Bayesian Optimization. Our results show that representing inputs as strings enables general-purpose regression across diverse domains, including synthetic, combinatorial, and hyperparameter optimization. Furthermore, our approach achieves optimization performance comparable to state-of-the-art Gaussian Process-based methods such as Google Vizier, and demonstrates potential for broader and more flexible applications.
