SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06850 · NeurIPS · 2022

Sample-Then-Optimize Batch Neural Thompson Sampling

Zhongxiang Dai, Bryan Kian, Hsiang Low, Patrick Jaillet, Yao Shu

arXiv · PDF · Open in the Atlas

Code that ran

1 of 1 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 0 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; 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/2210.06850.json · badge: /api/ran/2210.06850.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
daizhongxiang/sto-bnts canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
heuristic_Controller Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
daizhongxiang/sto-bnts/lunar_sto_bnts.py
code served (permissive licence) · get_code("e9de63bfc89c6e12")
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) and returned int, ndim 0, dtype family int, 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 numpy as np

# Analyze the function signature and body:
# - s: indexed with [0], [1], [2], [3], [4], [5], [6], [7] -> needs at least 8 elements
# - w: indexed with [0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11] -> needs at least 12 elements
# - Both are used with numpy operations (np.abs)
# - s[6] and s[7] are used in boolean context

# Create s: state vector with 8 elements
s = np.array([
    0.5,      # s[0]: position/angle input
    0.3,      # s[1]: height
    0.2,      # s[2]: another state
    0.1,      # s[3]: velocity
    0.15,     # s[4]: angle
    0.05,     # s[5]: angular velocity
    False,    # s[6]: boolean flag
    False     # s[7]: boolean flag
], dtype=object)  # Use object dtype to allow mixed types

# Create w: weight/parameter vector with 12 elements
w = np.array([
    0.8,      # w[0]: coefficient
    0.6,      # w[1]: coefficient
    0.4,      # w[2]: angle limit
    0.3,      # w[3]: hover coefficient
    0.5,      # w[4]: angle error gain
    0.2,      # w[5]: damping
    0.7,      # w[6]: hover gain
    0.1,      # w[7]: hover damping
    0.9,      # w[8]: emergency angle command
    0.4,      # w[9]: emergency hover damping
    0.25,     # w[10]: hover threshold
    0.35      # w[11]: angle threshold
], dtype=float)

ARGS = {
    "s": s,
    "w": w
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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

Also present in other papers' code

Of 1 samples lifted from this paper's linked repositories, 1 carry a function identity and 0 do not. Of the 1 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
heuristic_Controller 1 other paper
1 dated earlier
2206.13326 (2022-06)
A penalisation method for batch multi-objective Bayesian optimisation with application in heat exchanger design

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-22.

Repositories linked to this paper

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

Abstract

Bayesian optimization (BO), which uses a Gaussian process (GP) as a surrogate to model its objective function, is popular for black-box optimization. However, due to the limitations of GPs, BO underperforms in some problems such as those with categorical, high-dimensional or image inputs. To this end, recent works have used the highly expressive neural networks (NNs) as the surrogate model and derived theoretical guarantees using the theory of neural tangent kernel (NTK). However, these works suffer from the limitations of the requirement to invert an extremely large parameter matrix and the restriction to the sequential (rather than batch) setting. To overcome these limitations, we introduce two algorithms based on the Thompson sampling (TS) policy named Sample-Then-Optimize Batch Neural TS (STO-BNTS) and STO-BNTS-Linear. To choose an input query, we only need to train an NN (resp. a linear model) and then choose the query by maximizing the trained NN (resp. linear model), which is equivalently sampled from the GP posterior with the NTK as the kernel function. As a result, our algorithms sidestep the need to invert the large parameter matrix yet still preserve the validity of the TS policy. Next, we derive regret upper bounds for our algorithms with batch evaluations, and use insights from batch BO and NTK to show that they are asymptotically no-regret under certain conditions. Finally, we verify their empirical effectiveness using practical AutoML and reinforcement learning experiments.

For agents

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

get_harvested_code_for_paper("2210.06850")
get_code_for_paper("2210.06850")
have("2210.06850")

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

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

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

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

Connect an agent — have() is free.