TL;DR
The authors introduce Kernel Discovery, an LLM-driven evolutionary framework that automatically designs novel Gaussian Process kernels for high-dimensional Bayesian Optimization. By decoupling the generation process into a two-stage "mathematical formulation then code conversion" pipeline and using a robust leave-one-out evaluation metric, it bypasses the context-length limits of traditional LLM approaches and achieves an outstanding average rank of 1.2 out of 17 competitive methods.
What Problem Does This Paper Address?
Bayesian Optimization (BO) is a powerful strategy for optimizing expensive, black-box functions. At its core, BO relies on a surrogate model—typically a Gaussian Process (GP)—to predict unobserved points, and the accuracy of this model depends heavily on its kernel function.
While designing effective kernels for low-dimensional spaces is well-understood, high-dimensional spaces ($D > 100$) suffer from the "curse of dimensionality," causing standard kernels to struggle with distance collapse and overexploration. Manually engineering specialized kernels requires rare domain expertise.
Existing automated methods face two major bottlenecks:
- The Expressive Bottleneck: Traditional automated search methods restrict themselves to basic additions and multiplications of standard base kernels.
- The Interface Bottleneck: Recent LLM-based BO methods try to ingest raw numerical data streams. In high dimensions, this quickly exhausts the LLM's context window and makes it incredibly difficult for the model to extract meaningful structural patterns.
Methods
The authors propose Kernel Discovery, an evolutionary framework that uses LLMs as evolutionary operators to explore a much broader space of valid mathematical kernels without ever looking at raw data observations.
Instead of feeding the LLM a stream of numbers, the framework feeds it the mathematical descriptions of the current best-performing kernels in the population. The architecture consists of several key steps:
- Two-Stage Generation: Directly prompting an LLM to write kernel code often results in "functional redundancy"—the LLM changes variable names or rewrites algebra but produces the exact same mathematical function. To fix this, Kernel Discovery uses a two-stage approach:
- Stage 1: An LLM proposes a novel mathematical formulation based on high-dimensional strategies (e.g., input warpings, dimensionality scaling).
- Stage 2: A second LLM call converts that specific mathematical form into executable GPyTorch code.
- Kernel Validation: The generated code undergoes automated sanity checks: an agnostic execution check (ensuring it handles varying batch sizes and dimensions without crashing) and a Positive Semi-Definite (PSD) check (verifying it passes Cholesky decomposition on random inputs).
- LOO-CRPS Selection: To choose the best kernel from the population, the authors introduce the Leave-One-Out Continuous Ranked Probability Score (LOO-CRPS). Unlike standard Marginal Log-Likelihood (MLL), which often overfits and favors overly complex kernels, LOO-CRPS penalizes overconfident, poorly calibrated models.
Datasets
The framework was evaluated on five standard high-dimensional BO benchmarks representing diverse real-world challenges:
- Rover ($D=100$): A trajectory optimization task navigating a 2D terrain.
- Mopta08 ($D=124$): A highly non-smooth structural car body engineering design problem with 68 physical constraints.
- Lasso-DNA ($D=180$): A bioinformatics hyperparameter search for regularized regression models on genomic data.
- SVM ($D=388$): Hyperparameter optimization of a Support Vector Machine classifier on a tabular dataset.
- Humanoid ($D=6392$): A massive continuous locomotion control task from the MuJoCo physics simulator.
Key Insights and Ideas
- Math First, Code Second: Separating conceptual mathematical design from code implementation dramatically increases the functional diversity of the generated kernels. It forces the LLM to think about structural transformations (like geometric warpings) rather than getting bogged down in syntax.
- Abstracting the Context: By conditioning the LLM on successful kernel structures rather than raw data points, the method eliminates the context-length bottleneck entirely. This allows the framework to scale effortlessly up to thousands of dimensions (e.g., the 6,392-dimensional Humanoid task).
- The Power of Non-Stationary Components: The evolutionary process frequently discovered complex, non-stationary kernels (such as combining standard kernels with
arctanortanhpolynomial warpings). While human experts rarely design non-stationary kernels for BO due to their complexity, the framework proved they can be highly effective at mitigating boundary-seeking behavior in high dimensions.
Key Results
Kernel Discovery was compared against 16 baselines, including standard base kernels (RBF, Matérn52), search-based methods (CAKE, Compositional Search), and end-to-end LLM optimizers.
- Top Performance: Kernel Discovery achieved an average rank of 1.2 out of 17 across all benchmarks, outperforming every baseline.
- Sample Efficiency: It consistently avoided the optimization plateaus that plagued other search-based methods like Compositional Search and BOCK by continuously evolving the kernel population.
- Transferability: Kernels discovered on one benchmark (e.g., SVM) performed exceptionally well when directly transferred to entirely different benchmarks without any further search, proving that the LLM discovered fundamentally robust geometric priors for high-dimensional spaces.
Limitations and Future Work
While highly effective, the authors note a few limitations:
- Independent Runs: The discovery process currently runs from scratch for each benchmark. A natural next step is developing a generalized strategy that shares structural knowledge across multiple tasks simultaneously to amortize the LLM search cost.
- Validation Failures: A significant portion of LLM-generated kernels still fail the automated PSD or dimension-agnostic verifiers. Stronger prompt engineering or hardcoding mathematical constraints directly into the generation step could help reduce this failure rate.
Summary updated