SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.01927 · 2023

GateLoop: Fully Data-Controlled Linear Recurrence for Sequence Modeling

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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, 3 violated it and 0 have no contract verdict; 0 failures 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/2311.01927.json · badge: /api/ran/2311.01927.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
tobiaskatsch/GateLoop canonical (classifier label)
classifier basis: census
2 ran · 2 no recorded run
axrwl/gateloop reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
gate_loop_operator Ran
ran, violated the contract we drafted
axrwl/gateloop/gateloop.py
code served (permissive licence) · get_code("d319a1d5e82b0059")
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 ArrayImpl, ndim 3, dtype family float, shape (2, 3, 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 jax
import jax.numpy as jnp
import numpy as np

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

# Create small test tensors with distinct dimensions
batch_size = 2
seq_len = 3
dim = 4

# k: key tensor, shape (batch, seq_len, dim)
k = jnp.ones((batch_size, seq_len, dim), dtype=jnp.float32)

# v: value tensor, shape (batch, seq_len, dim)
v = jnp.ones((batch_size, seq_len, dim), dtype=jnp.float32)

# q: query tensor, shape (batch, seq_len, dim)
q = jnp.ones((batch_size, seq_len, dim), dtype=jnp.float32)

# a: gate/attention weights, shape (batch, seq_len, dim)
a = jnp.ones((batch_size, seq_len, dim), dtype=jnp.float32)

ARGS = {
    "k": k,
    "v": v,
    "q": q,
    "a": a,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
parse_bool Ran
ran, violated the contract we drafted
tobiaskatsch/GateLoop/run_experiment.py
code served (permissive licence) · get_code("594b1aafd15bf575")
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

torch.manual_seed(0)

# The parse_bool function takes a single parameter 'value' and converts it to a string,
# lowercases it, and compares it to the string 'true'.
# We need to provide a value that can be converted to a string.

ARGS = {
    "value": "true"
}
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
scaled_dot_product Ran
ran, violated the contract we drafted
tobiaskatsch/GateLoop/flax_gated_linear_rnn/attention.py
code served (permissive licence) · get_code("f070d6bd781117c0")
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 ArrayImpl, ndim 3, dtype family float, shape (2, 3, 5) 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 jax.numpy as jnp
import math

# Create small tensors for scaled dot product attention
# q, k, v should have compatible shapes for matrix multiplication
# q: (batch, seq_len_q, d_k)
# k: (batch, seq_len_k, d_k)
# v: (batch, seq_len_v, d_v)

batch_size = 2
seq_len_q = 3
seq_len_k = 3
d_k = 4
d_v = 5

# Create query, key, value tensors
q = jnp.ones((batch_size, seq_len_q, d_k))
k = jnp.ones((batch_size, seq_len_k, d_k))
v = jnp.ones((batch_size, seq_len_k, d_v))

# Create an attention mask (optional)
# mask should be same shape as attention logits: (batch, seq_len_q, seq_len_k)
# 1 means keep, 0 means mask out
mask = jnp.ones((batch_size, seq_len_q, seq_len_k))

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
binary_operator Not yet run
unverified (harvested, no recorded run)
tobiaskatsch/GateLoop/flax_gated_linear_rnn/gated_linear_rnn.py
code served (permissive licence) · get_code("96947480ac813c76")
How it ran

no invocation recorded.

get_class_from_name Not yet run
unverified (harvested, no recorded run)
tobiaskatsch/GateLoop/run_experiment.py
code served (permissive licence) · get_code("0bdce3a037827d03")
How it ran

no invocation recorded.

Also present in other papers' code

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

Linear Recurrence has proven to be a powerful tool for modeling long sequences efficiently. In this work, we show that existing models fail to take full advantage of its potential. Motivated by this finding, we develop GateLoop, a foundational sequence model that generalizes linear recurrent models such as S4, S5, LRU and RetNet, by employing data-controlled state transitions. Utilizing this theoretical advance, GateLoop empirically outperforms existing models for auto-regressive language modeling. Our method comes with a low-cost $O(l)$ recurrent mode and an efficient $O(l \log_{2} l)$ parallel mode making use of highly optimized associative scan implementations. Furthermore, we derive an $O(l^2)$ surrogate attention mode, revealing remarkable implications for Transformer and recently proposed architectures. Specifically, we prove that our approach can be interpreted as providing data-controlled relative-positional information to Attention. While many existing models solely rely on data-controlled cumulative sums for context aggregation, our findings suggest that incorporating data-controlled complex cumulative products may be a crucial step towards more powerful sequence models.

For agents

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

get_harvested_code_for_paper("2311.01927")
get_code_for_paper("2311.01927")
have("2311.01927")

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

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

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

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

Connect an agent — have() is free.