Language Model-Driven Kernel Discovery for High-Dimensional Bayesian Optimization

Taeyoung Yun, Woocheol Shin, Inhyuck Song, Jaewoo Lee, Jinkyoo ParkNeurIPS 2026

TL;DR

Finding the optimal setting for a complex system with hundreds or thousands of variables—like tuning robot control policies or designing biological sequences—usually requires human experts to painstakingly hand-craft mathematical assumptions. This paper introduces Kernel Discovery, a framework where Large Language Models (LLMs) act as automated mathematicians, inventing and evolving novel Gaussian Process kernels on the fly. Rather than choking on massive tables of raw numbers, the LLM operates in pure math space, achieving first place across five notoriously difficult high-dimensional benchmarks.

What Problem Does This Paper Address?

Imagine trying to find the highest peak in a pitch-black mountain range where you can only afford to take a few altitude measurements. That is black-box optimization, and Bayesian Optimization (BO) is our best flashlight. BO builds a statistical "surrogate" map of the landscape—typically a Gaussian Process (GP)—to decide where to step next. At the heart of a GP is its kernel: a mathematical function defining how similar two points are.

When landscapes scale to hundreds or thousands of dimensions, standard BO breaks down due to the curse of dimensionality; points become vastly spread out, causing the algorithm to get lost exploring the empty boundaries of the space. Recently, researchers found that clever mathematical tricks (like warping the input geometry into hyperspheres) make simple GPs work brilliantly in high dimensions, but discovering these tricks requires deep manual engineering.

Why not automate this with LLMs? Existing automated and LLM-based BO methods hit two major walls in high dimensions:

  1. The Interface Bottleneck: Most LLM-for-BO methods feed raw past observations directly into the prompt. In 6,000 dimensions, a few trials turn into a massive wall of floating-point numbers that blows past context limits and leaves the LLM unable to spot patterns.
  2. The Expressive Bottleneck: Traditional automated kernel search only adds or multiplies a fixed menu of basic kernels, missing out on creative geometric warpings or novel mathematical forms.
Figure 1: Motivation Figure. (Left): In high-dimensional BO, a conventional LLM-based BO does not work due to the out-of-context limits and the difficulty of extracting meaningful patterns. (Right): Our pipeline enables us to discover effective kernels for high-dimensional BO beyond compositions.

Methods

The authors embed an LLM (GPT-4o) inside an evolutionary loop to breed better GP kernels at every step of the standard BO process, without ever showing the LLM the raw data.

Figure 2: Overview of the method. Given an initial population, we instruct an LLM to generate novel kernels via a two-stage approach: mathematical formulation and code conversion. We then perform a sanity check to retain only valid kernels and select the kernel with the lowest LOO-CRPS value. Finally, we propose a next query using the chosen kernel and update the dataset and population.

Here is what sets their Kernel Discovery pipeline apart from standard BO:

  • High-Dimensional Seed Population: Instead of starting from scratch, the initial pool of kernels includes high-dimension-friendly priors and geometric warpings (like BOCK and Spherical Linear) to give the LLM strong mathematical building blocks.
  • Two-Stage Generation (Math First, Code Second): Prompting an LLM to write novel kernel code directly often results in lazy "innovations"—renaming variables or swapping x - y for x.sub(y). To force genuine creativity, one LLM call is prompted with existing formulas and goodness-of-fit scores to propose a novel mathematical expression. A second LLM call translates that math into PyTorch code. (Alongside this, a simpler composition prompt also adds/multiplies top kernels).
  • Automated Sanity Checks: Every generated kernel is empirically tested to ensure it handles arbitrary input dimensions and produces valid, positive semi-definite covariance matrices (via a Cholesky decomposition check).
  • Smarter Selection (LOO-CRPS): Standard BO scores kernels using Marginal Log-Likelihood (MLL), which tends to reward overly complex, overfitted kernels. The authors instead select the winning kernel using Leave-One-Out Continuous Ranked Probability Score (LOO-CRPS)—computed analytically via a single matrix inversion—which penalizes overconfident, overfitted predictions on held-out data points (plus a parameter-count penalty in ultra-high dimensions).

Datasets

No new benchmarks are introduced; the authors evaluate on five established high-dimensional BO benchmarks spanning $D = 100$ to $D = 6392$:

  • Rover ($D = 100$): Trajectory optimization.
  • Mopta08 ($D = 124$): Vehicle mass minimization.
  • Lasso-DNA ($D = 180$): Hyperparameter tuning on DNA sequences.
  • SVM ($D = 388$): Support vector machine hyperparameter tuning.
  • Humanoid ($D = 6392$): MuJoCo reinforcement learning locomotion control.

(Note: The authors explicitly exclude the standard Ant benchmark because it can be trivially exploited by random initialization).

Key Insights and Ideas

  • LLMs are terrible high-dimensional number crunchers, but great mathematical mutators: Methods that feed raw trial numbers to LLMs perform worse than basic, decades-old kernels in high dimensions. Asking the LLM to reason purely over symbolic math bypasses context limits entirely.
  • Decoupling math from code unlocks true diversity: Measuring the functional cosine distance between generated kernels proved that separating mathematical formulation from code translation stops LLMs from merely refactoring syntax and pushes them to invent genuinely distinct functions.
  • Challenging BO orthodoxy: When analyzing the winning kernels, the authors found the LLM inventing combinations of multiple geometric warpings (like arctan and tanh transformations) and non-stationary polynomial components. Historically, the BO community avoids non-stationary kernels, yet a discovered tanh-polynomial hybrid transferred remarkably well across tasks without falling into the trap of over-exploring search boundaries.

Key Results

Tested against 16 baselines—including 7 fixed kernels, 3 search-based methods, and 6 LLM-driven optimizers—Kernel Discovery achieved an average rank of 1.0 out of 17, taking first place on every single benchmark:

  • SVM ($D=388$, lower is better): Achieved 0.054, beating the runner-up Compositional Search (0.068) and observation-conditioned LLM kernel search CAKE (0.117).
  • Humanoid ($D=6392$, higher is better): Scored 748.70, substantially outperforming Compositional Search (669.31), BOCK (648.65), and standard RBF (538.47).
  • Rover ($D=100$, higher is better): Reached 4.424 versus the best base kernel SL (4.185).
Figure 4: Learning curve of various methods across standard benchmarks. We visualize the top-2 baselines by average rank per category for clarity. Please refer to Figure 11 for the full results.

Furthermore, taking a single kernel discovered during the SVM run and freezing it (no search) beat standard fixed kernels across the board, earning an average rank of 2.8 out of 8.

Limitations and Future Work

  • High Invalidity Rate: Roughly 30% to 45% of LLM-generated kernels fail the positive semi-definiteness or shape-agnosticity checks and get discarded. Better prompt engineering or constrained decoding could reduce wasted LLM calls.
  • Per-Task Overhead: Currently, the evolutionary search runs from scratch on each new optimization problem (with a 60-second GP fitting timeout safeguard). Because discovered kernels showed strong cross-task transferability, future work could discover general-purpose high-dimensional kernels across multiple tasks simultaneously to amortize compute costs.

Summary updated

Abstract

Gaussian Process (GP) kernels are central to Bayesian optimization (BO), yet designing effective kernels for high-dimensional problems still relies on extensive manual engineering. Existing automated approaches struggle in high dimensions for two bottlenecks: their kernel search space is limited to additions and multiplications of base kernels, and Large Language Model (LLM)-based approaches require conditioning on raw observations, which becomes infeasible due to context-length limits and the difficulty of extracting meaningful patterns. We introduce **Kernel Discovery**, an LLM-driven evolutionary framework for high-dimensional BO that searches a broader kernel space beyond predefined composition rules and does not require conditioning on observations. Motivated by the observation that directly prompting an LLM to generate kernel code yields syntactically varied but functionally identical kernels, we adopt a two-stage approach: an LLM first proposes novel mathematical forms, then a second LLM call converts each form into validated, executable code. We also utilize LOO-CRPS instead of MLL as a selection criterion to penalize overfitted kernels. On five high-dimensional BO benchmarks, our method achieves an average rank of **1.0 out of 17**, outperforming competitive baselines. We further analyze the discovered kernels to identify which kernels lead to improvements in high-dimensional BO.
BibTeX
@inproceedings{yun2026language,
  author = {Taeyoung Yun and Woocheol Shin and Inhyuck Song and Jaewoo Lee and Jinkyoo Park},
  title = {{Language Model-Driven Kernel Discovery for High-Dimensional Bayesian Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=s7NsKU2IcH},
}

Loading related content...

Figure