SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.17671 · ICML · 2025

LILO: Bayesian Optimization with Natural Language Feedback

Lin, Maximilian Balandat, Eytan Bakshy, Zhuokai Zhao, Katarzyna Kobalczyk, Jerry Zhiyuan, Benjamin Letham

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2510.17671.json · badge: /api/ran/2510.17671.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
facebookresearch/lilo canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
data_to_string Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
facebookresearch/lilo/lilo/utility_approximator.py
code served (permissive licence) · get_code("11f5254a77744765")
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 numpy as np
import pandas as pd

# Construct small test data
y_ls = [
    np.array([0.85, 0.92, 0.78, 0.88]),
    np.array([0.91, 0.87, 0.95, 0.82])
]

feedback_ls = [
    "Good performance on this configuration",
    "Excellent results with slight variance"
]

y_names = [
    "accuracy",
    "precision",
    "recall",
    "f1_score"
]

ARGS = {
    "y_ls": y_ls,
    "feedback_ls": feedback_ls,
    "y_names": y_names,
    "masked": False,
    "markdown": 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 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
escape_unescaped_backslashes Ran
ran; our contract draft was wrong, not the code
facebookresearch/lilo/lilo/utils.py
code served (permissive licence) · get_code("4e08a17cad6eb216")
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 re

def escape_unescaped_backslashes(s: str) -> str:
    """
    This regex finds backslashes that are not already escaped
    and are not followed by a valid JSON escape character
    """
    s = re.sub('(?<!\\\\)\\\\(?!["\\\\/bfnrtu])', '\\\\\\\\', s)
    return s

# The function takes a single string parameter
# Test with various cases: strings with unescaped backslashes, escaped backslashes, etc.

ARGS = {
    "s": "path\\to\\file\\with\\backslashes"
}
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
exp_data_to_string Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
facebookresearch/lilo/lilo/utility_approximator.py
code served (permissive licence) · get_code("989f9fe010f40d11")
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 pandas as pd
import numpy as np

# Create a sample DataFrame with experimental data
data = {
    'accuracy': [0.85, 0.92, 0.88],
    'precision': [0.83, 0.90, 0.86],
    'recall': [0.87, 0.94, 0.90]
}
exp_df = pd.DataFrame(data)

# Define the arguments
ARGS = {
    'exp_df': exp_df,
    'y_names': ['accuracy', 'precision', 'recall'],
    'masked': False,
    'markdown': False,
    'start_idx': 0
}
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 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
get_p_accept Ran
ran, honoured the contract we drafted
facebookresearch/lilo/lilo/utility_approximator.py
code served (permissive licence) · get_code("110e84272aedd0f5")
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 re
from typing import Dict, List, Optional, Tuple, Union

def get_p_accept(text: str) -> Optional[float]:
    """
       Extracts the p_accept value from text using regex patterns.
       Searches for patterns like 'p_accept: 0.5' or '"p_accept": 0.5'.

       Args:
           text: The text to search for p_accept value.

       Returns:
           The extracted p_accept value as float, or None if not found.
    """
    match = re.search('p_accept\\s*[:=]\\s*([0-9]*\\.?[0-9]+)', text)
    if match:
        p_accept = float(match.group(1))
    else:
        match = re.search('"p_accept"\\s*[:=]\\s*([0-9]*\\.?[0-9]+)', text)
        if match:
            p_accept = float(match.group(1))
        else:
            p_accept = None
    if p_accept is not None:
        if p_accept < 0 or p_accept > 1:
            p_accept = None
    return p_accept


# Test case 1: text with p_accept in colon format
text1 = "p_accept: 0.7"

# Test case 2: text with p_accept in quoted format
text2 = '"p_accept": 0.5'

# Test case 3: text with p_accept using equals sign
text3 = 'p_accept = 0.3'

# Test case 4: text without p_accept
text4 = 'some random text without the parameter'

# Test case 5: text with invalid p_accept (out of range)
text5 = 'p_accept: 1.5'

ARGS = {
    "text": text1
}
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 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
sigmoid Ran
ran, honoured the contract we drafted
facebookresearch/lilo/lilo/utils.py
code served (permissive licence) · get_code("7d05e96dac85acf2")
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 ndarray, 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 numpy as np

# Create a small numpy array for testing the sigmoid function
x = np.array([[-2.0, -1.0, 0.0, 1.0],
              [2.0, 3.0, -0.5, 0.5]])

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 ndarray, 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
extract_json_from_text Not yet run
unverified (harvested, no recorded run)
facebookresearch/lilo/lilo/utils.py
code served (permissive licence) · get_code("e587fc3fb16bc3d6")
How it ran

no invocation recorded.

get_prompt Not yet run
unverified (harvested, no recorded run)
facebookresearch/lilo/lilo/human_feedback_simulator.py
code served (permissive licence) · get_code("af08af9d44db5a5c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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

Many real-world optimization problems are guided by complex, subjective preferences that are difficult to express as explicit closed-form objectives. In response, we introduce Languagein-the-Loop Optimization (LILO), a Bayesian optimization (BO) framework that employs a large language model (LLM) to translate freeform natural language feedback and prior knowledge from a decision maker into structured preference signals, going beyond the restrictive scalar or pairwise feedback formats typically assumed in preferential BO. The LLMderived preferences are integrated by a Gaussian process proxy model, enabling principled acquisition-driven exploration with calibrated uncertainty. By placing the LLM in a supporting role rather than as the optimizer itself, LILO preserves the sample efficiency and stability of BO while providing a flexible and expressive feedback interface. Across synthetic and real-world benchmarks, LILO consistently outperforms both conventional preference-based BO methods and LLM-only optimizers, with particularly strong gains in feedback-limited regimes. The code for reproducing our experimental results is available at https://github.com/facebookresearch/lilo.

For agents

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

get_harvested_code_for_paper("2510.17671")
get_code_for_paper("2510.17671")
have("2510.17671")

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

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

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

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

Connect an agent — have() is free.