SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1808.09029 · 2018

Pyramidal Recurrent Unit for Language Modeling

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 1 has no contract verdict; 1 failure of our instrument; 1 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.09029.json · badge: /api/ran/1808.09029.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
sacmehta/PRU canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
FunctionStatusWhere it lives
batchify Ran
ran; our contract draft was wrong, not the code
sacmehta/PRU/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
get_batch Ran
ran on a synthesized input
sacmehta/PRU/utils.py
code served (permissive licence) · get_code("be3874d8cf97dae0")
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, ndim 2, dtype family int; 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create a small source tensor (sequence of tokens/embeddings)
# Shape: (sequence_length, batch_size) or (sequence_length,) depending on use
# We'll make it (10,) - a 1D tensor of 10 elements for simplicity
source = torch.randint(0, 100, (10,))

# Create args object with required attributes
class Args:
    def __init__(self):
        self.bptt = 5  # backprop through time - sequence length

args = Args()

# Define ARGS dict with all parameters
ARGS = {
    'source': source,
    'i': 0,
    'args': args,
    'seq_len': None,
    'evaluation': False
}
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 tuple, ndim 2, dtype family int — a tuple 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
repackage_hidden Not yet run
unverified (harvested, no recorded run)
sacmehta/PRU/utils.py
code served (permissive licence) · get_code("d98e69125467f2f0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 later) and 0 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
2 dated earlier, 5 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
1810.09536 (2018-10)
Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks
and 4 more not named here
repackage_hidden 6 other papers
3 dated earlier, 3 later
1709.07432 (2017-09)
Dynamic Evaluation of Neural Sequence Models
1710.02224 (2017-10)
Dilated Recurrent Neural Networks
1805.04623 (2018-05)
Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context
and 3 more not named here
get_batch 1 other paper
1 dated earlier
1805.04623 (2018-05)
Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context

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

LSTMs are powerful tools for modeling contextual information, as evidenced by their success at the task of language modeling. However, modeling contexts in very high dimensional space can lead to poor generalizability. We introduce the Pyramidal Recurrent Unit (PRU), which enables learning representations in high dimensional space with more generalization power and fewer parameters. PRUs replace the linear transformation in LSTMs with more sophisticated interactions including pyramidal and grouped linear transformations. This architecture gives strong results on word-level language modeling while reducing the number of parameters significantly. In particular, PRU improves the perplexity of a recent state-of-the-art language model Merity et al. (2018) by up to 1.3 points while learning 15-20% fewer parameters. For similar number of model parameters, PRU outperforms all previous RNN models that exploit different gating mechanisms and transformations. We provide a detailed examination of the PRU and its behavior on the language modeling tasks. Our code is open-source and available at https://sacmehta.github.io/PRU/

For agents

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

get_harvested_code_for_paper("1808.09029")
get_code_for_paper("1808.09029")
have("1808.09029")

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

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

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

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

Connect an agent — have() is free.