SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.08151 · NeurIPS · 2022

First De-Trend then Attend: Rethinking Attention for Time-Series Forecasting

Hao Wang, Uc Diego, Jin Xiaoyong, Youngsuk Park, Danielle Maddix, Yuyang Wang, Xingjian Shi, Xiyuan Zhang, Karthick Gopalswamy, Gaurav Gupta

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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, 0 violated it and 14 have no contract verdict; 0 failures of our instrument; 3 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/2212.08151.json · badge: /api/ran/2212.08151.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
BeBeYourLove/TDformer community
Papers with Code archive
14 ran · 3 no recorded run
FunctionStatusWhere it lives
DataEmbedding Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("68aca50b866b5c44")
How it ran

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

DecoderLayer Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("a764d7bf11731507")
How it ran

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

Encoder Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("262ec83d671e7e73")
How it ran

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

EncoderLayer Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("13ebf522358d72ce")
How it ran

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

FixedEmbedding Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("16e89fafa4d72549")
How it ran

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

FourierAttention Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("e25d8996d3335ae8")
How it ran

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

FullAttention Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("cf298e4e52b231ae")
How it ran

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

PositionalEmbedding Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("cc9347d9fcbd79f0")
How it ran

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

RevIN Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("63e737eb80bffe5c")
How it ran

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

TemporalEmbedding Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("0047413d8e7fb6de")
How it ran

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

TokenEmbedding Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("a06a4f88ba660a18")
How it ran

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

moving_avg Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("94ce7d58219032b2")
How it ran

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

series_decomp Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("e8b308d6f4a51e9c")
How it ran

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

series_decomp_multi Ran
ran on a synthesized input
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("24c312878bd471eb")
How it ran

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

AttentionLayer Not yet run
unverified (harvested, no recorded run)
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("626ecbcf3c8c36f8")
How it ran

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

Decoder Not yet run
unverified (harvested, no recorded run)
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("2f76a320461e09fc")
How it ran

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

Model Not yet run
unverified (harvested, no recorded run)
BeBeYourLove/TDformer/model/TDformer.py
pointer only (licence: NONE) · get_code("f2783576a62ba4e8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BeBeYourLove/TDformer 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 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 later) and 8 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
PositionalEmbedding
brick of this paper's assembly: helper
19 other papers
3 dated earlier, 16 later · 16 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
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
and 16 more not named here
TokenEmbedding
brick of this paper's assembly: helper
15 other papers
2 dated earlier, 13 later · 13 only as an assembly brick
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
2302.11939 (2023-02)
One Fits All: Power General Time Series Analysis by Pretrained LM
and 12 more not named here
series_decomp
brick of this paper's assembly: helper
15 other papers
4 dated earlier, 11 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
2205.13504 (2022-05)
Are Transformers Effective for Time Series Forecasting?
and 12 more not named here
FixedEmbedding
brick of this paper's assembly: helper
14 other papers
3 dated earlier, 11 later · 12 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
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
and 11 more not named here
TemporalEmbedding
brick of this paper's assembly: helper
14 other papers
3 dated earlier, 11 later · 12 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
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
and 11 more not named here
Encoder
brick of this paper's assembly: model
4 other papers
3 dated earlier, 1 later · 3 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 1 more not named here
RevIN
brick of this paper's assembly: helper
4 other papers
2 dated earlier, 2 later · 2 only as an assembly brick
2109.04553 (2021-09)
Is Attention Better Than Matrix Decomposition?
2211.14730 (2022-11)
A Time Series is Worth 64 Words: Long-term Forecasting with Transformers
2401.02236 (2024-01)
U-Mixer: An Unet-Mixer Architecture with Stationarity Correction for Time Series Forecasting
and 1 more not named here
series_decomp_multi
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 1 only as an assembly brick
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
2402.05956 (2024-02)
Pathformer: Multi-scale Transformers with Adaptive Pathways for Time Series Forecasting
moving_avg
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
2402.05956 (2024-02)
Pathformer: Multi-scale Transformers with Adaptive Pathways for 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

Transformer-based models have gained large popularity and demonstrated promising results in long-term time-series forecasting in recent years. In addition to learning attention in time domain, recent works also explore learning attention in frequency domains (e.g., Fourier domain, wavelet domain), given that seasonal patterns can be better captured in these domains. In this work, we seek to understand the relationships between attention models in different time and frequency domains. Theoretically, we show that attention models in different domains are equivalent under linear conditions (i.e., linear kernel to attention scores). Empirically, we analyze how attention models of different domains show different behaviors through various synthetic experiments with seasonality, trend and noise, with emphasis on the role of softmax operation therein. Both these theoretical and empirical analyses motivate us to propose a new method: TDformer (Trend Decomposition Transformer), that first applies seasonal-trend decomposition, and then additively combines an MLP which predicts the trend component with Fourier attention which predicts the seasonal component to obtain the final prediction. Extensive experiments on benchmark time-series forecasting datasets demonstrate that TDformer achieves state-of-the-art performance against existing attention-based models.

For agents

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

get_harvested_code_for_paper("2212.08151")
get_code_for_paper("2212.08151")
have("2212.08151")

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

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

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

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

Connect an agent — have() is free.