TL;DR
This paper introduces TSGM (Time-series Generation using conditional Score-based generative Model), the first framework to adapt score-based generative models—the tech behind DALL-E and Stable Diffusion—specifically for time-series synthesis. By combining an RNN-based autoencoder with a novel conditional score matching loss, TSGM achieves state-of-the-art results in generating high-quality, diverse synthetic time-series data, outperforming traditional GAN and VAE approaches.
What Problem Does This Paper Address?
Time-series data is ubiquitous (think stock prices, sensor logs, or climate data), but it is often difficult to work with due to privacy concerns, missing values, or simply a lack of sufficient samples for training robust machine learning models. While Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs) have been used to synthesize data, they often struggle with "mode collapse" (producing repetitive, non-diverse samples) or unstable training.
Score-based generative models (SGMs) have recently revolutionized image and voice synthesis by learning to "reverse" a noise-injection process. However, existing time-series SGMs were limited to forecasting (predicting the future) or imputation (filling in gaps). This paper tackles the more complex task of regular generation: creating entirely new, realistic sequences from scratch while maintaining the temporal dependencies inherent in the data.
Methods
The authors propose a three-part architecture called TSGM:
- Encoder and Decoder: An RNN-based autoencoder maps raw time-series data into a latent space ($H$). This allows the model to capture temporal structures like trends and seasonality more effectively than working in the raw data space.
- Conditional Score Network: The heart of the model is a modified U-Net architecture. Unlike image-based U-Nets, this version uses 1D convolutions to handle sequential data. It learns the "score function"—the gradient of the log-likelihood—conditioned on previously generated observations.
- Recurrent Denoising Score Matching: The authors derive a new loss function specifically for time-series. Because each observation $x_t$ depends on its history $x_{1:t-1}$, the standard SGM loss doesn't quite fit. The authors prove a new theorem (Theorem 1) that allows for efficient training by matching the score of the conditional distribution.
The workflow involves pre-training the autoencoder, then training the score network in the latent space. During sampling, the model uses a "predictor-corrector" method to recursively generate latent vectors, which are then transformed back into raw data by the decoder.
Datasets
The model was evaluated on five diverse, real-world datasets:
- Stocks: Google stock data (6 features).
- Energy: Appliance energy use (28 features).
- Air: Hourly air quality records (13 features).
- AI4I: Predictive maintenance sensor data (5 features).
- Occupancy: Room occupancy estimation (13 features).
Key Insights and Ideas
- Recurrence is Key: Unlike images, where pixels are generated somewhat independently, time-series generation is inherently recursive. TSGM treats the generation of each time step as a conditional sampling problem based on the generated history.
- Latent Space Advantage: By performing the diffusion process in a latent space rather than the raw data space, the model can better handle the complex, multi-dimensional correlations found in time-series data.
- Mathematical Rigor: The derivation of a specific denoising score matching loss for recurrent sequences is a significant theoretical contribution, ensuring that the score network is actually learning the correct conditional probabilities.
Key Results
TSGM was compared against eight baselines, including popular models like TimeGAN and TimeVAE. The researchers used two primary metrics: the Predictive Score (how well a model trained on synthetic data performs on real data) and the Discriminative Score (how easily a classifier can tell real data from fake).
- Superior Quality: TSGM achieved the best (lowest) scores in almost all categories. Notably, on the Energy and Air datasets, it outperformed TimeGAN by a significant margin.
- High Diversity: As shown in the t-SNE plots, TSGM's synthetic samples (blue) overlap almost perfectly with the original data (red), indicating that it captures the full distribution of the data without the mode collapse seen in GANs.
Limitations and Future Work
The main drawback of TSGM—and SGMs in general—is sampling speed. Because the model must iteratively refine samples through many diffusion steps, it is significantly slower than GANs during inference. For example, generating 1,000 samples took over 3,300 seconds for TSGM on the Stocks dataset, compared to less than a second for TimeGAN.
Future work could involve applying "fast sampling" techniques (like consistency models or distillation) to TSGM. Additionally, the authors suggest that replacing the RNN-based autoencoder with continuous-time models (like Neural ODEs) could allow the framework to handle irregularly sampled time-series.
Summary updated