SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.04849 · 2018

The unreasonable effectiveness of the forget gate

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 failures of our instrument; 3 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/1804.04849.json · badge: /api/ran/1804.04849.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
JosvanderWesthuizen/janet canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
bias_initializer Ran
ran on a synthesized input
JosvanderWesthuizen/janet/aux_code/rnn_cells.py
code served (permissive licence) · get_code("97e5fde7f00efbcd")
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 function. 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
import tensorflow as tf

def bias_initializer(num_gates):
    def _initializer(shape, dtype=tf.float32, partition_info=None):
        p = np.zeros(shape)
        num_units = int(shape[0] // num_gates)
        p[-num_units:] = np.ones(num_units)
        return tf.constant(p, dtype)
    return _initializer

# Test the function by calling the returned initializer
num_gates_value = 3
initializer_fn = bias_initializer(num_gates_value)

# Call the initializer with a shape
shape_value = (9,)  # 9 units total, divisible by 3 gates -> 3 units per gate
result = initializer_fn(shape_value)

ARGS = {
    "num_gates": 3
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
chrono_init Ran
ran on a synthesized input
JosvanderWesthuizen/janet/aux_code/rnn_cells.py
code served (permissive licence) · get_code("1978bc7747dffa0b")
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 function. 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

ARGS = {
    "t_max": 10.0,
    "num_gates": 4
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
create_conf_dict Ran
ran on a synthesized input
JosvanderWesthuizen/janet/aux_code/ops.py
code served (permissive licence) · get_code("2fc4c817006d0cf1")
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 dict. 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 copy

class Args:
    def __init__(self):
        self.logdir = "/tmp/logdir"
        self.test = False
        self.gpu = 0
        self.model_name = "test_model"
        self.batch_size = 32
        self.learning_rate = 0.001
        self.epochs = 10

args = Args()

ARGS = {
    'args': args
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_add Ran
ran on a synthesized input
JosvanderWesthuizen/janet/prepare_data.py
code served (permissive licence) · get_code("a62eef0fd59a65e3")
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 = {
    "n_data": 2,
    "seq_len": 8,
}
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_validset_feeds Ran
ran on a synthesized input
JosvanderWesthuizen/janet/aux_code/ops.py
code served (permissive licence) · get_code("c09a3cba061368d7")
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
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal mock model that has the attributes accessed in get_validset_feeds
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.x = "x_placeholder"
        self.y = "y_placeholder"
        self.seq_lens = "seq_lens_placeholder"
        self.training = "training_placeholder"
        self.keep_prob = "keep_prob_placeholder"
        self.loss_nowd = "loss_nowd_placeholder"
        self.output_probs = "output_probs_placeholder"

# Create mock model instance
model = MockModel()

# Create sample sequences - list of numpy arrays with shape (seq_len, num_features)
# Using distinct sizes: 3 samples with different lengths, 4 features each
seq1 = np.random.randn(5, 4).astype(np.float32)  # sequence of length 5
seq2 = np.random.randn(3, 4).astype(np.float32)  # sequence of length 3
seq3 = np.random.randn(7, 4).astype(np.float32)  # sequence of length 7
x = [seq1, seq2, seq3]

# Create labels - numpy array with batch_size=3
y = np.array([0, 1, 0], dtype=np.int64)

# Hidden dimension
h_dim = 8

ARGS = {
    "model": model,
    "x": x,
    "y": y,
    "h_dim": h_dim
}
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 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
calculate_metrics Not yet run
unverified (harvested, no recorded run)
JosvanderWesthuizen/janet/aux_code/ops.py
code served (permissive licence) · get_code("1f5d644b13f89499")
How it ran

no invocation recorded.

create_scalar_summaries Not yet run
unverified (harvested, no recorded run)
JosvanderWesthuizen/janet/aux_code/tf_ops.py
code served (permissive licence) · get_code("d73e7b76fb2fe4a4")
How it ran

no invocation recorded.

linear Not yet run
unverified (harvested, no recorded run)
JosvanderWesthuizen/janet/aux_code/tf_ops.py
code served (permissive licence) · get_code("cfd133b284c3f8ad")
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, 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 8 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

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

Abstract

Given the success of the gated recurrent unit, a natural question is whether all the gates of the long short-term memory (LSTM) network are necessary. Previous research has shown that the forget gate is one of the most important gates in the LSTM. Here we show that a forget-gate-only version of the LSTM with chrono-initialized biases, not only provides computational savings but outperforms the standard LSTM on multiple benchmark datasets and competes with some of the best contemporary models. Our proposed network, the JANET, achieves accuracies of 99% and 92.5% on the MNIST and pMNIST datasets, outperforming the standard LSTM which yields accuracies of 98.5% and 91%.

For agents

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

get_harvested_code_for_paper("1804.04849")
get_code_for_paper("1804.04849")
have("1804.04849")

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

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

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

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

Connect an agent — have() is free.