Skip to main content
QUICK REVIEW

[Paper Review] Timer-XL: Long-Context Transformers for Unified Time Series Forecasting

Yong Liu, Qin Guo|arXiv (Cornell University)|Oct 7, 2024
Time Series Analysis and ForecastingComputer Science4 citations
TL;DR

Timer-XL proposes a unified, generative Transformer framework for long-context time series forecasting by introducing multivariate next token prediction and a novel TimeAttention mechanism that captures causal, inter- and intra-series dependencies with dual temporal-variable position embeddings. It achieves state-of-the-art performance across univariate, multivariate, and covariate-informed forecasting benchmarks with context lengths up to thousands of tokens, demonstrating strong generalization and contextual flexibility.

ABSTRACT

We present Timer-XL, a causal Transformer for unified time series forecasting. To uniformly predict multidimensional time series, we generalize next token prediction, predominantly adopted for 1D token sequences, to multivariate next token prediction. The paradigm formulates various forecasting tasks as a long-context prediction problem. We opt for decoder-only Transformers that capture causal dependencies from varying-length contexts for unified forecasting, making predictions on non-stationary univariate time series, multivariate series with complicated dynamics and correlations, as well as covariate-informed contexts that include exogenous variables. Technically, we propose a universal TimeAttention to capture fine-grained intra- and inter-series dependencies of flattened time series tokens (patches), which is further enhanced by deft position embedding for temporal causality and variable equivalence. Timer-XL achieves state-of-the-art performance across task-specific forecasting benchmarks through a unified approach. Based on large-scale pre-training, Timer-XL achieves state-of-the-art zero-shot performance, making it a promising architecture for pre-trained time series models. Code is available at this repository: https://github.com/thuml/Timer-XL.

Motivation & Objective

  • To address the context bottleneck in existing time series Transformers, which typically operate on limited contexts of up to hundreds of tokens, restricting their ability to model global trends and non-stationarity.
  • To unify diverse forecasting scenarios—univariate, multivariate, and covariate-informed—into a single long-context generation framework using multivariate next token prediction.
  • To enable generative Transformers to effectively model fine-grained intra- and inter-series dependencies while preserving causality and contextual flexibility across variable-length inputs.
  • To develop a scalable, one-for-all forecasting foundation model capable of large-scale pre-training and transfer learning across diverse time series dynamics and datasets.

Proposed method

  • Propose multivariate next token prediction as a unified paradigm, framing all forecasting tasks as autoregressive generation over flattened time series patches.
  • Introduce TimeAttention, a causal self-attention mechanism with learnable masking and relative position embeddings in both temporal and variable dimensions to model cross-series dependencies while maintaining causality.
  • Integrate relative positional embeddings for both time points and variables to enhance chronological and variable-aware modeling without modifying the standard self-attention mechanism.
  • Design Timer-XL as an extra-long-context extension of the Timer model, trained with large-scale pre-training to enable strong generalization and transferability.
  • Utilize a decoder-only Transformer architecture to maintain the contextual flexibility of generative models, allowing inference on arbitrary input and output lengths.
  • Apply iterative autoregressive generation for long-horizon forecasting, with careful handling of error accumulation through architectural and training innovations.

Experimental results

Research questions

  • RQ1Can a unified generative Transformer framework effectively handle diverse time series forecasting tasks, including univariate, multivariate, and covariate-informed scenarios, under a single paradigm?
  • RQ2How does extending context length to thousands of tokens improve forecasting performance on non-stationary and high-dimensional time series?
  • RQ3To what extent does the proposed TimeAttention mechanism enhance modeling of intra- and inter-series dependencies compared to standard attention or prior approaches?
  • RQ4Does a large-scale pre-trained generative Transformer with long-context capability generalize effectively across diverse datasets and temporal dynamics?
  • RQ5What are the limitations of autoregressive generation in long-context time series forecasting, and how can they be mitigated?

Key findings

  • Timer-XL achieves state-of-the-art performance across multiple benchmarks, including ETTh1, ETTh2, ETTm1, ETTm2, Weather, Solar-Energy, and Traffic, with significant improvements in MAE and RMSE across all context lengths.
  • On the ETTm1 dataset, Timer-XL achieves an MAE of 0.164 and RMSE of 0.258 at a context length of 720, outperforming prior methods across all evaluated context lengths.
  • The model achieves a 1st place count of 19 on the ETTm1 benchmark and 17 on ETTm2, indicating strong generalization and robustness across datasets.
  • Timer-XL demonstrates notable model transferability through large-scale pre-training, enabling strong few-shot and zero-shot performance on unseen time series.
  • The model maintains high performance across diverse context lengths (96 to 720 tokens), confirming its contextual flexibility and suitability as a one-for-all forecaster.
  • Extensive ablation studies confirm that TimeAttention with dual position embeddings significantly improves performance over standard attention and baseline models, especially in capturing inter-series correlations.

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.