Skip to main content
QUICK REVIEW

[Paper Review] First De-Trend then Attend: Rethinking Attention for Time-Series Forecasting

Xiyuan Zhang, Xiao-Yong Jin|arXiv (Cornell University)|Dec 15, 2022
Time Series Analysis and ForecastingComputer Science22 citations
TL;DR

TDformer decomposes time series into trend and seasonality, uses an MLP for the trend and Fourier-domain attention for the seasonality, achieving state-of-the-art forecasting performance.

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.

Motivation & Objective

  • Understand whether attention learned in time, Fourier, or wavelet domains have equivalent representation power under linear conditions.
  • Empirically analyze how softmax normalization affects attention across seasonality, trend, and noise.
  • Motivate and design a hybrid model that leverages domain-specific strengths for forecasting.
  • Demonstrate that decomposing data into trend and seasonality improves attention-based forecasting performance.

Proposed method

  • Theoretically prove linear equivalence of time, Fourier, and wavelet attention under linear attention.
  • Empirically analyze attention behavior in synthetic data with seasonality, trend, and spikes to isolate softmax effects.
  • Propose TDformer which decomposes the input into trend and seasonal parts, predicts trend with an MLP, and seasonal part with Fourier attention, then sums the components.
  • Apply seasonal-trend decomposition using multiple average filters and adaptive weights, plus RevIN normalization, before the trend predictor.
  • Use Fourier attention in the seasonal encoder/decoder blocks for forecasting the seasonal component.
  • Optimize with reconstruction MSE loss on future time series.

Experimental results

Research questions

  • RQ1Do time-domain, Fourier-domain, and wavelet-domain attention mechanisms have equivalent representation power under linear conditions?
  • RQ2How does the softmax normalization impact the empirical behavior of attention in different domains?
  • RQ3Can decomposing a time series into trend and seasonality improve the effectiveness of attention-based forecasting?
  • RQ4Does combining a trend-oriented MLP with Fourier attention for seasonality yield superior forecasting performance?

Key findings

  • Under linear conditions, time, Fourier, and wavelet attention are theoretically equivalent.
  • Softmax normalization causes empirical performance differences between domains across seasonality, trend, and noise.
  • Fourier-domain attention is sample-efficient for strong seasonality, while trend data generalizes poorly to attention alone.
  • A decomposition-based hybrid model (TDformer) that uses an MLP for trend and Fourier attention for seasonality achieves state-of-the-art results on benchmark datasets.
  • RevIN normalization and explicit seasonal-trend decomposition contribute to performance and robustness in TDformer.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.