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

This assumption is evident when viewing MSE through the                     Table 1: Dataset Statistics: The top part shows forecasting
lens of maximum likelihood estimation:                                      datasets, bottom part shows classification datasets.
     1                         in
        ||x0 − Projector(f (z1:j−1   ))||2 =                                    DATASETS         D OMAIN        VARIABLES   L ENGTH
   2σ 2 j                                                (10)                 ETTh1/ETTh2         Energy            7        17420
                                    in
       − log N (x0j ; Projector(f (z1:j−1 )), σ 2 ) + C,                      ETTm1/ETTm2         Energy            7        69680
                                                                                Electricity       Energy           321       26304
where σ is a constant and C is a constant determined
                                                                                  Traffic      Transportation      862       17544
by σ. If it is valid, sampling x0j could be achieved via                         Weather          Weather           21       52696
                     in
x0j = Projector(f (z1:j−1  ))+σϵ, where ϵ is standard Gaus-                     Exchange          Finance            8        7588
sian noise. This implies time series observations are either                    PEMS03         Transportation      358       26208
very noisy or follow a unimodal, bell-shaped distribution.                      PEMS04         Transportation      307       16992
Real-world time series, however, often display complex,                         PEMS07         Transportation      883       28224
                                                                                PEMS08         Transportation      170       17856
multimodal behaviors and intricate dependencies that a sim-
ple Gaussian assumption poorly captures.                                          HAR              HAR              9        14717
                                                                                 Epilepsy          HAR              3         413
To overcome these limitations, TimeDART replaces MSE                              EEG              EEG              2        15629
with a diffusion loss, allowing the model to express a richer,
multimodal belief over time series data. This self-supervised               datasets for forecasting tasks (both ETT and PEMS datasets
diffusion loss, formally equivalent to the Evidence Lower                   contain four subsets each) and three datasets for classifi-
Bound (Ho et al., 2020; Chen et al., 2024):                                 cation tasks. To clearly illustrate the practical scenarios
            N
            X                                                               and scale of these datasets, the table provides an overview
                                                   in
                  Eϵ,q(x0j ) ||x0j − g(ẑjin , f (z1:j−1 ))||2 . (11)
                                                             
  Ldiff =                                                                   of each dataset’s domain, the number of samples, and the
            j=1                                                             number of variables per sample. The dataset scale enables
This diffusion loss, embedded in the autoregressive opti-                   us to concretely illustrate the model size and computational
mization objective, effectively captures both long-term dy-                 requirements of the TimeDART architecture. A more com-
namic evolution and subtle local patterns. The core idea                    prehensive description can be found in Appendix A.
is to make the square error a reasonable loss by gradually
adding and then removing noise (Su, 2024; Li et al., 2024a).                Embedding Layer and Backbone In TimeDART, a
Refer to Appendix C for the detailed derivation.                            simple linear transformation is used for the embedding
                                                                            layer. Additionally, to ensure the autoregressive mecha-
3.3. Downstream Transfering                                                 nism functions correctly, it is crucial that patches remain
                                                                            non-overlapping to prevent information leakage. Therefore,
After pre-training, the denoising decoder is discarded, while               we prioritize using a vanilla non-overlapping patch embed-
the embedding layer and encoder are transferred. The en-                    ding layer and a Transformer encoder, rather than relying
coder is then adapted with task-specific heads for various                  on existing backbones such as PatchTST (Nie et al., 2023)
downstream tasks. In forecasting, fine-tuning is performed                  or iTransformer (Liu et al., 2024a). To investigate whether
on both the look-back and predicted windows, with a flat-                   TimeDART maintains consistent performance across dif-
ten head for one-step prediction, optimized using MSE                       ferent backbones, we conducted additional experiments by
loss. In classification, fine-tuning is performed on the input              replacing the Transformer encoder with a causal TCN under
sequence with corresponding labels, followed by a max-                      specific configurations, as it also satisfies the aforemen-
pooling head that projects the latent representations onto the              tioned requirements. Regardless of the backbone, we use a
labels, and is optimized using cross-entropy loss.                          vanilla Transformer decoder as the denoising decoder, with
                                                                            parameters identical to those of the Transformer encoder,
4. Experiments                                                              except for the number of layers.
We demonstrate TimeDART’s effectiveness in forecasting
and classification across diverse datasets. Ablation studies                Baselines We compare TimeDART against four state-of-
confirm the power of its autoregressive mechanism and the                   the-art self-supervised baseline methods, including a con-
critical role of diffusion denoising process, further showing               trastive learning method: CoST (Woo et al., 2022), and three
its robustness through parameter analysis.                                  masked modeling methods: SimMTM (Dong et al., 2024b),
                                                                            TimeMAE (Cheng et al., 2023b) and the self-supervised ver-
                                                                            sion of PatchTST (Nie et al., 2023). Since we use a vanilla
4.1. Experimental Setup
                                                                            Transformer encoder as the backbone instead of what is
Datasets We summarize the publicly available datasets                       proposed in existing supervised methods, we believe it is
used in our experiments in Table 1, which includes six                      essential to compare with advanced supervised methods

                                                                        5
