SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.03764 · 2018

Variance Networks: When Expectation Does Not Meet Your Expectations

arXiv · PDF · Open in the Atlas

Code that ran

8 of 15 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 7 have no contract verdict; 1 failure of our instrument; 7 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/1803.03764.json · badge: /api/ran/1803.03764.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
da-molchanov/variance-networks canonical (classifier label)
classifier basis: census
8 ran · 7 no recorded run
FunctionStatusWhere it lives
accuracy_tf Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-tf/nets/metrics.py
code served (permissive licence) · get_code("7af694ab54bce535")
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 SymbolicTensor. 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 tensorflow as tf

# Create small test tensors
# logits: shape (batch_size=2, num_classes=4)
logits = tf.constant([
    [0.1, 0.2, 0.5, 0.2],
    [0.3, 0.4, 0.1, 0.2]
], dtype=tf.float32)

# labels: shape (batch_size=2,) with class indices
labels = tf.constant([2, 1], dtype=tf.int32)

ARGS = {
    "logits": logits,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
average_gradients Ran
ran; our contract draft was wrong, not the code
da-molchanov/variance-networks/variance-networks-tf/nets/utils.py
code served (permissive licence) · get_code("8553e59eb6f6feab")
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. 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 tensorflow as tf

# Create mock tower gradients for multi-GPU simulation
# tower_grads is a list of lists, where each inner list contains (grad, var) tuples
# Structure: tower_grads[tower_idx][param_idx] = (grad_tensor, var_tensor)

# Create gradients and variables for 2 towers and 2 parameters
tower_grads = []

# Tower 0: 2 parameters
tower_0_grads = [
    (tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]), tf.Variable([0.0] * 4, name="param_0")),
    (tf.constant([[9.0, 10.0], [11.0, 12.0]]), tf.Variable([0.0] * 2, name="param_1"))
]
tower_grads.append(tower_0_grads)

# Tower 1: 2 parameters (same shape as tower 0)
tower_1_grads = [
    (tf.constant([[13.0, 14.0, 15.0, 16.0], [17.0, 18.0, 19.0, 20.0]]), tf.Variable([0.0] * 4, name="param_0")),
    (tf.constant([[21.0, 22.0], [23.0, 24.0]]), tf.Variable([0.0] * 2, name="param_1"))
]
tower_grads.append(tower_1_grads)

ARGS = {
    "tower_grads": tower_grads
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
linear_decay Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-tf/nets/policies.py
code served (permissive licence) · get_code("2589b1ab2d40cde2")
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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "epoch_num": 5,
    "decay_start": 10,
    "total_epochs": 20,
    "start_value": 0.1
}
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 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
linear_growth Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-tf/nets/policies.py
code served (permissive licence) · get_code("1742234ac855b716")
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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "epoch_num": 5,
    "growth_start": 2,
    "total_epochs": 10,
    "start_value": 0.1,
    "end_value": 0.9
}
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 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
log_loss Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-tf/nets/metrics.py
code served (permissive licence) · get_code("4434bc86b61349d1")
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 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 tensorflow as tf
import numpy as np

# Set random seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
num_classes = 4
num_examples = 2

# logits: shape (batch_size, num_classes) - raw model outputs
logits = tf.constant([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8]
], dtype=tf.float32)

# labels: shape (batch_size,) - class indices (must be int-like)
labels = tf.constant([1, 3], dtype=tf.int64)

ARGS = {
    'logits': logits,
    'labels': labels,
    'num_examples': num_examples,
    'reuse': False
}
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 0, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor 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
logit2acc Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-pytorch/core/metrics.py
code served (permissive licence) · get_code("49e5cec9ba33f129")
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 torch
import numpy as np

torch.manual_seed(0)

# The function expects:
# - outputs: a tensor with .cpu().numpy() and argmax(axis=1) methods
# - targets: an object with .data.cpu().numpy() attributes

# Create a small batch of logits (batch_size=2, num_classes=4)
outputs = torch.randn(2, 4)

# Create target labels (batch_size=2)
targets = torch.tensor([0, 2])

ARGS = {
    "outputs": outputs,
    "targets": targets,
}
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
lr_linear Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-pytorch/core/metrics.py
code served (permissive licence) · get_code("764cb9125f7ab709")
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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "epoch_num": 5,
    "decay_start": 10,
    "total_epochs": 20,
    "start_value": 0.1
}
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 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
step_decay Ran
ran on a synthesized input
da-molchanov/variance-networks/variance-networks-tf/nets/policies.py
code served (permissive licence) · get_code("d1e757a31aafc9a3")
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)

ARGS = {
    "epoch_num": 5,
    "decay": 0.1,
    "decay_step": 10,
    "start_value": 1.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 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
build_graph Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/utils.py
code served (permissive licence) · get_code("3345ba65ea3269ff")
How it ran

no invocation recorded.

build_graph_stoch Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/utils.py
code served (permissive licence) · get_code("36332b7ff0ea3084")
How it ran

no invocation recorded.

dense_layer Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/layers.py
code served (permissive licence) · get_code("42717521963e9e3b")
How it ran

no invocation recorded.

initialize_variable Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/layers.py
code served (permissive licence) · get_code("f801a0306e227354")
How it ran

no invocation recorded.

initialize_weights_with_loss Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/layers.py
code served (permissive licence) · get_code("81f3af1dfd943004")
How it ran

no invocation recorded.

kl_ard Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-pytorch/core/metrics.py
code served (permissive licence) · get_code("e67270287a1be393")
How it ran

no invocation recorded.

sgvlb Not yet run
unverified (harvested, no recorded run)
da-molchanov/variance-networks/variance-networks-tf/nets/metrics.py
code served (permissive licence) · get_code("7cefef8be692c402")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 13 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
average_gradients 3 other papers
3 later
1805.01954 (2018-05)
Behavioral Cloning from Observation
1807.09190 (2018-07)
PReMVOS: Proposal-generation, Refinement and Merging for Video Object Segmentation
2003.03030 (2020-03)
Clean-Label Backdoor Attacks on Video Recognition Models
lr_linear 1 other paper
1 later
1901.02731 (2019-01)
A Comprehensive guide to Bayesian Convolutional Neural Network with Variational Inference

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

Ordinary stochastic neural networks mostly rely on the expected values of their weights to make predictions, whereas the induced noise is mostly used to capture the uncertainty, prevent overfitting and slightly boost the performance through test-time averaging. In this paper, we introduce variance layers, a different kind of stochastic layers. Each weight of a variance layer follows a zero-mean distribution and is only parameterized by its variance. We show that such layers can learn surprisingly well, can serve as an efficient exploration tool in reinforcement learning tasks and provide a decent defense against adversarial attacks. We also show that a number of conventional Bayesian neural networks naturally converge to such zero-mean posteriors. We observe that in these cases such zero-mean parameterization leads to a much better training objective than conventional parameterizations where the mean is being learned.

For agents

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

get_harvested_code_for_paper("1803.03764")
get_code_for_paper("1803.03764")
have("1803.03764")

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

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

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

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

Connect an agent — have() is free.