SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.06076 · 2019

Expressive Priors in Bayesian Neural Networks: Kernel Combinations and Periodic Functions

arXiv · PDF · Open in the Atlas

Code that ran

6 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 6 have no contract verdict; 0 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/1905.06076.json · badge: /api/ran/1905.06076.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
TeaPearce/Expressive_Priors_in_BNNs community (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
compare_dist Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_utils.py
code served (permissive licence) · get_code("8ac77fe0875d7eb0")
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
import torch

torch.manual_seed(0)

# Create small numpy arrays for the four parameters
# These represent mean and std predictions for two different distributions
y_pred_mu_1 = np.random.randn(2, 4)
y_pred_std_1 = np.abs(np.random.randn(2, 4)) + 0.1  # ensure positive
y_pred_mu_2 = np.random.randn(2, 4)
y_pred_std_2 = np.abs(np.random.randn(2, 4)) + 0.1  # ensure positive

ARGS = {
    "y_pred_mu_1": y_pred_mu_1,
    "y_pred_std_1": y_pred_std_1,
    "y_pred_mu_2": y_pred_mu_2,
    "y_pred_std_2": y_pred_std_2,
}
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 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
gauss_neg_log_like Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_utils.py
code served (permissive licence) · get_code("06f3c20828fd8121")
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
import scipy.stats as stats

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

# Create small sample data
batch_size = 2
feature_dim = 4

# y_true: shape (batch_size,) or (batch_size, 1)
y_true = np.random.randn(batch_size, 1).astype(np.float32)

# y_pred_gauss_mid: predicted mean, shape (batch_size,) or (batch_size, 1)
y_pred_gauss_mid = np.random.randn(batch_size).astype(np.float32)

# y_pred_gauss_dev: predicted standard deviation, shape (batch_size,) or (batch_size, 1)
y_pred_gauss_dev = np.abs(np.random.randn(batch_size)).astype(np.float32) + 0.1

# scale_c: scalar scaling factor
scale_c = 1.0

ARGS = {
    "y_true": y_true,
    "y_pred_gauss_mid": y_pred_gauss_mid,
    "y_pred_gauss_dev": y_pred_gauss_dev,
    "scale_c": scale_c,
}
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
metrics_calc Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_utils.py
code served (permissive licence) · get_code("cb597d434f118a2b")
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 tuple, ndim 1, 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
import torch
import torch.nn as nn

# Create a small model class that has a name_ attribute
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.name_ = "TestModel"
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

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

# Create small numpy arrays for the validation data and predictions
batch_size = 2
y_val = np.random.randn(batch_size, 1).astype(np.float32)
y_pred_mu = np.random.randn(batch_size, 1).astype(np.float32)
y_pred_std = np.abs(np.random.randn(batch_size, 1).astype(np.float32)) + 0.1  # ensure positive

# Create scalar parameters
scale_c = 1.5
b_0_var = 0.5
w_0_var = 0.3
data_noise = 0.2

# Create the model instance
model = SimpleModel()

# Define the arguments dictionary
ARGS = {
    'y_val': y_val,
    'y_pred_mu': y_pred_mu,
    'y_pred_std': y_pred_std,
    'scale_c': scale_c,
    'b_0_var': b_0_var,
    'w_0_var': w_0_var,
    'data_noise': data_noise,
    'model': model,
    'is_print': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
obs_tidy Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/RL_qlearn_pendulum_05.py
code served (permissive licence) · get_code("34092ab8e212ce4a")
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 torch.nn as nn

torch.manual_seed(0)

# obs_tidy simply returns obs_in unchanged
# So obs_in can be any Python object
# Let's provide a simple tensor as the observation

obs_in = torch.randn(2, 4)

ARGS = {
    "obs_in": obs_in
}
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
pre_process_rbf_per Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/timeseries_hmc_05.py
code served (permissive licence) · get_code("51d28e6eb6d8ed82")
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, 8) 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

estimate_per = 1 / 10

def pre_process_rbf_per(x):
    return np.concatenate([np.cos(x * 2 * np.pi / estimate_per), np.sin(x * 2 * np.pi / estimate_per)], axis=-1)

# Create a small numpy array with shape (2, 4)
# The function expects an array-like input with an axis=-1 dimension
x_input = np.random.randn(2, 4)

ARGS = {
    "x": x_input
}
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, 8) — shape (2, 8) 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_array Ran
ran on a synthesized input
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_DataGen.py
code served (permissive licence) · get_code("479d482abed0b4ff")
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

# The function sigmoid_array takes a single parameter 'x' which should be an array
# It applies the sigmoid function: 1 / (1 + np.exp(-x))
# We need to provide a numpy array as input

x = np.array([[1.0, 2.0, -1.0, 0.5],
              [-0.5, 1.5, 0.0, -2.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 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
np_k_0 Not yet run
unverified (harvested, no recorded run)
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_module_gp_combo.py
code served (permissive licence) · get_code("6802e5d7fe4d2d58")
How it ran

no invocation recorded.

np_step Not yet run
unverified (harvested, no recorded run)
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_module_gp_combo.py
code served (permissive licence) · get_code("7796962d8760fb27")
How it ran

no invocation recorded.

np_step_kernel Not yet run
unverified (harvested, no recorded run)
TeaPearce/Expressive_Priors_in_BNNs/code/gpc_module_gp_combo.py
code served (permissive licence) · get_code("c3529256b7b082a6")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
np_k_0 1 other paper
1 dated earlier
1810.05546 (2018-10)
Uncertainty in Neural Networks: Approximately Bayesian Ensembling
np_step 1 other paper
1 dated earlier
1810.05546 (2018-10)
Uncertainty in Neural Networks: Approximately Bayesian Ensembling
np_step_kernel 1 other paper
1 dated earlier
1810.05546 (2018-10)
Uncertainty in Neural Networks: Approximately Bayesian Ensembling
sigmoid_array 1 other paper
1 dated earlier
1810.05546 (2018-10)
Uncertainty in Neural Networks: Approximately Bayesian Ensembling

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

A simple, flexible approach to creating expressive priors in Gaussian process (GP) models makes new kernels from a combination of basic kernels, e.g. summing a periodic and linear kernel can capture seasonal variation with a long term trend. Despite a well-studied link between GPs and Bayesian neural networks (BNNs), the BNN analogue of this has not yet been explored. This paper derives BNN architectures mirroring such kernel combinations. Furthermore, it shows how BNNs can produce periodic kernels, which are often useful in this context. These ideas provide a principled approach to designing BNNs that incorporate prior knowledge about a function. We showcase the practical value of these ideas with illustrative experiments in supervised and reinforcement learning settings.

For agents

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

get_harvested_code_for_paper("1905.06076")
get_code_for_paper("1905.06076")
have("1905.06076")

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

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

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

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

Connect an agent — have() is free.