arXiv:2610.22763cs.LGOct 2026

Manuscript Offprint

arXiv:2610.22763

Acquisition Function-Guided Generation for Bayesian Optimization over Discrete Spaces

Tommaso Ancilli, Thomas Wedenig, Henry Moss, Robert Peharz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Bayesian optimization (BO) over discrete spaces is challenging due to missing gradients and the sparsity of valid solutions. Latent-space BO sidesteps both issues by fitting a surrogate in the latent space of a generative model, which however substantially complicates the direct incorporation of domain knowledge that is naturally expressed in the original discrete space. In this work, we instead combine a pretrained generative model with a surrogate defined directly in data space, where inductive biases such as domain-specific kernels can be readily incorporated. Rather than maximizing the acquisition function over the discrete design space, our method samples candidates from the generative model under a distribution tilted by the acquisition function. To recover useful gradients for sampling, we embed this tilted distribution into a diffusion bridge that yields a smooth, posterior-averaged acquisition function. This leads to acquisition function guided generation (AFGG), which we instantiate with a categorical diffusion model and an autoregressive normalizing flow. Across a broad suite of molecular benchmarks, the diffusion model variant performs on par with leading BO methods, while the flow model variant outperforms state-of-the-art methods in most cases and remains highly competitive otherwise. Our implementation is available at https://anonymous.4open.science/r/afgg.

1 INTRODUCTION

Bayesian optimization (BO) offers a sample-efficient approach to problems such as molecular and protein design, where objective evaluations are costly and the search space is discrete and structured (Garnett, 2023; Yang et al., 2025). Unfortunately, direct optimization over such spaces is hard because valid designs are sparsely populated in a combinatorial space and standard continuous optimizers have no useful gradients to follow (Moss et al., 2020). Latent-space Bayesian optimization (LSBO) addresses both challenges by training a generative model over the discrete space—thereby capturing the sparse structure of valid designs—and by performing BO in its continuous latent space, where gradients for acquisition optimization are readily available (Gómez-Bombarelli et al., 2018).

However, domain knowledge is harder to incorporate in an abstract latent space, while in data space, such knowledge can often be encoded directly through inductive biases such as domain-specific kernels (Rogers & Hahn, 2010). Furthermore, the latent space must also “do two jobs at once:” support faithful generation and provide a geometry in which the objective is easy to model by a surrogate. These goals need not align, which motivates many LSBO methods to adapt the latent representation during BO (Chu et al., 2024; Deshwal & Doppa, 2021; Lee et al., 2023; 2025; Maus et al., 2022; Tripp et al., 2020), despite the small-data regime in which such adaptation can overfit (Ober et al., 2021). Moreover, even a strong generative model only approximates the sparse set of valid designs, so acquisition optimization can move into poorly supported regions of latent space where decoding becomes unreliable (Bodin et al., 2025; Moss et al., 2025).

A natural strategy for avoiding these drawbacks is to decouple the two roles: use a strong pretrained generative model to capture the sparse structure of valid designs, while keeping the surrogate and

*Joint first author acquisition function in data space, so that domain knowledge and inductive biases can be included. To the best of our knowledge, COWBOYS (Moss et al., 2025) is the only prior BO method that follows this strategy, but it is tied to a VAE as the generative model and probability of improvement as the acquisition function.

In this paper, we propose acquisition function guided generation (AFGG), which replaces acquisition function maximization with sampling from a distribution that tilts a frozen pretrained generative model toward designs favored by the acquisition function. The construction is generic in both components: it requires only a generative model that supports guided sampling and any non-negative acquisition function that can be evaluated pointwise; the latter need neither be differentiable nor define a probability. Since the discrete, combinatorial design space makes direct sampling from the tilted distribution difficult, we embed it into a diffusion process over the generative model's continuous space. At each noise level, this yields a smooth posterior-averaged acquisition function that provides the gradients needed for guided sampling. The resulting gradients can then guide sampling in the same spirit as guidance in diffusion models (Dhariwal & Nichol, 2021; Ho & Salimans, 2022), which gives the method its name.

Our contributions are threefold:

• Acquisition function guided generation. We formulate the BO inner loop as sampling from an acquisition-tilted distribution that combines a frozen pretrained generative model with a surrogate defined directly in data space (Section 3.1). We show that this target can be recovered exactly in the generative model's continuous space and that the resulting guidance term reduces to replacing the model's posterior mean by its acquisition-weighted counterpart (Section 3.3).

• A unified construction for different generative models. We derive AFGG from a common diffusion-bridge construction and show how it applies to both categorical diffusion models and autoregressive normalizing flows (Section 3.4). The generator remains frozen throughout BO, while the surrogate and acquisition function stay in data space.

• State-of-the-art empirical performance. Across a broad suite of molecular design benchmarks under tight evaluation budgets, AFGG with the categorical diffusion model performs on par with leading BO methods. More strikingly, AFGG with the flow model achieves state-of-the-art performance on most benchmarks and remains highly competitive on the rest (Section 4).

References (65)