SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.02107 · 2019

Latent Weights Do Not Exist: Rethinking Binarized Neural Network Optimization

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-22; 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/1906.02107.json · badge: /api/ran/1906.02107.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
plumerai/rethinking-bnn-optimization canonical (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
larq/larq community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
nikvaessen/Rethinking-Binarized-Neural-Network-Optimization community (classifier label)
classifier basis not recorded on the link
0 ran · 4 no recorded run
FunctionStatusWhere it lives
get_current_epoch Ran
ran, honoured the contract we drafted
plumerai/rethinking-bnn-optimization/bnn_optimization/utils.py
code served (permissive licence) · get_code("0db3e7ce00a6d3fa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import tempfile

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create a stats.json file with epoch information
stats_data = {'epoch': 42}
stats_file = os.path.join(temp_dir, 'stats.json')
with open(stats_file, 'w') as f:
    json.dump(stats_data, f)

# Define ARGS with the output_dir parameter
ARGS = {
    'output_dir': temp_dir
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_distribution_scope Ran
ran; our contract draft was wrong, not the code
plumerai/rethinking-bnn-optimization/bnn_optimization/utils.py
code served (permissive licence) · get_code("d62edadba5083a4d")
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 nullcontext. 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 sys
import tensorflow as tf
import contextlib
from tensorflow.python.eager.context import num_gpus

# The function takes a single parameter: batch_size
# batch_size should be an integer that represents the batch size
# The function checks if it can be divided by the number of GPUs if multiple GPUs exist

ARGS = {
    'batch_size': 32
}
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 nullcontext — a nullcontext output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a nullcontext 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
heaviside Ran
ran on a synthesized input
larq/larq/larq/math.py
code served (permissive licence) · get_code("b877c5a8c2435a58")
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 test tensor with both positive and negative values
x = tf.constant([[-1.5, 0.0, 2.3, -0.1],
                  [0.5, -2.0, 1.0, 0.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
sanitize_table Ran
ran on a synthesized input
larq/larq/larq/models.py
code served (permissive licence) · get_code("753267d7a888690b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family 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
from collections.abc import Sequence

torch.manual_seed(0)

# The function expects a Sequence[Sequence[Any]] where inner sequences contain
# values that can be either floats (formatted to 2 decimals) or converted to strings.
# We'll create a table with mixed types to demonstrate the functionality.

table_data = [
    [1.23456, "hello", 42, 3.14159],
    [2.71828, "world", 100, 0.5],
    [9.99999, "test", -5, 1.11111]
]

ARGS = {
    "table_data": table_data
}
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 list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sign Ran
ran on a synthesized input
larq/larq/larq/math.py
code served (permissive licence) · get_code("a7204bb0e23dc1a2")
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 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 tensorflow as tf
import numpy as np

# Create a small test tensor
x = tf.constant([-2.5, -0.5, 0.0, 1.5], 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 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
are_layers_equal Not yet run
unverified (harvested, no recorded run)
nikvaessen/Rethinking-Binarized-Neural-Network-Optimization/research_seed/theoretical/larq_approximation_viewpoint_cifar.py
code served (permissive licence) · get_code("acb8b424bd1c956c")
How it ran

no invocation recorded.

test_model Not yet run
unverified (harvested, no recorded run)
nikvaessen/Rethinking-Binarized-Neural-Network-Optimization/research_seed/theoretical/larq_approximation_viewpoint_cifar.py
code served (permissive licence) · get_code("fe3050fba6a31ee2")
How it ran

no invocation recorded.

test_model Not yet run
unverified (harvested, no recorded run)
nikvaessen/Rethinking-Binarized-Neural-Network-Optimization/research_seed/theoretical/larq_approximation_viewpoint_mnist.py
code served (permissive licence) · get_code("576d4e99e5399660")
How it ran

no invocation recorded.

test_model Not yet run
unverified (harvested, no recorded run)
nikvaessen/Rethinking-Binarized-Neural-Network-Optimization/research_seed/theoretical/larq_theorem_cifar.py
code served (permissive licence) · get_code("8a2e32e7dd71db12")
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 8 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 6 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
get_current_epoch 1 other paper
1 later
2104.05124 (2021-04)
A Bop and Beyond: A Second Order Optimizer for Binarized Neural Networks
get_distribution_scope 1 other paper
1 later
2104.05124 (2021-04)
A Bop and Beyond: A Second Order Optimizer for Binarized Neural Networks

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-22.

Repositories linked to this paper

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

Abstract

Optimization of Binarized Neural Networks (BNNs) currently relies on real-valued latent weights to accumulate small update steps. In this paper, we argue that these latent weights cannot be treated analogously to weights in real-valued networks. Instead their main role is to provide inertia during training. We interpret current methods in terms of inertia and provide novel insights into the optimization of BNNs. We subsequently introduce the first optimizer specifically designed for BNNs, Binary Optimizer (Bop), and demonstrate its performance on CIFAR-10 and ImageNet. Together, the redefinition of latent weights as inertia and the introduction of Bop enable a better understanding of BNN optimization and open up the way for further improvements in training methodologies for BNNs. Code is available at: https://github.com/plumerai/rethinking-bnn-optimization

For agents

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

get_harvested_code_for_paper("1906.02107")
get_code_for_paper("1906.02107")
have("1906.02107")

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

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

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

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

Connect an agent — have() is free.