UTSD: Unified Time Series Diffusion Model

Xiangkai Ma, Xiaobin Hong, Wenzhong Li, Sanglu Lu · OpenReview

Abstract

Transformer-based architectures have achieved unprecedented success in time series analysis. However, facing the challenge of across-domain modeling, existing studies utilize statistical prior as prompt engineering fails under the huge distribution shift among various domains. In this paper, a Unified Time Series Diffusion (UTSD) model is established for the first time to model the multi-domain probability distribution, utilizing the powerful probability distribution modeling ability of Diffusion. Unlike the autoregressive models that capture the conditional probabilities of the prediction horizon to the historical sequence, we use a diffusion denoising process to model the mixture distribution of the cross-domain data and generate the prediction sequence for the target domain directly utilizing conditional sampling. The proposed UTSD contains three pivotal designs: (1) The condition network captures the multi-scale fluctuation patterns from the observation sequence, which are utilized as context representations to guide the denoising network to generate the prediction sequence; (2) Adapter-based fine-tuning strategy, the multi-domain universal representation learned in the pretraining stage is utilized for downstream tasks in target domains; (3) The diffusion and denoising process on the actual sequence space, combined with the improved classifier free guidance as the conditional generation strategy, greatly improves the stability and accuracy of the downstream task. We conduct extensive experiments on mainstream benchmarks, and the pre-trained UTSD outperforms existing foundation models on all data domains, exhibiting superior zero-shot generalization ability. After training from scratch, UTSD achieves comparable performance against domain-specific proprietary models. The empirical results validate the potential of UTSD as a time series foundational model.

Introduction

Time series forecasting is critical across diverse sectors, including energy management, traffic optimization, and financial modeling. However, developing a "one-size-fits-all" foundation model remains a significant challenge due to distribution shift. Patterns learned in one domain (e.g., electricity usage) often fail to generalize to others (e.g., stock prices) because of fundamental differences in periodicity, noise, and frequency.

Existing unified models frequently suffer from two primary issues:

  1. Domain Confusion: Aggregating diverse datasets often results in models that learn a generic "average" distribution, losing the specific nuances of individual domains.
  2. Modality Misalignment: Attempts to adapt Large Language Models (LLMs) for time series often encounter "concept drift," where the gap between discrete text tokens and continuous numerical sequences leads to a loss of mathematical precision.

To address these, we propose the Unified Time Series Diffusion (UTSD) model (also referred to as TimeControl), which leverages the generative power of diffusion processes to model complex, multi-domain probability distributions.

Methodology and Framework

UTSD adopts a Domain-Fusion paradigm. Unlike standard autoregressive models that predict sequences point-by-point, UTSD utilizes a denoising process to generate entire prediction horizons simultaneously. This approach allows the model to capture the joint probability distribution of the target domain more effectively.

The UTSD framework overview, illustrating the pre-training, fine-tuning, and inference stages alongside the core architecture.

The framework operates in three distinct stages:

  • Pre-training: The model is trained on a massive multi-domain integrated distribution to learn universal temporal representations.
  • Fine-tuning: An adapter-based strategy is employed where the pre-trained backbone remains frozen, and small "adapter" modules are trained to specialize the model for a specific downstream domain. This prevents catastrophic forgetting of the universal features.
  • Inference: The model uses a conditional sampling process, guided by the historical observation, to generate the forecast.

Model Architecture

The UTSD architecture consists of three core components: a Condition Net, an Adapter, and a Denoising Net.

Detailed internal architecture of UTSD, showing the multi-scale encoder-decoder structure of the Condition and Denoising networks connected via Adapter blocks.

Key Architectural Innovations

  • Multi-Scale Condition Network: This component extracts fluctuation patterns at multiple granularities (e.g., short-term cycles vs. long-term trends) from the observation sequence. These serve as context representations to guide the generation process.
  • Adapter Blocks: These modules bridge the Condition Net and Denoising Net, allowing for efficient domain adaptation. They utilize self-attention and cross-attention mechanisms to align the context with the generation task.
  • Generation-Style Guidance (GSG): During inference, UTSD employs an improved classifier-free guidance strategy. By interpolating between conditional and unconditional outputs with a control coefficient ($\lambda$), the model balances creative diversity with strict adherence to the target domain's specific "style."
  • Efficiency via DDIM: To mitigate the computational cost of iterative diffusion, the model utilizes the de-Markovised DDIM algorithm, reducing inference steps from 1000 to 50 without significant loss in accuracy.

Experimental Evaluation

Datasets and Setup

The study evaluated UTSD across 49 benchmarks against 30 baselines. Pre-training involved 39 datasets from the Monash Time Series Forecasting Repository, spanning nature, transport, energy, and web domains. Evaluation was conducted on 10 benchmarks from the Time Series Forecasting Benchmark (TFB), including ETT, Electricity, Traffic, and Weather datasets.

Key Results

UTSD demonstrates state-of-the-art performance in both zero-shot and fine-tuned scenarios:

  • Superior Generalization: UTSD achieved a 19.6% improvement over existing foundation models (such as Moirai and UniTime) and a 21.2% improvement over 24 domain-specific proprietary models.
  • Zero-Shot Dominance: In transfer learning tasks, UTSD outperformed competitors in 68 out of 80 tested scenarios, showcasing its robust ability to handle unseen distributions.
  • Distributional Accuracy: Qualitative t-SNE visualizations confirm that UTSD's generated samples align closely with real data distributions, avoiding the "scattered" or "dithered" outputs common in other generative models like TimeGrad.

Conclusion

UTSD represents a significant step toward a true foundation model for time series analysis. By treating domain characteristics as generative "styles" and utilizing a multi-scale diffusion framework, it successfully overcomes the limitations of domain confusion and distribution shift. While diffusion-based inference remains more computationally intensive than simple linear models, the gains in zero-shot accuracy and stability position UTSD as a powerful tool for cross-domain forecasting. Future work will focus on scaling the architecture to billions of parameters and extending its capabilities to anomaly detection and classification.

Summary updated

BibTeX
@misc{ma2024utsd,
  author = {Xiangkai Ma and Xiaobin Hong and Wenzhong Li and Sanglu Lu},
  title = {{UTSD: Unified Time Series Diffusion Model}},
  year = {2024},
  eprint = {2412.03068},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.03068},
}
Figure