arXiv(opens in a new tab)Computer ScienceJun 2021Cited by 9 papers on PaperVantage

Manuscript Offprint

arXiv:2106.13008

Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting

Haixu Wu, Jiehui Xu, Jianmin Wang, Mingsheng Long

Abstract

Extending the forecasting time is a critical demand for real applications, such as extreme weather early warning and long-term energy consumption planning. This paper studies the long-term forecasting problem of time series. Prior Transformer-based models adopt various self-attention mechanisms to discover the long-range dependencies. However, intricate temporal patterns of the long-term future prohibit the model from finding reliable dependencies. Also, Transformers have to adopt the sparse versions of point-wise self-attentions for long series efficiency, resulting in the information utilization bottleneck. Going beyond Transformers, we design Autoformer as a novel decomposition architecture with an Auto-Correlation mechanism. We break with the pre-processing convention of series decomposition and renovate it as a basic inner block of deep models. This design empowers Autoformer with progressive decomposition capacities for complex time series. Further, inspired by the stochastic process theory, we design the Auto-Correlation mechanism based on the series periodicity, which conducts the dependencies discovery and representation aggregation at the sub-series level. Auto-Correlation outperforms self-attention in both efficiency and accuracy. In long-term forecasting, Autoformer yields state-of-the-art accuracy, with a 38% relative improvement on six benchmarks, covering five practical applications: energy, traffic, economics, weather and disease. Code is available at this repository: https://github.com/thuml/Autoformer.

1 Introduction

Time series forecasting has been widely used in energy consumption, traffic and economics planning, weather and disease propagation forecasting. In these real-world applications, one pressing demand is to extend the forecast time into the far future, which is quite meaningful for the long-term planning and early warning. Thus, in this paper, we study the long-term forecasting problem of time series, characterizing itself by the large length of predicted time series. Recent deep forecasting models [48, 23, 26, 34, 29, 35, 25, 41] have achieved great progress, especially the Transformer-based models. Benefiting from the self-attention mechanism, Transformers obtain great advantage in modeling long-term dependencies for sequential data, which enables more powerful big models [8, 13].

However, the forecasting task is extremely challenging under the long-term setting. First, it is unreliable to discover the temporal dependencies directly from the long-term time series because the dependencies can be obscured by entangled temporal patterns. Second, canonical Transformers with self-attention mechanisms are computationally prohibitive for long-term forecasting because of the quadratic complexity of sequence length. Previous Transformer-based forecasting models [48, 23, 26] mainly focus on improving self-attention to a sparse version. While performance is significantly improved, these models still utilize the point-wise representation aggregation. Thus, in the process of efficiency improvement, they will sacrifice the information utilization because of the sparse point-wise connections, resulting in a bottleneck for long-term forecasting of time series.

To reason about the intricate temporal patterns, we try to take the idea of decomposition, which is a standard method in time series analysis [1, 33]. It can be used to process the complex time series and extract more predictable components. However, under the forecasting context, it can only be used as the pre-processing of past series because the future is unknown [20]. This common usage limits the capabilities of decomposition and overlooks the potential future interactions among decomposed components. Thus, we attempt to go beyond pre-processing usage of decomposition and propose a generic architecture to empower the deep forecasting models with immanent capacity of progressive decomposition. Further, decomposition can ravel out the entangled temporal patterns and highlight the inherent properties of time series [20]. Benefiting from this, we try to take advantage of the series periodicity to renovate the point-wise connection in self-attention. We observe that the sub-series at the same phase position among periods often present similar temporal processes. Thus, we try to construct a series-level connection based on the process similarity derived by series periodicity.

Based on the above motivations, we propose an original Autoformer in place of the Transformers for long-term time series forecasting. Autoformer still follows residual and encoder-decoder structure but renovates Transformer into a decomposition forecasting architecture. By embedding our proposed decomposition blocks as the inner operators, Autoformer can progressively separate the long-term trend information from predicted hidden variables. This design allows our model to alternately decompose and refine the intermediate results during the forecasting procedure. Inspired by the stochastic process theory [9, 30], Autoformer introduces an Auto-Correlation mechanism in place of self-attention, which discovers the sub-series similarity based on the series periodicity and aggregates similar sub-series from underlying periods. This series-wise mechanism achieves O(Llog⁡L)\mathcal{O}(L\log L) complexity for length-LL series and breaks the information utilization bottleneck by expanding the point-wise representation aggregation to sub-series level. Autoformer achieves the state-of-the-art accuracy on six benchmarks. The contributions are summarized as follows:

  • To tackle the intricate temporal patterns of the long-term future, we present Autoformer as a decomposition architecture and design the inner decomposition block to empower the deep forecasting model with immanent progressive decomposition capacity.
  • We propose an Auto-Correlation mechanism with dependencies discovery and information aggregation at the series level. Our mechanism is beyond previous self-attention family and can simultaneously benefit the computation efficiency and information utilization.
  • Autoformer achieves a 38% relative improvement under the long-term setting on six benchmarks, covering five real-world applications: energy, traffic, economics, weather and disease.

References (45)

  • Time-series
  • A spatio-temporal decomposition based deep neural network for time series forecasting
  • Neural machine translation by jointly learning to align and translate
  • An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling
  • Conditional time series forecasting with convolutional neural networks (opens arXiv in a new tab)
  • Time series analysis, forecasting and control
  • Some recent advances in forecasting and control
  • Language models are few-shot learners
  • Data-driven prediction of general hamiltonian dynamics via learning exactly-symplectic maps
  • The band pass filter
  • Normalizing kalman filters for multivariate time series analysis
  • Bert: Pre-training of deep bidirectional transformers for language understanding
  • Measuring predictability: theory and macroeconomic applications
  • An interactive web-based dashboard to track covid-19 in real time
  • An image is worth 16x16 words: Transformers for image recognition at scale
  • Long short-term memory
  • Postwar us business cycles: an empirical investigation
  • Music transformer
  • Forecasting: principles and practice
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift
  • Kingma and Jimmy Ba
  • Reformer: The efficient transformer
  • Deep rao-blackwellised particle filters for time series forecasting
  • Modeling long-and short-term temporal patterns with deep neural networks
  • Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting
  • Swin transformer: Hierarchical vision transformer using shifted windows
  • Deep factors with gaussian processes for forecasting (opens arXiv in a new tab)
  • N-BEATS: Neural basis expansion analysis for interpretable time series forecasting
  • Probability, random variables and stochastic processes
  • Gross, Francisco Massa, A. Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Z. Lin, N. Gimelshein, L. Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zach DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala
  • Deep state space models for time series forecasting
  • STL: A seasonal-trend decomposition procedure based on loess
  • DeepAR: Probabilistic forecasting with autoregressive recurrent networks
  • Think globally, act locally: A deep neural network approach to high-dimensional time series forecasting
  • Temporal pattern attention for multivariate time series forecasting
  • Attend and diagnose: Clinical time series analysis using attention models
  • Methodology for long-term prediction of time series
  • Forecasting at scale
  • Wavenet: A generative model for raw audio
  • Attention is all you need
  • A multi-horizon quantile recurrent forecaster
  • Adversarial sparse transformer for time series forecasting
  • A dual-stage attention-based recurrent neural network for time series prediction
  • Long-term forecasting using tensor-train rnns (opens arXiv in a new tab)
  • Informer: Beyond efficient transformer for long sequence time-series forecasting