TimeDART: A Diffusion Autoregressive Transformer for Self-Supervised Time Series Representation

Daoyu Wang, Mingyue Cheng, Zhiding Liu, Qi Liu

TL;DR

TimeDART is a novel self-supervised learning framework that unifies autoregressive modeling and denoising diffusion to learn highly transferable time series representations. By combining a causal Transformer to track global trends with a diffusion process to capture fine-grained local patterns, TimeDART consistently outperforms state-of-the-art methods in both forecasting and classification tasks.

The Challenge of Time Series Representation

Time series analysis is a cornerstone of numerous domains, from healthcare monitoring to financial forecasting. However, annotating this data is notoriously expensive and time-consuming. Self-supervised learning (SSL) aims to bypass this bottleneck by learning robust representations directly from raw, unlabeled data.

Existing SSL methods for time series generally fall into three camps, each facing distinct trade-offs:

  1. Masked Autoencoders: These excel at learning local patterns but often suffer from a "distribution shift" between the pre-training phase (where data is artificially masked) and fine-tuning (where it is not).
  2. Contrastive Learning: While highly effective at capturing sequence-level features, these methods often miss subtle, fine-grained temporal variations.
  3. Autoregressive (AR) Models: AR models naturally align with the "left-to-right" chronological flow of time. However, they tend to overfit noise or collapse into predicting a simple Gaussian mean (the "MSE trap"), failing to capture the complex, multimodal nature of real-world data.

To bridge these gaps, researchers introduce TimeDART, a framework designed to understand both the global evolution (the "big picture") and local patterns (the "tiny details") coherently.

How TimeDART Works

TimeDART’s architecture relies on a two-stage generative approach that blends autoregressive modeling with diffusion.

First, the model employs a patch-based embedding strategy, breaking the continuous time series into non-overlapping chunks. These patches are fed into a Causal Transformer Encoder. Thanks to causal masking, each patch can only attend to preceding patches, forcing the model to learn the evolving global trend of the sequence from left to right.

Building on this global context, TimeDART introduces a denoising diffusion process to capture local intricacies. During pre-training, the model takes a target patch and gradually adds noise to it (the forward process). A Masked Denoising Decoder is then tasked with reconstructing the original patch from its noisy version, conditioned on the historical context provided by the encoder.

The overall architecture of TimeDART, showing the interaction between the Causal Encoder and the Denoising Decoder.

What makes this approach unique is the use of a Diffusion Loss. Standard AR models typically rely on Mean Squared Error (MSE), which implicitly assumes the data follows a simple Gaussian distribution. By contrast, the diffusion loss allows TimeDART to learn much more complex, multimodal distributions, preventing the model from "playing it safe" by merely predicting the average of past values.

Key Insights and Innovations

  • Escaping the "MSE Trap": Replacing standard MSE with a diffusion loss enables TimeDART to model the intricate, non-Gaussian dependencies frequently found in real-world sensor data.
  • Independent Noising: A subtle but critical architectural detail is that noise is added to each patch independently. This prevents the model from "cheating" by inferring the original data from the global statistical properties (like mean or variance) of a uniformly noised sequence.
  • Causal vs. Self-Only Masking: The encoder uses a causal mask to learn historical context, while the decoder uses a "self-only" mask. This ensures the decoder focuses entirely on denoising the current patch using the history provided by the encoder, without leaking future information.
  • Training Efficiency: Despite leveraging diffusion, TimeDART remains surprisingly efficient. It utilizes a medium-sized architecture (approximately 2.36M parameters) and avoids the lengthy iterative sampling times typically associated with diffusion models, as it only performs the denoising steps during training.

Experimental Results

The authors evaluated TimeDART across a massive battery of 13 public datasets, covering forecasting (e.g., ETT, Electricity, Traffic, Weather, Exchange, PEMS) and classification (e.g., Human Activity Recognition, Epilepsy EEG, Sleep Stage EEG).

TimeDART demonstrated superior performance across the board:

  • Forecasting: It achieved a 6.8% reduction in MSE compared to random initialization and outperformed top-tier baselines like PatchTST and SimMTM in over 83% of the tested scenarios.
  • Classification: The model improved average accuracy by 5.7% over random initialization, proving that the generative pre-training phase yields highly discriminative features.
  • Robustness: As illustrated below, TimeDART occupies the ideal "top-left" sweet spot—achieving the lowest error in forecasting alongside the highest accuracy in classification.
Comparison of TimeDART against baselines, showing its superior performance in both forecasting (x-axis) and classification (y-axis).

Limitations and Future Directions

While TimeDART is highly adaptable, its performance can be sensitive to hyperparameters like patch length and the noise scheduler. For instance, datasets with high redundancy (such as Electricity) benefit from longer patches, whereas more volatile data requires shorter ones.

Future work could focus on developing adaptive patching strategies that eliminate the need for manual tuning. Additionally, while the model transfers well across domains, the authors noted that general pre-training might slightly lag behind domain-specific tuning in highly specialized areas (like weather forecasting), suggesting a potential avenue for even larger-scale "foundation" pre-training in the time series domain.

Summary updated

BibTeX
@inproceedings{wang2025timedart,
  author = {Daoyu Wang and Mingyue Cheng and Zhiding Liu and Qi Liu},
  title = {{TimeDART: A Diffusion Autoregressive Transformer for Self-Supervised Time Series Representation}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=v2G9HML7ep},
}
Figure