SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.05798 · 2024

$\textbf{S}^2$IP-LLM: Semantic Space Informed Prompt Learning with LLM for Time Series Forecasting

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; 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/2403.05798.json · badge: /api/ran/2403.05798.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
panzijie825/s2ip-llm canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
divide_no_nan Ran
ran, honoured the contract we drafted
panzijie825/s2ip-llm/Long-term_Forecasting/utils/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from seungyoon-Choi/CoSPOT, is pointer only (licence: NONE) · get_code("bdc787c888ab83a2")
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 seungyoon-Choi/CoSPOT, 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.

group_values Ran
ran, violated the contract we drafted
panzijie825/s2ip-llm/Long-term_Forecasting/utils/m4_summary.py
code served (permissive licence) · get_code("c7809c2a271dca7d")
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 ndarray, ndim 2, dtype family float, shape (2, 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 numpy as np

# Create sample data
np.random.seed(0)

# values: array-like that will be indexed by groups
# needs to support indexing with boolean array
values = np.array([
    np.array([1.0, 2.0, np.nan, 4.0]),
    np.array([5.0, np.nan, 7.0, 8.0]),
    np.array([9.0, 10.0, 11.0, np.nan]),
    np.array([np.nan, 13.0, 14.0, 15.0])
])

# groups: array that will be compared with group_name via ==
# should have same length as values
groups = np.array(['A', 'B', 'A', 'B'])

# group_name: the value to filter groups by
group_name = 'A'

ARGS = {
    'values': values,
    'groups': groups,
    'group_name': group_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
mase Ran
ran; our contract draft was wrong, not the code
panzijie825/s2ip-llm/Long-term_Forecasting/utils/m4_summary.py
code served (permissive licence) · get_code("a835854e98db22c5")
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 float32, ndim 0, dtype family float, 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 numpy as np

# MASE (Mean Absolute Scaled Error) takes:
# - forecast: predicted values
# - insample: historical/training data used to compute the scale
# - outsample: actual test values to compare against forecast
# - frequency: seasonal frequency for computing scaled error

# Create small numpy arrays for time series data
np.random.seed(0)

# insample: historical training data (needs at least frequency+1 points)
insample = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], dtype=np.float32)

# outsample: test/holdout data to evaluate against
outsample = np.array([7.5, 8.2, 9.1, 10.3], dtype=np.float32)

# forecast: predictions matching outsample length
forecast = np.array([7.0, 8.0, 9.0, 10.0], dtype=np.float32)

# frequency: seasonal period (must be less than len(insample))
frequency = 2

ARGS = {
    "forecast": forecast,
    "insample": insample,
    "outsample": outsample,
    "frequency": frequency
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, ndim 0, dtype family float, 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
smape_2 Ran
ran, honoured the contract we drafted
panzijie825/s2ip-llm/Long-term_Forecasting/utils/m4_summary.py
code served (permissive licence) · get_code("27a243751eb26480")
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 ndarray, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small numpy arrays for forecast and target
# Using distinct shapes to make them proble-able: 2x4 arrays
forecast = np.array([
    [1.5, 2.3, 0.8, 3.2],
    [2.1, 1.9, 2.5, 0.5]
], dtype=np.float32)

target = np.array([
    [1.2, 2.5, 1.0, 3.0],
    [2.0, 2.0, 2.3, 0.7]
], dtype=np.float32)

ARGS = {
    "forecast": forecast,
    "target": target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 4 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
divide_no_nan 14 other papers
2 dated earlier, 2 the same month, 10 later
2401.09093 (2024-01)
RWKV-TS: Beyond Traditional Recurrent Neural Network for Time Series Tasks
2402.04852 (2024-02)
Multi-Patch Prediction: Adapting LLMs for Time Series Representation Learning
2403.01493 (2024-03)
ConvTimeNet: A Deep Hierarchical Fully Convolutional Model for Multivariate Time Series Analysis
and 11 more not named here
group_values 1 other paper
1 later
2505.04163 (2025-05)
Retrieval Augmented Time Series Forecasting
mase 1 other paper
1 later
2505.04163 (2025-05)
Retrieval Augmented Time Series Forecasting
smape_2 1 other paper
1 later
2505.04163 (2025-05)
Retrieval Augmented Time Series Forecasting

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

Recently, there has been a growing interest in leveraging pre-trained large language models (LLMs) for various time series applications. However, the semantic space of LLMs, established through the pre-training, is still underexplored and may help yield more distinctive and informative representations to facilitate time series forecasting. To this end, we propose Semantic Space Informed Prompt learning with LLM ($S^2$IP-LLM) to align the pre-trained semantic space with time series embeddings space and perform time series forecasting based on learned prompts from the joint space. We first design a tokenization module tailored for cross-modality alignment, which explicitly concatenates patches of decomposed time series components to create embeddings that effectively encode the temporal dynamics. Next, we leverage the pre-trained word token embeddings to derive semantic anchors and align selected anchors with time series embeddings by maximizing the cosine similarity in the joint space. This way, $S^2$IP-LLM can retrieve relevant semantic anchors as prompts to provide strong indicators (context) for time series that exhibit different temporal dynamics. With thorough empirical studies on multiple benchmark datasets, we demonstrate that the proposed $S^2$IP-LLM can achieve superior forecasting performance over state-of-the-art baselines. Furthermore, our ablation studies and visualizations verify the necessity of prompt learning informed by semantic space.

For agents

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

get_harvested_code_for_paper("2403.05798")
get_code_for_paper("2403.05798")
have("2403.05798")

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

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

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

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

Connect an agent — have() is free.