Abstract
Time series forecasting is often fundamental to scientific and engineering problems and enables decision making. With ever increasing data set sizes, a trivial solution to scale up predictions is to assume independence between interacting time series. However, modeling statistical dependencies can improve accuracy and enable analysis of interaction effects. Deep learning methods are well suited for this problem, but multivariate models often assume a simple parametric distribution and do not scale to high dimensions. In this work we model the multivariate temporal dynamics of time series via an autoregressive deep learning model, where the data distribution is represented by a conditioned normalizing flow. This combination retains the power of autoregressive models, such as good performance in extrapolation into the future, with the flexibility of flows as a general purpose high-dimensional distribution model, while remaining computationally tractable. We show that it improves over the state-of-the-art for standard metrics on many real-world data sets with several thousand interacting time-series.
Introduction
Predicting the future is inherently difficult, particularly when dealing with thousands of interconnected variables. In many real-world scenarios—such as retail sales, traffic patterns, or energy consumption—variables are rarely independent. A sale on one product might cannibalize another, or a traffic incident on one street might cause ripples across a city. Capturing these multivariate interactions is crucial for accurate forecasting.
However, traditional multivariate models face two major hurdles. First, they often rely on simplistic Gaussian assumptions that fail to capture the non-linear, "messy" nature of real-world data. Second, modeling the joint relationship between thousands of variables typically leads to computational complexity that scales poorly ($O(D^2)$ or worse), making them impractical for large-scale datasets.
Methodology
The researchers address these challenges by introducing Conditioned Normalizing Flows. This framework decouples the temporal dynamics from the distribution modeling:
- Temporal Engine: An autoregressive model, such as an RNN (LSTM/GRU) or a Transformer, processes the historical data to produce a hidden state ($h_t$). This state serves as a summary of all past information.
- Distribution Engine (Normalizing Flows): Instead of outputting simple parameters like mean and variance, the model employs a Normalizing Flow (e.g., Real NVP or Masked Autoregressive Flows). The flow transforms a simple base distribution into a complex one through a series of trainable, invertible mappings.
- Conditioning: The parameters of the flow transformations are conditioned on the hidden state from the temporal engine. This allows the model to adapt the predicted distribution dynamically based on the observed history.
Experiments and Results
The model was rigorously tested on six real-world datasets (Exchange, Solar, Electricity, Traffic, Taxi, and Wikipedia) and a simulated "System of Pipes" experiment.
The results demonstrated that the Transformer-MAF and LSTM-MAF variants consistently achieved state-of-the-art performance, outperforming competitive baselines like Gaussian Copula Processes across all benchmarks. Notably, Masked Autoregressive Flows (MAF) generally outperformed Real NVP, suggesting that more expressive density models yield better forecasting accuracy.
In the simulated pipe experiment, the model successfully recovered the underlying physical structure of the system solely from the data. By accurately capturing the correlations between sensors and valves, the model proved its ability to learn complex spatial-temporal dependencies.
Discussion and Conclusion
A key advantage of this approach is its scalability. By utilizing the Transformer-MAF variant, the model achieves a complexity of $O(T^2D)$, which is significantly more efficient than traditional RNN-based multivariate models when the number of series ($D$) is large. Furthermore, the use of normalizing flows removes the need for restrictive Gaussian assumptions, allowing the model to learn skewed or multimodal distributions directly from the data.
Future work may involve exploring even more expressive flow architectures, such as Flow++, or developing more sophisticated conditioning mechanisms to further enhance the model's ability to handle high-dimensional, discrete, or ordinal data.
Summary updated