SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.00396 · ICLR · 2022

Efficiently Modeling Long Sequences with Structured State Spaces

Christopher Ré, Albert Gu, Karan Goel

arXiv · PDF · Open in the Atlas

Code that ran

37 of 55 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 18 have no contract verdict; 16 failures of our instrument; 18 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/2111.00396.json · badge: /api/ran/2111.00396.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
state-spaces/s4 canonical (classifier label)
classifier basis: classifier_2025
5 ran · 5 no recorded run
srush/annotated-s4 community (classifier label)
classifier basis not recorded on the link
9 ran · 5 no recorded run
elgazzarr/fmri-s4 community
Papers with Code archive
9 ran · 3 no recorded run
leonty1/essm community
Papers with Code archive
4 ran · 3 no recorded run
forgi86/lru-reduction community
Papers with Code archive
4 ran · 2 no recorded run
raminmh/liquid-s4 extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
maxtimer97/ssm-inspired-lif community
Papers with Code archive
2 ran · 0 no recorded run
nicolaszucchet/minimal-lru community
Papers with Code archive
1 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Activation Ran
ran; our contract draft was wrong, not the code
raminmh/liquid-s4/src/models/s4/s4.py
code served (permissive licence) · get_code("89b10a8b26bbb7ed")
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 ReLU. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes two parameters: activation and dim
# activation: a string or None specifying which activation function to use
# dim: an integer specifying the dimension for GLU (default -1)

ARGS = {
    'activation': 'relu',
    'dim': -1
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
Kernel Ran
ran on a synthesized input · constructed an object; no result was computed
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("855fe49867900076")
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 an instance of its own class, Kernel: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
from collections import defaultdict
from typing import Optional, Mapping, Union

torch.manual_seed(0)

# Construct ARGS for Kernel.__init__
ARGS = {
    'd_model': 8,
    'channels': 2,
    'l_max': 64,
    'lr': 0.001,
    'wd': 0.0,
    'verbose': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pytorch_lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Kernel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Kernel 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
LRU Ran
ran on a synthesized input · constructed an object; no result was computed
nicolaszucchet/minimal-lru/lru/model.py
code served (permissive licence) · get_code("6e1825a893399540")
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 an instance of its own class, LRU: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
from flax import linen as nn

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

ARGS = {
    'd_hidden': 4,
    'd_model': 3,
    'r_min': 0.0,
    'r_max': 1.0,
    'max_phase': 6.28,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LRU — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LRU 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
LinearActivation Ran
ran; our contract draft was wrong, not the code
raminmh/liquid-s4/src/models/s4/s4.py
code served (permissive licence) · get_code("898daef1784ec4bd")
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 Sequential. 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 torch
import torch.nn as nn
from functools import partial

torch.manual_seed(0)

ARGS = {
    'd_input': 4,
    'd_output': 3,
    'bias': True,
    'transposed': False,
    'activation': 'relu',
    'activate': 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
LinearActivation Ran
ran; our contract draft was wrong, not the code
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("522a1fc1276ec144")
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 Linear. 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 torch
import torch.nn as nn
from functools import partial

torch.manual_seed(0)

ARGS = {
    'd_input': 4,
    'd_output': 3,
    'bias': True,
    'zero_bias_init': False,
    'transposed': False,
    'initializer': 'uniform',
    'activation': 'relu',
    'activate': False,
    'weight_norm': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
opt_einsum, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
LinearActivation Ran
ran; our contract draft was wrong, not the code
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("6c960a9598a04692")
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 Linear. 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 torch
import torch.nn as nn
from functools import partial

torch.manual_seed(0)

ARGS = {
    'd_input': 4,
    'd_output': 3,
    'bias': True,
    'zero_bias_init': False,
    'transposed': False,
    'initializer': 'uniform',
    'activation': 'relu',
    'activate': False,
    'weight_norm': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
opt_einsum, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
S4D Ran
ran on a synthesized input · constructed an object; no result was computed
maxtimer97/ssm-inspired-lif/models/snns.py
pointer only (licence: NONE) · get_code("9d310a2394e754b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, maxtimer97/ssm-inspired-lif when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

S4DKernel Ran
ran on a synthesized input · constructed an object; no result was computed
maxtimer97/ssm-inspired-lif/models/snns.py
pointer only (licence: NONE) · get_code("1f674b4ed2ecc8cd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, maxtimer97/ssm-inspired-lif when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SE_Block Ran
ran on a synthesized input · constructed an object; no result was computed
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("a19e25de29fbaae4")
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 an instance of its own class, SE_Block: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# SE_Block.__init__ takes parameters: self, c, r
# c: number of channels (integer)
# r: reduction ratio (integer, default 4)

# SE_Block.forward expects input x with shape (bs, c, length)
# where bs is batch size, c is channels, length is sequence length

ARGS = {
    "c": 4,
    "r": 2,
}
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 SE_Block — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SE_Block 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
SSMKernel Ran
ran on a synthesized input · constructed an object; no result was computed
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("a0aad68e21728b6a")
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 an instance of its own class, SSMKernel: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
from collections import defaultdict
from typing import Optional, Mapping, Union

torch.manual_seed(0)

class Kernel(nn.Module):
    """Interface for modules that produce convolution kernels."""

    def __init__(self, d_model: int=0, channels: int=1, l_max: Optional[int]=None, lr: Union[float, Optional[Mapping]]=None, wd: Union[float, Optional[Mapping]]=0.0, verbose: bool=True, **kwargs):
        super().__init__()
        assert d_model > 0
        self.H = self.d_model = d_model
        self.L = self.l_max = l_max
        self.channels = channels
        self.lr = lr
        self.wd = wd
        self.verbose = verbose
        
        if self.lr is None or isinstance(self.lr, float):
            self.lr_dict = defaultdict(lambda: self.lr)
        else:
            self.lr_dict = defaultdict(lambda: None)
            self.lr_dict.update(self.lr)
        
        if self.wd is None or isinstance(self.wd, float):
            self.wd_dict = defaultdict(lambda: self.wd)
        else:
            self.wd_dict = defaultdict(lambda: None)
            self.wd_dict.update(self.wd)

    def forward(self, state=None, rate=1.0, L=None):
        raise NotImplementedError

    def register(self, name, tensor, lr=None, wd=0.0):
        if lr == 0.0:
            self.register_buffer(name, tensor)
        else:
            self.register_parameter(name, nn.Parameter(tensor))
            optim = {}
            if lr is not None:
                optim['lr'] = lr
            if wd is not None:
                optim['weight_decay'] = wd
            setattr(getattr(self, name), '_optim', optim)

    def _setup_step(self, **kwargs):
        raise NotImplementedError

    def step(self, x, state, **kwargs):
        raise NotImplementedError

    def default_state(self, *args, **kwargs):
        pass


ARGS = {
    'd_model': 4,
    'channels': 2,
    'l_max': 16,
    'lr': 0.001,
    'wd': 0.0,
    'verbose': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, pytorch_lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SSMKernel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SSMKernel 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
TransposedLinear Ran
ran on a synthesized input · constructed an object; no result was computed
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("5a5e28e0e6ccd2d2")
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 an instance of its own class, TransposedLinear: the run constructed the object and did not call it, so no result was computed. 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 math
import torch
import torch.nn as nn
import opt_einsum as oe

torch.manual_seed(0)

ARGS = {
    "d_input": 4,
    "d_output": 3,
    "bias": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
opt_einsum, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TransposedLinear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransposedLinear 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
TransposedLinear Ran
ran on a synthesized input
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("7bbdbc08ffa75119")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 math
import torch
import torch.nn as nn
import opt_einsum as oe

einsum = contract = oe.contract

class TransposedLinear(nn.Module):
    """ Linear module on the second-to-last dimension """

    def __init__(self, d_input, d_output, bias=True):
        super().__init__()
        self.weight = nn.Parameter(torch.empty(d_output, d_input))
        nn.init.kaiming_uniform_(self.weight, a=math.sqrt(5))
        if bias:
            self.bias = nn.Parameter(torch.empty(d_output, 1))
            bound = 1 / math.sqrt(d_input)
            nn.init.uniform_(self.bias, -bound, bound)
        else:
            self.bias = 0.0

    def forward(self, x):
        return contract('... u l, v u -> ... v l', x, self.weight) + self.bias


INIT_ARGS = {
    'd_input': 4,
    'd_output': 3,
    'bias': True,
}

ARGS = {
    'x': torch.randn(2, 4, 5),
}

if __name__ == '__main__':
    model = TransposedLinear(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
opt_einsum, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_interleave Ran
ran; our contract draft was wrong, not the code
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("95f2fb2164162bdd")
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 3, dtype family float, shape (2, 7, 3) 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)

# Create small test tensors
# a and b are used in stack/flatten operations, so they need compatible shapes
# axis parameter is used to index into dimensions, so we need at least axis+1 dimensions
a = torch.randn(2, 4, 3)  # shape (2, 4, 3)
b = torch.randn(2, 3, 3)  # shape (2, 3, 3) - one element fewer along axis 1

axis = 1

ARGS = {
    "a": a,
    "b": b,
    "axis": axis,
}
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 3, dtype family float, shape (2, 7, 3) — shape (2, 7, 3) 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
associative_scan Ran
ran; our contract draft was wrong, not the code
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("22730030e03982a4")
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, ndim 4, dtype family float; 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 functools import partial

torch.manual_seed(0)

# The operator function takes two nested structures and combines them
def operator_func(a, b):
    """Simple operator that adds two nested structures of tensors."""
    if isinstance(a, dict) and isinstance(b, dict):
        return {k: a[k] + b[k] for k in a.keys()}
    elif isinstance(a, list) and isinstance(b, list):
        return [x + y for x, y in zip(a, b)]
    else:
        return a + b

# Create test elements - a simple nested structure of tensors
# Using axis=0, so we need tensors with consistent first dimension
batch_size = 4
feature_dim = 3
sequence_len = 6

# Create a list of tensors along axis 0
elems = [
    torch.randn(sequence_len, batch_size, feature_dim),
    torch.randn(sequence_len, batch_size, feature_dim),
]

ARGS = {
    'operator': operator_func,
    'elems': elems,
    'axis': 0,
    'reverse': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 4, dtype family float — a list 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
binary_operator_diag Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("a6aaaac22e971146")
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 tuple, ndim 2, dtype family float; 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

torch.manual_seed(0)

# Create small tensors for q_i and q_j
# Each tuple contains (A, Bu) where both are 1D tensors of shape (P,)
# Using P=4 for small dimension

P = 4

# q_i: tuple of (A_i, Bu_i)
A_i = torch.randn(P)
b_i = torch.randn(P)
q_i = (A_i, b_i)

# q_j: tuple of (A_j, Bu_j)
A_j = torch.randn(P)
b_j = torch.randn(P)
q_j = (A_j, b_j)

ARGS = {
    "q_i": q_i,
    "q_j": q_j,
}
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 tuple, ndim 2, dtype family float — 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
cauchy Ran
ran on a synthesized input
srush/annotated-s4/s4/memory_bug.py
code served (permissive licence) · get_code("b294cd8cde986e7e")
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 1, dtype family float, shape (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

# The function signature shows:
# cauchy takes omega (shape l) and lambd (shape n)
# It computes 1.0 / (omega - lambd) for each omega value vmapped over
# This means omega is a 1D array of length l, lambd is a 1D array of length n
# The subtraction broadcasts to (l, n), then sum reduces over n to give (l,)

omega = jnp.array([1.0, 2.0, 3.0, 4.0])  # shape (4,) - l=4
lambd = jnp.array([0.1, 0.2, 0.3])  # shape (3,) - n=3

ARGS = {
    "omega": omega,
    "lambd": lambd,
}
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 1, dtype family float, shape (4,) — shape (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
cauchy_naive Ran
ran; our contract draft was wrong, not the code
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("b7d9d94554e93b1b")
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 Tensor, ndim 2, dtype family float, shape (2, 3) 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)

# v: (..., N) - shape (batch, N)
# z: (..., L) - shape (batch, L)
# w: (..., N) - shape (batch, N)

batch_size = 2
N = 4
L = 3

v = torch.randn(batch_size, N)
z = torch.randn(batch_size, L)
w = torch.randn(batch_size, N)

ARGS = {
    "v": v,
    "z": z,
    "w": w,
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
complex_softmax Ran
ran on a synthesized input
srush/annotated-s4/s4/dss.py
code served (permissive licence) · get_code("b895231ad0d7eb03")
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 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 jax.numpy as jnp

# complex_softmax expects a complex array as input
# The function performs operations on complex numbers:
# - x[np.argmax(x.real)] to find max of real part
# - x - ... (subtraction)
# - np.exp(...) (exponential)
# - x.conj() (conjugate)
# - x * x.conj() (multiplication)
# - np.sum(...) (summation)
# All these operations work on jax arrays

# Create a small complex array (batch_size=2, features=4)
x = jnp.array([
    [1.0 + 2.0j, 2.0 + 1.0j, 0.5 + 0.5j, 1.5 + 0.3j],
    [0.2 + 0.1j, 1.1 + 0.9j, 0.3 + 0.7j, 0.8 + 0.2j]
], dtype=jnp.complex64)

eps = 1e-07

ARGS = {
    "x": x,
    "eps": eps
}
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 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
create_sin_ax_b_dataset Ran
ran on a synthesized input
srush/annotated-s4/s4/data.py
code served (permissive licence) · get_code("a9f0a96fb976b6ac")
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 1, dtype family float; 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
import numpy as np
import jax

torch.manual_seed(0)

ARGS = {
    "n_examples": 100,
    "bsz": 32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — 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
create_sin_x_dataset Ran
ran on a synthesized input
srush/annotated-s4/s4/data.py
code served (permissive licence) · get_code("d637a7237715e2ea")
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 1, dtype family float; 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 numpy as np
import torch
from torch.utils.data import TensorDataset, DataLoader

torch.manual_seed(0)

ARGS = {
    'n_examples': 8,
    'bsz': 2,
}
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, ndim 1, dtype family float — 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
discretize Ran
ran on a synthesized input
srush/annotated-s4/s4/s4.py
code served (permissive licence) · get_code("2fbdf4a5c125f869")
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 jax.numpy as np

# Create small matrices for the discretize function
# A: square matrix (system dynamics), shape (4, 4)
# B: input matrix, shape (4, 3)
# C: output matrix, shape (2, 4)
# step: scalar time step

A = np.array([
    [0.1, 0.2, 0.0, 0.0],
    [0.0, 0.1, 0.1, 0.0],
    [0.0, 0.0, 0.2, 0.1],
    [0.1, 0.0, 0.0, 0.3]
], dtype=np.float32)

B = np.array([
    [1.0, 0.0, 0.5],
    [0.0, 1.0, 0.0],
    [0.5, 0.0, 1.0],
    [0.0, 0.5, 0.0]
], dtype=np.float32)

C = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
], dtype=np.float32)

step = 0.1

ARGS = {
    "A": A,
    "B": B,
    "C": C,
    "step": step
}
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 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
dss_ssm Ran
ran on a synthesized input
srush/annotated-s4/s4/dss.py
code served (permissive licence) · get_code("12ff0e50a74997cf")
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 jax
import jax.numpy as jnp
import numpy as np

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

# Define small parameters for the function
N = 4  # State dimension
L = 3  # Length parameter
step = 0.1  # Step size

# W: should be reshaped to (1, N), so create shape (N,) which will reshape to (1, N)
W = jnp.array([0.1, 0.2, 0.3, 0.4])

# Lambda: diagonal elements, shape (N,)
# Use distinct negative values to ensure exp(Lambda * step) is well-behaved
Lambda = jnp.array([-0.5, -1.0, -1.5, -2.0])

ARGS = {
    "W": W,
    "Lambda": Lambda,
    "L": L,
    "step": step,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, 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
embed_c2r Ran
ran, honoured the contract we drafted
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("ada726a93c0d5dfc")
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 ndarray, ndim 2, dtype family float, shape (8, 6) 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 numpy as np
from einops import rearrange, repeat

# The function embed_c2r takes a single parameter A
# Looking at the function body:
# - A is rearranged with einops, suggesting it's an array-like object
# - It's padded with np.pad, so it should be a numpy array
# - The rearrange operations suggest A has shape (m, n) at minimum
# - The first rearrange adds dimensions: '... m n -> ... m () n ()'
# - This means A should be at least 2D

# Create a small numpy array with distinct dimensions
A = np.random.randn(4, 3)  # 4x3 matrix to have distinct dimensions

ARGS = {
    'A': A
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 6) — shape (8, 6) 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_initializer Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from ag1988/dss
pointer only · get_code("f3449af8fae1d130")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hippo_skew_evals Ran
ran, violated the contract we drafted
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("818366932a065b68")
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 Tensor, ndim 1, dtype family float, shape (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)

ARGS = {
    "N": 4
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (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
linear Ran
ran on a synthesized input · constructed an object; no result was computed
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("f1cab21ec84db199")
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 an instance of its own class, linear: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'c_in': 3,
    'c_out': 16,
}
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 linear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a linear 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
log_vandermonde_naive Ran
ran; our contract draft was wrong, not the code
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("e25911109ba29783")
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 Tensor, ndim 2, dtype family float, shape (2, 3) 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)

# Create small tensors with distinct dimensions
batch_size = 2
N = 4
L = 3

# v: (..., N) - shape (2, 4)
v = torch.randn(batch_size, N)

# x: (..., N) - shape (2, 4)
x = torch.randn(batch_size, N)

ARGS = {
    "v": v,
    "x": x,
    "L": L,
    "conj": 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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
nplr Ran
ran; our contract draft was wrong, not the code
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("63d9be34f73a43ef")
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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "measure": "legs",
    "N": 4,
    "rank": 1,
    "dtype": torch.float,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, opt_einsum, scipy, 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
nplr Ran
ran; our contract draft was wrong, not the code
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("d43b03a2d76a4e41")
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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    'measure': 'legs',
    'N': 4,
    'rank': 1,
    'dtype': torch.float,
    'diagonalize_precision': True,
    'B_clip': 2.0,
}
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
power Ran
ran; our contract draft was wrong, not the code
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("348275db42a37bee")
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 torch
from einops import rearrange

torch.manual_seed(0)

# Analyze the function:
# - L: an integer, used in while loop with modulo and division
# - A: a tensor with shape (..., N, N), used for matrix multiplication
# - v: optional tensor with shape (..., N, L), used for matrix multiplication and indexing
# The function computes powers of matrix A and optionally a scan operation

# Create small test tensors
N = 4  # matrix dimension
L = 8  # sequence length for v

# A: (..., N, N) - a simple 4x4 matrix
A = torch.randn(4, 4)

# v: (..., N, L) - shape (4, 8) for the sequence of vectors
v = torch.randn(4, 8)

# L: integer power
L_power = 8

ARGS = {
    'L': L_power,
    'A': A,
    'v': v
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, 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
random_SSM Ran
ran on a synthesized input
srush/annotated-s4/s4/s4.py
code served (permissive licence) · get_code("5b97d5371e044049")
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 jax
import jax.numpy as jnp

# Set seed for reproducibility
key = jax.random.PRNGKey(0)

# Define arguments for random_SSM
# rng: a JAX random key
# N: dimension of the SSM state space (small integer)
ARGS = {
    "rng": key,
    "N": 4,
}
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 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
rank_correction Ran
ran, honoured the contract we drafted
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("b719a3ec912becb6")
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 (1, 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)

ARGS = {
    'measure': 'legs',
    'N': 4,
    'rank': 1,
    'dtype': torch.float,
}
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 (1, 4) — shape (1, 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
reciprocal Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("e6971caf5e1cc5c1")
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 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
import numpy as np

torch.manual_seed(0)

# The function reciprocal takes:
# - x: a tensor (complex or real) that supports .conj(), arithmetic ops, .real, .clamp()
# - epsilon: a float (default 1e-07)
# - clamp: a bool (default False)

# Create a small complex tensor for x
x = torch.randn(2, 4, dtype=torch.complex64)

ARGS = {
    "x": x,
    "epsilon": 1e-07,
    "clamp": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
s4d_kernel Ran
ran on a synthesized input
srush/annotated-s4/s4/s4d.py
code served (permissive licence) · get_code("2cebc3a83a8c3bc5")
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 1, dtype family float, shape (8,) 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 np

# s4d_kernel takes parameters: C, A, L, step
# - C: used in vandermonde_product as C * Bbar, needs to be array-like
# - A: used in discretize and vandermonde_product, needs to be array-like
# - L: used as length in vandermonde_product (arange(L)), needs to be int
# - step: used in discretize, needs to be scalar float

# Create small test tensors
C = np.array([1.0, 0.5, -0.3, 0.2])  # shape (4,)
A = np.array([-0.1, -0.2, -0.3, -0.5])  # shape (4,)
L = 8  # sequence length
step = 0.1  # discretization step

ARGS = {
    'C': C,
    'A': A,
    'L': L,
    'step': step,
}
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 1, dtype family float, shape (8,) — shape (8,) 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
scan_SSM Ran
ran on a synthesized input
srush/annotated-s4/s4/s4.py
code served (permissive licence) · get_code("f78db7b4e91ceafa")
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 jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Define dimensions
state_dim = 4  # State dimension
input_dim = 3  # Input dimension
output_dim = 2  # Output dimension
sequence_length = 2  # Sequence length for u

# Create SSM matrices
# Ab: state transition matrix (state_dim x state_dim)
Ab = jnp.array([[0.9, 0.1, 0.0, 0.0],
                 [0.0, 0.8, 0.1, 0.0],
                 [0.0, 0.0, 0.7, 0.1],
                 [0.0, 0.0, 0.0, 0.6]], dtype=jnp.float32)

# Bb: input-to-state matrix (state_dim x input_dim)
Bb = jnp.array([[1.0, 0.5, 0.2],
                 [0.3, 0.8, 0.1],
                 [0.2, 0.1, 0.9],
                 [0.5, 0.3, 0.4]], dtype=jnp.float32)

# Cb: state-to-output matrix (output_dim x state_dim)
Cb = jnp.array([[1.0, 0.2, 0.1, 0.0],
                 [0.0, 0.5, 0.3, 0.8]], dtype=jnp.float32)

# u: input sequence (sequence_length x input_dim)
u = jnp.array([[1.0, 0.5, 0.2],
                [0.3, 0.8, 0.1]], dtype=jnp.float32)

# x0: initial state (state_dim,)
x0 = jnp.array([0.0, 0.0, 0.0, 0.0], dtype=jnp.float32)

ARGS = {
    'Ab': Ab,
    'Bb': Bb,
    'Cb': Cb,
    'u': u,
    'x0': x0
}
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 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
slice_along_axis Ran
ran; our contract draft was wrong, not the code
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("34b3f63a52000df0")
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 1, dtype family float; 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - start: integer for slice start
# - end: integer for slice end
# - stride: optional integer for slice stride
# - axis: integer for which axis to slice on

ARGS = {
    "start": 1,
    "end": 4,
    "stride": 2,
    "axis": 2
}
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, ndim 1, dtype family float — 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
transition Ran
ran; our contract draft was wrong, not the code
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("81a948ed6d1a963f")
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
from scipy import special as ss

ARGS = {
    "measure": "legt",
    "N": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, scipy — 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
DSS Not yet run
unverified (harvested, no recorded run)
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("f3322f19b651f88b")
How it ran

no invocation recorded.

DSSKernel Not yet run
unverified (harvested, no recorded run)
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("e604fd0087c1b8f3")
How it ran

no invocation recorded.

DefaultMNIST Not yet run
unverified (harvested, no recorded run)
srush/annotated-s4/s4/sample.py
code served (permissive licence) · get_code("e4f2a7408ee25578")
How it ran

no invocation recorded.

HippoSSKernel Not yet run
unverified (harvested, no recorded run)
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("5c8e4f0e400a4956")
How it ran

no invocation recorded.

LRU Not yet run
unverified (harvested, no recorded run)
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("0d14eeb8e803d789")
How it ran

no invocation recorded.

OptimModule Not yet run
unverified (harvested, no recorded run)
leonty1/essm/src/models/sequence/ss/standalone/dss.py
code served (permissive licence) · get_code("67c82b9a05adebd0")
How it ran

no invocation recorded.

S4 Not yet run
unverified (harvested, no recorded run)
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("7d9920a7ef12302c")
How it ran

no invocation recorded.

SSKernelNPLR Not yet run
unverified (harvested, no recorded run)
elgazzarr/fmri-s4/src/models/sequence/ss/standalone/s4.py
code served (permissive licence) · get_code("29e51ca431baa365")
How it ran

no invocation recorded.

SSMKernelDPLR Not yet run
unverified (harvested, no recorded run)
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("2e1521f562fb37ea")
How it ran

no invocation recorded.

SSMKernelDiag Not yet run
unverified (harvested, no recorded run)
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("b2fe7789636402f0")
How it ran

no invocation recorded.

combination Not yet run
unverified (harvested, no recorded run)
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("7564850110a688c1")
How it ran

no invocation recorded.

create_mnist_dataset Not yet run
unverified (harvested, no recorded run)
srush/annotated-s4/s4/data.py
code served (permissive licence) · get_code("200d610a7e1bda69")
How it ran

no invocation recorded.

discretize Not yet run
unverified (harvested, no recorded run)
srush/annotated-s4/s4/s4d.py
code served (permissive licence) · get_code("c29c5241ff1d2f5a")
How it ran

no invocation recorded.

dlyap_torch_direct_diagonal Not yet run
unverified (harvested, no recorded run)
forgi86/lru-reduction/lru/linear.py
code served (permissive licence) · get_code("fbd06741252dd8e2")
How it ran

no invocation recorded.

dplr Not yet run
unverified (harvested, no recorded run)
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("9eb8abe7e31d874d")
How it ran

no invocation recorded.

dss_kernel Not yet run
unverified (harvested, no recorded run)
srush/annotated-s4/s4/dss.py
code served (permissive licence) · get_code("48664b31b86bdb2f")
How it ran

no invocation recorded.

ssm Not yet run
unverified (harvested, no recorded run)
state-spaces/s4/models/s4/s4.py
code served (permissive licence) · get_code("64dd93f539b06f8e")
How it ran

no invocation recorded.

vandermonde_product Not yet run
unverified (harvested, no recorded run)
srush/annotated-s4/s4/s4d.py
code served (permissive licence) · get_code("002674cddd8530fd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 55 samples lifted from this paper's linked repositories, 55 carry a function identity and 0 do not. Of the 53 distinct functions with an identity, 19 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 19 later) and 34 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
Activation
brick of this paper's assembly: helper
15 other papers
3 dated earlier, 12 later · 2 only as an assembly brick
1312.5602 (2013-12)
Playing Atari with Deep Reinforcement Learning
2008.07669 (2020-08)
HiPPO: Recurrent Memory with Optimal Polynomial Projections
2009.09761 (2020-09)
DiffWave: A Versatile Diffusion Model for Audio Synthesis
and 12 more not named here
get_initializer
brick of this paper's assembly: helper
10 other papers
1 dated earlier, 9 later · 1 only as an assembly brick
2008.07669 (2020-08)
HiPPO: Recurrent Memory with Optimal Polynomial Projections
2202.09729 (2022-02)
It's Raw! Audio Generation with State-Space Models
2203.14343 (2022-03)
Diagonal State Spaces are as Effective as Structured State Spaces
and 7 more not named here
LinearActivation 8 other papers
2 dated earlier, 6 later
1312.5602 (2013-12)
Playing Atari with Deep Reinforcement Learning
2009.09761 (2020-09)
DiffWave: A Versatile Diffusion Model for Audio Synthesis
2211.11176 (2022-11)
Modeling Multivariate Biosignals With Graph Neural Networks and Structured State Space Models
and 5 more not named here
cauchy_naive
brick of this paper's assembly: helper
6 other papers
1 dated earlier, 5 later · 1 only as an assembly brick
1612.00796 (2016-12)
Overcoming catastrophic forgetting in neural networks
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2402.10211 (2024-02)
Hierarchical State Space Models for Continuous Sequence-to-Sequence Modeling
and 3 more not named here
log_vandermonde_naive
brick of this paper's assembly: helper
6 other papers
1 dated earlier, 5 later · 1 only as an assembly brick
1612.00796 (2016-12)
Overcoming catastrophic forgetting in neural networks
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2402.10211 (2024-02)
Hierarchical State Space Models for Continuous Sequence-to-Sequence Modeling
and 3 more not named here
linear
brick of this paper's assembly: helper
4 other papers
4 later · 2 only as an assembly brick
2204.11008 (2022-04)
Long-term Spatio-Temporal Forecasting via Dynamic Multiple-Graph Attention
2405.17507 (2024-05)
Enhancing Sustainable Urban Mobility Prediction with Telecom Data: A Spatio-Temporal Framework Approach
2505.22815 (2025-05)
IMTS is Worth Time × Channel Patches: Visual Masked Autoencoders for Irregular Multivariate Time Series Prediction
and 1 more not named here
power
brick of this paper's assembly: helper
4 other papers
2 dated earlier, 2 later
1312.5602 (2013-12)
Playing Atari with Deep Reinforcement Learning
2009.09761 (2020-09)
DiffWave: A Versatile Diffusion Model for Audio Synthesis
2204.01692 (2022-04)
Long Movie Clip Classification with State-Space Video Models
and 1 more not named here
Kernel
brick of this paper's assembly: helper
2 other papers
2 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
SSMKernel
brick of this paper's assembly: helper
2 other papers
2 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
combination
brick of this paper's assembly: helper
2 other papers
2 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
dplr
brick of this paper's assembly: helper
2 other papers
2 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
embed_c2r
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2110.13985 (2021-10)
Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layers
2411.04165 (2024-11)
Bio-xLSTM: Generative modeling, representation and in-context learning of biological and chemical sequences
nplr
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
ssm
brick of this paper's assembly: helper
2 other papers
2 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data
LinearActivation
brick of this paper's assembly: helper
1 other paper
1 later
2204.01692 (2022-04)
Long Movie Clip Classification with State-Space Video Models
S4DKernel
brick of this paper's assembly: helper
1 other paper
1 later
2203.14343 (2022-03)
Diagonal State Spaces are as Effective as Structured State Spaces
SSMKernelDPLR
brick of this paper's assembly: entry
1 other paper
1 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
SSMKernelDiag
brick of this paper's assembly: helper
1 other paper
1 later
2312.00752 (2023-12)
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
TransposedLinear
brick of this paper's assembly: helper
1 other paper
1 later
2204.01692 (2022-04)
Long Movie Clip Classification with State-Space Video Models

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

A central goal of sequence modeling is designing a single principled model that can address sequence data across a range of modalities and tasks, particularly on long-range dependencies. Although conventional models including RNNs, CNNs, and Transformers have specialized variants for capturing long dependencies, they still struggle to scale to very long sequences of 10000 or more steps. A promising recent approach proposed modeling sequences by simulating the fundamental state space model (SSM) x (t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t), and showed that for appropriate choices of the state matrix A, this system could handle long-range dependencies mathematically and empirically. However, this method has prohibitive computation and memory requirements, rendering it infeasible as a general sequence modeling solution. We propose the Structured State Space sequence model (S4) based on a new parameterization for the SSM, and show that it can be computed much more efficiently than prior approaches while preserving their theoretical strengths. Our technique involves conditioning A with a low-rank correction, allowing it to be diagonalized stably and reducing the SSM to the well-studied computation of a Cauchy kernel. S4 achieves strong empirical results across a diverse range of established benchmarks, including (i) 91% accuracy on sequential CIFAR-10 with no data augmentation or auxiliary losses, on par with a larger 2-D ResNet, (ii) substantially closing the gap to Transformers on image and language modeling tasks, while performing generation 60× faster (iii) SoTA on every task from the Long Range Arena benchmark, including solving the challenging Path-X task of length 16k that all prior work fails on, while being as efficient as all competitors. 1

For agents

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

get_harvested_code_for_paper("2111.00396")
get_code_for_paper("2111.00396")
have("2111.00396")

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

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

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

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

Connect an agent — have() is free.