TL;DR
This paper introduces DynaConF, a novel deep learning framework for time series forecasting that explicitly models non-stationary conditional distributions. By decoupling the time-invariant aspects of forecasting from the time-variant dynamics, DynaConF can adapt to changing patterns in data more effectively than existing methods, leading to improved accuracy on both synthetic and real-world datasets.
What Problem Does This Paper Address?
Traditional time series forecasting models, especially those based on deep learning, often implicitly assume that the statistical properties of the data (specifically, the conditional distribution of future values given past observations) remain constant over time. This assumption, known as stationarity, is frequently violated in real-world scenarios. For instance, user behavior on social media, energy consumption, or financial markets can exhibit shifts due to external events, new trends, or changing underlying dynamics. When these conditional distributions are non-stationary, existing models struggle to learn consistently and make accurate predictions, as they are not designed to adapt to these evolving patterns. This paper aims to address this critical limitation by developing a method that can dynamically model and adapt to these non-stationary conditional distributions.
Methods
The core innovation of DynaConF lies in its decoupled model architecture. It separates the problem into two main components:
- Stationary Conditional Distribution Modeling: This part, handled by a time-invariant neural network (e.g., an MLP or RNN), learns the fundamental relationship between past observations and future values. This is akin to learning a "base" forecasting model.
- Non-Stationary Dynamics Modeling: This component, a Bayesian dynamic model, captures how the conditional distribution changes over time. It uses a control variable that is modulated by a dynamic process, allowing for both continuous (random walk) and discontinuous (Bernoulli restarts) changes. This dynamic component effectively "tunes" the stationary model in real-time.
The method uses a Bayesian dynamic model to capture the time-varying nature of the conditional distribution. This model incorporates a latent variable that evolves over time, allowing it to adapt to new patterns. To handle the computational complexity of inferring these latent variables, the authors employ Rao-Blackwellized particle filters and a variational posterior approximation that can be efficiently trained with SGD. For multivariate time series, they leverage a factorized output space assumption, where each dimension of the target variable is conditionally independent given the learned context, which aids scalability.
Datasets
The paper evaluates DynaConF on a variety of datasets:
- Synthetic Datasets: Four synthetic time series were generated to specifically test non-stationarity. These include:
- AR(1)-Flip: An AR(1) process with coefficient resampling from a discrete uniform distribution every 100 steps.
- AR(1)-Dynamic: An AR(1) process with coefficient resampling from a continuous uniform distribution every 100 steps.
- AR(1)-Sin: An AR(1) process with a continuously changing coefficient following a sine wave.
- VAR(1)-Dynamic: A four-dimensional VAR(1) process with resampled coefficients.
- Real-World Datasets (Set 1): Six widely-used datasets were used, including:
- Exchange (daily exchange rates)
- Solar (hourly solar power production)
- Electricity (hourly electricity consumption)
- Traffic (hourly occupancy data)
- Taxi (30-minute ride data)
- Wikipedia (daily page views)
- Real-World Datasets (Set 2): Two additional datasets were used:
- Walmart (weekly sales)
- Temperature (monthly average temperatures)
Key Insights and Ideas
- Decoupling is Key: The fundamental insight is that explicitly separating the time-invariant forecasting logic from the time-variant dynamics is crucial for handling non-stationarity. This allows the model to learn robust base patterns while remaining flexible to changes.
- Bayesian Dynamics for Adaptation: Using a Bayesian dynamic model for the non-stationary component provides a principled way to model uncertainty and adapt to evolving data distributions. The random walk with Bernoulli restarts effectively captures both gradual and abrupt shifts.
- Scalability through Factorization: For multivariate time series, assuming conditional independence across output dimensions significantly improves computational efficiency without sacrificing performance.
- Qualitative Evidence of Adaptation: The qualitative results on the Electricity dataset vividly demonstrate DynaConF's ability to quickly adapt to a distribution shift, while its ablated counterpart (StatiConF) struggles, highlighting the impact of the dynamic component.
Key Results
- Superior Performance: DynaConF consistently outperforms its ablated version (StatiConF) and state-of-the-art baselines on both synthetic and real-world datasets, particularly when non-stationarity is present.
- Synthetic Data Wins: On synthetic datasets, DynaConF-PP achieved the best CRPS scores, outperforming its closest competitor DeepAR-10 by an average of 5.6% (CRPS) for univariate data and showing a 24.3% CRPS improvement over the best baseline (DeepVAR-160) for multivariate data.
- Real-World Competitiveness: On real-world datasets, DynaConF often achieved the best or near-best performance, demonstrating its robustness across diverse data types. It consistently performed competitively or better than its ablated counterpart, validating the dynamic modeling approach.
- Adaptation to Unseen Changes: The model showed remarkable ability to adapt to unseen changes in the conditional distribution at test time, even when trained on data up to a certain point.
Limitations and Future Work
- Posterior Complexity: The paper acknowledges that the variational posterior model's complexity scales with the length of the time series ($O(T)$), which can be challenging for extremely long time series.
- Observation Distribution Simplicity: The authors used a simple observation distribution family for efficient inference. However, they suggest that more complex distributions could potentially improve performance in certain scenarios.
Future work could involve developing more efficient variational posteriors and training algorithms that scale better to very long time series. Additionally, exploring more flexible inference algorithms and more complex observation distributions are promising directions.
Summary updated