SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.18425 · 2024

Streamlining Prediction in Bayesian Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2411.18425.json · badge: /api/ran/2411.18425.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
aaltoml/suq canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
forward_aW_diag Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/diag_suq_mlp.py
code served (permissive licence) · get_code("b7495d2791bf5bbc")
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 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.functional as F

torch.manual_seed(0)

# Define dimensions
B = 2      # batch size
D_in = 4   # input dimension
D_out = 3  # output dimension

# Create tensors with the required shapes
a_mean = torch.randn(B, D_in)
a_var = torch.abs(torch.randn(B, D_in))  # variance must be non-negative
weight = torch.randn(D_out, D_in)
bias = torch.randn(D_out)
w_var = torch.abs(torch.randn(D_out, D_in))  # variance must be non-negative
b_var = torch.abs(torch.randn(D_out))  # variance must be non-negative

ARGS = {
    "a_mean": a_mean,
    "a_var": a_var,
    "weight": weight,
    "bias": bias,
    "w_var": w_var,
    "b_var": b_var,
}
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, ndim 3, 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
forward_aW_kron Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/kron_suq_mlp.py
code served (permissive licence) · get_code("a0a7b4a473187555")
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.functional as F

torch.manual_seed(0)

# Define small dimensions for each parameter
B = 2  # batch size
D_in = 4  # input dimension
D_out = 3  # output dimension

# Create tensors with the required shapes
a_mean = torch.randn(B, D_in)
a_cov = torch.randn(B, D_in, D_in)
weight = torch.randn(D_out, D_in)
bias = torch.randn(D_out)
w_kfacs_A = torch.randn(D_in, D_in)
w_kfacs_B = torch.randn(D_out, D_out)
b_cov = torch.randn(D_out, D_out)

ARGS = {
    'a_mean': a_mean,
    'a_cov': a_cov,
    'weight': weight,
    'bias': bias,
    'w_kfacs_A': w_kfacs_A,
    'w_kfacs_B': w_kfacs_B,
    'b_cov': b_cov,
}
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
forward_activation_diag Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/diag_suq_transformer.py
code served (permissive licence) · get_code("086ba259d151663b")
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 4, 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

torch.manual_seed(0)

# Define a simple activation function (ReLU)
activation_func = nn.ReLU()

# Define small tensors with distinct dimensions
# B=2 (batch), T=3 (time/sequence), D=4 (feature dimension)
B, T, D = 2, 3, 4

h_mean = torch.randn(B, T, D, requires_grad=False)
h_var = torch.abs(torch.randn(B, T, D)) + 0.1  # Ensure positive variance

ARGS = {
    "activation_func": activation_func,
    "h_mean": h_mean,
    "h_var": h_var,
}
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, ndim 4, 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
forward_activation_implicit_diag Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/diag_suq_mlp.py
code served (permissive licence) · get_code("8d0ae8eebf8d786b")
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 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

torch.manual_seed(0)

# Define a simple activation function
activation_func = nn.ReLU()

# Create small tensors: batch size 2, dimension 4
B, D = 2, 4
h_mean = torch.randn(B, D, requires_grad=False)
h_var = torch.abs(torch.randn(B, D)) + 0.1  # Ensure positive variances

ARGS = {
    "activation_func": activation_func,
    "h_mean": h_mean,
    "h_var": h_var,
}
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, ndim 3, 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
forward_activation_implicit_full Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/kron_suq_mlp.py
code served (permissive licence) · get_code("621f1d22899ef0ce")
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)

# Define a simple activation function
activation_func = nn.ReLU()

# Define batch size and dimension
B = 2
D = 4

# Create h_mean: shape [B, D]
h_mean = torch.randn(B, D)

# Create h_cov: shape [B, D, D] - symmetric positive definite covariance matrices
# Generate random symmetric positive definite matrices
h_cov = torch.randn(B, D, D)
h_cov = torch.bmm(h_cov, h_cov.transpose(1, 2))  # Make symmetric positive definite

ARGS = {
    "activation_func": activation_func,
    "h_mean": h_mean,
    "h_cov": h_cov,
}
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
forward_batch_norm_diag Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aaltoml/suq/suq/diag_suq_mlp.py
code served (permissive licence) · get_code("cf6ab4f51928d340")
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)

# Parameters for forward_batch_norm_diag
B = 2  # batch size
D = 4  # feature dimension

h_var = torch.randn(B, D).abs()  # Element-wise variance, shape [B, D]
bn_weight = torch.randn(D).abs()  # Batch norm scale (gamma), shape [D,]
bn_running_var = torch.randn(D).abs()  # Running variance, shape [D,]
bn_eps = 1e-5  # Small constant for numerical stability

ARGS = {
    "h_var": h_var,
    "bn_weight": bn_weight,
    "bn_running_var": bn_running_var,
    "bn_eps": bn_eps,
}
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
forward_linear_diag_Bayesian_weight Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/diag_suq_transformer.py
code served (permissive licence) · get_code("1c271f27a5e3dc41")
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 4, 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.functional as F

torch.manual_seed(0)

# Define tensor dimensions
B = 2  # batch size
T = 3  # sequence length
D_in = 4  # input dimension
D_out = 5  # output dimension

# Create the input embeddings mean
e_mean = torch.randn(B, T, D_in)

# Create the input embeddings variance (must be positive)
e_var = torch.abs(torch.randn(B, T, D_in)) + 0.1

# Create the weight mean
w_mean = torch.randn(D_out, D_in)

# Create the weight variance (must be positive)
w_var = torch.abs(torch.randn(D_out, D_in)) + 0.1

# Create the bias
bias = torch.randn(D_out)

ARGS = {
    "e_mean": e_mean,
    "e_var": e_var,
    "w_mean": w_mean,
    "w_var": w_var,
    "bias": bias,
}
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, ndim 4, 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
forward_linear_diag_determinstic_weight Ran
ran; our contract draft was wrong, not the code
aaltoml/suq/suq/diag_suq_transformer.py
code served (permissive licence) · get_code("1e9f98732d611733")
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 4, 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.functional as F

torch.manual_seed(0)

# Define tensor dimensions with distinct sizes
B = 2  # batch size
T = 3  # sequence length
D_in = 4  # input dimension
D_out = 5  # output dimension

# Create input tensors
e_mean = torch.randn(B, T, D_in)
e_var = torch.abs(torch.randn(B, T, D_in)) + 0.1  # ensure positive variance

# Create weight and bias tensors
weight = torch.randn(D_out, D_in)
bias = torch.randn(D_out)

ARGS = {
    "e_mean": e_mean,
    "e_var": e_var,
    "weight": weight,
    "bias": bias,
}
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, ndim 4, 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
streamline_mlp Not yet run
unverified (harvested, no recorded run)
aaltoml/suq/suq/SUQ_MLP.py
code served (permissive licence) · get_code("2b1aadd648250de3")
How it ran

no invocation recorded.

streamline_vit Not yet run
unverified (harvested, no recorded run)
aaltoml/suq/suq/SUQ_ViT.py
code served (permissive licence) · get_code("6f1a2485f8616e61")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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-24.

Repositories linked to this paper

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

Abstract

The rising interest in Bayesian deep learning (BDL) has led to a plethora of methods for estimating the posterior distribution. However, efficient computation of inferences, such as predictions, has been largely overlooked with Monte Carlo integration remaining the standard. In this work we examine streamlining prediction in BDL through a single forward pass without sampling. For this we use local linearisation on activation functions and local Gaussian approximations at linear layers. Thus allowing us to analytically compute an approximation to the posterior predictive distribution. We showcase our approach for both MLP and transformers, such as ViT and GPT-2, and assess its performance on regression and classification tasks. Open-source library: https://github.com/AaltoML/SUQ

For agents

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

get_harvested_code_for_paper("2411.18425")
get_code_for_paper("2411.18425")
have("2411.18425")

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

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

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

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

Connect an agent — have() is free.