SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.17535 · ICML · 2023

PFNs4BO: In-Context Learning for Bayesian Optimization

Frank Hutter, Matthias Feurer, Noah Hollmann

arXiv · PDF · Open in the Atlas

Code that ran

20 of 23 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 15 have no contract verdict; 4 failures of our instrument; 3 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/2305.17535.json · badge: /api/ran/2305.17535.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
uber/bayesmark canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
automl/PFNs4BO canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
releaunifreiburg/HPO-B community
Papers with Code archive
5 ran · 0 no recorded run
automl/pfns4bo community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
ExactGPLayer Ran
ran on a synthesized input · constructed an object; no result was computed
releaunifreiburg/HPO-B/methods/fsbo/fsbo_modules.py
code served (permissive licence) · get_code("63119f7d9577e6aa")
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 an instance of its own class, ExactGPLayer: the run constructed the object and did not call it, so no result was computed. 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 torch
import gpytorch

torch.manual_seed(0)

# Create small training data
train_x = torch.randn(2, 4)  # 2 samples, 4 dimensions
train_y = torch.randn(2)      # 2 labels

# Create likelihood
likelihood = gpytorch.likelihoods.GaussianLikelihood()

# Create config dict with required keys
config = {
    'kernel': 'rbf',
    'ard': True,
    'nu': 2.5
}

# Dimensions parameter
dims = 4

ARGS = {
    'train_x': train_x,
    'train_y': train_y,
    'likelihood': likelihood,
    'config': config,
    'dims': dims
}
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 ExactGPLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ExactGPLayer 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
FSBO Ran
ran on a synthesized input · constructed an object; no result was computed
releaunifreiburg/HPO-B/methods/fsbo/fsbo_modules.py
code served (permissive licence) · get_code("a45fecfa89d66add")
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 an instance of its own class, FSBO: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np
import os
import tempfile

torch.manual_seed(0)
np.random.seed(0)

# Create a temporary directory for checkpoints
checkpoint_path = tempfile.mkdtemp()

# Create minimal train_data and valid_data
# The code expects dictionaries where keys are task names
# and values are dicts with 'X' and 'y' keys
train_data = {
    'task_1': {
        'X': np.random.randn(8, 4).astype(np.float32),
        'y': np.random.randn(8).astype(np.float32)
    },
    'task_2': {
        'X': np.random.randn(8, 4).astype(np.float32),
        'y': np.random.randn(8).astype(np.float32)
    }
}

valid_data = {
    'task_1': {
        'X': np.random.randn(6, 4).astype(np.float32),
        'y': np.random.randn(6).astype(np.float32)
    },
    'task_2': {
        'X': np.random.randn(6, 4).astype(np.float32),
        'y': np.random.randn(6).astype(np.float32)
    }
}

ARGS = {
    'train_data': train_data,
    'valid_data': valid_data,
    'checkpoint_path': checkpoint_path,
    'batch_size': 2,
    'test_batch_size': 2,
    'n_inner_steps': 1,
    'kernel': 'matern',
    'ard': False,
    'nu': 2.5,
    'hidden_size': [8, 8, 8, 8]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gpytorch, numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FSBO — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FSBO 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
releaunifreiburg/HPO-B/methods/fsbo/fsbo_modules.py
code served (permissive licence) · get_code("6b43f439029eab3f")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_size": 4,
    "hidden_size": [32, 32, 32, 32],
    "dropout": 0.0
}
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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
Metric Ran
ran on a synthesized input · constructed an object; no result was computed
releaunifreiburg/HPO-B/methods/fsbo/fsbo_modules.py
code served (permissive licence) · get_code("eef091a071004fbd")
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 an instance of its own class, Metric: the run constructed the object and did not call it, so no result was computed. 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

ARGS = {
    'prefix': 'val: '
}
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 Metric — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Metric 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
SeqBN Ran
ran on a synthesized input · constructed an object; no result was computed
automl/pfns4bo/pfns4bo/transformer.py
code served (permissive licence) · get_code("75067bd5ded03a56")
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 an instance of its own class, SeqBN: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

class SeqBN(nn.Module):

    def __init__(self, d_model):
        super().__init__()
        self.bn = nn.BatchNorm1d(d_model)
        self.d_model = d_model

    def forward(self, x):
        assert self.d_model == x.shape[-1]
        flat_x = x.view(-1, self.d_model)
        flat_x = self.bn(flat_x)
        return flat_x.view(*x.shape)

# Test the module with valid arguments
d_model = 4
model = SeqBN(d_model)

# Create a sample input tensor with shape (batch, seq_len, d_model)
x = torch.randn(2, 3, d_model)

ARGS = {
    "d_model": d_model
}
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 SeqBN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SeqBN 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
TransformerEncoderDiffInit Ran
ran on a synthesized input · constructed an object; no result was computed
automl/pfns4bo/pfns4bo/transformer.py
code served (permissive licence) · get_code("0fc24036211faaaa")
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 an instance of its own class, TransformerEncoderDiffInit: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small encoder layer creator function
def encoder_layer_creator():
    return nn.TransformerEncoderLayer(
        d_model=4,
        nhead=2,
        dim_feedforward=8,
        batch_first=False
    )

# Create a small layer normalization
norm = nn.LayerNorm(4)

# Create small tensors for testing
# src: (seq_len, batch_size, d_model)
src = torch.randn(3, 2, 4)

# mask: optional attention mask (seq_len, seq_len)
mask = None

# src_key_padding_mask: optional padding mask (batch_size, seq_len)
src_key_padding_mask = None

ARGS = {
    "encoder_layer_creator": encoder_layer_creator,
    "num_layers": 2,
    "norm": norm
}
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 TransformerEncoderDiffInit — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerEncoderDiffInit 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
TransformerEncoderLayer Ran
ran on a synthesized input · constructed an object; no result was computed
automl/pfns4bo/pfns4bo/transformer.py
code served (permissive licence) · get_code("a5e5843ed74ae0a8")
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 an instance of its own class, TransformerEncoderLayer: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
from torch.nn import MultiheadAttention, Linear, Dropout, LayerNorm
from torch.nn.modules.transformer import _get_activation_fn

torch.manual_seed(0)

# Create sample input tensor
# Shape: (seq_len, batch, d_model) for batch_first=False
src = torch.randn(10, 2, 512)

# Optional mask tensors
src_mask = None
src_key_padding_mask = None

ARGS = {
    'd_model': 512,
    'nhead': 8,
    'dim_feedforward': 2048,
    'dropout': 0.1,
    'activation': 'relu',
    'layer_norm_eps': 1e-5,
    'batch_first': False,
    'pre_norm': False,
    'device': None,
    'dtype': None,
    'recompute_attn': False,
    'save_trainingset_representations': False,
}
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 TransformerEncoderLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerEncoderLayer 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
arg_safe_str Ran
ran on a synthesized input
uber/bayesmark/bayesmark/experiment_launcher.py
code served (permissive licence) · get_code("d7f53b32976ced36")
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 torch

torch.manual_seed(0)

def _is_arg_safe(ss):
    """Check if `str` is safe as argument to `argparse`."""
    if len(ss) == 0:
        return False
    safe = ss[0] != '-'
    return safe

def arg_safe_str(val):
    """Cast value as `str`, raise error if not safe as argument to `argparse`."""
    ss = str(val)
    if not _is_arg_safe(ss):
        raise ValueError('%s is not safe for argparse' % ss)
    return ss

# Valid test cases
ARGS = {
    'val': 42
}
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 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
arg_to_str Ran
ran on a synthesized input
uber/bayesmark/bayesmark/cmd_parse.py
code served (permissive licence) · get_code("e14ad665fb269166")
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 torch
import numpy as np

torch.manual_seed(0)

class MockArg:
    def __init__(self, name):
        self.name = name
    
    def __str__(self):
        return f"module.{self.name}"

# The function arg_to_str takes an argument, converts it to string,
# splits on '.', and returns the second part (dest).
# It expects the string representation to contain a '.' character.

arg = MockArg("test_destination")

ARGS = {
    "arg": arg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
bool_mask_to_att_mask Ran
ran, violated the contract we drafted
automl/pfns4bo/pfns4bo/transformer.py
code served (permissive licence) · get_code("5c9aeabdd9c0592a")
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)

# The function takes a boolean mask tensor and converts it to an attention mask
# It expects a tensor with 0s and 1s, and converts:
# - 0 -> -inf (masked out positions)
# - 1 -> 0.0 (attended positions)

# Create a small boolean mask tensor with shape (2, 4)
mask = torch.tensor([
    [1, 1, 0, 0],
    [1, 0, 1, 1]
], dtype=torch.long)

ARGS = {
    "mask": mask
}
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
expected_max Ran
ran on a synthesized input
uber/bayesmark/bayesmark/expected_max.py
code served (permissive licence) · get_code("ebc5e6b82ad05d37")
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

np.random.seed(0)

# Create a simple 1D data set
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

# Create scalar m value
m = 3

ARGS = {
    "x": x,
    "m": m,
}
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 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
expected_min Ran
ran on a synthesized input
uber/bayesmark/bayesmark/expected_max.py
code served (permissive licence) · get_code("67e25bdc1919213b")
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 up arguments for expected_min function
# Parameters: x (1D numpy array), m (int or numpy array of ints)

# Create a simple 1D data set
x = np.array([1.5, 2.3, 3.1, 4.7, 5.2])

# Create m as an int
m = 2

ARGS = {
    "x": x,
    "m": m,
}
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 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
get_expected_max_weights Ran
ran on a synthesized input
uber/bayesmark/bayesmark/expected_max.py
code served (permissive licence) · get_code("db39ace284e8c2b7")
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 1, dtype family float, shape (5,) 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
from scipy.special import gammaln, logsumexp

# Test case 1: scalar n and m
n1 = 5
m1 = 2

# Test case 2: scalar n and array m
n2 = 10
m2 = np.array([1, 3, 5])

# Test case 3: scalar n and m at boundary
n3 = 3
m3 = 1

ARGS = {
    "n": 5,
    "m": 2
}
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 1, dtype family float, shape (5,) — shape (5,) 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
isclose_lte Ran
ran on a synthesized input
uber/bayesmark/bayesmark/np_util.py
code served (permissive licence) · get_code("48c5d2f57a53830c")
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 1, dtype family float, shape (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 sample numpy arrays for testing isclose_lte
# The function checks if x <= y element-wise (with tolerance for floating point)

x = np.array([1.0, 2.0, 3.0, 4.0])
y = np.array([1.0000001, 2.5, 3.0, 5.0])

ARGS = {
    "x": x,
    "y": y,
}
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 1, dtype family float, shape (4,) — shape (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
log01 Ran
ran; our contract draft was wrong, not the code
automl/PFNs4BO/pfns4bo/scripts/acquisition_functions.py
code served (permissive licence) · get_code("42aa387052bae4f8")
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 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
import math

torch.manual_seed(0)

# Create a small tensor with values between 0 and 1 for testing
x = torch.rand(2, 4)

# Test case 1: input_between_zero_and_one=False (default)
ARGS = {
    "x": x,
    "eps": 1e-07,
    "input_between_zero_and_one": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
scipy, sklearn, 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
log01_batch Ran
ran; our contract draft was wrong, not the code
automl/PFNs4BO/pfns4bo/scripts/acquisition_functions.py
code served (permissive licence) · get_code("863625149dc838e6")
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 Tensor, ndim 3, dtype family float, shape (1, 10, 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
import math

torch.manual_seed(0)

# Create a small tensor with shape (batch_size=2, features=4)
# The function uses x.shape[-1] to get the last dimension
# and accesses x[:, b, b] so we need a 3D tensor after repeat
x = torch.rand(2, 4) + 0.1  # Add 0.1 to ensure values are away from 0

ARGS = {
    "x": x,
    "eps": 1e-07,
    "input_between_zero_and_one": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
scipy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (1, 10, 4) — shape (1, 10, 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
lognormed_batch Ran
ran; our contract draft was wrong, not the code
automl/PFNs4BO/pfns4bo/scripts/acquisition_functions.py
code served (permissive licence) · get_code("3d1bfce58b071127")
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 Tensor, ndim 3, dtype family float, shape (2, 16, 3) 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 numpy as np

torch.manual_seed(0)

# Construct a small tensor for x
# Shape: (batch_size=2, features=4, samples=3)
# The function will repeat it to (2, 4+1=5, 3)
x = torch.randn(2, 4, 3, dtype=torch.float32)

# eval_pos is an integer index used for computing mean/std
eval_pos = 1

# eps is a small constant for numerical stability
eps = 1e-07

ARGS = {
    "x": x,
    "eval_pos": eval_pos,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 16, 3) — shape (2, 16, 3) 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
random_seed Ran
ran on a synthesized input
uber/bayesmark/bayesmark/np_util.py
code served (permissive licence) · get_code("aa2c8eadd32e1af0")
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 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

# The function uses numpy.random.RandomState's randint method
# Create a valid RandomState instance
random_state = np.random.RandomState(seed=42)

ARGS = {
    "random": random_state
}
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 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
strat_split Ran
ran on a synthesized input
uber/bayesmark/bayesmark/np_util.py
code served (permissive licence) · get_code("a1efc44f1758e02c")
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 list, ndim 2, dtype family int; 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

# Create a small 2D array for testing
X = np.array([
    [1, 2, 3, 4],
    [5, 6, 7, 8],
    [9, 10, 11, 12]
], dtype=np.int32)

# Create a random state
random_state = np.random.RandomState(seed=42)

ARGS = {
    'X': X,
    'n_splits': 3,
    'inplace': False,
    'random': random_state
}
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 list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
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
totorch Ran
ran; our contract draft was wrong, not the code
releaunifreiburg/HPO-B/methods/fsbo/fsbo_modules.py
code served (permissive licence) · get_code("a6b7d679f45f2735")
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
import numpy as np

torch.manual_seed(0)

# Construct arguments for totorch(x, device)
x = np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
device = torch.device('cpu')

ARGS = {
    'x': x,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
TransformerModel Not yet run
unverified (harvested, no recorded run)
automl/pfns4bo/pfns4bo/transformer.py
code served (permissive licence) · get_code("726be38598e80ba6")
How it ran

no invocation recorded.

namespace_to_dict Not yet run
unverified (harvested, no recorded run)
uber/bayesmark/bayesmark/cmd_parse.py
code served (permissive licence) · get_code("00ee81526cac814f")
How it ran

no invocation recorded.

serializable_dict Not yet run
unverified (harvested, no recorded run)
uber/bayesmark/bayesmark/cmd_parse.py
code served (permissive licence) · get_code("70bd99eccb2d2020")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 19 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
SeqBN
brick of this paper's assembly: helper
6 other papers
1 dated earlier, 5 later · 6 only as an assembly brick
2112.10510 (2021-12)
Transformers Can Do Bayesian Inference
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2505.10704 (2025-05)
ZEUS: Zero-shot Embeddings for Unsupervised Separation of Tabular Data
and 3 more not named here
bool_mask_to_att_mask
brick of this paper's assembly: helper
4 other papers
4 later · 4 only as an assembly brick
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2505.10704 (2025-05)
ZEUS: Zero-shot Embeddings for Unsupervised Separation of Tabular Data
2506.06039 (2025-06)
Do-PFN: In-Context Learning for Causal Effect Estimation
and 1 more not named here
TransformerEncoderDiffInit
brick of this paper's assembly: model
2 other papers
2 later · 2 only as an assembly brick
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2505.10704 (2025-05)
ZEUS: Zero-shot Embeddings for Unsupervised Separation of Tabular Data
totorch
brick of this paper's assembly: data_transform
1 other paper
1 later
2510.21379 (2025-10)
Cost-Sensitive Freeze-thaw Bayesian Optimization for Efficient Hyperparameter Tuning

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

In this paper, we use Prior-data Fitted Networks (PFNs) as a flexible surrogate for Bayesian Optimization (BO). PFNs are neural processes that are trained to approximate the posterior predictive distribution (PPD) through in-context learning on any prior distribution that can be efficiently sampled from. We describe how this flexibility can be exploited for surrogate modeling in BO. We use PFNs to mimic a naive Gaussian process (GP), an advanced GP, and a Bayesian Neural Network (BNN). In addition, we show how to incorporate further information into the prior, such as allowing hints about the position of optima (user priors), ignoring irrelevant dimensions, and performing non-myopic BO by learning the acquisition function. The flexibility underlying these extensions opens up vast possibilities for using PFNs for BO. We demonstrate the usefulness of PFNs for BO in a large-scale evaluation on artificial GP samples and three different hyperparameter optimization testbeds: HPO-B, Bayesmark, and PD1. We publish code alongside trained models at github.com/automl/PFNs4BO.

For agents

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

get_harvested_code_for_paper("2305.17535")
get_code_for_paper("2305.17535")
have("2305.17535")

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

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

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

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

Connect an agent — have() is free.