SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.20708 · NeurIPS · 2023

Unexpected Improvements to Expected Improvement for Bayesian Optimization

David Eriksson, Samuel Daulton, Maximilian Balandat, Eytan Bakshy, Sebastian Ament

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.20708.json · badge: /api/ran/2310.20708.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
omerronen/scales community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
analyze_results Ran
ran on a synthesized input
omerronen/scales/les/analysis/opt_results.py
code served (permissive licence) · get_code("a71685e684ff7417")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import pickle
import numpy as np
import pandas as pd
import tempfile
import shutil

# Create a temporary directory structure with mock pickle files
tmpdir = tempfile.mkdtemp()

# Create method directories with runs
method1_dir = os.path.join(tmpdir, "method_A")
method2_dir = os.path.join(tmpdir, "method_B")
os.makedirs(method1_dir)
os.makedirs(method2_dir)

# Create runs for method_A
run1_dir = os.path.join(method1_dir, "run_1")
run2_dir = os.path.join(method1_dir, "run_2")
os.makedirs(run1_dir)
os.makedirs(run2_dir)

# Create runs for method_B
run3_dir = os.path.join(method2_dir, "run_1")
os.makedirs(run3_dir)

# Create mock pickle files with solution data
def create_mock_solution(bb_vals, quality, density, bb_diff=None):
    sol = {
        'bb_vals': np.array(bb_vals),
        'quality': np.array(quality),
        'density': np.array(density),
    }
    if bb_diff is not None:
        sol['bb_diff'] = np.array(bb_diff)
    return sol

# Create pickle files for run_1 (method_A)
for i in range(3):
    sol_data = create_mock_solution(
        bb_vals=[0.8, 0.75, 0.7],
        quality=[1.0, 1.0, 0.0],
        density=[0.5, 0.45, 0.4],
        bb_diff=[0.01, 0.02, 0.03]
    )
    with open(os.path.join(run1_dir, f'sol_{i}.pickle'), 'wb') as f:
        pickle.dump(sol_data, f)

# Create pickle files for run_2 (method_A)
for i in range(3):
    sol_data = create_mock_solution(
        bb_vals=[0.85, 0.8],
        quality=[1.0, 1.0],
        density=[0.55, 0.50],
        bb_diff=[0.005, 0.01]
    )
    with open(os.path.join(run2_dir, f'sol_{i}.pickle'), 'wb') as f:
        pickle.dump(sol_data, f)

# Create pickle files for run_1 (method_B)
for i in range(3):
    sol_data = create_mock_solution(
        bb_vals=[0.9, 0.88, 0.86],
        quality=[1.0, 1.0, 1.0],
        density=[0.6, 0.58, 0.56],
        bb_diff=[0.02, 0.025, 0.03]
    )
    with open(os.path.join(run3_dir, f'sol_{i}.pickle'), 'wb') as f:
        pickle.dump(sol_data, f)

ARGS = {
    'expr_path': tmpdir,
    'steps': 3,
    'ks': [1, 5, 10, 20],
    'mi': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fit_mll Ran
ran on a synthesized input
omerronen/scales/les/opt/bo.py
code served (permissive licence) · get_code("8ea028fc68384ad8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SimpleGP. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import gpytorch
from gpytorch.models import ExactGP
from gpytorch.means import ConstantMean
from gpytorch.kernels import ScaleKernel, RBFKernel
from gpytorch.distributions import MultivariateNormal
from gpytorch.likelihoods import GaussianLikelihood
from gpytorch.mlls import ExactMarginalLogLikelihood

torch.manual_seed(0)

# Create a small ExactGP model
class SimpleGP(ExactGP):
    def __init__(self, train_x, train_y, likelihood):
        super().__init__(train_x, train_y, likelihood)
        self.mean_module = ConstantMean()
        self.covar_module = ScaleKernel(RBFKernel())
    
    def forward(self, x):
        mean_x = self.mean_module(x)
        covar_x = self.covar_module(x)
        return MultivariateNormal(mean_x, covar_x)

# Create tiny tensors (batch=2, input_dim=4, output_dim=3)
Z = torch.randn(2, 4)
y = torch.randn(2)

# Create likelihood and model
likelihood = GaussianLikelihood()
model = SimpleGP(Z, y, likelihood)

# Create MLL (Marginal Log Likelihood)
mll = ExactMarginalLogLikelihood(likelihood, model)

ARGS = {
    "model": model,
    "mll": mll,
    "Z": Z,
    "y": y,
    "n_epochs": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gpytorch, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleGP — a SimpleGP output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleGP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_f_config Ran
ran on a synthesized input
omerronen/scales/les/nets/utils.py
code served (permissive licence) · get_code("ba2b2491a287f01e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

# Create a temporary directory structure to simulate the expected config layout
temp_dir = tempfile.mkdtemp()
configs_dir = os.path.join(temp_dir, 'configs')
os.makedirs(configs_dir, exist_ok=True)

# Create dummy config files
open(os.path.join(configs_dir, 'expressions.yaml'), 'w').close()
open(os.path.join(configs_dir, 'smiles.yaml'), 'w').close()
open(os.path.join(configs_dir, 'selfies.yaml'), 'w').close()

# Mock __file__ by creating a temporary module structure
import sys
from types import ModuleType

mock_module = ModuleType('mock_module')
mock_file_path = os.path.join(temp_dir, 'module', 'submodule', 'script.py')
os.makedirs(os.path.dirname(mock_file_path), exist_ok=True)
open(mock_file_path, 'w').close()
mock_module.__file__ = mock_file_path
sys.modules['mock_module'] = mock_module

# Define get_f_config with proper __file__ context
def get_f_config(ds):
    cfg_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(mock_file_path))), 'configs')
    if ds == 'expressions':
        return os.path.join(cfg_path, f'expressions.yaml')
    elif ds in ['molecules', 'smiles']:
        return os.path.join(cfg_path, f'smiles.yaml')
    elif ds == 'selfies':
        return os.path.join(cfg_path, f'selfies.yaml')
    else:
        raise ValueError(f'Dataset {ds} not supported')

ARGS = {
    'ds': 'expressions'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mean Ran
ran on a synthesized input
omerronen/scales/les/analysis/opt_results.py
code served (permissive licence) · get_code("fefc89892209bb98")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function mean(x) takes a single parameter x and returns np.mean(x)
# x should be a numpy array or array-like that can be passed to np.mean()

# Create a small numpy array
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize Ran
ran on a synthesized input
omerronen/scales/les/opt/bo.py
code served (permissive licence) · get_code("cfb615172f69f27e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for normalization
# z: tensor to normalize
z = torch.randn(2, 4)

# lb: lower bound
lb = torch.tensor([[0.0, -1.0, -2.0, -3.0],
                   [0.0, -1.0, -2.0, -3.0]])

# ub: upper bound
ub = torch.tensor([[10.0, 1.0, 2.0, 3.0],
                   [10.0, 1.0, 2.0, 3.0]])

ARGS = {
    "z": z,
    "lb": lb,
    "ub": ub
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sem Ran
ran on a synthesized input
omerronen/scales/les/analysis/opt_results.py
code served (permissive licence) · get_code("2a3bcb1b2a8a09ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function `sem` computes the standard error of the mean
# It takes a single parameter `x` which should be a numpy array
# It uses:
# - np.sum() with ~np.isnan(x) to count non-NaN values
# - np.nanstd(x) to compute standard deviation ignoring NaNs
# - np.sqrt(n) to compute square root

# Create a small numpy array with some values and potentially some NaNs
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0, np.nan, 7.0])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unnormalize Ran
ran on a synthesized input
omerronen/scales/les/opt/bo.py
code served (permissive licence) · get_code("b1ad8495ae416cec")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the unnormalize function
# z: normalized tensor (batch_size=2, features=4)
z = torch.randn(2, 4)

# lb: lower bound tensor (batch_size=2, features=4)
lb = torch.tensor([[0.0, 1.0, 2.0, 3.0],
                   [0.5, 1.5, 2.5, 3.5]])

# ub: upper bound tensor (batch_size=2, features=4)
ub = torch.tensor([[10.0, 11.0, 12.0, 13.0],
                   [10.5, 11.5, 12.5, 13.5]])

ARGS = {
    'z': z,
    'lb': lb,
    'ub': ub
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wall_clock Ran
ran on a synthesized input
omerronen/scales/les/analysis/wall_clock.py
code served (permissive licence) · get_code("bfb877ba00317767")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import time

# Set seed for reproducibility
torch.manual_seed(0)

# Create a simple callable function that takes one argument
def simple_function(z):
    """A simple function that performs some computation"""
    # Simulate some work
    result = z * 2
    return result

# Create a simple tensor to pass as argument
test_tensor = torch.randn(2, 4)

# Define the arguments for wall_clock
ARGS = {
    'f': simple_function,
    'z': test_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_distance_to_train Not yet run
unverified (harvested, no recorded run)
omerronen/scales/les/analysis/ood.py
code served (permissive licence) · get_code("dc692d5ad7f839fc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Expected Improvement (EI) is arguably the most popular acquisition function in Bayesian optimization and has found countless successful applications, but its performance is often exceeded by that of more recent methods. Notably, EI and its variants, including for the parallel and multi-objective settings, are challenging to optimize because their acquisition values vanish numerically in many regions. This difficulty generally increases as the number of observations, dimensionality of the search space, or the number of constraints grow, resulting in performance that is inconsistent across the literature and most often sub-optimal. Herein, we propose LogEI, a new family of acquisition functions whose members either have identical or approximately equal optima as their canonical counterparts, but are substantially easier to optimize numerically. We demonstrate that numerical pathologies manifest themselves in "classic" analytic EI, Expected Hypervolume Improvement (EHVI), as well as their constrained, noisy, and parallel variants, and propose corresponding reformulations that remedy these pathologies. Our empirical results show that members of the LogEI family of acquisition functions substantially improve on the optimization performance of their canonical counterparts and surprisingly, are on par with or exceed the performance of recent state-of-the-art acquisition functions, highlighting the understated role of numerical optimization in the literature.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.20708")
get_code_for_paper("2310.20708")
have("2310.20708")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.20708.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.20708.svg)](https://syntology.ai/paper/2310.20708)

Connect an agent — have() is free.