SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.02980 · 2023

Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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, 2 violated it and 0 have no contract verdict; 9 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2310.02980.json · badge: /api/ran/2310.02980.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
idoamos/not-from-scratch canonical (classifier label)
classifier basis: plan_row
11 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/local_attention/rotary.py
code served (permissive licence) · get_code("6d3d810524eb100b")
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 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 einops import rearrange

torch.manual_seed(0)

# Analyze the function:
# - q: tensor, shape operations suggest (..., seq_len, dim) where dim is even
# - k: tensor, same shape requirements as q
# - freqs: tensor, shape (..., seq_len, dim) for cos/sin operations
# - scale: can be a scalar or 2D tensor used for element-wise multiplication

# Create minimal valid tensors
batch_size = 2
seq_len = 3
head_dim = 4

# q and k: (batch, seq_len, dim)
q = torch.randn(batch_size, seq_len, head_dim)
k = torch.randn(batch_size, seq_len, head_dim)

# freqs: (batch, seq_len, dim) - used with cos() and sin()
freqs = torch.randn(batch_size, seq_len, head_dim)

# scale: can be scalar or 2D tensor
# Looking at usage: scale ** (-1), scale[-q_len:, :] suggests 2D tensor
# but also needs to work as scalar multiplier
# Let's use a 2D tensor (seq_len, 1) to match indexing pattern
scale = torch.ones(seq_len, 1)

ARGS = {
    'q': q,
    'k': k,
    'freqs': freqs,
    'scale': scale
}
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, ndim 4, 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
default Ran
ran, violated the contract we drafted
idoamos/not-from-scratch/local_attention/local_attention.py
code served (permissive licence) · get_code("b5307f70349f5c27")
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 str. 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

def exists(val):
    return val is not None

def default(value, d):
    return d if not exists(value) else value

# Test case 1: value is None, should return d
value_1 = None
d_1 = "default_value"

# Test case 2: value is not None, should return value
value_2 = "provided_value"
d_2 = "default_value"

# Test case 3: value is 0 (falsy but not None), should return value
value_3 = 0
d_3 = 42

# Test case 4: value is empty list (falsy but not None), should return value
value_4 = []
d_4 = [1, 2, 3]

# Test case 5: value is a tensor
torch.manual_seed(0)
value_5 = torch.tensor([1.0, 2.0])
d_5 = torch.tensor([0.0, 0.0])

ARGS = {
    "value": None,
    "d": "default_value"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
deprecated Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/src/dataloaders/base.py
code served (permissive licence) · get_code("25edc240223b76c0")
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 'deprecated' takes a single parameter: cls_or_func
# It returns a decorator that wraps the input and prints a deprecation message
# The input can be either a class or a function

# Create a simple function to use as the input
def sample_function(x, y):
    """A simple sample function"""
    return x + y

# Create a simple class to use as the input
class SampleClass:
    """A simple sample class"""
    def __init__(self, value):
        self.value = value
    
    def method(self):
        return self.value * 2

# We can use either the function or the class as the argument
# Let's use the function as our test case
ARGS = {
    'cls_or_func': sample_function
}
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
dequantize Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/src/dataloaders/audio.py
pointer only (licence: MIT); the stored copy get_code serves, from xinruihe389-commits/LongSpike, is pointer only (licence: NOASSERTION) · get_code("ce310b19a858070f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xinruihe389-commits/LongSpike, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

eval_decorator Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/local_attention/transformer.py
code served (permissive licence) · get_code("c16aee9490eb8729")
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 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)

# Build a minimal model that has .training attribute and .eval()/.train() methods
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = MinimalModel()

# Define a simple function to decorate
def dummy_eval_fn(model, x):
    return model(x)

# The eval_decorator takes a function as its only parameter
ARGS = {
    "fn": dummy_eval_fn
}
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 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
exists Ran
ran, violated the contract we drafted
idoamos/not-from-scratch/local_attention/local_attention.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ThomasMrY/VCT, and GitHub detected no licence in that repository 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.

l2norm Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/local_attention/transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from tmlresearchgroup-cas/clipure, is pointer only (licence: NONE) · get_code("3eb58dae620046d3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tmlresearchgroup-cas/clipure, and GitHub detected no licence in that repository 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.

minmax_scale Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/src/dataloaders/audio.py
pointer only (licence: MIT); the stored copy get_code serves, from xinruihe389-commits/LongSpike, is pointer only (licence: NOASSERTION) · get_code("1b76e4737067023f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xinruihe389-commits/LongSpike, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

quantize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
idoamos/not-from-scratch/src/dataloaders/audio.py
pointer only (licence: MIT); the stored copy get_code serves, from xinruihe389-commits/LongSpike, is pointer only (licence: NOASSERTION) · get_code("1631cd936e9b1a90")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xinruihe389-commits/LongSpike, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

rotate_half Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/local_attention/rotary.py
code served (permissive licence) · get_code("1147383164fd3a66")
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, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from einops import rearrange

torch.manual_seed(0)

# The function rotate_half takes a single parameter 'x' which is a tensor
# It rearranges the tensor, unbinds it, and concatenates parts together
# The function expects x to have a shape where the last dimension is even
# (since it's split into r=2 parts)

# Create a small tensor with batch size 2 and last dimension as even number (4)
# Shape: (batch=2, ..., last_dim=4) where last_dim will be split into r=2, d=2
x = torch.randn(2, 3, 4)

ARGS = {
    'x': x
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to Ran
ran; our contract draft was wrong, not the code
idoamos/not-from-scratch/local_attention/local_attention.py
code served (permissive licence) · get_code("f092dd8a37a00a6e")
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 dict. 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)

# Create a small tensor to pass to the function
t = torch.randn(2, 4, dtype=torch.float32, device='cpu')

# The function takes parameter 't' and accesses t.device and t.dtype
# We need to pass a tensor with these attributes
ARGS = {
    't': t
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
time_features Not yet run
unverified (harvested, no recorded run)
idoamos/not-from-scratch/src/dataloaders/et.py
code served (permissive licence) · get_code("9d0777602eda354e")
How it ran

no invocation recorded.

time_features_from_frequency_str Not yet run
unverified (harvested, no recorded run)
idoamos/not-from-scratch/src/dataloaders/et.py
code served (permissive licence) · get_code("f8544563682146e5")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 13 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 2 the same month, 11 later) and 0 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
exists 486 other papers
231 dated earlier, 15 the same month, 234 later, 4 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
time_features_from_frequency_str 19 other papers
6 dated earlier, 2 the same month, 11 later
2203.05167 (2022-03)
TiSAT: Time Series Anomaly Transformer
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2305.10721 (2023-05)
Revisiting Long-term Time Series Forecasting: An Investigation on Linear Mapping
and 16 more not named here
l2norm 16 other papers
10 dated earlier, 6 later · 4 only as an assembly brick
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.07852 (2022-03)
Block-Recurrent Transformers
and 13 more not named here
eval_decorator 11 other papers
7 dated earlier, 4 later
1907.05242 (2019-07)
Large Memory Layers with Product Keys
2107.11906 (2021-07)
H-Transformer-1D: Fast One-Dimensional Hierarchical Attention for Sequences
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
and 8 more not named here
dequantize 6 other papers
1 dated earlier, 5 later
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2402.15584 (2024-02)
State Space Models for Event Cameras
2406.02923 (2024-06)
P-Spikessm: Harnessing Probabilistic Spiking State Space Models for Long-Range Dependency Tasks
and 3 more not named here
minmax_scale 6 other papers
1 dated earlier, 5 later
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2402.15584 (2024-02)
State Space Models for Event Cameras
2406.02923 (2024-06)
P-Spikessm: Harnessing Probabilistic Spiking State Space Models for Long-Range Dependency Tasks
and 3 more not named here
quantize 6 other papers
1 dated earlier, 5 later
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2402.15584 (2024-02)
State Space Models for Event Cameras
2406.02923 (2024-06)
P-Spikessm: Harnessing Probabilistic Spiking State Space Models for Long-Range Dependency Tasks
and 3 more not named here
deprecated 5 other papers
5 later
2402.15584 (2024-02)
State Space Models for Event Cameras
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
2406.02923 (2024-06)
P-Spikessm: Harnessing Probabilistic Spiking State Space Models for Long-Range Dependency Tasks
and 2 more not named here
default 4 other papers
4 dated earlier
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
2002.05202 (2020-02)
GLU Variants Improve Transformer
2006.16236 (2020-06)
Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
and 1 more not named here
time_features 4 other papers
2 dated earlier, 2 later
2203.05167 (2022-03)
TiSAT: Time Series Anomaly Transformer
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
and 1 more not named here
rotate_half 3 other papers
1 dated earlier, 2 later
2303.11249 (2023-03)
What Makes Data Suitable for a Locally Connected Neural Network? A Necessary and Sufficient Condition Based on Quantum Entanglement
2406.10056 (2024-06)
UniAudio 1.5: Large Language Model-driven Audio Codec is A Few-shot Audio Task Learner
2410.14411 (2024-10)
SNAC: Multi-Scale Neural Audio Codec
apply_rotary_pos_emb 2 other papers
2 later
2406.10056 (2024-06)
UniAudio 1.5: Large Language Model-driven Audio Codec is A Few-shot Audio Task Learner
2410.14411 (2024-10)
SNAC: Multi-Scale Neural Audio Codec
to 2 other papers
2 dated earlier
2108.12630 (2021-08)
GroupFormer: Group Activity Recognition with Clustered Spatial-Temporal Transformer
2303.11249 (2023-03)
What Makes Data Suitable for a Locally Connected Neural Network? A Necessary and Sufficient Condition Based on Quantum Entanglement

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

Modeling long-range dependencies across sequences is a longstanding goal in machine learning and has led to architectures, such as state space models, that dramatically outperform Transformers on long sequences. However, these impressive empirical gains have been by and large demonstrated on benchmarks (e.g. Long Range Arena), where models are randomly initialized and trained to predict a target label from an input sequence. In this work, we show that random initialization leads to gross overestimation of the differences between architectures and that pretraining with standard denoising objectives, using $\textit{only the downstream task data}$, leads to dramatic gains across multiple architectures and to very small gaps between Transformers and state space models (SSMs). In stark contrast to prior works, we find vanilla Transformers to match the performance of S4 on Long Range Arena when properly pretrained, and we improve the best reported results of SSMs on the PathX-256 task by 20 absolute points. Subsequently, we analyze the utility of previously-proposed structured parameterizations for SSMs and show they become mostly redundant in the presence of data-driven initialization obtained through pretraining. Our work shows that, when evaluating different architectures on supervised tasks, incorporation of data-driven priors via pretraining is essential for reliable performance estimation, and can be done efficiently.

For agents

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

get_harvested_code_for_paper("2310.02980")
get_code_for_paper("2310.02980")
have("2310.02980")

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

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

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

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

Connect an agent — have() is free.