SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.12360 · ICLR · 2025

Towards Neural Scaling Laws for Time Series Foundation Models

Shirui Pan, Chao-Han Yang, Ming Jin, Yuxuan Liang, Renhe Jiang, Qingren Yao

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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; 5 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2410.12360.json · badge: /api/ran/2410.12360.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
Qingrenn/TSFM-ScalingLaws canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
FunctionStatusWhere it lives
fs2idx Ran
ran; our contract draft was wrong, not the code
Qingrenn/TSFM-ScalingLaws/tsfm/module/ts_embed.py
code served (permissive licence) · get_code("d1d71cd49524f456")
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 int, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from einops import einsum, rearrange

torch.manual_seed(0)

# feat_size: Int[torch.Tensor, '*batch']
# This is a tensor with arbitrary batch dimensions containing feature size indices
feat_size = torch.tensor([0, 2, 1, 0], dtype=torch.long)

# feat_sizes: Int[torch.Tensor, 'num_feats']
# This is a 1D tensor of feature sizes to match against
feat_sizes = torch.tensor([64, 128, 256, 512], dtype=torch.long)

ARGS = {
    'feat_size': feat_size,
    'feat_sizes': feat_sizes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, jaxtyping, 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 int, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_path_var Ran
ran; our contract draft was wrong, not the code
Qingrenn/TSFM-ScalingLaws/tsfm/common/env.py
code served (permissive licence) · get_code("bcafdb774fca0219")
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 PosixPath. 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 os
from pathlib import Path
from typing import Optional

# Set up environment variable for testing
os.environ['TEST_PATH_VAR'] = '/tmp/test_path'

# Create ARGS dict with the parameter
ARGS = {
    'var': 'TEST_PATH_VAR'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
mask_fill Ran
ran; our contract draft was wrong, not the code
Qingrenn/TSFM-ScalingLaws/tsfm/common/torch_util.py
code served (permissive licence) · get_code("3918737cb9502b15")
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
from jaxtyping import Bool, Float, Int

torch.manual_seed(0)

# Create tensor with shape (*batch, dim) where batch=(2,) and dim=4
tensor = torch.randn(2, 4)

# Create mask with shape (*batch,) where batch=(2,)
mask = torch.tensor([True, False])

# Create value with shape (dim,) where dim=4
value = torch.randn(4)

ARGS = {
    "tensor": tensor,
    "mask": mask,
    "value": value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, 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
native_scaled_dot_product_attention Ran
ran; our contract draft was wrong, not the code
Qingrenn/TSFM-ScalingLaws/tsfm/module/attention.py
code served (permissive licence) · get_code("d376f2a8f3eb5d95")
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 5, dtype family float, shape (2, 3, 2, 5, 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 math

torch.manual_seed(0)

# Define tensor dimensions
batch_size = 2
num_groups = 3
hpg = 2  # heads per group
q_len = 5
kv_len = 4
dim = 6

# Create query, key, value tensors
# Shape: *batch group hpg q_len dim
query = torch.randn(batch_size, num_groups, hpg, q_len, dim)
key = torch.randn(batch_size, num_groups, hpg, kv_len, dim)
value = torch.randn(batch_size, num_groups, hpg, kv_len, dim)

# Create attention mask (optional)
# Shape: *batch group hpg q_len kv_len
# Using a boolean mask
attn_mask = torch.ones(batch_size, num_groups, hpg, q_len, kv_len, dtype=torch.bool)
# Set some positions to False to mask them out
attn_mask[0, 0, 0, 0, 0] = False

# Parameters
dropout_p = 0.1
scale = None

ARGS = {
    'query': query,
    'key': key,
    'value': value,
    'attn_mask': attn_mask,
    'dropout_p': dropout_p,
    'scale': scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 3, 2, 5, 6) — shape (2, 3, 2, 5, 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
packed_attention_mask Ran
ran; our contract draft was wrong, not the code
Qingrenn/TSFM-ScalingLaws/tsfm/common/torch_util.py
code served (permissive licence) · get_code("9411bf15db0f1fa2")
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, 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)

# Create sample_id tensor with shape (*batch, seq_len)
# Using batch size 2 and seq_len 4
sample_id = torch.tensor([
    [0, 1, 0, 1],
    [1, 1, 0, 0]
], dtype=torch.int64)

ARGS = {
    "sample_id": sample_id
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, 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, 4) — shape (2, 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
packed_attention_mask_andop Ran
ran, violated the contract we drafted
Qingrenn/TSFM-ScalingLaws/tsfm/common/torch_util.py
code served (permissive licence) · get_code("56c1433b56535038")
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, 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 jaxtyping import Bool

torch.manual_seed(0)

# The function expects a Bool tensor with shape (*batch, seq_len)
# Let's create a small batch with batch_size=2 and seq_len=4
id_tensor = torch.tensor([
    [True, False, True, False],
    [True, True, False, False]
], dtype=torch.bool)

ARGS = {
    "id": id_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, 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, 4) — shape (2, 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
resolve_as_tuple Ran
ran, violated the contract we drafted
Qingrenn/TSFM-ScalingLaws/tsfm/common/hydra_util.py
code served (permissive licence) · get_code("568a5b54144b7946")
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 int; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T01:20:17Z. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from omegaconf import OmegaConf

torch.manual_seed(0)

# The function resolve_as_tuple takes a single parameter 'ls' which is a list
# and converts it to a tuple. We need to provide a simple list.

ARGS = {
    'ls': [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, omegaconf, 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 int — 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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
beta_binomial_sampler Not yet run
unverified (harvested, no recorded run)
Qingrenn/TSFM-ScalingLaws/tsfm/common/sampler.py
code served (permissive licence) · get_code("dd639b004340cd07")
How it ran

no invocation recorded.

binomial_sampler Not yet run
unverified (harvested, no recorded run)
Qingrenn/TSFM-ScalingLaws/tsfm/common/sampler.py
code served (permissive licence) · get_code("e56544092cf931bd")
How it ran

no invocation recorded.

register_resolver Not yet run
unverified (harvested, no recorded run)
Qingrenn/TSFM-ScalingLaws/tsfm/common/hydra_util.py
code served (permissive licence) · get_code("28ebfb3011b4bfaf")
How it ran

no invocation recorded.

resolve_cls_getattr Not yet run
unverified (harvested, no recorded run)
Qingrenn/TSFM-ScalingLaws/tsfm/common/hydra_util.py
code served (permissive licence) · get_code("603ae909b9308e4e")
How it ran

no invocation recorded.

uniform_sampler Not yet run
unverified (harvested, no recorded run)
Qingrenn/TSFM-ScalingLaws/tsfm/common/sampler.py
code served (permissive licence) · get_code("47a7fdcc8c3ab2d0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 9 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 9 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
beta_binomial_sampler 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
binomial_sampler 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
get_path_var 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
mask_fill 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
packed_attention_mask 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
register_resolver 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
resolve_as_tuple 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
resolve_cls_getattr 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series
uniform_sampler 2 other papers
2 later
2506.14087 (2025-06)
Multi-Scale Finetuning for Encoder-based Time Series Foundation Models
2510.20273 (2025-10)
SynTSBench: Rethinking Temporal Pattern Learning in Deep Learning Models for Time Series

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-23.

Repositories linked to this paper

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

Abstract

Scaling laws offer valuable insights into the design of time series foundation models (TSFMs). However, previous research has largely focused on the scaling laws of TSFMs for in-distribution (ID) data, leaving their out-of-distribution (OOD) scaling behavior and the influence of model architectures less explored. In this work, we examine two common TSFM architectures-encoder-only and decoderonly Transformers-and investigate their scaling behavior on both ID and OOD data. These models are trained and evaluated across varying parameter counts, compute budgets, and dataset sizes. Our experiments reveal that the negative loglikelihood of TSFMs exhibits similar scaling behavior in both OOD and ID settings. We further compare the scaling properties across different architectures, incorporating two state-of-the-art TSFMs as case studies, showing that model architecture plays a significant role in scaling. The encoder-only Transformers demonstrate better scalability than the decoder-only Transformers in ID data, while the architectural enhancements in the two advanced TSFMs primarily improve ID performance but reduce OOD scalability. While scaling up TSFMs is expected to drive performance breakthroughs, the lack of a comprehensive understanding of TSFM scaling laws has hindered the development of a robust framework to guide model scaling. We fill this gap in this work by synthesizing our findings and providing practical guidelines for designing and scaling larger TSFMs with enhanced model capabilities.

For agents

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

get_harvested_code_for_paper("2410.12360")
get_code_for_paper("2410.12360")
have("2410.12360")

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

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

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

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

Connect an agent — have() is free.