Implicit Reasoning in Deep Time Series Forecasting

Willa Potosnak, Cristian Ignacio Challu, Mononito Goswami, Michał Wiliński, Nina Żukowska, Artur Dubrawski

TL;DR

This paper investigates whether deep time series forecasting models truly understand temporal dynamics or just memorize patterns. By designing novel out-of-distribution (OOD) tasks inspired by language model research, they find that some models, particularly linear, MLP-based, and patch-based Transformers, exhibit surprising reasoning capabilities beyond simple memorization.

What Problem Does This Paper Address?

The recent success of "foundation models" in time series forecasting (TSFM) has been impressive, showing strong zero-shot performance across diverse domains. However, a critical question remains: are these models genuinely learning the underlying temporal dynamics, or are they simply memorizing patterns from their vast training data? If it's the latter, it could lead to inefficient models and poor generalization to unseen, out-of-distribution (OOD) scenarios. This paper aims to bridge this gap by evaluating the implicit reasoning abilities of TSFMs, a concept well-studied in Natural Language Processing (NLP) but largely unexplored in time series.

Methods

The authors introduce a framework to assess implicit reasoning in TSFMs, inspired by similar work in NLP. They define three specific OOD tasks:

  • Composition: Models are trained on individual time series components (e.g., trend, seasonality) and then tested on their combinations (e.g., trend + seasonality).
  • Comparison: Models are trained on data generated by a set of function parameters and then tested on functions with slightly larger or smaller parameter values.
  • Inverse Search: Models are trained on composite time series and then tasked with forecasting the individual component series.

They generate synthetic datasets for these tasks, carefully separating training (in-distribution, ID) and testing (out-of-distribution, OOD) data. They then evaluate 13 different TSFM architectures, including linear models, MLPs, and various Transformer-based models, using Mean Absolute Error (MAE) as the primary metric.

Datasets

The paper uses synthetic datasets generated from predefined basis functions: linear functions with trends ($F_c$) and sinusoidal functions with amplitude, frequency, and baseline ($F_s$). The OOD tasks involve combinations of these functions ($F_{sc}$). Specifically:

  • Composition: Trained on $F_s \cup F_c$, tested on $F_{sc}$.
  • Comparison: Trained on a range of parameters for a function, tested on slightly shifted parameter ranges.
  • Inverse Search: Trained on $F_{sc}$, tested on $F_s \cup F_c$.

The synthetic data consists of 1200 samples per series, with the first 1000 used for training and the last 200 for evaluation.

Key Insights and Ideas

  • Beyond Memorization: The study suggests that some TSFMs possess implicit reasoning capabilities that go beyond simple pattern matching. This is evidenced by their ability to generalize to OOD scenarios in the carefully designed reasoning tasks.
  • Patching Power: Patch-based Transformer models, like PatchTST, show particular promise, demonstrating strong performance on composition tasks. This highlights the effectiveness of breaking down time series into smaller segments for processing.
  • Linear Models Still Shine: Surprisingly, simple linear models (like DLinear) often perform very well, especially on comparison tasks, indicating that complex architectures aren't always necessary for certain types of reasoning.
  • Hierarchical Architectures Matter: Models like NHITS, which employ hierarchical structures and signal decomposition, also show robust performance, suggesting that these architectural choices can be beneficial for generalization.
  • Limitations of Standard Metrics: The paper points out that traditional loss functions like MSE might not fully capture the quality of forecasts, especially in complex reasoning tasks. A model might achieve a good MAE but still produce unrealistic or simplistic predictions (e.g., a straight line).

Key Results

  • PatchTST Excels in Composition: PatchTST outperformed other Transformer models on addition and subtraction composition tasks.
  • DLinear Dominates Comparison: DLinear achieved the smallest MAE for comparison tasks.
  • NHITS Leads in Multiplication and Inverse Search: NHITS showed the best performance for multiplication composition and inverse search tasks.
  • Generalization Varies: While some models showed strong OOD generalization, others struggled, highlighting the diverse reasoning capabilities across different architectures. For instance, Table 2 shows DLinear and NHITS often leading in various tasks.

Limitations and Future Work

  • Synthetic Data Reliance: The study acknowledges that its findings are based on synthetic data, which may not fully capture the complexities of real-world time series. Future work could explore these reasoning tasks on real-world datasets.
  • Hyperparameter Consistency: To ensure fair comparison, consistent hyperparameters were used. Exploring the impact of different hyperparameter settings for each model could reveal further performance improvements.
  • Broader Impact: The authors believe this foundational research can guide the development of more efficient and robust TSFMs by understanding their reasoning abilities and limitations, preventing their misapplication in contexts where poor generalization is likely. Future work could also focus on developing better evaluation metrics that go beyond simple MAE.

Summary updated

BibTeX
@inproceedings{potosnak2024implicit,
  author = {Willa Potosnak and Cristian Ignacio Challu and Mononito Goswami and Michał Wiliński and Nina Żukowska and Artur Dubrawski},
  title = {{Implicit Reasoning in Deep Time Series Forecasting}},
  booktitle = {Sys2-Reasoning @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=CP39bvx3dW},
}
Figure