SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1808.00508 · 2018

Neural Arithmetic Logic Units

arXiv · PDF · Open in the Atlas

Code that ran

20 of 24 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 14 have no contract verdict; 6 failures 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/1808.00508.json · badge: /api/ran/1808.00508.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
bmistry4/nalm-benchmark community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
acyrl/NALU community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
Nilabhra/NALU reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FrederikWarburg/latent_disagreement reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
ahylton19/simpleNALU-tf community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
grananqvist/NALU-tf reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
shshemi/NeuralArithmeticLogicUnit reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
Ragabov/tensorflow-nalu community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
NALU Ran
ran on a synthesized input
ahylton19/simpleNALU-tf/NALU.py
code served (permissive licence) · get_code("c70a13cdc8217e8e")
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.compat.v1 as tf
import numpy as np

tf.compat.v1.disable_eager_execution()

# Create a small input tensor
# The function expects in_dim to have a .shape[-1] attribute
# and to be usable in matmul operations
batch_size = 2
input_dim = 4
in_dim = tf.placeholder(tf.float32, shape=[batch_size, input_dim])

# out_dim is used directly as an integer in the shape tuple
out_dim = 3

ARGS = {
    'in_dim': in_dim,
    'out_dim': out_dim
}
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 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
calc_nac_mnac_loss Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/singularity_issue.py
code served (permissive licence) · get_code("b80193f38302696b")
How it ran

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

import numpy as np

# Set up the function parameters
nac_w = 0.5
mnac_w = 0.3

# Create the ARGS dictionary mapping all parameters to their values
ARGS = {
    'nac_w': nac_w,
    'mnac_w': mnac_w,
    'eps': 0.1
}
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 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
calc_num_steps Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/singularity_issue.py
code served (permissive licence) · get_code("a9671ab549458806")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# def calc_num_steps(step_size):
#     return int(2 * (1.0 / step_size) + 1)
#
# The function takes a step_size parameter and performs arithmetic on it.
# step_size should be a numeric value (float or similar) that can be used in division.
# A reasonable step_size would be a small positive float.

ARGS = {
    "step_size": 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 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
discrete_NAU_W_test Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/utils.py
code served (permissive licence) · get_code("5a98a304d15b258e")
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 torch

torch.manual_seed(0)

# Create a tensor W with shape (2, 4)
# The function will discretize it based on thresholds at -0.5 and 0.5
# Let's create one that matches the first condition: abs(discrete_W) == [[1, 0, 0, 0], [0, 1, 0, 0]]
# This means discrete_W should be [[1, 0, 0, 0], [0, 1, 0, 0]] or [[-1, 0, 0, 0], [0, -1, 0, 0]]

W = torch.tensor([
    [0.8, -0.2, 0.1, -0.3],
    [-0.1, 0.9, 0.2, -0.4]
], dtype=torch.float32)

ARGS = {
    "W": W
}
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 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
do_operation Ran
ran on a synthesized input
bmistry4/nalm-benchmark/stable_nalu/dataset/single_layer_check.py
code served (permissive licence) · get_code("7b8f8d046f9d8109")
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 takes a tensor and an operation string
# It squeezes the tensor and performs arithmetic operations on elements [0] and [1]
# So we need a tensor that when squeezed has at least 2 elements

# Create a tensor with shape (2, 4) that will squeeze to shape (2, 4)
# When we access [0] and [1] after squeeze, we get two vectors of size 4
tensor = torch.randn(2, 4)

# Operation can be one of: 'add', 'sub', 'mul', 'div'
op = 'add'

ARGS = {
    'tensor': tensor,
    'op': op
}
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
gd_paper Ran
ran on a synthesized input
acyrl/NALU/nalu/GenData.py
code served (permissive licence) · get_code("17b7d41df774d236")
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 numpy as np

class GenerateDatasetHelper:
    """
    Simple helper class to the functions that generate NALU training sets. 
    """

    @staticmethod
    def generate_result(X, op=None):
        if not op:
            return np.sum(X, axis=1, keepdims=True)
        else:
            return op(X)

    @staticmethod
    def sum_func(X):
        return np.sum(X, axis=1, keepdims=True)


def custom_op(X):
    """Custom operation that takes 2D array and returns result"""
    return np.prod(X, axis=1, keepdims=True)


ARGS = {
    'lower_bound': 0,
    'upper_bound': 5,
    'size': 10,
    'op': None
}
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 — 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
gd_paper Ran
ran on a synthesized input
acyrl/NALU/tf-prototype/GenData.py
code served (permissive licence) · get_code("6b220622e60d9d40")
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 numpy as np

np.random.seed(0)

ARGS = {
    'lower_bound': 0,
    'upper_bound': 5,
    'size': 10,
    'op': 'sum'
}
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 — 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
gd_uniform Ran
ran on a synthesized input
acyrl/NALU/nalu/GenData.py
code served (permissive licence) · get_code("b4f56e94408affbb")
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 numpy as np

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

# Define ARGS dict with all parameters for gd_uniform
ARGS = {
    'lower_bound': 0,
    'upper_bound': 5,
    'size': 10,
    'calc_output': True,
    'op': None,
    'depth': 2
}
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 — 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
gd_uniform Ran
ran on a synthesized input
acyrl/NALU/tf-prototype/GenData.py
code served (permissive licence) · get_code("9567ec335184d418")
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 numpy as np

np.random.seed(0)

ARGS = {
    'lower_bound': 0,
    'upper_bound': 5,
    'size': 100,
    'op': 'sum'
}
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 — 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
generate_dataset Ran
ran; our contract draft was wrong, not the code
grananqvist/NALU-tf/nalu.py
pointer only (licence: NONE) · get_code("f6354fda6a1b24c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, grananqvist/NALU-tf when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_ds Ran
ran; our contract draft was wrong, not the code
shshemi/NeuralArithmeticLogicUnit/basic_operation_test.py
pointer only (licence: NONE) · get_code("206d5718bbc9d36f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shshemi/NeuralArithmeticLogicUnit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_synthetic_arithmetic_dataset Ran
ran on a synthesized input
Ragabov/tensorflow-nalu/experiments/utils.py
code served (permissive licence) · get_code("99d41079ce1ef313")
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 numpy as np

ARGS = {
    "arithmetic_op": "add",
    "min_value": 1,
    "max_value": 10,
    "sample_size": 8,
    "set_size": 5,
    "boundaries": [1, 3, 4, 7]
}
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 — 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
get_eval_loss Ran
ran; our contract draft was wrong, not the code
Nilabhra/NALU/utilities/train_utils.py
pointer only (licence: NONE) · get_code("93425add40eab6de")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nilabhra/NALU when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_eval_preds Ran
ran; our contract draft was wrong, not the code
Nilabhra/NALU/utilities/train_utils.py
pointer only (licence: NONE) · get_code("c82bfe1c77a83835")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nilabhra/NALU when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

matcher Ran
ran on a synthesized input
bmistry4/nalm-benchmark/export/sequential_mnist.py
code served (permissive licence) · get_code("ce12fc160f0618e0")
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 bool, 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

def matcher(tag):
    return (tag.startswith('metric/train') or tag.startswith('metric/valid') or tag.startswith('metric/test/extrapolation/')) and tag.endswith('/mse')

# Test with various tags to understand the function
test_tags = [
    'metric/train/loss/mse',
    'metric/valid/accuracy/mse',
    'metric/test/extrapolation/error/mse',
    'metric/train/mse',
    'metric/valid/mse',
    'metric/test/extrapolation/mse',
    'metric/test/interpolation/mse',
    'metric/train/loss/mae',
    'other/train/mse'
]

# The function takes a single string parameter 'tag'
# Valid tags are those that:
# - start with 'metric/train', 'metric/valid', or 'metric/test/extrapolation/'
# - AND end with '/mse'

ARGS = {
    'tag': 'metric/train/loss/mse'
}
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 bool, 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
print_mnist_cell_weights Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/utils.py
code served (permissive licence) · get_code("ebbd20959f75fe66")
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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleRNN(nn.Module):
    def __init__(self):
        super().__init__()
        self.recurent_cell = nn.RNNCell(4, 3)
        self.linear = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleRNN()

ARGS = {
    'model': model
}
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 (2,) — shape (2,) 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
print_model_params Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/utils.py
code served (permissive licence) · get_code("8d079f326a7bfb7d")
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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with a few parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 (2,) — shape (2,) 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
rmse Ran
ran on a synthesized input
bmistry4/nalm-benchmark/misc/singularity_issue.py
code served (permissive licence) · get_code("3c7139452df8334e")
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 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 numpy as np

# Compute y as per the given expression
X = np.array([1, 1.2, 1.8, 2])
y = (X[0] + X[1]) * (X[0] + X[1] + X[2] + X[3])

# Create y_hat with a different shape to test the function
y_hat = np.array([4.2, 4.5, 5.1, 5.8])

ARGS = {
    "y": y,
    "y_hat": y_hat
}
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 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
test Ran
ran; our contract draft was wrong, not the code
FrederikWarburg/latent_disagreement/Experiments/NALU_all_we_need.py
pointer only (licence: NONE) · get_code("634dd1dd6bda3381")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FrederikWarburg/latent_disagreement when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

train Ran
ran; our contract draft was wrong, not the code
Nilabhra/NALU/utilities/train_utils.py
pointer only (licence: NONE) · get_code("8db99284cbba319d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nilabhra/NALU when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

matcher Not yet run
unverified (harvested, no recorded run)
bmistry4/nalm-benchmark/export/simple_function_static.py
code served (permissive licence) · get_code("2799665e88062be6")
How it ran

no invocation recorded.

nac Not yet run
unverified (harvested, no recorded run)
acyrl/NALU/tf-prototype/nac.py
code served (permissive licence) · get_code("e1011e67d1ed1345")
How it ran

no invocation recorded.

nalu Not yet run
unverified (harvested, no recorded run)
acyrl/NALU/tf-prototype/nalu.py
code served (permissive licence) · get_code("cc0432c89fad9dd8")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
FrederikWarburg/latent_disagreement/Experiments/NALU_all_we_need.py
pointer only (licence: NONE) · get_code("e7f88fa947dc31b3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FrederikWarburg/latent_disagreement when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

More are linked than shown here.

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

Abstract

Neural networks can learn to represent and manipulate numerical information, but they seldom generalize well outside of the range of numerical values encountered during training. To encourage more systematic numerical extrapolation, we propose an architecture that represents numerical quantities as linear activations which are manipulated using primitive arithmetic operators, controlled by learned gates. We call this module a neural arithmetic logic unit (NALU), by analogy to the arithmetic logic unit in traditional processors. Experiments show that NALU-enhanced neural networks can learn to track time, perform arithmetic over images of numbers, translate numerical language into real-valued scalars, execute computer code, and count objects in images. In contrast to conventional architectures, we obtain substantially better generalization both inside and outside of the range of numerical values encountered during training, often extrapolating orders of magnitude beyond trained numerical ranges.

For agents

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

get_harvested_code_for_paper("1808.00508")
get_code_for_paper("1808.00508")
have("1808.00508")

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

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

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

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

Connect an agent — have() is free.