Acquisition Function-Guided Generation for Bayesian Optimization over Discrete Spaces
Authors: Tommaso Ancilli, Thomas Wedenig, Henry Moss, Robert Peharz
Organizations: Institute of Machine Learning and Neural Computation, TU Graz, Austria · Graz Center for Machine Learning (GraML), Austria · School of Mathematical Sciences, Lancaster University, UK
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.
Figures & tables
Figure 1: Sequential setting. Optimization trajectories on six representative objectives, with 10 initial observations followed by 300 oracle evaluations, one per BO iteration. Curves show the median over 5 seeds.
baselines
AFGG
Objective
CoBO
InvBO
LOL-BO
NFBO
COWBOYS
CDCD
SeqFlow
albu_sim
0.593 ± 0.111
0.629 ± 0.079
0.509 ± 0.065
0.593 ± 0.119
0.448 ± 0.037
0.691 ± 0.073
0.975 ± 0.038
amlo_mpo
0.523 ± 0.012
0.538 ± 0.050
0.516 ± 0.022
0.563 ± 0.095
0.472 ± 0.038
0.546 ± 0.039
0.565 ± 0.045
cele_red
0.262 ± 0.041
0.286 ± 0.068
0.243 ± 0.035
0.455 ± 0.035
0.243 ± 0.020
0.392 ± 0.024
0.836 ± 0.125
deco_hop
0.565 ± 0.008
0.597 ± 0.019
0.560 ± 0.009
0.673 ± 0.147
0.559 ± 0.008
0.599 ± 0.010
0.803 ± 0.175
drd2
0.510 ± 0.370
0.963 ± 0.037
0.626 ± 0.184
0.971 ± 0.066
0.796 ± 0.243
0.730 ± 0.226
1.000 ± 0.000
Table 1: Sequential benchmark (partial results). Final best score on all 25 PMO objectives after 300 oracle calls (10 initial points, 1 point per BO iteration), mean ± sample standard deviation over 5 seeds. For readability the table shows five of the eleven baselines; Table 6 gives the full comparison. AFGG is shown in two instantiations: CDCD and SeqFlow . Every cell is judged against the opposing group. Bold : the cell’s mean exceeds every mean in the opposing group. Green, shaded : lead exceeds the cell’s own sample standard deviation; bold without shading denotes a smaller lead. Objective abbreviations are defined in Table 5 .
Figure 2: Batch setting, uncoupled generation. Optimization trajectories on the same six representative objectives, with 100 initial observations followed by 500 oracle evaluations in batches of five. Curves show the median over 5 seeds.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
CDCD
SeqFlow
noised variable
embedding x
flow latent gθ−1(x)
schedule (αt,σt)
(1,t) , VE
(ρt,1−ρt2) , VP Eq. ( 51 )
(i) ∇ztlogpt
learned Eq. ( 6 )
−zt , exact
(ii) draws from p(⋅∣zt)
mean-field p~ Eq. ( 49 ), one network pass
exact Gaussian Eq. ( 27 ), N passes of gθ
∇ztlogℓt
SNIS Eq. ( 42 ) or REINFORCE Eq. ( 50 )
SNIS Eq. ( 42 )
noise end
pT⋆≈N(0,T2I)
πT⋆≈N(0,I)
Appendix
Table 2: What each backbone supplies to the guided score Eq. ( 19 ). Quantities (i) and (ii) are backbone-specific; the guidance term ∇ztlogℓt is estimated from the draws of (ii) (Section 3.3 ).
objective
K=0
K=32
Δ
Δ/sd
med2
0.1637±0.0193
0.1694±0.0243
+0.0058
+0.26
osmb
0.7094±0.0578
0.7055±0.0611
−0.0039
−0.07
adip
0.4335±0.0297
0.4483±0.0029
+0.0148
+0.70
zale
0.3811±0.0935
0.2842±0.0612
−0.0969
−1.23
rano
0.7503±0.0361
0.7088±0.0570
−0.0416
−0.87
qed
0.8992±0.0370
0.9106±0.0387
+0.0114
+0.30
Appendix
Table 3: The mean-field approximation Eq. ( 49 ) against rollouts of the reverse process. K is the number of inner denoising steps used to draw each of the N SNIS samples: K=0 is the factorized draw from the per-position marginals Eq. ( 7 ), i.e. Eq. ( 49 ), and is what Algorithm 1 uses; K>0 replaces it by a K -step ancestral rollout, which couples the positions through the network and resolves the joint. Final objective value after 300 BO epochs on six GuacaMol/TDC objectives, mean ± sd over 3 seeds; higher is better. Δ is K=32 minus K=0 , and the last column expresses it in units of the pooled seed-to-seed sd. At K=32 — beyond the point where proposal fidelity saturates, and at ≈24× the wall clock ( 8.77 against 0.36 h per arm) — no objective improves beyond the seed spread and one degrades.
Hyperparameter
Value
Architecture
Embedding dimension
16
Hidden dimension
512
Query/key/value dimension
512
Time embedding dimension
16
Layers
8
Appendix
Table 4: Hyperparameters of the CDCD generator.
Abbreviation
PMO objective
Abbreviation
PMO objective
albu_sim
albuterol_similarity
osim_mpo
osimertinib_mpo
amlo_mpo
amlodipine_mpo
peri_mpo
perindopril_mpo
cele_red
celecoxib_rediscovery
rano_mpo
ranolazine_mpo
deco_hop
deco_hop
logp
rdkit_logp
drd2
drd2_docking
qed
rdkit_qed
fexo_mpo
fexofenadine_mpo
sa
sa_tdc
Appendix
Table 5: Abbreviations of the 25 PMO objectives, used in all tables.
Figure 3: Sequential setting : full trajectories on all 25 PMO objectives (10 initial points, 300 oracle calls, 1 point per BO iteration).
baselines
AFGG
Objective
CoBO
InvBO
LOL-BO
NFBO
CMA-ES
COWBOYS
DE
GA
HC
RLBO
TuRBO
CDCD
SeqFlow
albu_sim
0.593 ± 0.111
0.629 ± 0.079
0.509 ± 0.065
0.593 ± 0.119
0.500 ± 0.030
0.448 ± 0.037
0.488 ± 0.035
0.385 ± 0.074
0.454 ± 0.070
0.483 ± 0.091
0.475 ± 0.047
0.691 ± 0.073
0.975 ± 0.038
amlo_mpo
0.523 ± 0.012
0.538 ± 0.050
0.516 ± 0.022
0.563 ± 0.095
0.459 ± 0.038
0.472 ± 0.038
0.438 ± 0.143
0.419 ± 0.082
0.460 ± 0.048
0.491 ± 0.030
0.475 ± 0.024
0.546 ± 0.039
0.565 ± 0.045
cele_red
0.262 ± 0.041
0.286 ± 0.068
0.243 ± 0.035
0.455 ± 0.035
0.227 ± 0.032
0.243 ± 0.020
0.216 ± 0.036
0.210 ± 0.040
0.228 ± 0.032
0.224 ± 0.031
0.221 ± 0.033
0.392 ± 0.024
0.836 ± 0.125
deco_hop
0.565 ± 0.008
0.597 ± 0.019
0.560 ± 0.009
0.673 ± 0.147
0.563 ± 0.010
0.559 ± 0.008
0.571 ± 0.018
0.549 ± 0.015
0.553 ± 0.012
0.556 ± 0.015
0.552 ± 0.012
0.599 ± 0.010
0.803 ± 0.175
drd2
0.510 ± 0.370
0.963 ± 0.037
0.626 ± 0.184
0.971 ± 0.066
0.184 ± 0.068
0.796 ± 0.243
0.862 ± 0.156
0.154 ± 0.051
0.183 ± 0.045
0.380 ± 0.246
0.556 ± 0.337
0.730 ± 0.226
1.000 ± 0.000
Appendix
Table 6: Final best score on all 25 PMO objectives after 300 oracle calls (10 initial points, 1 point per BO iteration), mean ± sample standard deviation over 5 seeds. AFGG is shown in two instantiations: CDCD and SeqFlow . Every cell is judged against the opposing group: an AFGG cell against the 11 baselines, a baseline cell against the two AFGG columns. Bold : the cell’s mean exceeds every mean in the opposing group. Green : that lead is significant, exceeding the cell’s own standard deviation; bold without green therefore means ahead but within noise.
Figure 4: Batch regime, uncoupled generation : 500 acquisitions (100 initial points, then 100 epochs of 5), all 25 objectives.
baselines
AFGG
Objective
CoBO
InvBO
LOL-BO
NFBO
COWBOYS
CDCD
SeqFlow
albu_sim
0.692 ± 0.095
0.771 ± 0.057
0.579 ± 0.043
0.609 ± 0.073
0.551 ± 0.081
0.779 ± 0.073
0.960 ± 0.050
amlo_mpo
0.540 ± 0.021
0.569 ± 0.029
0.522 ± 0.026
0.582 ± 0.024
0.501 ± 0.021
0.565 ± 0.052
0.618 ± 0.075
cele_red
0.307 ± 0.035
0.366 ± 0.064
0.304 ± 0.036
0.452 ± 0.052
0.316 ± 0.052
0.457 ± 0.098
0.861 ± 0.135
deco_hop
0.588 ± 0.005
0.610 ± 0.007
0.586 ± 0.004
0.617 ± 0.018
0.583 ± 0.004
0.614 ± 0.019
0.878 ± 0.120
drd2
0.930 ± 0.090
0.996 ± 0.006
0.728 ± 0.247
0.994 ± 0.012
0.774 ± 0.210
0.792 ± 0.288
1.000 ± 0.000
Appendix
Table 7: Batch regime, uncoupled generation. Final best score on all 25 PMO objectives after 500 acquisitions (100 initial points, then 100 epochs of 5), mean ± sample standard deviation over 5 seeds. AFGG generates each batch uncoupled here: every molecule is guided by its own acquisition value, and the batch only forms at selection. Every cell is judged against the opposing group: an AFGG cell against the five baselines, a baseline cell against the two AFGG columns. Bold : the cell’s mean exceeds every mean in the opposing group. Green : that lead is significant, exceeding the cell’s own standard deviation; bold without green therefore means ahead but within noise.
Figure 5: Batch regime, coupled generation : 500 acquisitions (100 initial points, then 100 epochs of 5), all 25 objectives.
baselines
AFGG
Objective
CoBO
InvBO
LOL-BO
NFBO
COWBOYS
CDCD
SeqFlow
albu_sim
0.692 ± 0.095
0.771 ± 0.057
0.579 ± 0.043
0.609 ± 0.073
0.551 ± 0.081
0.703 ± 0.057
0.910 ± 0.083
amlo_mpo
0.540 ± 0.021
0.569 ± 0.029
0.522 ± 0.026
0.582 ± 0.024
0.501 ± 0.021
0.606 ± 0.068
0.630 ± 0.051
cele_red
0.307 ± 0.035
0.366 ± 0.064
0.304 ± 0.036
0.452 ± 0.052
0.316 ± 0.052
0.402 ± 0.034
0.645 ± 0.153
deco_hop
0.588 ± 0.005
0.610 ± 0.007
0.586 ± 0.004
0.617 ± 0.018
0.583 ± 0.004
0.615 ± 0.018
0.866 ± 0.153
drd2
0.930 ± 0.090
0.996 ± 0.006
0.728 ± 0.247
0.994 ± 0.012
0.774 ± 0.210
1.000 ± 0.000
1.000 ± 0.000
Appendix
Table 8: Batch regime, coupled generation. Final best score on all 25 PMO objectives after 500 acquisitions (100 initial points, then 100 epochs of 5), mean ± sample standard deviation over 5 seeds. AFGG generates each batch coupled here: one joint qLogEI tilt per candidate batch, so its members are generated aware of each other. Every cell is judged against the opposing group: an AFGG cell against the five baselines, a baseline cell against the two AFGG columns. Bold : the cell’s mean exceeds every mean in the opposing group. Green : that lead is significant, exceeding the cell’s own standard deviation; bold without green therefore means ahead but within noise.
Metric
CDCD
SeqFlow
Validity ↑
1.0000
0.9972
Uniqueness ↑
0.9932
0.9862
Novelty ↑
0.9956
0.9838
FCD ↓
20.99
6.02
Appendix
Table 9: Unconditional sample quality. 5000 molecules drawn from each generative model and scored against a 30 k-molecule subset of GuacaMol.
Guidance on vs off
Objective
on
off ( λ=0 )
osim_mpo
0.714 ± 0.064
0.722 ± 0.048
med_2
0.199 ± 0.013
0.173 ± 0.012
amlo_mpo
0.486 ± 0.053
0.408 ± 0.018
zale_mpo
0.420 ± 0.054
0.431 ± 0.030
rano_mpo
0.788 ± 0.012
0.745 ± 0.026
Appendix
Table 10: Guidance on vs. off; off sets λ=0 , flattening the SNIS weights to uniform so the tilted mean equals the untilted one.
Guidance estimator
Objective
SNIS (closed form)
REINFORCE
osim_mpo
0.714 ± 0.064
0.671 ± 0.033
med_2
0.199 ± 0.013
0.170 ± 0.010
amlo_mpo
0.486 ± 0.053
0.410 ± 0.062
zale_mpo
0.420 ± 0.054
0.250 ± 0.085
rano_mpo
0.788 ± 0.012
0.687 ± 0.036
Appendix
Table 11: Guidance estimator: closed-form SNIS vs. REINFORCE (score-function estimator with a leave-one-out baseline) in place of the mean-swap identity.
Acquisition function
Objective
EI
PI
UCB
osim_mpo
0.714 ± 0.064
0.708 ± 0.065
0.696 ± 0.041
med_2
0.199 ± 0.013
0.183 ± 0.015
0.170 ± 0.009
amlo_mpo
0.486 ± 0.053
0.495 ± 0.029
0.490 ± 0.013
zale_mpo
0.420 ± 0.054
0.439 ± 0.045
0.445 ± 0.055
rano_mpo
0.788 ± 0.012
0.753 ± 0.026
0.746 ± 0.037
Appendix
Table 12: Acquisition function driving both the guidance tilt and candidate selection; UCB uses β=0.1 .
Candidate pool size
Objective
1
5
10
20
osim_mpo
0.736 ± 0.010
0.712 ± 0.053
0.714 ± 0.064
0.711 ± 0.063
med_2
0.186 ± 0.012
0.192 ± 0.008
0.199 ± 0.013
0.204 ± 0.007
amlo_mpo
0.486 ± 0.045
0.504 ± 0.038
0.486 ± 0.053
0.496 ± 0.029
zale_mpo
0.432 ± 0.048
0.411 ± 0.084
0.420 ± 0.054
0.406 ± 0.060
rano_mpo
0.764 ± 0.008
0.768 ± 0.019
0.788 ± 0.012
0.771 ± 0.015
Appendix
Table 13: Candidate pool size: guided trajectories rolled out per epoch, of which the best by acquisition value is evaluated.
Where the temperature acts
Objective
power tilt γ=2
scale drift λ=0.5
scale drift λ=2
scale drift λ=5
osim_mpo
0.714 ± 0.064
0.702 ± 0.034
0.694 ± 0.040
0.682 ± 0.026
med_2
0.199 ± 0.013
0.194 ± 0.010
0.191 ± 0.013
0.182 ± 0.007
amlo_mpo
0.486 ± 0.053
0.474 ± 0.029
0.423 ± 0.029
0.496 ± 0.051
zale_mpo
0.420 ± 0.054
0.449 ± 0.026
0.402 ± 0.041
0.401 ± 0.029
rano_mpo
0.788 ± 0.012
0.750 ± 0.031
0.782 ± 0.023
0.773 ± 0.023
Appendix
Table 14: Different temperature parameters and how they affect the final generation process.