SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.08518 · 2018

Implementing Neural Turing Machines

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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, 1 violated it and 3 have no contract verdict; 0 failures of our instrument; 4 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/1807.08518.json · badge: /api/ran/1807.08518.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
SourangshuGhosh/NeuralTuringMachine community (classifier label)
classifier basis: plan_row
3 ran · 4 no recorded run
ajithcodesit/Neural_Turing_Machine community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
expand Ran
ran on a synthesized input
SourangshuGhosh/NeuralTuringMachine/utils.py
code served (permissive licence) · get_code("3d130d4e1df6bced")
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
import numpy as np

# Create a small TensorFlow tensor
x = tf.constant([[1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Set the dimension along which to expand
dim = 1

# Set the number of times to repeat the expansion
N = 3

ARGS = {
    "x": x,
    "dim": dim,
    "N": N
}
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
generate_patterns Ran
ran on a synthesized input
ajithcodesit/Neural_Turing_Machine/seqgen.py
code served (permissive licence) · get_code("568068d6f5a00195")
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

# Call the function with explicit arguments
ARGS = {
    'batch_size': 2,
    'max_sequence': 5,
    'min_sequence': 1,
    'in_bits': 8,
    'out_bits': 8,
    'pad': 1e-12,
    'low_tol': 1e-12,
    'high_tol': 1.0,
    'fixed_seq_len': False
}
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
label_from_vectors Ran
ran on a synthesized input
SourangshuGhosh/NeuralTuringMachine/generate_data.py
code served (permissive licence) · get_code("483adf992a70c419")
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 map. 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

# Analyze the function:
# - Takes 'vectors' parameter
# - Calls np.split(vectors, 9, axis=-1) to split along last axis into 9 parts
# - Maps np.argmax over each batch, taking argmax along axis=-1
# 
# So vectors should be a numpy array that can be split into 9 chunks along last axis
# Shape should be (batch_size, ..., 9*something) to split into 9 parts

# Create a small vectors array
# Shape: (2, 4, 36) - batch size 2, some intermediate dim 4, last dim 36 (divisible by 9)
# When split by 9 on axis=-1, gives 9 arrays of shape (2, 4, 4)
# argmax on axis=-1 gives (2, 4) for each

vectors = np.random.randn(2, 4, 36).astype(np.float32)

ARGS = {
    "vectors": vectors
}
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 map — a map output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a map 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
str2bool Ran
ran, violated the contract we drafted
SourangshuGhosh/NeuralTuringMachine/run_tasks.py
code served (permissive licence) · get_code("25c7475539e39da4")
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) 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 str2bool(v):
    return v.lower() in ('yes', 'true', 't', '1')

ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
create_linear_initializer Not yet run
unverified (harvested, no recorded run)
SourangshuGhosh/NeuralTuringMachine/utils.py
code served (permissive licence) · get_code("188a7c5e6d562ed9")
How it ran

no invocation recorded.

generate_random_graph Not yet run
unverified (harvested, no recorded run)
SourangshuGhosh/NeuralTuringMachine/generate_data.py
code served (permissive licence) · get_code("6edda34912cd2f5f")
How it ran

no invocation recorded.

graph_label_to_one_hot Not yet run
unverified (harvested, no recorded run)
SourangshuGhosh/NeuralTuringMachine/generate_data.py
code served (permissive licence) · get_code("ef16d96d55bb475d")
How it ran

no invocation recorded.

learned_init Not yet run
unverified (harvested, no recorded run)
SourangshuGhosh/NeuralTuringMachine/utils.py
code served (permissive licence) · get_code("4b7fd24acebe45e5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
str2bool 23 other papers
6 dated earlier, 17 later
1410.5401 (2014-10)
Neural Turing Machines
1502.04623 (2015-02)
DRAW: A Recurrent Neural Network For Image Generation
1504.06852 (2015-04)
FlowNet: Learning Optical Flow with Convolutional Networks
and 20 more not named here
create_linear_initializer 1 other paper
1 later
1905.09248 (2019-05)
Practice on Long Sequential User Behavior Modeling for Click-Through Rate Prediction
expand 1 other paper
1 later
1905.09248 (2019-05)
Practice on Long Sequential User Behavior Modeling for Click-Through Rate Prediction
learned_init 1 other paper
1 later
1905.09248 (2019-05)
Practice on Long Sequential User Behavior Modeling for Click-Through Rate Prediction

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

Neural Turing Machines (NTMs) are an instance of Memory Augmented Neural Networks, a new class of recurrent neural networks which decouple computation from memory by introducing an external memory unit. NTMs have demonstrated superior performance over Long Short-Term Memory Cells in several sequence learning tasks. A number of open source implementations of NTMs exist but are unstable during training and/or fail to replicate the reported performance of NTMs. This paper presents the details of our successful implementation of a NTM. Our implementation learns to solve three sequential learning tasks from the original NTM paper. We find that the choice of memory contents initialization scheme is crucial in successfully implementing a NTM. Networks with memory contents initialized to small constant values converge on average 2 times faster than the next best memory contents initialization scheme.

For agents

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

get_harvested_code_for_paper("1807.08518")
get_code_for_paper("1807.08518")
have("1807.08518")

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

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

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

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

Connect an agent — have() is free.