SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.07658 · 2026

Optimal Decay Spectra for Linear Recurrences

Yang Cao

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2604.07658.json · badge: /api/ran/2604.07658.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
SiLifen/PoST canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
count_unique_params Ran
ran, honoured the contract we drafted
SiLifen/PoST/trainer.py
code served (permissive licence) · get_code("e42ae9a3efff2e7a")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    """Minimal model to test count_unique_params."""
    def __init__(self):
        super().__init__()
        # Create some parameters with different sizes
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        # Create a tied parameter (shares memory with linear1.weight)
        self.tied_param = self.linear1.weight
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

model = SimpleModel()

ARGS = {
    "model": model,
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ensure_stride Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SiLifen/PoST/post_kernels/ssd_combined.py
code served (permissive licence) · get_code("5fd5a626347cb300")
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, 4, 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 torch

torch.manual_seed(0)

# Create a tensor of shape [batch, length, channels]
# batch=2, length=4, channels=8 (multiple of 8 as required)
inp = torch.randn(2, 4, 8)

ARGS = {
    'inp': inp
}
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, 4, 8) — shape (2, 4, 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
evaluate_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SiLifen/PoST/eval_llm.py
code served (permissive licence) · get_code("16b3e578e4a9214a")
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 torch.nn as nn

torch.manual_seed(0)

# Mock classes for lm_eval components
class MockHFLM:
    def __init__(self, pretrained, tokenizer, batch_size, dtype):
        self.pretrained = pretrained
        self.tokenizer = tokenizer
        self.batch_size = batch_size
        self.dtype = dtype
        self.rank = 0
        self.world_size = 1
        self.model = MockModel()

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

class MockTaskManager:
    def __init__(self, include_path=None):
        self.include_path = include_path

# Mock lm_eval module
class MockLMEval:
    @staticmethod
    def simple_evaluate(model, tasks, num_fewshot, batch_size, metadata, limit, task_manager):
        return {
            'results': {task: {'accuracy': 0.75} for task in tasks},
            'metadata': metadata
        }

# Patch lm_eval
import sys
sys.modules['lm_eval'] = MockLMEval()
sys.modules['lm_eval.models'] = type(sys)('lm_eval.models')
sys.modules['lm_eval.models.huggingface'] = type(sys)('lm_eval.models.huggingface')
sys.modules['lm_eval.models.huggingface'].HFLM = MockHFLM
sys.modules['lm_eval.tasks'] = type(sys)('lm_eval.tasks')
sys.modules['lm_eval.tasks'].TaskManager = MockTaskManager

ARGS = {
    'model_path': 'meta-llama/Llama-3.1-8B',
    'tasks': ['arc_easy', 'hellaswag'],
    'batch_size': 8,
    'num_fewshot': 0,
    'metadata': None,
    'limit': None,
    'include_path': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lm_eval, 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
init_to_zero Ran
ran; our contract draft was wrong, not the code
SiLifen/PoST/post_kernels/ssd_chunk_state.py
code served (permissive licence) · get_code("f7a500c0f491fa7a")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function init_to_zero takes a list of names and returns a lambda
# that accesses nargs[name] and calls .zero_() on tensors that are not None.
# nargs appears to be a dict-like object with tensor values.

# Create a mock nargs object - a dict with tensor values
nargs = {
    'param1': torch.randn(2, 4),
    'param2': torch.randn(3, 5),
    'param3': None,  # Test with None to ensure the condition works
    'param4': torch.randn(2, 4),
}

# names is a list of keys to zero out
names = ['param1', 'param2', 'param3', 'param4']

ARGS = {
    'names': names
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
selective_scan_bwd Not yet run
unverified (harvested, no recorded run)
SiLifen/PoST/post_kernels/ssd_combined.py
code served (permissive licence) · get_code("85b4b58886782b6b")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 3 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
init_to_zero 3 other papers
3 dated earlier
2411.12537 (2024-11)
Unlocking State-Tracking in Linear RNNs Through Negative Eigenvalues
2503.14493 (2025-03)
State Space Model Meets Transformer: A New Paradigm for 3D Object Detection
2601.06891 (2026-01)
Contrastive Language-Image Mamba Pretraining
selective_scan_bwd 1 other paper
1 dated earlier
2601.06891 (2026-01)
Contrastive Language-Image Mamba Pretraining

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

Linear recurrent models offer linear-time sequence processing but often suffer from suboptimal long-range memory. We trace this to the decay spectrum: for N channels, random initialization collapses the minimum spectral gap to O(N -2 ), yielding sub-exponential error exp(-Ω(N/ log N )); linear spacing avoids collapse but degrades to exp(-O(N/ √ T )), practically algebraic over long contexts. We introduce Position-Adaptive Spectral Tapering (PoST), an architecture-agnostic framework combining two mechanisms: (1) Spectral Reparameterization, which structurally enforces geometrically spaced log-decay rates, proven minimax optimal at rate O(exp(-cN/ log T )); and (2) Position-Adaptive Scaling, the provably unique mechanism that eliminates the scale mismatch of static spectra (where only N log t/ log T of N channels are effective at position t) by stretching the spectrum to the actual dependency range, sharpening the rate to O(exp(-cN/ log t)). This scaling natively induces fractional invariance: the impulse response becomes scale-free, with channels interpolating between relative and absolute temporal coordinates. PoST integrates into any diagonal linear recurrence without overhead. We instantiate it across Mamba-2, RWKV-7, Gated DeltaNet, Gated Linear Attention, and RetNet. Pre-training at 180M-440M scales shows consistent zero-shot language modeling improvements, significant long-context retrieval gains for Mamba-2 (MQAR and NIAH), and competitive or improved performance across other architectures. Code is available at https://github.com/SiLifen/PoST.

For agents

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

get_harvested_code_for_paper("2604.07658")
get_code_for_paper("2604.07658")
have("2604.07658")

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

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

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

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

Connect an agent — have() is free.