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

The first term is a constant, the third term is the reconstruction loss, and only the second term is discussed:

                              T                                                           T
                                          q(xs−1 |xs , x0 )                                           q(xs−1 |xs , x0 )
                              X                                   Z                       X
                  Eq(x0:T )         log                     =         dx0:T q(x0:T ) ·          log                            (25)
                              s=2
                                           pθ (xs−1 |xs )                                 s=2
                                                                                                       pθ (xs−1 |xs )
                                                                  T
                                                                  X
                                                                        Eq(x0 ,xs ) DKL (q(xs−1 |xs , x0 )∥pθ (xs−1 |xs ))
                                                                                                                          
                                                              =                                                                (26)
                                                                  s=2

Applying Bayes’ theorem again:

                                               q(xs−1 |xs , x0 ) = N (xs−1 , µ̃s (xs , x0 ), β̃s I)                            (27)

It can be assumed that the predicted distribution can also be expressed as:

                                                 pθ (xs−1 |xs ) = N (xs−1 ; µθ (xs , s), σs2 I)                                (28)

According to the KL divergence of two Gaussian distributions with the same variance, we can get:
                                                                                                          
                                                                       1           s    0           s
                                            Ldiff = Eq(x0 ,xs )            ∥µ̃s (x   , x  ) − µθ (x   , s)∥                    (29)
                                                                      2σs2

Since µ̃s and x0 are linearly related, we turn to predict the original space, so:

                                                      Ldiff = Eϵ,q(x0 ) ||x0 − xout ||2 .
                                                                                      
                                                                                                                               (30)

Adding the cumulative sum of subscripts and the notation from the original paper, we get:

                                                      N
                                                      X
                                                            Eϵ,q(x0j ) ||x0j − g(ẑjin , f (z1:j−1
                                                                                             in
                                                                                                   ))||2
                                                                                                        
                                            Ldiff =                                                                            (31)
                                                      j=1



D. Full Result for Forecasting Task
Due to space limitations, the complete tables for the forecasting task are provided in Appendix H. Experiments in the
in-domain setting are shown in Tables 10 and 11, while experiments in the cross-domain setting are presented in Table 12.
The experiments with the backbone replaced by causal TCN are shown in Table 13.

E. Ablation Study Full Result
The results in Table 14 underscore the critical roles of both the autoregressive generation and denoising diffusion components
in TimeDART. Removing the autoregressive mechanism (w/o AR) leads to a significant performance decline, particularly in
ETTm2. At the 96-step horizon, MSE increases from 0.165 to 0.184, and at 336 steps, it rises from 0.279 to 0.307. This
illustrates the crucial role of the autoregressive mechanism in enhancing the model’s forecasting ability, especially across
various time horizons. Similarly, eliminating the denoising diffusion module (w/o Diff ) results in noticeable performance
degradation, as observed in ETTh2. At the 96-step horizon, MSE increases from 0.283 to 0.288, and at the 336-step
horizon, it rises from 0.365 to 0.372. These findings highlight the essential contribution of the denoising diffusion process to
improving the model’s learning and overall performance.
When both components are removed (w/o AR-Diff ), the model’s performance deteriorates significantly across all datasets.
For instance, in Electricity, at the 336-step horizon, MSE jumps from 0.166 to 0.199, clearly showing the combined
importance of both modules for achieving optimal performance.
In summary, both modules are indispensable for TimeDART’s success. The autoregressive mechanism is particularly
important for long-term predictions, as evidenced in ETTm2, while the denoising diffusion process significantly improves
accuracy and learning, especially in datasets like ETTh2.

                                                                           17
