Times2D: Multi-Period Decomposition and Derivative Mapping for General Time Series Forecasting

Reza Nematirad, Anil Pahwa, Balasubramaniam NatarajanAAAI 2025 · DOI

Introduction

Predicting the future of time series data—such as electricity demand, traffic flow, or stock prices—is inherently challenging due to the noisy and multi-layered nature of real-world signals. Traditional forecasting models typically treat time series as flat 1D sequences. However, 1D representations often struggle with three specific phenomena: multi-periodicity (overlapping cycles), sharp fluctuations (sudden spikes), and complex turning points (trend reversals). While some recent approaches have explored 2D transformations, they primarily focus on periodicity, often overlooking the fine-grained "shape" of changes within those periods.

The Times2D Framework

To address these limitations, we introduce Times2D, a novel forecasting framework that projects time series data into 2D space. The model decomposes the forecasting task into two specialized parallel branches: the Periodic Decomposition Block (PDB) and the First and Second Derivative Heatmaps (FSDH).

The Times2D architecture featuring the Periodic Decomposition Block (PDB) and First and Second Derivative Heatmaps (FSDH).

Periodic Decomposition Block (PDB)

The PDB utilizes a Fast Fourier Transform (FFT) to identify the top $k$ dominant frequencies in the input data. It then reshapes the 1D sequence into $k$ distinct 2D tensors. In this representation, one dimension captures the period (e.g., hour of the day) while the other captures the frequency (e.g., day of the week). This transformation enables the use of 2D convolutions and Multi-Head Self-Attention to capture dependencies that are distant in 1D but adjacent in 2D.

First and Second Derivative Heatmaps (FSDH)

To explicitly model sudden changes and trend reversals, Times2D calculates the first derivative (rate of change) and second derivative (acceleration). These are stacked into a 2D heatmap and processed through 2D convolutions. This allows the model to learn the underlying "physics" of the series, detecting not just current values but also how quickly they are changing and when they are likely to slow down or reverse.

Visualization of first and second derivative heatmaps used to capture sharp fluctuations and turning points.

Aggregation and Forecasting

The features extracted from both the periodic and derivative branches are fused in the Aggregation Forecasting Block (AFB) to produce the final prediction.

Key Insights

The core innovation of Times2D lies in its 2D mapping strategy. 2D kernels are naturally adept at capturing both "intra-period" variations (within a single cycle) and "inter-period" variations (across cycles) simultaneously. By explicitly providing the model with derivative "maps," Times2D gains a strong inductive bias for detecting abrupt rises, falls, and turning points that standard models often smooth over. Furthermore, by focusing only on dominant periods identified via FFT, the model remains computationally efficient, avoiding the overhead of processing noise.

Experimental Results

Times2D was evaluated on standard benchmarks, including the M4 dataset for short-term forecasting and the ETT suite, Traffic, and Weather datasets for long-term forecasting.

  • Accuracy: In long-term forecasting tasks, Times2D achieved an average reduction of 5% in Mean Squared Error (MSE) and 4% in Mean Absolute Error (MAE) compared to state-of-the-art models like PatchTST and N-HITS.
  • Performance Gains: On the ETTm2 dataset with a 720-step look-ahead, the model showed an 8% improvement in MSE over the next best competitor.
  • Efficiency: Despite its 2D operations, the model maintains a low memory footprint (approx. 4.3 GB RAM) and consistent processing times, making it more practical for resource-constrained environments than many heavy Transformer-based architectures.

Conclusion and Future Work

Times2D demonstrates that moving beyond 1D sequence modeling can significantly enhance forecasting accuracy for complex, multi-periodic data. Future research will focus on improving the model's ability to detect "black swan" events—extreme anomalies that deviate from historical patterns—and exploring how 2D mapping can adapt to "concept drift" in non-stationary data.

Summary updated

BibTeX
@inproceedings{nematirad2025times,
  author = {Reza Nematirad and Anil Pahwa and Balasubramaniam Natarajan},
  title = {{Times2D: Multi-Period Decomposition and Derivative Mapping for General Time Series Forecasting}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i18.34164},
}
Figure