SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.13985 · NeurIPS · 2021

Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layers

Christopher Ré, Albert Gu, Tri Dao, Atri Rudra, Khaled Saab, Karan Goel, Isys Johnson

arXiv · PDF · Open in the Atlas

Code that ran

19 of 53 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 14 failures of our instrument; 34 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/2110.13985.json · badge: /api/ran/2110.13985.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
ag1988/dss community
Papers with Code archive
14 ran · 18 no recorded run
hazyresearch/state-spaces alias (classifier label)
classifier basis: classifier_2025
5 ran · 16 no recorded run
FunctionStatusWhere it lives
Activation Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("39a79ffbeaf5161a")
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 Modrelu. 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 = {
    'activation': 'modrelu',
    'size': 4,
    'dim': -1
}
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 Modrelu — a Modrelu output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Modrelu 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
Activation Ran
ran; our contract draft was wrong, not the code
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("cb3abb4ada7fc7ff")
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 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
import math

torch.manual_seed(0)

ARGS = {
    'activation': 'relu',
    'size': 4,
    'dim': -1
}
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 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
GLU Ran
ran on a synthesized input
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("593ca2707277f71e")
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 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 math
import torch
import torch.nn as nn
import torch.nn.functional as F

def Activation(activation=None, size=None, dim=-1):
    if activation in [None, 'id', 'identity', 'linear', 'none']:
        return nn.Identity()
    elif activation == 'tanh':
        return nn.Tanh()
    elif activation == 'relu':
        return nn.ReLU()
    elif activation == 'gelu':
        return nn.GELU()
    elif activation == 'elu':
        return nn.ELU()
    elif activation in ['swish', 'silu']:
        return nn.SiLU()
    elif activation == 'glu':
        return nn.GLU(dim=dim)
    elif activation.startswith('glu-'):
        return GLU(dim=dim, activation=activation[4:])
    elif activation == 'sigmoid':
        return nn.Sigmoid()
    elif activation == 'softplus':
        return nn.Softplus()
    elif activation == 'modrelu':
        return ModReLU(size)
    elif activation in ['sqrelu', 'relu2']:
        return SquaredReLU()
    elif activation == 'laplace':
        return Laplace()
    else:
        raise NotImplementedError("hidden activation '{}' is not implemented".format(activation))

class Laplace(nn.Module):

    def __init__(self, mu=0.707107, sigma=0.282095):
        super().__init__()
        self.mu = mu
        self.sigma = sigma

    def forward(self, x):
        return laplace(x, mu=self.mu, sigma=self.sigma)

class ModReLU(nn.Module):

    def __init__(self, features):
        super().__init__()
        self.features = features
        self.b = nn.Parameter(torch.Tensor(self.features))
        self.reset_parameters()

    def reset_parameters(self):
        self.b.data.uniform_(-0.01, 0.01)

    def forward(self, inputs):
        norm = torch.abs(inputs)
        biased_norm = norm + self.b
        magnitude = F.relu(biased_norm)
        phase = torch.sign(inputs)
        return phase * magnitude

class SquaredReLU(nn.Module):

    def forward(self, x):
        return torch.square(F.relu(x))

def laplace(x, mu=0.707107, sigma=0.282095):
    x = (x - mu).div(sigma * math.sqrt(2.0))
    return 0.5 * (1.0 + torch.erf(x))

class GLU(nn.Module):

    def __init__(self, dim=-1, activation='sigmoid'):
        super().__init__()
        assert not activation.startswith('glu')
        self.dim = dim
        self.activation_fn = Activation(activation)

    def forward(self, x):
        x, g = torch.split(x, x.size(self.dim) // 2, dim=self.dim)
        return x * self.activation_fn(g)

INIT_ARGS = {
    'dim': -1,
    'activation': 'sigmoid'
}

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

if __name__ == '__main__':
    glu = GLU(**INIT_ARGS)
    output = glu(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ModReLU Ran
ran on a synthesized input
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("34578dc36217e336")
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 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 torch.nn as nn
import torch.nn.functional as F

class ModReLU(nn.Module):

    def __init__(self, features):
        super().__init__()
        self.features = features
        self.b = nn.Parameter(torch.Tensor(self.features))
        self.reset_parameters()

    def reset_parameters(self):
        self.b.data.uniform_(-0.01, 0.01)

    def forward(self, inputs):
        norm = torch.abs(inputs)
        biased_norm = norm + self.b
        magnitude = F.relu(biased_norm)
        phase = torch.sign(inputs)
        return phase * magnitude


INIT_ARGS = {
    'features': 4
}

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

if __name__ == '__main__':
    module = ModReLU(**INIT_ARGS)
    output = module(**ARGS)
    print(output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SequenceModule Ran
ran on a synthesized input
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("7f2bb3bf35b70eaa")
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 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 torch.nn as nn

class SequenceModule(nn.Module):
    """ Abstract sequence model class. All layers that the backbones use must adhere to this

    A sequence model is a layer that transforms an input of shape
    (n_batch, l_sequence, d_input) to (n_batch, l_sequence, d_output)

    Additionally, it returns a "state" which can be any additional information
    For example, RNN and SSM layers may return their hidden state,
    while some types of transformer layers (e.g. Transformer-XL) may want to pass through state as well

    - default_state receives a batch_shape with device and returns an initial state
    - step simulates a single step of the sequence (e.g. one unroll for an RNN). It receives a state and single input (n_batch, d_input) and returns a state and output (n_batch, d_output)
    - forward is a sequence-to-sequence transformation that receives an optional state
    """

    @property
    def d_output(self):
        return self._d_output

    @d_output.setter
    def d_output(self, d):
        self._d_output = d

    @property
    def state_to_tensor(self):
        """ Returns a function mapping a state to a single tensor, in case one wants to use the hidden state instead of the output for final prediction """
        return lambda _: None

    @property
    def d_state(self):
        """ Returns dimension of output of self.state_to_tensor """
        return None

    @property
    def transposed(self):
        return self._transposed

    @transposed.setter
    def transposed(self, x):
        self._transposed = x

    def default_state(self, *batch_shape, device=None):
        return None

    def step(self, x, state=None, *args, **kwargs):
        return (x, state)

    def forward(self, x, state=None, *args, **kwargs):
        return (x, state)


INIT_ARGS = {}

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

if __name__ == '__main__':
    module = SequenceModule(**INIT_ARGS)
    output, state = module(**ARGS)
    print("Output shape:", output.shape)
    print("State:", state)
    print("d_output:", module.d_output)
    print("d_state:", module.d_state)
    print("transposed:", module.transposed)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_diag Ran
ran, honoured the contract we drafted
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("cf3e99401a5ad03f")
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 1, dtype family float, shape (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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Analyze the function _diag(N, c):
# - N: used as int in torch.ones(N - 1), so needs to be an integer
# - c: used as a scalar multiplier (* c), so needs to be a number or tensor

N = 5
c = 2.0

ARGS = {
    "N": N,
    "c": c,
}
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 1, dtype family float, shape (6,) — shape (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
_fft Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("0453f5d294577c0b")
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, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

x = torch.randn(2, 4)  # batch size 2, dimension 4
N = 5  # N should be greater than the last dimension of x

ARGS = {
    'x': x,
    'N': N
}
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, 6) — shape (2, 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
_ifft Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("607de35f88a24a0b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 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)

# x: input tensor for irfft operation
# The function calls torch.fft.irfft(x, n=2*N, dim=-1)
# irfft expects a complex tensor on the last dimension
# We'll create a small complex tensor with batch dimension
x = torch.randn(2, 4, dtype=torch.complex64)

# N: integer parameter for output size
# The function uses it as: torch.fft.irfft(x, n=2*N, dim=-1)[..., :N]
# So N should be a positive integer that makes sense with the input
N = 3

ARGS = {
    "x": x,
    "N": N,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 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
causal_convolution Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("5ea0990f6eb42f27")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small test tensors
# u and v should be 1D or multi-dimensional with last dimension being the sequence length
u = torch.randn(2, 4, dtype=torch.float32)
v = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    'u': u,
    'v': v,
    'fast': True,
    'pad': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
causal_convolution_inverse Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("9b0ffc78557e9cc3")
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 torch.nn.functional as F

torch.manual_seed(0)

# The function causal_convolution_inverse takes a single parameter 'u'
# which is a tensor representing a causal convolution/polynomial
# Looking at the function body:
# - u.shape[-1] is accessed to get N
# - u[..., :1] is sliced and .reciprocal() is called
# - u[..., :2*M] is sliced
# - Operations are performed on u_f which comes from _fft(u[..., :2*M], 2*M)
# So u should be a tensor with at least 1 dimension

# Create a small tensor for u
# Shape: (2, 4) - batch size 2, sequence length 4
u = torch.randn(2, 4)

ARGS = {
    "u": u
}
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, 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
construct_toeplitz Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("f66beaf7866b4c6f")
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 (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Test case 1: simple vector input
v_simple = torch.randn(4)

# Test case 2: batched input with rank dimension
v_batched = torch.randn(2, 4)

# Scalar f parameter
f = 0.5

# Construct ARGS dict with the simple vector case
ARGS = {
    "v": v_simple,
    "f": f
}
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 (4, 4) — shape (4, 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
embed_c2r Ran
ran, honoured the contract we drafted
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("403b8f1b6abaaa0f")
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 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 pattern '... m n -> ... m () n ()'
# - A is padded and operations are performed on it
# - A is rearranged again with pattern 'm x n y -> (m x) (n y)'
# 
# So A should be a numpy array with at least 2 dimensions (m, n)
# Let's create a small 2D array with distinct dimensions for clarity

A = np.random.randn(4, 3)

ARGS = {
    "A": A
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
krylov Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("1f3623588b61ca31")
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. 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)

# Construct arguments for krylov function
# L: number of Krylov vectors to compute
L = 4

# A: square matrix that will be used for matrix powers
# Using a 3x3 matrix for distinct dimensions
A = torch.randn(3, 3, dtype=torch.float32)

# b: initial vector, should be compatible with A (3,)
b = torch.randn(3, dtype=torch.float32)

# c: optional weighting vector, same size as b
c = torch.randn(3, dtype=torch.float32)

# return_power: boolean flag
return_power = True

ARGS = {
    "L": L,
    "A": A,
    "b": b,
    "c": c,
    "return_power": return_power,
}
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 — 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
krylov Ran
ran; our contract draft was wrong, not the code
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("7c517b8f7718932b")
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. 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

torch.manual_seed(0)

# L: number of Krylov vectors to compute
L = 4

# A: square matrix that will be multiplied with b
# Using shape (3, 3) for a small square matrix
A = torch.randn(3, 3, dtype=torch.float32)

# b: vector to build Krylov subspace from
# Using shape (2, 3) to allow batch dimension
b = torch.randn(2, 3, dtype=torch.float32)

# c: optional vector for einsum contraction
# Using shape (2, 3) to match batch and feature dimensions of x
c = torch.randn(2, 3, dtype=torch.float32)

# return_power: whether to return A^{L-1}
return_power = True

ARGS = {
    "L": L,
    "A": A,
    "b": b,
    "c": c,
    "return_power": return_power,
}
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 — 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
linear_system_from_krylov Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("a4fab11358caea0b")
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 4, dtype family float, shape (5, 2, 3, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Analyze the function signature and body:
# linear_system_from_krylov(u, C, D, k)
# u: (L, B, ...) where ... = H
# C: (..., M, N) where ... = H
# D: (..., M)
# k: (..., N, L) Krylov matrix

# Let's use small, distinct dimensions:
# L = 5 (sequence length)
# B = 2 (batch size)
# H = 3 (hidden dim, part of ...)
# N = 4 (state dimension)
# M = 6 (output dimension)

L = 5
B = 2
H = 3
N = 4
M = 6

# u: (L, B, H) with shape (5, 2, 3)
u = torch.randn(L, B, H)

# C: (H, M, N) with shape (3, 6, 4)
# The function does: k = C @ k
# k starts as (H, N, L) = (3, 4, 5)
# C @ k means (H, M, N) @ (H, N, L) -> (H, M, L)
C = torch.randn(H, M, N)

# D: (H, M) with shape (3, 6)
D = torch.randn(H, M)

# k: (H, N, L) with shape (3, 4, 5)
k = torch.randn(H, N, L)

ARGS = {
    "u": u,
    "C": C,
    "D": D,
    "k": k,
}
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 Tensor, ndim 4, dtype family float, shape (5, 2, 3, 6) — shape (5, 2, 3, 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
transition Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("2cf5ff23ecfa3933")
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. 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

# Test the transition function with different measures
ARGS = {
    'measure': 'legt',
    'N': 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
transition Ran
ran; our contract draft was wrong, not the code
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("ed6e51bbefca2745")
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. 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

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

# Define ARGS dict with all parameters for the transition function
ARGS = {
    'measure': 'legt',
    'N': 4,
    'beta': 1.0,
    'alpha': 0.5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
triangular_toeplitz_multiply_ Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("52ea678fdce28bba")
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 torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for u and v
# The function expects tensors with shape (..., n) where n is the last dimension
u = torch.randn(2, 4)  # batch_size=2, n=4
v = torch.randn(2, 4)  # batch_size=2, n=4

# sum parameter can be None or a dimension to sum over
sum_dim = None

ARGS = {
    "u": u,
    "v": v,
    "sum": sum_dim
}
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, 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
triangular_toeplitz_multiply_padded_ Ran
ran; our contract draft was wrong, not the code
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("36f810cba0fc9d56")
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

torch.manual_seed(0)

# The function expects:
# - u: a tensor with shape (..., n) where n is even
# - v: a tensor with shape (..., n) where n is even
# Both are used in FFT operations and element-wise multiplication

# Create small tensors with batch dimension and even last dimension
u = torch.randn(2, 4)  # batch=2, n=4 (even)
v = torch.randn(2, 4)  # batch=2, n=4 (even)

ARGS = {
    "u": u,
    "v": v,
}
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, 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
AdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("1ba9efb081e14c85")
How it ran

no invocation recorded.

AdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("b3a41cf9e2138c02")
How it ran

no invocation recorded.

ChebIITriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("a1854d1424f428c4")
How it ran

no invocation recorded.

ChebIITriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("a60c853b3d7024c7")
How it ran

no invocation recorded.

ChebITriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("4e63660dced1bbc9")
How it ran

no invocation recorded.

ChebITriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("a1dd4a16e1196aca")
How it ran

no invocation recorded.

CumsumAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("a0b28e1eded79ed6")
How it ran

no invocation recorded.

CumsumAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("00154f7840152058")
How it ran

no invocation recorded.

GLagTToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("79ba70158d567f4b")
How it ran

no invocation recorded.

GLagTToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("81141f7c5522197d")
How it ran

no invocation recorded.

JacTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("88eaef5f62515c9f")
How it ran

no invocation recorded.

LagTCumsumAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("cb793280365d3dc2")
How it ran

no invocation recorded.

LagTCumsumAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("1db67233065663ca")
How it ran

no invocation recorded.

LagTToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("be7778b030dc5a65")
How it ran

no invocation recorded.

LagTToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("8103c0098e024755")
How it ran

no invocation recorded.

LagTTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("9e48ee25e5b484f9")
How it ran

no invocation recorded.

LagTTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("dbf1833166be1cf3")
How it ran

no invocation recorded.

LegSTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("8955b3cd44903d24")
How it ran

no invocation recorded.

LegSTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("d96570286a472e65")
How it ran

no invocation recorded.

LegTTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("c5b7da99a29efab0")
How it ran

no invocation recorded.

LegTTriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("1aae277f4cf8e81a")
How it ran

no invocation recorded.

ManualAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("9f73999eb7f84e46")
How it ran

no invocation recorded.

ManualAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("697edb25bf9082b4")
How it ran

no invocation recorded.

Platypus Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("c2bbb1019edcc65c")
How it ran

no invocation recorded.

Platypus Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("4bcd77da47e9c358")
How it ran

no invocation recorded.

SequenceModule Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("45d50d8c1c4b0496")
How it ran

no invocation recorded.

ToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("b17e090131fbe19a")
How it ran

no invocation recorded.

ToeplitzAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("cb32ae2fc0a0496a")
How it ran

no invocation recorded.

TriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("64d7c0b2ad2fb17a")
How it ran

no invocation recorded.

TriDInverseAdaptiveTransition Not yet run
unverified (harvested, no recorded run)
hazyresearch/state-spaces/src/models/sequence/modules/lssl.py
code served (permissive licence) · get_code("23dbd9c19b70ad22")
How it ran

no invocation recorded.

TriangularToeplitzMult Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("86a37c724512b568")
How it ran

no invocation recorded.

TriangularToeplitzMultFast Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("2cb05182094e1f1e")
How it ran

no invocation recorded.

TriangularToeplitzMultPadded Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("48deae9fbe0fc944")
How it ran

no invocation recorded.

TriangularToeplitzMultPaddedFast Not yet run
unverified (harvested, no recorded run)
ag1988/dss/src/models/sequence/ss/lssl.py
code served (permissive licence) · get_code("e0c1f5471ad53082")
How it ran

no invocation recorded.

Also present in other papers' code

Of 53 samples lifted from this paper's linked repositories, 53 carry a function identity and 0 do not. Of the 38 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 36 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
embed_c2r
brick of this paper's assembly: helper
2 other papers
2 later
2111.00396 (2021-11)
Efficiently Modeling Long Sequences with Structured State Spaces
2411.04165 (2024-11)
Bio-xLSTM: Generative modeling, representation and in-context learning of biological and chemical sequences
krylov
brick of this paper's assembly: helper, model
2 other papers
2 later
2204.01692 (2022-04)
Long Movie Clip Classification with State-Space Video Models
2411.04165 (2024-11)
Bio-xLSTM: Generative modeling, representation and in-context learning of biological and chemical sequences

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

Recurrent neural networks (RNNs), temporal convolutions, and neural differential equations (NDEs) are popular families of deep learning models for time-series data, each with unique strengths and tradeoffs in modeling power and computational efficiency. We introduce a simple sequence model inspired by control systems that generalizes these approaches while addressing their shortcomings. The Linear State-Space Layer (LSSL) maps a sequence u → y by simply simulating a linear continuous-time state-space representation ẋ = Ax + Bu, y = Cx + Du. Theoretically, we show that LSSL models are closely related to the three aforementioned families of models and inherit their strengths. For example, they generalize convolutions to continuous-time, explain common RNN heuristics, and share features of NDEs such as time-scale adaptation. We then incorporate and generalize recent theory on continuous-time memorization to introduce a trainable subset of structured matrices A that endow LSSLs with long-range memory. Empirically, stacking LSSL layers into a simple deep neural network obtains state-of-the-art results across time series benchmarks for long dependencies in sequential image classification, real-world healthcare regression tasks, and speech. On a difficult speech classification task with length-16000 sequences, LSSL outperforms prior approaches by 24 accuracy points, and even outperforms baselines that use hand-crafted features on 100x shorter sequences.

For agents

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

get_harvested_code_for_paper("2110.13985")
get_code_for_paper("2110.13985")
have("2110.13985")

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

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

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

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

Connect an agent — have() is free.