SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.13466 · 2019

Ordered Memory

arXiv · PDF · Open in the Atlas

Code that ran

6 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, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 2 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/1910.13466.json · badge: /api/ran/1910.13466.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
yikangshen/Ordered-Memory canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
batchify Ran
ran; our contract draft was wrong, not the code
yikangshen/Ordered-Memory/utils/utils.py
code served (permissive licence) · get_code("6bd10c3dd56c2b8c")
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 (16, 2) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 small tensor for data
# The function calls data.size(0), data.narrow(), data.view(), and data.t()
# So we need a 2D tensor
data = torch.randn(8, 4)  # 8 rows, 4 columns

# Batch size
bsz = 2

# Args object with cuda attribute
class Args:
    def __init__(self, cuda=False):
        self.cuda = cuda

args = Args(cuda=False)

ARGS = {
    "data": data,
    "bsz": bsz,
    "args": args
}
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 (16, 2) — shape (16, 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
build_tree Ran
ran on a synthesized input
yikangshen/Ordered-Memory/utils/utils.py
code served (permissive licence) · get_code("796c817ae27882c5")
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.

from collections import deque, Counter

# Analyzing the function:
# - depth: appears to be a list/sequence of integers (accessed with indexing [0], [1:], iteration)
# - sen: appears to be a list/sequence that gets converted to deque and elements are popped
# Both are used in operations that treat them as sequences of items

# Construct minimal valid arguments
depth = [3, 2, 1, 4, 2]  # List of integers representing depths
sen = ['a', 'b', 'c', 'd', 'e']  # List of items to be processed by deque

ARGS = {
    'depth': depth,
    'sen': sen
}
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 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
plot Ran
ran on a synthesized input
yikangshen/Ordered-Memory/utils/hinton.py
code served (permissive licence) · get_code("78e2c02ecf09ade6")
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 str. 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

# Construct a small test array
arr = np.array([
    [0.5, -0.3, 0.9, -0.1],
    [0.2, 0.8, -0.7, 0.0],
    [1.0, -1.0, 0.4, -0.5]
])

ARGS = {
    'arr': arr,
    'max_val': 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
repackage_hidden Ran
ran on a synthesized input
yikangshen/Ordered-Memory/utils/utils.py
code served (permissive licence) · get_code("eee10a1cbab04d32")
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)

# Test case 1: Single tensor input
tensor_hidden = torch.randn(2, 4)

# Test case 2: Nested tuple of tensors (common for LSTM/GRU hidden states)
tuple_hidden = (torch.randn(2, 4), torch.randn(2, 3))

# Test case 3: None input
none_hidden = None

# Test case 4: Deeply nested tuple structure
nested_hidden = (torch.randn(2, 4), (torch.randn(2, 3), torch.randn(2, 5)))

# We'll test with a single tensor as the primary case
ARGS = {
    "h": tensor_hidden
}
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
spans Ran
ran on a synthesized input
yikangshen/Ordered-Memory/utils/listops_data.py
code served (permissive licence) · get_code("8885e3c4f71dfc14")
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.

from collections import namedtuple

Node = namedtuple('Node', 'tag span')

# transitions: list of integers (0 for SHIFT, 1 for REDUCE)
# We need enough transitions to process n leaf nodes
# For n leaf nodes, we need n SHIFT operations and (n-1) REDUCE operations
# Total: 2n-1 transitions
n = 3
transitions = [0, 0, 0, 1, 1]  # SHIFT, SHIFT, SHIFT, REDUCE, REDUCE

# tokens: optional list of strings where tokens[i] == ']' triggers tag='struct'
tokens = ['a', 'b', ']']

ARGS = {
    'transitions': transitions,
    'tokens': tokens,
}
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 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
visual Ran
ran on a synthesized input
yikangshen/Ordered-Memory/utils/hinton.py
code served (permissive licence) · get_code("4ec9ae8afdae6574")
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 str. 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 = {
    'val': 0.5,
    'max_val': 1.0
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
PreprocessDataset Not yet run
unverified (harvested, no recorded run)
yikangshen/Ordered-Memory/utils/listops_data.py
code served (permissive licence) · get_code("403df95084a63a53")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
yikangshen/Ordered-Memory/sentiment.py
code served (permissive licence) · get_code("57cbf02adf8b391c")
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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
batchify 7 other papers
5 dated earlier, 2 later
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
1805.04623 (2018-05)
Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context
1808.09029 (2018-08)
Pyramidal Recurrent Unit for Language Modeling
and 4 more not named here

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

Stack-augmented recurrent neural networks (RNNs) have been of interest to the deep learning community for some time. However, the difficulty of training memory models remains a problem obstructing the widespread use of such models. In this paper, we propose the Ordered Memory architecture. Inspired by Ordered Neurons (Shen et al., 2018), we introduce a new attention-based mechanism and use its cumulative probability to control the writing and erasing operation of the memory. We also introduce a new Gated Recursive Cell to compose lower-level representations into higher-level representation. We demonstrate that our model achieves strong performance on the logical inference task (Bowman et al., 2015)and the ListOps (Nangia and Bowman, 2018) task. We can also interpret the model to retrieve the induced tree structure, and find that these induced structures align with the ground truth. Finally, we evaluate our model on the Stanford SentimentTreebank tasks (Socher et al., 2013), and find that it performs comparatively with the state-of-the-art methods in the literature.

For agents

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

get_harvested_code_for_paper("1910.13466")
get_code_for_paper("1910.13466")
have("1910.13466")

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

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

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

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

Connect an agent — have() is free.