HackerPapers

arXiv:2205.13504cs.AI

Are Transformers Effective for Time Series Forecasting?

Ailing Zeng, Muxi Chen, Lei Zhang, Qiang Xu

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 \emph{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: \url{https://github.com/cure-lab/LTSF-Linear}.

arXiv comments
Code is available at https://github.com/cure-lab/LTSF-Linear
Journal reference
DOI
Subjects
cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 5 identifiable commenters in 5 comments across 5 threads, from Apr 2023 to Dec 2025. Found in 1 HN submission from Jan 2024 to Jan 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments5 threads

  1. The Illustrated Transformer 1 comment
    • Just do some basic searches on e.g. Google Scholar for your task (e.g. "medical image segmentation", "point cloud segmentation", "graph neural networks", "timeseries classification", "forecasting") or task modification (e.g. "'rotation invariant' architecture") or whatever, sort…

      D-MachineView on HNParent context

    • I'm not a fan of this blog post as it tries to pass off a method that's not accepted as a good or standard time series methodology (graph transformers) as though it were a norm. Transformers perform poorly on time series, and graph deep learning performs poorly for tasks that…

      cye131View on HNParent context

    • I think what you say is true when comparing transformers to CNNs/RNNs, but not to MLPs. Transformers, RNNs, and CNNs are all techniques to reduce parameter count compared to a pure-MLP model. If you took a transformer model and replaced each self-attention layer with a linear…

      dongobreadView on HNParent context

    • This isn't for tabular data though? Time series transformers have been around for a few years now, see Transformers in Time Series: A Survey https://arxiv.org/abs/2202.07125 and Are Transformers Effective for Time Series Forecasting? https://arxiv.org/abs/2205.13504

      ipsum2View on HNParent context

  2. From deep to long learning? 1 comment
    • Yea, this paper says that the embarrassingly simple linear is better than transformers for time-series: https://arxiv.org/abs/2205.13504 from the abstract: "Recently, there has been a surge of Transformer-based solutions for the long-term time series forecasting (LTSF) task.…

      spyderView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.