SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.03958 · 2018

Deterministic Variational Inference for Robust Bayesian Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

18 of 23 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 18 have no contract verdict; 0 failures of our instrument; 5 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/1810.03958.json · badge: /api/ran/1810.03958.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
Microsoft/deterministic-variational-inference canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
omwright/cov-prop-nn community (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
markovalexander/DVI community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
autoload_csv Ran
ran on a synthesized input
omwright/cov-prop-nn/datasets.py
code served (permissive licence) · get_code("e53a59f1614c0037")
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 int, shape (3, 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with a common delimiter
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, 'test.csv')

# Write a simple CSV file with comma delimiter
csv_content = """a,b,c
1,2,3
4,5,6
7,8,9"""

with open(csv_path, 'w') as f:
    f.write(csv_content)

ARGS = {
    'fpath': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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 int, shape (3, 3) — shape (3, 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
gaussian_cdf Ran
ran on a synthesized input
markovalexander/DVI/core/bayesian_utils.py
code served (permissive licence) · get_code("cdfb9235c506423b")
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 numpy as np
import torch

torch.manual_seed(0)

# The function gaussian_cdf takes a single parameter x
# and applies torch.erf to it, so x should be a torch tensor
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
gaussian_cdf Ran
ran on a synthesized input
omwright/cov-prop-nn/run_tightness_mnist.py
code served (permissive licence) · get_code("e8e6d80b1447469d")
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)

# The function takes a single parameter 'x' which is used in:
# - torch.erf(x * (1.0 / np.sqrt(2)))
# So x should be a torch tensor that supports arithmetic operations and erf

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
get_device_string Ran
ran on a synthesized input
Microsoft/deterministic-variational-inference/utils.py
code served (permissive licence) · get_code("35c6488e12624aac")
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)

ARGS = {
    'device_id': 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 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_hypers Ran
ran on a synthesized input
Microsoft/deterministic-variational-inference/utils.py
code served (permissive licence) · get_code("1c9fe43e56ed658f")
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 dict. 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 json
import tempfile
import os

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create default hyperparameters file
default_hypers = {
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 10,
    "model_type": "transformer"
}
default_hypers_path = os.path.join(temp_dir, "default_hypers.json")
with open(default_hypers_path, 'w') as f:
    json.dump(default_hypers, f)

# Create a config file to be optionally loaded
config_file_path = os.path.join(temp_dir, "config.json")
config_data = {
    "learning_rate": 0.01,
    "dropout": 0.1
}
with open(config_file_path, 'w') as f:
    json.dump(config_data, f)

# Create inline config as JSON string
inline_config = '{"epochs": 20, "warmup_steps": 100}'

# Construct args dict with various combinations
ARGS = {
    'args': {
        '--config-file': config_file_path,
        '--config': inline_config
    },
    'default_hypers_path': default_hypers_path
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_mse Ran
ran on a synthesized input
omwright/cov-prop-nn/run_dvi.py
code served (permissive licence) · get_code("b31269ddf9e7a14b")
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 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 torch

torch.manual_seed(0)

# Analyzing the function:
# - pred: can be a tuple where pred[0] is indexed, or a tensor that is indexed
#   The code accesses pred[0][:, 0] or pred[:, 0], so pred needs shape (batch, features)
#   where we extract column 0
# - target: used in mse_loss, so should be a 1D tensor matching batch size
# - The function extracts pred_mean with shape (batch,) and compares to target

# Create pred as a tuple (one branch of the if statement)
pred_tensor = torch.randn(2, 4)  # batch=2, features=4
pred = (pred_tensor,)  # wrap in tuple to test the tuple branch

# Create target as 1D tensor matching batch size
target = torch.randn(2)

ARGS = {
    "pred": pred,
    "target": target,
}
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 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
get_predictions Ran
ran on a synthesized input
markovalexander/DVI/core/utils.py
code served (permissive licence) · get_code("3628b68aed79c0e2")
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. 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)

# Build a minimal model that returns (mean, cov) tuple
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.input_dim = input_dim
        self.output_dim = output_dim
        self.fc_mean = nn.Linear(input_dim, output_dim)
        # output_cov should be reshaped to (n, output_dim, output_dim)
        # so it needs to output n * output_dim * output_dim values
        self.fc_cov = nn.Linear(input_dim, output_dim * output_dim)
    
    def forward(self, x):
        mean = self.fc_mean(x)
        cov = self.fc_cov(x)
        return (mean, cov)

# Create model instance
model = SimpleModel(input_dim=4, output_dim=3)

# Create data: batch size 2, input dimension 4
data = torch.randn(2, 4)

# Create args dict (empty since function has no other parameters)
args = {}

# Set mcvi flag
mcvi = False

ARGS = {
    'data': data,
    'model': model,
    'args': args,
    'mcvi': mcvi
}
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 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
glorot_init Ran
ran on a synthesized input
Microsoft/deterministic-variational-inference/gaussian_variables.py
code served (permissive licence) · get_code("a9439e641c4c1ff4")
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 3, dtype family float, shape (2, 4, 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 numpy as np

np.random.seed(0)

# glorot_init expects a shape tuple/list
# The function accesses shape[-2] and shape[-1], so we need at least 2 dimensions
# Using distinct sizes: 4 and 3
shape = (2, 4, 3)

ARGS = {
    "shape": shape
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
matrix_diag_part Ran
ran on a synthesized input
markovalexander/DVI/core/bayesian_utils.py
code served (permissive licence) · get_code("5399bc831fe81e9b")
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 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 torch

torch.manual_seed(0)

# The function matrix_diag_part takes a tensor and extracts its diagonal
# using torch.diagonal with dim1=-1 and dim2=-2
# This works on any tensor with at least 2 dimensions
# For a matrix (2D), it extracts the main diagonal
# For higher-dimensional tensors, it extracts diagonals from the last two dimensions

# Create a simple 2D tensor (matrix)
tensor = torch.randn(4, 4)

ARGS = {
    "tensor": tensor
}
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 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
one_hot_encoding Ran
ran on a synthesized input
markovalexander/DVI/core/utils.py
code served (permissive licence) · get_code("1aa2aea36b573636")
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 int, 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)

# Create a small tensor with class indices
# Shape: (2, 1) - batch size 2, single column for class indices
tensor = torch.LongTensor([[0], [3]])

# Number of classes
n_classes = 4

# Device
device = 'cpu'

ARGS = {
    'tensor': tensor,
    'n_classes': n_classes,
    'device': device
}
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 int, 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
pred2acc Ran
ran on a synthesized input
markovalexander/DVI/core/utils.py
code served (permissive licence) · get_code("22db9db360759a69")
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 torch

torch.manual_seed(0)

# Create small prediction tensor (batch_size=2, some output dimension=4)
pred = torch.tensor([[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]])

# Create small target tensor (batch_size=2, some dimension=4)
y = torch.tensor([[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]])

batch_size = 2

ARGS = {
    "pred": pred,
    "y": y,
    "batch_size": batch_size,
}
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 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
restrict_dataset_size Ran
ran on a synthesized input
Microsoft/deterministic-variational-inference/utils.py
code served (permissive licence) · get_code("8cc2f994e1088d1e")
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 3, 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 simple dataset as a tuple of arrays
# The function accesses len(dataset[0]) and slices each element with [:data_subset_size]
dataset = (
    np.array([[1, 2, 3, 4, 5],
              [6, 7, 8, 9, 10]]),
    np.array([[11, 12, 13, 14, 15],
              [16, 17, 18, 19, 20]])
)

size_fraction = 0.6

ARGS = {
    "dataset": dataset,
    "size_fraction": size_fraction
}
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 tuple, ndim 3, dtype family int — 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
softrelu Ran
ran on a synthesized input
omwright/cov-prop-nn/run_tightness_mnist.py
code served (permissive licence) · get_code("3a80ea713ce9c133")
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 numpy as np
import torch

torch.manual_seed(0)

# The function `softrelu` takes a single parameter `x`
# Looking at the body, `x` is used in:
# - standard_gaussian(x): expects a tensor, performs exp(-x*x/2)
# - gaussian_cdf(x): expects a tensor, performs erf(x / sqrt(2))
# - x * gaussian_cdf(x): expects a tensor for multiplication
# So x should be a torch tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x,
}
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
softrelu Ran
ran on a synthesized input
omwright/cov-prop-nn/dvi/bayes_utils.py
code served (permissive licence) · get_code("3d5e81c357b27586")
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)

# The function softrelu takes a single parameter x
# Looking at the function body:
# - x is used in arithmetic operations (x * x, x * gaussian_cdf(x))
# - x is passed to torch.erf and torch.exp
# - So x should be a torch tensor

# Create a small tensor for x
x = torch.randn(2, 4)

ARGS = {
    'x': x
}
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
standard_gaussian Ran
ran on a synthesized input
Microsoft/deterministic-variational-inference/bayes_util.py
code served (permissive licence) · get_code("4b42f948c28568f5")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small tensor as input
x = tf.constant([[0.0, 1.0, -1.0, 2.0],
                 [-0.5, 0.5, 1.5, -2.0]], dtype=tf.float32)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
standard_gaussian Ran
ran on a synthesized input
markovalexander/DVI/core/bayesian_utils.py
code served (permissive licence) · get_code("2f1e2e89b495caf7")
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 math
import numpy as np
import torch

torch.manual_seed(0)

# The function takes a single parameter 'x' and computes a standard gaussian
# It uses: torch.exp, multiplication, division, np.sqrt, math.pi
# x should be a torch tensor that supports element-wise operations

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
standard_gaussian Ran
ran on a synthesized input
omwright/cov-prop-nn/run_tightness_mnist.py
code served (permissive licence) · get_code("229ae3d179dcefa5")
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 a small tensor to pass to standard_gaussian
x = torch.randn(2, 4)

# Define ARGS dictionary with the parameter
ARGS = {
    "x": x
}
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
validate_model Ran
ran on a synthesized input
omwright/cov-prop-nn/run_dvi.py
code served (permissive licence) · get_code("fafc757982dcd649")
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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a minimal model that outputs predictions
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal criterion with required attributes and methods
class SimpleCriterion:
    def __init__(self, mode='mcvi'):
        self.mode = mode
    
    def __call__(self, pred, target, eval=False, n_samples=100):
        # Return 4 tensors: elbo, ll, kl, xll
        elbo = torch.tensor(1.0)
        ll = torch.tensor(0.5)
        kl = torch.tensor(0.3)
        xll = torch.tensor(0.2)
        return elbo, ll, kl, xll

# Create validation loader as list of (inputs, target) tuples
val_loader = [
    (torch.randn(2, 4), torch.randn(2)),
    (torch.randn(2, 4), torch.randn(2)),
]

# Create model and criterion
model = SimpleModel()
criterion = SimpleCriterion(mode='mcvi')

# Define parameters
device = 'cpu'
mean = 0.0
std = 1.0

ARGS = {
    'model': model,
    'val_loader': val_loader,
    'device': device,
    'criterion': criterion,
    'mean': mean,
    'std': std,
}
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 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
gaussian_cdf Not yet run
unverified (harvested, no recorded run)
Microsoft/deterministic-variational-inference/bayes_util.py
code served (permissive licence) · get_code("4f0d31ec0d21de1c")
How it ran

no invocation recorded.

generate_uci_data Not yet run
unverified (harvested, no recorded run)
omwright/cov-prop-nn/datasets.py
code served (permissive licence) · get_code("9d250aca9cbb3e9d")
How it ran

no invocation recorded.

softrelu Not yet run
unverified (harvested, no recorded run)
Microsoft/deterministic-variational-inference/bayes_util.py
code served (permissive licence) · get_code("253775c48c31a4e3")
How it ran

no invocation recorded.

test Not yet run
unverified (harvested, no recorded run)
omwright/cov-prop-nn/train_mnist.py
code served (permissive licence) · get_code("57b45b3540c780fe")
How it ran

no invocation recorded.

train_epoch Not yet run
unverified (harvested, no recorded run)
omwright/cov-prop-nn/run_dvi.py
code served (permissive licence) · get_code("d1a76c1ba3b77dec")
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 21 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 21 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

Bayesian neural networks (BNNs) hold great promise as a flexible and principled solution to deal with uncertainty when learning from finite data. Among approaches to realize probabilistic inference in deep neural networks, variational Bayes (VB) is theoretically grounded, generally applicable, and computationally efficient. With wide recognition of potential advantages, why is it that variational Bayes has seen very limited practical use for BNNs in real applications? We argue that variational inference in neural networks is fragile: successful implementations require careful initialization and tuning of prior variances, as well as controlling the variance of Monte Carlo gradient estimates. We provide two innovations that aim to turn VB into a robust inference tool for Bayesian neural networks: first, we introduce a novel deterministic method to approximate moments in neural networks, eliminating gradient variance; second, we introduce a hierarchical prior for parameters and a novel Empirical Bayes procedure for automatically selecting prior variances. Combining these two innovations, the resulting method is highly efficient and robust. On the application of heteroscedastic regression we demonstrate good predictive performance over alternative approaches.

For agents

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

get_harvested_code_for_paper("1810.03958")
get_code_for_paper("1810.03958")
have("1810.03958")

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

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

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

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

Connect an agent — have() is free.