arXiv:2608.22967cs.CLAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.22967

Closed-Loop Bayesian Molecular Inverse Design with Semantic LLM Surrogates

Yaoyao Xu, Xinjian Zhao, Xiaozhuang Song, Lei Bai, Tianshu Yu

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

Yaoyao Xu

School of Data Science, The Chinese University of Hong Kong, Shenzhen

Shanghai Artificial Intelligence Laboratory

xuyaoyao@link.cuhk.edu.cn

Xinjian Zhao

School of Data Science, The Chinese University of Hong Kong, Shenzhen

Shanghai Artificial Intelligence Laboratory

xinjianzhao1@link.cuhk.edu.cn

Xiaozhuang Song

School of Data Science, The Chinese University of Hong Kong, Shenzhen

Shanghai Artificial Intelligence Laboratory

xiaozhuangsong1@link.cuhk.edu.cn

Lei Bai

Shanghai Artificial Intelligence Laboratory

bailei@pjlab.org.cn

Tianshu Yu ∗^{*}

School of Data Science, The Chinese University of Hong Kong, Shenzhen

Shanghai Artificial Intelligence Laboratory

yutianshu@cuhk.edu.cn

Abstract

Practical molecular inverse design is rarely a one-shot generation problem; it often takes the form of closed-loop candidate-pool enrichment, where under a limited oracle budget the goal is to increase the fraction of generated molecules that match a desired property profile. Bayesian optimization (BO) offers a natural framework for this setting, yet standard Gaussian-process surrogates typically operate in compressed continuous embeddings, which discard the substructural and reference-similarity signals that chemists naturally use to decide where to look next. We propose BoMolLLM, a closed-loop framework in which the surrogate, rather than the generator, is treated as the locus of design choice, and instantiate it with a frozen large language model that reasons directly over the task instruction, SMILES-level optimization history, and oracle feedback in their native textual form. At each iteration, the surrogate returns a structured decision signal that selects informative reference molecules under an exploration and exploitation principle, optionally with a concise guidance sentence. This signal is converted into next-round conditioning text for a frozen molecular generator, yielding an inspectable optimization trace in natural language. Experiments on MolQA drug and material design tasks show that BoMolLLM improves over one-shot prompting, is competitive with or stronger than GP-based BO baselines, and reveals a domain-dependent interface: reference-only transfer works best for binary drug targets, while adding a concise surrogate summary is more beneficial for continuous material targets.

1 Introduction

Molecular inverse design aims to construct molecules that satisfy desired biological or physicochemical property profiles, and is a core problem in drug discovery and materials science (Sanchez-Lengeling & Aspuru-Guzik, 2018; Lu et al., 2022; Butler et al., 2018; Zunger, 2018). Beyond the enormous size of chemical space, often estimated to contain around 106010^{60} drug-like molecules (Reymond, 2015), a central challenge is that the useful

∗^{*}Corresponding author region for a given target profile can be small, irregular, and difficult to reach by unconstrained generation. In practical screening pipelines, success is therefore better viewed as candidate-pool enrichment: under a limited oracle budget, the goal is to increase the fraction of generated molecules that match the desired target, rather than to rely on a single isolated high-scoring sample (Brown et al., 2019; Polykovskiy et al., 2020; Huang et al., 2021).

Recent large language models have shown strong capability in molecular representation, property reasoning, synthesis planning, and conditional generation (Chithrananda et al., 2020; Edwards et al., 2022; Zhao et al., 2026; Edwards et al., 2021; Taylor et al., 2022; Song et al., 2026; Liu et al., 2023). For example, Llamole (Liu et al., 2025) combines an instruction-following language model with a graph diffusion transformer and performs well on instruction-guided molecule generation. However, such generators are typically used in a one-shot manner. They can follow a target prompt, but they do not explicitly use oracle feedback to correct the search trajectory. As a result, when the initial batch only weakly matches the desired profile, the generator has no mechanism to identify which structural patterns should be refined, which failures should be avoided, or which underexplored regions should be sampled next.

Bayesian optimization (BO) offers a natural closed-loop mechanism for sample-efficient black-box optimization (Shahriari et al., 2015; Snoek et al., 2012; Jones et al., 1998), and has commonly been applied to molecular design with a Gaussian-process (GP) surrogate fitted over continuous latent codes or learned embeddings (Gómez-Bombarelli et al., 2018; Kusner et al., 2017; Jin et al., 2018; Seeger, 2004). This paradigm is attractive in principle, but tied to a numerical embedding space: chemical and task-level knowledge present in molecular strings and design instructions can only enter the loop indirectly, through the choice of representation. Practical pressures compound this gap, since GPs scale poorly in high dimensions and typically rely on dimensionality reduction or local search heuristics (Binois & Wycoff, 2022; Wang et al., 2016; Eriksson et al., 2019), which further compress the chemical signal available to the surrogate.

Our key observation is that molecular optimization histories are naturally semantic objects. They contain SMILES strings (Weininger, 1988), target descriptions, oracle scores, and round-by-round evidence about which molecular patterns move the generated population toward the desired property profile. We therefore use a large language model as a semantic surrogate: given the target context and the full history, the LLM selects reference molecules and produces a structured decision signal for the next generation round. This keeps the closed-loop exploration-exploitation logic of BO, but moves the surrogate decision from a compressed numerical space to a chemically meaningful history expressed in molecules and text. We do not require the LLM to produce a calibrated GP-style posterior; instead, we treat it as a BO-style decision module whose selected references and rationale make the search process inspectable.

We propose BoMolLLM, a closed-loop framework for molecular inverse design with LLM surrogates. After an initial generation round, a frozen LLM surrogate reads the task, target value, and optimization history, then returns selected reference molecules, optionally with a concise trajectory summary, to condition the next generator call. This turns oracle feedback into semantic search guidance for a frozen molecular generator. On drug and material inverse-design tasks, BoMolLLM improves over one-shot generation, is competitive with or stronger than GP-BO baselines, and provides an inspectable optimization trace. Our contributions are summarized as follows:

• Closed-loop framework with replaceable surrogate. We formulate molecular inverse design as a closed-loop candidate-pool enrichment problem in which a surrogate reads the optimization history and selects reference molecules to condition the next generator call. The framework admits both classical Gaussian-process and LLM-based surrogates within the same loop, isolating the surrogate layer as the locus of design choice.

• Semantic LLM surrogate. We propose BoMolLLM, an LLM instantiation of the surrogate that operates directly on SMILES strings, oracle scores, and target context. The surrogate admits a BO-style interpretation in which pretrained chemical knowledge, in-context conditioning, and explicit reference selection play the roles of prior, posterior update, and acquisition.

• Empirical evidence and analysis. Across three generator backbones and six tasks, BoMolLLM matches or surpasses GP-BO baselines. Trajectory and behavioral analyses show that the surrogate discovers high-scoring molecules earlier, exhibits a BO-style transition from exploration to exploitation, and produces interpretable design rationales unavailable from numeric surrogates.