Abstract
Multivariate time series prediction has attracted a lot of attention because of its wide applications such as intelligence transportation, AIOps. Generative models have achieved impressive results in time series modeling because they can model data distribution and take noise into consideration. However, many existing works can not be widely used because of the constraints of functional form of generative models or the sensitivity to hyperparameters. In this paper, we propose ScoreGrad, a multivariate probabilistic time series forecasting framework based on continuous energy-based generative models. ScoreGrad is composed of time series feature extraction module and conditional stochastic differential equation based score matching module. The prediction can be achieved by iteratively solving reverse-time SDE. To the best of our knowledge, ScoreGrad is the first continuous energy based generative model used for time series forecasting. Furthermore, ScoreGrad achieves state-of-the-art results on six real-world datasets. The impact of hyperparameters and sampler types on the performance are also explored. Code is available at https://github.com/yantijin/ScoreGradPred.
Introduction
Predicting multivariate time series—such as traffic flow across a city or power consumption across a grid—is a fundamental challenge in modern data science. Models must capture both complex temporal dependencies and the intricate correlations between multiple variables. While generative models like Variational Autoencoders (VAEs) and Normalizing Flows have been applied to this task, they often suffer from rigid architectural constraints.
Recently, Denoising Diffusion Probabilistic Models (DDPM) have shown great promise in time series forecasting. However, DDPMs are discrete; they rely on a fixed number of noise-injection steps and are highly sensitive to the specific noise schedule used during training. ScoreGrad addresses these limitations by treating the diffusion process as a continuous-time evolution using stochastic differential equations (SDEs), offering a more general, flexible, and robust framework.
Methodology
ScoreGrad consists of two primary modules that operate at each time step to generate probabilistic forecasts:
- Time Series Feature Extraction: A sequential module, typically a Gated Recurrent Unit (GRU), processes historical data and known covariates (e.g., time-of-day) to create a context vector $F_t$.
- Conditional SDE-based Score Matching: ScoreGrad uses an SDE to transform the data distribution into a known noise distribution (the forward process). To generate a forecast, the model learns to solve the reverse-time SDE.
The heart of the model is a score network—a 1D-CNN architecture inspired by WaveNet—that estimates the gradient of the log-density of the data conditioned on $F_t$. The framework supports various SDE types, including Variance Exploding (VE), Variance Preserving (VP), and sub-VP SDEs.
During inference, the model employs numerical solvers (e.g., Euler-Maruyama) as predictors and Langevin dynamics as correctors to iteratively refine predicted values from pure noise.
Experimental Results and Insights
ScoreGrad was evaluated on six real-world benchmarks: Exchange, Solar, Electricity, Traffic, Taxi, and Wikipedia. It achieved state-of-the-art (SOTA) results on 5 out of 6 datasets, measured by the Continuous Ranked Probability Score (CRPS).
Key Insights
- Generalization of Diffusion: The authors demonstrate that discrete models like DDPM are specific discretizations of the VP SDE. By moving to a continuous framework, ScoreGrad generalizes previous diffusion-based forecasting methods.
- Robustness to Sampling Steps: Unlike discrete models whose performance can degrade if the number of steps is altered, ScoreGrad remains stable across a wide range of sampling steps.
- Superiority of sub-VP SDEs: The sub-VP SDE variant often yields the best performance. Its variance is upper-bounded by the standard VP SDE, leading to more stable and accurate score estimation, particularly in high-dimensional spaces like the Taxi and Wikipedia datasets (>1000 dimensions).
Conclusion
ScoreGrad represents a significant advancement in multivariate time series forecasting by leveraging continuous-time generative models. While computationally intensive during sampling, its robustness to hyperparameters and superior performance on high-dimensional datasets make it a powerful tool. Future work may involve integrating more advanced feature extractors like Transformers and exploring training objectives more closely aligned with evaluation metrics like CRPS.
Summary updated