MG-TSD: Multi-Granularity Time Series Diffusion Models with Guided Learning Process

Xinyao Fan, Yueying Wu, Chang Xu, Yuhao Huang, Weiqing Liu, Jiang Bian

Diffusion models have taken the generative world by storm, but applying them to the precise, often volatile world of time series forecasting hasn't been a slam dunk. While they are excellent at generating realistic samples, their inherent stochasticity can lead to unstable predictions. At ICLR 2024, researchers introduced MG-TSD (Multi-Granularity Time Series Diffusion), a framework that stabilizes these models by teaching them to see the "big picture" before sweating the small stuff.

Executive Summary

MG-TSD improves time series forecasting by using coarse-grained versions of data (like hourly or daily averages) to guide the intermediate steps of a diffusion model. By aligning the process of "smoothing" data with the process of "noising" it, the model learns to recover macro-trends first and fine-grained details later, leading to state-of-the-art accuracy across major benchmarks.

The Challenge of Probabilistic Forecasting

Probabilistic time series forecasting aims to predict not just a single value, but a distribution of possible futures. Diffusion models are a natural fit here because they learn to transform white noise into complex data distributions through an iterative denoising process.

However, diffusion models face a stability problem in forecasting. Because the denoising process is stochastic, the model can sometimes wander into low-density regions of the data manifold, resulting in low-fidelity samples that don't respect the underlying trend of the series. While techniques like classifier guidance exist to keep diffusion models on track, they require external labels, which are rarely available for raw sensor data or financial tickers.

The authors ask: Can we guide the diffusion process using only the internal structure of the time series itself?

The Smoothing-Noising Duality

Methods: The MG-TSD Architecture

The core innovation of MG-TSD is the Guided Diffusion Process Module. It relies on a clever observation: the forward process of a diffusion model (gradually adding noise until the signal is gone) is conceptually very similar to the process of smoothing a time series (averaging data points until the fine details are gone).

MG-TSD Architecture

The architecture consists of three main parts:

  1. Multi-granularity Data Generator: This takes the original fine-grained data (e.g., 1-hour intervals) and creates coarse-grained versions (e.g., 4-hour, 12-hour, and 24-hour averages).
  2. Temporal Process Module (TPM): A set of GRU-based RNNs that learn the temporal dependencies for each granularity level separately.
  3. Guided Diffusion: During training, the model is forced to treat these coarse-grained versions as targets for specific intermediate steps in the diffusion process. For example, at diffusion step 50 (out of 100), the model might be trained to reconstruct the 12-hour averaged version of the data.

By setting these checkpoints, the model learns a regularized sampling path. It first learns to generate the broad trends (coarse features) and then gradually fills in the high-frequency fluctuations (fine features) as it approaches the final denoising step.

Key Insights and Ideas

  • The Smoothing-Noising Duality: Both smoothing and noising result in a gradual loss of fine distribution features. By mapping a specific granularity to a specific diffusion step, the authors provide a roadmap for the model to follow.
  • Self-Guidance: Unlike previous guided diffusion methods, MG-TSD is entirely self-supervised. It doesn't need external labels; it just needs to look at the same data through different lenses of time.
  • Hierarchical Inductive Bias: By forcing the model to hit coarse targets mid-way, the authors introduce an inductive bias that prioritizes structural trends (like seasonality and cycles) over local noise.

Key Results

The researchers evaluated MG-TSD on six diverse, real-world datasets (Solar, Electricity, Traffic, Taxi, KDD-cup, and Wikipedia). MG-TSD achieved State-of-the-Art (SOTA) results across all six datasets, measured primarily by the Continuous Ranked Probability Score (CRPS), which evaluates the quality of the predicted distribution.

  • Accuracy Boost: On the Solar dataset, MG-TSD achieved a CRPS of 0.3081, significantly outperforming the previous leading diffusion-based model, TimeGrad (0.3335).
  • Peak Capture: Qualitative analysis shows that while standard models like TimeGrad often underestimate sharp peaks (like solar energy spikes at noon), MG-TSD captures them much more accurately because the coarse guidance keeps the macro energy levels in check.
  • Robustness: The model showed particular strength in long-term forecasting, maintaining stable performance even as the prediction horizon extended to 144 time steps.

Limitations and Future Work

  • Diminishing Returns: The authors found that adding more than 4 or 5 levels of granularity provides marginal benefits while increasing computational cost.
  • Hyperparameter Sensitivity: Choosing which granularity maps to which diffusion step currently requires a heuristic approach or a pre-training step to find the minimum distance between distributions.
  • Computational Overhead: While the increase in memory and time is linear with respect to the number of granularities, it still makes the model heavier than a standard single-scale diffusion model.

In summary, MG-TSD provides a principled way to tame the stochasticity of diffusion models for time series, making them more reliable for critical applications like energy planning and traffic management.

Summary updated

BibTeX
@inproceedings{fan2024mg,
  author = {Xinyao Fan and Yueying Wu and Chang Xu and Yuhao Huang and Weiqing Liu and Jiang Bian},
  title = {{MG-TSD: Multi-Granularity Time Series Diffusion Models with Guided Learning Process}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=CZiY6OLktd},
}
Figure