SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.08469 · 2023

LLM4TS: Aligning Pre-Trained LLMs as Data-Efficient Time-Series Forecasters

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 5 failures of our instrument; 2 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/2308.08469.json · badge: /api/ran/2308.08469.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
blacksnail789521/LLM4TS canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
adjustment Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
blacksnail789521/LLM4TS/utils/tools.py
pointer only (licence: MIT); the stored copy get_code serves, from decisionintelligence/CATCH, is pointer only (licence: NONE) · get_code("6f19aadea4af692b")
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 decisionintelligence/CATCH, 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.

cal_accuracy Ran
ran, honoured the contract we drafted
blacksnail789521/LLM4TS/utils/tools.py
pointer only (licence: MIT); the stored copy get_code serves, from decisionintelligence/CATCH, is pointer only (licence: NONE) · get_code("1a1c47411dbeec1f")
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 decisionintelligence/CATCH, 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.

change_dict_to_args Ran
ran; our contract draft was wrong, not the code
blacksnail789521/LLM4TS/utils/tools.py
code served (permissive licence) · get_code("e90c0a994b0d55fd")
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 Namespace. 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 argparse
import torch

torch.manual_seed(0)

# The function takes a configs dict and converts it to an argparse.Namespace
# It iterates over key-value pairs and uses setattr to add them as attributes
# So we need to provide a dict with various types of values

ARGS = {
    "configs": {
        "learning_rate": 0.001,
        "batch_size": 32,
        "num_epochs": 10,
        "model_name": "bert-base",
        "dropout": 0.1,
        "hidden_dim": 768,
        "use_cuda": False,
        "seed": 42,
        "weights": torch.randn(2, 4),
        "is_training": True,
        "config_list": [1, 2, 3],
        "nested_config": {"key": "value"}
    }
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
patching_ci Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
blacksnail789521/LLM4TS/exp/exp_supervised_finetuning.py
code served (permissive licence) · get_code("30f355f4443eeb1c")
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 (8, 4, 3) 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
from einops import rearrange

torch.manual_seed(0)

# Create a small input tensor
# Shape: (B, T, C) where B=batch, T=time steps, C=channels
x = torch.randn(2, 8, 4)

# Patch length and stride parameters
patch_len = 3
stride = 2

ARGS = {
    'x': x,
    'patch_len': patch_len,
    'stride': stride
}
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 (8, 4, 3) — shape (8, 4, 3) 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
update_args_from_dataset Ran
ran; our contract draft was wrong, not the code
blacksnail789521/LLM4TS/data_provider/data_loader.py
code served (permissive licence) · get_code("8e46c6000dc6b562")
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 Namespace. 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 argparse
from pathlib import Path

# Create a minimal argparse.Namespace with all required attributes
args = argparse.Namespace()

# Required attributes that are read by the function
args.data_name = 'Weather'
args.root_path = Path('/tmp/project')
args.pred_len = 24
args.LLM = 'gpt2'

ARGS = {'args': args}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
update_batch_x_y Ran
ran; our contract draft was wrong, not the code
blacksnail789521/LLM4TS/exp/exp_supervised_finetuning.py
code served (permissive licence) · get_code("eaaba7969a0fac26")
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. 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 args config class with required attributes
class ArgsConfig:
    def __init__(self):
        self.stride = 2
        self.seq_len = 8
        self.label_len = 3
        self.pred_len = 4
        self.patch_len = 3

# Create small test tensors
# batch_x: (B=2, T=8, C=4) - sequence input
batch_x = torch.randn(2, 8, 4)

# batch_y: (B=2, T=7, C=4) - label_len + pred_len = 3 + 4 = 7
batch_y = torch.randn(2, 7, 4)

# Create args object
args = ArgsConfig()

# enable_y_patching flag
enable_y_patching = True

ARGS = {
    "batch_x": batch_x,
    "batch_y": batch_y,
    "args": args,
    "enable_y_patching": enable_y_patching
}
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 — a tuple output has no array shape of its own; none is 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)
blacksnail789521/LLM4TS/utils/timefeatures.py
code served (permissive licence) · get_code("9a5fcd4ebfc55d03")
How it ran

no invocation recorded.

time_features_from_frequency_str Not yet run
unverified (harvested, no recorded run)
blacksnail789521/LLM4TS/utils/timefeatures.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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
time_features_from_frequency_str 19 other papers
4 dated earlier, 15 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
time_features 12 other papers
2 dated earlier, 10 later
2305.10721 (2023-05)
Revisiting Long-term Time Series Forecasting: An Investigation on Linear Mapping
2305.18803 (2023-05)
Koopa: Learning Non-stationary Time Series Dynamics with Koopman Predictors
2310.09751 (2023-10)
UniTime: A Language-Empowered Unified Model for Cross-Domain Time Series Forecasting
and 9 more not named here
adjustment 4 other papers
4 later
2310.09751 (2023-10)
UniTime: A Language-Empowered Unified Model for Cross-Domain Time Series Forecasting
2402.12694 (2024-02)
Revitalizing Multivariate Time Series Forecasting: Learnable Decomposition with Inter-Series Dependencies and Intra-Series Variations Modeling
2411.01623 (2024-11)
FilterNet: Harnessing Frequency Filters for Time Series Forecasting
and 1 more not named here
cal_accuracy 4 other papers
4 later
2310.09751 (2023-10)
UniTime: A Language-Empowered Unified Model for Cross-Domain Time Series Forecasting
2402.12694 (2024-02)
Revitalizing Multivariate Time Series Forecasting: Learnable Decomposition with Inter-Series Dependencies and Intra-Series Variations Modeling
2411.01623 (2024-11)
FilterNet: Harnessing Frequency Filters for Time Series Forecasting
and 1 more not named here

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

Multivariate time-series forecasting is vital in various domains, e.g., economic planning and weather prediction. Deep train-from-scratch models have exhibited effective performance yet require large amounts of data, which limits real-world applicability. Recently, researchers have leveraged the representation learning transferability of pre-trained Large Language Models (LLMs) to handle limited non-linguistic datasets effectively. However, incorporating LLMs with time-series data presents challenges of limited adaptation due to different compositions between time-series and linguistic data, and the inability to process multi-scale temporal information. To tackle these challenges, we propose LLM4TS, a framework for time-series forecasting with pre-trained LLMs. LLM4TS consists of a two-stage fine-tuning strategy: the time-series alignment stage to align LLMs with the nuances of time-series data, and the forecasting fine-tuning stage for downstream time-series forecasting tasks. Furthermore, our framework features a novel two-level aggregation method that integrates multi-scale temporal data within pre-trained LLMs, enhancing their ability to interpret time-specific information. In experiments across 7 time-series forecasting datasets, LLM4TS is superior to existing state-of-the-art methods compared with trained-from-scratch models in full-shot scenarios, and also achieves the highest rank in few-shot scenarios. In addition, evaluations compared with different unsupervised representation learning approaches highlight LLM4TS's effectiveness with representation learning in forecasting tasks. Ablation studies further validate each component's contribution to LLM4TS and underscore the essential role of utilizing LLM's pre-trained weights for optimal performance. The code is available at https://github.com/blacksnail789521/LLM4TS.

For agents

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

get_harvested_code_for_paper("2308.08469")
get_code_for_paper("2308.08469")
have("2308.08469")

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

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

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

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

Connect an agent — have() is free.