Automated Kernel Discovery Towards Understanding High-dimensional Bayesian Optimization

arXiv cs.LG Papers

Summary

The paper introduces Kernel Discovery, an LLM-driven evolutionary framework for high-dimensional Bayesian optimization that searches a broader kernel space and achieves state-of-the-art results on benchmarks.

arXiv:2605.20249v1 Announce Type: new 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 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 \textbf{Kernel Discovery}, a 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 propose a leave-one-out continuous ranked probability score (LOO-CRPS) as a selection criterion that penalizes overfitted kernels. On five high-dimensional BO benchmarks, our method achieves an average rank of \textbf{1.2 out of 17}, outperforming competitive baselines. We further analyze the discovered kernels to identify which kernels lead to improvements in high-dimensional BO.
Original Article
View Cached Full Text

Cached at: 05/21/26, 06:20 AM

# Automated Kernel Discovery Towards Understanding High-dimensional Bayesian Optimization
Source: [https://arxiv.org/html/2605.20249](https://arxiv.org/html/2605.20249)
Taeyoung Yun1,∗Woocheol Shin1,∗Inhyuck Song1Jaewoo Lee1Jinkyoo Park1 1Korea Advanced Institute of Science and Technology \(KAIST\) \{99yty, woofe, son9ih, jaewoo, jinkyoo\.park\}@kaist\.ac\.kr

###### 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 LLM\-based approaches require conditioning on raw observations, which becomes infeasible due to context\-length limits and the difficulty of extracting meaningful patterns\. We introduceKernel Discovery, a 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 propose a leave\-one\-out continuous ranked probability score \(LOO\-CRPS\) as a selection criterion that penalizes overfitted kernels\. On five high\-dimensional BO benchmarks, our method achieves an average rank of1\.2 out of 17, outperforming competitive baselines\. We further analyze the discovered kernels to identify which kernels lead to improvements in high\-dimensional BO\.

## 1Introduction

Optimizing high\-dimensional black\-box functions spans a wide range of machine learning problems, including hyperparameter optimization\[[49](https://arxiv.org/html/2605.20249#bib.bib46),[51](https://arxiv.org/html/2605.20249#bib.bib51)\], neural architecture search\[[47](https://arxiv.org/html/2605.20249#bib.bib44),[19](https://arxiv.org/html/2605.20249#bib.bib20)\], biological sequence design\[[29](https://arxiv.org/html/2605.20249#bib.bib30),[24](https://arxiv.org/html/2605.20249#bib.bib24)\], and control tasks\[[50](https://arxiv.org/html/2605.20249#bib.bib50),[4](https://arxiv.org/html/2605.20249#bib.bib4)\]\. Bayesian optimization \(BO\) is the de facto paradigm for black\-box optimization, which iteratively selects promising candidates based on surrogate models fitted to observations so far\[[23](https://arxiv.org/html/2605.20249#bib.bib23),[15](https://arxiv.org/html/2605.20249#bib.bib15)\]\. However, it often suffers from the curse of dimensionality, as large distances between observations make accurate surrogate modeling difficult and exacerbate overexploration toward the boundary of the search space\.

Prior works in high\-dimensional BO have exploited structural assumptions such as additive decompositions\[[9](https://arxiv.org/html/2605.20249#bib.bib9),[20](https://arxiv.org/html/2605.20249#bib.bib19),[14](https://arxiv.org/html/2605.20249#bib.bib14),[28](https://arxiv.org/html/2605.20249#bib.bib28)\], low\-dimensional subspaces\[[53](https://arxiv.org/html/2605.20249#bib.bib48),[33](https://arxiv.org/html/2605.20249#bib.bib32),[25](https://arxiv.org/html/2605.20249#bib.bib25)\], or sparsity\[[11](https://arxiv.org/html/2605.20249#bib.bib12),[37](https://arxiv.org/html/2605.20249#bib.bib36)\]\. However, these approaches perform well only on synthetic benchmarks with explicit underlying structures, which rarely hold in practice\. Another family of methods employs trust regions to effectively search high\-dimensional spaces\[[50](https://arxiv.org/html/2605.20249#bib.bib50),[12](https://arxiv.org/html/2605.20249#bib.bib11)\]\. While locality achieves promising results across diverse tasks\[[29](https://arxiv.org/html/2605.20249#bib.bib30),[13](https://arxiv.org/html/2605.20249#bib.bib13),[30](https://arxiv.org/html/2605.20249#bib.bib31)\], it requires a large number of evaluations and may struggle to escape local optima\.

Recently,Hvarfneret al\.\[[18](https://arxiv.org/html/2605.20249#bib.bib18)\]andXuet al\.\[[55](https://arxiv.org/html/2605.20249#bib.bib53)\]showed that even with basic kernels, such as RBF or Matérn52 kernels, we can match or exceed specialized methods in high\-dimensional BO by proper scaling of the lengthscale prior with dimensionality\. Moreover,Ohet al\.\[[36](https://arxiv.org/html/2605.20249#bib.bib35)\]andDoumontet al\.\[[8](https://arxiv.org/html/2605.20249#bib.bib8)\]demonstrated that geometric input warpings \(e\.g\., hypercylinder or hypersphere\) with simple models can surpass sophisticated baselines on high\-dimensional, real\-world benchmarks\. Although these breakthroughs are promising, identifying such effective priors or transformations still requires extensive manual engineering by domain experts\. This suggests that automating kernel design with a system capable of mathematical reasoning could substantially reduce this barrier\.

This naturally prompts us to leverage Large Language Models \(LLMs,[16](https://arxiv.org/html/2605.20249#bib.bib16),[56](https://arxiv.org/html/2605.20249#bib.bib54),[6](https://arxiv.org/html/2605.20249#bib.bib6)\), which have internalized vast mathematical knowledge and can propose novel functional forms when incorporated into an evolutionary algorithm \(EA\) pipeline\[[42](https://arxiv.org/html/2605.20249#bib.bib40),[35](https://arxiv.org/html/2605.20249#bib.bib34),[1](https://arxiv.org/html/2605.20249#bib.bib1),[57](https://arxiv.org/html/2605.20249#bib.bib55),[21](https://arxiv.org/html/2605.20249#bib.bib21)\]\. However, existing LLM\-based BO methods do not directly scale to high\-dimensional problems due to two bottlenecks\. First, anexpressive bottleneck: Existing kernel search methods are limited to additive and multiplicative compositions of base kernels, thereby limiting their ability to discover novel kernels suitable for high\-dimensional BO\. Second, aninterface bottleneck: most LLM\-based BO methods require conditioning on raw observations, which becomes infeasible in high dimensions due to context\-length limits and the difficulty of extracting patterns from a long stream of numbers, as shown in[Figure˜1](https://arxiv.org/html/2605.20249#S1.F1)\.

To address these limitations, we introduceKernel Discovery, a novel framework for designing effective kernel structures for high\-dimensional BO\. First, weinitializethe population with kernels tailored for high\-dimensional BO\. At each BO iteration, wediscovernew kernels through a two\-stage approach: an LLM first proposes novel mathematical forms, and a second LLM converts the form into executable code\. Through this decomposition, we encourage LLMs to explore the broader space of valid kernels by leveraging mathematical reasoning capabilities\. We thenvalidatethe discovered kernels via agnostic execution and PSD checks, retaining only valid GP kernels\. Tochoosethe most promising kernel, we introduce LOO\-CRPS, which is less prone to in\-sample overfitting than the marginal log\-likelihood metric\. Finally, we evaluate the objective at the selected point andupdatethe dataset and population, repeating until the evaluation budget is exhausted\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x1.png)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\.We conduct experiments on five high\-dimensional BO benchmarks and achieve an average rank of1\.2 out of 17, outperforming competitive baselines\. We also conduct several ablation studies on the design choices of our framework\. Finally, we analyze the discovered kernels and uncover that unexpected kernels \(e\.g\., compositions of geometric warping or non\-stationary components\) might lead to improvements, providing insights into what makes a kernel effective in high dimensions\.

## 2Related Work

#### High\-dimensional Bayesian Optimization\.

Several approaches have been proposed to push the limit of BO in high dimensions\. One line of work exploits explicit structural assumptions, such as low\-dimensional subspaces\[[53](https://arxiv.org/html/2605.20249#bib.bib48),[33](https://arxiv.org/html/2605.20249#bib.bib32),[25](https://arxiv.org/html/2605.20249#bib.bib25),[22](https://arxiv.org/html/2605.20249#bib.bib22)\], sparsity\[[11](https://arxiv.org/html/2605.20249#bib.bib12),[37](https://arxiv.org/html/2605.20249#bib.bib36)\], variable selection\[[50](https://arxiv.org/html/2605.20249#bib.bib50),[45](https://arxiv.org/html/2605.20249#bib.bib42),[17](https://arxiv.org/html/2605.20249#bib.bib17)\], and additive decompositions\[[9](https://arxiv.org/html/2605.20249#bib.bib9),[20](https://arxiv.org/html/2605.20249#bib.bib19),[14](https://arxiv.org/html/2605.20249#bib.bib14),[28](https://arxiv.org/html/2605.20249#bib.bib28)\]\. However, such assumptions rarely hold in real\-world problems\. Another line of work employs trust regions, in which we constrain the search space to prevent the search among boundary points in high\-dimensional space\[[29](https://arxiv.org/html/2605.20249#bib.bib30),[12](https://arxiv.org/html/2605.20249#bib.bib11),[30](https://arxiv.org/html/2605.20249#bib.bib31),[7](https://arxiv.org/html/2605.20249#bib.bib7),[31](https://arxiv.org/html/2605.20249#bib.bib29),[3](https://arxiv.org/html/2605.20249#bib.bib3)\]\. While it achieves superior performance across various domains, particularly in scalable settings, it requires too large a number of evaluations and remains susceptible to being trapped in local optima\.

More recently, a series of surprising findings have challenged longstanding intuitions about high\-dimensional BO\.Hvarfneret al\.\[[18](https://arxiv.org/html/2605.20249#bib.bib18)\]andXuet al\.\[[55](https://arxiv.org/html/2605.20249#bib.bib53)\]showed that simple kernels with well\-chosen lengthscale priors can match or exceed sophisticated methods\.Papenmeieret al\.\[[38](https://arxiv.org/html/2605.20249#bib.bib37)\]also claimed that scaling the initial lengthscale and random axis\-aligned subspace perturbation sampling \(RAASP,[39](https://arxiv.org/html/2605.20249#bib.bib56)\) can mitigate the vanishing gradient issue in acquisition function optimization in high dimensions\.Doumontet al\.\[[8](https://arxiv.org/html/2605.20249#bib.bib8)\]further demonstrated that the smoothness of surrogate models is a critical factor, and that spherical input mappings with a simple linear basis suffice for competitive performance\. Together, these results reveal that the community’s prevailing assumptions about what drives high\-dimensional BO may be incomplete\. This underscores the need for a more in\-depth investigation of kernel design in high\-dimensional BO, which is precisely the gap our work aims to fill\.

#### LLMs for Black\-box Optimization\.

Recent advancements in LLMs have demonstrated strong capabilities for complex reasoning\[[16](https://arxiv.org/html/2605.20249#bib.bib16),[56](https://arxiv.org/html/2605.20249#bib.bib54),[6](https://arxiv.org/html/2605.20249#bib.bib6)\], prompting several works to integrate them into the BO pipeline\.Agliettiet al\.\[[1](https://arxiv.org/html/2605.20249#bib.bib1)\]andNgoet al\.\[[34](https://arxiv.org/html/2605.20249#bib.bib33)\]utilize LLM to discover novel acquisition functions, whileLiet al\.\[[26](https://arxiv.org/html/2605.20249#bib.bib26)\]andLiuet al\.\[[27](https://arxiv.org/html/2605.20249#bib.bib27)\]replace the entire BO loop with an LLM\-driven system\. However, these methods are primarily evaluated in low\-dimensional settings and rely on prepending prior observations as context, which becomes infeasible in high dimensions due to context\-length constraints\. Furthermore, extracting meaningful structure from dense observations can be challenging even for recent, closed\-source LLMs\.

Most closely related to our work is CAKE\[[46](https://arxiv.org/html/2605.20249#bib.bib43)\], which employs an LLM to select and combine base kernels to improve BO surrogates\. While it shares our motivation for LLM\-guided kernel design, it also relies on prior trials as context and restricts the search space to additive and multiplicative compositions of base kernels\. In contrast, our framework does not condition on raw observations and actively explores a broader space of valid kernels beyond compositions, thereby enabling more expressive surrogate modeling for high\-dimensional problems\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x2.png)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\.

## 3Preliminaries

#### Bayesian Optimization\.

In BO, we aim to find an input𝐱∈𝒳\\mathbf\{x\}\\in\\mathcal\{X\}that maximizes the unknown black\-box functionf:𝒳→ℝf:\\mathcal\{X\}\\rightarrow\\mathbb\{R\}, which is typically expensive to evaluate and not differentiable\. BO can be modularized into three orthogonal components: a surrogate model, an acquisition function, and an optimizer for the acquisition function\[[48](https://arxiv.org/html/2605.20249#bib.bib45)\]\. At each iteration, we fit the surrogate model to the observations so far and select the next query that maximizes the chosen acquisition function using the optimizer\. While there are several possible options for each component, the conventional approach is to use a Gaussian Process \(GP,[40](https://arxiv.org/html/2605.20249#bib.bib57)\) as a surrogate model, Expected Improvement \(EI,[32](https://arxiv.org/html/2605.20249#bib.bib58)\) as an acquisition function, andL\-BFGS\-B\[[5](https://arxiv.org/html/2605.20249#bib.bib5)\]as an optimizer\.

#### Gaussian Processes and Kernels\.

A GP defines a distribution over functions and is specified by a mean function \(constant in most cases\) and a covariance matrix𝐊\\mathbf\{K\}\. The covariance matrix can be derived by using a kernel functionk​\(𝐱,𝐱′\):𝒳×𝒳→ℝk\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\):\\mathcal\{X\}\\times\\mathcal\{X\}\\rightarrow\\mathbb\{R\}\. The most frequently used kernel for BO is the RBF kernel\[[54](https://arxiv.org/html/2605.20249#bib.bib52)\], which can be defined as follows:

kRBF​\(𝐱,𝐱′\):=σ2​exp⁡\(−12​\(𝐱−𝐱′\)⊤​𝐋−1​\(𝐱−𝐱′\)\)k\_\{\\text\{RBF\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\):=\\sigma^\{2\}\\exp\\left\(\-\\frac\{1\}\{2\}\(\\mathbf\{x\}\-\\mathbf\{x\}^\{\\prime\}\)^\{\\top\}\\mathbf\{L\}^\{\-1\}\(\\mathbf\{x\}\-\\mathbf\{x\}^\{\\prime\}\)\\right\)\(1\)whereσ2\>0\\sigma^\{2\}\>0is the output scale and𝐋=diag​\(ℓ12,…,ℓd2\)\\mathbf\{L\}=\\text\{diag\}\(\\ell\_\{1\}^\{2\},\\ldots,\\ell\_\{d\}^\{2\}\)is a diagonal matrix of per\-dimension lengthscale hyperparametersℓi\>0\\ell\_\{i\}\>0\.

Kernels can be combined or constructed in several ways\. First, the sum and product of two valid kernels are also valid kernels, enabling the construction of richer covariance structures\. Second, for any feature mapϕ:𝒳→ℝm\\phi:\\mathcal\{X\}\\rightarrow\\mathbb\{R\}^\{m\}, the inner productk​\(𝐱,𝐱′\)=ϕ​\(𝐱\)⊤​ϕ​\(𝐱′\)k\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\phi\(\\mathbf\{x\}\)^\{\\top\}\\phi\(\\mathbf\{x\}^\{\\prime\}\)defines a positive semi\-definite kernel by construction\. By injecting these compositional and feature\-map properties as inductive biases into an LLM\-driven kernel construction process, we can discover novel kernel structures tailored for high\-dimensional BO\.

## 4Methods

In this section, we introduceKernel Discovery, a novel framework for discovering effective kernels for high\-dimensional BO by leveraging LLMs as an evolutionary operator\. We first initialize the population with well\-known base kernels tailored for high dimensions\. Then, we guide the LLM to generate novel kernel structures as mathematical forms and convert them into executable Python code\. We conduct a sanity check to determine whether the generated kernel is valid\. We also introduce a new selection criterion to choose the most promising kernel for acquisition function optimization\. We repeat the process until convergence\. We summarize the overview of our framework in[Figure˜2](https://arxiv.org/html/2605.20249#S2.F2)\.

Notations\.We represent each kernelk=\(m,c\)k=\(m,c\), wheremmis its mathematical expression andccis the corresponding code\. Let𝒫t=\{k1\(t\),…,kN\(t\)\}\\mathcal\{P\}\_\{t\}=\\\{k\_\{1\}^\{\(t\)\},\\ldots,k\_\{N\}^\{\(t\)\}\\\}denote the population of sizeNNat iterationtt\. We denote byℳ​\(⋅;ρ\)\\mathcal\{M\}\(\\cdot\\,;\\,\\rho\)a call to the LLM conditioned on a role\-specific promptρ\\rho\. We also introduce an auxiliary verifier𝒱\\mathcal\{V\}to check whether the discovered kernel is valid\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x3.png)Figure 3:Prompts for Kernel Discovery\. To discover novel kernels for high\-dimensional BO, we start with a prompt that simulates the reasoning of a human expert\. Then, we instruct the LLM to understand prior strategies for high\-dimensional BO and the constraints it should satisfy\.Initialize Population\.Similar to several approaches that integrate LLMs into the evolutionary loop\[[35](https://arxiv.org/html/2605.20249#bib.bib34)\], we initialize the base population with existing kernels that are widely used for BO\. As our focus is on high\-dimensional BO, we need to carefully select base kernels that will encourage LLMs to extract useful knowledge from them and give insights into how to propose better kernels\. To this end, we set the initial population as follows:

𝒫0=\{kRBF,kMatérn52,kRQ,kBOCK,kSL\},\\mathcal\{P\}\_\{0\}=\\\{k\_\{\\text\{RBF\}\},\\,k\_\{\\text\{Matérn52\}\},\\,k\_\{\\text\{RQ\}\},\\,k\_\{\\text\{BOCK\}\},\\,k\_\{\\text\{SL\}\}\\\},\(2\)For the RBF, Matérn52, and RQ, we use the lengthscale priorℓi∼ℒ​𝒩​\(2\+log⁡\(D\),3\)\\ell\_\{i\}\\sim\\mathcal\{LN\}\(\\sqrt\{2\}\+\\log\(\\sqrt\{D\}\),\\sqrt\{3\}\), proposed byHvarfneret al\.\[[18](https://arxiv.org/html/2605.20249#bib.bib18)\]\. BOCK\[[36](https://arxiv.org/html/2605.20249#bib.bib35)\]and SL\[[8](https://arxiv.org/html/2605.20249#bib.bib8)\]propose geometric mappings to avoid overexploration\. We do not include Linear and Periodic as they perform poorly in high dimensions\.

Discover Kernels with LLMs\.Starting from the initial population𝒫0\\mathcal\{P\}\_\{0\}, we leverage LLMs to propose new kernel structures\. Specifically, our discovery pipeline consists of two stages: mathematical formulation and code generation\.

While one can directly prompt an LLM to generate novel kernels in the code generation space, this is undesirable, as LLMs often produce functionally redundant kernel codes \(e\.g\., by renaming variables or substitutingx\-ywithx\.sub\(y\)\) rather than genuinely novel structures\. To mitigate this, we first express the existing kernels in mathematical form\{mi\(t\)\}i=1N\\\{m\_\{i\}^\{\(t\)\}\\\}\_\{i=1\}^\{N\}and prompt the LLM to generate new mathematical forms that satisfy the constraints and are suitable for high\-dimensional BO:

mnew∼ℳ​\(\{mi\(t\)\}i=1N;ρdisc\)m\_\{\\text\{new\}\}\\sim\\mathcal\{M\}\\\!\\left\(\\\{m\_\{i\}^\{\(t\)\}\\\}\_\{i=1\}^\{N\};\\,\\rho\_\{\\text\{disc\}\}\\right\)\(3\)whereρdisc\\rho\_\{\\text\{disc\}\}is a prompt for discovery stage as depicted in[Figure˜3](https://arxiv.org/html/2605.20249#S4.F3)\. After discovering a new mathematical form, we introduce another LLM to convert the formulation into executable code:

cnew∼ℳ​\(mnew;ρconv\)c\_\{\\text\{new\}\}\\sim\\mathcal\{M\}\(m\_\{\\text\{new\}\};\\,\\rho\_\{\\text\{conv\}\}\)\(4\)whereρconv\\rho\_\{\\text\{conv\}\}is a prompt for conversion stage as depicted inLABEL:fig:prompt\_conv\. Rather than conditioning on raw observations, we provide only the mathematical forms from previous iterations as context\. This dramatically reduces the context length, allowing the LLM to focus on structural novelty rather than sifting through high\-dimensional numerical data for patterns\.

Following prior works, we find that composing kernels is the simplest way to discover new valid kernels\. We therefore add a composition stage in which the LLM takes the top\-kkkernels as input and combines them via addition or multiplication\. You can find the prompt for composition inLABEL:fig:prompt\_comp\.

Validate Discovered Kernels\.Given a new candidateknew=\(mnew,cnew\)k\_\{\\text\{new\}\}=\(m\_\{\\text\{new\}\},c\_\{\\text\{new\}\}\), we filter it with two empirical checks: that the code runs correctly across varying input shapes \(𝒱agn\\mathcal\{V\}\_\{\\text\{agn\}\}\) and that the Cholesky decomposition succeeds on random test inputs \(𝒱psd\\mathcal\{V\}\_\{\\text\{psd\}\}\)\. Formally:

𝒱​\(knew\)=𝒱agn​\(knew\)∧𝒱psd​\(knew\)\\mathcal\{V\}\(k\_\{\\text\{new\}\}\)=\\mathcal\{V\}\_\{\\text\{agn\}\}\(k\_\{\\text\{new\}\}\)\\wedge\\mathcal\{V\}\_\{\\text\{psd\}\}\(k\_\{\\text\{new\}\}\)\(5\)where𝒱agn\\mathcal\{V\}\_\{\\text\{agn\}\}tests theforwardfunction on inputs of varying batch size and dimensionality, and𝒱psd\\mathcal\{V\}\_\{\\text\{psd\}\}checks for a successful Cholesky decomposition\. Only candidates with𝒱​\(knew\)=1\\mathcal\{V\}\(k\_\{\\text\{new\}\}\)=1are added to the current population pool𝒫t\\mathcal\{P\}\_\{t\}\.

𝒫t←𝒫t∪\{knew:𝒱​\(knew\)=1\}\\mathcal\{P\}\_\{t\}\\leftarrow\\mathcal\{P\}\_\{t\}\\cup\\\{k^\{\\text\{new\}\}:\\mathcal\{V\}\(k^\{\\text\{new\}\}\)=1\\\}\(6\)
Choose the Promising Kernel\.After generating new kernels, we need to select which kernelk∈𝒫tk\\in\\mathcal\{P\}\_\{t\}should be used for the acquisition function maximization\. While the marginal log\-likelihood \(MLL\) is a straightforward approach, it may prefer overly complex kernels that overfit the current observations and sacrifice predictive calibration\. To this end, we introduce the Leave\-one\-out Continuous Ranked Probability Score \(LOO\-CRPS\), a selection criterion that scores held\-out predictive distributions and thereby penalizes overconfident fits more directly than MLL, defined as follows:

CRPS​\(𝒩​\(μ,σ2\),y\)=σ​\[y−μσ​\(2​Φ​\(y−μσ\)−1\)\+2​ϕ​\(y−μσ\)−1π\]\\text\{CRPS\}\\\!\\left\(\\mathcal\{N\}\(\\mu,\\sigma^\{2\}\),\\,y\\right\)=\\sigma\\left\[\\frac\{y\-\\mu\}\{\\sigma\}\\left\(2\\Phi\\\!\\left\(\\frac\{y\-\\mu\}\{\\sigma\}\\right\)\-1\\right\)\+2\\,\\phi\\\!\\left\(\\frac\{y\-\\mu\}\{\\sigma\}\\right\)\-\\frac\{1\}\{\\sqrt\{\\pi\}\}\\right\]\(7\)whereϕ\\phiandΦ\\Phiare the standard normal PDF and CDF, respectively\. While CRPS is more robust than MLL, it can still overfit when evaluated on training data\. To alleviate this, we aggregate CRPS over leave\-one\-out predictives across allnnobservations:

LOO\-CRPS​\(𝐊k,𝐲\)=1n​∑i=1nCRPS​\(𝒩​\(μ−i,σ−i2\),yi\),μ−i=yi−\[𝐊k−1​𝐲\]i\[𝐊k−1\]i​i,σ−i2=1\[𝐊k−1\]i​i\\displaystyle\\text\{LOO\-CRPS\}\(\\mathbf\{K\}\_\{k\},\\mathbf\{y\}\)=\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\text\{CRPS\}\\\!\\left\(\\mathcal\{N\}\(\\mu\_\{\-i\},\\,\\sigma^\{2\}\_\{\-i\}\),\\,y\_\{i\}\\right\),\\quad\\mu\_\{\-i\}=y\_\{i\}\-\\frac\{\[\\mathbf\{K\}\_\{k\}^\{\-1\}\\mathbf\{y\}\]\_\{i\}\}\{\[\\mathbf\{K\}\_\{k\}^\{\-1\}\]\_\{ii\}\},\\\>\\sigma^\{2\}\_\{\-i\}=\\frac\{1\}\{\[\\mathbf\{K\}\_\{k\}^\{\-1\}\]\_\{ii\}\}\(8\)where𝐊k\\mathbf\{K\}\_\{k\}is a kernel matrix derived from the kernelkk\. By leveraging the standard LOO identity for GP, the predictive meanμ−i\\mu\_\{\-i\}and varianceσ−i2\\sigma^\{2\}\_\{\-i\}can be computed analytically from a single matrix inversion\. At each round, we select

kt⋆=arg⁡mink∈𝒫t⁡LOO\-CRPS​\(𝐊k,𝐲\)k^\{\\star\}\_\{t\}=\\arg\\min\_\{k\\in\\mathcal\{P\}\_\{t\}\}\\text\{LOO\-CRPS\}\(\\mathbf\{K\}\_\{k\},\\mathbf\{y\}\)\(9\)Finally, we use the selected kernelkt⋆k^\{\\star\}\_\{t\}and fit its hyperparameters \(e\.g\., lengthscale, scale, variance\), maximize the acquisition functionα​\(𝐱;GPkt⋆\)\\alpha\(\\mathbf\{x\};\\,\\text\{GP\}\_\{k^\{\\star\}\_\{t\}\}\)to obtain the next query point𝐱t\+1\\mathbf\{x\}\_\{t\+1\}, evaluate the corresponding objectiveyt\+1=f​\(𝐱t\+1\)y\_\{t\+1\}=f\(\\mathbf\{x\}\_\{t\+1\}\), and augment the dataset𝒟t\+1←𝒟t∪\{\(𝐱t\+1,yt\+1\)\}\\mathcal\{D\}\_\{t\+1\}\\leftarrow\\mathcal\{D\}\_\{t\}\\cup\\\{\(\\mathbf\{x\}\_\{t\+1\},y\_\{t\+1\}\)\\\}\.

Update the Population\.To maintain a fixed population sizeNNacross rounds, we then truncate𝒫t\+1\\mathcal\{P\}\_\{t\+1\}by retaining theNNmembers with the lowest LOO\-CRPS:

𝒫t\+1←Top​\-​N⁡\(𝒫t;LOO\-CRPS\)\.\\mathcal\{P\}\_\{t\+1\}\\leftarrow\\operatorname\{Top\\text\{\-\}N\}\\\!\\left\(\\mathcal\{P\}\_\{t\};\\,\\text\{LOO\-CRPS\}\\right\)\.\(10\)This elitist update ensures that the population progressively favors kernels with more calibrated predictives while preventing unbounded growth\. We additionally discard kernels that fail to improve performance over consecutive rounds\. We provide full details of the algorithm in[Algorithm˜1](https://arxiv.org/html/2605.20249#alg1)\.

Table 1:Performance comparison of various methods across standard benchmarks\.DDdenotes the dimensionality of the task\.Bluedenotes the best entry in the column, andVioletdenotes the second best\. Experiments are conducted with 4 random seeds\.MethodRover\(↑\)\(\\uparrow\)Mopta08\(↓\)\(\\downarrow\)Lasso\-DNA\(↓\)\(\\downarrow\)SVM\(↓\)\(\\downarrow\)Humanoid\(↑\)\(\\uparrow\)Average\(D=100D=100\)\(D=124D=124\)\(D=180D=180\)\(D=388D=388\)\(D=6392D=6392\)RankBase KernelsRBF3\.552±\\pm0\.304217\.75±\\pm2\.330\.291±\\pm0\.0010\.061±\\pm0\.004503\.00±\\pm67\.826\.6 / 17Matérn523\.453±\\pm0\.366215\.77±\\pm0\.570\.292±\\pm0\.0030\.063±\\pm0\.003509\.79±\\pm102\.326\.8 / 17Linear3\.950±\\pm0\.441274\.67±\\pm8\.870\.312±\\pm0\.0040\.226±\\pm0\.003435\.49±\\pm42\.0013\.0 / 17Periodic3\.664±\\pm0\.231309\.10±\\pm5\.010\.332±\\pm0\.0050\.226±\\pm0\.002413\.83±\\pm71\.3015\.0 / 17BOCK3\.725±\\pm0\.593225\.36±\\pm1\.820\.291±\\pm0\.0030\.068±\\pm0\.007669\.52±\\pm50\.156\.1 / 17SL4\.096±\\pm0\.473246\.78±\\pm3\.920\.297±\\pm0\.0010\.112±\\pm0\.007637\.72±\\pm37\.868\.2 / 17RQ3\.858±\\pm0\.515217\.53±\\pm4\.250\.294±\\pm0\.0020\.069±\\pm0\.017600\.80±\\pm152\.496\.6 / 17Search\-basedGreedy Search3\.606±\\pm0\.270225\.36±\\pm1\.820\.291±\\pm0\.0030\.066±\\pm0\.004687\.12±\\pm119\.526\.1 / 17Compositional Search3\.869±\\pm0\.531218\.76±\\pm1\.170\.288±\\pm0\.0030\.067±\\pm0\.007700\.58±\\pm81\.554\.4 / 17CAKE3\.412±\\pm0\.586231\.40±\\pm15\.670\.300±\\pm0\.0110\.131±\\pm0\.036667\.49±\\pm24\.999\.8 / 17LLM\-basedARM3\.981±\\pm0\.378238\.17±\\pm3\.650\.319±\\pm0\.0030\.228±\\pm0\.003457\.14±\\pm44\.9612\.0 / 17ATRBO3\.054±\\pm0\.816267\.65±\\pm4\.630\.328±\\pm0\.0100\.221±\\pm0\.016428\.80±\\pm295\.3715\.2 / 17TREvol3\.398±\\pm0\.620236\.41±\\pm3\.960\.301±\\pm0\.0070\.079±\\pm0\.007469\.39±\\pm144\.4311\.6 / 17TROpt4\.114±\\pm0\.409234\.23±\\pm1\.860\.300±\\pm0\.0060\.110±\\pm0\.005520\.38±\\pm65\.427\.8 / 17TRPareto3\.872±\\pm0\.467253\.45±\\pm4\.730\.296±\\pm0\.0010\.185±\\pm0\.008509\.90±\\pm114\.0610\.0 / 17LMABO3\.953±\\pm0\.369240\.70±\\pm5\.240\.304±\\pm0\.0060\.226±\\pm0\.001390\.23±\\pm44\.7812\.6 / 17Kernel Discovery \(Ours\)4\.353±\\pm0\.319216\.81±\\pm0\.870\.286±\\pm0\.0010\.056±\\pm0\.003762\.78±\\pm72\.391\.2 / 17

## 5Experiments

We evaluate our framework on five high\-dimensional BO benchmarks and compare against 16 baselines, including base kernels, search\-based methods, and LLM\-based methods\. Our code is[here](https://github.com/Shin-woocheol/Kernel_discovery)\.

Benchmarks\.Following prior works on high\-dimensional BO\[[18](https://arxiv.org/html/2605.20249#bib.bib18),[8](https://arxiv.org/html/2605.20249#bib.bib8)\], we evaluate our framework on five standard benchmarks with dimensionality ranging fromD=100D=100toD=6392D=6392: \(i\)Rover\(D=100D=100,[52](https://arxiv.org/html/2605.20249#bib.bib49)\), \(ii\)Mopta08\(D=124D=124,[11](https://arxiv.org/html/2605.20249#bib.bib12)\), \(iii\)Lasso\-DNA\(D=180D=180,[43](https://arxiv.org/html/2605.20249#bib.bib47)\), \(iv\)SVM\(D=388D=388,[11](https://arxiv.org/html/2605.20249#bib.bib12)\), \(v\)Humanoid\(D=6392D=6392,[50](https://arxiv.org/html/2605.20249#bib.bib50)\)\. We excludeAntsince the function can be easily exploited by random initialization\. Please refer to[Appendix˜A](https://arxiv.org/html/2605.20249#A1)for the detailed description of each task\.

Baselines\.We compare against 16 baselines across three categories: \(1\) BO methods that rely on a single fixed kernel, \(2\) search\-based kernel methods, and \(3\) LLM\-based BO methods\. Please refer to[Appendix˜B](https://arxiv.org/html/2605.20249#A2)for the detailed description of each baseline\.

- •Base kernels: BO methods that rely on a single kernel: RBF, Matérn52, Linear, Periodic, RQ, BOCK, and SL\.
- •Search\-based Methods: Methods that search over kernel candidates, including Greedy Search\[[41](https://arxiv.org/html/2605.20249#bib.bib39)\], Compositional Search\[[10](https://arxiv.org/html/2605.20249#bib.bib10)\], and CAKE\[[46](https://arxiv.org/html/2605.20249#bib.bib43)\]\. For a fair comparison, all search\-based methods share the same initial population𝒫0\\mathcal\{P\}\_\{0\}defined in[Equation˜2](https://arxiv.org/html/2605.20249#S4.E2)\.
- •LLM\-based Methods: LLM\-based BO methods, including end\-to\-end approaches \(ARM, ATRBO, TREvol, TROpt, and TRPareto\) from the LLAMEA\-BO\[[26](https://arxiv.org/html/2605.20249#bib.bib26)\], and LMABO\[[34](https://arxiv.org/html/2605.20249#bib.bib33)\], which adaptively selects the acquisition function\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x4.png)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](https://arxiv.org/html/2605.20249#A5.F11)for the full results\.Implementation\.For all methods \(except for LLM\-based approaches that change other parts of the BO pipeline\), we useLogEI\[[2](https://arxiv.org/html/2605.20249#bib.bib2)\]as an acquisition function andL\-BFGS\-Bas an optimizer\. We use the Sobol sequence\[[44](https://arxiv.org/html/2605.20249#bib.bib41)\]to generate initial samples with size\|𝒟0\|=20\|\\mathcal\{D\}\_\{0\}\|=20, use a batch size ofq=20q=20, and set the evaluation budgetT=1000T=1000\. For our method, we set the population size toN=10N=10, generate two new kernel candidates \(one from the discovery stage and one from the composition stage\) per BO iteration\. For a fair comparison, we useGPT\-4oas the LLM backbone for both our method and all LLM\-based baselines\. Please refer to[Appendix˜C](https://arxiv.org/html/2605.20249#A3)for more details on implementation\.

Main Results\.We summarize the results of all methods in[Table˜1](https://arxiv.org/html/2605.20249#S4.T1)\. As shown in the table, Kernel Discovery achieves an average rank of1\.2across benchmarks, the best among all17methods\. The runner\-up is Compositional Search \(rank4\.44\.4\), confirming that actively searching over kernel candidates is beneficial\. However, due to the restricted search space, it is insufficient to discover effective kernels in high dimensions\. Notably, CAKE \(rank9\.89\.8\) performs substantially worse than competitive base kernels, indicating that injecting observations as context for the LLM is ineffective and degrades performance in high dimensions\. Similarly, other LLM\-based baselines underperform, indicating that leveraging LLMs to discover kernels within the BO pipeline is more effective than leveraging the LLM itself as a black\-box optimizer\.

We visualize the learning curve of kernel discovery against several baselines in[Figure˜4](https://arxiv.org/html/2605.20249#S5.F4)\. Our approach consistently improves throughout training by discovering novel kernel functions at each BO iteration\. Compositional Search and BOCK sometimes perform well in early rounds but stagnate in suboptimal regions\. Our method avoids this by continually evolving the kernel population\. We also conduct a runtime analysis of our method and the baselines in[Appendix˜F](https://arxiv.org/html/2605.20249#A6)\.

## 6Ablation Studies

We discuss the key design choices in our pipeline, justifying the need for the two\-stage approach and analyzing the importance of each component\.

Importance of Two\-Stage Approach\.We observed that when we directly instruct an LLM to generate code for novel kernel structures, it sometimes changes the variable names and replaces operators with equivalent operators, as shown in[Figure˜5\(a\)](https://arxiv.org/html/2605.20249#S6.F5.sf1)\. We further demonstrate this phenomenon by measuring the functional diversity between generated kernels from direct code generation and those from our two\-stage approach\. As depicted in[Figure˜5\(b\)](https://arxiv.org/html/2605.20249#S6.F5.sf2), our approach consistently produces more genuinely diverse kernel candidates\. We also found that this functional diversity translates to consistently better performance \(See[Table˜8](https://arxiv.org/html/2605.20249#A7.T8)\), confirming that the two\-stage approach discovers genuinely novel and effective kernel structures\. Further details on the definition of the diversity metric, performance comparison, and functionally redundant code examples are provided in[Appendix˜G](https://arxiv.org/html/2605.20249#A7)\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x5.png)\(a\)Example code snippets from direct code generation\. Both snippets result in the same function\.
![Refer to caption](https://arxiv.org/html/2605.20249v1/x6.png)\(b\)Cosine distance among kernels from direct code generation vs two\-stage approach\.

Figure 5:Ablation studies on the two\-stage approach for kernel discovery\.![Refer to caption](https://arxiv.org/html/2605.20249v1/x7.png)
Figure 6:Ablation on each component of Kernel Discovery\.Table 2:Analysis on prompt template\. Experiments are conducted with four random seeds in the SVM benchmark\.Table 3:Robustness on different LLMs\. Experiments are conducted with four random seeds in the SVM benchmark\.

Ablation on Each Component\.We conduct a systematic ablation study by removing each component\. For the initial population, we replace BOCK and SL with Linear and Periodic kernels, matching the base kernel set used in CAKE\. For the evaluation metric, we replace LOO\-CRPS with the standard marginal log\-likelihood \(MLL\)\. As shown in[Figure˜6](https://arxiv.org/html/2605.20249#S6.F6), performance consistently drops as each component is removed\. In particular, the initial population significantly affects sample efficiency, validating that kernels specifically designed for high\-dimensional BO encode inductive biases that are valuable for effective surrogate modeling\. We extend this ablation with more variants in[Appendix˜H](https://arxiv.org/html/2605.20249#A8)\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x8.png)\(a\)Summary of selected kernels for the top\-5 performance improvements\.
![Refer to caption](https://arxiv.org/html/2605.20249v1/x9.png)\(b\)Evaluation of discovered kernel from SVM benchmark directly without kernel search\.

Figure 7:Post\-analysis on kernel discovery\. Both experiments are conducted in SVM benchmark\.Analysis on Prompt Template\.As shown in[Figure˜3](https://arxiv.org/html/2605.20249#S4.F3), our prompt includes two key guidelines for the LLM: HDBO and Constraint guidelines\. We ablate each by removing it in turn\. As shown in[Table˜2](https://arxiv.org/html/2605.20249#S6.T2), removing the HDBO guideline degrades performance, whereas removing the Constraint guideline leads to a high failure rate\.

Robustness to Different LLMs\.By default, we useGPT\-4ofor kernel formulation and code generation\. To assess robustness across different LLMs, we run experiments with different LLMs:GPT\-4o\-miniandGPT\-5\-mini\. As shown in[Table˜3](https://arxiv.org/html/2605.20249#S6.T3), we find no significant performance gap across models, thoughGPT\-4o\-minihas a slightly higher kernel rejection rate due to weaker code reasoning, whileGPT\-5\-minigenerates fewer invalid kernels\. We also conduct ablation studies with open\-source LLMs and different LLM backbones for other LLM\-based methods in[Appendix˜I](https://arxiv.org/html/2605.20249#A9)\.

## 7Analysis of Discovered Kernels

In this section, we characterize which kernels our pipeline discovers, how they evolve over training iterations, and whether they transfer across benchmarks\.

Evolution of Discovered Kernels\.A key question is whether our pipeline discovers genuinely novel structures or merely recovers known base kernels\. To investigate this, we conduct a systematic study of the kernels selected by our pipeline over training iterations in[Figure˜7\(a\)](https://arxiv.org/html/2605.20249#S6.F7.sf1)\. In the initial rounds, the pipeline favors simple base kernels with geometric input warpings \(e\.g\., Spherical\)\. As optimization progresses, more advanced structures emerge: the pipeline introduces geometric transformations such asarctanwarping and composes them with existing kernels \(e\.g\., RQ×\\timesLinear witharctan, further combined with BOCK or IMQ\)\. This suggests that compositions of multiple geometrically\-warped kernels are a promising direction for high\-dimensional BO, going beyond the single\-warping strategies explored by prior works\. We provide detailed explanations of the discovered kernels, along with the same evolution analysis across all benchmarks, in[Appendix˜J](https://arxiv.org/html/2605.20249#A10)\.

Transferability of Discovered Kernels\. While our method performs kernel discovery for a single black\-box function, we can extract kernels discovered by one benchmark and determine whether they can be transferred to other benchmarks\. To verify this, we choose one kernel discovered from the SVM benchmark as follows:

kdiscover​\(𝐱,𝐱′\)=kMatérn52​\(𝐱,𝐱′\)⋅\[ktanh​\-​Poly​\(𝐱,𝐱′\)\+kRQ​\(𝐱,𝐱′\)\]k\_\{\\text\{discover\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\cdot\\left\[k\_\{\\mathrm\{tanh\\text\{\-\}Poly\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\right\]\(11\)Note that this kernel cannot be obtained via naive compositions sincekpolyk\_\{\\text\{poly\}\}does not exist in the base population and thetanh​\(⋅\)\\texttt\{tanh\}\(\\cdot\)operation is not allowed\. As shown in[Figure˜7\(b\)](https://arxiv.org/html/2605.20249#S6.F7.sf2), the discovered kernel outperforms base kernels on the SVM benchmark, and achieves an average rank of 2\.8 across 8 fixed\-kernel methods \(full results in[Table˜12](https://arxiv.org/html/2605.20249#A11.T12)\)\. To understand why the discovered kernel achieves superior performance on the SVM benchmark, we analyze the boundary hit ratio and the observation traveling salesman distance \(OTSD\) and find that the discovered kernel does not exhibit boundary\-seeking behavior \(See[Figure˜24](https://arxiv.org/html/2605.20249#A11.F24)\)\. It is noteworthy thatktanh\-Polyk\_\{\\text\{tanh\\text\{\-\}Poly\}\}is a non\-stationary kernel that is not typically preferred for BO, yet it performs well in high dimensions\. This suggests that the role of non\-stationary kernels in high\-dimensional BO warrants further investigation\. We provide detailed explanations of the discovered kernel and also present other frequently discovered kernels in[Appendix˜K](https://arxiv.org/html/2605.20249#A11)\.

## 8Conclusion

We presented Kernel Discovery, an LLM\-driven evolutionary framework for designing effective GP kernels in high\-dimensional BO\. We adopt a two\-stage pipeline in which one LLM proposes novel mathematical kernel forms and the other LLM converts them into executable code\. To select among discovered kernels without overfitting to current observations, we introduce LOO\-CRPS, an overfit\-resistant criterion\. On five high\-dimensional BO benchmarks, our method achieves an average rank of 1\.2 out of 17 methods\. Beyond performance, our analysis of the discovered kernels provides new insights into what drives effective surrogate modeling in high\-dimensional BO\.

Limitations and Future Work\.Our current framework runs the discovery process independently for each benchmark, optimizing kernels for each benchmark\. While we demonstrate that kernels discovered on one benchmark can transfer to others, a natural extension is to develop a general discovery strategy that operates across multiple benchmarks simultaneously, leveraging shared structure to amortize the search cost\. Additionally, some kernels generated by LLMs do not pass the verifiers for positive semi\-definiteness or dimension\-agnosticity\. We believe that the failure rate could be further reduced by detailed prompt engineering or by imposing constraints during generation, although we view these as engineering directions orthogonal to our main contribution, which is to demonstrate that LLM\-driven kernel discovery is a promising strategy for high\-dimensional BO\.

## References

- \[1\]\(2025\)FunBO: discovering acquisition functions for bayesian optimization with funsearch\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1)\.
- \[2\]S\. Ament, S\. Daulton, D\. Eriksson, M\. Balandat, and E\. Bakshy\(2023\)Unexpected improvements to expected improvement for bayesian optimization\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§5](https://arxiv.org/html/2605.20249#S5.p4.4)\.
- \[3\]P\. Ascia, E\. Raponi, T\. Bäck, and F\. Duddeck\(2025\)Feasibility\-driven trust region bayesian optimization\.InInternational Conference on Automated Machine Learning \(AutoML\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[4\]F\. Berkenkamp, A\. Krause, and A\. P\. Schoellig\(2023\)Bayesian optimization with safety constraints: safe and automatic parameter tuning in robotics\.Machine Learning\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[5\]R\. H\. Byrd, P\. Lu, J\. Nocedal, and C\. Zhu\(1995\)A limited memory algorithm for bound constrained optimization\.SIAM Journal on Scientific Computing\.Cited by:[§3](https://arxiv.org/html/2605.20249#S3.SS0.SSS0.Px1.p1.2)\.
- \[6\]G\. Comanici, E\. Bieber, M\. Schaekermann, I\. Pasupat, N\. Sachdeva, I\. Dhillon, M\. Blistein, O\. Ram, D\. Zhang, E\. Rosen,et al\.\(2025\)Gemini 2\.5: pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities\.arXiv preprint arXiv:2507\.06261\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1)\.
- \[7\]S\. Daulton, D\. Eriksson, M\. Balandat, and E\. Bakshy\(2022\)Multi\-objective bayesian optimization over high\-dimensional search spaces\.InConference on Uncertainty in Artificial Intelligence \(UAI\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[8\]C\. Doumont, D\. Fan, N\. Maus, J\. R\. Gardner, H\. Moss, and G\. Pleiss\(2026\)We still don’t understand high\-dimensional bayesian optimization\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[7th item](https://arxiv.org/html/2605.20249#A2.I1.i7.p1.2),[§1](https://arxiv.org/html/2605.20249#S1.p3.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p2.1),[§4](https://arxiv.org/html/2605.20249#S4.p3.1),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[9\]D\. K\. Duvenaud, H\. Nickisch, and C\. Rasmussen\(2011\)Additive gaussian processes\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[10\]D\. Duvenaud, J\. Lloyd, R\. Grosse, J\. Tenenbaum, and G\. Zoubin\(2013\)Structure discovery in nonparametric regression through compositional kernel search\.InInternational Conference on Machine Learning \(ICML\),Cited by:[2nd item](https://arxiv.org/html/2605.20249#S5.I1.i2.p1.1)\.
- \[11\]D\. Eriksson and M\. Jankowiak\(2021\)High\-dimensional bayesian optimization with sparse axis\-aligned subspaces\.InConference on Uncertainty in Artificial Intelligence \(UAI\),Cited by:[Appendix A](https://arxiv.org/html/2605.20249#A1.SS0.SSS0.Px2.p1.1),[Appendix A](https://arxiv.org/html/2605.20249#A1.SS0.SSS0.Px4.p1.1),[Appendix B](https://arxiv.org/html/2605.20249#A2.SSx3.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[12\]D\. Eriksson, M\. Pearce, J\. Gardner, R\. D\. Turner, and M\. Poloczek\(2019\)Scalable global optimization via local bayesian optimization\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[Appendix B](https://arxiv.org/html/2605.20249#A2.SSx3.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[13\]D\. Eriksson and M\. Poloczek\(2021\)Scalable constrained bayesian optimization\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1)\.
- \[14\]J\. Gardner, C\. Guo, K\. Weinberger, R\. Garnett, and R\. Grosse\(2017\)Discovering and exploiting additive structure for bayesian optimization\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[15\]R\. Garnett\(2023\)Bayesian optimization\.Cambridge University Press\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[16\]A\. Grattafiori, A\. Dubey, A\. Jauhri, A\. Pandey, A\. Kadian, A\. Al\-Dahle, A\. Letman, A\. Mathur, A\. Schelten, A\. Vaughan,et al\.\(2024\)The llama 3 herd of models\.arXiv preprint arXiv:2407\.21783\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1)\.
- \[17\]E\. O\. Hellsten, C\. Hvarfner, L\. Papenmeier, and L\. Nardi\(2023\)High\-dimensional bayesian optimization with group testing\.arXiv preprint arXiv:2310\.03515\.Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[18\]C\. Hvarfner, E\. O\. Hellsten, and L\. Nardi\(2024\)Vanilla bayesian optimization performs great in high dimensions\.InInternational Conference on Machine Learning \(ICML\),Cited by:[2nd item](https://arxiv.org/html/2605.20249#A2.I3.i2.p1.1),[Appendix B](https://arxiv.org/html/2605.20249#A2.SSx1.p1.2),[§1](https://arxiv.org/html/2605.20249#S1.p3.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p2.1),[§4](https://arxiv.org/html/2605.20249#S4.p3.1),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[19\]K\. Kandasamy, W\. Neiswanger, J\. Schneider, B\. Poczos, and E\. P\. Xing\(2018\)Neural architecture search with bayesian optimisation and optimal transport\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[20\]K\. Kandasamy, J\. Schneider, and B\. Póczos\(2015\)High dimensional bayesian optimisation and bandits via additive models\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[21\]S\. Kim, S\. Park, H\. Kang, W\. Kim, J\. Seo, Y\. In, K\. Yoon, and C\. Park\(2026\)Self\-evolverec: self\-evolving recommender systems with llm\-based directional feedback\.arXiv preprint arXiv:2602\.12612\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1)\.
- \[22\]J\. Kirschner, M\. Mutny, N\. Hiller, R\. Ischebeck, and A\. Krause\(2019\)Adaptive and safe bayesian optimization in high dimensions via one\-dimensional subspaces\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[23\]H\. J\. Kushner\(1964\)A new method of locating the maximum point of an arbitrary multipeak curve in the presence of noise\.Journal of Basic Engineering\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[24\]S\. Lee, J\. Park, J\. Chu, M\. Yoon, and H\. J\. Kim\(2025\)Latent bayesian optimization via autoregressive normalizing flows\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[25\]B\. Letham, R\. Calandra, A\. Rai, and E\. Bakshy\(2020\)Re\-examining linear embeddings for high\-dimensional bayesian optimization\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[26\]W\. Li, N\. van Stein, T\. Bäck, and E\. Raponi\(2025\)Llamea\-bo: a large language model evolutionary algorithm for automatically generating bayesian optimization algorithms\.arXiv preprint arXiv:2505\.21034\.Cited by:[1st item](https://arxiv.org/html/2605.20249#A2.I3.i1.p1.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1),[3rd item](https://arxiv.org/html/2605.20249#S5.I1.i3.p1.1)\.
- \[27\]T\. Liu, N\. Astorga, N\. Seedat, and M\. van der Schaar\(2024\)Large language models to enhance bayesian optimization\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[3rd item](https://arxiv.org/html/2605.20249#A2.I3.i3.p1.3),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1)\.
- \[28\]X\. Lu, A\. Boukouvalas, and J\. Hensman\(2022\)Additive gaussian processes revisited\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[29\]N\. Maus, H\. Jones, J\. Moore, M\. J\. Kusner, J\. Bradshaw, and J\. Gardner\(2022\)Local latent space bayesian optimization over structured inputs\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1),[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[30\]N\. Maus, Z\. J\. Lin, M\. Balandat, and E\. Bakshy\(2024\)Joint composite latent space bayesian optimization\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[31\]N\. Maus, K\. Wu, D\. Eriksson, and J\. Gardner\(2023\)Discovering many diverse solutions with bayesian optimization\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[32\]J\. Mockus\(1998\)The application of bayesian methods for seeking the extremum\.Towards Global Optimization\.Cited by:[§3](https://arxiv.org/html/2605.20249#S3.SS0.SSS0.Px1.p1.2)\.
- \[33\]A\. Nayebi, A\. Munteanu, and M\. Poloczek\(2019\)A framework for bayesian optimization in embedded subspaces\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[34\]G\. Ngo, D\. P\. Trong, D\. Nguyen, S\. Gupta, and S\. Venkatesh\(2026\)Adaptive acquisition selection for bayesian optimization with large language models\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[2nd item](https://arxiv.org/html/2605.20249#A2.I3.i2.p1.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1),[3rd item](https://arxiv.org/html/2605.20249#S5.I1.i3.p1.1)\.
- \[35\]A\. Novikov, N\. Vũ, M\. Eisenberger, E\. Dupont, P\. Huang, A\. Z\. Wagner, S\. Shirobokov, B\. Kozlovskii, F\. J\. Ruiz, A\. Mehrabian,et al\.\(2025\)Alphaevolve: a coding agent for scientific and algorithmic discovery\.arXiv preprint arXiv:2506\.13131\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1),[§4](https://arxiv.org/html/2605.20249#S4.p3.2)\.
- \[36\]C\. Oh, E\. Gavves, and M\. Welling\(2018\)BOCK: bayesian optimization with cylindrical kernels\.InInternational Conference on Machine Learning \(ICML\),Cited by:[6th item](https://arxiv.org/html/2605.20249#A2.I1.i6.p1.4),[§1](https://arxiv.org/html/2605.20249#S1.p3.1),[§4](https://arxiv.org/html/2605.20249#S4.p3.1)\.
- \[37\]L\. Papenmeier, L\. Nardi, and M\. Poloczek\(2022\)Increasing the scope as you learn: adaptive bayesian optimization in nested subspaces\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[38\]L\. Papenmeier, M\. Poloczek, and L\. Nardi\(2025\)Understanding high\-dimensional bayesian optimization\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p2.1)\.
- \[39\]B\. Rashidi, K\. Johnstonbaugh, and C\. Gao\(2024\)Cylindrical thompson sampling for high\-dimensional bayesian optimization\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p2.1)\.
- \[40\]C\. E\. Rasmussen\(2003\)Gaussian processes in machine learning\.InSummer School on Machine Learning,Cited by:[§3](https://arxiv.org/html/2605.20249#S3.SS0.SSS0.Px1.p1.2)\.
- \[41\]I\. Roman, R\. Santana, A\. Mendiburu, and J\. A\. Lozano\(2019\)An experimental study in adaptive kernel selection for bayesian optimization\.IEEE Access\.Cited by:[2nd item](https://arxiv.org/html/2605.20249#S5.I1.i2.p1.1)\.
- \[42\]B\. Romera\-Paredes, M\. Barekatain, A\. Novikov, M\. Balog, M\. P\. Kumar, E\. Dupont, F\. J\. Ruiz, J\. S\. Ellenberg, P\. Wang, O\. Fawzi,et al\.\(2024\)Mathematical discoveries from program search with large language models\.Nature\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1)\.
- \[43\]K\. Šehić, A\. Gramfort, J\. Salmon, and L\. Nardi\(2022\)Lassobench: a high\-dimensional hyperparameter optimization benchmark suite for lasso\.InInternational Conference on Automated Machine Learning \(AutoML\),Cited by:[Appendix A](https://arxiv.org/html/2605.20249#A1.SS0.SSS0.Px3.p1.1),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[44\]I\. M\. Sobol’, D\. Asotsky, A\. Kreinin, and S\. Kucherenko\(2011\)Construction and comparison of high\-dimensional sobol’generators\.Wilmott\.Cited by:[§5](https://arxiv.org/html/2605.20249#S5.p4.4)\.
- \[45\]L\. Song, K\. Xue, X\. Huang, and C\. Qian\(2022\)Monte carlo tree search based variable selection for high dimensional bayesian optimization\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[46\]R\. C\. Suwandi, F\. Yin, J\. Wang, R\. Li, T\. Chang, and S\. Theodoridis\(2025\)Adaptive kernel design for bayesian optimization is a piece of cake with llms\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[3rd item](https://arxiv.org/html/2605.20249#A2.I2.i3.p1.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p2.1),[2nd item](https://arxiv.org/html/2605.20249#S5.I1.i2.p1.1)\.
- \[47\]K\. Swersky, D\. Duvenaud, J\. Snoek, F\. Hutter, and M\. A\. Osborne\(2014\)Raiders of the lost architecture: kernels for bayesian optimization in conditional parameter spaces\.arXiv preprint arXiv:1409\.4011\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[48\]A\. Tripp\(2026\)We are underselling the modularity of Bayesian optimization\.Note:[https://www\.austintripp\.ca/blog/2026\-02\-09\-bo\-modularity/](https://www.austintripp.ca/blog/2026-02-09-bo-modularity/)Accessed: 2026\-04\-14Cited by:[§3](https://arxiv.org/html/2605.20249#S3.SS0.SSS0.Px1.p1.2)\.
- \[49\]R\. Turner, D\. Eriksson, M\. McCourt, J\. Kiili, E\. Laaksonen, Z\. Xu, and I\. Guyon\(2021\)Bayesian optimization is superior to random search for machine learning hyperparameter tuning: analysis of the black\-box optimization challenge 2020\.InNeurIPS 2020 Competition and Demonstration Track,Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[50\]L\. Wang, R\. Fonseca, and Y\. Tian\(2020\)Learning search space partition for black\-box optimization using monte carlo tree search\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[Appendix A](https://arxiv.org/html/2605.20249#A1.SS0.SSS0.Px5.p1.1),[§1](https://arxiv.org/html/2605.20249#S1.p1.1),[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[51\]Z\. Wang, G\. E\. Dahl, K\. Swersky, C\. Lee, Z\. Mariet, Z\. Nado, J\. Gilmer, J\. Snoek, and Z\. Ghahramani\(2022\)Pre\-training helps bayesian optimization too\.InICML Workshop on Adaptive Experimental Design and Active Learning in the Real World,Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p1.1)\.
- \[52\]Z\. Wang, C\. Gehring, P\. Kohli, and S\. Jegelka\(2018\)Batched large\-scale bayesian optimization in high\-dimensional spaces\.InInternational Conference on Artificial Intelligence and Statistics \(AISTATS\),Cited by:[Appendix A](https://arxiv.org/html/2605.20249#A1.SS0.SSS0.Px1.p1.2),[§5](https://arxiv.org/html/2605.20249#S5.p2.7)\.
- \[53\]Z\. Wang, F\. Hutter, M\. Zoghi, D\. Matheson, and N\. De Feitas\(2016\)Bayesian optimization in a billion dimensions via random embeddings\.Journal of Artificial Intelligence Research\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p2.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p1.1)\.
- \[54\]C\. Williams and C\. Rasmussen\(1995\)Gaussian processes for regression\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§3](https://arxiv.org/html/2605.20249#S3.SS0.SSS0.Px2.p1.2)\.
- \[55\]Z\. Xu, H\. Wang, J\. M\. Phillips, and S\. Zhe\(2025\)Standard gaussian process is all you need for high\-dimensional bayesian optimization\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p3.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px1.p2.1)\.
- \[56\]A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui, B\. Zheng, B\. Yu, C\. Gao, C\. Huang, C\. Lv,et al\.\(2025\)Qwen3 technical report\.arXiv preprint arXiv:2505\.09388\.Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1),[§2](https://arxiv.org/html/2605.20249#S2.SS0.SSS0.Px2.p1.1)\.
- \[57\]Z\. Zhao, C\. Hua, F\. Berto, K\. Lee, Z\. Ma, J\. Li, and J\. Park\(2026\)Trajevo: trajectory prediction heuristics design via llm\-driven evolution\.InProceedings of the AAAI Conference on Artificial Intelligence \(AAAI\),Cited by:[§1](https://arxiv.org/html/2605.20249#S1.p4.1)\.

## Appendix

## Appendix ATask Details

We evaluate our method on five standard high\-dimensional BO benchmarks covering a range of problem types and dimensionalities\.

#### Rover \(D=100D=100\)\.

The Rover benchmark\[[52](https://arxiv.org/html/2605.20249#bib.bib49)\]is a trajectory optimization task in which a rover must navigate from a fixed start position to a fixed goal on a 2D terrain\. The trajectory is parameterized by 50 intermediate 2D waypoints, yielding aD=100D=100\-dimensional continuous search space in\[0,1\]D\[0,1\]^\{D\}\. The objective rewards proximity to the goal while penalizing path irregularity; higher values are better\. The reward landscape contains many local optima corresponding to different trajectories\.

#### Mopta08 \(D=124D=124\)\.

The Mopta08 benchmark is a structural car body engineering design problem\[[11](https://arxiv.org/html/2605.20249#bib.bib12)\]\. The task is to minimize the mass of a car structural component while satisfying 68 physical safety and manufacturing constraints\. The 124\-dimensional search space encodes continuous geometric design parameters\. Constraint violations are aggregated into a penalty term, making the effective objective landscape highly non\-smooth\. Lower values are better\.

#### Lasso\-DNA \(D=180D=180\)\.

Lasso\-DNA is from the LassoBench suite\[[43](https://arxiv.org/html/2605.20249#bib.bib47)\], a benchmark collection for high\-dimensional hyperparameter optimization of regularized regression models on genomic data\. The input is aD=180D=180\-dimensional vector of group\-wise LASSO regularization coefficients; the objective is the mean squared prediction error on a validation set from a DNA microarray gene expression study \(lower is better\)\. The structured sparsity of the optimal regularizer makes this benchmark representative of practical bioinformatics hyperparameter search\.

#### SVM \(D=388D=388\)\.

The SVM benchmark\[[11](https://arxiv.org/html/2605.20249#bib.bib12)\]involves hyperparameter optimization of a Support Vector Machine classifier on a high\-dimensional tabular dataset\. TheD=388D=388\-dimensional search space encodes regularization and kernel hyperparameters of the SVM\. The objective is the test misclassification error \(lower is better\)\. The high sensitivity of SVM performance to specific hyperparameter regions makes this a particularly challenging task\.

#### Humanoid \(D=6392D=6392\)\.

The Humanoid benchmark\[[50](https://arxiv.org/html/2605.20249#bib.bib50)\]is a continuous locomotion control task from the MuJoCo physics simulator\. A simulated humanoid robot is controlled by a linear policy that maps the 376\-dimensional state observation vector to 17 joint torques, yielding a weight matrix of size17×376=D=639217\\times 376=D=6392parameters\. The objective is the cumulative reward accumulated over a fixed\-length simulation episode \(higher is better\)\.

#### Ant \(D=888D=888, excluded from main evaluation\)\.

We first considered the Ant locomotion benchmark from MuJoCo, in which a quadruped robot is controlled by a linear policy mapping its state observations to joint torques\. However, we excluded Ant from the main evaluation due to its abnormal reward structure\. Specifically, we found out that the trivial zero\-initialization baseline, which sets all policy parameters to𝐱=𝟎\\mathbf\{x\}=\\mathbf\{0\}, achieves a cumulative reward of\+1000\.40±4\.40\+1000\.40\\pm 4\.40\. By contrast, all kernel\-based GP\-BO methods obtain dramatically lower or negative rewards, as shown in[Table˜4](https://arxiv.org/html/2605.20249#A1.T4)\. This results makes the benchmark unsuitable for comparing kernel quality in BO\.

Table 4:Final best values across base kernels compared to the zero\-init\-parameter policy baseline\. Experiments are conducted with 4 random seeds\.

## Appendix BBaseline Details

We compare against 16 baselines across three categories: base kernels, search\-based methods, and LLM\-based methods\.

### Base Kernels

The following methods use the standard GP\-BO setup with a single fixed kernel\. For RBF, Matérn52, and RQ, we apply the data\-dependent lengthscale prior ofHvarfneret al\.\[[18](https://arxiv.org/html/2605.20249#bib.bib18)\]\. Let𝐋=diag​\(ℓ1,…,ℓD\)\\mathbf\{L\}=\\mathrm\{diag\}\(\\ell\_\{1\},\\ldots,\\ell\_\{D\}\)denote the ARD lengthscale matrix andr𝐋=\(𝐱−𝐱′\)⊤​𝐋−1​\(𝐱−𝐱′\)r\_\{\\mathbf\{L\}\}=\\sqrt\{\(\\mathbf\{x\}\-\\mathbf\{x\}^\{\\prime\}\)^\{\\top\}\\mathbf\{L\}^\{\-1\}\(\\mathbf\{x\}\-\\mathbf\{x\}^\{\\prime\}\)\}\.

- •RBF\.The squared exponential kernel with ARD: kRBF​\(𝐱,𝐱′\)=exp⁡\(−12​r𝐋2\)\.k\_\{\\mathrm\{RBF\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\exp\\\!\\left\(\-\\tfrac\{1\}\{2\}\\,r\_\{\\mathbf\{L\}\}^\{2\}\\right\)\.\(12\)
- •Matérn52\.The Matérn kernel with smoothnessν=5/2\\nu=5/2and ARD: kMatérn52​\(𝐱,𝐱′\)=\(1\+5​r𝐋\+53​r𝐋2\)​exp⁡\(−5​r𝐋\)\.k\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\sqrt\{5\}\\,r\_\{\\mathbf\{L\}\}\+\\tfrac\{5\}\{3\}\\,r\_\{\\mathbf\{L\}\}^\{2\}\\right\)\\exp\\\!\\left\(\-\\sqrt\{5\}\\,r\_\{\\mathbf\{L\}\}\\right\)\.\(13\)Models twice mean\-square differentiable functions; often better suited than RBF to practical optimization landscapes\.
- •Linear\.The dot\-product kernel with an unconstrained scale parameterv∈ℝv\\in\\mathbb\{R\}: kLin​\(𝐱,𝐱′\)=v​𝐱⊤​𝐱′\.k\_\{\\mathrm\{Lin\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=v\\,\\mathbf\{x\}^\{\\top\}\\mathbf\{x\}^\{\\prime\}\.\(14\)
- •Periodic\.The ARD periodic kernel with per\-dimension lengthscalesℓi\>0\\ell\_\{i\}\>0and periodspi\>0p\_\{i\}\>0: kPer​\(𝐱,𝐱′\)=exp⁡\(−2​∑i=1Dsin2⁡\(π​\(xi−xi′\)/pi\)ℓi2\)\.k\_\{\\mathrm\{Per\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\exp\\\!\\left\(\-2\\sum\_\{i=1\}^\{D\}\\frac\{\\sin^\{2\}\\\!\\left\(\\pi\(x\_\{i\}\-x\_\{i\}^\{\\prime\}\)/p\_\{i\}\\right\)\}\{\\ell\_\{i\}^\{2\}\}\\right\)\.\(15\)
- •RQ \(Rational Quadratic\)\.A scale mixture of RBF kernels with Gamma\-distributed inverse lengthscales: kRQ​\(𝐱,𝐱′\)=\(1\+r𝐋22​α\)−α,α\>0\.k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{r\_\{\\mathbf\{L\}\}^\{2\}\}\{2\\alpha\}\\right\)^\{\-\\alpha\},\\quad\\alpha\>0\.\(16\)The parameterα\\alphacontrols the relative contribution of short\-range vs\. long\-range variation\.
- •BOCK\.Bayesian Optimization with Cylindrical Kernels \(BOCK\)\[[36](https://arxiv.org/html/2605.20249#bib.bib35)\]decomposes each normalized input𝐱¯=\(𝐱−𝐜\)/R\\bar\{\\mathbf\{x\}\}=\(\\mathbf\{x\}\-\\mathbf\{c\}\)/Rinto a radial componentr=‖𝐱¯‖r=\\\|\\bar\{\\mathbf\{x\}\}\\\|and an angular component𝐱^=𝐱¯/r\\hat\{\\mathbf\{x\}\}=\\bar\{\\mathbf\{x\}\}/r\. The radial coordinate is transformed by the Kumaraswamy CDFκ​\(r;α,β\)=1−\(1−rα\)β\\kappa\(r;\\alpha,\\beta\)=1\-\(1\-r^\{\\alpha\}\)^\{\\beta\}before applying a Matérn52 kernel, and the angular component is modeled by a polynomial kernel in the inner product: kBOCK​\(𝐱,𝐱′\)=kMatérn52​\(κ​\(r\),κ​\(r′\)\)⋅∑p=0P−1wp​\(𝐱^⊤​𝐱^′\)p,wp\>0\.k\_\{\\mathrm\{BOCK\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\text\{Matérn52\}\}\\\!\\left\(\\kappa\(r\),\\kappa\(r^\{\\prime\}\)\\right\)\\cdot\\sum\_\{p=0\}^\{P\-1\}w\_\{p\}\\,\(\\hat\{\\mathbf\{x\}\}^\{\\top\}\\hat\{\\mathbf\{x\}\}^\{\\prime\}\)^\{p\},\\quad w\_\{p\}\>0\.\(17\)This product structure separates the smooth radial variation from the angular geometry, mitigating boundary\-seeking behavior\.
- •SL \(Spherical Linear\)\.The kernel ofDoumontet al\.\[[8](https://arxiv.org/html/2605.20249#bib.bib8)\]first applies ARD lengthscale scaling followed by a global scalegg, then maps the result to the unit sphere via the stereographic projectionψ:ℝD→SD\\psi:\\mathbb\{R\}^\{D\}\\to S^\{D\}: ψ​\(𝐳\)=11\+‖𝐳‖2​\(2​𝐳‖𝐳‖2−1\)∈SD\.\\psi\(\\mathbf\{z\}\)=\\frac\{1\}\{1\+\\\|\\mathbf\{z\}\\\|^\{2\}\}\\begin\{pmatrix\}2\\mathbf\{z\}\\\\ \\\|\\mathbf\{z\}\\\|^\{2\}\-1\\end\{pmatrix\}\\in S^\{D\}\.\(18\)Letting𝐱~=\(𝐱−𝐜\)/\(ℓ⋅g\)\\tilde\{\\mathbf\{x\}\}=\(\\mathbf\{x\}\-\\mathbf\{c\}\)\\,/\\,\(\\boldsymbol\{\\ell\}\\cdot g\), the kernel is a softmax\-weighted mixture of a linear term on the sphere and a constant bias: kSL​\(𝐱,𝐱′\)=λ1​ψ​\(𝐱~\)⊤​ψ​\(𝐱~′\)\+λ0,λ0\+λ1=1,λ0,λ1≥0\.k\_\{\\mathrm\{SL\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\lambda\_\{1\}\\,\\psi\(\\tilde\{\\mathbf\{x\}\}\)^\{\\top\}\\psi\(\\tilde\{\\mathbf\{x\}\}^\{\\prime\}\)\+\\lambda\_\{0\},\\quad\\lambda\_\{0\}\+\\lambda\_\{1\}=1,\\;\\lambda\_\{0\},\\lambda\_\{1\}\\geq 0\.\(19\)The stereographic projection ensures that inputs at any distance from the origin are mapped to a bounded region on the sphere, avoiding the unbounded extrapolation that afflicts linear kernels in high dimensions\.

### Search\-based Methods

All search\-based baselines share the same initial population𝒫0\\mathcal\{P\}\_\{0\}as our method for a fair comparison\.

- •Greedy Search\.At each BO iteration, it evaluates every kernel in𝒫0\\mathcal\{P\}\_\{0\}and selects the one with the lowest Bayesian Information Criterion \(BIC\)\. No new kernels are created\.
- •Compositional Search\.At each BO iteration, use greedy search to discover kernel structures that best explain the observed data via pairwise additive and multiplicative compositions of kernels in the current population\. Following the paper, we use BIC as a selection metric and directly use hyperparameters fitted in a single kernel to composite kernels without refitting\. We use the max depth of the composition as33\.
- •CAKE\.Context\-Aware Kernel Evolution\[[46](https://arxiv.org/html/2605.20249#bib.bib43)\]uses an LLM to select and compose base kernels conditioned on prior observations\. Its search is restricted to additive and multiplicative compositions of a fixed base set, and passing raw observations to the LLM induces context\-length issues in high dimensions\. If the dimensions are too high, we truncate the observations to prevent context limit violation\. We use the max depth of the composition as33\. While CAKE usesGPT\-4o\-minifor the LLM API, we evaluate the baseline withGPT\-4ofor a fair comparison\.

### LLM\-based Methods

For all LLM\-based baselines, we initialize the dataset with Sobol sequences of size of2020as our method for a fair comparison\.

- •LLaMEA\-BO \(ARM, ATRBO, TREvol, TROpt, TRPareto\)\.Five end\-to\-end LLM\-driven BO algorithms produced by the LLaMEA\-BO pipeline\[[26](https://arxiv.org/html/2605.20249#bib.bib26)\], which uses an LLM in an evolutionary loop to generate and refine BO algorithm code\. Each variant is a distinct algorithm discovered by the pipeline\. These methods may not use a GP surrogate and directly propose candidates from prior observations\.
- •LMABO\.An LLM\-based BO method that adaptively selects the acquisition function at each iteration\[[34](https://arxiv.org/html/2605.20249#bib.bib33)\]\. For a fair comparison, we use GP with an RBF as the base kernel, followingHvarfneret al\.\[[18](https://arxiv.org/html/2605.20249#bib.bib18)\], and useL\-BFGS\-Bas the optimizer\.
- •LLAMBO \(excluded from main evaluation\)\.LLAMBO\[[27](https://arxiv.org/html/2605.20249#bib.bib27)\]uses LLMs to propose and evaluate candidates conditioned on historical evaluations, making its prompt size scale with both history length and input dimensionality\. On Rover \(D=100D=100\), the full history of 980 evaluations already requires approximately 600K input tokens, exceeding the 128k context window of GPT\-4o\. Even after truncating the history to 20 observations, our GPT\-4o probe costs about$​1\.05\\mathdollar 1\.05per BO iteration, corresponding to about$​1,024\\mathdollar 1\{,\}024for a single full run\. We therefore exclude LLAMBO due to context\-length and budget limitations\.

#### Additional Baselines: TuRBO and SAASBO\.

We compare against two additional baselines, TuRBO\[[12](https://arxiv.org/html/2605.20249#bib.bib11)\]and SAASBO\[[11](https://arxiv.org/html/2605.20249#bib.bib12)\], which are not included in the main table as they employ different acquisition function maximization strategies and inference procedures \(TuRBO uses a trust\-region approach and SAASBO uses sparse axis\-aligned priors with MCMC\-based inference\)\. However, we compare the results of those baselines as they are widely used in high\-dimensional BO\. As shown in[Table˜5](https://arxiv.org/html/2605.20249#A2.T5), Kernel Discovery outperforms both methods across all benchmarks\.

Table 5:Comparison with additional baselines across standard benchmarks\. SAASBO results useT=500T=500due to its higher computational cost\. Experiments are conducted with 4 random seeds\.

## Appendix CImplementation Details

#### Shared BO Setup\.

For all methods except end\-to\-end LLM\-based approaches \(ARM, ATRBO, TREvol, TROpt, TRPareto\), we use a shared GP\-based BO framework built on GPyTorch and BoTorch\. The surrogate is an exact Gaussian Process with homoscedastic Gaussian observation noise\. Kernel hyperparameters are optimized by maximizing the marginal log\-likelihood \(MLL\) usingL\-BFGS\-Bwith 3 random restarts\. Inputs are normalized to\[0,1\]D\[0,1\]^\{D\}and outputs are standardized to zero mean and unit variance before fitting\.

We useLogEIas the acquisition function and optimize it usingL\-BFGS\-Bwith 4 random restarts initialized from 512 Sobol quasi\-random candidates\. RAASP sampling is implemented by tuning the optionsample\_around\_best=True\. The initial dataset𝒟0\\mathcal\{D\}\_\{0\}is generated by a Sobol sequence of size\|𝒟0\|=20\|\\mathcal\{D\}\_\{0\}\|=20\. The total evaluation budget isT=1000T=1000function queries\.

All experiments use a batch BO setting with batch sizeq=20q=20\. At each BO round, the acquisition function is maximized to select a batch ofqqcandidate points, which are evaluated simultaneously\. This yieldsT/q=50T/q=50BO rounds per run\. All baselines also use the sameq=20q=20batch size to ensure a fair comparison\. Please refer to[Table˜6](https://arxiv.org/html/2605.20249#A3.T6)for the comparison of the performance of base kernels under different batch sizes\. All experiments are done with a single RTX NVIDIA L40S GPU\.

#### Full Prompt Templates\.

We present the full prompt templates for each stage, mathematical form discovery, code conversion, and composition, inLABEL:fig:prompt\_dis,LABEL:fig:prompt\_convandLABEL:fig:prompt\_comp, respectively\. In addition to generating solely mathematical expressions or code blocks, we instruct LLM to justify its answer for exploring its reasoning capabilities and the robustness of the pipeline\.

1YouareanexpertinGaussianprocesskerneldesignforhigh\-dimensionalBayesianoptimization\.

2

3TOP\{len\(parent\_formulas\_with\_loss\)\}kernelsinourpopulation:

4\{context\}

5

6Generate\{n\_discoveries\}DISTINCT,CREATIVE,mathematicallyinnovativeDISCOVEREDkernels\.

7Eachdiscoveryshouldbederivedfromoneormoreoftheabovekernels,butwithmeaningfulmathematicalchanges\.

8\{highdim\}\{psd\}\{simplicity\}

9OUTPUTFORMAT:

10ReturnEXACTLY\{n\_discoveries\}kerneldescriptions\.EncloseEACHina‘‘‘formulablock:

11

12‘‘‘formula

13KERNEL:\[name\]

14

15PARAMETERS:

16\-\[name\]\(\[shape\],\[constraint\]\):\[description\]

17

18INPUTTRANSFORM:

19\[step\-by\-stepmath\]

20

21COVARIANCEFUNCTION:

22\[k\(x1,x2\)=\.\.\.\]

23

24PSDGUARANTEE:

25\[whythiskernelisPSD\]

26‘‘‘

27

28EachMUSTbefundamentallydistinct\(differenttransform,differentcovariancestructure,differentmathematicalidea\)\."""

Figure 8:Mathematical form discovery prompt template1YouareaGPyTorchkernelcodegenerator\.ConvertthiskernelformulaintoaGPyTorchEvolvedKernelclass\.

2

3\{formula\}

4

5REFERENCETEMPLATEA\-Distance\-basedkernel\{RBFcode\}

6

7REFERENCETEMPLATEB\-Feature\-mapkernel\{SLcode\}

8

9CRITICALRULES:

101\.\_\_init\_\_SIGNATURE:‘\_\_init\_\_‘MUSTaccept‘ard\_num\_dims:int‘astheONLYrequiredparameter\.Thesystemcalls‘EvolvedKernel\(ard\_num\_dims=D\)‘\.AllotherargsMUSThavedefaults\.NEVERaddrequiredargslike‘q:int‘,‘center:Tensor‘,‘M:int‘\.

112\.FORWARDSIGNATURE:‘defforward\(self,x1,x2,diag=False,\*\*params\)‘\-alwaysaccept\*\*params\.

123\.BATCH\-SAFESHAPES\(CRITICAL\):Thekernelistestedwiththeseexactshapes\-yourcodeMUSThandleALLofthem:

13\-2D:x1=\(5,D\)vsx2=\(1,D\)\-\>outputmustbe\(5,1\),NOT\(5,5\)

14\-2D:x1=\(3,D\)vsx2=\(7,D\)\-\>outputmustbe\(3,7\)

15\-3Dbatched\(BoTorchacqfoptimization\):x1=\(1,4,D\)vsx2=\(1,3,D\)\-\>outputmustbe\(1,4,3\)

16Therefore:ALLdimindexingmustberelative\(\-1forD,\-2forN\)\.NEVERuse‘\.size\(0\)‘,‘\.expand\(x\.size\(0\),\.\.\.\)‘,or‘\.shape\[0\]‘\.Forbroadcastingscalarstomatchbatch\+Ndims,use‘torch\.ones\_like\(x\[\.\.\.,:1\]\)‘\.

174\.OUTPUTSHAPE:return\(\.\.\.,N1,N2\)forANYN1\!=N2\.Ifyouroutputis\(N1,N1\)insteadof\(N1,N2\),youhaveabug\.

185\.DISTANCE:‘torch\.cdist\(x1s,x2s,p=2\)‘\-NEVER‘x1\.unsqueeze\(\-2\)\-x2\.unsqueeze\(\-3\)‘\(OOM\)\.

196\.INNERPRODUCT:‘x1@x2\.transpose\(\-1,\-2\)‘\.

207\.DEVICE:newtensorsinforwarduse‘device=x1\.device‘\.Use‘register\_buffer‘in\_\_init\_\_\.

218\.NOIN\-PLACE:‘x=x\+y‘not‘x\+=y‘\.‘x=x\.clamp\(\.\.\.\)‘not‘x\.clamp\_\(\.\.\.\)‘\.

229\.NODETACH/NUMPY:never‘\.detach\(\)‘,‘\.numpy\(\)‘,‘\.item\(\)‘,‘torch\.no\_grad\(\)‘inforward\.

2310\.NUMERICAL:‘\.clamp\(min=1e\-15\)‘beforesqrt/log,‘\.clamp\(max=20\.0\)‘forexp\.

2411\.LENGTHSCALE:if‘has\_lengthscale=True‘,doNOT‘register\_parameter\("raw\_lengthscale",\.\.\.\)‘\.

2512\.PARAMORDER:‘register\_parameter\(name,\.\.\.\)‘BEFORE‘register\_constraint\(name,\.\.\.\)‘\.

2613\.DIAG:‘ifdiag:returncovar\.diagonal\(dim1=\-2,dim2=\-1\)‘\.

2714\.IMPORTS:include‘importmath‘ifusingmath\.sqrt/pi/log\.

2815\.NOSELF\-REASSIGNMENTinforward\(\):never‘self\.x=\.\.\.‘\-uselocalvariables\.

2916\.ONLYUSEEXISTINGgpytorchclasses\.

3017\.NOSUB\-KERNELS:doNOTinstantiategpytorchkernelobjects\(e\.g\.‘MaternKernel\(\)‘,‘RBFKernel\(\)‘\)assub\-components\.TheyproduceLazyEvaluatedKernelTensorwithunpredictableshapes\.Instead,implementtheformuladirectly\(e\.g\.forMatern\-5/2:‘\(1\+sqrt5\*d\+5/3\*d\*\*2\)\*exp\(\-sqrt5\*d\)‘\)\.

3118\.NODATA\-DEPENDENTBOUNDSinforward\(\):nevercomputebounds/centerfromtheinputdata\(e\.g\.‘x1\.max\(dim=\-2\)‘or‘x1\.min\(dim=\-2\)‘\)\.ThesechangewithNandbreakshapeinvariance\.Storefixedboundsvia‘register\_buffer‘in\_\_init\_\_,oruseconstants\(e\.g\.0and1\)\.

3219\.SCALARPAIRWISEDISTANCE:whencomputingdistancebetweenscalarvalues\(e\.g\.warpedradiiofshape\(\.\.\.,N,1\)\),use‘torch\.cdist\(r1,r2,p=2\)‘whichgives\(\.\.\.,N1,N2\)\.NEVERuse‘r1\-r2‘or‘torch\.abs\(r1\-r2\)‘\-thisgives\(\.\.\.,N1,1\)not\(\.\.\.,N1,N2\)andbreakscross\-paircomputation\.

33

34ReturnONLYthePythoncodeina‘‘‘pythonblock\."""

Figure 9:Code conversion prompt template\.1YouarecombiningGPkernelsforhigh\-dimensionalBayesianoptimization\.

2

3Populationof\{len\(population\_formulas\_with\_loss\)\}kernels:

4\{context\}

5

6Generate\{n\_compositions\}DISTINCTcomposedkernels\.ForEACHcomposition:

7\-Pickexactly2kernelsfromthepopulationthatCOMPLEMENTeachothermathematically

8\-Combinethem:sumtheircovariancefunctions,multiplythem,shareatransformwithdifferentdistancemetrics,oranyothervalidcomposition

9\-ExplainWHYthesetwokernelscomplementeachother

10\{psd\}\{simplicity\}

11OUTPUTFORMAT:

12ReturnEXACTLY\{n\_compositions\}kerneldescriptions\.EncloseEACHina‘‘‘formulablock:

13

14‘‘‘formula

15KERNEL:\[name\]

16COMPOSEDFROM:\[KernelX\]\+\[KernelY\]\(or\*,orotheroperation\)

17WHY:\[1sentenceonwhythesecomplementeachother\]

18

19PARAMETERS:

20\-\[param\]\(\[shape\],\[constraint\]\):\[description\]

21

22INPUTTRANSFORM:

23\[step\-by\-stepmath\]

24

25COVARIANCEFUNCTION:

26k\(x1,x2\)=\.\.\.

27

28PSDGUARANTEE:

29\[whythiskernelisPSD\]

30‘‘‘"""

Figure 10:Composition prompt template\.
#### Kernel Validation Failure Rates\.

The failure probability in[Tables˜2](https://arxiv.org/html/2605.20249#S6.T2)and[3](https://arxiv.org/html/2605.20249#S6.T3)denotes the empirical fraction of LLM\-generated kernels rejected by our structural validator\. A generated kernelknewk\_\{\\mathrm\{new\}\}is accepted only when

𝒱​\(knew\)=𝒱agn​\(knew\)∧𝒱psd​\(knew\)=1\.\\mathcal\{V\}\(k\_\{\\mathrm\{new\}\}\)=\\mathcal\{V\}\_\{\\mathrm\{agn\}\}\(k\_\{\\mathrm\{new\}\}\)\\wedge\\mathcal\{V\}\_\{\\mathrm\{psd\}\}\(k\_\{\\mathrm\{new\}\}\)=1\.Here,𝒱agn\\mathcal\{V\}\_\{\\mathrm\{agn\}\}checks whether the generated kernel implementation is dimension\- and shape\-agnostic, as required by the BO pipeline\. Concretely, we instantiate the kernel with different input dimensionalities and evaluate itsforwardfunction on several synthetic input configurations, including self\-covariance inputs\(N,D\)\(N,D\), cross\-covariance inputs\(N1,D\)\(N\_\{1\},D\)and\(N2,D\)\(N\_\{2\},D\)withN1≠N2N\_\{1\}\\neq N\_\{2\}, and batched inputs used during acquisition optimization\. The kernel is rejected if any call raises a runtime error, assumes a hard\-coded dimensionality, fails to broadcast correctly, or returns a covariance tensor with an invalid shape\. The PSD check𝒱psd\\mathcal\{V\}\_\{\\mathrm\{psd\}\}then evaluates the kernel on random inputs and tests whether the resulting Gram matrix is numerically positive semi\-definite via a Cholesky decomposition with a small jitter\. We report the fraction of generated kernels for which at least one of these checks fails, aggregated over BO iterations and random seeds\.

#### Effect of Batch Size \(qq\)\.

The main experiments useq=20q=20, reducing the number of BO rounds toT/q=50T/q=50\. To assess whether this setting disproportionately favors our method, we compare base kernels underq=20q=20vs\.q=1q=1on the SVM benchmark\.[Table˜6](https://arxiv.org/html/2605.20249#A3.T6)shows that the relative ordering of kernels is largely preserved across both settings, and that the optimal kernel \(RBF in theq=1q=1setting\) is the same as in theq=20q=20setting\. This confirms that the batch setting does not systematically alter which kernels are competitive, and that our comparison is not confounded by the choice ofqq\.

Table 6:Comparison of final best values across base kernels under different oracle query batch sizes\.

## Appendix DAlgorithm Details

#### Discard Logic\.

The difference between the standard evolutionary pipeline and our task is that one kernel that suits a certain round may not suit the other rounds, as the data keeps changing\. To mitigate this, we discard the kernel if it is selected but does not improve the best value found so far\. For kernels in the initial population, which are the basic building blocks of our discovery pipeline, we discard them if they are selected and no improvement is observed afterP=3P=3iterations\. If all kernels in the population are discarded, we reset the population to the initial population\.

#### Humanoid Benchmark\.

In the humanoid benchmark, the dimension is too high, and we observed that even with the LOO\-CRPS evaluation metric, it sometimes leads to selecting too complex kernels that may not lead to an improvement\. To remedy this, we regularize the LOO\-CRPS score by the BIC metric as follows:

LOO\-CRPS\-BIC​\(𝐊k,𝐲\)=1n​∑i=1nCRPS​\(𝒩​\(μ−i,σ−i2\),yi\)\+\|𝜽k\|​log⁡nn,\\displaystyle\\text\{LOO\-CRPS\-BIC\}\(\\mathbf\{K\}\_\{k\},\\mathbf\{y\}\)\\;=\\;\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\text\{CRPS\}\\\!\\left\(\\mathcal\{N\}\(\\mu\_\{\-i\},\\,\\sigma^\{2\}\_\{\-i\}\),\\,y\_\{i\}\\right\)\\;\+\\;\\frac\{\|\\boldsymbol\{\\theta\}\_\{k\}\|\\log n\}\{n\},\(20\)where\|𝜽k\|\|\\boldsymbol\{\\theta\}\_\{k\}\|is the number of hyperparameters in the kernelkk\. We found that this regularization works well, especially in extremely high dimensions,D≫nD\\gg n\.

Algorithm 1Kernel Discovery for High\-Dimensional BO0:Objective

ff, initial dataset

𝒟0\\mathcal\{D\}\_\{0\}, population size

NN, BO budget

TT, initial\-population patience

PP, LLM

ℳ\\mathcal\{M\}with prompts

ρdisc,ρconv,ρcomp\\rho\_\{\\text\{disc\}\},\\rho\_\{\\text\{conv\}\},\\rho\_\{\\text\{comp\}\}, verifier

𝒱\\mathcal\{V\}
1:Initialize

𝒫0←\{kRBF,kMat52,kRQ,kBOCK,kSL\}\\mathcal\{P\}\_\{0\}\\leftarrow\\\{k\_\{\\text\{RBF\}\},\\,k\_\{\\text\{Mat52\}\},\\,k\_\{\\text\{RQ\}\},\\,k\_\{\\text\{BOCK\}\},\\,k\_\{\\text\{SL\}\}\\\},

𝒫←𝒫0\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\_\{0\}
2:

𝒟←𝒟0\\mathcal\{D\}\\leftarrow\\mathcal\{D\}\_\{0\},

y∗←max\(𝐱,y\)∈𝒟0⁡yy^\{\*\}\\leftarrow\\max\_\{\(\\mathbf\{x\},y\)\\in\\mathcal\{D\}\_\{0\}\}y,

fail​\[k\]←0\\text\{fail\}\[k\]\\leftarrow 0for all

k∈𝒫0k\\in\\mathcal\{P\}\_\{0\}
3:for

t=0,1,…,T−1t=0,1,\\ldots,T\-1do

4:// Discovery stage

5:

mnew∼ℳ​\(\{mi\}ki∈𝒫;ρdisc\)m^\{\\text\{new\}\}\\sim\\mathcal\{M\}\\\!\\left\(\\\{m\_\{i\}\\\}\_\{k\_\{i\}\\in\\mathcal\{P\}\};\\,\\rho\_\{\\text\{disc\}\}\\right\),

cnew←ℳ​\(mnew;ρconv\)c^\{\\text\{new\}\}\\leftarrow\\mathcal\{M\}\(m^\{\\text\{new\}\};\\,\\rho\_\{\\text\{conv\}\}\),

knew←\(mnew,cnew\)k^\{\\text\{new\}\}\\leftarrow\(m^\{\\text\{new\}\},c^\{\\text\{new\}\}\)
6:if

𝒱​\(knew\)=1\\mathcal\{V\}\(k^\{\\text\{new\}\}\)=1andGP fitting time

≤60\\leq 60sthen

7:

𝒫←𝒫∪\{knew\}\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\\cup\\\{k^\{\\text\{new\}\}\\\}
8:endif

9:// Composition stage

10:

mcomp∼ℳ​\(\{m\(i\)\}i=1N;ρcomp\)m^\{\\text\{comp\}\}\\sim\\mathcal\{M\}\\\!\\left\(\\\{m\_\{\(i\)\}\\\}\_\{i=1\}^\{N\};\\,\\rho\_\{\\text\{comp\}\}\\right\),

ccomp←ℳ​\(mcomp;ρconv\)c^\{\\text\{comp\}\}\\leftarrow\\mathcal\{M\}\(m^\{\\text\{comp\}\};\\,\\rho\_\{\\text\{conv\}\}\),

kcomp←\(mcomp,ccomp\)k^\{\\text\{comp\}\}\\leftarrow\(m^\{\\text\{comp\}\},c^\{\\text\{comp\}\}\)
11:if

𝒱​\(kcomp\)=1\\mathcal\{V\}\(k^\{\\text\{comp\}\}\)=1andGP fitting time

≤60\\leq 60sthen

12:

𝒫←𝒫∪\{kcomp\}\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\\cup\\\{k^\{\\text\{comp\}\}\\\}
13:endif

14:// Kernel selection and BO step

15:

k⋆←arg⁡mink∈𝒫⁡LOO\-CRPS​\(𝐊k,𝐲\)k^\{\\star\}\\leftarrow\\arg\\min\_\{k\\in\\mathcal\{P\}\}\\,\\text\{LOO\-CRPS\}\(\\mathbf\{K\}\_\{k\},\\mathbf\{y\}\)
16:Fit GP with

k⋆k^\{\\star\}on

𝒟\\mathcal\{D\};

𝐱t\+1←arg⁡max𝐱⁡α​\(𝐱;GP\)\\mathbf\{x\}\_\{t\+1\}\\leftarrow\\arg\\max\_\{\\mathbf\{x\}\}\\,\\alpha\(\\mathbf\{x\};\\,\\text\{GP\}\)
17:

yt\+1←f​\(𝐱t\+1\)y\_\{t\+1\}\\leftarrow f\(\\mathbf\{x\}\_\{t\+1\}\);

𝒟←𝒟∪\{\(𝐱t\+1,yt\+1\)\}\\mathcal\{D\}\\leftarrow\\mathcal\{D\}\\cup\\\{\(\\mathbf\{x\}\_\{t\+1\},\\,y\_\{t\+1\}\)\\\}
18:// Discard logic

19:if

yt\+1≤y∗y\_\{t\+1\}\\leq y^\{\*\}then

20:

fail​\[k⋆\]←fail​\[k⋆\]\+1\\text\{fail\}\[k^\{\\star\}\]\\leftarrow\\text\{fail\}\[k^\{\\star\}\]\+1
21:if

k⋆∉𝒫0k^\{\\star\}\\notin\\mathcal\{P\}\_\{0\}or

fail​\[k⋆\]≥P\\text\{fail\}\[k^\{\\star\}\]\\geq Pthen

22:

𝒫←𝒫∖\{k⋆\}\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\\setminus\\\{k^\{\\star\}\\\}
23:endif

24:endif

25:if

𝒫=∅\\mathcal\{P\}=\\emptysetthen

26:

𝒫←𝒫0\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\_\{0\};

fail​\[k\]←0\\text\{fail\}\[k\]\\leftarrow 0for all

k∈𝒫0k\\in\\mathcal\{P\}\_\{0\}
27:endif

28:// Population update

29:

𝒫←Top​\-​N⁡\(𝒫;LOO\-CRPS​\(⋅,𝐲\)\)\\mathcal\{P\}\\leftarrow\\operatorname\{Top\\text\{\-\}N\}\\\!\\left\(\\mathcal\{P\};\\,\\text\{LOO\-CRPS\}\(\\cdot,\\,\\mathbf\{y\}\)\\right\),

y∗←max⁡\(y∗,yt\+1\)y^\{\*\}\\leftarrow\\max\(y^\{\*\},y\_\{t\+1\}\)
30:endfor

31:return

arg⁡max\(𝐱,y\)∈𝒟⁡y\\arg\\max\_\{\(\\mathbf\{x\},y\)\\in\\mathcal\{D\}\}\\,y

## Appendix EExtended Experiment Results

#### Full Learning Curves\.

[Figure˜11](https://arxiv.org/html/2605.20249#A5.F11)extends[Figure˜4](https://arxiv.org/html/2605.20249#S5.F4)to show the full learning curves for all 16 baselines across all five benchmarks\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x10.png)Figure 11:Full learning curves for all methods across five benchmarks\.

## Appendix FTime Complexity Analysis

We analyze the per\-iteration wall\-clock time of Kernel Discovery and compare it against all baselines in Table[7](https://arxiv.org/html/2605.20249#A6.T7)\. To systematically identify the bottleneck of our running time, we decompose each iteration into the following phases:

- •GP Fitting: Fitting all kernels in the current population in parallel using a process pool\. The kernel selection score \(e\.g\., LOO\-CRPS\) is computed within this phase, so the cost of choosing the best candidate is already included\.
- •LLM Inference: Two API calls per iteration \- one for generating a novel mathematical kernel form and one for converting that form into executable code\.
- •Kernel Validation: Lightweight structural checks on each newly generated kernel before it is admitted to the population\.
- •Search: An additional kernel search procedure that applies only to search\-based methods\. Compositional Search enumerates pairwise additive and multiplicative compositions, while CAKE employs an LLM\-guided composition with a BAKER\-based selection procedure\. Our method and Greedy Search select the best candidate directly from the evaluated pool, so this cost is negligible\.
- •Acquisition Function Optimization: Maximizing the acquisition function viaL\-BFGS\-Bto obtain the next query point\.
- •Oracle Evaluation: Querying the black\-box benchmark function at the selected point, shared identically across all methods\.

For LLM\-based end\-to\-end methods, the pipeline does not follow the standard BO decomposition, so we report only the total per\-iteration time and oracle evaluation cost\. As shown in Table[7](https://arxiv.org/html/2605.20249#A6.T7), our method incurs longer time than fixed base kernel methods but achieves comparable total running time to search\-based methods\. Among LLM\-based baselines, TREvol and TRPareto require significantly more time per iteration\. We also observe that LLM inference is the primary bottleneck in our pipeline, partially due to the two\-stage approach that issues separate API calls for formula generation and code conversion\. While this decomposition is critical for producing functionally diverse kernels \(Section 6\), developing more efficient inference strategies is a promising direction for future work\.

Table 7:Per\-iteration wall\-clock time breakdown \(mean±\\pmstd, seconds\) on the SVM benchmark with 4 random seeds\. For LLM\-based methods, individual phases are not separately tracked; we report only the total time and oracle evaluation time\.MethodGP FitLLMValidationSearchAcqf OptOracleTotalBase KernelsRBF0\.68±0\.020\.68\\pm 0\.02N/AN/A0\.00±0\.000\.00\\pm 0\.002\.70±0\.972\.70\\pm 0\.970\.28±0\.040\.28\\pm 0\.045\.18±1\.005\.18\\pm 1\.00Matérn520\.69±0\.040\.69\\pm 0\.04N/AN/A0\.00±0\.000\.00\\pm 0\.002\.76±0\.992\.76\\pm 0\.990\.28±0\.040\.28\\pm 0\.045\.26±1\.005\.26\\pm 1\.00Linear0\.95±0\.580\.95\\pm 0\.58N/AN/A0\.00±0\.000\.00\\pm 0\.003\.14±0\.883\.14\\pm 0\.880\.29±0\.040\.29\\pm 0\.046\.49±2\.386\.49\\pm 2\.38Periodic0\.85±0\.200\.85\\pm 0\.20N/AN/A0\.00±0\.000\.00\\pm 0\.001\.35±1\.521\.35\\pm 1\.520\.25±0\.040\.25\\pm 0\.044\.28±1\.404\.28\\pm 1\.40BOCK1\.14±0\.441\.14\\pm 0\.44N/AN/A0\.00±0\.000\.00\\pm 0\.004\.03±1\.624\.03\\pm 1\.620\.31±0\.060\.31\\pm 0\.067\.02±1\.877\.02\\pm 1\.87SL1\.41±0\.851\.41\\pm 0\.85N/AN/A0\.00±0\.000\.00\\pm 0\.003\.57±1\.103\.57\\pm 1\.100\.30±0\.040\.30\\pm 0\.046\.83±1\.696\.83\\pm 1\.69Search\-basedGreedy Search5\.38±1\.805\.38\\pm 1\.80N/AN/A0\.00±0\.000\.00\\pm 0\.005\.70±0\.565\.70\\pm 0\.560\.35±0\.050\.35\\pm 0\.0511\.51±2\.0411\.51\\pm 2\.04Compositional Search4\.90±1\.554\.90\\pm 1\.55N/AN/A13\.80±6\.7813\.80\\pm 6\.785\.88±1\.335\.88\\pm 1\.330\.34±0\.050\.34\\pm 0\.0520\.70±8\.8720\.70\\pm 8\.87CAKE7\.15±3\.617\.15\\pm 3\.619\.09±3\.239\.09\\pm 3\.23N/A17\.44±3\.7317\.44\\pm 3\.7319\.34±4\.0219\.34\\pm 4\.020\.35±0\.060\.35\\pm 0\.0637\.14±4\.4737\.14\\pm 4\.47LLM\-basedARMN/AN/AN/AN/AN/A0\.30±0\.040\.30\\pm 0\.044\.54±0\.024\.54\\pm 0\.02ATRBON/AN/AN/AN/AN/A0\.28±0\.050\.28\\pm 0\.0514\.51±0\.0614\.51\\pm 0\.06TREvolN/AN/AN/AN/AN/A0\.31±0\.020\.31\\pm 0\.02209\.88±3\.40209\.88\\pm 3\.40TROptN/AN/AN/AN/AN/A0\.29±0\.050\.29\\pm 0\.053\.67±0\.103\.67\\pm 0\.10TRParetoN/AN/AN/AN/AN/A0\.30±0\.020\.30\\pm 0\.0266\.29±0\.2666\.29\\pm 0\.26LMABO3\.56±0\.503\.56\\pm 0\.501\.92±0\.451\.92\\pm 0\.45N/A0\.00±0\.000\.00\\pm 0\.001\.92±0\.281\.92\\pm 0\.280\.27±0\.040\.27\\pm 0\.045\.76±0\.615\.76\\pm 0\.61Kernel Discovery \(Ours\)4\.02±1\.224\.02\\pm 1\.2214\.24±2\.0514\.24\\pm 2\.051\.90±0\.781\.90\\pm 0\.780\.00±0\.000\.00\\pm 0\.004\.56±0\.114\.56\\pm 0\.110\.30±0\.010\.30\\pm 0\.0128\.05±1\.8128\.05\\pm 1\.81

## Appendix GDirect Code Generation Analysis

#### Details on Cosine Distance Metric\.

To quantify the functional diversity of generated kernels, we compare their induced Gram matrices on a shared reference input set\. For each benchmark and each method, we collect all valid LLM\-generated kernels produced during the BO run\. We then sample a fixed reference batch𝐗ref∈\[0,1\]N×D\\mathbf\{X\}\_\{\\mathrm\{ref\}\}\\in\[0,1\]^\{N\\times D\}withN=80N=80, whereDDis the dimensionality of the corresponding benchmark\. The same reference batch is used for all kernels within a benchmark\.

For each generated kernelkik\_\{i\}, we compute its Gram matrixKi=ki​\(𝐗ref,𝐗ref\)∈ℝN×N,K\_\{i\}=k\_\{i\}\(\\mathbf\{X\}\_\{\\mathrm\{ref\}\},\\mathbf\{X\}\_\{\\mathrm\{ref\}\}\)\\in\\mathbb\{R\}^\{N\\times N\},and flatten it into a vector𝐯i=vec​\(Ki\)∈ℝN2\.\\mathbf\{v\}\_\{i\}=\\mathrm\{vec\}\(K\_\{i\}\)\\in\\mathbb\{R\}^\{N^\{2\}\}\.We then compute the mean pairwise cosine similarity among all generated kernels in the pool𝒫\\mathcal\{P\}:

s¯=2\|𝒫\|​\(\|𝒫\|−1\)​∑i<j𝐯i⊤​𝐯j‖𝐯i‖2​‖𝐯j‖2\.\\bar\{s\}=\\frac\{2\}\{\|\\mathcal\{P\}\|\(\|\\mathcal\{P\}\|\-1\)\}\\sum\_\{i<j\}\\frac\{\\mathbf\{v\}\_\{i\}^\{\\top\}\\mathbf\{v\}\_\{j\}\}\{\\\|\\mathbf\{v\}\_\{i\}\\\|\_\{2\}\\\|\\mathbf\{v\}\_\{j\}\\\|\_\{2\}\}\.Finally, we report the cosine distance asCosineDistance=1−s¯\\mathrm\{CosineDistance\}=1\-\\bar\{s\}\. A higher value indicates that the generated kernels induce more diverse covariance structures on the same reference inputs\.

#### Performance Comparison\.

We further compare direct code generation with our two\-stage generation under the same experimental setup\. As shown in[Table˜8](https://arxiv.org/html/2605.20249#A7.T8), the two\-stage approach achieves better final performance on all benchmarks\. This suggests that generating kernels through an explicit mathematical formulation step leads to more functionally meaningful and consistently effective kernel candidates than directly generating code\.

Table 8:Performance comparison between direct code generation and our two\-stage generation\. Results are averaged over 4 random seeds\. Bold denotes the best entry in each column\.MethodRover\(↑\)\(\\uparrow\)Mopta08\(↓\)\(\\downarrow\)Lasso\-DNA\(↓\)\(\\downarrow\)SVM388\(↓\)\(\\downarrow\)Humanoid\(↑\)\(\\uparrow\)\(D=100D=100\)\(D=124D=124\)\(D=180D=180\)\(D=388D=388\)\(D=6392D=6392\)Two\-Stage Generation \(Ours\)4\.353±\\pm0\.319216\.81±\\pm0\.870\.286±\\pm0\.0010\.056±\\pm0\.003762\.78±\\pm72\.39Direct Code Generation3\.872±\\pm0\.321217\.32±\\pm0\.750\.288±\\pm0\.0010\.057±\\pm0\.004651\.85±\\pm85\.93

#### Additional Examples of Functional Redundancy in Direct Code Generation\.

As shown in[Figure˜5\(a\)](https://arxiv.org/html/2605.20249#S6.F5.sf1), direct code generation often produces syntactically different implementations that correspond to the same kernel function\. This is a common pitfall of searching directly in code space: changes such as variable renaming, syntax\-level variation, or algebraic rewriting can be counted as new candidates\. In[Figures˜12](https://arxiv.org/html/2605.20249#A7.F12),[13](https://arxiv.org/html/2605.20249#A7.F13)and[14](https://arxiv.org/html/2605.20249#A7.F14), we provide examples of this behavior\. Across these pairs, the two forward\(\) implementations look different at the code level but share the same kernel function\.

defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1\_scaled/self\.lengthscale

x2s=x2\_scaled/self\.lengthscale

dist\_sq=torch\.cdist\(x1s,x2s,p=2\)\.pow\(2\)

covar1=torch\.exp\(\-0\.5\*dist\_sq\)\.clamp\(min=1e\-15\)

covar2=\(1\.0\+dist\_sq/\(2\.0\*alpha\)\)\.pow\(\-alpha\)\.clamp\(min=1e\-15\)

covar=covar1\+covar2

ifdiag:

returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

returncovar

defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

dist\_sq=torch\.cdist\(x1s,x2s,p=2\)\.pow\(2\)

covar\_exp=torch\.exp\(\-0\.5\*dist\_sq\)\.clamp\(min=1e\-15\)

covar\_matern=\(1\+dist\_sq/\(2\*self\.alpha\)\)\.pow\(\-self\.alpha\)\.clamp\(min=1e\-15\)

covar\_combined=covar\_exp\+covar\_matern

ifdiag:

returncovar\_combined\.diagonal\(dim1=\-2,dim2=\-1\)

returncovar\_combined

Figure 12:Functional redundancy example from direct code generation\. Both snippets computek​\(x,x′\)=exp⁡\(−d2/2\)\+\(1\+d2/\(2​α\)\)−αk\(x,x^\{\\prime\}\)=\\exp\(\-d^\{2\}/2\)\+\(1\+d^\{2\}/\(2\\alpha\)\)^\{\-\\alpha\}\.Greendenotes variable renaming, andreddenotes syntax\-level variation\.defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

sq\_dist=torch\.cdist\(x1s,x2s\)\.pow\(2\)

covar1=torch\.exp\(\-0\.5\*sq\_dist\)

sqrt5\_d=math\.sqrt\(5\)\*torch\.cdist\(x1s,x2s\)\.clamp\(min=1e\-15\)

covar2=\(1\.0\+sqrt5\_d\+\(5\.0/3\.0\)\*sq\_dist\)\*torch\.exp\(\-sqrt5\_d\)

covar=self\.alpha\*covar1\+\(1\-self\.alpha\)\*covar2

ifdiag:

returncovar\.diagonal\(dim1=\-1,dim2=\-2\)

returncovar

defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

dist2=torch\.cdist\(x1s,x2s\)\.pow\(2\)

exp\_neg\_half\_dist2=torch\.exp\(\-0\.5\*dist2\)

scaled\_dist=torch\.cdist\(x1s,x2s\)\.clamp\(min=1e\-15\)

covar1=exp\_neg\_half\_dist2

covar2=\(1\.0\+math\.sqrt\(5\)\*scaled\_dist\+\(5\.0/3\.0\)\*dist2\)\*torch\.exp\(\-math\.sqrt\(5\)\*scaled\_dist\)

covar=self\.alpha\*covar1\+\(1\-self\.alpha\)\*covar2

ifdiag:

returncovar\.diagonal\(dim1=\-1,dim2=\-2\)

returncovar

Figure 13:Functional redundancy example from direct code generation\. Both snippets computek​\(x,x′\)=α​exp⁡\(−d2/2\)\+\(1−α\)​\(1\+5​d\+53​d2\)​exp⁡\(−5​d\)k\(x,x^\{\\prime\}\)=\\alpha\\exp\(\-d^\{2\}/2\)\+\(1\-\\alpha\)\(1\+\\sqrt\{5\}d\+\\frac\{5\}\{3\}d^\{2\}\)\\exp\(\-\\sqrt\{5\}d\)\.Greendenotes variable renaming, andreddenotes syntax\-level variation\.defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

dist2=torch\.cdist\(x1s,x2s,p=2\)\.pow\(2\)

radial\_covar=torch\.exp\(\-dist2/self\.alpha\)\.clamp\(max=1e15\)

negative\_power=\(1\+dist2\)\.pow\(\-self\.beta\)\.clamp\(min=1e\-15\)

covar=radial\_covar\*negative\_power

ifdiag:

returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

returncovar

defforward\(self,x1,x2,diag=False,\*\*params\):

device=x1\.device

x1s=x1/self\.lengthscale\.to\(device\)

x2s=x2/self\.lengthscale\.to\(device\)

dist2=torch\.cdist\(x1s,x2s,p=2\)\.pow\(2\)

radial\_covar=torch\.exp\(\-dist2/self\.alpha\.to\(device\)\)

reciprocal\_power=1\.0/\(1\.0\+dist2\)\.pow\(self\.beta\.to\(device\)\)

combined\_covar=radial\_covar\*reciprocal\_power

ifdiag:

returncombined\_covar\.diagonal\(dim1=\-2,dim2=\-1\)

returncombined\_covar

Figure 14:Functional redundancy example from direct code generation\. Both snippets computek​\(x,x′\)=exp⁡\(−d2/α\)​\(1\+d2\)−βk\(x,x^\{\\prime\}\)=\\exp\(\-d^\{2\}/\\alpha\)\(1\+d^\{2\}\)^\{\-\\beta\}\.Greendenotes variable renaming,reddenotes syntax\-level variation, andbluedenotes algebraic rewriting\.

## Appendix HExtended Ablation Studies

#### Component Ablation on Other Benchmarks

In[Figure˜6](https://arxiv.org/html/2605.20249#S6.F6), we conduct an ablation study on each component of our method on the SVM benchmark\. In this section, we summarize the ablation studies on other benchmarks, extending several combinations of our methods\. As shown in[Table˜9](https://arxiv.org/html/2605.20249#A8.T9), removing any single component consistently degrades performance\. Notably, omitting the Discovery stage or both the Discovery and the Initialization stage results in the most severe performance drops, second only to removing all components\. This suggests that these components are crucial design choices for the efficacy of the kernel discovery pipeline in high\-dimensional BO\.

Table 9:Ablation study of Kernel Discovery components across standard benchmarks\.DDdenotes the dimensionality of the task\.Bolddenotes the best entry in the column\. Experiments are conducted with 4 random seeds\.![Refer to caption](https://arxiv.org/html/2605.20249v1/x11.png)Figure 15:Ablation studies on each component of our method across other benchmarks\.
#### More Ablations on Base Population\.

For a fair comparison, we also initialize the base populations of the search\-based methods, Compositional Search and CAKE, in the same way as in our method\. We also conduct ablation studies on the base population for those baselines\. As shown in[Figure˜16](https://arxiv.org/html/2605.20249#A8.F16), the performance of those methods significantly degrades when we remove BOCK and SL kernels from the base population\. While our method also exhibits low sample efficiency without those kernels, it consistently improves the performance through discovering novel kernel structures\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x12.png)Figure 16:Ablation studies on the base population for Compositional Search and CAKE baselines\.
#### More Ablations on Evaluation Metric\.

To follow the original implementation, we use the marginal log\-likelihood \(MLL\) to select a kernel for Compositional Search and BIC\-Acquisition Kernel Ranking \(BAKER\) to select a kernel for CAKE\. To analyze the effect of the proposed evaluation metric\. We compare performance across different evaluation metrics for both our kernel discovery pipeline and search\-based baselines\. As shown in[Figure˜17](https://arxiv.org/html/2605.20249#A8.F17), performance degrades when we replace the evaluation metric with MLL, which tends to favor overly complex kernels that are likely to overfit to the current dataset\. We also observe that LOO\-CRPS improves the performance of search\-based baselines, indicating that it is a powerful metric for selecting kernels in high\-dimensional BO\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x13.png)Figure 17:Ablation studies on the evaluation metric for Compositional Search and CAKE baselines\.
#### Representative Kernel Validation Failures\.

For𝒱agn\\mathcal\{V\}\_\{\\mathrm\{agn\}\}, we test whether a generated implementation satisfies the covariance shape requirements\. GP fitting only requires the self\-covariance matrixK​\(𝐗,𝐗\)K\(\\mathbf\{X\},\\mathbf\{X\}\), but posterior prediction and acquisition evaluation also require the generally rectangular cross\-covariance matrixK​\(𝐗∗,𝐗\)K\(\\mathbf\{X\}\_\{\\ast\},\\mathbf\{X\}\)\. Accordingly, a common failure mode is that the generated code works for self\-covariance calls but breaks under cross\-covariance inputs\.[Figure˜18](https://arxiv.org/html/2605.20249#A8.F18)presents two representative examples\.

defforward\(self,x1,x2,diag=False,\*\*params\):

\#x1:\(N1,D\),x2:\(N2,D\)

\#\.\.\.inputnormalization,sphereprojection,

\#andtanhwarping\.\.\.

geodesic\_kernel=\.\.\.\#\(N1,N2\)

rq\_component\_TW=\.\.\.\#\(N1,N2\)

base\_kernel=geodesic\_kernel\*rq\_component\_TW\#\(N1,N2\)

I=torch\.eye\(x1\.size\(\-2\),device=x1\.device\)\[None\]\#\(1,N1,N1\)

regularized\_kernel=base\_kernel\+self\.regularization\_strength\*I

\#ERROR:shapemismatchwhenN1\!=N2

ifdiag:

returnregularized\_kernel\.diagonal\(dim1=\-2,dim2=\-1\)

returnregularized\_kernel

\(a\)Identity\-matrix regularization\. The addedtorch\.eye\(N1\)creates a squareN1×N1N\_\{1\}\\times N\_\{1\}term, which is only compatible with the covariance tensor shapeN1×N2N\_\{1\}\\times N\_\{2\}whenN1=N2N\_\{1\}=N\_\{2\}\.
defforward\(self,x1,x2,diag=False,\*\*params\):

\#x1:\(N1,D\),x2:\(N2,D\)

x1=\(x1\-center\)/lengthscale

x2=\(x2\-center\)/lengthscale

dist2=torch\.cdist\(x1,x2\)\.square\(\)

\#dist2:\(N1,N2\)

r1=dist2\.diagonal\(dim1=\-2,dim2=\-1\)

\#r1:\(min\(N1,N2\),\)

angular\_kernel=\.\.\.

\#angular\_kernel:\(N1,N2\)

radial\_kernel=self\.radial\_base\_kernel\(r1\.sqrt\(\),\*\*params\)

\#radial\_kernel:\(min,min\)

returnangular\_kernel\*radial\_kernel

\#ERROR:shapemismatchwhenN1\!=N2

\(b\)Implicit square term\. The diagonal extraction and sub\-kernel call produce anM×MM\\times Mblock withM=min⁡\(N1,N2\)M=\\min\(N\_\{1\},N\_\{2\}\), which is incompatible with theN1×N2N\_\{1\}\\times N\_\{2\}angular term\.

Figure 18:Representative cross\-covariance failures caught by𝒱agn\\mathcal\{V\}\_\{\\mathrm\{agn\}\}\. Both implementations passK​\(𝐗,𝐗\)K\(\\mathbf\{X\},\\mathbf\{X\}\)but fail on rectangularK​\(𝐗∗,𝐗\)K\(\\mathbf\{X\_\{\\ast\}\},\\mathbf\{X\}\)calls\. Problematic lines are highlighted in red\.For𝒱psd\\mathcal\{V\}\_\{\\mathrm\{psd\}\}, a generated implementation may satisfy the required output shape but still fail to define a valid covariance function\. A valid GP kernel must produce a positive semi\-definite Gram matrix for any finite input set\. A common failure mode is that the generated code adds terms that are not generally PSD\-preserving, such as distance\-increasing components or oscillatory transformations of pairwise distances\. Such terms can yield indefinite Gram matrices, as illustrated in[Figure˜19](https://arxiv.org/html/2605.20249#A8.F19)\.

defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

dist\_sq=torch\.cdist\(x1s,x2s\)\.pow\(2\)

rbf\_term=torch\.exp\(\-dist\_sq\)

dist\_term=torch\.sqrt\(dist\_sq\)

covar=self\.alpha\*rbf\_term\+self\.beta\*dist\_term\+self\.gamma

ifdiag:

returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

returncovar

\(a\)Distance\-increasing term\. This corresponds tok​\(x,x′\)=α​e−d2\+β​d\+γk\(x,x^\{\\prime\}\)=\\alpha e^\{\-d^\{2\}\}\+\\beta d\+\\gamma\. The added distance termd=‖x−x′‖d=\\\|x\-x^\{\\prime\}\\\|is not generally PSD\-preserving\.
defforward\(self,x1,x2,diag=False,\*\*params\):

x1s=x1/self\.lengthscale

x2s=x2/self\.lengthscale

dist\_sq=torch\.cdist\(x1s,x2s\)\.pow\(2\)

base\_term=torch\.exp\(\-0\.5\*dist\_sq\)

osc\_term=torch\.cos\(math\.pi\*dist\_sq\)

covar=self\.alpha\*base\_term\+\\

\(1\-self\.alpha\)\*osc\_term

ifdiag:

returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

returncovar

\(b\)Oscillatory distance transform\. This corresponds tok​\(x,x′\)=α​e−d2/2\+\(1−α\)​cos⁡\(π​d2\)k\(x,x^\{\\prime\}\)=\\alpha e^\{\-d^\{2\}/2\}\+\(1\-\\alpha\)\\cos\(\\pi d^\{2\}\)\. The oscillatory termcos⁡\(π​d2\)\\cos\(\\pi d^\{2\}\)is not generally PSD\-preserving\.

Figure 19:Representative PSD failures caught by𝒱psd\\mathcal\{V\}\_\{\\mathrm\{psd\}\}\. Both include terms that do not generally preserve positive semi\-definiteness and can yield indefinite Gram matrices\. Problematic terms are highlighted in red\.

## Appendix IRobustness to Different LLMs

#### Different LLMs for Other Baselines\.

We additionally evaluate LLM\-based baselines under different LLM backbones to examine whether the performance gap is sensitive to the choice of LLM\. Specifically, we compare CAKE and LMABO using GPT\-4o and GPT\-4o\-mini, and report the results together with our method in Table[10](https://arxiv.org/html/2605.20249#A9.T10)\. Across the evaluated settings, our method consistently achieves stronger BO performance, suggesting that the performance gain comes from the kernel discovery framework rather than merely from the choice of LLM backbone\.

Table 10:Performance of LLM\-based methods under different LLM backbones\. Results are averaged over 4 random seeds\. Bold denotes the best entry in each column\.MethodRover\(↑\)\(\\uparrow\)Mopta08\(↓\)\(\\downarrow\)Lasso\-DNA\(↓\)\(\\downarrow\)SVM388\(↓\)\(\\downarrow\)Humanoid\(↑\)\(\\uparrow\)\(D=100D=100\)\(D=124D=124\)\(D=180D=180\)\(D=388D=388\)\(D=6392D=6392\)Kernel Discovery \(GPT\-4o, Ours\)4\.353±\\pm0\.319216\.81±\\pm0\.870\.286±\\pm0\.0010\.056±\\pm0\.003762\.78±\\pm72\.39Kernel Discovery \(GPT\-4o\-mini, Ours\)3\.582±\\pm0\.230219\.16±\\pm1\.540\.289±\\pm0\.0020\.061±\\pm0\.004589\.28±\\pm107\.87CAKE \(GPT\-4o\)3\.412±\\pm0\.586231\.40±\\pm15\.670\.300±\\pm0\.0110\.131±\\pm0\.036667\.49±\\pm24\.99CAKE \(GPT\-4o\-mini\)3\.863±\\pm0\.497229\.43±\\pm3\.880\.290±\\pm0\.0010\.103±\\pm0\.058648\.13±\\pm29\.11LMABO \(GPT\-4o\)3\.953±\\pm0\.369240\.70±\\pm5\.240\.304±\\pm0\.0060\.226±\\pm0\.001390\.23±\\pm44\.78LMABO \(GPT\-4o\-mini\)4\.078±\\pm0\.299244\.21±\\pm3\.970\.302±\\pm0\.0050\.218±\\pm0\.016410\.09±\\pm42\.34

#### Open\-source LLMs for Kernel Discovery\.

We further evaluate whether our kernel discovery pipeline can operate with a smaller open\-source LLM\. To this end, we replace the kernel\-proposing LLM with Qwen3\-8B while keeping the rest of the pipeline unchanged\. As shown in[Table˜11](https://arxiv.org/html/2605.20249#A9.T11), GPT\-4o achieves the best performance, but the Qwen3\-8B variant still obtains competitive results across benchmarks\. Compared with the main results in[Table˜1](https://arxiv.org/html/2605.20249#S4.T1), the open\-source variant remains comparable to strong baseline methods, indicating that our framework does not rely exclusively on a proprietary LLM\. These results suggest that stronger LLMs improve the quality of discovered kernels, while the proposed pipeline remains effective even with a relatively small open\-source model\.

Table 11:Performance of Kernel Discovery with proprietary and open\-source LLMs\. Results are averaged over 4 random seeds\. Bold denotes the best entry in each column\.

## Appendix JEvolution of Discovered Kernels

#### Detailed Explanation of Discovered Kernels in Figure[7\(a\)](https://arxiv.org/html/2605.20249#S6.F7.sf1)\.

We provide an explanation of the discovered kernels highlighted in the figure\. We first define the kernel components used in the discovered kernels, and then describe each discovered kernel by its decomposition and its interpretations\.

*Kernel components\.*We first define the kernel components that appear in the discovered kernels\. For the RQ component evaluated in the original input space, letℓB∈ℝ\>0d\\boldsymbol\{\\ell\}\_\{B\}\\in\\mathbb\{R\}\_\{\>0\}^\{d\}be an ARD lengthscale,rRQ=‖𝐱⊘ℓB−𝐱′⊘ℓB‖2r\_\{\\mathrm\{RQ\}\}=\\\|\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\_\{B\}\-\\mathbf\{x\}^\{\\prime\}\\oslash\\boldsymbol\{\\ell\}\_\{B\}\\\|\_\{2\}, andα\>0\\alpha\>0\. Then

kRQ​\(𝐱,𝐱′\)=\(1\+rRQ22​α\)−α\.k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{r\_\{\\mathrm\{RQ\}\}^\{2\}\}\{2\\alpha\}\\right\)^\{\-\\alpha\}\.This component captures multi\-scale smooth variation in a separately ARD\-scaled input space\.

Several other components are evaluated after an arctangent\-based input transformation\. Given an input𝐱∈ℝd\\mathbf\{x\}\\in\\mathbb\{R\}^\{d\}and an ARD lengthscaleℓ∈ℝ\>0d\\boldsymbol\{\\ell\}\\in\\mathbb\{R\}\_\{\>0\}^\{d\}, define

𝐳0​\(𝐱\)=𝐱⊘ℓ,𝐳i​\(𝐱\)=1i​arctan⁡\(s​w​𝐳i−1​\(𝐱\)\),i=1,…,D,\\mathbf\{z\}\_\{0\}\(\\mathbf\{x\}\)=\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\},\\qquad\\mathbf\{z\}\_\{i\}\(\\mathbf\{x\}\)=\\frac\{1\}\{\\sqrt\{i\}\}\\arctan\\\!\\left\(sw\\,\\mathbf\{z\}\_\{i\-1\}\(\\mathbf\{x\}\)\\right\),\\quad i=1,\\dots,D,wheres,w\>0s,w\>0are scalar transformation parameters andD∈ℕD\\in\\mathbb\{N\}is the number of transformation layers\. We denote the final transformed feature byt​\(𝐱\)=𝐳D​\(𝐱\)\.t\(\\mathbf\{x\}\)=\\mathbf\{z\}\_\{D\}\(\\mathbf\{x\}\)\.Using this transformed feature, we define

kArc​\-​IMQ​\(𝐱,𝐱′\)=\(1\+‖t​\(𝐱\)−t​\(𝐱′\)‖22\)−1,kArc​\-​Lin​\(𝐱,𝐱′\)=t​\(𝐱\)⊤​t​\(𝐱′\),k\_\{\\mathrm\{Arc\\text\{\-\}IMQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\\|t\(\\mathbf\{x\}\)\-t\(\\mathbf\{x\}^\{\\prime\}\)\\\|\_\{2\}^\{2\}\\right\)^\{\-1\},\\quad k\_\{\\mathrm\{Arc\\text\{\-\}Lin\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=t\(\\mathbf\{x\}\)^\{\\top\}t\(\\mathbf\{x\}^\{\\prime\}\),and

kArc​\-​RQ​\(𝐱,𝐱′\)=\(1\+‖t​\(𝐱\)−t​\(𝐱′\)‖222​α\)−α\.k\_\{\\mathrm\{Arc\\text\{\-\}RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{\\\|t\(\\mathbf\{x\}\)\-t\(\\mathbf\{x\}^\{\\prime\}\)\\\|\_\{2\}^\{2\}\}\{2\\alpha\}\\right\)^\{\-\\alpha\}\.Here, the Arc\-IMQ component captures heavy\-tailed distance\-based similarity in the arctangent\-transformed feature space, the Arc\-Linear component captures global alignment in the same transformed space, and the Arc\-RQ component captures multi\-scale smooth variation after the arctangent transformation\.

One discovered kernel additionally uses an angular similarity component\. Let

𝐱~=𝐱−𝐜𝐫,ρ​\(𝐱\)=‖𝐱~‖2,𝐚​\(𝐱\)=𝐱~ρ​\(𝐱\)\.\\tilde\{\\mathbf\{x\}\}=\\frac\{\\mathbf\{x\}\-\\mathbf\{c\}\}\{\\mathbf\{r\}\},\\qquad\\rho\(\\mathbf\{x\}\)=\\\|\\tilde\{\\mathbf\{x\}\}\\\|\_\{2\},\\qquad\\mathbf\{a\}\(\\mathbf\{x\}\)=\\frac\{\\tilde\{\\mathbf\{x\}\}\}\{\\rho\(\\mathbf\{x\}\)\}\.Here𝐚​\(𝐱\)\\mathbf\{a\}\(\\mathbf\{x\}\)is the unit direction vector of the normalized input\. The polynomial angular kernel is

kang​\(𝐱,𝐱′\)=∑p=03wp​\(𝐚​\(𝐱\)⊤​𝐚​\(𝐱′\)\)p,wp\>0\.k\_\{\\mathrm\{ang\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\sum\_\{p=0\}^\{3\}w\_\{p\}\\left\(\\mathbf\{a\}\(\\mathbf\{x\}\)^\{\\top\}\\mathbf\{a\}\(\\mathbf\{x\}^\{\\prime\}\)\\right\)^\{p\},\\qquad w\_\{p\}\>0\.This component captures directional similarity relative to the normalized center\.

*Kernel 1:*

k1​\(𝐱,𝐱′\)=kArc​\-​IMQ​\(𝐱,𝐱′\)\+kArc​\-​Lin​\(𝐱,𝐱′\)\+kRQ​\(𝐱,𝐱′\)\.k\_\{1\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\mathrm\{Arc\\text\{\-\}IMQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{Arc\\text\{\-\}Lin\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\.This kernel combines heavy\-tailed distance\-based similarity and linear alignment in the arctangent\-transformed feature space with multi\-scale smooth variation in a separate ARD\-scaled input space\.

*Kernel 2:*

k2​\(𝐱,𝐱′\)=kang​\(𝐱,𝐱′\)⋅\[kArc​\-​IMQ​\(𝐱,𝐱′\)\+kArc​\-​Lin​\(𝐱,𝐱′\)\]\.k\_\{2\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\mathrm\{ang\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\cdot\\left\[k\_\{\\mathrm\{Arc\\text\{\-\}IMQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{Arc\\text\{\-\}Lin\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\right\]\.This kernel is a product of a polynomial angular kernel and an arc\-transformed additive kernel\. The angular component captures directional similarity relative to a normalized center, while the arc component captures heavy\-tailed distance\-based similarity and linear alignment in the arctangent\-transformed feature space\.

*Kernel 3:*

k3​\(𝐱,𝐱′\)=kArc​\-​RQ​\(𝐱,𝐱′\)\+kArc​\-​IMQ​\(𝐱,𝐱′\)\+kArc​\-​Lin​\(𝐱,𝐱′\)\.k\_\{3\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\mathrm\{Arc\\text\{\-\}RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{Arc\\text\{\-\}IMQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{Arc\\text\{\-\}Lin\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\.This kernel evaluates all three components in the same arctangent\-transformed feature space\. It combines multi\-scale smooth variation, heavy\-tailed distance\-based similarity, and global transformed\-space alignment under a shared nonlinear input warping\.

We also provide the correspondingforwardimplementations for the discovered kernels\.

1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4

5\#KernelA:Arc\-transformedIMQ\+Arc\-transformedLinear

6x1\_scaled\_a=x1/self\.lengthscale\_a

7x2\_scaled\_a=x2/self\.lengthscale\_a

8t1,t2=x1\_scaled\_a,x2\_scaled\_a

9foriinrange\(1,self\.depth\.item\(\)\+1\):

10t1=torch\.atan\(self\.global\_scale\*self\.arc\_weight\*t1\)/math\.sqrt\(i\)

11t2=torch\.atan\(self\.global\_scale\*self\.arc\_weight\*t2\)/math\.sqrt\(i\)

12linear\_term=t1@t2\.transpose\(\-1,\-2\)

13r\_squared\_a=torch\.cdist\(t1,t2,p=2\)\.pow\(2\)

14k\_a=\(1\+r\_squared\_a\)\.pow\(\-1\)\+linear\_term

15

16\#KernelB:RationalQuadratic

17x1\_scaled\_b=x1/self\.lengthscale\_b

18x2\_scaled\_b=x2/self\.lengthscale\_b

19r\_squared\_b=torch\.cdist\(x1\_scaled\_b,x2\_scaled\_b,p=2\)\.pow\(2\)

20k\_b=\(1\+r\_squared\_b/\(2\*self\.alpha\)\)\.pow\(\-self\.alpha\)

21

22covar=k\_a\+k\_b

23ifdiag:

24returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

25returncovar

Figure 20:Forward code for the discovered kernelk1k\_\{1\}\.1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4arc\_weight=self\.raw\_arc\_weight\_constraint\.transform\(self\.raw\_arc\_weight\)

5global\_scale=self\.raw\_global\_scale\_constraint\.transform\(self\.raw\_global\_scale\)

6angular\_weights=self\.raw\_angular\_weights\_constraint\.transform\(self\.raw\_angular\_weights\)

7

8x1\_normalized=\(x1\-self\.center\)/self\.radius

9x2\_normalized=\(x2\-self\.center\)/self\.radius

10r1=x1\_normalized\.norm\(dim=\-1,keepdim=True\)

11r2=x2\_normalized\.norm\(dim=\-1,keepdim=True\)

12a1=x1\_normalized/r1\.clamp\(min=1e\-15\)

13a2=x2\_normalized/r2\.clamp\(min=1e\-15\)

14

15t1=x1\_normalized/self\.lengthscale

16t2=x2\_normalized/self\.lengthscale

17foriinrange\(1,self\.depth\+1\):

18t1=torch\.atan\(global\_scale\*arc\_weight\*t1\)/math\.sqrt\(i\)

19t2=torch\.atan\(global\_scale\*arc\_weight\*t2\)/math\.sqrt\(i\)

20

21angular\_cov=self\.\_angular\_kernel\(a1,a2,angular\_weights\)

22t1\_dist=torch\.cdist\(t1,t2,p=2\)

23arc\_cov=\(1\+t1\_dist\.pow\(2\)\)\.pow\(\-1\)\+\(t1@t2\.transpose\(\-1,\-2\)\)

24

25covar=angular\_cov\*arc\_cov

26ifdiag:

27returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

28returncovar

Figure 21:Forward code for the discovered kernelk2k\_\{2\}\.1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4

5\#KernelA:Arc\-transformedIMQ\+Arc\-transformedLinear

6x1\_scaled\_a=x1/self\.lengthscale\_a

7x2\_scaled\_a=x2/self\.lengthscale\_a

8t1,t2=x1\_scaled\_a,x2\_scaled\_a

9foriinrange\(1,self\.depth\.item\(\)\+1\):

10t1=torch\.atan\(self\.global\_scale\*self\.arc\_weight\*t1\)/math\.sqrt\(i\)

11t2=torch\.atan\(self\.global\_scale\*self\.arc\_weight\*t2\)/math\.sqrt\(i\)

12linear\_term=t1@t2\.transpose\(\-1,\-2\)

13r\_squared\_a=torch\.cdist\(t1,t2,p=2\)\.pow\(2\)

14k\_a=\(1\+r\_squared\_a\)\.pow\(\-1\)\+linear\_term

15

16\#KernelB:RationalQuadratic

17x1\_scaled\_b=x1/self\.lengthscale\_b

18x2\_scaled\_b=x2/self\.lengthscale\_b

19r\_squared\_b=torch\.cdist\(x1\_scaled\_b,x2\_scaled\_b,p=2\)\.pow\(2\)

20k\_b=\(1\+r\_squared\_b/\(2\*self\.alpha\)\)\.pow\(\-self\.alpha\)

21

22covar=k\_a\+k\_b

23ifdiag:

24returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

25returncovar

Figure 22:Forward code for the discovered kernelk3k\_\{3\}\.
#### Evolving Population on Other Benchmarks

[Figure˜23](https://arxiv.org/html/2605.20249#A10.F23)extends the post\-analysis of[Figure˜7\(a\)](https://arxiv.org/html/2605.20249#S6.F7.sf1)to four additional benchmarks: Rover, Mopta08, Lasso\-DNA, and Humanoid\. For each benchmark, we visualize the best\-so\-far value trajectory and annotate the kernels selected at the top\-5 largest improvements\. The components of the annotated kernels are described using the same kernel vocabulary introduced above\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x14.png)Figure 23:Post\-analysis of kernel discovery on four additional benchmarks\. For each benchmark, we annotate the kernels selected at the top\-5 largest improvements in the best\-so\-far value\.For the additional discovered kernels annotated in Figure[23](https://arxiv.org/html/2605.20249#A10.F23), we provide the mathematical definitions of the component kernels used in the decompositions\.

*Matérn\-5/25/2component\.*Let

rMatérn52=‖𝐱⊘ℓMatérn52−𝐱′⊘ℓMatérn52‖2\.r\_\{\\text\{Matérn52\}\}=\\left\\\|\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\_\{\\text\{Matérn52\}\}\-\\mathbf\{x\}^\{\\prime\}\\oslash\\boldsymbol\{\\ell\}\_\{\\text\{Matérn52\}\}\\right\\\|\_\{2\}\.Then

kMatérn52​\(𝐱,𝐱′\)=\(1\+5​rMatérn52\+53​rMatérn522\)​exp⁡\(−5​rMatérn52\)\.k\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\sqrt\{5\}r\_\{\\text\{Matérn52\}\}\+\\frac\{5\}\{3\}r\_\{\\text\{Matérn52\}\}^\{2\}\\right\)\\exp\(\-\\sqrt\{5\}r\_\{\\text\{Matérn52\}\}\)\.
*Spherical lifted linear component\.*Given a scaled input𝐮​\(𝐱\)\\mathbf\{u\}\(\\mathbf\{x\}\), define the stereographic projection

ψ​\(𝐮​\(𝐱\)\)=\[2​𝐮​\(𝐱\),‖𝐮​\(𝐱\)‖22−1\]‖𝐮​\(𝐱\)‖22\+1\.\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}\)\)=\\frac\{\\left\[2\\mathbf\{u\}\(\\mathbf\{x\}\),\\;\\\|\\mathbf\{u\}\(\\mathbf\{x\}\)\\\|\_\{2\}^\{2\}\-1\\right\]\}\{\\\|\\mathbf\{u\}\(\\mathbf\{x\}\)\\\|\_\{2\}^\{2\}\+1\}\.Then

kSL​\(𝐱,𝐱′\)=λ0\+λ1​ψ​\(𝐮​\(𝐱\)\)⊤​ψ​\(𝐮​\(𝐱′\)\),λ0\+λ1=1,λ0,λ1≥0\.k\_\{\\mathrm\{SL\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\lambda\_\{0\}\+\\lambda\_\{1\}\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}\)\)^\{\\top\}\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}^\{\\prime\}\)\),\\qquad\\lambda\_\{0\}\+\\lambda\_\{1\}=1,\\;\\lambda\_\{0\},\\lambda\_\{1\}\\geq 0\.
*Neural\-network RBF component\.*Let

𝐡​\(𝐱\)=NN⁡\(𝐱⊘ℓNN\)\.\\mathbf\{h\}\(\\mathbf\{x\}\)=\\operatorname\{NN\}\\\!\\left\(\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\_\{\\mathrm\{NN\}\}\\right\)\.Then

kNN​\-​RBF​\(𝐱,𝐱′\)=exp⁡\(−‖𝐡​\(𝐱\)−𝐡​\(𝐱′\)‖222​σNN2\)\.k\_\{\\mathrm\{NN\\text\{\-\}RBF\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\exp\\left\(\-\\frac\{\\\|\\mathbf\{h\}\(\\mathbf\{x\}\)\-\\mathbf\{h\}\(\\mathbf\{x\}^\{\\prime\}\)\\\|\_\{2\}^\{2\}\}\{2\\sigma\_\{\\mathrm\{NN\}\}^\{2\}\}\\right\)\.
*Cosine warping component\.*Define

𝐯​\(𝐱\)=tanh⁡\(𝐱/rcos\),ρcos​\(𝐱\)=‖𝐯​\(𝐱\)‖2\.\\mathbf\{v\}\(\\mathbf\{x\}\)=\\tanh\(\\mathbf\{x\}/r\_\{\\mathrm\{cos\}\}\),\\qquad\\rho\_\{\\mathrm\{cos\}\}\(\\mathbf\{x\}\)=\\\|\\mathbf\{v\}\(\\mathbf\{x\}\)\\\|\_\{2\}\.Then

kcos​\(𝐱,𝐱′\)=cos⁡\(2​π​αcos​\|ρcos​\(𝐱\)−ρcos​\(𝐱′\)\|\)\.k\_\{\\mathrm\{cos\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\cos\\left\(2\\pi\\alpha\_\{\\mathrm\{cos\}\}\\left\|\\rho\_\{\\mathrm\{cos\}\}\(\\mathbf\{x\}\)\-\\rho\_\{\\mathrm\{cos\}\}\(\\mathbf\{x\}^\{\\prime\}\)\\right\|\\right\)\.
*Spherical RQ and spherical Matérn\-like components\.*Using the stereographic projectionψ​\(𝐮​\(𝐱\)\)\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}\)\), define

dsph=‖ψ​\(𝐮​\(𝐱\)\)−ψ​\(𝐮​\(𝐱′\)\)‖2\.d\_\{\\mathrm\{sph\}\}=\\\|\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}\)\)\-\\psi\(\\mathbf\{u\}\(\\mathbf\{x\}^\{\\prime\}\)\)\\\|\_\{2\}\.The spherical RQ component is

ksphRQ​\(𝐱,𝐱′\)=\(1\+dsph22​α\)−α,k\_\{\\mathrm\{sphRQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{d\_\{\\mathrm\{sph\}\}^\{2\}\}\{2\\alpha\}\\right\)^\{\-\\alpha\},and the spherical Matérn\-like component is

ksphMat​\(𝐱,𝐱′\)=\(1\+3ν​dsph\+3ν2​dsph2\)​exp⁡\(−3ν​dsph\)\.k\_\{\\mathrm\{sphMat\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{\\sqrt\{3\}\}\{\\nu\}d\_\{\\mathrm\{sph\}\}\+\\frac\{3\}\{\\nu^\{2\}\}d\_\{\\mathrm\{sph\}\}^\{2\}\\right\)\\exp\\left\(\-\\frac\{\\sqrt\{3\}\}\{\\nu\}d\_\{\\mathrm\{sph\}\}\\right\)\.whereν\>0\\nu\>0is a learnable parameter that controls the effective length scale and smoothness of the Matérn\-like component\.

*Tanh\-transformed components\.*Define the tanh embedding

𝐡tanh​\(𝐱\)=tanh⁡\(α​\(𝐱⊘ℓ\)\)\.\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}\)=\\tanh\\left\(\\alpha\(\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\)\\right\)\.For the spherical branch, define

𝐮tanh​\(𝐱\)=\(𝐡tanh​\(𝐱\)−𝐜\)⊘ℓ,\\mathbf\{u\}\_\{\\tanh\}\(\\mathbf\{x\}\)=\(\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}\)\-\\mathbf\{c\}\)\\oslash\\boldsymbol\{\\ell\},and letψtanh​\(𝐱\)=ψ​\(𝐮tanh​\(𝐱\)\)\\psi\_\{\\tanh\}\(\\mathbf\{x\}\)=\\psi\(\\mathbf\{u\}\_\{\\tanh\}\(\\mathbf\{x\}\)\)be the stereographic projection of𝐮tanh​\(𝐱\)\\mathbf\{u\}\_\{\\tanh\}\(\\mathbf\{x\}\)\. Define

rtanh⁡\-​sph=‖ψtanh​\(𝐱\)−ψtanh​\(𝐱′\)‖2\.r\_\{\\tanh\\text\{\-\}\\mathrm\{sph\}\}=\\\|\\psi\_\{\\tanh\}\(\\mathbf\{x\}\)\-\\psi\_\{\\tanh\}\(\\mathbf\{x\}^\{\\prime\}\)\\\|\_\{2\}\.Then

ktanh​\-​sphMat​\(𝐱,𝐱′\)=\(1\+2​ν​rtanh⁡\-​sph\+2​ν3​rtanh⁡\-​sph2\)​exp⁡\(−2​ν​rtanh⁡\-​sph\),k\_\{\\mathrm\{tanh\\text\{\-\}sphMat\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\sqrt\{2\\nu\}r\_\{\\tanh\\text\{\-\}\\mathrm\{sph\}\}\+\\frac\{2\\nu\}\{3\}r\_\{\\tanh\\text\{\-\}\\mathrm\{sph\}\}^\{2\}\\right\)\\exp\\left\(\-\\sqrt\{2\\nu\}r\_\{\\tanh\\text\{\-\}\\mathrm\{sph\}\}\\right\),ktanh​\-​RQ​\(𝐱,𝐱′\)=\(1\+‖𝐡tanh​\(𝐱\)−𝐡tanh​\(𝐱′\)‖222​γ\)−γ,k\_\{\\mathrm\{tanh\\text\{\-\}RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{\\\|\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}\)\-\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}^\{\\prime\}\)\\\|\_\{2\}^\{2\}\}\{2\\gamma\}\\right\)^\{\-\\gamma\},and

ktanh​\-​SL​\(𝐱,𝐱′\)=ψtanh​\(𝐱\)⊤​ψtanh​\(𝐱′\)\.k\_\{\\mathrm\{tanh\\text\{\-\}SL\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\psi\_\{\\tanh\}\(\\mathbf\{x\}\)^\{\\top\}\\psi\_\{\\tanh\}\(\\mathbf\{x\}^\{\\prime\}\)\.

## Appendix KTransferability of Discovered Kernels

#### Experiment Results on Other Benchmarks\.

In[Figure˜7\(b\)](https://arxiv.org/html/2605.20249#S6.F7.sf2), we visualize the results of the kernel discovered by our pipeline on the SVM benchmark\. In this section, we report the kernel’s results across the other benchmarks\. As shown in[Table˜12](https://arxiv.org/html/2605.20249#A11.T12), it consistently achieves competitive and often outperforms other base kernels\. We also visualize the code snippet of the kernel inLABEL:fig:discovered\_code\.

Table 12:Transferability of the discovered kernel across other benchmarks\. We compare the kernel discovered on the SVM benchmark, when transferred to the other four standard benchmarks, against base kernels\.DDdenotes the dimensionality of the task\.Bluedenotes the best entry in the column, andVioletdenotes the second best\. Experiments are conducted with 4 random seeds\.
#### Analysis on Boundary\-seeking Behavior\.

To understand why the discovered kernelkdiscoverk\_\{\\text\{discover\}\}in[Equation˜11](https://arxiv.org/html/2605.20249#S7.E11)achieves superior performance on the SVM benchmark, we analyze whether its non\-stationary componentktanh\-Polyk\_\{\\text\{tanh\\text\{\-\}Poly\}\}induces boundary\-seeking behavior\. We measure two complementary statistics over BO iterations: \(1\) the boundary hit ratio, i\.e\., the fraction of queried points lying on the boundary of the search domain, and \(2\) the observation traveling salesman distance \(OTSD\), which measures the total path length traversed across sequential queries\. As shown in[Figure˜24](https://arxiv.org/html/2605.20249#A11.F24), the discovered kernel maintains a boundary hit ratio comparable to RBF throughout optimization, and substantially lower than the Linear kernel, on both the SVM and Mopta08 benchmarks\. The OTSD of the discovered kernel similarly remains low and closely tracks that of RBF, indicating that consecutive queries tend to be spatially concentrated rather than widely scattered\. Together, these results suggest that the non\-stationary component is regularized during GP hyperparameter optimization, and that the combination of several kernel components encourages a locally concentrated query behavior, which is a key factor enabling the discovered kernel to consistently identify higher\-quality candidates\.

![Refer to caption](https://arxiv.org/html/2605.20249v1/x15.png)Figure 24:Analysis on boundary\-seeking behavior of several kernels\.
#### Detailed Explanation of the Discovered Kernel in[Equation˜11](https://arxiv.org/html/2605.20249#S7.E11)\.

We provide a detailed explanation of the discovered kernel in[Equation˜11](https://arxiv.org/html/2605.20249#S7.E11)\. This kernel combines a Matérn\-5/25/2component with an additive composition of a tanh\-polynomial component and an RQ component:

kdiscover​\(𝐱,𝐱′\)=kMatérn52​\(𝐱,𝐱′\)⋅\[ktanh​\-​Poly​\(𝐱,𝐱′\)\+kRQ​\(𝐱,𝐱′\)\]\.k\_\{\\mathrm\{discover\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=k\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\cdot\\left\[k\_\{\\mathrm\{tanh\\text\{\-\}Poly\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\+k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)\\right\]\.
*Matérn\-5/25/2component\.*Letℓ∈ℝ\>0d\\boldsymbol\{\\ell\}\\in\\mathbb\{R\}\_\{\>0\}^\{d\}be an ARD lengthscale and define

rMatérn52​\(𝐱,𝐱′\)=‖𝐱⊘ℓ−𝐱′⊘ℓ‖2\.r\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\\\|\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\-\\mathbf\{x\}^\{\\prime\}\\oslash\\boldsymbol\{\\ell\}\\right\\\|\_\{2\}\.The Matérn\-5/25/2component is

kMatérn52​\(𝐱,𝐱′\)=\(1\+5​rMatérn52\+53​rMatérn522\)​exp⁡\(−5​rMatérn52\)\.k\_\{\\text\{Matérn52\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\sqrt\{5\}r\_\{\\text\{Matérn52\}\}\+\\frac\{5\}\{3\}r\_\{\\text\{Matérn52\}\}^\{2\}\\right\)\\exp\\left\(\-\\sqrt\{5\}r\_\{\\text\{Matérn52\}\}\\right\)\.This component captures moderately smooth local correlation in the ARD\-scaled input space\.

*Tanh\-polynomial component\.*Using the same ARD\-scaled input, define the tanh\-transformed feature

𝐡tanh​\(𝐱\)=tanh⁡\(σ​\(𝐱⊘ℓ\)\),\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}\)=\\tanh\\left\(\\sigma\\left\(\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\\right\)\\right\),whereσ\>0\\sigma\>0controls the strength of the tanh projection\. The tanh\-polynomial component is

ktanh​\-​Poly​\(𝐱,𝐱′\)=∑n=02wn​\(𝐡tanh​\(𝐱\)⊤​𝐡tanh​\(𝐱′\)\)n,wn\>0\.k\_\{\\mathrm\{tanh\\text\{\-\}Poly\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\sum\_\{n=0\}^\{2\}w\_\{n\}\\left\(\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}\)^\{\\top\}\\mathbf\{h\}\_\{\\tanh\}\(\\mathbf\{x\}^\{\\prime\}\)\\right\)^\{n\},\\qquad w\_\{n\}\>0\.This component captures polynomial similarity after mapping inputs into a bounded nonlinear feature space\.

*Rational Quadratic component\.*Let

rRQ​\(𝐱,𝐱′\)=‖𝐱⊘ℓ−𝐱′⊘ℓ‖2\.r\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\\\|\\mathbf\{x\}\\oslash\\boldsymbol\{\\ell\}\-\\mathbf\{x\}^\{\\prime\}\\oslash\\boldsymbol\{\\ell\}\\right\\\|\_\{2\}\.The RQ component is

kRQ​\(𝐱,𝐱′\)=\(1\+rRQ22​α\)−α,α\>0\.k\_\{\\mathrm\{RQ\}\}\(\\mathbf\{x\},\\mathbf\{x\}^\{\\prime\}\)=\\left\(1\+\\frac\{r\_\{\\mathrm\{RQ\}\}^\{2\}\}\{2\\alpha\}\\right\)^\{\-\\alpha\},\\qquad\\alpha\>0\.This component captures multi\-scale smooth variation in the ARD\-scaled input space\.

Overall, the product structure modulates the additive tanh\-polynomial and RQ similarities by the Matérn\-5/25/2local smoothness component\.

#### Illustrative Example of Discovered Kernel\.

As a representative example, we present the full implementation of the kernel discovered from the SVM benchmark, which corresponds tokdiscoverk\_\{\\text\{discover\}\}in[Equation˜11](https://arxiv.org/html/2605.20249#S7.E11)\.

1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4x1s=x1/self\.lengthscale

5x2s=x2/self\.lengthscale

6

7\#Matern\-5/2Component

8r=torch\.cdist\(x1s,x2s,p=2\)\.clamp\(min=1e\-15\)

9sqrt5\_r=math\.sqrt\(5\.0\)\*r

10k\_matern=\(1\+sqrt5\_r\+5\.0/3\.0\*r\.pow\(2\)\)\\

11\*torch\.exp\(\-sqrt5\_r\)

12

13\#TangentialPolynomialComponent

14t1=torch\.tanh\(self\.projection\_sigma\*x1s\)

15t2=torch\.tanh\(self\.projection\_sigma\*x2s\)

16t\_ip=t1@t2\.transpose\(\-1,\-2\)

17k\_tanh\_poly=sum\(

18self\.tangent\_weights\[n\]\*t\_ip\.pow\(n\)

19forninrange\(3\)\)

20

21\#RationalQuadraticComponent

22r2=torch\.cdist\(x1s,x2s,p=2\)\.pow\(2\)

23k\_rq=\(1\+r2/\(2\*self\.alpha\)\)\.pow\(\-self\.alpha\)

24

25covar=k\_matern\*\(k\_tanh\_poly\+k\_rq\)

26ifdiag:

27returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

28returncovar

Figure 25:Code snippet of the discovered kernel from SVM benchmark\.We additionally present two discovered kernels that show strong transferability\. Using the same fixed\-kernel evaluation protocol as in[Table˜12](https://arxiv.org/html/2605.20249#A11.T12), both achieve an overall average rank of 2\.8 across five benchmarks, outperforming all standard base kernels in aggregate\.

1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4

5\#RationalQuadraticTransform

6x\_centered\_RQ1=x1/self\.lengthscale\_RQ

7x\_centered\_RQ2=x2/self\.lengthscale\_RQ

8x\_scaled\_RQ1=x\_centered\_RQ1/math\.sqrt\(self\.D\)

9x\_scaled\_RQ2=x\_centered\_RQ2/math\.sqrt\(self\.D\)

10

11\#BezierPathProjection

12t=self\.harmonic\_alpha

13path\_bezier=sum\(\(1\-t\)\*\*\(self\.control\_point\_count\-i\)\*t\*\*i\*self\.bezier\_control\_points\[\.\.\.,i,:\]

14foriinrange\(self\.control\_point\_count\)\)

15x\_path\_BZ1=x1/self\.lengthscale\_BZ

16x\_path\_BZ2=x2/self\.lengthscale\_BZ

17x\_proj\_BZ1=self\.\_inv\_stereographic\(\(x\_path\_BZ1/x\_path\_BZ1\.norm\(dim=\-1,keepdim=True\)\+path\_bezier\)/2\)

18x\_proj\_BZ2=self\.\_inv\_stereographic\(\(x\_path\_BZ2/x\_path\_BZ2\.norm\(dim=\-1,keepdim=True\)\+path\_bezier\)/2\)

19x\_scaled\_BZ1=x\_proj\_BZ1/math\.sqrt\(self\.D\)

20x\_scaled\_BZ2=x\_proj\_BZ2/math\.sqrt\(self\.D\)

21

22\#RationalQuadraticKernel

23r\_RQ2=torch\.cdist\(x\_scaled\_RQ1,x\_scaled\_RQ2,p=2\)\.pow\(2\)

24k\_RQ=\(1\+r\_RQ2/\(2\*self\.alpha\_RQ\)\)\.pow\(\-self\.alpha\_RQ\)

25

26\#Bezier\-ProjectedPolynomialKernel

27k\_BZ=\(x\_proj\_BZ1@x\_proj\_BZ2\.transpose\(\-1,\-2\)\+1\)\.pow\(3\)

28

29\#HybridKernelCovariance

30k=k\_RQ\+self\.harmonic\_alpha\*k\_BZ

31

32ifdiag:

33returnk\.diagonal\(dim1=\-2,dim2=\-1\)

34returnk

Figure 26:Code snippet of an additional discovered kernel with strong transferability\. This kernel combines an RQ component with a Bézier\-projected polynomial component\.1defforward\(self,x1,x2,diag=False,\*\*params\):

2ifx1\.dim\(\)==1:x1=x1\.unsqueeze\(\-1\)

3ifx2\.dim\(\)==1:x2=x2\.unsqueeze\(\-1\)

4

5\#RationalQuadraticcomponent

6x1\_rq=x1/self\.lengthscale

7x2\_rq=x2/self\.lengthscale

8r\_rq2=torch\.cdist\(x1\_rq,x2\_rq,p=2\)\.pow\(2\)

9k\_rq=\(1\+r\_rq2/\(2\*self\.alpha\)\)\.pow\(\-self\.alpha\)

10

11\#Sphericalcomponent

12x1\_sphere=self\.\_project\_to\_sphere\(x1/self\.lengthscale\_sphere\)

13x2\_sphere=self\.\_project\_to\_sphere\(x2/self\.lengthscale\_sphere\)

14coeffs=self\.poly\_coeffs\_sphere

15phi1=torch\.cat\(\[x1\_sphere\*coeffs\[1\]\.sqrt\(\),coeffs\[0\]\.sqrt\(\)\*torch\.ones\_like\(x1\_sphere\[\.\.\.,:1\]\)\],dim=\-1\)

16phi2=torch\.cat\(\[x2\_sphere\*coeffs\[1\]\.sqrt\(\),coeffs\[0\]\.sqrt\(\)\*torch\.ones\_like\(x2\_sphere\[\.\.\.,:1\]\)\],dim=\-1\)

17k\_sphere=phi1@phi2\.transpose\(\-1,\-2\)

18

19\#Matern\-5/2component

20x1\_m=x1/self\.lengthscale\_matern52

21x2\_m=x2/self\.lengthscale\_matern52

22r\_m=torch\.cdist\(x1\_m,x2\_m,p=2\)\.clamp\(min=1e\-15\)

23k\_m=\(1\+math\.sqrt\(5\)\*r\_m\+5/3\*r\_m\.pow\(2\)\)\*torch\.exp\(\-math\.sqrt\(5\)\*r\_m\)

24

25\#CosmicWarpingcomponent

26x1\_cosmic=torch\.tanh\(x1/self\.radius\_cosmic\)

27x2\_cosmic=torch\.tanh\(x2/self\.radius\_cosmic\)

28cosmic\_phase1=x1\_cosmic\.norm\(dim=\-1,keepdim=True\)

29cosmic\_phase2=x2\_cosmic\.norm\(dim=\-1,keepdim=True\)

30k\_cosmic=torch\.cos\(2\*math\.pi\*self\.alpha\_cosmic\*torch\.cdist\(cosmic\_phase1,cosmic\_phase2,p=2\)\)

31

32\#CombinedKernel

33covar=k\_rq\+\(k\_sphere\*k\_m\)\+k\_cosmic

34

35ifdiag:

36returncovar\.diagonal\(dim1=\-2,dim2=\-1\)

37returncovar

Figure 27:Code snippet of another additional discovered kernel with strong transferability\. This kernel combines RQ, spherical, Matérn\-5/2, and warped periodic\-like components\.

Similar Articles