SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.08675 · 2026

Efficient Test-Time Scaling for LLM-based Time Series Forecasting

Dinh Phung, Trung Le, Ling Luo, Minh-Tuan Tran, Xuan-May Le, Uwe Aickelin

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2608.08675.json · badge: /api/ran/2608.08675.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
xuanmay2701/SCALER community
Papers with Code archive
5 ran · 1 no recorded run
FunctionStatusWhere it lives
CoarseForecaster Ran
ran on a synthesized input · constructed an object; no result was computed
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("9bdd1f17571f949d")
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 an instance of its own class, CoarseForecaster: the run constructed the object and did not call it, so no result was computed. 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 = {
    "seq_len": 10,
    "pred_len": 5,
    "channels": 3,
    "hidden_dim": 16,
    "coarse_len": 4,
}
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 CoarseForecaster — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CoarseForecaster 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
ForecastDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("6b54176feab61d29")
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 an instance of its own class, ForecastDecoder: the run constructed the object and did not call it, so no result was computed. 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)

# Define the ForecastDecoder class
class ForecastDecoder(nn.Module):
    """
    Decode final token set into full-resolution forecast [B, pred_len, C].
    """

    def __init__(self, d_model, pred_len, channels):
        super().__init__()
        self.pred_len = pred_len
        self.channels = channels
        self.out = nn.Linear(d_model, pred_len * channels)

    def forward(self, z):
        pooled = z.mean(dim=1)
        y = self.out(pooled)
        y = y.view(z.shape[0], self.pred_len, self.channels)
        return y


# Set up parameters for ForecastDecoder.__init__
d_model = 8
pred_len = 5
channels = 3

# Create an instance to verify it works
decoder = ForecastDecoder(d_model=d_model, pred_len=pred_len, channels=channels)

# Test with sample input: [B, seq_len, d_model]
# B=2 (batch), seq_len=4, d_model=8
sample_z = torch.randn(2, 4, d_model)
output = decoder(sample_z)

ARGS = {
    "d_model": d_model,
    "pred_len": pred_len,
    "channels": channels,
}
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 ForecastDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ForecastDecoder 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
PatchEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("1a221de1cb4b3ffd")
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 an instance of its own class, PatchEncoder: the run constructed the object and did not call it, so no result was computed. 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)

# Small word embedding to use as initialization for prototypes
word_embedding = torch.randn(64, 8)  # 64 vocab size, 8 embedding dim

ARGS = {
    'patch_len': 3,
    'in_channels': 2,
    'd_model': 4,
    'n_prototypes': 32,
    'word_embedding': word_embedding,
}
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 PatchEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PatchEncoder 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
RefinerBlock Ran
ran on a synthesized input · constructed an object; no result was computed
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("66dad7d1751cdc0a")
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 an instance of its own class, RefinerBlock: the run constructed the object and did not call it, so no result was computed. 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)

# Define ARGS dict with all parameters for RefinerBlock.__init__
ARGS = {
    "d_model": 4,
    "n_heads": 2,
    "d_ff": 8,
    "n_layers": 1,
    "dropout": 0.1
}

# Create an instance to verify it works
refiner = nn.Module.__new__(nn.Module)
refiner.__class__ = type('RefinerBlock', (nn.Module,), {
    '__init__': lambda self, d_model, n_heads, d_ff, n_layers, dropout=0.1: (
        super(self.__class__, self).__init__(),
        setattr(self, 'encoder', nn.TransformerEncoder(
            nn.TransformerEncoderLayer(d_model=d_model, nhead=n_heads, dim_feedforward=d_ff, dropout=dropout, batch_first=True, activation='gelu'),
            num_layers=n_layers
        )),
        setattr(self, 'head', nn.Sequential(nn.Linear(d_model, d_model), nn.GELU(), nn.Linear(d_model, d_model)))
    )[-1],
    'forward': lambda self, z_hist, z_ctx, out_tokens: (
        (lambda z: (
            (lambda h: (
                (lambda start: (
                    (lambda block: (
                        (lambda block: self.head(block))(
                            torch.cat([block, block[:, -1:, :].repeat(1, out_tokens - block.shape[1], 1)], dim=1)
                            if block.shape[1] < out_tokens else block
                        )
                    ))(h[:, max(0, h.shape[1] - out_tokens):, :])
                ))(max(0, h.shape[1] - out_tokens))
            ))(self.encoder(z))
        ))(torch.cat([z_hist, z_ctx], dim=1))[:, :out_tokens, :]
    )
})

# Create valid test inputs for forward pass
batch_size = 2
d_model = 4
nh = 3  # number of history tokens
nc = 5  # number of context tokens
out_tokens = 2

z_hist = torch.randn(batch_size, nh, d_model)
z_ctx = torch.randn(batch_size, nc, d_model)
out_tokens_int = out_tokens

# Test inputs (not part of ARGS, just for verification)
test_forward_inputs = {
    "z_hist": z_hist,
    "z_ctx": z_ctx,
    "out_tokens": out_tokens_int
}

ARGS = {
    "d_model": 4,
    "n_heads": 2,
    "d_ff": 8,
    "n_layers": 1,
    "dropout": 0.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 RefinerBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RefinerBlock 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
TokenProjector Ran
ran on a synthesized input · constructed an object; no result was computed
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("e03d2c02767c5f8e")
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 an instance of its own class, TokenProjector: the run constructed the object and did not call it, so no result was computed. 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)

# Create a minimal patch encoder that takes [B, T, C] and outputs [B, N, D]
class MinimalPatchEncoder(nn.Module):
    def __init__(self, input_channels, num_patches, output_dim):
        super().__init__()
        self.input_channels = input_channels
        self.num_patches = num_patches
        self.output_dim = output_dim
        # Simple linear projection layer
        self.proj = nn.Linear(input_channels, output_dim)
    
    def forward(self, x):
        # x: [B, T, C]
        # Output: [B, N, D] where N is num_patches
        B, T, C = x.shape
        # Simple projection of the input
        projected = self.proj(x)  # [B, T, output_dim]
        # Reshape to [B, num_patches, output_dim] by taking first num_patches
        return projected[:, :self.num_patches, :]

# Instantiate the patch encoder with small dimensions
patch_encoder = MinimalPatchEncoder(
    input_channels=4,
    num_patches=3,
    output_dim=5
)

ARGS = {
    "patch_encoder": patch_encoder
}
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 TokenProjector — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TokenProjector 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
Model Not yet run
unverified (harvested, no recorded run)
xuanmay2701/SCALER/models/Scaler.py
code served (permissive licence) · get_code("1381497ba69c2f9f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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-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

Long-term time series forecasting benefits from preserving global structure such as trends and seasonality. Recent LLM-based forecasters often improve accuracy through test-time scaling (e.g., iterative refinement), but these methods are computationally expensive and increasingly prone to global-shape mismatch as the prediction horizon extends. We propose SCALER, a coarse-to-fine forecasting framework that first employs a lightweight Transformer tailored to long-term shape modeling to predict a coarse representation of future dynamics. This predicted shape then serves as a compact guide for an LLM to perform test-time scaling via iterative coarse-to-fine residual token refinement, while processing substantially fewer tokens at each step. By guiding refinement with an explicit future-shape prediction, SCALER reduces reliance on long description prompts, and its fixed-step refinement avoids costly reward-model-based selection, further lowering computational overhead. Experimental results demonstrate that SCALER outperforms strong forecasting baselines in long-term, short-term and zero-shot forecasting while significantly reducing the inference cost associated with scaled LLM for time series forecasting. Code: https://github.com/xuanmay2701/SCALER. • Information systems → Data mining; • Computing methodologies → Machine learning.

For agents

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

get_harvested_code_for_paper("2608.08675")
get_code_for_paper("2608.08675")
have("2608.08675")

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

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

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

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

Connect an agent — have() is free.