SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.09379 · 2020

Sequential Bayesian Experimental Design for Implicit Models via Mutual Information

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-21; 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/2003.09379.json · badge: /api/ran/2003.09379.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
stevenkleinegesse/seqbed community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
MEstimator Ran
ran on a synthesized input
stevenkleinegesse/seqbed/src/seqbed/robust.py
code served (permissive licence) · get_code("270017c17f0fa73f")
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 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 numpy as np
import scipy.optimize as sco

def Psi(x):
    """
    Transformation used in the robust MEstimator.

    Parameters
    ----------
    x: float
        Robust mean estimate.
    """
    if x >= 0:
        p = np.log(1 + x + 0.5 * x ** 2)
    else:
        p = -np.log(1 - x + 0.5 * x ** 2)
    return p

def Root(x, samples):
    """
    Computes a non-linear function over a set of robust mean estimates.

    Parameters
    ----------
    x: float
        Robust mean estimate.
    samples: np.ndarray
        Array of values over which to compute the robust mean.
    """
    alpha = np.sqrt(2 / (len(samples) * np.std(samples)))
    inp = alpha * (samples - x)
    F_i = np.array([Psi(i) for i in inp])
    F = np.sum(F_i)
    return F

def MEstimator(samples):
    """
    Computes the robust mean of 'samples'.

    Parameters
    ----------
    samples: np.ndarray
        Array of values over which to compute the robust mean.
    """
    mu = np.mean(samples)
    data_opt = sco.root(Root, mu, args=samples, tol=1e-14, method='broyden1')
    return data_opt.x

np.random.seed(42)
samples = np.array([1.0, 2.5, 3.1, 2.9, 1.8, 3.2, 2.1, 2.8])

ARGS = {
    "samples": samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
Psi Ran
ran on a synthesized input
stevenkleinegesse/seqbed/src/seqbed/robust.py
code served (permissive licence) · get_code("5536303a60fdf9a9")
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 Psi takes a single float parameter x
# It performs a transformation based on whether x is non-negative or negative
# No complex objects needed - just a scalar float value

ARGS = {
    "x": 0.5
}
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
Root Ran
ran on a synthesized input
stevenkleinegesse/seqbed/src/seqbed/robust.py
code served (permissive licence) · get_code("1c356fe2304e9954")
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

# Set random seed for reproducibility
np.random.seed(0)

# Create sample data for the Root function
# The function expects:
# - x: a float (robust mean estimate)
# - samples: np.ndarray of values

x_value = 0.5
samples_value = np.array([1.2, 2.3, 0.8, 1.5, 2.1, 0.9, 1.8, 2.4])

ARGS = {
    "x": x_value,
    "samples": samples_value
}
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
fun_dfun Ran
ran; our contract draft was wrong, not the code
stevenkleinegesse/seqbed/src/seqbed/methods.py
code served (permissive licence) · get_code("ed9d6f8206e51233")
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 tuple. 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
from unittest.mock import Mock, MagicMock

# Create a mock GPyOpt model that supports predict_withGradients
mock_model = Mock()

# predict_withGradients returns a tuple of (predictions, uncertainties, gradients)
# We need to return values that match the indexing in the function:
# pred = obj.model.predict_withGradients(d)[0][0][0]
# d_pred = obj.model.predict_withGradients(d)[2][0]

predictions = np.array([[5.0]])  # Shape (1, 1) for [0][0][0] indexing
uncertainties = np.array([[0.5]])  # Not used but part of standard return
gradients = np.array([[0.1, 0.2, 0.3, 0.4]])  # Shape (1, 4) for [2][0] indexing

mock_model.predict_withGradients.return_value = (
    predictions,
    uncertainties,
    gradients
)

# Create a mock GPyOpt object with the model
obj = Mock()
obj.model = mock_model

# Create a mock GPyOpt space with indicator_constraints method
space = Mock()

# indicator_constraints should return a mask (scalar or array)
# Based on usage: float(pred * mask), it should be a scalar or broadcastable
space.indicator_constraints.return_value = 1.0

# Create a design vector d with shape (1, 4)
d = np.array([[0.5, 0.3, 0.7, 0.2]])

ARGS = {
    "obj": obj,
    "space": space,
    "d": d
}
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 tuple — a tuple output has no array shape of its own; none is 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
indicator_boundaries Ran
ran, honoured the contract we drafted
stevenkleinegesse/seqbed/src/seqbed/methods.py
code served (permissive licence) · get_code("6f1dad4692c9062d")
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 ndarray, ndim 2, dtype family float, shape (1, 1) 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

# The function takes two parameters:
# 1. bounds: np.ndarray - should be a 2D array where bounds.T has shape (2, d)
#    meaning bounds has shape (d, 2) with lower and upper bounds for each dimension
# 2. d: np.ndarray - a 1D design array that will be compared against bounds

# Create a small design space with 4 dimensions
# bounds should have shape (4, 2) - 4 dimensions, each with [lower, upper]
bounds = np.array([
    [0.0, 1.0],      # dimension 0: bounds from 0 to 1
    [0.0, 2.0],      # dimension 1: bounds from 0 to 2
    [-1.0, 1.0],     # dimension 2: bounds from -1 to 1
    [0.5, 3.5]       # dimension 3: bounds from 0.5 to 3.5
])

# Create a design point that is within the bounds
# This should return ind = 1.0
d = np.array([0.5, 1.0, 0.0, 2.0])

ARGS = {
    "bounds": bounds,
    "d": d
}
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 ndarray, ndim 2, dtype family float, shape (1, 1) — shape (1, 1) 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 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 3 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
fun_dfun 2 other papers
2 dated earlier
1810.09912 (2018-10)
Efficient Bayesian Experimental Design for Implicit Models
2002.08129 (2020-02)
Bayesian Experimental Design for Implicit Models by Mutual Information Neural Estimation
indicator_boundaries 2 other papers
2 dated earlier
1810.09912 (2018-10)
Efficient Bayesian Experimental Design for Implicit Models
2002.08129 (2020-02)
Bayesian Experimental Design for Implicit Models by Mutual Information Neural Estimation

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

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 experimental design (BED) is a framework that uses statistical models and decision making under uncertainty to optimise the cost and performance of a scientific experiment. Sequential BED, as opposed to static BED, considers the scenario where we can sequentially update our beliefs about the model parameters through data gathered in the experiment. A class of models of particular interest for the natural and medical sciences are implicit models, where the data generating distribution is intractable, but sampling from it is possible. Even though there has been a lot of work on static BED for implicit models in the past few years, the notoriously difficult problem of sequential BED for implicit models has barely been touched upon. We address this gap in the literature by devising a novel sequential design framework for parameter estimation that uses the Mutual Information (MI) between model parameters and simulated data as a utility function to find optimal experimental designs, which has not been done before for implicit models. Our approach uses likelihood-free inference by ratio estimation to simultaneously estimate posterior distributions and the MI. During the sequential BED procedure we utilise Bayesian optimisation to help us optimise the MI utility. We find that our framework is efficient for the various implicit models tested, yielding accurate parameter estimates after only a few iterations.

For agents

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

get_harvested_code_for_paper("2003.09379")
get_code_for_paper("2003.09379")
have("2003.09379")

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

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

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

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

Connect an agent — have() is free.