Time Weaver: A Conditional Time Series Generation Model
Sai Shankar Narasimhan, Shubhankar Agarwal, Oguzhan Akcin, Sujay Sanghavi, Sandeep Chinchali
TL;DR
This work tackles the problem of generating realistic time series conditioned on heterogeneous metadata (categorical, continuous, and time-varying). It proposes Time Weaver, a diffusion-based generator that front-loads metadata processing with a dedicated tokenizer and self-attention block to produce a metadata embedding used by a denoiser backbone (CSDI or SSSD). A key contribution is the Joint Frechet Time Series Distance (J-FTSD), a metric learned via contrastive multi-modal embeddings to evaluate conditional generation, capturing both time-series realism and metadata specificity. Empirical results across energy, healthcare, pollution, and traffic datasets show Time Weaver surpasses GAN baselines by substantial margins in downstream classification tasks and distributional similarity, demonstrating the practical potential for scenario analysis, capacity planning, and privacy-preserving data synthesis. The work also discusses limitations (slower inference/training) and future directions (distillation, broader forecasting/anomaly detection).
Abstract
Imagine generating a city's electricity demand pattern based on weather, the presence of an electric vehicle, and location, which could be used for capacity planning during a winter freeze. Such real-world time series are often enriched with paired heterogeneous contextual metadata (e.g., weather and location). Current approaches to time series generation often ignore this paired metadata. Additionally, the heterogeneity in metadata poses several practical challenges in adapting existing conditional generation approaches from the image, audio, and video domains to the time series domain. To address this gap, we introduce TIME WEAVER, a novel diffusion-based model that leverages the heterogeneous metadata in the form of categorical, continuous, and even time-variant variables to significantly improve time series generation. Additionally, we show that naive extensions of standard evaluation metrics from the image to the time series domain are insufficient. These metrics do not penalize conditional generation approaches for their poor specificity in reproducing the metadata-specific features in the generated time series. Thus, we innovate a novel evaluation metric that accurately captures the specificity of conditional generation and the realism of the generated time series. We show that TIME WEAVER outperforms state-of-the-art benchmarks, such as Generative Adversarial Networks (GANs), by up to 30% in downstream classification tasks on real-world energy, medical, air quality, and traffic datasets.
