SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.13504 · 2022

Are Transformers Effective for Time Series Forecasting?

Lei Zhang, Ailing Zeng, Qiang Xu, Muxi Chen

arXiv · PDF · Open in the Atlas

Code that ran

13 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 13 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-21; 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/2205.13504.json · badge: /api/ran/2205.13504.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
Hannibal046/GridTST community
Papers with Code archive
3 ran · 6 no recorded run
remigenet/TLN community
Papers with Code archive
3 ran · 0 no recorded run
taohan10200/weather-5k community
Papers with Code archive
3 ran · 0 no recorded run
cure-lab/DLinear named in the paper
Papers with Code archive
1 ran · 0 no recorded run
jafarbakhshaliyev/wave-augs community
Papers with Code archive
1 ran · 0 no recorded run
cure-lab/ltsf-linear community
Papers with Code archive
1 ran · 0 no recorded run
master-plc/fredf community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DLinear Ran
ran on a synthesized input
remigenet/TLN/tln/linears.py
pointer only (licence: NOASSERTION) · get_code("8ac078919392ee4e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, remigenet/TLN (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.

GridTSTEncoderLayer Ran
ran on a synthesized input
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("767695ab98ff1ae8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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.

GridTSTFFN Ran
ran on a synthesized input
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("d13e9dd379fd4826")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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.

GridTSTFlattenHead Ran
ran on a synthesized input
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("40cb448f27ac8400")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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.

Model Ran
ran on a synthesized input · constructed an object; no result was computed
taohan10200/weather-5k/models/DLinear.py
code served (permissive licence) · get_code("83010a0f7a102ee6")
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, Model: 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)

class ConfigStandIn:
    def __init__(self):
        self.task_name = 'long_term_forecast'
        self.seq_len = 10
        self.pred_len = 5
        self.moving_avg = 3
        self.enc_in = 4
        self.dropout = 0.1
        self.num_class = 2

configs = ConfigStandIn()

x_enc = torch.randn(2, 10, 4)
x_mark_enc = torch.randn(2, 10, 1)
x_dec = torch.randn(2, 5, 4)
x_mark_dec = torch.randn(2, 5, 1)

ARGS = {
    'configs': configs,
    'individual': False
}
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 Model — 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 Model 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 Ran
ran on a synthesized input · constructed an object; no result was computed
cure-lab/DLinear/models/DLinear.py
code served (permissive licence) · get_code("7cc67118c8ed8b2d")
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, Model: 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)

class Config:
    def __init__(self, seq_len, pred_len, enc_in, individual):
        self.seq_len = seq_len
        self.pred_len = pred_len
        self.enc_in = enc_in
        self.individual = individual

# Create a config object
configs = Config(
    seq_len=10,
    pred_len=5,
    enc_in=4,
    individual=False
)

# Create input tensor: (batch_size, seq_len, channels)
x = torch.randn(2, 10, 4)

ARGS = {
    'configs': configs
}
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 Model — 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 Model 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 Ran
ran on a synthesized input
jafarbakhshaliyev/wave-augs/models/DLinear.py
pointer only (licence: NONE) · get_code("ff8819f5631c8d73")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jafarbakhshaliyev/wave-augs 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.

Model Ran
ran on a synthesized input
cure-lab/ltsf-linear/models/Linear.py
code served (permissive licence) · get_code("98263cd0ff580869")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import torch.nn as nn

class Model(nn.Module):
    """
    Just one Linear layer
    """

    def __init__(self, configs):
        super(Model, self).__init__()
        self.seq_len = configs.seq_len
        self.pred_len = configs.pred_len
        self.channels = configs.enc_in
        self.individual = configs.individual
        if self.individual:
            self.Linear = nn.ModuleList()
            for i in range(self.channels):
                self.Linear.append(nn.Linear(self.seq_len, self.pred_len))
        else:
            self.Linear = nn.Linear(self.seq_len, self.pred_len)

    def forward(self, x):
        if self.individual:
            output = torch.zeros([x.size(0), self.pred_len, x.size(2)], dtype=x.dtype).to(x.device)
            for i in range(self.channels):
                output[:, :, i] = self.Linear[i](x[:, :, i])
            x = output
        else:
            x = self.Linear(x.permute(0, 2, 1)).permute(0, 2, 1)
        return x


class Config:
    def __init__(self, seq_len, pred_len, enc_in, individual):
        self.seq_len = seq_len
        self.pred_len = pred_len
        self.enc_in = enc_in
        self.individual = individual


INIT_ARGS = {
    'configs': Config(seq_len=5, pred_len=3, enc_in=4, individual=False)
}

ARGS = {
    'x': torch.randn(2, 5, 4)
}

if __name__ == '__main__':
    model = Model(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 4)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Model Ran
ran on a synthesized input
master-plc/fredf/models/DLinear.py
code served (permissive licence) · get_code("14788c93463d2c43")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
import torch.nn as nn

class ConfigObject:
    def __init__(self, **kwargs):
        for key, value in kwargs.items():
            setattr(self, key, value)

# Create a config object for Model.__init__
configs = ConfigObject(
    task_name='long_term_forecast',
    seq_len=10,
    pred_len=5,
    moving_avg=3,
    enc_in=4,
    dropout=0.1,
    num_class=3
)

INIT_ARGS = {
    'configs': configs,
    'individual': False
}

# Create input tensors for forward method
# x_enc: [batch_size, seq_len, enc_in]
batch_size = 2
x_enc = torch.randn(batch_size, configs.seq_len, configs.enc_in)
x_mark_enc = torch.randn(batch_size, configs.seq_len, 4)
x_dec = torch.randn(batch_size, configs.pred_len, configs.enc_in)
x_mark_dec = torch.randn(batch_size, configs.pred_len, 4)

ARGS = {
    'x_enc': x_enc,
    'x_mark_enc': x_mark_enc,
    'x_dec': x_dec,
    'x_mark_dec': x_mark_dec,
    'mask': None
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MovingAvg Ran
ran on a synthesized input
remigenet/TLN/tln/linears.py
pointer only (licence: NOASSERTION) · get_code("7795f99235c953e7")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, remigenet/TLN (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.

SeriesDecomp Ran
ran on a synthesized input
remigenet/TLN/tln/linears.py
pointer only (licence: NOASSERTION) · get_code("717cede707a4ac84")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, remigenet/TLN (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.

moving_avg Ran
ran on a synthesized input · constructed an object; no result was computed
taohan10200/weather-5k/models/DLinear.py
code served (permissive licence) · get_code("262d9b037b804057")
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, moving_avg: 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 instance of moving_avg with kernel_size and stride parameters
kernel_size = 3
stride = 1
model = nn.AvgPool1d(kernel_size=kernel_size, stride=stride, padding=0)

# Create input tensor
# Shape: (batch_size, seq_len, num_features)
# Using batch=2, seq_len=4, num_features=3 for distinction
x = torch.randn(2, 4, 3)

ARGS = {
    'kernel_size': 3,
    'stride': 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 moving_avg — 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 moving_avg 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
series_decomp Ran
ran on a synthesized input · constructed an object; no result was computed
taohan10200/weather-5k/models/DLinear.py
code served (permissive licence) · get_code("eb14ea186bdfc6fe")
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, series_decomp: 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 small input tensor
# Shape: (batch_size=2, sequence_length=8, num_features=4)
x = torch.randn(2, 8, 4)

# Define kernel_size for the series_decomp
kernel_size = 3

ARGS = {
    'kernel_size': kernel_size
}
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 series_decomp — 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 series_decomp 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
GridTSTConfig Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("5c7d231d76679dbc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

GridTSTEncoder Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("ac9a7fd78eab4232")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

GridTSTForTimeSeriesPrediction Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("d7a80d13e5e17fd4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

GridTSTModel Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("1305217a1c6050ce")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

GridTSTPreTrainedModel Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("f59046d1f521bd70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

GridTSTSelfAttention Not yet run
unverified (harvested, no recorded run)
Hannibal046/GridTST/model/gridtst/modeling_gridtst.py
pointer only (licence: NONE) · get_code("7c024325d71805e9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Hannibal046/GridTST 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. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 17 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
series_decomp
brick of this paper's assembly: helper
15 other papers
2 dated earlier, 13 later · 10 only as an assembly brick
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
2206.04038 (2022-06)
Scaleformer: Iterative Multi-scale Refining Transformers for Time Series Forecasting
and 12 more not named here
moving_avg
brick of this paper's assembly: helper
13 other papers
1 dated earlier, 12 later · 11 only as an assembly brick
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2310.01728 (2023-10)
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models
2310.04948 (2023-10)
TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting
and 10 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-21.

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 surge of Transformer-based solutions for the long-term time series forecasting (LTSF) task. Despite the growing performance over the past few years, we question the validity of this line of research in this work. Specifically, Transformers is arguably the most successful solution to extract the semantic correlations among the elements in a long sequence. However, in time series modeling, we are to extract the temporal relations in an ordered set of continuous points. While employing positional encoding and using tokens to embed sub-series in Transformers facilitate preserving some ordering information, the nature of the permutation-invariant self-attention mechanism inevitably results in temporal information loss. To validate our claim, we introduce a set of embarrassingly simple one-layer linear models named LTSF-Linear for comparison. Experimental results on nine real-life datasets show that LTSF-Linear surprisingly outperforms existing sophisticated Transformer-based LTSF models in all cases, and often by a large margin. Moreover, we conduct comprehensive empirical studies to explore the impacts of various design elements of LTSF models on their temporal relation extraction capability. We hope this surprising finding opens up new research directions for the LTSF task. We also advocate revisiting the validity of Transformer-based solutions for other time series analysis tasks (e.g., anomaly detection) in the future. Code is available at: https://github.com/cure-lab/LTSF-Linear.

For agents

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

get_harvested_code_for_paper("2205.13504")
get_code_for_paper("2205.13504")
have("2205.13504")

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

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

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

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

Connect an agent — have() is free.