Skip to main content
QUICK REVIEW

[Paper Review] Triformer: Triangular, Variable-Specific Attentions for Long Sequence Multivariate Time Series Forecasting--Full Version

Razvan-Gabriel Cirstea, Chenjuan Guo|arXiv (Cornell University)|Apr 28, 2022
Time Series Analysis and ForecastingComputer Science18 citations
TL;DR

Triformer proposes a triangular, variable-specific attention mechanism for long sequence multivariate time series forecasting, achieving linear complexity through patch-based attention with shrinking layer sizes and enabling variable-specific modeling via compact, lightweight parameter factorization. It outperforms state-of-the-art methods in both accuracy and efficiency across four diverse datasets.

ABSTRACT

A variety of real-world applications rely on far future information to make decisions, thus calling for efficient and accurate long sequence multivariate time series forecasting. While recent attention-based forecasting models show strong abilities in capturing long-term dependencies, they still suffer from two key limitations. First, canonical self attention has a quadratic complexity w.r.t. the input time series length, thus falling short in efficiency. Second, different variables' time series often have distinct temporal dynamics, which existing studies fail to capture, as they use the same model parameter space, e.g., projection matrices, for all variables' time series, thus falling short in accuracy. To ensure high efficiency and accuracy, we propose Triformer, a triangular, variable-specific attention. (i) Linear complexity: we introduce a novel patch attention with linear complexity. When stacking multiple layers of the patch attentions, a triangular structure is proposed such that the layer sizes shrink exponentially, thus maintaining linear complexity. (ii) Variable-specific parameters: we propose a light-weight method to enable distinct sets of model parameters for different variables' time series to enhance accuracy without compromising efficiency and memory usage. Strong empirical evidence on four datasets from multiple domains justifies our design choices, and it demonstrates that Triformer outperforms state-of-the-art methods w.r.t. both accuracy and efficiency. This is an extended version of "Triformer: Triangular, Variable-Specific Attentions for Long Sequence Multivariate Time Series Forecasting", to appear in IJCAI 2022 [Cirstea et al., 2022a], including additional experimental results.

Motivation & Objective

  • To address the quadratic complexity of standard self-attention in long sequence forecasting.
  • To improve forecasting accuracy by modeling distinct temporal dynamics across different variables in multivariate time series.
  • To maintain high efficiency and low memory usage while enabling variable-specific modeling.
  • To design a scalable architecture suitable for long-horizon forecasting in real-world applications.
  • To empirically validate the effectiveness of triangular attention and variable-specific parameters across diverse domains.

Proposed method

  • Introduces Patch Attention (PA), a novel attention mechanism that computes attention only between timestamps within a patch and a single pseudo-timestamp, achieving linear complexity per patch.
  • Constructs a triangular, multi-layer architecture where each subsequent layer processes only the pseudo-timestamps from the prior layer, causing input sizes to shrink exponentially and preserving overall linear complexity.
  • Proposes a lightweight parameter factorization method: projection matrices are decomposed into shared (variable-agnostic) and compact, variable-specific components to capture unique temporal patterns without increasing computational overhead.
  • Employs a fully connected neural network as a predictor, enhancing training efficiency compared to recurrent or autoregressive decoders.
  • Uses t-SNE visualization to analyze learned memory representations, demonstrating that variable-specific memories cluster according to temporal similarity.
  • Introduces a generator-based approach to decouple learnable pseudo-timestamps from input length, enabling dynamic input size support in future extensions.

Experimental results

Research questions

  • RQ1Can a triangular, multi-layer attention mechanism maintain linear complexity while effectively modeling long-range dependencies in multivariate time series?
  • RQ2Does enabling variable-specific attention parameters improve forecasting accuracy compared to shared, variable-agnostic parameters?
  • RQ3How does the proposed method scale with increasing sequence length and number of variables in terms of both accuracy and training efficiency?
  • RQ4To what extent do the learned attention memories reflect the true underlying temporal patterns of individual variables?
  • RQ5Can the model generalize across different input lengths and forecasting horizons without retraining?

Key findings

  • Triformer achieves linear complexity O(H) through its triangular architecture, making it significantly more efficient than quadratic models like standard self-attention.
  • On the ECL dataset, Triformer achieves an MSE of 0.183 and MAE of 0.279, outperforming all baselines in accuracy while maintaining fast training speeds.
  • Training runtime analysis shows Triformer remains stable as sequence length H increases, outperforming methods like StemGNN and AGCRN, which scale poorly with longer sequences.
  • The model's inference time is under 13.3 ms per sample across all methods, confirming real-time applicability.
  • t-SNE visualization confirms that learned memory representations cluster by temporal similarity, validating the model's ability to capture distinct patterns per variable.
  • Ablation studies show that a=5 provides optimal balance between expressiveness and efficiency, with further increases in a not improving performance.

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.