diff --git "a/parse/dev/gMS6FVZvmF/gMS6FVZvmF.md" "b/parse/dev/gMS6FVZvmF/gMS6FVZvmF.md"
new file mode 100644--- /dev/null
+++ "b/parse/dev/gMS6FVZvmF/gMS6FVZvmF.md"
@@ -0,0 +1,625 @@
+# One Fits All: Power General Time Series Analysis by Pretrained LM
+
+Tian Zhou∗ Peisong Niu∗ Xue Wang∗ Liang Sun Rong Jin† {tian.zt,niupeisong.nps,xue.w,liang.sun,jinrong.jr}@alibaba-inc.com
+
+# Abstract
+
+Although we have witnessed great success of pre-trained models in natural language processing (NLP) and computer vision (CV), limited progress has been made for general time series analysis. Unlike NLP and CV where a unified model can be used to perform different tasks, specially designed approach still dominates in each time series analysis task such as classification, anomaly detection, forecasting, and few-shot learning. The main challenge that blocks the development of pre-trained model for time series analysis is the lack of a large amount of data for training. In this work, we address this challenge by leveraging language or CV models, pre-trained from billions of tokens, for time series analysis. Specifically, we refrain from altering the self-attention and feedforward layers of the residual blocks in the pre-trained language or image model. This model, known as the Frozen Pretrained Transformer (FPT), is evaluated through fine-tuning on all major types of tasks involving time series. Our results demonstrate that pre-trained models on natural language or images can lead to a comparable or state-of-the-art performance in all main time series analysis tasks, as illustrated in Figure 1. We also found both theoretically and empirically that the self-attention module behaviors similarly to principle component analysis (PCA), an observation that helps explains how transformer bridges the domain gap and a crucial step towards understanding the universality of a pre-trained transformer. The code is publicly available at https://github.com/DAMO-DI-ML/One_Fits_All.
+
+# 1 Introduction
+
+Time series analysis is a fundamental problem Hyndman & Athanasopoulos (2021) that has played an important role in many real-world applications Wen et al. (2022), such as retail sales forecasting Böse et al. (2017); Courty & Li (1999) , imputation of missing data for economic time series Friedman (1962) anomaly detection for industrial maintenance Gao et al. (2020), and classification of time series from various domain Ismail Fawaz et al. (2019). Numerous statistical and machine learning methods have been developed for time series analysis in the past. Inspired by its great success in natural language processing and computer vision Vaswani et al. (2017); Devlin et al. (2019); Dosovitskiy et al. (2021); Rao et al. (2021), transformer has been introduced to various time series tasks with promising results Wen et al. (2023), especially for time series forecasting Lim et al. (2021); Zhou et al. (2022, 2021); Wu et al. (2021); Nie et al. (2022).
+
+We have recently witnessed the rapid development of foundation models in NLP. The key idea is to pre-train a large language model from billions of tokens to facilitate model training for downstream tasks, particularly when we have a few, sometimes even zero, labeled instances. Another advantage of foundation models is that they provide a unified framework for handling diverse tasks, which contrasts conventional wisdom where each task requires a specially designed algorithm. However, so far, little progress has been made to exploit pre-trained or foundation models for time series analysis. One main challenge is the lack of the large amount of data to train a foundation model for time series analysis. The largest data sets for time series analysis is less than 10GB Godahewa et al. (2021), which is much smaller than that for NLP. To address this challenge, we propose to leverage pre-trained language models for general time series analysis. Our approach provides a unified framework for diverse time series tasks, such as classification, anomaly detection, forecasting, and few-shot or zero-shot learning. As shown in Figure 1, using the same backbone, our approach performs either on-par or better than the state-of-the-art methods for all main time series analysis tasks. Besides extensive empirical studies, we also investigate why a transformer model pre-trained from the language domain can be adapted to time series analysis with almost no change. Our analysis indicates that the self-attention modules in the pre-trained transformer acquire the ability to perform certain non-data-dependent operations through training. These operations are closely linked to principal component analysis over the input patterns. We believe it is this generic function performed by the self-attention module that allows trained transformer models to be so-called universal compute engine Lu et al. (2022) or general computation calculator Giannou et al. (2023). We support our claims by conducting an empirical investigation of the resemblance in model behaviors when self-attention is substituted with PCA, and by providing a theoretical analysis of their correlation.
+
+
+Figure 1: Model performance comparison on various tasks.
+
+Here we summarize our key contributions as follows:
+
+1. We propose a unified framework that uses a frozen pre-trained language model to achieve a SOTA or comparable performance in all major types of time series analysis tasks supported by thorough and extensive experiments, including time series classification, short/long-term forecasting, imputation, anomaly detection, few-shot and zero-sample forecasting.
+2. We found, both theoretically and empirically, that self-attention performs a function similar to PCA, which helps explain the universality of transformer models.
+3. We demonstrate the universality of our approach by exploring a pre-trained transformer model from another backbond model (BERT) or modality (computer vision) to power the time series forecasting.
+
+The remainder of this paper is structured as follows. Section 2 briefly summarizes the related work. Section 3 presents the proposed detailed model structure. In Section 4, we conduct a thorough and extensive evaluation of the performance of cross-modality time series analysis using our proposed method in seven main time series analysis tasks compared to various SOTA baseline models. Section 5 presents various ablation studies, and Section 6 demonstrates the universality of our proposed method using pre-trained models with another structure or pre-trained from another modality. In Section 7, we provide a theoretical explanation of the connection between self-attention and PCA. Finally, in Section 8, we discuss our results and future directions. Due to space limit, more extensive discussion of related work, experimental results, and theoretical analysis are provided in the Appendix.
+
+# 2 Related Work
+
+In this section, we provide short reviews of literature in the areas of time series analysis, in-modality transfer learning, and cross-modality knowledge transfer learning. We postpone the discussion of works for end-to-end time series analysis to Appendix B, due to the limited space.
+
+In-modality Transfer Learning through pre-trained models In recent years, a large number of research works have verified the effectiveness of the pre-trained model from NLP, CV to Visionand-Language (VL). Latest studies for NLP focus on learning contextual word embeddings for downstream tasks. With the increase of computing power, the very deep transformer models have shown powerful representation ability in various language tasks. Among them, BERT Devlin et al. (2019) uses transformer encoders and employs masked language modeling task that aims to recover the random masked tokens within a text. OpenAI proposed GPT Radford & Narasimhan (2018) that trains transformer decoders on a large language corpus and then fine-tunes on task-specific data. GPT2 Radford et al. (2019) is trained on larger datasets with much more parameters and can be transferred to various downstream tasks. Since transformer models can adapt to various inputs, the idea of pre-training can also be well adapted to visual tasks. DEiT Touvron et al. (2021) proposed a teacher-student strategy for transformers with convolution neural networks (CNNs) as the teacher model and achieves competitive performance. BEiT Bao et al. (2022) converts images as visual tokens and successfully uses the BERT model in CV. However, because of the insufficient training sample, there is little research on pre-trained models on general time series analysis that cover all major tasks like CV or NLP domain.
+
+Cross-modality knowledge transfer Since transformers can handle different modal tasks through tokenizing the inputs to embeddings, it is also an interesting topic whether the transformers have universal representation ability and can be used for transferring between various domains. The VL pre-trained model VLMo Bao et al. (2021) proposed a stagewise pre-training strategy that utilizes frozen attention blocks pre-trained by image-only data to train the language expert. One of the most related works which transfer knowledge from a pre-trained language model to other domains is Lu et al. (2022), which studies the strong performance of a frozen pre-trained language model (LM) compared to an end-to-end transformer alternative learned from other domains’ data. Another relative work for knowledge transfer to the time series is the Voice2series Yang et al. (2021), which leverages a pre-trained speech processing model for time series classification and achieves superior performance. To the best of our knowledge, no previous research has investigated cross-modality knowledge transfer for the time series forecasting task, let alone general time series analysis.
+
+# 3 Methodology
+
+# 3.1 Model Structure
+
+The architecture we employ is depicted in Figure 2. We utilize parameters from NLP pretrained transformer models for time series analysis, with a focus on the GPT2 model Radford et al. (2019). We also experiment with other models, such as BERT Devlin et al. (2019) and BEiT Bao et al. (2022), to further demonstrate that the universal performance of cross-domain knowledge transfer exists in a wide range of pre-trained models.
+
+Frozen Pretrained Block Our architecture retains the positional embedding layers and self-attention blocks from the pre-trained models. As self-attention layers and FFN (Feedforward Neural Networks) contain the majority of learned knowledge from pre-trained language models, we opt to freeze the self-attention blocks while fine-tuning.
+
+Positional Embeddings and Layer Normalization To enhance downstream tasks with minimal effort, we fine-tune the positional embeddings and layer normalization layer, which is considered a standard practiceLu et al. (2022); Houlsby et al. (2019). As a result, we retrain these components during fine-tuning.
+
+
+Figure 2: Model architecture. Pre-trained parameters are transferred to the time series forecasting tasks. Self-attention and Feedforward layers in the transformer blocks are frozen while only the embedding layer, normalization layers, and output layer require training.
+
+Input Embedding Given our goal of applying the NLP pre-trained model to various tasks and a new modality, we must redesign and train the input embedding layer. This layer is responsible for projecting the time-series data to the required dimensions of the specific pre-trained model. To accomplish this, we use linear probing, which also reduces the number of parameters required for training.
+
+Normalization Data normalization is crucial for pre-trained models across various modalities. In addition to the layer norm utilized in pre-trained LM, we also incorporate a simple data normalization block, reverse instance norm Kim et al. (2022), to further facilitate knowledge transfer. This normalization block simply normalizes the input time series using mean and variance, and then adds them back to the output.
+
+Patching To extract local semantic information, we utilize patching Nie et al. (2022) by aggregating adjacent time steps to form a single patch-based token. Patching enables a significant increase in the input historical time horizon while maintaining the same token length and reducing information redundancy for transformer models. In our architecture, we apply patching after instance normalization.
+
+# 4 Main Time Series Analysis Tasks
+
+Our proposed method excels in various downstream time series analysis tasks through fine-tuning. To demonstrate the effectiveness of our approach, we conduct extensive experiments on major types of downstream tasks, including time series classification, anomaly detection, imputation, short/long-term forecasting and few-shot/zero-shot forecasting. To ensure a fair comparison, we use GPT2-backbone FPT and adhere to the experimental settings of TimesNet Wu et al. (2023). Due to the space limit, only the summarized results are presented below except zero-shot forecasting. Full experimental results of the other six downstream tasks can be found in Appendix D.3, D.2, D.7, H.6, H.7, H.8, H.9 respectively.
+
+Baselines We select representative baselines and cite their results from Wu et al. (2023), which includes the most recent and quite extensive empirical studies of time series. The baselines include CNN-based models: TimesNet Wu et al. (2023); MLP-based models: LightTS Zhang et al. (2022) and DLinear Zeng et al. (2023); Transformer-based models: Reformer Kitaev et al. (2020), Informer Zhou et al. (2021), Autoformer Wu et al. (2021), FEDformer Zhou et al. (2022), Nonstationary Transformer Liu et al. (2022), ETSformer Woo et al. (2022), PatchTST Nie et al. (2022). Besides, N-HiTS Challu et al. (2022) and N-BEATS Oreshkin et al. (2019) are used for short-term forecasting. Anomaly Transformer Xu et al. (2021) is used for anomaly detection. XGBoost Chen & Guestrin (2016), Rocket Dempster et al. (2020), LSTNet Lai et al. (2018), LSSL Gu et al. (2021),
+
+Pyraformer Liu et al. (2021), TCN Franceschi et al. (2019) and Flowformer Huang et al. (2022) are used for classification.
+
+# 4.1 Main Results
+
+Overall, as shown in Figure 1, GPT2-backbone FPT outperforms other models in most tasks, including long/short-term forecasting, classification, anomaly detection, imputation, and fow-shot/zero-short forecasting. This confirms that time series tasks can also take advantage of cross-modality transferred knowledge. In the following, we use GPT2(K) to represent GPT2-backbone with first K Layers.
+
+# 4.2 Imputation
+
+Setups We conduct experiments on six popular real-world datasets, including 4 ETT datasets Zhou et al. (2021) (ETTh1, ETTh2, ETTm1, ETTm2), Electricity and Weather, where the data-missing is common. Following the settings of TimesNet, different random mask ratios ( $\{ 1 2 . 5 \% , 2 5 \% , 3 7 . 5 \%$ , $5 0 \% \}$ ) of time points are selected for the evaluation on various proportions of missing data.
+
+Results The results are shown in Table 1 that GPT2(3) FPT achieves the best performance on most datasets. Particularly, compared to the previous SOTA TimesNet, GPT2(3) FPT yields a relative $1 1 . 5 \%$ MSE reduction on ETTh1,and a $4 . 1 \%$ MSE reduction on average on six benchmark datasets. It verifies that the proposed method can also effectively mine temporal patterns of incomplete time series.
+
+Table 1: Imputation task. We randomly mask { $12 . 5 \%$ , $2 5 \%$ , $3 7 . 5 \%$ , $50 \%$ } time points of 96-length time series. The results are averaged from 4 different mask ratios. Black: best, Red: second best. Appendix H.8 shows the full results.
+
+
| Methods | GPT2(3) MSEMAE | TimesNet MSE MAE | PatchTST MSE MAE | ETSformer MSE MAE | | LightTS MSEMAE | DLinear MSE MAE | | FEDformer MSEMAE | Stationary MSE MAE | Autoformer MSE MAE | | Informer MSE MAE | MSE MAE | Reformer |
| ETTm1 ETTm2 ETTh1 ETTh2 ECL | 0.028 0.105 0.021 0.084 0.069 0.173 0.048 0.141 0.0900.207 | 0.0270.107 0.0220.088 0.078 0.187 0.049 0.146 0.092 0.210 | 0.0470.140 0.029 0.102 0.115 0.065 0.072 0.183 | 0.224 0.202 0.163 0.367 0.214 0.055 | 0.1200.253 0.208 0.327 0.329 0.436 0.339 | 0.1040.218 0.046 0.151 0.284 0.373 0.119 0.250 0.131 0.262 0.055 | 0.201 0.142 0.132 | 0.0930.206 0.0960.208 0.306 0.259 0.260 | 0.0620.177 0.101 0.215 0.117 0.246 0.163 0.279 0.1300.259 | 0.0360.126 0.0260.099 0.094 0.053 0.100 0.218 | 0.201 0.152 0.101 | 0.0510.150 0.029 0.105 0.103 0.214 0.055 0.156 0.225 | 0.071 0.188 0.156 0.292 0.161 0.337 0.222 | 0.279 0.452 0.328 | 0.055 0.166 0.157 0.280 0.1220.245 0.2340.352 0.2000.313 |
| Weather Average | 0.031 0.056 :|0.0470.127 | 0.0300.054 0.0490.132| | 0.034 | 0.076 | 0.171 | 0.117 | 0.052 | 0.110 | 0.099 0.203 | 0.032 [0.060 0.144|0.1970.309|0.1230.228|0.1190.224|0.1120.229|0.0560.142|0.0610.151|0.1650.273|0.134 0.240 | 0.059 0.031 | 0.057 | 0.045 | 0.104 | 0.0380.087 |
+
+# 4.3 Time Series Classification
+
+Setups To evaluate the model’s capacity for high-level representation learning, we employ sequence-level classification. Specifically, we follow the same setting as TimesNet: For classification, 10 multivariate UEA classification datasets Bagnall et al. (2018) are selected for evaluation, including gesture, action, audio recognition medical diagnosis and other practical tasks.
+
+Results As shown in Figure 3, GPT2(6) FPT achieves an average accuracy of $7 4 . 0 0 \%$ , surpassing all baselines including TimesNet $( 7 3 . 6 0 \% )$ . Specifically, compared to recent published patch-transformer-based models Nie et al. (2022) , GPT2(6) FPT surpasses it by a large margin $9 . 0 \%$ which shows the prior NLP transfer knowledge can indeed help in time series representation.
+
+
+Figure 3: Model comparison in classification. The results are averaged from 10 subsets of UEA. Appendix H.6 shows the full results.
+
+# 4.4 Time Series Anomaly Detection
+
+Setups Detecting anomalies in time series is vital in industrial applications, ranging from health monitoring to space & earth exploration. We compare models on five commonly used datasets, including
+
+SMDSu et al. (2019), MSLHundman et al. (2018), SMAPHundman et al. (2018), SWaTMathur & Tippenhauer (2016) and PSMAbdulaal et al. (2021). To perform a fair comparison, only the classical reconstruction error is used for all baseline models to the make the setting the same as TimesNet.
+
+Results Table 2 demonstrates that GPT2(6) FPT also achieves the best performance with the averaged F1-score $8 6 . 7 2 \%$ , surpassing previous SOTA method TimesNet by $1 . 7 \%$ . Thus, in addition to its proficiency in representing complete sequences for classification purposes, GPT2(6) FPT is capable of detecting infrequent anomalies within time series.
+
+Table 2: Anomaly detection task. We calculate the F1-score (as $\%$ ) for each dataset. $^ *$ . in the Transformers indicates the name of $^ *$ former. Black: best, Red: second best. Appendix H.7 shows the full results.
+
+| Methods | GPT2(6) Ours | TimesNet PatchTS. | | ETS. | FED. | LightTS DLinear Stationary | | | Auto. | | | In. | Re. | LogTrans. | Trans. |
| SMD | 86.89 | 84.61 | 84.62 | | 83.1385.08 | 82.53 | 77.10 | 84.72 | 85.11 | 83.04 | 85.49 | | 81.6575.32 | 76.21 | 79.56 |
| MSL | 82.45 | 81.84 | 78.70 | 85.03 | 78.57 | 78.95 | 84.88 | 77.50 | 79.05 | 84.86 | 83.31 | | 84.0684.40 | 79.57 | 78.68 |
| SMAP | 72.88 | 69.39 | 68.82 | 69.50 | 70.76 | 69.21 | 69.26 | 71.09 | | 71.12 71.09 | 71.18 | | 69.92 70.40 | 69.97 | 69.70 |
| SWaT | 94.23 | 93.02 | 85.72 | 84.91 | 93.19 | 93.33 | 87.52 | 79.88 | | 92.7491.78 | 83.10 | | 81.43 82.80 | 80.52 | 80.37 |
| PSM | 97.13 | 97.34 | 96.08 | 91.76 | 97.23 | 97.15 | 93.55 | 97.29 | 93.29 | 82.08 | 79.40 | 77.10 73.61 | | 76.74 | 76.07 |
| Average | 86.72 | 85.24 | 82.79 | | 82.87 84.97 | 84.23 | 82.46 | 82.08 | | 84.26 82.57 | 80.50 | 78.8377.31 | | 76.60 | 76.88 |
+
+\* We reproduce the results of TimesNet by https://github.com/thuml/Time-Series-Library. \*\* We replace the joint criterion in Anomaly Transformer with reconstruction error for fair comparison.
+
+# 4.5 Long-term Forecasting
+
+Setups Eight popular real-world benchmark datasets Wu et al. (2023), including Weather, Traffic , Electricity, ILI , and 4 ETT datasets (ETTh1, ETTh2, ETTm1, ETTm2), are used for long-term forecasting evaluation. Additional information regarding the discussion on the input length setting can be found in the appendix H.10.
+
+Results As shown in Table 3, GPT2(6) FPT achieves comparable performance with PatchTST and outperforms other baselines. Specifically, compared with recent published SOTA method TimesNet, GPT2(6) FPT yields a relative $9 . 3 \%$ average MSE reduction.
+
+Table 3: Long-term forecasting task. All the results are averaged from 4 different prediction lengths, that is {24, 36, 48, 60} for ILI and {96, 192, 336, 720} for the others. Black: best, Red: second best. Appendix D.3 shows the full results.
+
+| Methods | GPT2(6) MSE MAE | TimesNet MSEMAE | ETSformer MSE MAE | | LightTS MSEMAE | DLinear MSEMAE | | FEDformer MSEMAE | PatchTST MSE MAE | Stationary MSEMAE | Autoformer MSEMAE | | Informer MSE MAE | Reformer MSE MAE | |
| Weather ETTh1 ETTh2 ETTm1 | 0.2370.270 0.427 0.426 0.3460.394 0.352 0.383 | 0.2590.287 0.4580.450 0.4140.427 0.400 0.406 0.291 | 0.439 0.429 | 0.271 0.334 0.5420.510 0.452 0.425 | [0.261 0.312 0.491 0.479 0.602 0.543 0.435 0.437 | 0.2490.300 0.4230.437 0.431 0.357 | 0.447 0.378 0.334 | 0.3090.360 0.4400.460 0.437 0.449 0.448 0.452 | 0.2250.264 0.413 0.430 0.330 0.379 0.351 0.387 | 0.288 0.314 0.5700.537 0.5260.516 0.481 | 0.456 | 0.3380.382 0.4960.487 0.450 0.459 0.588 0.517 | 10.6340.548 1.040 0.795 4.431 0.961 | 1.729 0.734 0.799 | 0.8030.656 1.0290.915 6.7362.191 0.671 |
| ETTm2 ILI ECL Traffic | 0.2660.326 1.9250.903 0.1670.263 0.414 0.294 | 0.333 2.139 0.931 0.1920.295 0.620 0.336 |0.5960.433| | 0.293 2.497 0.621 |0.662 0.473|1.303 0.616|0.562 0.436|0.701 0.489| | 0.342 1.004 0.2080.323 0.396 | 0.409 0.436 7.382 2.003 0.229 0.329 0.622 0.392 | 0.267 2.169 0.166 0.434 | 0.305 1.041 2.847 50.263 0.295 0.610 | 0.349 1.144 0.214 0.327 0.376 | 0.255 0.315 1.4430.798 0.161 0.253 0.390 0.264 |0.4460.386|0.6330.465|0.757 0.511| | 0.306 2.077 0.1930.296 0.624 | 0.347 0.327 0.914 3.006 0.227 0.340 0.628 | 0.371 1.161 0.338 0.379 | 1.410 5.137 1.544 0.311 0.397 0.764 0.416 | 0.810 1.479 4.724 0.741 | 0.915 1.445 0.3380.422 0.422 |
+
+# 4.6 Short-term Forecasting
+
+Setups To fully evaluate different algorithms in forecasting tasks, we also conduct short-term forecasting (with relatively short forecasting horizon) experiments on M4 Makridakis et al. (2018), contains marketing data of various frequencies.
+
+Results The results in Table 4 show that the performance of GPT2-backbone (6) FPT is superior to advanced Transformer-based and MLP-based models, and comparable to TimesNet and N-BEATS.
+
+# 4.7 Few-shot Forecasting
+
+The large language model (LLM) has demonstrated remarkable performance in both few-shot and zero-shot learning settings Brown et al. (2020); OpenAI (2023). It can be argued that few-shot and zero-shot learning also represent the ultimate tasks for a universal time series forecasting model. To extensively evaluate the representation power of the GPT2(6) for time series analysis, we conduct experiments under few-shot and zero-shot learning settings.
+
+Table 4: Short-term forecasting task on M4. The prediction lengths are in [6, 48] and results are weighted averaged from several datasets under different sample intervals. Black: best, Red: second best. Appendix H.9 shows the full results.
+
+| Methods | | |GPT2(6) | TimesNet | PatchTST | | | N-HiTS N-BEATSETSformer | LightTS | DLinear | FEDformer Stationary | | | Autoformer Informer | Reformer |
| SMAPE | 11.991 | 11.829 | 12.059 | 11.927 | 11.851 | 14.718 | 13.525 | 13.639 | 12.840 | 12.780 | 12.909 | 14.086 | 18.200 |
| MASE | 1.600 | 1.585 | 1.623 | 1.613 | 1.599 | 2.408 | 2.111 | 2.095 | 1.701 | 1.756 | 1.771 | 2.718 | 4.223 |
| OWA | 0.861 | 0.851 | 0.869 | 0.861 | 0.855 | 1.172 | 1.051 | 1.051 | 0.918 | 0.930 | 0.939 | 1.230 | 1.775 |
+
+Similar to traditional experimental settings, each time series is split into three parts: training data, validation data, and test data. For few-shot learning, only a certain percentage $( 1 0 \% , 5 \% )$ timesteps of training data are used.
+
+The results of $10 \%$ few-shot learning are shown in Table 5. Compared to TimesNet, DLinear, PatchTST and other methods, GPT2(6) FPT achieves the best performance. Traditionally, CNNbased and single MLP-based models are considered more data-efficient for training and suitable for few-shot learning methods. In comparison to convolution-based TimesNet and MLP-based DLinear models, GPT2(6) FPT demonstrates a relative average MSE reduction of $3 3 . 3 \%$ and $1 3 . 5 \%$ respectively. We add a comparison with traditional algorithms (ETS, ARIMA, NaiveDrift) in the Appendix D.5 as well, and GTP2(6)FPT also surpass all those traditional methods.
+
+Table 5: Few-shot learning task on $10 \%$ data. All the results are averaged from 4 different prediction lengths ({96, 192, 336, 720}). Black: best, Red: second best. Appendix D.2 shows the detailed results of $10 \%$ and $5 \%$ data.
+
+| Methods | GPT2(6) MSE MAE | TimesNet MSE MAE | | DLinear MSE MAE | FEDformer MSEMAE | PatchTST MSEMAE | | Autoformer MSE MAE | Stationary MSE MAE | ETSformer MSE MAE | | LightTS MSE MAE | Informer MSE MAE | | Reformer MSE MAE |
| Weather ETTh1 ETTh2 | 0.238 0.275 0.5900.524 0.3970.421 | 0.279 0.301 0.869 0.628 0.479 0.465 | | 0.301 0.283 0.691 0.599 0.608 0.538 | 0.2840.324 0.638 0.561 0.4660.475 | 0.241 0.6330.542 0.415 0.431 | 0.279 | 10.3000.342 0.701 0.596 0.4880.499 | 0.318 0.322 0.9140.639 0.461 | 0.454 | 0.317 0.359 1.179 0.833 0.8930.713 | 0.289 0.322 1.375 0.877 2.655 | 0.597 1.199 0.808 | 0.494 | 0.545 0.469 1.249 0.833 |
| ETTm1 ETTm2 | 0.4640.441 0.2930.335 | 0.676 0.537 0.319 0.353 | 0.411 | 0.429 0.3160.368 | 0.721 0.605 0.463 0.488 | 0.501 0.296 0.343 | 0.466 0.802 | 0.628 0.930 | 0.797 0.332 | 0.577 0.979 0.714 0.447 | 0.487 | 1.159 0.970 0.704 | 3.871 1.192 3.369 | 1.512 3.485 0.820 1.425 | 1.485 0.856 |
| ECL | 0.1760.269 | 0.323 0.392 | | 0.280 | 0.3460.428 | 0.180 0.269 | 1.341 | 0.478 | 0.366 0.443 | | 0.987 0.441 | 0.755 0.488 | 1.439 1.194 0.890 | 3.977 | 1.586 50.768 |
| | 0.9510.535 | 0.180 | | 0.425 | | 0.431 | | 0.479 0.815 | 0.659 0.617 | | | | 0.965 | |
| Traffic Average | 0.4400.309 | | | 0.496 0.371 | 0.663 |0.3710.367|0.556 0.458|0.429 0.409|0.511 0.472| | 0.4300.305 0.3850.376 | | 0.7490.446 [0.687 0.559|0.674 0.522|0.912 0.665|1.137 0.712|1.850 0.967|1.888 0.974 | 1.453 | 1.913 0.936 | 1.247 | 0.684 | 1.534 | 0.811 | 1.550 0.821 |
+
+# 4.8 Zero-shot forecasting
+
+This task is used to evaluate the cross datasets adaption ability of our proposed algorithm, i.e. how well a model is able to perform on dataset $A$ (without any training data from $A$ ) when it is trained from dataset $B$ .
+
+The results are summarized in Table 6. The GPT2(6) FPT model consistently outperforms all recent state-of-the-art transformer and MLP-based time series forecasting methods. Compared to recently published state-of-the-art MLP-based method Dlinear, convolution-based method Timesnet, and transformer-based method Patchtst, GPT2(6)FPT demonstrates a relative average metric reduction of $1 3 . 1 \% { , } 1 3 . 6 \%$ and $7 . 3 \%$ , respectively. Also, the proposed method is comparable to N-BEATS without any meta-learning design and outperforms N-BEATS in the ELECTR dataset. We attribute this to the knowledge transfer capability from the FPT model.
+
+# 5 Ablations
+
+In this section, we conduct several ablations on model selection and effectiveness of pre-training. The detailed results are shown in Appendix H. We introduce several variants, GPT2(0) FPT, GPT2(6) without freezing and GPT2(6) without pre-training.
+
+Model Selection We separately analyze the number of GPT2 layers and the fine-tuning parameters selection. The results in Appendix H show that GPT2 with 6-layers is a sound choice compared to full or few layers and partially freezing can avoid catastrophic forgetting, enabling fine-tuning without overfitting.
+
+Table 6: Zero-shot learning results. Dataset-specific metrics aggregated over each dataset. A lower value indicates better performance. The source dataset of M3, Tourism, Electricity are M4. For M4, the source data for N-BEATS is FRED, and M3 for other models. Black: best, Red: second best, Violet: third best. Appendix D.7 shows full results.
+
+| Methods Metric | M4 sMAPE | M3 sMAPE | TOURISM MAPE | ELECTR ND×100 | Average |
| N-BEATS | 11.70 | 12.44 | 18.82 | 17.8 | 15.19 |
| DLinear | 15.33 | 14.03 | 28.51 | 17.6 | 18.86 |
| TimesNet | 13.55 | 14.17 | 28.84 | 19.3 | 18.96 |
| PatchTST | 13.22 | 13.06 | 27.10 | 17.3 | 17.67 |
| ETSformer | 27.74 | 16.03 | 180.40 | 44.2 | 67.09 |
| LightTS | 13.62 | 17.90 | 66.99 | 19.6 | 29.52 |
| Stationary | 13.32 | 15.29 | 43.75 | 22.0 | 23.59 |
| FEDformer | 15.04 | 13.53 | 31.55 | 18.4 | 19.63 |
| Autoformer | 20.02 | 15.87 | 40.39 | 33.9 | 27.54 |
| Informer | 19.04 | 15.82 | 35.82 | 21.2 | 22.97 |
| Reformer | 14.09 | 13.37 | 25.48 | 21.6 | 18.63 |
| GPT2(6) | 13.12 | 13.06 | 22.14 | 17.2 | 16.38 |
+
+Effectiveness of Pre-training The results are shown in Table 7, GPT2(6) FPT outperforms both GPT2(0) FPT and GPT2-random-initialized, suggesting that GPT2 with pre-training parameters can achieve improvement on times series tasks. Besides, GPT2(6) FPT performs better than GPT2- unfrozen, demonstrating that partially freezing also helps. Also, results in Appendix H.2 show that random initialized GPT2(6) with freezing performs poorly and the pre-trained knowledge is instrumental for time series tasks.
+
+Table 7: Ablation study on $10 \%$ data. All the results are averaged from 4 different prediction lengths. No Freeze represents GPT2(6) without freezing, No Pretrain represents GPT2(6) without pre-training. Black: best.
+
+| Methods | GPT2(6) | GPT2(0) | No Freeze | No Pretrain |
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE |
| Weather | 0.237 | 0.270 | 0.263 | 0.297 | 0.273 | 0.302 | 0.277 | 0.305 |
| ETTh1 | 0.427 | 0.426 | 0.874 | 0.647 | 0.753 | 0.596 | 1.326 | 0.743 |
| ETTh2 | 0.346 | 0.394 | 0.666 | 0.559 | 0.447 | 0.451 | 0.502 | 0.479 |
+
+# 6 Exploring Transfer Learning from others: The Unexceptional Nature of GPT2-based-FPT
+
+We also present experiments on BERT-backbond FPT Devlin et al. (2019) model and the imagepretrained BEiT-backbone FPT model Bao et al. (2022) to illustrate the generality of pre-trained models for cross-domain knowledge transferring. The results in Table 8 demonstrate that the ability of knowledge transfer is not exclusive to GPT2-based pre-trained language models. Subsequently, our theoretical analysis will shed light on the universality of this phenomenon.
+
+Table 8: Results of frozen pretrained transformer variants on $5 \%$ ETTh2 and ETTm2. All the results are averaged from 4 different prediction lengths. Black: best. Appendix H.5 shows the full results.
+
+| Methods | GPT2(6) | BERT(6) | BEiT(6) | DLinear | PatchTST | FEDformer | Autoformer |
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE |
| ETTh2 | 0.400 | 0.433 | 0.452 | 0.451 | 0.459 | 0.454 | 0.827 | 0.615 | 0.439 | 0.448 | 0.441 | 0.457 | 0.470 | 0.489 |
| ETTm2 | 0.308 | 0.346 | 0.318 | 0.357 | 0.315 | 0.357 | 0.399 | 0.426 | 0.314 | 0.352 | 0.381 | 0.404 | 0.388 | 0.433 |
+
+# 7 Training/Inferencing Cost
+
+Analysis of computational cost is helpful for investigating the practicality of the LLM-based model. The results can be found in table 9. Each baseline model comes in two variants, featuring model hidden dimensions of 32 and 768, which align with GPT-2’s specifications. Furthermore, the majority of the baseline models consist of three layers. We assessed the computational cost using a batch from ETTh2 (with a batch size of 128) on a 32G V100 GPU.
+
+Table 9: Training parameters and Training/Inference Cost Comparison
+
+| Model | | Training Params Training Params Percentages Training Time for l step(s) Inference Time for 1 Batch(s) | | |
| FEDformer-32 | 44k | 100 | 0.889 | 0.170 |
| TimesNet-32 | 2M | 100 | 0.747 | 0.302 |
| PatchTST-32 | 543K | 100 | 0.043 | 0.022 |
| FEDformer-768 | 33M | 100 | 0.208 | 0.056 |
| TimesNet-768 | 42M | 100 | 5.723 | 2.162 |
| PatchTST-768 | 20M | 100 | 0.457 | 0.123 |
| GPT-2(3)-768 | 4M | 6.12 | 0.093 | 0.032 |
| GPT-2(6)-768 | 4M | 4.6 | 0.104 | 0.054 |
+
+The results indicate that GPT-2(3) has substantially enhanced time efficiency and reduced parameter quantity compared to baselines with the same model dimension. This was a surprise since we initially anticipated that this large language model might be slower. However, we surmise that the efficient optimization of huggingface’s GPT model implementation primarily accounts for such a significant improvement in time costs. Furthermore, GPT-2(3) and GPT-2(6) demonstrate a mere $6 . 1 2 \%$ and $4 . 6 0 \%$ proportion of learnable parameters among the overall parameter size, respectively.
+
+# 8 Towards Understanding the Universality of Transformer: Connecting Self-Attention with PCA
+
+The observation, i.e. we can directly use a trained LM for time series forecasting without having to modify its model, makes us believe that the underlying model is doing something very generic and independent from texts despite it being trained from text data. Our analysis aims to show that part of this generic function can be related to PCA, as minimizing the gradient with respect to the self-attention layer seems to do something similar to PCA. In this section, we take the first step towards revealing the generality of self-attention by connecting the self-attention with principal component analysis (PCA). Moreover, when coming the question of why fine-tuning is restricted to the embedding layer and layer norm, following our hypothesis that the pre-trained LM as a whole performs something generic, partially fine-tuning any of its components may break the generic function and lead to relatively poor performance for time series analysis.
+
+For each layer, we calculate and perform statistical analysis of the pairwise token similarity values. Specifically, we denote each output feature map with shape of $( b , n , d )$ , where $b$ is the batch size, $n$ is the number of tokens, and $d$ is the dimension of each token feature. We calculate the cosine similarity, and the resulting pairwise similarity matrix of shape $( b , n , n )$ . Next we count the number of occurrences of similarity values within each interval as a simple statistical analysis.
+
+Our analysis is motivated by the observation that the within-layer token similarity increases with deeper layers in transformer. We report the layer-wise average token cosine similarity on ETTh2 dataset in Figure 4 (a, c), where we mix weights from pre-trained LM with weights randomly sampled from Gaussian distribution. Here we summarize our observations: a) in a randomly initialed GPT2 (6) model, the token similarity is low among all layers $( 0 . 1 - 0 . 2 )$ ; b) when gradually switched to the pretrained GPT2 model, the token similarity significantly increases in the deep layers and eventually reaches more than 0.9 in the last layer. One potential explanation for the increasing token similarity is that all the token vectors are projected into the low-dimensional top eigenvector space of input patterns. To verify this idea, we further conduct experiments where we replace the self-attention module with PCA and find token similarity patterns remain unchanged according to Figure 4 (b), which further justifies the potential connection between PCA and self-attention.
+
+To build the theoretical connection between PCA and self-attention, we first analyze the gradient structure of self-attention. Let $\ b X \ = \ ( x _ { 1 } , \dots , x _ { N } ) ^ { \top } \ \in \ \mathbb { R } ^ { N \times D }$ be the input pattern, and let $f ( X ) \ = \ ( f _ { 1 } ( X ) , \ldots , f _ { N } ( x ) ) ^ { \top } \ : \ \mathbb { R } ^ { N \times D } \ \mapsto \ \mathbb { R } ^ { N \times D }$ be the function for self-attention, i.e., $f _ { i } ( X ) = \operatorname { s o f t m a x } ( X A X ^ { \top } ) X$ where $A = W _ { Q } W _ { K } ^ { \top } \in \mathbb { R } ^ { D \times D }$ .
+
+
+Figure 4: (a, c) The performance and token similarity within samples with respect to each layer with different random mixed ratio. Pre-trained parameters are mixed with random initial parameters according to certain proportions. (b) Token similarity within samples when replacing the attention with PCA.
+
+Lemma 8.1. Let the Jacobian $\begin{array} { l l l } { \boldsymbol { J } } & { = } & { \left[ \frac { \partial f _ { i } ( \boldsymbol { X } ) } { \partial x _ { j } } \right] _ { i , j = 1 } ^ { N } } \end{array}$ represent the gradient $f ( X )$ w.r.t the i $\begin{array} { r l } & { \mathrm { ~ \mathrm { ~ \ r p u t ~ } } \mathrm { ~ \ p a t t e r n , \ t h e n ~ } \mathrm { ~ w e ~ } \mathrm { ~ \ h a v e ~ } \quad | J | _ { 2 } \leq | A | _ { 2 } \sum _ { i = 1 } ^ { N } \left( P _ { i , i } + \frac { 1 } { 2 } \right) \bigg | x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } \bigg | ^ { 2 } + \Delta \quad \mathrm { w h e r e } } \\ & { \Delta = | A | _ { 2 } \sum _ { i \neq j } ^ { N } P _ { i , j } \left| x _ { j } - \sum _ { k = 1 } ^ { N } P _ { i , k } x _ { k } \right| ^ { 2 } + \frac { | A | _ { 2 } } { 2 } \sum _ { j = 1 } ^ { N } | x _ { i } | ^ { 2 } \quad \mathrm { a n d } \quad P _ { i , j } = \frac { \exp ( x _ { i } ^ { \top } A x _ { j } ) } { \sum _ { k = 1 } ^ { N } \exp ( x _ { i } ^ { \top } A x _ { k } ) } \ . } \end{array}$ e
+
+This lemma reveals an important gradient structure of $J$ . The proof of essentially follows the analysis in Kim et al. (2021), and we include it in Appendix $\mathbf { G }$ for completeness.
+
+Using the gradient structure revealedorder to minimize the norm of gradient $| J | _ { 2 }$ emma 8.1, we can connect , we essentially need to make $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } | ^ { 2 } } \end{array}$ $A$ s are centered at 0 (i.e. . $\begin{array} { r } { \sum _ { i = 1 } ^ { N } x _ { i } = 0 ) } \end{array}$ , we have $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } P _ { i , : } | ^ { 2 } \approx \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$
+
+The theorem below shows that $A$ minimizing the objective $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$ contains the largest $m$ eigenvectors of where $m$ is the rank of .
+
+Theorem 1. Let $W _ { Q }$ and $W _ { K }$ be matrices of size $D \times m$ . Let $\lambda _ { 1 } \ \ge \ \lambda _ { 2 } \ \ge \ . . . \ \ge \ \lambda _ { D }$ be the eigenvalues of eigenvectors. $X ^ { \top } X$ ranked in desceptimal solution ng order, and letthat minimize $v _ { i } \in \mathbb { R } ^ { D } , i = 1 , \dots , D$ the correspois given by $A ^ { * }$ $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$ $A =$ $\scriptstyle \sum _ { i = 1 } ^ { m } { \frac { 1 } { \lambda _ { i } } } v _ { i } v _ { i } ^ { \top }$ .
+
+The proof of Theorem 1 can be found in Appendix G. Following Theorem 1, through the training of pushing gradient to zero, self-attention learns to perform a function closely related to PCA.
+
+# 9 Conclusions
+
+In this paper, we developed a foundation model for time series analysis, based on pre-trained model from NLP or CV, that can (a) facilitate the model training for downstream tasks, and (b) provide unified framework for diverse time series analysis tasks. Our empirical studies show that the proposed method performs on par or better than the state-of-the-art approaches on almost all time series tasks. We also examine the universality of transformer by connecting self-attention with PCA, an important step towards understanding how generative models work in practice. On the other hand, we do recognize some limitations of our work: the zero-shot performance of our approach is still behind N-beat on several datasets, and our analysis of the generality of transformer is still in the early stage. Moving forward, we plan to improve the performance of our approach by exploiting the parameter efficient fine-tuning approaches which usually introduce additional structures into the pre-trained model for better adaption. To better understand the universality of transformer, we also plan to examine it from the viewpoint of n-gram language model, an approach that is taken by Elhage et al. (2021); Olsson et al. (2022). In Appendix F, we include our initial analysis along this direction.
+
+# Acknowledgement
+
+We would like to express our sincere gratitude to Ziqing Ma, Qingsong Wen, Mengni Ye, and Tao Yao for their valuable suggestions and proofreading assistance throughout the development of this paper. Their insightful feedback and attention to detail greatly improved the quality and clarity of our work.
+
+# References
+
+Abdulaal, A., Liu, Z., and Lancewicki, T. Practical approach to asynchronous multivariate time series anomaly detection and localization. In Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining, pp. 2485–2494, 2021.
+Bagnall, A., Dau, H. A., Lines, J., Flynn, M., Large, J., Bostrom, A., Southam, P., and Keogh, E. The uea multivariate time series classification archive, 2018. arXiv preprint arXiv:1811.00075, 2018.
+Bao, H., Wang, W., Dong, L., Liu, Q., Mohammed, O. K., Aggarwal, K., Som, S., and Wei, F. Vlmo: Unified vision-language pre-training with mixture-of-modality-experts. arXiv preprint arXiv:2111.02358, 2021.
+Bao, H., Dong, L., Piao, S., and Wei, F. BEit: BERT pre-training of image transformers. In International Conference on Learning Representations, 2022.
+Böse, J.-H., Flunkert, V., Gasthaus, J., Januschowski, T., Lange, D., Salinas, D., Schelter, S., Seeger, M., and Wang, Y. Probabilistic demand forecasting at scale. Proceedings of the VLDB Endowment, 10(12):1694–1705, 2017.
+Box, G. E. and Jenkins, G. M. Some recent advances in forecasting and control. Journal of the Royal Statistical Society. Series C (Applied Statistics), 17(2):91–109, 1968.
+Box, G. E. and Pierce, D. A. Distribution of residual autocorrelations in autoregressive-integrated moving average time series models. Journal of the American statistical Association, 65(332): 1509–1526, 1970.
+Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T. J., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. ArXiv, abs/2005.14165, 2020.
+Challu, C., Olivares, K. G., Oreshkin, B. N., Garza, F., Mergenthaler, M., and Dubrawski, A. N-hits: Neural hierarchical interpolation for time series forecasting. arXiv preprint arXiv:2201.12886, 2022.
+Chen, T. and Guestrin, C. Xgboost: A scalable tree boosting system. KDD ’16, 2016.
+Chung, J., Gulcehre, C., Cho, K., and Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
+Courty, P. and Li, H. Timing of seasonal sales. The Journal of Business, 72(4):545–572, 1999.
+Dempster, A., Petitjean, F., and Webb, G. I. ROCKET: Exceptionally fast and accurate time series classification using random convolutional kernels. Data Mining and Knowledge Discovery, 34(5): 1454–1495, 2020.
+Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), Minneapolis, MN, USA, June 2-7, 2019, pp. 4171–4186, 2019.
+Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. An image is worth 16x16 words: Transformers for image recognition at scale. In 9th International Conference on Learning Representations (ICLR), Austria, May 3-7, 2021, 2021.
+Elhage, N., Nanda, N., Olsson, C., Henighan, T., Joseph, N., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., DasSarma, N., Drain, D., Ganguli, D., Hatfield-Dodds, Z., Hernandez, D., Jones, A., Kernion, J., Lovitt, L., Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. A mathematical framework for transformer circuits. Transformer Circuits Thread, 2021. https://transformer-circuits.pub/2021/framework/index.html.
+Franceschi, J.-Y., Dieuleveut, A., and Jaggi, M. Unsupervised scalable representation learning for multivariate time series. Advances in neural information processing systems, 32, 2019.
+Friedman, M. The interpolation of time series by related series. J. Amer. Statist. Assoc, 1962.
+Gao, J., Song, X., Wen, Q., Wang, P., Sun, L., and Xu, H. RobustTAD: Robust time series anomaly detection via decomposition and convolutional neural networks. KDD Workshop on Mining and Learning from Time Series (KDD-MileTS’20), 2020.
+Giannou, A., Rajput, S., Sohn, J.-y., Lee, K., Lee, J. D., and Papailiopoulos, D. Looped Transformers as Programmable Computers. arXiv e-prints, art. arXiv:2301.13196, January 2023. doi: 10.48550/ arXiv.2301.13196.
+Godahewa, R., Bergmeir, C., Webb, G. I., Hyndman, R. J., and Montero-Manso, P. Monash time series forecasting archive. In Neural Information Processing Systems Track on Datasets and Benchmarks, 2021.
+Gu, A., Goel, K., and Ré, C. Efficiently modeling long sequences with structured state spaces. arXiv preprint arXiv:2111.00396, 2021.
+Hochreiter, S. and Schmidhuber, J. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
+Houlsby, N., Giurgiu, A., Jastrzebski, S., Morrone, B., De Laroussilhe, Q., Gesmundo, A., Attariyan, M., and Gelly, S. Parameter-efficient transfer learning for nlp. In International Conference on Machine Learning, pp. 2790–2799. PMLR, 2019.
+Huang, Z., Shi, X., Zhang, C., Wang, Q., Cheung, K. C., Qin, H., Dai, J., and Li, H. Flowformer: A transformer architecture for optical flow. In Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XVII, pp. 668–685. Springer, 2022.
+Hundman, K., Constantinou, V., Laporte, C., Colwell, I., and Soderstrom, T. Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 387–395, 2018.
+Hyndman, R. and Athanasopoulos, G. Forecasting: Principles and Practice. OTexts, Australia, 3rd edition, 2021.
+Ismail Fawaz, H., Forestier, G., Weber, J., Idoumghar, L., and Muller, P.-A. Deep learning for time series classification: a review. Data Mining and Knowledge Discovery, 33(4):917–963, 2019.
+Kim, H., Papamakarios, G., and Mnih, A. The lipschitz constant of self-attention. In International Conference on Machine Learning, pp. 5562–5571. PMLR, 2021.
+Kim, T., Kim, J., Tae, Y., Park, C., Choi, J.-H., and Choo, J. Reversible instance normalization for accurate time-series forecasting against distribution shift. In International Conference on Learning Representations, 2022.
+Kitaev, N., Kaiser, L., and Levskaya, A. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020.
+Lacoste-Julien, S., Schmidt, M., and Bach, F. A simpler approach to obtaining an o (1/t) convergence rate for the projected stochastic subgradient method. arXiv preprint arXiv:1212.2002, 2012.
+Lai, G., Chang, W.-C., Yang, Y., and Liu, H. Modeling long-and short-term temporal patterns with deep neural networks. In The 41st international ACM SIGIR conference on research & development in information retrieval, pp. 95–104, 2018.
+Lim, B., Arık, S. Ö., Loeff, N., and Pfister, T. Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 2021.
+Liu, S., Yu, H., Liao, C., Li, J., Lin, W., Liu, A. X., and Dustdar, S. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In International conference on learning representations, 2021.
+Liu, Y., Wu, H., Wang, J., and Long, M. Non-stationary transformers: Exploring the stationarity in time series forecasting. In Advances in Neural Information Processing Systems, 2022.
+Lu, K., Grover, A., Abbeel, P., and Mordatch, I. Frozen pretrained transformers as universal computation engines. Proceedings of the AAAI Conference on Artificial Intelligence, 36(7): 7628–7636, Jun. 2022.
+Makridakis, S., Spiliotis, E., and Assimakopoulos, V. The m4 competition: Results, findings, conclusion and way forward. International Journal of Forecasting, 34(4):802–808, 2018.
+Mathur, A. P. and Tippenhauer, N. O. Swat: A water treatment testbed for research and training on ics security. In 2016 international workshop on cyber-physical systems for smart water networks (CySWater), pp. 31–36. IEEE, 2016.
+Nie, Y., Nguyen, N. H., Sinthong, P., and Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. ArXiv, abs/2211.14730, 2022.
+Olsson, C., Elhage, N., Nanda, N., Joseph, N., DasSarma, N., Henighan, T., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., Drain, D., Ganguli, D., Hatfield-Dodds, Z., Hernandez, D., Johnston, S., Jones, A., Kernion, J., Lovitt, L., Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. In-context learning and induction heads. Transformer Circuits Thread, 2022. https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html.
+OpenAI. Gpt-4 technical report. ArXiv, abs/2303.08774, 2023.
+Oreshkin, B. N., Carpov, D., Chapados, N., and Bengio, Y. N-beats: Neural basis expansion analysis for interpretable time series forecasting. arXiv preprint arXiv:1905.10437, 2019.
+Oreshkin, B. N., Carpov, D., Chapados, N., and Bengio, Y. Meta-learning framework with applications to zero-shot time-series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, number 10, pp. 9242–9250, 2021.
+Radford, A. and Narasimhan, K. Improving language understanding by generative pre-training. 2018.
+Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. Language models are unsupervised multitask learners. 2019.
+Rao, Y., Zhao, W., Zhu, Z., Lu, J., and Zhou, J. Global filter networks for image classification. Advances in Neural Information Processing Systems (NeurIPS), 34, 2021.
+Su, Y., Zhao, Y., Niu, C., Liu, R., Sun, W., and Pei, D. Robust anomaly detection for multivariate time series through stochastic recurrent neural network. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 2828–2837, 2019.
+Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., and Jégou, H. Training data-efficient image transformers & distillation through attention. In International Conference on Machine Learning, pp. 10347–10357. PMLR, 2021.
+Vardi, G., Yehudai, G., and Shamir, O. On the optimal memorization power of relu neural networks. arXiv preprint arXiv:2110.03187, 2021.
+Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser Lukasz, and Polosukhin, I. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
+Wang, P., Wang, X., Wang, F., Lin, M., Chang, S., Li, H., and Jin, R. Kvt: k-nn attention for boosting vision transformers. In Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXIV, pp. 285–302. Springer, 2022.
+Wang, T. and Isola, P. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. ArXiv, abs/2005.10242, 2020.
+Wen, Q., Yang, L., Zhou, T., and Sun, L. Robust time series analysis and applications: An industrial perspective. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 4836–4837, 2022.
+Wen, Q., Zhou, T., Zhang, C., Chen, W., Ma, Z., Yan, J., and Sun, L. Transformers in time series: A survey. In International Joint Conference on Artificial Intelligence(IJCAI), 2023.
+Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., Davison, J., Shleifer, S., von Platen, P., Ma, C., Jernite, Y., Plu, J., Xu, C., Scao, T. L., Gugger, S., Drame, M., Lhoest, Q., and Rush, A. M. Transformers: State-of-theart natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pp. 38–45, Online, October 2020. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/2020. emnlp-demos.6.
+Woo, G., Liu, C., Sahoo, D., Kumar, A., and Hoi, S. Etsformer: Exponential smoothing transformers for time-series forecasting. arXiv preprint arXiv:2202.01381, 2022.
+Wu, H., Xu, J., Wang, J., and Long, M. Autoformer: Decomposition transformers with autocorrelation for long-term series forecasting. In Advances in Neural Information Processing Systems (NeurIPS), pp. 101–112, 2021.
+Wu, H., Hu, T., Liu, Y., Zhou, H., Wang, J., and Long, M. Timesnet: Temporal 2d-variation modeling for general time series analysis. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id $\equiv$ ju_Uqw384Oq.
+Xu, J., Wu, H., Wang, J., and Long, M. Anomaly transformer: Time series anomaly detection with association discrepancy. arXiv preprint arXiv:2110.02642, 2021.
+Yang, C.-H. H., Tsai, Y.-Y., and Chen, P.-Y. Voice2series: Reprogramming acoustic models for time series classification. In International Conference on Machine Learning, pp. 11808–11819, 2021.
+Yun, C., Chang, Y.-W., Bhojanapalli, S., Rawat, A. S., Reddi, S., and Kumar, S. O (n) connections are expressive enough: Universal approximability of sparse transformers. Advances in Neural Information Processing Systems, 33:13783–13794, 2020.
+Zeng, A., Chen, M., Zhang, L., and Xu, Q. Are transformers effective for time series forecasting? 2023.
+Zhang, T., Zhang, Y., Cao, W., Bian, J., Yi, X., Zheng, S., and Li, J. Less is more: Fast multivariate time series forecasting with light sampling-oriented mlp structures. arXiv preprint arXiv:2207.01186, 2022.
+Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., and Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of AAAI, 2021.
+Zhou, T., Ma, Z., Wen, Q., Wang, X., Sun, L., and Jin, R. FEDformer: Frequency enhanced decomposed transformer for long-term series forecasting. In Proc. 39th International Conference on Machine Learning (ICML 2022), 2022.
+
+# A Visualization
+
+In order to clarify the representation ability more clearly, Figure 5 provides showcases of imputation, long-term forecasting and few-shot forecasting. Especially for few-shot learning, GPT2(6) can accurately forecast, while TimesNet and DLinear fail in this task.
+
+
+Figure 5: Visualization of imputation, long-term forecasting and few-shot forecasting.
+
+# B Related Works
+
+We have presented a novel general time series analysis model in this paper, and to the best of our knowledge, there has been limited work on similar comprehensive methods for time series analysis. The most closely related field is time series forecasting, where transformer models have gained widespread popularity. Therefore, our focus in this related work will primarily be on introducing the end-to-end time series forecasting method.
+
+Time series forecasting models can be roughly divided into three categories, ranging from the classic ARIMA models to the most recent transformer models. The first generation of well-discussed models can be dated back to auto-regressive family, such as ARIMA Box & Jenkins (1968); Box & Pierce (1970) that follows the Markov process and recursively execute sequential forecasting. However, it is limited to stationary sequences while most time series is non-stationary. Additionally, with the bloom of deep neural networks, recurrent neural networks (RNNs), such as LSTM Hochreiter & Schmidhuber (1997) and GRU Chung et al. (2014), were designed for sequential tasks. Yet the recurrent model is inefficient for training and long-term dependencies are still under resolved.
+
+Recently, transformer models have achieve great progress in NLP Vaswani et al. (2017); Devlin et al. (2019); Radford et al. (2019) and CV Dosovitskiy et al. (2021); Bao et al. (2022) tasks. Also, a large amount of transformer models are proposed to apply to time series forecasting Wen et al. (2023). In the following, we briefly introduce several representative algorithms. Informer Zhou et al. (2021)
+
+proposes a probability sparse attention mechanism to deal with long-term dependencies. Autoformer Wu et al. (2021) introduces a decomposition transformer architecture and replaces the attention module with an Auto-Correlation mechanism. FEDformer Zhou et al. (2022) uses Fourier enhanced structure to improve computational efficiency and achieves linear complexity. Similar to patching in ViT Dosovitskiy et al. (2021), PatchTST Nie et al. (2022) employs segmentation of time series that divide a sequence into patches to increase input length and reduce information redundancy. Besides, a simple MLP-based model DLinear Zeng et al. (2023) outperforms most transformer models and it validates channel-independence works well in time series forecasting. Recently, TimesNet Wu et al. (2023) has treated time series as a 2D signal and utilized a convolution-based inception net backbone to function as a comprehensive time series analysis model. This work is closely related to our tasks in this paper.
+
+# C Dataset Details
+
+In this section, we separately summarize dataset details long/short-term forecasting and few-shot/zeroshot forecasting.
+
+Datasets of Long-term Forecasting and Few-shot Learning The details of datasets are shown as follows: 1) ETT datasets Zhou et al. (2021) contain electricity load of various resolutions (ETTh & ETTm) from two electricity stations. 2) Weather contains 21 meteorological indicators of Germany within 1 year; 3) Illness contains the influenza-like illness patients in the United States; 4) Electricity dataset contains the electricity consumption; 5) Traffic dataset contains the occupation rate of freeway system across the State of California. Table 10 summarizes details of feature statistics.
+
+Similar to PatchTST Nie et al. (2022), Exchange is not contained. Zeng et al. (2023) shows that simply repeating the last value in the look-back window can outperform or be comparable to the best results. Also, ILI is not used for few-shot learning for the limited quantity that is hard to follow the definition of few-shot.
+
+Table 10: Dataset details of few-shot learning.
+
+| Dataset | Length | Dimension | Frequency |
| ETTh | 17420 | 7 | 1 hour |
| ETTm | 69680 | 7 | 15 min |
| Weather | 52696 | 22 | 10 min |
| ILI | 966 | 7 | 7 days |
| Electricity | 26304 | 321 | 1 hour |
| Traffic | 17544 | 862 | 1 hour |
+
+Datasets of Short-term Forecasting and Zero-shot Learning The details of short-term forecasting and zero-shot learning datasets are shown as follows: 1) M4 is a large and diverse dataset that contains time series of various frequencies and fields, including business, financial and economic forecasting; 2) M3 is smaller than M4, but also contains time series from diverse domains and frequencies; 3) TOURISM is the dataset of tourism activities with different frequencies and contains a much higher fraction of erratic series compared with M4; 4) ELECTR represents the electricity usage monitoring of 370 customers over three years. Table 6 summarizes details of the datasets and zero-shot mapping between source and target.
+
+# D Experimental Details
+
+All the deep learning networks are implemented in PyTorch and trained on NVIDIA V100 32GB GPUs. We use the pre-trained models from Wolf et al. (2020) for experiments. For few-shot learning, an early stopping counter is employed to stop the training process after three epochs if no loss degradation on the valid set is observed. Plus, we convert the multivariate data into univariate data. Specifically, we treat each feature of the sequence as a single time series. This is mainly for memory efficiency after patching of GPT2(6) and previous works, DLinear and PatchTST, have proved the effectiveness of channel-independence.
+
+Table 11: Datasets and mapping details of zero-shot learning.
+
+ | Dataset | Mapping |
| Length | Horizon | M4 | M3 |
| M3 Yearly | 645 | 6 | Yearly | - |
| M3 Quarterly | 756 | 8 | Quarterly | |
| M3 Monthly | 1428 | 18 | Monthly | |
| M3 Others | 174 | 8 | Monthly | - |
| M4 Yearly | 23000 | 6 | | Yearly |
| M4 Quarterly | 24000 | 8 | | Quarterly |
| M4 Monthly | 48000 | 18 | | Monthly |
| M4 Weekly | 359 | 13 | | Monthly |
| M4 Daily | 4227 | 14 | | Monthly |
| M4 Hourly | 414 | 48 | | Monthly |
| TOURISM Yearly | 518 | 4 | Yearly | Yearly |
| TOURISMQuarterly | 427 | 8 | Quarterly | Quarterly |
| TOURISMMonthly | 366 | 24 | Monthly | Monthly |
| ELECTR | 1311 | 168 | Hourly | Monthly |
+
+# D.1 Accuracy Metrics
+
+For long-term/short-term forecasting and few-shot forecasting, we use mean square error (MSE) and mean absolute error (MAE) as metrics. For zero-shot learning, mean absolute percentage error (MAPE) is used for TOURISM; symmetric MAPE (sMAPE) is used for M3 and M4; normalized deviation (ND) is used for ELECTR. All experiments are repeated 3 times and the mean of the metrics is used in the final results.
+
+# D.2 Detailed Definition and Results for Few-shot and Long-term Forecasting
+
+Task Definition Since Zeng et al. (2023) and Nie et al. (2022) have verified that channel-independence works well for time series datasets, we treat each multivariate series as multiple independent univariate series. Similar to traditional experimental settings, each time series is split into three parts: training data, validation data, and test data. For the few-shot forecasting task, only a certain percentage $( 5 \%$ , $1 0 \%$ ) timesteps of training data are used, and the other two parts remain unchanged. The evaluation metrics remain the same as for classic multivariate time series forecasting. We repeat this experiment 3 times and report the average metrics in the following experiments.
+
+Detail Experiment Tables for Few-shot Time-Series Forecasting in Table 12 and Table 13
+
+Table 12: Few-shot learning results on $5 \%$ data. We use prediction length $O \in \{ 9 6 , 1 9 2 , 3 3 6 , 7 2 0 \}$ . A lower MSE indicates better performance, and the best results are highlighted in bold. ’-’ means that $5 \%$ time series is not sufficient to constitute a training set.
+
+| Methods | GPT2(6) | | GPT2(0) | DLinear | PatchTST | TimesNet | FEDformer | Autoformer | Stationary | | ETSformer | LightTS | | Informer | Reformer |
| Metric | MSEMAE| | MSE | MAE MSE | MAE | |MSEMAE | MSEMAE| | MSE MAE | MSE MAE | MSE | MAE | MSEMAE| | MSEMAE | MSEMAE| | | MSEMAE |
| 96 0.175 | 0.230 0.191 0.276 | 0.243 0.2440.289 | 10.184 0.242 0.2280.283 | 10.171 0.224 0.2300.277 | 0.207 0.253 0.272 0.307 | [0.2290.309 0.2650.317 | 0.227 0.299 0.278 0.333 | 0.215 0.290 | 0.252 | 0.218 0.295 | 0.230 0.285 | 0.497 | 0.497 | [0.406 0.435 |
| Waaeet | 192 0.227 336 0.2860.322 720 0.366 | 0.379 0.391 | 0.3030.332 0.393 | 0.2790.322 0.364 40.388 | 0.2940.326 0.384 0.387 | 0.313 0.328 0.400 0.385 | 0.3530.392 0.391 0.394 | 0.351 0.393 0.387 0.389 | 0.353 0.452 | 0.307 0.348 0.407 | 0.2940.331 0.3590.398 0.461 0.461 | 0.2740.323 0.3180.355 0.401 | 0.418 | 0.620 0.545 0.6490.547 0.570 0.522 | 0.4460.450 0.4650.459 0.471 0.468 |
| Avg. 0.263 96 0.5430.506 | 0.301 | 0.2820.314 0.8250.638 | 0.2630.308 0.5470.503 | 0.2690.303 0.5570.519 | 0.298 0.318 0.892 0.625 | 0.3090.353 0.5930.529 | 0.310 0.353 0.6810.570 | 0.327 0.9520.650 | 0.328 | 0.333 0.371 1.169 0.832 | 0.305 0.345 1.483 0.91 | 0.5840.527 1.2250.812 | | 0.4470.453 1.1980.795 |
| LLI | 192 0.7480.580 336 0.7540.595 720 | 1.2200.778 | 1.852 0.965 | 0.7200.604 0.9840.727 | 0.711 0.570 0.8160.619 | 0.940 0.665 0.9450.653 | 0.652 0.563 0.7310.594 | 0.7250.602 0.761 0.624 | 0.9430.645 0.9350.644 | | 1.221 0.853 1.1790.832 | 1.525 0.93 1.347 0.87 | 1.249 0.828 1.202 0.811 | | 1.2730.853 1.2540.857 |
| Avg. 0.681 | 0.560 | 1.2990.793 0.551 0.507 | 0.750 0.611 10.4420.456 | 0.6940.569 0.4010.421 | 0.9250.647 0.409 0.420 | 0.658 0.562 |0.390 0.424 | 0.722 0.598 | 0.9430.646 | | 1.189 0.839 | 1.451( | 0.903 1.225 | 0.817 | 1.241 0.835 |
| LLI | 96 [0.376 0.421 192 0.418 0.441 | | 0.7650.610 0.617 | 0.542 | 0.452 0.455 | 0.4830.464 | 0.457 0.465 | 0.4280.468 0.4960.504 | 0.4080.423 0.497 | | 0.6780.619 0.697 | 2.022 | 1.006 3.837 3.975 | 1.508 | 3.7531.518 3.5161.473 |
| 336 0.4080.439 | | 0.7670.614 | 1.424 0.849 | 0.4640.469 | 0.499 0.479 | 0.477 0.483 | 0.486 0.496 | 0.507 0.481 | 0.468 | 0.845 0.9050.727 | 3.534 | 1.348 | 1.933 3.9561.520 | 3.3121.427 |
| 720 | | | | | | | | | | | 4.063 | 1.451 | | |
| Avg. 0.4000.433 | 0.6940.577 | 0.827 | 0.615 | 0.4390.448 | 0.4630.454 | 0.4410.457 | 0.47 0.489 | 0.470 0.457 | | | | | | 3.527 1.472 |
| | 0.582 | 0.512 0.332 | 0.374 | 0.3990.414 | 0.606 0.518 | 0.6280.544 | 50.578 | | | 0.809 0.681 | 3.206 | 1.268 3.922 | 1.653 | |
| 96 0.386 0.405 0.4400.438 | 0.6320.536 | | 0.3580.390 | 0.4410.436 | 0.681 0.539 | 0.6660.566 | 0.726 | 0.823 | 0.587 | 1.031 0.747 | | 1.0480.733 | 1.130 0.775 | 1.2340.798 |
| LL | 192 336 0.4850.459 | 0.767 | 0.584 | 0.4020.416 | 0.4990.467 | 0.7860.597 | 0.8070.628 | 0.7500.591 0.851 | 0.8440.591 0.8700.603 | | 1.0870.766 | | 1.0970.756 | 1.150 0.788 | 1.287 0.839 |
| 720 0.577 | 0.499 1.3340.742 | | 0.5110.489 | 0.767 0.587 | 0.7960.593 | 0.8220.633 | 0.659 0.857 0.655 | 0.8930.611 | | 1.1380.787 | 1.1470.775 | | 1.198 0.809 | 1.2880.842 |
| Avg. 0.472 0.450 | 0.828 0.593 | | 0.4000.417 | 0.5260.476 | 0.717 0.561 | 0.730 0.592 | 0.7960.620 | 0.857 | | 1.2450.831 | 1.200 0.799 | | 1.175 0.794 | 1.2470.828 |
| | | | | | | | | | 0.598 | 1.1250.782 | 1.1230.765 | | 1.1630.791 | 1.2640.826 |
| 96 [0.1990.280 | [0.282 0.347 0.3460.383 | | 0.236 0.326 | 0.2060.288 | [0.220 0.299| | [0.229 0.320 | 0.232 0.322 | 0.2380.316 | | 0.4040.485 | 1.1080.772 | | 3.5991.478 | 3.883 1.545 |
| 192 0.2560.316 | 0.4290.427 | | 0.3060.373 0.3800.423 | 0.2640.324 | 0.311 0.361 | 0.3940.361 | 0.291 0.357 | 0.2980.349 | | 0.4790.521 | 1.317 0.850 | | 3.5781.475 | 3.5531.484 |
| L | 336 0.3180.353 | 0.751 0.568 | | 0.6740.583 | 0.334 0.367 | 0.338 0.366 | 0.378 0.427 | 0.478 30.517 | 0.353 0.380 | | 0.552 0.555 | 1.415 0.879 | 3.561 | 1.473 | 3.4461.460 |
| 720 0.460 0.436 | 0.4520.431 | | | 0.4540.432 | 0.5090.465 | 0.523 0.510 | 0.553 0.538 | 0.475 | 0.445 | 0.7010.627 | 1.8220.984 | 3.896 | 1.533 | 3.4451.460 |
| Avg. 0.3080.346 | | | 0.3990.426 | 0.314 0.352 | 0.3440.372 | 0.381 0.404 | 0.388 30.433 | 0.341 | 0.372 | 0.5340.547 | 1.4150.871 | 3.658 | 1.489 | 3.5811.487 |
| 96 [0.1430.241 | [0.1470.246 | | 0.1500.251 | 0.1450.244 | 0.315 0.389 | [0.235 0.322 | 0.2970.367 | 0.4840.518 | | | | | | |
| GCI | 192 0.159 0.255 | 0.1630.260 | | 0.1630.263 | 0.163 0.260 | 0.318 0.396 | 0.2470.341 | 0.3080.375 | 0.501 0.531 | | 0.697 0.638 | | 10.639 0.609 | 1.265 0.919 | 1.4140.855 |
| | 0.1820.278 | | 0.1750.278 | 0.281 | 0.3400.415 | 0.267 0.356 | 0.3540.411 | 0.574 | | 0.7180.648 | | 0.772 0.678 | 1.298 0.939 | 1.2400.919 |
| 336 0.1790.274 | | | 0.2190.311 | 0.183 | | | 0.4260.466 | 0.9520.786 | 0.578 | 0.758 0.667 | | 0.9010.745 | 1.3020.942 | 1.2530.921 |
| 720 0.2330.323 | 0.2390.329 | | | 0.2330.323 | 0.6350.613 | 0.3180.394 | 0.3460.404 | 0.627 | | 1.0280.788 | 1.2000.871 | | 1.2590.919 1.281 0.929 | 1.2490.921 1.2890.904 |
| mffoi | Avg. 0.1780.273 | 0.1820.278 0.419 0.298 | 0.4680.354 10.427 | 0.1760.275 0.304 | 0.181 0.277 0.4040.286 | 0.402 0.453 0.8540.492 | 0.266 0.353 [0.6700.421 | 0.7950.481 0.8370.503 | 1.4680.821 | 0.603 1.6430.855 | 0.800 0.685 | 0.878 0.725 1.1570.636 |
+
+Table 13: Few-shot learning results on $10 \%$ data. We use prediction length $O \in \{ 9 6 , 1 9 2 , 3 3 6 , 7 2 0 \}$ . A lower MSE indicates better performance, and the best results are highlighted in bold. ’-’ means that $10 \%$ time series is not sufficient to constitute a training set.
+
+| Methods | GPT2(6) | GPT2(0) | DLinear | PatchTST | TimesNet | FEDformer | Autoformer | Stationary | | ETSformer | LightTS | Informer | Reformer |
| Metric | MSEMAE | MSE MAE | MSE | MAE MSE | MAE MSEMAE| | MSEMAE| | MSEMAE | MSE | MAE| MSE | MAE | |MSE MAE| | |MSE MAE| | MSEMAE |
| 96 0.163( | 0.215 0.1900.240 | 0.171 0.224 | 0.165 0.215 | 0.184 0.230 | 0.1880.253 | 0.221 0.297 | 0.192 0.234 | 0.199 | 0.272 10.217 | 0.269 | 0.3740.401 | 0.3350.380 |
| 192 0.2100.254 | 0.2430.284 | 0.215 50.263 | 0.2100.257 | 0.245 0.283 | 0.2500.304 | 0.2700.322 | 0.269 | 0.295 0.279 | 0.332 0.259 | 0.304 | 0.5520.478 | 0.5220.462 |
| Waaeet | 336 0.2560.292 | 0.270 0.305 | 0.258 0.299 | 0.259 0.297 | 0.305 0.321 | 0.312 0.346 | 0.320 0.351 | 0.370 0.357 | 0.356 0.386 | 0.303 | 0.334 | 0.7240.541 | 0.7150.535 |
| 720 0.321 0.339 | 0.348 0.359 | 0.320 0.346 | 0.332 0.346 | 0.381 0.371 | 0.387 0.393 | 0.390 0.396 | 0.441 | 0.405 0.437 | 0.448 0.377 | 0.382 | 0.7390.558 | 0.611 0.500 |
| Avg. 0.238 0.275 | 0.263 0.297 | 0.241 0.283 | 0.242 0.279 | 0.279 0.301 | 0.284 0.324 | 0.3000.342 | 0.318 0.323 | 0.3180.360 | 0.289 | 0.322 | 0.597 0.495 | 0.5460.469 |
| 96 0.4580.456 | 0.601 0.536 | 0.4920.495 | 0.5160.485 | 0.861 0.628 | 0.5120.499 | 0.6130.552 | 0.9180.639 | 1.1120.806 | 1.298 | 0.838 | 1.1790.792 | 1.1840.790 |
| LLI | 192 0.570 0.516 | 0.7090.587 0.535 0.801 | 0.565 0.538 | 0.598 0.524 | 0.797 0.593 | 0.624 0.555 | 0.722 0.598 | 0.915 | 0.629 1.155 | 0.823 1.322 | 0.854 | 1.199 0.806 | 1.2950.850 |
| 336 0.608 | 1.3850.831 | 0.635 0.721 0.622 | 0.657 0.550 | 0.941 0.648 | 0.691 0.574 | 0.750 0.619 | 0.939 | 0.644 1.179 | 0.832 1.347 | 0.870 | 1.202 0.811 | 1.2940.854 |
| 720 0.7250.591 0.5900.525 | 0.8740.647 | 0.986 0.743 | 0.762 0.610 | 0.877 0.641 | 0.7280.614 | 0.721 0.616 | 0.887 | 0.645 1.273 | 0.874 1.534 | 0.947 | 1.2170.825 | 1.2230.838 |
| Avg. | | 0.691 0.600 | 0.633 0.542 | 0.869 0.628 | 0.6390.561 | 0.702 0.596 | 0.915 | 0.639 1.180 0.834 | 1.375 | 0.877 | 1.199 0.809 | 1.2490.833 |
| 96 0.331 | 0.374 0.5390.495 | 0.357 0.411 | 0.353 0.389 | 0.378 0.409 | [0.382 0.416 | 0.413 0.451 | 0.3890.411 | 0.6780.619 | 2.022 | 1.006 | 3.837 1.508 | 3.788 1.533 |
| LLE | 192 0.402 | 0.411 0.6750.555 | 0.569 0.519 | 0.4030.414 | 0.490 0.467 | 0.4780.474 | 0.4740.477 | 0.473 | 0.455 0.7850.666 | 2.329 | 1.104 | 3.856 1.513 | 3.552 1.483 |
| 336 0.4060.433 | 0.718 0.580 | 0.671 0.572 | 0.4260.441 | 0.5370.494 | 0.5040.501 | 0.547 0.543 | 0.5070.480 | 0.8390.694 | 2.453 | 1.122 | 3.952 1.526 | 3.395 1.526 |
| 720 0.4490.464 Avg. 0.3970.421 | 0.732 0.605 | 0.824 0.648 | 0.477 0.480 | 0.5100.491 | 0.4990.509 | 0.5160.523 | 0.477 | 0.472 1.2730.874 | 3.816 | 1.407 | 3.842 1.503 | 3.205 1.401 |
| | 0.6660.559 | 0.605 0.538 | 0.415 0.431 | 0.4790.465 | 0.4660.475 | 0.4880.499 | 0.462 | 0.455 0.894 | 0.713 2.655 | 1.160 | 3.872 1.513 | 3.485 1.486 |
| L | 96 0.390 0.404 | [0.610 0.508 | 0.352 0.392 | [0.410 0.419 | 0.583 0.501 | 0.578 0.518 | [0.7740.614 | 0.761 | 0.568 0.911 | 0.688 0.921 | 0.682 | 1.162 0.785 | 1.4420.847 |
| 192 0.4290.423 336 0.4690.439 | 0.6660.540 | 0.3820.412 | 0.437 0.434 | 0.630 0.528 | 0.6170.546 | 0.7540.592 | 0.781 | 0.574 0.955 | 0.703 0.957 | 0.701 | 1.1720.793 | 1.4440.862 |
| 720 0.5690.498 | 0.895 0.615 0.9160.646 | 0.419 0.434 | 0.476 0.454 | 0.7250.568 | 0.9980.775 | 0.8690.677 | 0.803 | 0.587 0.991 | 0.719 0.998 | 0.716 | 1.227 0.908 | 1.450 0.866 |
| Avg. 0.4640.441 | 0.7720.577 | 0.4900.477 | 0.681 0.556 | 0.769 0.549 | 0.6930.579 0.722 0.605 | 0.810 0.630 | 0.844 0.581 | 1.062 | 0.747 1.007 | 0.719 | 1.207 0.797 | 1.366 0.850 |
| 96 [0.1880.269 | | 0.411 0.429 | 0.501 0.466 | 0.677 0.537 | | 0.802 0.628 | 0.797 0.578 | 0.980 0.714 | 0.971 | 0.705 | 1.192 0.821 | 1.4260.856 |
| L | 192 0.251 0.309 | 0.2830.344 | 0.2130.303 | 0.191 0.274 | 0.212 0.285 | 0.291 0.399 | 10.3520.454 | 0.2290.308 | 0.331 | 0.430 0.813 | 0.688 | 3.2031.407 | 4.1951.628 |
| 336 0.3070.346 | 0.353 0.384 | 0.278 0.345 | 0.252 0.317 | 0.270 0.323 | 0.3070.379 | 0.694 0.691 | 0.291 0.343 | 0.400 0.464 | 1.008 | 0.768 | 3.112 1.387 | 4.042 1.601 |
| 720 0.4260.417 | 0.4200.422 | 0.3380.385 | 0.306 0.353 | 0.323 0.353 | 0.5430.559 | 2.408 1.407 | 0.348 0.376 | 0.469 | 0.498 1.031 | 0.775 | 3.255 1.421 | 3.963 1.585 |
| 0.2930.335 | 0.5530.491 | 0.4360.440 | 0.433 0.427 | 0.4740.449 | 0.7120.614 | 1.913 1.166 | 0.461 0.438 | 0.5890.557 | 1.096 | 0.791 | 3.9091.543 | 3.7111 1.532 |
| Avg. | 0.4020.410 | 0.3160.368 | 0.296 0.343 | 0.320 0.353 | 0.4630.488 | 1.342 0.930 | 0.332 0.366 | 0.4470.487 | 0.987 | 0.756 | 3.370 1.440 | 3.978 1.587 |
| 96 [0.139 0.237 | 0.142 0.240 | 0.1500.253 | 0.140 0.238 | 0.2990.373 | 0.231 0.323 | 0.261 0.348 | 0.420 0.466 | 0.5990.587 | 0.3500.425 | | | |
| ECE | 192 0.1560.252 | 0.1580.254 | 0.164 0.264 | 0.160 0.255 | 0.3050.379 | 0.261 0.356 | 0.338 0.406 | 0.411 0.459 | 0.620 0.598 | 0.376 | 0.448 | 1.259 0.919 | 0.9930.784 |
| 336 0.1750.270 | 0.1750.271 | 0.181 0.282 | 0.180 0.276 | 0.319 0.391 | 0.360 0.445 | 0.410 0.474 | 0.4340.473 | 0.6620.619 | 0.4280.485 | | 1.1600.873 1.1570.872 | 0.938 0.753 0.925 0.745 |
| 720 0.2330.317 | 0.2300.315 | 0.2230.321 0.180 0.280 | 0.241 0.323 0.180 0.273 | 0.369 0.426 0.323 0.392 | 0.5300.585 0.3460.427 | 0.7150.685 0.431 0.478 | 0.510 0.521 0.4440.480 | 0.7570.664 0.6600.617 | 0.611 0.441 | 0.597 0.489 1.1950.891 | 1.2030.898 | 1.0040.790 |
| Tffoos | Avg. 0.1760.269 96 0.4140.297 | 0.1760.270 0.478 0.368 |
+
+# D.3 Long-term Time-series Forecasting
+
+Here we investigate whether our architecture performs consistently well with more training data. Thus, we follow the classical experiment settings of Nie et al. (2022) and conduct experiments on full data. The results are shown in Table 14. Overall, GPT2(6) FPT achieves comparable performance to PatchTST, Dlinear and outperforms other baselines by a large margin. Compared with the second best transformer-based baseline method FEDformer, GPT2(6) FPT yields an overall $1 8 . 7 \%$ relatively MSE reduction. It verifies the effectiveness of NLP pretrained model in time series forecasting, not limited to the few-shot setting.
+
+# Detail Experiment Table for Long-term Time-Series Forecasting in table 14
+
+Table 14: Full results on full data. We use prediction length $O \in \{ 9 6 , 1 9 2 , 3 3 6 , 7 2 0 \}$ for ILI and $O \in \{ 2 4 , 3 6 , 4 8 , 6 0 \}$ for others. A lower MSE indicates better performance. Black: best, Red: second best.
+
+| Methods | | GPT2(6) | GPT2(0) DLinear | PatchTST | TimesNet | FEDformer | Autoformer Stationary | ETSformer | LightTS | Informer | Reformer |
| Metric | MSEMAE| | MSE | MAE | | MSE MAE | MSEMAE | MSEMAE | MSEMAE| | MSEMAE | MSEMAE | |MSEMAE | MSEMAE | | MSEMAE |
| 96 0.162 0.204 | 20.212 0.181 0.248 0.222 | 0.232 0.266 | 0.176 0.220 | 0.237 0.149 0.198 0.282 | 0.172 | 0.220 0.2190.261 | 0.217 0.296 0.2760.336 | 0.2660.336 | MSEMAE| 0.173 0.223 | [0.197 0.281 | 0.182 | 0.242 0.3000.384 | | 0.689 0.596 |
| Wareet | 192 336 720 | 0.2540.286 0.3260.337 | 0.270 0.299 0.338 0.345 | | 0.2650.319 0.3330.362 | 0.1940.241 0.2450.282 0.3140.334 | 0.2800.306 0.3650.359 | 0.403( | 0.3390.380 0.428 | 0.307 0.3590.395 0.4190.428 | 0.367 0.245 | 0.285 0.321 0.338 0.4140.410 | 0.237 0.312 0.2980.353 0.3520.288 | 0.227 0.287 0.282 0.334 0.352 20.386 | 0.5980.544 0.578 0.523 1.0590.741 | 0.7520.638 0.639 0.596 | 1.1300.792 |
| Avg 96 | 0.2370.270 0.3760.397 0.4160.418 | 0.252 0.422 0.466 | 0.285 0.428 0.375 | 0.248 0.300 0.399 | 0.2250.264 0.3700.399 | 0.384 | 0.259 0.287 0.402 0.4360.429 | 0.420( | 0.309 0.360 [0.376 0.419 | 0.338 0.382 | 0.4490.459 | 0.288 0.314 0.513 0.491 | 0.271 0.334 0.494 0.479 | 0.261 0.312 10.424 40.432 | 0.6340.548 0.8650.713 | | 0.8030.656 0.837 0.728 |
| ULL | 192 336 720 Avg | 0.4420.433 0.4770.456 0.427 0.426 | 0.450 0.488 0.464 0.485 0.478 0.465 0.455 | 0.405 0.422 | 0.416 0.4390.443 0.4720.490 0.437 | 0.413 0.421 0.4220.436 0.4470.466 0.413 0.430 | 0.521 | 0.491 0.469 0.500 0.4580.450 | | 0.448 0.4590.465 0.506 0.507 0.4400.460 | 0.5000.482 0.521 0.496 0.514 0.512 0.4960.487 | | 0.5340.504 0.5880.535 0.643 0.616 | 0.5380.504 0.5740.521 0.562 0.535 | 0.4750.462 0.518 30.488 0.547 0.533 | 1.0080.792 1.107 0.809 1.181 0.865 | 0.9230.766 1.0970.835 | 1.257 0.889 |
| TLL | 96 192 336 | 0.2850.342 0.3540.389 0.3730.407 | 0.318 0.368 0.383 0.407 0.406 | 0.427 | 0.2890.353 0.3830.418 0.4480.465 | 0.274 0.336 0.3390.379 0.3290.380 | 0.452 | 0.340 0.374 0.4020.414 0.452 | | 0.3580.397 0.4290.439 0.4960.487 | 0.346 0.388 0.4560.452 0.4820.486 | 0.552 | 0.5700.537 0.476 0.458 0.5120.493 0.551 | 0.5420.510 0.340 0.391 0.4300.439 0.4850.479 | 0.491 0.479 10.397 0.437 0.520 0.504 0.6260.559 | 1.0400.795 3.755 1.525 5.6021.931 | 1.029 0.805 2.626 1.317 | 11.12 2.979 9.3232.769 |
| 720 Avg 96 192 | 0.4060.441 0.3540.394 0.2920.346 0.3320.372 | 0.420 0.381 0.330 | 0.446 0.412 0.372 0.394 | 0.605 0.551 0.431 0.446 0.2990.343 | 0.3790.422 0.3300.379 0.290 0.342 | | 0.462 0.468 0.4140.427 0.3380.375 0.3740.387 | | 0.4630.474 0.4370.449 0.3790.419 | | 0.515 0.511 0.450 0.459 0.5050.475 | 0.5620.560 0.526 0.516 0.386 0.398 | 0.5000.497 0.4390.452 0.3750.398 | 0.8630.672 0.602 20.543 10.374 0.400 | 4.721 3.647 4.431 0.672 0.571 | 1.835 1.625 3.8741.697 1.729 6.736 2.191 | 0.538 0.528 |
| L | 336 720 Avg | 0.3660.394 0.417 0.421 0.3520.383 | 0.371 0.398 0.454 0.388 | 0.409 0.440 0.403 0.357 | 0.3350.365 0.369 0.386 0.4250.421 0.378 | 0.3320.369 0.3660.392 0.4160.420 0.351 0.380 | | 0.410 0.411 0.4780.450 0.4000.406 | | 0.4260.441 0.4450.459 0.5430.490 0.4480.452 | 0.5530.496 0.621 0.671 0.588 0.517 | 0.537 0.561 | 0.4590.444 0.4950.464 0.5850.516 0.481 0.456 | 0.4080.410 0.4350.428 0.4990.462 0.4290.425 | 0.4000.407 0.4380.438 0.527 0.502 0.435 0.437 | 0.7950.669 1.212 0.871 1.1660.823 0.961 0.734 | 0.658 0.592 0.8980.721 1.1020.841 | 0.7990.671 |
| LL | 96 192 336 720 | 0.173 0.262 0.229 0.301 0.2860.341 0.3780.401 | 10.192 0.245 0.302 0.399 | 0.281 0.317 0.352 0.408 | 0.167 0.269 0.2240.303 0.2810.342 0.3970.421 | 0.1650.255 0.220 0.292 0.2740.329 0.362 0.385 | | [0.187 0.267 0.2490.309 0.321 0.351 0.4080.403 | 0.421( | [0.203 0.287 0.269 0.328 0.3250.366 0.415 | 0.2550.339 0.281 0.340 0.3390.372 0.4330.432 | 0.192 | 0.274 0.2800.339 0.3340.361 0.4170.413 | 0.189 0.280 0.2530.319 0.3140.357 0.4140.413 | [0.209 0.308 0.311 0.382 0.4420.466 0.675 0.587 | |0.3650.453 0.5330.563 1.3630.887 | 1.078 0.827 | 0.658 0.619 1.5490.972 |
| 日 | Avg 24 36 48 | 0.2660.326 2.0630.881 1.8680.892 1.7900.884 | 0.284 2.723 2.027 2.206 | 0.339 1.099 0.966 1.022 | 0.2670.333 2.215 1.081 1.9630.963 2.1301.024 | 0.2550.315 1.3190.754 1.4300.834 1.5530.815 | 0.291 2.317 1.972 | 0.333 0.934 0.920 2.2380.940 | 3.228 2.679 2.622 | 0.3050.349 1.260 1.080 1.078 | 0.327 3.483 3.103 | 0.371 1.287 2.294 1.148 1.825 | 0.3060.347 0.945 0.848 | 0.2930.342 2.527 1.020 2.615 1.007 | 0.4090.436 8.313 2.144 6.631 1.902 | 3.3791.338 1.410 0.810 5.764 1.677 4.755 1.467 | 2.631 1.242 1.4790.915 4.4001.382 | 4.7831.448 |
| 60 Avg 96 192 | 1.979 0.957 1.925 0.903 0.1390.238 0.1530.251 | 1.976 2.233 0.138 0.152 | 0.983 1.017 0.234 0.247 | 2.368 1.096 2.169 1.041 [0.1400.237 0.153 0.249 | 1.470 0.788 1.4430.797 0.129 0.222 0.1570.240 | 2.027 | 0.928 2.1390.931 0.1680.272 0.1840.289 | 2.857 2.847 10.193( 0.201( | 1.157 1.144 0.308 0.315 | 2.669 2.770 3.006 0.201 | 1.085 1.125 2.178 1.161 2.077 0.317 | 2.010 0.900 0.963 0.914 0.1690.273 | 2.359 0.972 2.487 1.016 2.497 1.004 [0.187 0.304 | 7.299 1.982 7.283 1.985 7.382 2.003 10.207 0.307 | 4.763 5.264 5.137 |0.2740.368 | 1.469 1.564 1.544 | 4.832 1.465 4.8821.483 4.7241.445 [0.312 0.402 |
| GCE | 336 720 Avg | 0.169 0.266 0.2060.297 | 0.168 | 0.263 | 0.169 0.267 | 0.1630.259 | | 0.1980.300 | | 0.2140.329 | 0.222 | 0.334 0.182 | 0.286 | 0.1990.315 | 0.213 0.316 | 0.2960.386 0.3000.394 | | 0.3480.433 |
| | 0.4120.294 | | | | | | | | | | | | 0.632 | | | | |
| Average | Avg | 0.4140.294 [0.516 0.407 | | | | | | | | | 0.628 0.379 | 0.573004310.5620.436044606596043307010.4890570.510.634650620473.30066836075 | 0.6240.340 | 0.621 0.396 | 0.622 0.392 | 0.8640.472 0.764 0.416 | 0.7420.420 0.7550.423 0.741 0.422 | |
| 336 720 | 0.4500.312 | 0.413 0.447 0.413 | 0.281 | 0.4330.295 | 0.390 0.263 | | 0.6400.350 0.620 0.336 | | 0.383 0.6260.382 0.610 0.376 | 0.6160.382 0.6220.337 0.6600.408 | 0.653 | 0.355 | 0.396 | 0.6130.386 0.658 30.407 | 0.719 0.391 0.6960.379 0.7770.420 | 0.732 0.423 0.7330.420 | |
| 96 192 | | | | | | | | | | 0.254 | | | | | | | |
| | 0.1670.263 | 0.207 | 0.295 | 0.2030.301 | | 0.197 0.290 | 0.2200.320 | | 0.2460.355 | 0.231 | 0.338 | 0.2000.304 | 0.2120.329 | 0.2300.333 | | | 0.350 0.433 |
| | 0.3880.282 | 0.166 | 0.259 | 0.166 0.263 | 0.161 0.252 | | 0.1920.295 0.5930.321 | | 0.2140.327 | | 0.361 0.222 0.338 0.193 | 0.321 0.296 | 0.2330.345 | 0.265 0.360 0.229 0.329 | 0.373 0.439 0.3110.397 | | 0.3400.420 0.338 0.422 |
| | | | | | | | | | | 0.227 | | | 0.2080.323 | | | | |
| mffors | | 0.4070.290 | 0.390 | 0.272 | 0.410 0.282 0.4230.287 0.4360.296 | | 0.360 0.249 | 0.617 0.336 0.6290.336 | | | | | | | 0.615 0.391 0.382 | | | |
| | | 0.403 | 0.276 0.280 0.298 | 0.4660.315 | | 0.379 0.256 0.3920.264 0.4320.286 | | | 0.587 0.366 0.6040.373 0.621( | | 0.613 0.388 | 0.612 0.338 0.6130.340 0.6180.328 | 0.607 0.392 0.621 0.399 0.6220.396 | 0.601 | | | |
+
+# D.4 Mean and STD for Few-shot Learning
+
+Table 15 lists both mean and STD for GPT2(6), DLinear and PatchTST with 3 runs on $5 \%$ ETTh2 and ETTm2. The results show a small variance in performance of GPT2(6) that represents the stability of GPT2(6).
+
+Table 15: A subset of results showing both Mean and STD on $5 \%$ datasets.
+
+| Methods Metric | GPT2-backbone(6Layers) MSE MAE |
| LLE | 96 192 336 720 | 0.376 ± 0.0072 0.418 ± 0.0013 0.408 ± 0.0006 | 0.421 ± 0.0054 0.441 ± 0.0014 0.439 ± 0.0002 |
| LL | 96 192 336 720 | 0.199 ± 0.0040 0.256 ± 0.0030 0.318 ± 0.0046 0.460 ± 0.0132 | 0.280 ± 0.0042 0.316 ± 0.0017 0.353 ± 0.0032 0.436 ± 0.0066 |
+
+# D.5 Comparison with Traditional Methods on Few-shot Learning
+
+Since deep learning methods are more advantageous than traditional methods when applied to large datasets. For few-shot learning, traditional methods should also consider. The results are shown in Table 16 that GPT2(6) also achieves best performance.
+
+Table 16: Comparison with traditional methods.
+
+| Methods Metric | GPT2(6)5% MSE MAE | GPT2(6)10% MSE MAE | ETS MSE MAE | ARIMA MSE MAE | NaiveDrift MSE MAE |
| LL | 96 192 | 0.376 0.418 | 0.421 0.441 | 0.331 0.402 | 0.374 0.411 | 2.954 10.226 | 0.742 1.212 | 0.481 0.585 | 0.443 0.495 | 0.764 1.560 | 0.561 0.785 |
| [uLL | 96 192 | 0.386 0.440 | 0.405 0.438 | 0.390 0.429 | 0.404 0.423 | 52.237 186.445 | 2.689 4.654 | 0.693 0.710 | 0.547 0.557 | 1.539 2.869 | 0.913 1.215 |
+
+# D.6 Baselines with Instance Normalization
+
+Instance normalization Kim et al. (2022) is a plug-in for time series for distribution shift. Most baselines, such as Autoformer and FEDformer are not equipped with instance normalization. Thus, for a fair comparison, we add the experiment, as in Table 17, for baselines w/o instance normalization and GPT(6) can also perform superior.
+
+Table 17: Comparison on $5 \%$ data. Autoformer and FEDformer are equiped with instance normalization.
+
+| Methods Metric | | GPT2(6) | PatchTST | DLinear | Autoformer | Autoformer(Revin) | FEDformer | FEDformer(Revin) |
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE |
| L | 96 | 0.199 | 0.280 | 0.206 | 0.288 | 0.236 | 0.326 | 0.232 | 0.322 | 0.224 | 0.300 | 0.229 | 0.320 | 0.223 | 0.298 |
| 192 | 0.256 | 0.316 | 0.264 | 0.324 | 0.306 | 0.373 | 0.291 | 0.357 | 0.296 | 0.343 | 0.294 | 0.361 | 0.288 | 0.336 |
+
+# D.7 Detailed Definition and Results of Zero-shot Learning
+
+Task Definition Each experiment contains two distinct datasets, source, and target datasets. The source dataset is used to train the model and then forecasts without fine-tuning in the target dataset. The target dataset is split into non-overlapping historical and test sequences. We use the historical sequence as input to the model, and the obtained output is used to calculate errors with the test sequences. Besides meta-learning-based models like N-BEATS, evaluated models’ parameters are not allowed any adjustment using the forecasting phase. Also, same as Oreshkin et al. (2021), each data set adopts a specific metric (M4: sMAPE; M3: sMAPE; TOURISM: MAPE; ELECTR: ND)
+
+Detailed Results Here, we list detailed performance of zero-shot learning in Table 18, Table 19 and Table 20. For each dataset, we separately list the performance of models under diverse frequency. Compared to the most recent published method DLinear, GPT2(6) performs superior in most situations. Also, GPT2(6) does not use any information from the test data, but achieves a comparable performance of meta-leaning based N-BEATS.
+
+Table 18: Zero-shot performance on M4 (sMAPE).
+Table 19: Zero-shot performance on M3 (sMAPE).
+
+ | Yearly (23k) | Quarterly (24k) | Monthly (48k) | Others (5k) | Average (100k) |
| N-BEATS-FR | 13.267 | 9.596 | 12.676 | 4.696 | 11.675 |
| DLinear-M3 | 14.193 | 18.856 | 14.765 | 9.194 | 15.337 |
| TimesNet-M3 | 15.655 | 11.877 | 16.165 | 6.863 | 14.553 |
| PatchTST-M3 | 13.966 | 10.929 | 14.664 | 7.087 | 13.228 |
| ETSformer-M3 | 27.846 | 36.134 | 25.114 | 12.338 | 27.748 |
| LightTS-M3 | 13.787 | 11.289 | 15.181 | 9.117 | 13.623 |
| Stationary-M3 | 14.988 | 11.686 | 16.098 | 6.977 | 14.327 |
| FEDformer-M3 | 13.887 | 11.513 | 18.154 | 7.529 | 15.047 |
| Autoformer-M3 | 14.552 | 17.341 | 25.063 | 9.666 | 20.022 |
| Informer-M3 | 18.542 | 16.907 | 23.454 | 7.348 | 19.047 |
| Reformer-M3 | 15.652 | 11.051 | 15.604 | 7.001 | 14.092 |
| GPT(6)-M3 | 13.740 | 10.787 | 14.630 | 7.081 | 13.125 |
+
+ | Yearly (645) | Quarterly (756) | Monthly (1428) | Others (174) | Average (3003) |
| N-BEATS-M4 | 15.07 | 9.07 | 13.19 | 4.29 | 12.38 |
| N-BEATS-FR | 16.43 | 9.05 | 13.30 | 4.51 | 12.61 |
| DLinear-M4 | 17.43 | 9.74 | 15.65 | 6.81 | 14.03 |
| TimesNet-M4 | 18.75 | 12.26 | 14.01 | 6.88 | 14.17 |
| PatchTST-M4 | 15.99 | 9.62 | 14.71 | 9.44 | 13.39 |
| ETSformer-M4 | 20.56 | 11.65 | 16.97 | 10.57 | 16.03 |
| LightTS-M4 | 15.63 | 9.40 | 24.60 | 8.28 | 17.90 |
| Stationary-M4 | 17.05 | 12.56 | 16.82 | 8.13 | 15.29 |
| FEDformer-M4 | 16.00 | 9.48 | 15.12 | 8.94 | 13.53 |
| Autoformer-M4 | 16.18 | 13.92 | 16.91 | 14.68 | 15.87 |
| Informer-M4 | 19.70 | 13.00 | 15.91 | 13.03 | 15.82 |
| Reformer-M4 | 16.03 | 9.76 | 14.80 | 7.53 | 13.37 |
| GPT2(6)-M4 | 16.42 | 10.13 | 14.10 | 4.81 | 13.06 |
+
+# E Proof
+
+In our numerical experiments, we obtain two interesting observations. First, the token similarity within a sample is larger in pretrained LM. We report the layer-wise average token cosine similarity in ETTh2 experiment in Figure 7. In particular, Figure 7 (a) shows that in a fine-tuned random initialed GPT2(6) model, the token similarity is around 0.1-0.2 among different layers. When switching to the frozen pre-trained GPT2-FPT model, the token similarity significantly increases in the deep layers and eventually reaches more than 0.9 in the last layer. The ETTh2 dataset contains high volatility hourly information related to the electricity transformer temperature. In this situation, higher token similarity implies the high-frequency noise in the data is eased and only low-frequency information will be reserved. In other words, after going through the pretrained GPT2-FPT model, the signal-noise ratio is enhanced. We use the following theorem to characterize this behavior.
+
+Table 20: Zero-shot performance on Tourism (MAPE).
+
+ | Yearly (518) | Quarterly (427) | Monthly (366) | Average (1311) |
| N-BEATS-M4 | 23.57 | 14.66 | 19.32 | 18.82 |
| N-BEATS-FR | 23.43 | 14.45 | 20.47 | 19.46 |
| DLinear-M4 | 39.59 | 18.30 | 24.76 | 28.51 |
| TimesNet-M4 | 35.59 | 19.22 | 30.54 | 28.84 |
| PatchTST-M4 | 33.23 | 19.27 | 27.57 | 27.10 |
| ETSformer-M4 | 391.60 | 35.56 | 50.47 | 180.40 |
| LightTS-M4 | 138.22 | 16.28 | 25.34 | 66.99 |
| Stationary-M4 | 35.42 | 35.15 | 65.58 | 43.75 |
| FEDformer-M4 | 43.41 | 19.88 | 28.39 | 31.55 |
| Autoformer-M4 | 51.19 | 34.95 | 31.47 | 40.39 |
| Informer-M4 | 41.16 | 30.98 | 33.92 | 35.82 |
| Reformer-M4 | 33.86 | 16.85 | 23.71 | 25.48 |
| GPT2(6)-M4 | 27.17 | 16.21 | 21.92 | 22.14 |
+
+# E.1 Theorem E.1
+
+Theorem E.1 (informal). We consider the self-attention for $l$ -th query token. Let’s assume the input token $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ are bounded with mean $\pmb { \mu }$ for $i = 1 , 2 , . . . , n$ . Under mild conditions, with high probability, the output value token $V _ { l }$ converges to $\mu W _ { v }$ on the order of $\mathcal { O } ( n ^ { - 1 / 2 } )$ , where $W _ { v }$ is the parameter matrix to compute the value token.
+
+The Theorem E.1 describes the self-attention structure can efficiently make output value token $V _ { l }$ converge its mean value $\mu W _ { v }$ . In the time series forecasting task, each token represents several adjacent points in a time series. When the time series has some periodical or translation invariant structures, by comparing a given token with other tokens, one could have a higher chance to figure out those invariant structures. This phenomenon is especially important in few-shot forecasting tasks. Without enough token noise distillation ability, the model will more likely tend to overfit due to insufficient training data.
+
+We denote $x _ { i }$ as $i$ -th element of vector $_ { \textbf { \em x } }$ , $W _ { i j }$ as the element at $i$ -th row and $j$ -th column of matrix $W$ , and $W _ { j }$ as the $j$ -th row of matrix $W$ . Moreover, we denote $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ as the $i$ -th patch (token) of the inputs with $\mathbf { x } _ { i } = \mathbf { X } _ { i }$ .
+
+Before given the formal statement of the Theorem E.1, we first show the assumptions.
+
+1. The token $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ is the sub-gaussian random vector with mean $\pmb { \mu _ { i } }$ and variance $( \sigma ^ { 2 } / d ) I$ for $i = 1 , 2 , . . . , n$ .
+2. $\pmb { \mu }$ follows a discrete distribution with finite values $\pmb { \mu } \in \mathcal { V }$ . Moreover, there exist $0 ~ <$ $\nu _ { 1 } , 0 < \nu _ { 2 } < \nu _ { 4 }$ such that a) $\| \pmb { \mu } _ { i } \| = \nu _ { 1 }$ , and b) $\mu _ { i } ^ { \setminus } W _ { Q } W _ { K } ^ { T } \mu _ { i } \in [ \nu _ { 2 } , \nu _ { 4 } ]$ for all $i$ and $| \mu _ { i } W _ { Q } W _ { K } ^ { \top } \mu _ { j } ^ { \top } | \le \nu _ { 2 }$ for all $\pm \mu _ { i } \neq \pm \mu _ { j } \in \mathcal { V }$ .
+3. $W _ { V }$ and $W _ { Q } W _ { K } ^ { \top }$ are element-wise bounded with $\nu _ { 5 }$ and $\nu _ { 6 }$ respectively, that is, $| W _ { V } ^ { ( i j ) } | \le$ $\nu _ { 5 }$ and $| ( W _ { Q } W _ { K } ^ { \top } ) ^ { ( i j ) } | \le \nu _ { 6 }$ , for all $i , j$ from 1 to $d$ .
+
+In the above assumptions, we ensure that for a given query patch, the difference between the clustering center and noises are large enough to be distinguished.
+
+Theorem E.2 (formal statement of Theorem E.1). Let patch $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ be $\sigma ^ { 2 }$ -subgaussian random variable with mean $\pmb { \mu _ { i } }$ and all n patches follow the same clustering center of query √ $l$ . Per Assumptions aforementioned, when $\sqrt { d } \ge 3 ( \psi ( \delta , d ) + \nu _ { 2 } + \nu _ { 4 } )$ , then with probability $1 - 5 \delta$ , we have
+
+$$
+\begin{array} { r l } & { \left\| \frac { \sum _ { i = 1 } ^ { n } \exp \left( \frac { 1 } { \sqrt { d } } x _ { l } W _ { Q } W _ { k } ^ { \top } x _ { i } \right) x _ { i } W _ { V } } { \sum _ { j = 1 } ^ { n } \exp \left( \frac { 1 } { \sqrt { d } } x _ { l } W _ { Q } W _ { k } ^ { \top } x _ { j } \right) } - \mu _ { l } W _ { V } \right\| _ { \infty } \leq 4 \exp \left( \frac { \psi ( \delta , d ) } { \sqrt { d } } \right) \sigma \nu _ { 5 } \sqrt { \frac { 2 } { d n } \log \left( \frac { 2 d } { \delta } \right) } } \\ & { + 7 \left[ \exp \left( \frac { \nu _ { 2 } - \nu _ { 4 } + \psi ( \delta , d ) } { \sqrt { d } } \right) - 1 \right] \| \mu _ { l } W _ { V } \| _ { \infty } , } \\ & { \gamma _ { h e r e } \psi ( \delta , d ) = 2 \sigma \nu _ { 1 } \nu _ { 6 } \sqrt { 2 \log \left( \frac { 1 } { \delta } \right) } + 2 \sigma ^ { 2 } \nu _ { 6 } \log \left( \frac { d } { \delta } \right) . } \end{array}
+$$
+
+Proof. See the proof of Lemma 2 in Wang et al. (2022) with $k _ { 1 } = k = n$ .
+
+# E.2 Theorem E.4
+
+We first give the formal statement of Theorem E.4.
+
+Theorem E.3 (formal statement of Theorem E.4). Let $\mathbf { \mathscr { g } } _ { i } ~ \in ~ \mathbb { R } ^ { d }$ and $\mathbf { \Psi } _ { { \mathbf { { y } } } _ { i } } \in \mathbb { R } ^ { T }$ be the feature map vector and forecasting targets for the sample $i = 1 , 2 , . . . , N$ respectively, and we assume $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \pmb { g } _ { i } \pmb { g } _ { i } ^ { \top } \succeq \sigma I } \end{array}$ for some $\sigma > 0$ . We want to learn a matrix $W \in \mathbb { R } ^ { d \times T }$ from the following optimization problem:
+
+$$
+W = \arg \operatorname* { m i n } \frac { 1 } { 2 N } \sum _ { i = 1 } ^ { N } \| W g _ { i } - \pmb { y } _ { i } \| _ { 2 } ^ { 2 } .
+$$
+
+If we apply stochastic gradient descent with diminishing step sizes $\begin{array} { r } { \eta _ { t } = \frac { 1 } { \sigma t } } \end{array}$ at step $t$ , we will need $t = \tilde { \mathcal { O } } ( \epsilon ^ { - 1 } \sigma ^ { - 1 } )$ steps to reach
+
+$$
+\frac { 1 } { t } \sum _ { j = 1 } ^ { t } \left( \frac { 1 } { 2 N } \sum _ { i = 1 } ^ { N } \lVert W _ { j } g _ { i } - y _ { i } \rVert _ { 2 } ^ { 2 } \right) - \frac { 1 } { 2 N } \sum _ { i = 1 } ^ { N } \lVert W ^ { * } g _ { i } - y _ { i } \rVert _ { 2 } ^ { 2 } \leq \epsilon ,
+$$
+
+where $W ^ { * }$ is the optimal solution and $W _ { j }$ is the $j$ step’s solution and $\tilde { \mathcal { O } }$ we suppress the logarithmic dependence.
+
+Proof. As we assume positive definite, whic $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { T } \pmb { g } _ { i } \pmb { g } _ { i } ^ { \top } \ \succeq \ \sigma I } \end{array}$ , the hessian of optimization problem in (1) is also optimization problem in (1) is strongly convex with parameter proportional to $\sigma$ . Then via standard stochastic gradient decent analysis (e.g., section 3.1 in Lacoste-Julien et al. (2012)), we obtain:
+
+$$
+\frac { 1 } { t } \sum _ { j = 1 } ^ { t } \left( \frac { 1 } { 2 N } \sum _ { i = 1 } ^ { N } \lVert W _ { j } g _ { i } - y _ { i } \rVert _ { 2 } ^ { 2 } \right) - \frac { 1 } { 2 N } \sum _ { i = 1 } ^ { N } \lVert W ^ { * } g _ { i } - y _ { i } \rVert _ { 2 } ^ { 2 } \le \mathcal { O } \left( \frac { \log t } { \sigma t } \right) = \tilde { O } ( \sigma ^ { - 1 } t ^ { - 1 } ) .
+$$
+
+Therefore, to reach $\epsilon$ optimization gap, we just need to set $t = \tilde { \mathcal { O } } ( \sigma ^ { - 1 } \epsilon ^ { - 1 } )$ .
+
+The second observation is that for the pretrained GPT2-FPT model, the last transformer layer’s outputs, i.e., feature maps, are spread widely throughout the feature space. We report the t-SNE visualization of the feature maps for GPT2-FPT and an end-to-end model PatchTST in Figure 8. In Figure 8 (a) and (b), we color the samples chunked from the one single time series into the same color and the same configuration of the T-SNE is applied. One may observe that the feature maps of GPT2-FPT has less concentration compared to PatchTST. It implies the GPT2-FPT’s feature maps corresponding to different samples are more distinctive which eventually facilitates the learning ability of the last MLP layer. Researchers Wang & Isola (2020) have found that contrastive learning-based representation learning may result in a uniform distribution of training data, and such behavior plays an important role in its good downstream task performance. We use the following theorem to justify it.
+
+Theorem E.4 (informal). Let $\mathbf { \pmb { g } } _ { i }$ and $\mathbf { \nabla } _ { \mathbf { \psi } _ { 3 } } \psi _ { i }$ be the feature map vector and forecasting targets for the sample $i = 1 , 2 , . . . , N$ respectively, and we assume PNi=1 gig⊤i ⪰ σI for some σ > 0. Under mild conditions, if we train an MLP layer that maps feature maps to forecasting targets via the stochastic gradient descent, the total step to reach some optimization tolerance is on the order of $\mathcal { O } ( \sigma ^ { - 1 } )$ .
+
+
+Figure 6: The performance and token similarity within samples with respect to each layer with different random replace ratios. Pretrained parameters are replaced by random initial parameters according to certain proportions.
+
+
+Figure 7: The token similarity within samples with respect to each layer. (a) GPT2-noPretrain-model; (b) GPT2-Pretrained-model; (c) Pretrained attention is replaced by PCA.
+
+The Theorem E.4 considers the covariate matrix of feature maps being positive definite that indicates the set of all feature maps $\left\{ \pmb { g } _ { i } \right\}$ spans the whole feature spaces, and the higher spread level gives a larger $\sigma$ . In this case, if we only want to learn an MLP layer, the problem reduces to a well-conditioned least-squared regression problem. Then the fast convergence rate is achieved.
+
+Efficiently learning the last MLP layer plays a very important role in time series forecasting and can substantially impact the prediction performance. In Zeng et al. (2023), the authors show that learning a single MLP layer can also bring very promising performance. In few-shot forecasting, the pre-trained GPT2 model may still preserve highly diverse feature maps than end-to-end type models and eventually leads to fast learning speed on the last MLP layer.
+
+Another possible benefit of wide spared feature maps is enhancing the model memorization ability when using a multi-layer decoder structure. In the literature on network memorization ability (e.g., Vardi et al. (2021); Yun et al. (2020)), the deep learning model tends to have better memorization ability when feature maps are well separated. In forecasting tasks, capturing extreme or rare behavior is very important. The pretrained GPT gains more capacity in the decoder to correctly forecast uncommon time series.
+
+# F N-gram Explanation for Universality
+
+Why does the proposed pretrained-frozen-model work so effectively? We have achieved state-ofthe-art performance in time series analysis using a language model that is mostly trained on natural language data. The answer lies in the universality of the frozen structure, which includes attention layers and Feed Forward layers. We can represent images and time series forecasting tasks as an n-gram estimation problem, akin to text analysis, by employing a patching approach. This method treats subsequences of time series or image patches as individual tokens. Central to sequential prediction is the $n$ -order Markov process, and a simple way to capture the $n$ -order Markov process is $n$ -gram language model. To predict next token $w _ { 0 }$ , we need to compute $p ( w _ { 0 } | w _ { 1 } , \dots , w _ { n - 1 } )$ , which can be further computed as $p ( w _ { 0 } w _ { 1 } \dots w _ { n - 1 } ) / p ( w _ { 1 } \dots w _ { n - 1 } )$ . Hence, the core of $n$ -gram language model is to estimate the probability of observing a sequence of $n$ tokens. When $n$ is large, most of $n$ token sequences will not be observed from data, leading to the sparse data problem, a common challenge faced by $n$ -gram language model. As a result, a large body of research in $n$ -gram language model is focused on how to effectively estimate probability of having $n$ -token sequences even when they are NOT observed from data. We hypothesize that the transformer model pretrained by GPT-2 essentially allows us to estimate $p ( w _ { 0 } w _ { 1 } \dots w _ { n - 1 } )$ from observations of significantly shorter token sequences. In this section, we will show that the function of estimating probabilities of longer sequences from observation of shorter sequences is universal and is independent from domain as long as data exhibit a skew distribution (e.g., follows a power law). We note that our work is closely related to the discussion presented in Elhage et al. (2021); Olsson et al. (2022), where the authors also connect the function of transformer to compute of $n$ -grams. We however note that our key result is to show the universality in computing probability of longer sequences from observations of shorter sequences, which can’t be found in any existing studies. Although the discussion is restricted to discrete tokens, it should be generalized to continuous signals as we can always quantize continuous signals into a finite number of discrete tokens, similar to what BEiT Bao et al. (2022) did.
+
+
+Figure 8: The t-SNE visualization of sample feature maps for (a) GPT-backbone, (b) end-to-endPatchTST-model. (c) The token similarity within samples within different continuous sequence lengths.
+
+To gain a better understanding, let’s start by examining a "zero-layer" Transformer model. This model operates by taking a token, embedding it, and transforming it back to produce logits that predict the subsequent token. Because it cannot transfer information from other tokens, it relies solely on the current token to predict the next one. Consequently, the optimal behavior of this model is to closely resemble the bigram log-likelihood.
+
+Then we move on to the so-called "attention-only" transformer, which doesn’t have MLP layers. As discussed in a recent work Elhage et al. (2021), one-layer attention-only Transformers can be comprehended as a combination of a bigram model and multiple "skip-trigram" models (impacting the probabilities of sequences "A. . . BC"). This can be intuitively understood as each attention head having the ability to selectively attend from the current token ("B") to a previous token ("A") and transfer relevant information to fine-tune the probability of potential subsequent tokens $\mathrm { ( " } \mathrm { C " } )$ . Olsson et al. (2022) further discusses a multi-layer transformer can do more complex n-gram estimation using an induction heads mechanism. To be more precise, induction heads employ a straightforward principle: the ${ } ^ { \prime } [ \mathrm { A } ] [ \mathrm { B } ] \ldots [ \mathrm { A } ] [ \mathrm { B } ] ^ { \prime }$ rule, which elevates the likelihood of generating the subsequent token $\because \mathbf { B } ^ { \prime }$ given the current token ’A’ if there is a fuzzy match of the AB bigram in the historical context. This rule seems to largely decouple A and B, which means they do not memorize a fixed table of n-gram statistics. The rule [A][B] . . . $[ \mathbf { A } ] [ \mathbf { B } ]$ applies regardless of what A and B are, which can abstract to new patterns.
+
+Building upon these discussions, we are now prepared to substantiate the following argument: For sequential data following a power law, there is a potentially universal solution to the final estimation of n-gram probabilities. That’s the reason behind the universality of pretrained LM’s performance in cross-domain tasks. For simplicity, we assume that $n$ is so large that we are unable to observe any occurrence of $n$ -gram from data, and we only observe the occurrence of $n ^ { \prime }$ -grams with $n ^ { \prime } < n$ . We denote by $s _ { i } ^ { n }$ the ith unique $n$ -gram, and by the notation $s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n }$ if $n ^ { \prime }$ -gram $s _ { j } ^ { n ^ { \prime } }$ appears in $s _ { i } ^ { n }$ , the $i$ th $n$ -gram. Let $m _ { n }$ be the number of unique $n$ -grams. According to the maximum entropy model, our estimation of n-gram probabilities can be cast into the following optimization problem:
+
+$\begin{array} { r l } { \operatorname* { m i n } \sum _ { i = 1 } ^ { m _ { n } } p ( s _ { i } ^ { n } ) \log p ( s _ { i } ^ { n } ) } & { { } \mathrm { s . ~ t . } \sum _ { i : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } p ( s _ { i } ^ { n } ) = \widehat { p } ( s _ { j } ^ { n ^ { \prime } } ) } \end{array}$ where $\widehat { p } ( s _ { j } ^ { n ^ { \prime } } )$ represents the probability of observing pattern $s _ { j } ^ { n ^ { \prime } }$ from the data and $j \in [ m _ { n ^ { \prime } } ] , n ^ { \prime } \in [ n - 1 ]$ .
+
+For each constraint for $\widehat { p } \big ( s _ { j } ^ { n ^ { \prime } } \big )$ , we introduce a Lagrangian dual variable $\lambda _ { j } ^ { n ^ { \prime } }$ , and rewrite the optimizabtion problem as follows:
+
+$$
+\begin{array} { r } { \operatorname* { m i n } _ { \lambda } \log \left( \sum _ { i = 1 } ^ { m _ { n } } \exp \left( \sum _ { \left( n ^ { \prime } , j \right) : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } \lambda _ { j } ^ { n ^ { \prime } } \right) \right) - \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \sum _ { j = 1 } ^ { m _ { n ^ { \prime } } } \lambda _ { j } ^ { n ^ { \prime } } \widehat { p } ( s _ { j } ^ { n ^ { \prime } } ) , } \end{array}
+$$
+
+where n-gram probability $p ( s _ { j } ^ { n } )$ is given as $\begin{array} { r } { p ( s _ { j } ^ { n } ) = \frac { 1 } { Z ( \lambda ) } \exp \left( \sum _ { ( n ^ { \prime } , j ) : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } \lambda _ { j } ^ { n ^ { \prime } } \right) } \end{array}$ and $Z ( \lambda ) =$ $\begin{array} { r } { \sum _ { i = 1 } ^ { m _ { n } } \exp \bigl ( \sum _ { ( n ^ { \prime } , j ) : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } \lambda _ { j } ^ { n ^ { \prime } } \bigr ) } \end{array}$
+
+In the case that all $\mathbf { n }$ -grams follow a power law, for each $n ^ { \prime } \in [ n - 1 ]$ , we divide $n ^ { \prime }$ -gram into two groups: the group $\nu _ { n ^ { \prime } }$ includes the high frequency $n ^ { \prime }$ -gram and the group $\boldsymbol { \mathcal { U } } _ { n ^ { \prime } }$ including the low frequency of $n ^ { \prime }$ -gram. For simplicity, we assume that the probability for all the high frequency $n ^ { \prime }$ -grams are roughly $\alpha _ { n ^ { \prime } } \in [ 0 , 1 ]$ and the probability for all the low frequency $n ^ { \prime }$ -grams are roughly $\beta _ { n ^ { \prime } } \in [ 0 , 1 ]$ . By assuming that all the patterns in $\nu _ { n ^ { \prime } }$ and $\boldsymbol { \mathcal { U } } _ { n ^ { \prime } }$ share similar appearance frequency, we simplify the optimization problem by only introducing two dual variables for each $n ^ { \prime }$ -gram, i.e. $\lambda _ { a } ^ { n ^ { \prime } }$ for high-frequency patterns and $\lambda _ { b } ^ { n ^ { \prime } }$ for low-frequency patterns as follow Using these notations, we have the optimization problem simplified as
+
+$$
+\begin{array} { r l } { \operatorname* { m i n } _ { \lambda } } & { \log ( \sum _ { i = 1 } ^ { m _ { n } } \exp ( \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \sum _ { j : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } \lambda _ { a } ^ { n ^ { \prime } } I ( s _ { j } ^ { n ^ { \prime } } \in \mathscr { V } _ { n ^ { \prime } } ) } \\ & { + \lambda _ { b } ^ { n ^ { \prime } } I ( s _ { j } ^ { n ^ { \prime } } \in \mathscr { U } _ { n ^ { \prime } } ) ) ) - \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \left( \lambda _ { a } ^ { n ^ { \prime } } g _ { n ^ { \prime } } + \lambda _ { b } ^ { n ^ { \prime } } h _ { n ^ { \prime } } \right) , } \end{array}
+$$
+
+$$
+\begin{array} { r } { g _ { n ^ { \prime } } = \sum _ { s _ { j } ^ { n ^ { \prime } } \in \mathscr { V } _ { n ^ { \prime } } } \widehat { p } ( s _ { j } ^ { n ^ { \prime } } ) \mathrm { ~ a n d ~ } h _ { n ^ { \prime } } = \sum _ { s _ { j } ^ { n ^ { \prime } } \in \mathscr { U } _ { n ^ { \prime } } } \widehat { p } ( s _ { j } ^ { n ^ { \prime } } ) . } \end{array}
+$$
+
+Furthermore, let $q _ { a } ^ { n ^ { \prime } }$ be the probability to observe a high frequency $n ^ { \prime }$ -gram appearing in any $n$ -gram, and $q _ { b } ^ { n ^ { \prime } }$ be the probability to observe a low frequency $n ^ { \prime }$ -gram appearing in any $n$ -gram, we have
+
+$$
+\begin{array} { r l } & { \sum _ { i = 1 } ^ { m _ { n } } \exp ( \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \sum _ { j : s _ { j } ^ { n ^ { \prime } } \in s _ { i } ^ { n } } \lambda _ { a } ^ { n ^ { \prime } } I ( s _ { j } ^ { n ^ { \prime } } \in \mathcal { V } _ { n ^ { \prime } } ) + \lambda _ { b } ^ { n ^ { \prime } } I ( s _ { j } ^ { n ^ { \prime } } \in \mathcal { U } _ { n ^ { \prime } } ) ) } \\ & { = m _ { n } \prod _ { n ^ { \prime } = 1 } ^ { n - 1 } ( 1 + q _ { a } ^ { n ^ { \prime } } \exp ( \lambda _ { a } ^ { n ^ { \prime } } ) ) ( 1 + q _ { b } ^ { n ^ { \prime } } \exp ( \lambda _ { b } ^ { n ^ { \prime } } ) ) + { \cal O } \left( \sqrt { m _ { n } } \right) . } \end{array}
+$$
+
+By skipping the term $\mathcal { O } ( \sqrt { m _ { n } } )$ , we further simplify the optimization problem as
+
+$$
+\begin{array} { r l r } { \operatorname* { m i n } _ { \lambda } } & { { } \ \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \log \Big ( 1 + q _ { a } ^ { n ^ { \prime } } \exp ( \lambda _ { a } ^ { n ^ { \prime } } ) \Big ) - + } & { { } \sum _ { n ^ { \prime } = 1 } ^ { n - 1 } \log \Big ( 1 + q _ { b } ^ { n ^ { \prime } } \exp ( \lambda _ { b } ^ { n ^ { \prime } } \Big ) - \lambda _ { b } ^ { n ^ { \prime } } h _ { n ^ { \prime } } , } \end{array}
+$$
+
+which is equivalent to
+
+$\begin{array} { r l } { \lambda _ { n ^ { \prime } } ^ { a } } & { { } = \operatorname* { m i n } _ { \lambda } \log \Big ( 1 + q _ { a } ^ { n ^ { \prime } } \exp ( \lambda ) \Big ) - \lambda g _ { n } ^ { \prime } } \\ { \lambda _ { n ^ { \prime } } ^ { b } } & { { } = \operatorname* { m i n } _ { \lambda } \log \Big ( 1 + q _ { b } ^ { n ^ { \prime } } \exp ( \lambda ) \Big ) - \lambda h _ { n } ^ { \prime } . } \end{array}$ As illustrated by the above analysis, dual variables $\lambda _ { a } ^ { n ^ { \prime } }$ and $\lambda _ { b } ^ { n ^ { \prime } }$ will only depend on statistics $q _ { a } ^ { n ^ { \prime } } , q _ { b } ^ { n ^ { \prime } } , g _ { n ^ { \prime } }$ and $h _ { n ^ { \prime } }$ . They are independent from the detailed statistics $\widehat { p } ( s _ { j } ^ { n ^ { \prime } } )$ and how each $n ^ { \prime }$ -gram appears in different $n \cdot$ -gram. Thus, this simple analysis does indicate, to some degree, that the solution obtained from the maximum entropy model can be universal, as long as $n$ -grams follow skewed distributions like power law.
+
+We informally demonstrate that transformer models utilize attention mechanisms to perform a sophisticated form of $\mathbf { n }$ -gram estimation, and the generation rule for such n-gram distributions could be universal. This is how universality is achieved in our proposed cross-domain knowledge transfer. However, we currently lack a concrete metric to evaluate the performance of knowledge transfer between different domains, which requires further investigation. Nonetheless, in our experimental study, we demonstrate that a transformer model (beit) Bao et al. (2022) trained on images can perform well on cross-domain time series forecasting tasks.
+
+# G Connection between self-attention and Principle component analysis
+
+# Understand the Gradient Structure of Self-Attention
+
+Let $\underline { { X } } = ( x _ { 1 } , \ldots , x _ { N } ) ^ { \top } \in \mathbb { R } ^ { N \times D }$ be the input pattern, and let $f ( X ) = ( f _ { 1 } ( X ) , \ldots , f _ { N } ( x ) ) ^ { \top }$ : $\mathbb { R } ^ { N \times D } \mapsto \dot { \mathbb { R } } ^ { N \times D }$ N be the function for self-attention, i.e.
+
+$$
+f _ { i } ( X ) = \operatorname { s o f t m a x } ( X A X ^ { \top } ) X
+$$
+
+where $A = W _ { Q } W _ { K } ^ { \top } \in \mathbb { R } ^ { D \times D }$ . Let the Jacobian $\begin{array} { r } { J = \left[ \frac { \partial f _ { i } ( X ) } { \partial x _ { j } } \right] _ { i , j = 1 } ^ { N } } \end{array}$ represent the gradient $f ( X )$ with respect to input pattern. The lemma below shows an important structure of $J$ .
+
+$$
+\begin{array} { r l } & { \mathit { \mathcal { e m m a } } \mathrm { G . 1 . } \quad | J | _ { 2 } \leq | A | _ { 2 } \sum _ { i = 1 } ^ { N } \left( P _ { i , i } + \frac { 1 } { 2 } \right) \left| x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } \right| ^ { 2 } + \Delta } \\ & { \mathrm { v h e r e } \qquad \Delta = | A | _ { 2 } \sum _ { i \neq j } ^ { N } P _ { i , j } \left| x _ { j } - \sum _ { k = 1 } ^ { N } P _ { i , k } x _ { k } \right| ^ { 2 } + \frac { | A | _ { 2 } } { 2 } \sum _ { j = 1 } ^ { N } | x _ { i } | ^ { 2 } } \\ & { P _ { i , j } = \frac { \exp \left( x _ { i } ^ { \top } A x _ { j } \right) } { \sum _ { k = 1 } ^ { N } \exp \left( x _ { i } ^ { \top } A x _ { k } \right) } } \end{array}
+$$
+
+and
+
+Proof. According to the analysis from the work, we have the gradient $\begin{array} { r } { J _ { i , j } = \frac { \partial f _ { i } ( \boldsymbol { X } ) } { x _ { j } } } \end{array}$ is given by $J _ { i , j } = P _ { i , j } I + X ^ { \top } Q ^ { i } \left( X A \delta _ { i , j } + E _ { j , i } X A ^ { \top } \right)$ $Q ^ { i } = \mathrm { d i a g } ( P _ { i , : } ) - P _ { i , : } P _ { i , : } ^ { \top }$ Here $P _ { i , : } \in$ $\mathbb { R } _ { + } ^ { N }$ represents the $i$ -th row of matrix $P$ . We thus have
+
+$$
+\begin{array} { r c l } { | J | _ { 2 } } & { \leq } & { \sum _ { i , j = 1 } ^ { N } | J _ { i , j } | _ { 2 } } \\ & { \leq } & { \sum _ { i , j = 1 } ^ { N } P _ { i , j } + \sum _ { i = 1 } ^ { N } | X ^ { \top } Q ^ { i } X | _ { 2 } | A | _ { 2 } + \sum _ { i , j = 1 } ^ { N } | X ^ { \top } Q ^ { i } E _ { j , i } X | _ { 2 } | A | _ { 2 } } \\ & { \leq } & { N + | A | _ { 2 } \sum _ { i = 1 } ^ { N } \bigg ( \sum _ { j = 1 } ^ { N } P _ { i , j } | x _ { j } | ^ { 2 } - \left| \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } \right| ^ { 2 } \bigg ) + | A | _ { 2 } \sum _ { i , j = 1 } ^ { N } | X ^ { \top } Q ^ { i } e _ { j } x _ { i } ^ { \top } | } \\ & { \leq } & { N + | A | _ { 2 } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { N } P _ { i , j } \left| x _ { j } - \sum _ { k = 1 } ^ { N } P _ { i , k } x _ { k } \right| ^ { 2 } + | A | _ { 2 } \sum _ { i , j = 1 } ^ { N } P _ { i , j } \left| x _ { i } ^ { \top } \left( x _ { j } - X ^ { \top } P _ { i , : } \right) \right| } \\ & { \leq } & { | A | _ { 2 } \sum _ { i = 1 } ^ { N } \left( P _ { i , i } + \frac { 1 } { 2 } \right) \left| x _ { i } - X ^ { \top } P _ { i , : } \right| ^ { 2 } + \underbrace { N + | A | _ { 2 } \sum _ { i \neq j } ^ { N } P _ { i , j } \left| x _ { j } - X ^ { \top } P _ { i , : } \right| ^ { 2 } + \frac { | A | _ { 2 } } { 2 } \sum _ { j = 1 } ^ { N } | x _ { i } | ^ { 2 } } _ { : = \Delta } } \end{array}
+$$
+
+As indicated by Lemma 1, one of the key components in the upper bound of Jacobian is $| x _ { i } -$ $\textstyle \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } | ^ { 2 }$ . Thus, through the optimization, we like to reduce the size of the gradient and therefore may prefer to reduce the quantity to $\begin{array} { r l } { \sum _ { i = 1 } ^ { N } | x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } | ^ { 2 } } & { { } } \end{array}$ . Hence, it will be interesting to understand the choice of $W ^ { Q }$ and $W ^ { K }$ that leads to the minimization of $\begin{array} { r l } { \sum _ { i = 1 } ^ { N } | x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } | ^ { 2 } } & { { } } \end{array}$ i.e. the following optimization problem $\begin{array} { r } { \underset { | A | _ { F } \leq \rho } { \operatorname* { m i n } } \sum _ { i = 1 } ^ { N } \left| x _ { i } - \sum _ { j = 1 } ^ { N } P _ { i , j } x _ { j } \right| ^ { 2 } } \end{array}$ where $\rho$ is introduced to control the size of $A$ .
+
+# Connection between Self-Attention and Principal Component Analysis
+
+Let consider the optimization problem in (G) when $\rho$ is small, we can approximate $P _ { i , j }$ as $\begin{array} { r } { P _ { i , j } \approx \frac { 1 } { N } + \overset { \cdot } { \frac { N } { N } } x _ { i } ^ { \top } A x _ { j } } \end{array}$ Define $\begin{array} { r l r } { \bar { x } } & { { } \stackrel { \cdot } { = } } & { X ^ { \top } { \mathbf 1 } / N } \end{array}$ . We have
+
+P $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } P _ { i , : } | ^ { 2 } = \sum _ { i = 1 } ^ { N } \left| x _ { i } - \bar { x } - X ^ { \top } X A x _ { i } \right| ^ { 2 } } \end{array}$ By assuming that all the input patterns are i=1 zero centralized, we have $\bar { x } = 0$ and $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } = \mathrm { t r } \left( ( I - X ^ { \top } X A ) ^ { 2 } X ^ { \top } X \right) } \end{array}$ The theorem below shows that $A$ minimizing the objective $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$ contains the largest $m$ eigenvectors of $X ^ { \top } X$ where $m$ is the rank of $A$ .
+
+Theorem 2. Let $W _ { Q }$ and $W _ { K }$ be matrices of size $D \times m$ . Let $\lambda _ { 1 } \ \ge \ \lambda _ { 2 } \ \ge \ . . . \ \ge \ \lambda _ { D }$ be the eigenvalues of $X ^ { \top } X$ ranked in descending order, and let $v _ { i } \in \mathbb { R } ^ { D } , i = 1 , \dots , D$ be the corresponding eigenvectors. The optimal solution $A ^ { * }$ that minimizes $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$ is given by $\begin{array} { r } { A = \bar { \sum } _ { i = 1 } ^ { m ^ { - } } \frac { 1 } { \lambda _ { i } } v _ { i } v _ { i } ^ { \top } } \end{array}$
+
+Proof. Since $W _ { Q } , W _ { K } \in \mathbb { R } ^ { D \times m }$ where $m < D$ , we know that $A$ is a matrix of rank . Hence, we know $\begin{array} { r } { \underset { A } { \operatorname* { m i n } } \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } \geq \sum _ { k = m + 1 } ^ { N } \lambda _ { k } } \end{array}$ We also know that by choosing $A$ as W $\begin{array} { r } { A = \sum _ { i = 1 } ^ { m } \frac { 1 } { \lambda _ { i } } v _ { i } v _ { i } ^ { \top } } \end{array}$ we have
+
+$$
+\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } = \mathrm { t r } \left( \left( I - \sum _ { i = 1 } ^ { m } v _ { i } v _ { i } ^ { \top } \right) ^ { 2 } X ^ { \top } X \right) = \sum _ { k = m + 1 } ^ { D } \lambda _ { k } } \end{array}
+$$
+
+Hence, the solution $A$ for minimizing $\begin{array} { r } { \sum _ { i = 1 } ^ { N } | x _ { i } - X ^ { \top } X A x _ { i } | ^ { 2 } } \end{array}$ is essential a weighted combination of top eigenvectors of $X ^ { \top } X$ . Since a small gradient will prefer a small quantity of $\scriptstyle \sum _ { i = 1 } ^ { N } | x _ { i } -$ $X ^ { \top } X A x _ { i } | ^ { 2 }$ , by minimizing through the self-attention layer, we essentially choose weight matrix $W _ { Q }$ and $W _ { K }$ to be aligned with the principal directions of $X ^ { \top } X$ . ■
+
+# H Experiment Analysis and Other Key Results
+
+# H.1 Experiment analysis of GPT2-FPT model
+
+In this section, we conduct experiments to analyze whether the self-attention frozen pre-trained model improves performance compared with overall fine-tuning and random initialization. Firstly, we compare GPT2(6) FPT with the same model without freezing (No Freeze) and random initial model (No Pre-train). For the end-to-end paradigm No Pre-train GPT2-backbone (6 Layers), we directly train all parameters of the model. We summarize the results in Table 21 and Table 22. Then we analyze the performance of various layers to clarify our selection of GPT2(6) FPT.
+
+Table 21: Model analysis results on $5 \%$ data. We use prediction length $O \in \{ 9 6 , 1 9 2 , 3 3 6 , 7 2 0 \}$ for ILI and $O \in \{ 2 4 , 3 6 , \hat { 4 } 8 , 6 0 \}$ for others.
+
+| Methods | GPT2(6) | No Freeze | No Pretrain |
| Metric | MSE | MAE | MSE | MAE | MSE | MAE |
| wwheees | 96 | 0.175 | 0.230 | 0.183 | 0.229 | 0.199 | 0.254 |
| 192 | 0.227 | 0.276 | 0.275 | 0.300 | 0.262 | 0.302 |
| 336 | 0.286 | 0.322 | 0.297 | 0.331 | 0.326 | 0.345 |
| 720 | 0.366 | 0.379 | 0.380 | 0.388 | 0.405 | 0.396 |
| 96 | 0.543 | 0.506 | 0.671 | 0.564 | 0.882 | 0.643 |
| LL | 192 | 0.748 | 0.580 | 0.907 | 0.632 | 1.389 | 0.817 |
| 336 | 0.754 | 0.595 | 0.931 | 0.655 | 2.968 | 1.149 |
| 720 | - | - | - | - | - | - |
| 96 | 0.376 | 0.421 | 0.440 | 0.449 | 0.465 | 0.457 |
| 192 | 0.418 | 0.441 | 0.503 | 0.478 | 0.614 | 0.536 |
| LLa | 336 | 0.408 | 0.439 | 0.691 | 0.572 | 0.596 | 0.529 |
| 720 | - | - | - | - | - | - |
| LL | 96 | 0.386 | 0.405 | 0.429 | 0.432 | 0.394 | 0.410 |
| 192 | 0.440 | 0.438 | 0.496 | 0.470 | 0.432 | 0.432 |
| 336 | 0.485 | 0.459 | 0.535 | 0.489 | 0.491 | 0.464 |
| 720 | 0.557 | 0.499 | 0.786 | 0.592 | 0.564 | 0.503 |
| 96 | 0.199 | 0.280 | 0.217 | 0.293 | 0.301 | 0.353 |
| LL | 192 | 0.256 | 0.316 | 0.300 | 0.350 | 0.321 | 0.365 |
| 336 | 0.318 | 0.353 | 0.331 | 0.368 | 0.371 | 0.398 |
| 720 | 0.460 | 0.439 | 0.460 | 0.436 | 0.659 | 0.528 |
+
+Fine-tune More Parameters Compared with fine-tuning all parameters, self-attention frozen pretrained model GPT2(6) FPT achieves better performance on most datasets and yields an overall $1 2 . 7 \%$ relative MSE reduction on $5 \%$ data and $1 1 . 5 \%$ relative MSE reduction on $10 \%$ data. It verifies that frozen pre-trained attention layers are effective for time series forecasting.
+
+Parameters Initialization Compared with the random initial model, self-attention frozen pre-trained model GPT2(6) FPT achieves better performance on most datasets and yields an overall $2 1 . 2 \%$ relative MSE reduction on $5 \%$ data and $1 4 . 3 \%$ relative MSE reduction on $10 \%$ data. It again suggests that a model pre-trained on cross-domain data can achieve significant performance improvement in time series forecasting.
+
+The Number of GPT2 Layers For most transformer-based methods in time-series forecasting Zhou et al. (2022); Wu et al. (2021); Nie et al. (2022), no more than 3 encoder layers are included. However, most pre-trained models with at least 12 layers may suffer from overfitting in time series forecasting. To better balance performance and computational efficiency, we test using various numbers of layers on ETTh2. Additionally, we train a completely random initialized non-pretrained GPT2 as a comparison. The results are shown in Figure 9, for both $5 \%$ and $10 \%$ data, the pre-trained model is unable to do well with few layers but significantly outperforms non-pre-trained GPT2 with more attention blocks transferred from NLP. It indicates that pre-trained attention layers produce a great benefit in time series forecasting. Also, the pre-trained model achieves better performance between 3 and 9 layers. Thus GPT2 with 6 layers is chosen as our default architecture.
+
+Table 22: No Pretrain and No Freeze results on $10 \%$ data. We use prediction length $O \in$ $\{ 9 6 , 1 9 2 , 3 3 6 , 7 2 0 \}$ for ILI and $O \in \{ 2 4 , 3 6 , 4 8 , 6 0 \}$ for others.
+
+| Methods | GPT2(6) | No Freeze | No Pretrain |
| Metric | MSE | MAE | MSE | MAE | MSE | MAE |
| weeeet | 96 | 0.163 | 0.215 | 0.168 | 0.221 | 0.175 | 0.229 |
| 192 | 0.210 | 0.254 | 0.238 | 0.286 | 0.244 | 0.287 |
| 336 | 0.256 | 0.292 | 0.289 | 0.318 | 0.301 | 0.325 |
| 720 | 0.321 | 0.339 | 0.398 | 0.383 | 0.390 | 0.378 |
| LLE | 96 | 0.458 | 0.456 | 0.605 | 0.532 | 0.680 | 0.560 |
| 192 | 0.570 | 0.516 | 0.713 | 0.579 | 0.738 | 0.602 |
| 336 | 0.608 | 0.535 | 0.747 | 0.586 | 0.893 | 0.641 |
| 720 | 0.725 | 0.591 | 0.945 | 0.688 | 2.994 | 1.169 |
| 96 | 0.331 | 0.374 | 0.369 | 0.394 | 0.422 | 0.433 |
| LLa | 192 | 0.402 | 0.411 | 0.464 | 0.455 | 0.482 | 0.466 |
| 336 | 0.406 | 0.433 | 0.420 | 0.439 | 0.540 | 0.496 |
| 720 | 0.449 | 0.464 | 0.535 | 0.515 | 0.564 | 0.519 |
| LL | 96 | 0.390 | 0.404 | 0.429 | 0.430 | 0.385 | 0.401 |
| 192 | 0.429 | 0.423 | 0.463 | 0.446 | 0.426 | 0.421 |
| 336 | 0.469 | 0.439 | 0.510 | 0.470 | 0.506 | 0.455 |
| 720 | 0.569 | 0.498 | 0.780 | 0.591 | 0.576 | 0.505 |
| LLa | 96 | 0.188 | 0.269 | 0.243 | 0.311 | 0.244 | 0.315 |
| 192 | 0.251 | 0.309 | 0.307 | 0.352 | 0.318 | 0.363 |
| 336 | 0.307 | 0.346 | 0.337 | 0.364 | 0.409 | 0.412 |
| 720 | 0.426 | 0.417 | 0.471 | 0.440 | 0.473 | 0.450 |
+
+
+Figure 9: Comparison of pre-trained and non-pre-trained GPT2 with various layers on ETTh2. Color represents various prediction length $O \in \{ 9 6 , 1 9 2 \}$ and line style means different models .
+
+# H.2 No Pre-training but Freezing
+
+For comprehensively ablation on pre-training and freezing strategies, we also add experiment for random initialized GPT2(6) with freezing. The results in Table 23 shows that only input and output modules can not work and pre-trained knowledge play an importance part in time series tasks.
+
+Table 23: Ablation on random initialized model with freezing.
+
+| Methods | GPT2(6) | No Freeze | No Pretrain | No Pretrain + Freeze |
| Metric | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE |
| LLa | 96 | 0.376 | 0.421 | 0.440 | 0.449 | 0.465 | 0.457 | 0.540 | 0.497 |
| 192 | 0.418 | 0.441 | 0.503 | 0.478 | 0.614 | 0.536 | 0.721 | 0.580 |
+
+# H.3 Fine-Tuning Parameters Selection
+
+In this section, we conduct ablation experiments to study which parameters are important to fine-tune. Since the input embedding and output layers are randomly initialized for adapting to a new domain, they must be trained. Then, we study adding layer normalization and positional embeddings to the list of fine-tuning parameters. Table 24 shows the results that re-train parameters of layer normalization and positional embeddings can bring certain benefits, especially in longer prediction lengths. Thus, we follow the standard practice to re-train positional embeddings and layer normalization.
+
+Table 24: Ablation by fixing positional embeddings or layer normalization on $5 \%$ ETTm1 and ETTm2. Parameters of GPT2(6) are successively added to the list of fine-tuned parameters.
+
+| Methods | Input & Output | +LN | + POS |
| Metric | MSE | MAE | MSE | MAE | MSE | MAE |
| LL | 96 | 0.395 | 0.410 | 0.392 | 0.409 | 0.386 | 0.405 |
| 192 | 0.444 | 0.438 | 0.436 | 0.435 | 0.440 | 0.438 |
| 336 | 0.510 | 0.472 | 0.495 | 0.467 | 0.485 | 0.459 |
| 720 | 0.607 | 0.517 | 0.564 | 0.503 | 0.557 | 0.499 |
| 96 | 0.198 | 0.282 | 0.198 | 0.279 | 0.199 | 0.280 |
| La | 192 | 0.261 | 0.324 | 0.263 | 0.325 | 0.256 | 0.316 |
| 336 | 0.336 | 0.377 | 0.322 | 0.356 | 0.318 | 0.353 |
| 720 | 0.473 | 0.444 | 0.457 | 0.435 | 0.460 | 0.436 |
+
+# H.4 Analysis of Data Volume
+
+Results of few-shot learning show that GPT2(6) FPT shows SOTA performance in few-shot learning tasks in which the model is trained on $5 \%$ data and $10 \%$ data. Plus, it has comparable performance with the SOTA baselines PatchTST and Dlinear on full sample forecasting setting as well. This phenomenon raises a question that how performance changes with an increase in data sample size. Thus, we conduct experiments on various percentages $P \in \{ 5 \%$ , $1 0 \%$ , $2 0 \%$ , $5 0 \%$ , $8 0 \%$ , $1 0 0 \% \}$ of ETTh2. Figure 10 shows that the performance improvement for GPT2(6) FPT is almost flattened. These results illustrate that such a cross-domain FPT model is extremely efficient in few-shot time series forecasting and only requires a few fine-tuning samples to reach a SOTA performance. For more complete data, end-to-end training models start to catch up, but still, a GPT2(6) FPT model can be comparable to those SOTA end-to-end training algorithms.
+
+
+Figure 10: Results on various percentages of ETTh2. Line color represents different models and line style means various prediction lengths $\mathrm { ~ \ i ~ { ~ O ~ } ~ } \in \{ 9 6 , 1 9 2 \}$ .
+
+# H.5 Knowledge transfer with other Pre-trained Transformer Models
+
+We investigate how other pre-trained transformer models perform and whether other domains can also help. Another NLP pre-trained model BERT Devlin et al. (2019) and the CV pre-trained model BEiT Bao et al. (2022) are trained on $5 \%$ ETTh2 and $5 \%$ ETTm2. Similar to GPT2, we only reserve 6 layers and freeze attention blocks. Our results are shown in Table 25 that BERT(6) FPT and BEiT(6) FPT are comparable to PatchTST and remarkably surpass other baselines. We come to the conclusion that the universality of our proposed architecture holds across other pre-trained-transformer models. Moreover, the domain of successful knowledge transfer in time series forecasting is not limited to natural language. Knowledge from the CV domain can also help, supported by BEiT’s experimental results.
+
+Table 25: Results of frozen pretrained transformer variants on $5 \%$ ETTh2 and ETTm2. We use prediction length $O \in \{ 9 6 , 1 \bar { 9 } 2 , 3 3 6 , 7 2 0 \}$ . A lower MSE indicates better performance. Black: best, Red: second best, Violet: third best. ’-’ means that $5 \%$ time series is not sufficient to constitute a training set.
+
+| Methods | Metric | ETTh2 | ETTm2 |
| 96 | 192 | 336 | 720 | 96 | 192 | 336 | 720 |
| GPT2-backbone(6 Layers) | MSE | 0.376 | | 0.421 0.408 | - | 0.199 | 0.256 | 0.318 | 0.460 |
| MAE | 0.419 | | 0.441 0.439 | - | 0.280 | 0.316 | 0.353 | 0.436 |
| BERT-backbond(6 Layers) | MSE MAE | 0.397 0.418 | 0.480 0.465 | 0.481 0.472 | - = | 0.222 0.300 | 0.281 0.335 | 0.331 0.367 | 0.441 0.428 |
| BEiT-backbond(6 Layers) | MSE MAE | |0.405 0.418 | 0.448 0.446 0.500 | 0.524 | | 0.208 0.291 | 0.272 0.326 | 0.331 | 0.452 |
| DLinearZeng et al. (2023) | MSE MAE | 0.4420.617 0.4560.542 | | 1.424 | - - | | 0.2360.306 | 0.362 0.380 | 0.433 0.674 |
| PatchTSTNie et al. (2022) | MSE MAE | [0.401 0.421 | 0.452 0.4550.469 | 0.849 0.464 | - - | 0.326 | 0.373 [0.2060.264 | 0.423 0.334 | 0.583 0.454 |
| FEDformerZhou et al. (2022) | MSE MAE | 0.390 0.424 | 0.457 0.4650.483 | 0.477 | - - | 0.288 | 0.324 0.2990.290 0.378 0.523 | 0.367 | 0.483 |
| AutoformerWu et al. (2021) | MSE MAE | 0.428 0.496 0.486 0.468 0.504 0.496 | | | - - | 0.320 0.361 [0.232 0.291 0.322 | 0.357 | 0.427 0.478 0.517 | 0.510 0.533 0.538 |
+
+# H.6 Full Results of Classification
+
+Table 26: Full results for the classification task. $^ *$ . in the Transformers indicates the name of ∗former.
+
+| Methods | Classical methods XGBoost Rocket | RNN | TCN | Trans. Re. | MLP DLinear LightTS. | TimesNet | GPT2(6) |
| | LSTNet LSSL | | | | In. | | | | Pyra.Auto. Station. | FED. | ETS. Flow. | | 29.7 | |
| EthanolConcentration | 43.7 | 45.2 | 39.9 | 31.1 | 28.9 | 32.7 | 31.9 | 31.6 | 30.8 | 31.6 | 32.7 | 31.2 | 28.1 | 33.8 | 32.6 | | 35.7 | | 34.2 |
| FaceDetection | 63.3 | 64.7 | 65.7 | 66.7 | 52.8 | 67.3 | 68.6 | 67.0 | 65.7 | 68.4 | | 68.0 | 66.0 | 66.3 | 67.6 | 68.0 | 67.5 | 68.6 | 69.2 |
| Handwriting | 15.8 | 58.8 | 25.8 | 24.6 | 53.3 | 32.0 | 27.4 | 32.8 | 29.4 | 36.7 | 31.6 | | 28.0 | 32.5 | 33.8 | 27.0 | 26.1 | 32.1 | 32.7 |
| Heartbeat | 73.2 | 75.6 | 77.1 | 72.7 | 75.6 | 76.1 | 77.1 | 80.5 | 75.6 | 74.6 | 73.7 | | 73.7 | 71.2 | 77.6 | 75.1 | 75.1 | 78.0 | 77.2 |
| JapaneseVowels | 86.5 | 96.2 | 98.1 | 98.4 | 98.9 | 98.7 | 97.8 | 98.9 | 98.4 | 96.2 | 99.2 | | 98.4 | 95.9 | 98.9 | 96.2 | 96.2 | 98.4 | 98.6 |
| PEMS-SF | 98.3 | 75.1 | 86.7 | 86.1 | 68.8 | 82.1 | 82.7 | 81.5 | 83.2 | 82.7 | 87.3 | | 80.9 86.0 | | 83.8 | 75.1 | 88.4 | 89.6 | 87.9 |
| SelfRegulationSCP1 | 84.6 | 90.8 | 84.0 | 90.8 | 84.6 | 92.2 | 90.4 | 90.1 | 88.1 | 84.0 | 89.4 | 88.7 | 89.6 | 92.5 | | 87.3 | 89.8 | 91.8 | 93.2 |
| SelfRegulationSCP2 SpokenArabicDigits | 48.9 | 53.3 | 52.8 | 52.2 | 55.6 | 53.9 | 56.7 | 53.3 | 53.3 | 50.6 | 57.2 | | 54.4 55.0 | 56.1 | | 50.5 | 51.1 | 57.2 | 59.4 |
| UWaveGestureLibrary | 69.6 75.9 | 71.2 94.4 | 100.0 87.8 | 100.0 | 95.6 | 98.4 85.6 | 97.0 | 100.0 | 99.6 | 100.0 | 100.0 | | 100.0 100.0 | 98.8 | | 81.4 82.1 | 100.0 80.3 | 99.0 85.3 | 99.2 88.1 |
| Average | | 72.5 | 71.8 | 85.9 70.9 | 88.4 70.3 | 71.9 | 85.6 71.5 | 85.6 72.1 | 83.4 70.8 | 85.9 71.1 | 87.5 72.7 | 85.3 70.7 | 85.0 71.0 | 86.6 73.0 | | 67.5 | 70.4 | 73.6 | |
| 66.0 | | | | | | | | | | | | | | | | | | 74.0 |
+
+# H.7 Full Results of Anomaly Detection
+
+# H.8 Full Results of Imputation
+
+H.9 Full Results of Short-term Forecasting
+
+# H.10 Input Length Setting Discussion
+
+The consideration of input length is of great importance. It is widely believed that longer input lengths have the potential to generate superior results. However, in practice, certain algorithms might fall short in effectively utilizing long input signals due to overfitting issues either. Here, we conducted long-term forecasting experiments by comparing our approach with the best reported values from different baseline papers. This was done to avoid any biases stemming from selective tuning of baseline parameters. While some may argue in favor of a fairer comparison using a fixed input length, we are starting to shift our focus towards pursuing more accurate algorithms that possess enhanced capabilities for handling longer inputs. Instead of restricting the input length to a fixed small value, it is pragmatic to tune both the input length and model parameters based on performance, as it is often the primary concern in practical usage. Exploring the utilization of extremely long inputs, such as Chatgpt or LLM, is among our future research directions.
+
+Table 27: Full results for the anomaly detection.
+
+| Methods Metrics | P | SMD R | P | MSL | F1 | | SMAP R | P | SWaT | F1 | | PSM R | F1 | AvgF1 % |
| | F1 | R | P | F1 | R |
| GPT(6) | 88.89 | 84.98 | 86.89 | 82.00 | 82.91 | 82.45 | 90.60 | 60.95 | 72.88 | 92.20 | 96.34 | 94.23 | | 98.62 | 95.68 97.13 | | 86.72 |
| TimesNet* | 87.91 | 81.54 | 84.61 | 89.54 | | 75.36 | 81.84 | 90.14 | 56.40 | 69.39 | 90.75 | 95.40 | 93.02 | 98.51 | 96.20 | 97.34 | 85.24 |
| PatchTST | 87.26 | 82.14 | 84.62 | 88.34 | | 70.96 | 78.70 | 90.64 | 55.46 | 68.82 | 91.10 | 80.94 | 85.72 | 98.84 | 93.47 | 96.08 | 82.79 |
| ETSformer | 87.44 | 79.23 | 83.13 | 85.13 | 84.93 | 85.03 | 92.25 | | 55.75 | 69.50 | 90.02 | 80.36 | 84.91 | 99.31 | 85.28 | 91.76 | 82.87 |
| FEDformer | 87.95 | 82.39 | 85.08 | 77.14 | 80.07 | 78.57 | 90.47 | 58.10 | | 70.76 | 90.17 | 96.42 | 93.19 | 97.31 | 97.16 | 97.23 | 84.97 |
| LightTS | 87.10 | 78.42 | 82.53 | 82.40 | 75.78 | 78.95 | 92.58 | | 55.27 | 69.21 | 91.98 | 94.72 | 93.33 | 98.37 | 95.97 | 97.15 | 84.23 |
| DLinear | 83.62 | 71.52 | 77.10 | 84.34 | 85.42 | 84.88 | | 92.32 | 55.41 | 69.26 | 80.91 | 95.30 | 87.52 | 98.28 | 89.26 | 93.55 | 82.46 |
| Stationary | 88.33 | 81.21 | 84.62 | 68.55 | 89.14 | 77.50 | | 89.37 | 59.02 | 71.09 | 68.03 | 96.75 | 79.88 | 97.82 | 96.76 | 97.29 | 82.08 |
| Autoformer | 88.06 | 82.35 | 85.11 | 77.27 | 80.92 | 79.05 | 90.40 | 58.62 | | 71.12 | 89.85 | 95.81 | 92.74 | 99.08 | 88.15 | 93.29 | 84.26 |
| Pyraformer | 85.61 | 80.61 | 83.04 | 83.81 | 85.93 | 84.86 | 92.54 | 57.71 | | 71.09 | 87.92 | 96.00 | 91.78 | 71.67 | 96.02 | 82.08 | 82.57 |
| Anomaly Transformer"* | 88.91 | 82.23 | 85.49 | 79.61 | 87.37 | 83.31 | 91.85 | 58.11 | | 71.18 | 72.51 | 97.32 | 83.10 | 68.35 | 94.72 | 79.40 | 80.50 |
| Informer | 86.60 | 77.23 | 81.65 | 81.77 | 86.48 | 84.06 | 90.11 | 57.13 | | 69.92 | 70.29 | 96.75 | 81.43 | 64.27 | 96.33 | 77.10 | 78.83 |
| Reformer | 82.58 | 69.24 | 75.32 | 85.51 | 83.31 | 84.40 | 90.91 | 57.44 | | 70.40 | 72.50 96.53 | | 82.80 | 59.93 | 95.38 | 73.61 | 77.31 |
| LogTransformer | 83.46 | 70.13 | 76.21 | 73.05 | 87.37 | 79.57 | 89.15 | 57.59 | | 69.97 | 68.67 97.32 | | 80.52 | 63.06 | 98.00 | 76.74 | 76.60 |
| Transformer | 83.58 | 76.13 | 79.56 | 71.57 | 87.37 | 78.68 | 89.37 | 57.12 | 69.70 | | 68.84 96.53 | | 80.37 | 62.75 | 96.56 | 76.07 | 76.88 |
+
+\* We reproduce the results of TimesNet by https://github.com/thuml/Time-Series-Library. \*\* We replace the joint criterion in Anomaly Transformer with reconstruction error for fair comparison.
+
+Table 28: Full results for the imputation task.
+
+| MethodsMask Ratio | GPT2(3)MSE MAE | TimesNetMSE MAE | PatchTSTMSE MAE | ETSformerMSEMAE | LightTSMSE MAE | DLinearMSE MAE | FEDformerMSE MAE | StationaryMSEMAE | AutoformerMSE MAE | InformerMSE MAE | Reformer|MSE MAE |
| 12.5%[L] 25%37.5%50%Avg | 0.017 0.0850.022 0.0960.0290.1110.040 0.1280.0280.105 | 0.0230.1010.0230.1010.0290.1110.036 0.1240.0270.107 | 0.0410.1300.0440.1350.0490.1430.055 0.1510.0470.140 | 0.0960.2290.0960.2290.1330.2710.1860.3230.1200.253 | 0.0930.2060.0930.2060.1130.2310.1340.2550.104 0.218 | 0.0800.1930.080 0.1930.1030.2190.132 0.2480.0930.206 | 0.0520.1660.0520.1660.069 0.1910.089 0.2180.062 0.177 | 10.0320.1190.0320.1190.0390.1310.0470.1450.0360.126 | [0.0460.144|0.0460.1440.0570.1610.0670.1740.0510.150 | 0.0630.180|0.0630.1800.0790.2000.093 0.2180.0710.188 | [0.042 0.1460.0420.1460.0630.1820.082 0.2080.0550.166 |
| 12.5%L 25% | 0.0170.0760.0200.0800.0220.087 | 0.0180.0800.0200.0850.0230.091 | 10.0260.0940.0280.0990.030 0.1040.0340.1100.0290.102 | 0.1080.2390.1640.2940.2370.3560.3230.4210.2080.327 | 10.0340.1270.042 0.1430.0510.159 | 0.062 0.1660.0850.1960.1060.2220.131 0.2470.0960.208 | 0.0560.1590.080 0.1950.110 0.2310.156 0.2760.1010.215 | 0.0210.0880.0240.0960.0270.1030.0300.1080.0260.099 | 0.0230.0920.0260.1010.0300.108 | 0.1330.2700.1350.2720.1550.293 | 0.108 0.2280.1360.2620.1750.3000.211 0.3290.1570.280 |
| L 37.5%50%Avg | 0.0220.087 |
| 0.0250.0950.0210.084 | 0.0260.0980.0220.088 | 0.0590.1740.046 0.151 | 0.0350.1190.0290.105 | 0.2000.3330.1560.292 |
| 12.5%LLT 25%37.5% | 0.0430.1400.054 0.156 | 0.0570.1590.069 0.178 | 0.0930.2010.107 0.2170.120 0.230 | 0.1260.2630.169 0.3040.220 0.347 | 0.240 0.3450.265 0.364 | 0.151 0.2670.180 0.292 | 10.0700.1900.106 0.236 | 10.0600.1650.080 0.1890.102 0.212 | 0.074 0.1820.0900.2030.109 0.222 | 0.1140.2340.140 0.2620.1740.293 | 10.0740.1940.1020.2270.135 0.2610.179 0.2980.122 0.245 |
| 0.072 | | | 0.084 | | | | | | |
| 50% | 0.107 | | | 0.102 | 0.215 | 0.1410.248 | | | | | | | | | | | | | | |
| | | 0.173 | | 0.187 | | | | | | | | | | | | | | | |
| | | | | 0.202 | 0.4020.329 | 0.3340.4040.2840.373 | 0.201 | 0.306 | 0.117 | 0.246 | 0.0940.201 | 0.0940.201 | 0.1370.2480.1030.214 | 0.215 0.3250.1610.279 | 0.122 0.245 |
| Avg | 0.069 | 173 | 0.078 | 0.1150.224 |
| 12.5%LLE 25%37.5% | 0.0390.044 | | | | | | | | | | | | | | | | | | | | |
| 44 | | | | | | | | | | | | | | | | | | | | |
| 0.1250.135 | 0.0400.046 | 0.1300.141 | 0.0570.1520.0610.158 | 10.1870.3190.2790.390 | 0.1010.2310.1150.246 | 0.1000.127 | 0.2160.247 | 10.0950.2120.1370.258 | 0.0420.0490.147 | 0.1330.0490.147 | 0.0440.1380.050 0.149 | 0.3050.4310.3220.444 | 0.163 0.2890.206 0.3310.2520.3700.316 0.4190.2340.352 |
| 0.051 | 0.147 | | | | | | | | | | | | | | | | | |
| 50%Avg | 0.059 | 0. | | 0.060 | 0.162 | 0.0730.174 | 0.6020.5720.3670.436 | 0.136 0.2680.1190.250 | 0.1830.2990.1420.259 | 0.299 | 0.2320.341 | 0.065 | 0.170 | 0.0680.173 | 0.3690.472 | 472 |
| 0.048 | 0.141 | 0.049 | 0.146 | 0.0650.163 | 0.1630.279 | 0.05330.152 | 0.0550.156 | 0.3370.452 |
| 12.5%GEE 25%37.5%50%Avg | 0.080 0.1940.0870.094 | 0.080 0.1940.2030.211 | 0.0850.2020.089)0.2060.0940.213 | 10.055 0.160 | 10.1960.3210.2070.332 | 0.102 0.2290.1210.252 | 0.0920.2140.118 0.247 | 0.1070.237 | 10.0930.2100.0970.214 | 0.089 0.2100.0960.220 | 0.218 0.326 | 10.1900.3080.197 0.312 |
| 0.0650.1750.0760.189 | 0.219 | | | | | | | | | | | 0.219 0.326 | |
| 0.1010.090 | 0.2200.207 | 0.1000.092 | 0.221 | 0.0910.208 | 0.2350.357 | 57 | 0.1600.2930.1310.262 | 0.1750.3050.1320.260 | 0.1580.284 | 0.1080.228 | 0.228 | 0.1130.239 | 0.2280.3310.2220.328 | |
| 0.2030.3150.210 0.3190.2000.313 |
| 0.092 | 0.210 | 0.0720.183 | 0.2140.339 | 0.130 0.259 | 0.100 0.218 | 0.1010.225 |
| 12.5%wrees 25%37.5%50%Avg | 0.026 | 0.04 | 049 | 0.0250.0450.0290.052 | 0.0290.049 | 0.0570.141 | [0.0470.1010.052 0.111 | [0.0390.084|0.0480.103 | 0.041 0.107 | 0.0270.051 | 0.0260.047 | 0.0370.093 | 10.031 0.076 |
| 0.028 | 0.0 | | 0.0310.053 | 0.0650.155 | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | 0.0400.091 |
| 0.0370.0650.0310.056 | | | 0.0380.063 | 0.1020.207 | 0.0650.133 | 0.0660.134 | 0.1830.312 | 0.0370.068 | 0.0370.067 | 0.053 0.114 | |
| 0.0300.054 | 0.0600.144 | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | 0.0460.0990.0380.087 |
| 0.0760.171 | 0.0550.117 | 0.052 0.110 | 0.0990.203 | 0.0320.059 | 0.0310.057 | 0.0450.104 |
+
+Table 29: Full results of short-term forecasting.
+
+ | Methods | | GPT2(6)TimesNetPatchTSTN-HiTSN-BEATSETSformerLightTSDLinear FEDformer Stationary Autoformer Informer Reformer | | | | | | | | | | | |
| SMAPE | 13.531 | 13.387 | 13.477 | 13.418 | 13.436 | 18.009 | 14.247 | 16.965 | 13.728 | 13.717 | 13.974 | 14.727 | 16.169 |
| heea | MASE | 3.015 | 2.996 | 3.019 | 3.045 | 3.043 | 4.487 | 3.109 | 4.283 | 3.048 | 3.078 | 3.134 | 3.418 | 3.800 |
| OWA | 0.793 | 0.786 | 0.792 | 0.793 | 0.794 | 1.115 | 0.827 | 1.058 | 0.803 | 0.807 | 0.822 | 0.881 | 0.973 |
| tttni | SMAPE | 10.177 | 10.100 | 10.38 | 10.202 | 10.124 | 13.376 | 11.364 | 12.145 | 10.792 | 10.958 | 11.338 | 11.360 | 13.313 |
| MASE | 1.194 | 1.182 | 1.233 | 1.194 | 1.169 | 1.906 | 1.328 | 1.520 | 1.283 | 1.325 | 1.365 | 1.401 | 1.775 |
| OWA | 0.898 | 0.890 | 0.921 | 0.899 | 0.886 | 1.302 | 1.000 | 1.106 | 0.958 | 0.981 | 1.012 | 1.027 | 1.252 |
| SMAPE | 12.894 | 12.670 | 12.959 | 12.791 | 12.677 | 14.588 | 14.014 | 13.514 | 14.260 | 13.917 | 13.958 | 14.062 | 20.128 |
| nnyauo | MASE | 0.956 | 0.933 | 0.970 | 0.969 | 0.937 | 1.368 | 1.053 | 1.037 | 1.102 | 1.097 | 1.103 | 1.141 | 2.614 |
| OWA | 0.897 | 0.878 | 0.905 | 0.899 | 0.880 | 1.149 | 0.981 | 0.956 | 1.012 | 0.998 | 1.002 | 1.024 | 1.927 |
| SMAPE | 4.940 | 4.891 | 4.952 | 5.061 | 4.925 | 7.267 | 15.880 | 6.709 | 4.954 | 6.302 | 5.485 | 24.460 | 32.491 |
| Dirtt | MASE | 3.228 | 3.302 | 3.347 | 3.216 | 3.391 | 5.240 | 11.434 | 4.953 | 3.264 | 4.064 | 3.865 | 20.960 | 33.355 |
| OWA | 1.029 | 1.035 | 1.049 | 1.040 | 1.053 | 1.591 | 3.474 | 1.487 | 1.036 | 1.304 | 1.187 | 5.879 | 8.679 |
| SMAPE | 11.991 | 11.829 | 12.059 | 11.927 | 11.851 | 14.718 | 13.525 | 13.639 | 12.840 | 12.780 | 12.909 | 14.086 | 18.200 |
| aaeeeee | MASE | 1.600 | 1.585 | 1.623 | 1.613 | 1.599 | 2.408 | 2.111 | 2.095 | 1.701 | 1.756 | 1.771 | 2.718 | 4.223 |
| OWA | 0.861 | 0.851 | 0.869 | 0.861 | 0.855 | 1.172 | 1.051 | 1.051 | 0.918 | 0.930 | 0.939 | 1.230 | 1.775 |
\ No newline at end of file