Memory Augmented State Space Model for Time Series Forecasting

Yinbo Sun, Lintao Ma, Yu Liu, Shijun Wang, James Zhang, Yangfei Zheng, Hu Yun, Lei Lei, Yulin Kang, Llinbao YeIJCAI 2022

Abstract

State space model (SSM) provides a general and flexible forecasting framework for time series. Conventional SSM with fixed-order Markovian assumption often falls short in handling the long-range temporal dependencies and/or highly non-linear correlation in time-series data, which is crucial for accurate forecasting. To this extent, we present External Memory Augmented State Space Model (EMSSM) within the sequential Monte Carlo (SMC) framework. Unlike the common fixed-order Markovian SSM, our model features an external memory system, in which we store informative latent state experience, whereby to create "memoryful" latent dynamics modeling complex long-term dependencies. Moreover, conditional normalizing flows are incorporated in our emission model, enabling the adaptation to a broad class of underlying data distributions. We further propose a Monte Carlo Objective that employs an efficient variational proposal distribution, which fuses the filtering and the dynamic prior information, to approximate the posterior state with proper particles. Our results demonstrate the competitiveness of forecasting performance of our proposed model comparing with other state-of-the-art SSMs.

Introduction

Traditional State Space Models (SSMs) are powerful generative frameworks for time series, but they usually rely on a fixed-order Markovian assumption. This assumes the future only depends on the present latent state, which is often insufficient for real-world data exhibiting long-range dependencies or highly non-linear correlations. While internal memory structures like LSTMs or GRUs can track history, they have finite capacity and are prone to forgetting over long sequences. The External Memory Augmented State Space Model (EMSSM) addresses this "Markovian bottleneck" by explicitly storing and querying past experiences to inform current predictions.

Methodology

The EMSSM integrates three core components to enhance temporal modeling:

  1. Dual Memory Architecture: The model utilizes a standard GRU for short-term context (Internal Memory) alongside a key-value storage system (External Memory). The external memory stores past states and features as keys and their subsequent transitions as values. This allows the model to retrieve similar historical transitions when encountering new situations.
  2. Variational Sequential Monte Carlo (VSMC): Instead of point estimates, EMSSM uses stochastic particles to represent the posterior distribution of latent states, improving robustness to uncertainty. The weighted average of these particles is stored in the external memory to maintain computational efficiency.
  3. Conditional Normalizing Flows (CNF): To move beyond simple Gaussian assumptions, CNFs are used in the emission layer, allowing the model to capture complex, multi-modal data distributions.
Architecture of EMSSM and the External Memory mechanism.

Experimental Evaluation

The model was evaluated on five public benchmarks: Exchange, Solar, Electricity, Traffic, and Wiki. These datasets cover various seasonal patterns and data distributions.

Key Results

EMSSM achieved state-of-the-art performance, recording the lowest Continuous Ranked Probability Score (CRPS) on four out of five datasets. It showed significant improvements on high-dimensional and complex datasets like Traffic and Wiki.

A critical observation is the model's ability to reduce Kullback-Leibler (KL) divergence more effectively than baselines. This indicates that the external memory acts as a non-parametric prior, helping the model learn more meaningful temporal patterns rather than just reacting to noise.

KL Divergence comparison across Wiki, Solar, and Traffic datasets.

Conclusion

EMSSM successfully breaks the Markovian bottleneck in time series forecasting. By leveraging an external memory buffer and normalizing flows within a variational SMC framework, it achieves superior accuracy and faster convergence. Future work will focus on optimizing memory management and scaling to even longer sequences.

Summary updated

BibTeX
@inproceedings{sun2022memory,
  author = {Yinbo Sun and Lintao Ma and Yu Liu and Shijun Wang and James Zhang and Yangfei Zheng and Hu Yun and Lei Lei and Yulin Kang and Llinbao Ye},
  title = {{Memory Augmented State Space Model for Time Series Forecasting}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=5hfrOuKJBP},
}
Figure