SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2509.22284 · NeurIPS · 2025

Structured Sparse Transition Matrices to Enable State Tracking in State-Space Models

Thomas Hofmann, Nicolas Menet, Michael Hersche, Aleksandar Terzić

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2509.22284.json · badge: /api/ran/2509.22284.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
IBM/expressive-sparse-state-space-model community
Papers with Code archive
3 ran · 2 no recorded run
FunctionStatusWhere it lives
binary_operator_efficient Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IBM/expressive-sparse-state-space-model/time_series_JAX/models/PDSSM.py
code served (permissive licence) · get_code("38eba3acd7709579")
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 3, 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 jax
import jax.numpy as jnp
import numpy as np

# Analyze the function to understand what arguments are needed
# binary_operator_efficient is decorated with @jax.vmap, which means it will be
# vectorized over the first dimension of its inputs.
# It takes q_i and q_j, each of which are tuples of (P, D, b)
# - P: indices array (used with jnp.take)
# - D: values array (multiplied with other arrays)
# - b: array that gets indexed and summed (used with .at[P_j].add())

# Create small test data
# P should be an integer array of indices
# D should be a float array of values
# b should be a float array

batch_size = 2
dim = 4

# Create q_i tuple components
P_i = jnp.array([[0, 1, 2, 3], [1, 2, 3, 0]], dtype=jnp.int32)
D_i = jnp.array([[1.0, 2.0, 3.0, 4.0], [2.0, 3.0, 4.0, 5.0]], dtype=jnp.float32)
b_i = jnp.array([[1.0, 1.0, 1.0, 1.0], [2.0, 2.0, 2.0, 2.0]], dtype=jnp.float32)

q_i = (P_i, D_i, b_i)

# Create q_j tuple components
P_j = jnp.array([[2, 3, 0, 1], [3, 0, 1, 2]], dtype=jnp.int32)
D_j = jnp.array([[0.5, 1.5, 2.5, 3.5], [1.5, 2.5, 3.5, 4.5]], dtype=jnp.float32)
b_j = jnp.array([[0.5, 0.5, 0.5, 0.5], [1.0, 1.0, 1.0, 1.0]], dtype=jnp.float32)

q_j = (P_j, D_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, 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, ndim 3, 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
forward_pass Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IBM/expressive-sparse-state-space-model/time_series_JAX/models/PDSSM.py
code served (permissive licence) · get_code("2c0042ac70307731")
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
import jax.numpy as jnp
import jax.lax

# Define the functions from the provided code
def binary_operator_efficient(q_i, q_j):
    """Binary operator for parallel scan of linear recurrence"""
    P_i, D_i, b_i = q_i
    P_j, D_j, b_j = q_j
    P_new = jnp.take(P_j, indices=P_i)
    D_new = jnp.take(D_j, indices=P_i) * D_i
    b_new = jnp.zeros_like(b_i).at[P_j].add(D_j * b_i) + b_j
    return (P_new, D_new, b_new)

def indexing_parallel_scan(P, D, b):
    parallel_scan = jax.lax.associative_scan
    _, _, y = parallel_scan(binary_operator_efficient, (P, D, b), axis=0)
    return y

def forward_pass(P, D, b):
    return indexing_parallel_scan(jnp.argmax(P, axis=-2), D, b)

# Construct valid arguments
# P should be a 3D array where argmax can be taken on axis -2
# The result of argmax will be 2D indices
# D and b should be compatible with the binary operator

# Shape: (seq_len=2, height=3, width=4)
P = jnp.array([
    [[0.1, 0.5, 0.2, 0.3],
     [0.4, 0.2, 0.1, 0.3],
     [0.2, 0.1, 0.5, 0.2]],
    
    [[0.3, 0.2, 0.4, 0.1],
     [0.1, 0.5, 0.2, 0.2],
     [0.5, 0.1, 0.1, 0.3]]
])

# D shape: (seq_len=2, width=4)
D = jnp.array([
    [1.0, 2.0, 0.5, 1.5],
    [0.8, 1.2, 0.9, 1.1]
])

# b shape: (seq_len=2, width=4)
b = jnp.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8]
])

ARGS = {
    "P": P,
    "D": D,
    "b": b
}
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
indexing_parallel_scan Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IBM/expressive-sparse-state-space-model/time_series_JAX/models/PDSSM.py
code served (permissive licence) · get_code("7dd7b850fe17277a")
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
import jax.numpy as jnp
import numpy as np

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

# Create small test data for the function
# P: permutation indices (shape: [seq_len, dim])
# D: scaling factors (shape: [seq_len, dim])
# b: bias/state vectors (shape: [seq_len, dim])

seq_len = 2
dim = 4

# P: permutation indices - should contain valid indices for indexing
P = jnp.array(np.random.randint(0, dim, size=(seq_len, dim)), dtype=jnp.int32)

# D: scaling factors - random floats
D = jnp.array(np.random.randn(seq_len, dim), dtype=jnp.float32)

# b: bias vectors - random floats
b = jnp.array(np.random.randn(seq_len, dim), dtype=jnp.float32)

ARGS = {
    "P": P,
    "D": D,
    "b": b,
}
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 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
PDSSMLayer Not yet run
unverified (harvested, no recorded run)
IBM/expressive-sparse-state-space-model/time_series_JAX/models/PDSSM.py
code served (permissive licence) · get_code("08747f5c6d8bf452")
How it ran

no invocation recorded.

custom_function Not yet run
unverified (harvested, no recorded run)
IBM/expressive-sparse-state-space-model/time_series_JAX/models/PDSSM.py
code served (permissive licence) · get_code("cb7c3068c0365a0b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

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

Abstract

Modern state-space models (SSMs) often utilize structured transition matrices which enable efficient computation but pose restrictions on the model's expressivity, as measured in terms of the ability to emulate finite-state automata (FSA). While unstructured transition matrices are optimal in terms of expressivity, they come at a prohibitively high compute and memory cost, even for moderate state sizes. We propose a structured sparse parametrization of transition matrices in SSMs that enables FSA state tracking with provably optimal state size and depth, while keeping the computational cost of the recurrence comparable to that of diagonal SSMs. Our method, PD-SSM, parametrizes the transition matrix as the product of a column one-hot matrix (P ) and a complex-valued diagonal matrix (D). As a result, the computational cost of parallel scans scales linearly with the state size. Theoretically, the model is BIBO-stable and can emulate any N -state FSA with one layer of dimension N and a linear readout of size N × N , significantly improving on all current structured SSM guarantees. Experimentally, the model significantly outperforms a wide collection of modern SSM variants on various FSA state tracking tasks. On multivariate time-series classification, it outperforms neural controlled differential equations, a paradigm explicitly built for time-series analysis. Finally, we integrate PD-SSM into a hybrid Transformer-SSM architecture and demonstrate that the model can effectively track the states of a complex FSA in which transitions are encoded into sets of variable-length English sentences. The code is available at https://github.com/IBM/expressive-sparse-state-space-model.

For agents

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

get_harvested_code_for_paper("2509.22284")
get_code_for_paper("2509.22284")
have("2509.22284")

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

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

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

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

Connect an agent — have() is free.