TL;DR
BOReFT bridges the gap between discrete language model generation and continuous black-box optimization. By learning a low-dimensional "intervention manifold" within a frozen LLM, it creates a smooth, continuous search space that allows Bayesian Optimization to efficiently discover high-scoring solutions, such as optimized drug-like molecules or specific hidden words.
What Problem Does This Paper Address?
Large Language Models (LLMs) are increasingly used as "proposal engines" for scientific discovery and optimization. Whether you're trying to design a new molecule that binds to a specific protein or optimize a piece of code, you often have a "black-box" objective function: you provide a candidate, and you get back a single scalar score.
The challenge is that LLMs generate discrete, stochastic sequences (tokens), while the most powerful tools for black-box search, like Bayesian Optimization (BO), operate over continuous domains. Existing methods usually try to bridge this by iteratively prompting the model or fine-tuning it on high-scoring examples. However, these approaches offer limited control over the search space and often fail to explore it efficiently. The authors ask: Can we turn the internal representations of an LLM into a continuous, navigable map for optimization?
Methods
The authors introduce BOReFT (Bayesian Optimization via Representation Fine-Tuning), a two-phase framework:
- Learning the Manifold: Instead of changing the LLM's weights, BOReFT learns a low-rank intervention (based on the LoReFT architecture) on the model's hidden states. Using a VAE-style approach, they train a small encoder to map (target, description) pairs into a low-dimensional "code" space. The training objective combines reconstruction (to ensure targets are reachable), a variational prior (to keep the space compact), and on-policy self-distillation (to ensure the space around targets remains semantically meaningful).
- Searching the Space: Once the manifold is learned, the LLM and the manifold are frozen. Bayesian Optimization then takes over, using a Gaussian Process surrogate to navigate this continuous "code" space. It picks a code, the LLM decodes it into a candidate (e.g., a SMILES string for a molecule), the candidate is scored, and the cycle repeats.
Datasets
The method was evaluated on two distinct types of tasks:
- Semantle (Word Search): A game where the goal is to find a hidden target word based on cosine similarity in an embedding space. The authors used 3,072 words with synthetic definitions for training.
- Molecular Property Optimization: The goal is to generate SMILES strings for molecules with high predicted activity against three protein targets: DRD2, GSK3$\beta$, and JNK3. Training used 1,024 molecule-description pairs from the ChEBI-20 dataset.
Key Insights and Ideas
- Semantic Interpolation: A key finding is that the learned manifold is semantically smooth. If you move linearly between two points in the code space, the decoded outputs transition gradually between the corresponding concepts. This "smoothness" is what makes Bayesian Optimization so effective here.
- The Representational vs. Search Gap: The authors decompose optimization regret into two parts: the representational gap (can the manifold even express the optimal solution?) and the search gap (can the optimizer find it?). They prove that if the task score is Lipschitz-continuous relative to semantic embeddings, the representational gap is bounded by how well the training data covers the semantic space.
- Geometric Inductive Bias: By using a frozen semantic encoder to initialize the manifold, BOReFT inherits a useful geometric prior, ensuring that semantically similar items start near each other in the search space.
Key Results
- Superior Discovery: In the Semantle task, BOReFT recovered 8/15 hidden targets, whereas strong LLM-based search baselines like OPRO and BOPRO recovered 3 or fewer.
- State-of-the-Art Molecules: On molecular tasks, BOReFT achieved significantly higher property scores for JNK3 and GSK3$\beta$ compared to baselines. On DRD2, it remained highly competitive, ranking in the top two after standardizing for training data.
- Efficiency: The method is computationally efficient; for example, it was roughly 3.5x faster per search round than methods that require test-time gradient updates (like MiGrATe).
Limitations and Future Work
- Static Manifolds: Currently, the manifold is learned once before search begins. If the "global optimum" lies in a semantic region completely unrepresented in the training data, the model will never find it.
- Continual Learning: The authors suggest that future versions could update the manifold during the search process as new high-scoring candidates are discovered, effectively expanding the map as it is explored.
- Objective Alignment: The success of the method relies on the task objective being somewhat aligned with the LLM's underlying semantic geometry. Objectives that are completely "anti-semantic" might still prove challenging.
Summary updated