TimeLDM: Latent Diffusion Model for Unconditional Time Series Generation

Jian Qian, Miao Sun, Sifan Zhou, Biao Wan, Minhao Li, Patrick ChiangarXiv 2024 · DOI

Abstract

TimeLDM is a novel generative framework that applies Latent Diffusion Models (LDMs) to unconditional time series generation. By first encoding noisy time series into a smooth latent space using a specialized Variational Autoencoder (VAE) and then performing diffusion in that space, the model achieves state-of-the-art results. Experimental evaluations show a 55% average improvement in discriminative scores over existing methods and superior qualitative alignment with original data distributions.

Introduction

Generating realistic synthetic time series is a critical challenge in fields such as robotics, autonomous driving, and healthcare, where real-world data is often scarce, noisy, or restricted by privacy regulations. While Diffusion Models have revolutionized image generation, their application to time series has been hindered by the high-frequency noise and limited information density of raw data space observations. TimeLDM addresses this by operating in a compressed, informative latent space rather than directly on raw, noisy data.

Methodology

TimeLDM adopts a two-stage architecture inspired by the success of Latent Diffusion Models in computer vision.

The Variational Autoencoder (VAE) Stage

The first stage utilizes a Transformer-based VAE to map raw time series into a smoothed latent space. To optimize this mapping, the authors introduced two key innovations:

  • Adaptive $\beta$: A weighting coefficient that balances reconstruction loss and KL-divergence to prevent "posterior collapse."
  • Frequency Domain Loss: By incorporating a Fast Fourier Transform (FFT) loss, the model is forced to capture periodic patterns and seasonality, moving beyond simple point-to-point $L_1/L_2$ norms.

The Latent Diffusion Stage

Once the latent space is established, a diffusion model—utilizing a denoising MLP—is trained to generate new latent vectors. This process is more stable and effective because the latent space is more compact and less noisy than the raw data. During inference, the LDM generates a latent vector, which the VAE decoder translates back into a high-fidelity time series.

The overall architecture of TimeLDM, illustrating the pipeline from raw time series to latent space diffusion and back to generated samples.

Experimental Results

The researchers evaluated TimeLDM across five diverse benchmarks: Sine (simulated), MuJoCo (physics simulation), Stocks (Google stock prices), ETTh (electricity transformer data), and fMRI (causal discovery simulation).

TimeLDM consistently outperformed state-of-the-art baselines like Diffusion-TS, TimeGAN, and TimeVAE:

  • Discriminative Score: The model achieved an average 55% improvement across all benchmarks, indicating that synthetic samples are significantly harder for classifiers to distinguish from real data.
  • Context-FID: On the ETTh dataset, TimeLDM realized an 80% improvement, showing that generated samples are much closer to the real data distribution.
  • Qualitative Overlap: t-SNE visualizations demonstrate that TimeLDM’s generated data points overlap almost perfectly with the original data, whereas older methods like TimeVAE often produce misaligned or "clumpy" distributions.
t-SNE visualizations comparing TimeLDM (left) and TimeVAE (right). TimeLDM shows superior overlap with the original data distribution (red), while TimeVAE fails to capture the full structural dynamics.

Discussion and Future Work

A key insight of this work is that the latent space provides a superior "playground" for diffusion models, allowing them to focus on structural dynamics rather than raw noise. Furthermore, the inclusion of frequency-domain loss is essential for datasets with strong seasonality. While TimeLDM excels at unconditional generation and maintains performance across long sequence lengths, future work will explore conditional generation—such as trend-specific forecasting. The authors envision TimeLDM as a foundation for "physical AI," providing high-quality synthetic data for agents to learn in simulated environments.

Summary updated

BibTeX
@misc{qian2024timeldm,
  author = {Jian Qian and Miao Sun and Sifan Zhou and Biao Wan and Minhao Li and Patrick Chiang},
  title = {{TimeLDM: Latent Diffusion Model for Unconditional Time Series Generation}},
  year = {2024},
  eprint = {2407.04211},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.04211},
}
Figure