Next Article in Journal
Efficient Solution of Fokker–Planck Equations in Two Dimensions
Previous Article in Journal
An Interior Regularity Property for the Solution to a Linear Elliptic System with Singular Coefficients in the Lower-Order Term
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Adaptive Learning Time Series Forecasting Model Based on Decoder Framework

School of Information, Shanxi University of Finance and Economics, Taiyuan 030006, China
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(3), 490; https://doi.org/10.3390/math13030490
Submission received: 11 December 2024 / Revised: 24 January 2025 / Accepted: 29 January 2025 / Published: 31 January 2025

Abstract

:
Time series forecasting constitutes a fundamental technique for analyzing dynamic alterations within temporal datasets and predicting future trends in various domains. Nevertheless, achieving effective modeling faces challenges arising from complex factors such as accurately capturing the relationships among temporally distant data points and accommodating rapid shifts in data distributions over time. While Transformer-based models have demonstrated remarkable capabilities in handling long-range dependencies recently, directly applying them to address the evolving distributions within temporal datasets remains a challenging task. To tackle these issues, this paper presents an innovative sequence-to-sequence adaptive learning approach centered on decoder framework for addressing temporal modeling tasks. An end-to-end deep learning architecture-based Transformer decoding framework is introduced, which is capable of adaptively discerning the interdependencies within temporal datasets. Experiments carried out on multiple datasets indicate that the time series adaptive learning model based on the decoder achieved an overall reduction of 2.6% in MSE (Mean Squared Error) loss and 1.8% in MAE (Mean Absolute Error) loss when compared with the most advanced Transformer-based time series forecasting model.

1. Introduction

Time series forecasting assumes a crucial role in diverse fields, such as meteorological monitoring [1], stock price forecasting [2], traffic flow monitoring [3], and energy demand forecasting [4]. In recent years, concomitant with the advancement of advanced algorithms, computational tools, and big data, deep learning models have witnessed significant progress in numerous domains. Among these models, the Transformer [5] has attained remarkable success in natural language processing, computer vision, image and video analysis, speech recognition, and other domains, mainly attributed to its utilization of attention mechanisms. Consequently, the Transformer has emerged as an ideal option for sequence modeling tasks.
One significant sequence modeling task is long sequence time series forecasting (LSTF). Nevertheless, LSTF faces several crucial challenges: the difficulty of effectively capturing long-range dependencies in data, the limited quantities of training data, and the rapid evolution of data distributions over time. In contrast to other methods, Transformer-based models can avail themselves of their potent attention mechanisms to capture precise long-range dependencies between inputs and outputs, rendering them highly suitable for LSTF tasks. Nevertheless, LSTF tasks are frequently restricted by the quantity of available data, thereby making it arduous to construct deep Transformer models. Furthermore, owing to the non-stationarity of real-world environments, data distributions frequently shift over time, a phenomenon referred to as concept drift [6]. In LSTF tasks, concept drift can result in disparities between the training and testing data distributions. Merely removing the non-stationary components of time series data may lead to information loss and lower the accuracy of forecasting. The current mainstream approaches for addressing concept drift center on enabling the model to learn the variations in data distribution and adjust the forecasting accordingly.
In order to address the aforementioned issues, this paper puts forward an adaptive learning model based on decoder framework (ALD) for time series forecasting, featuring two main innovations:
  • The ALD model employs a decoder-only architecture. In LSTF tasks, the masking operation in the decoder-only architecture converts the attention matrix from a non-full-rank matrix to a full-rank one, which theoretically offers greater expressive ability [7]. In contrast to other architectures, the decoder-only structure proves to be more efficacious in extracting, learning, and representing useful information from a given quantity of data, addressing the challenge of deep modeling in LSTF tasks while enhancing data utilization efficiency. Owing to the decoder-only design, the ALD model demonstrates considerable advantages in forecasting accuracy.
  • An adaptive statistical forecasting layer is designed. This layer models the evolving trends in the initial time series data dynamically. Specifically, the model acquires and predicts the key statistical features of the time series independently through this layer. When concept drift takes place, the model is capable of adjusting its outputs adaptively in accordance with the learned trends. This mechanism efficiently captures alterations in the data distribution and promptly adjusts forecasting when abrupt changes arise, significantly enhancing the model’s adaptability and robustness in complex dynamic environments. This design guarantees that the model retains high predictive performance even in the event of concept drift.

2. Related Work

In deep learning models, the Transformer architecture has gained widespread adoption across various tasks owing to its superior performance. The cornerstone of the Transformer model is its encoder-decoder framework, wherein the encoder maps input data into low-dimensional latent representations to capture essential features, while the decoder reconstructs these latent vectors into the original data space. In Transformer models, the encoder compresses the input data into low-dimensional latent vectors to capture the primary features of the data, while the decoder restores these latent vectors to the original data space. Models such as Informer [8] and Pyraformer [9] utilize both the encoder and decoder of Transformer models, enhancing the self-attention mechanism to mitigate computational complexity and expedite inference speed. The Bert [10] model employs the encoder of the Transformer model to train copious amounts of unlabeled text data in an unsupervised fashion. Presently, decoder-only architectures are utilized in large-scale natural language processing models, such as GPT [11], PaLM [12], and LLaMA [13].
In the Transformer model, position embedding is employed to address the absence of positional information in sequence data. To accurately represent the position of elements within the input sequence, the model incorporates two main techniques: absolute position embedding and relative position embedding. Absolute position embedding is simplistic in design and computationally effective, while relative position embedding better reflects relative positional information and tends to yield superior performance in experiments. The Vanilla Transformer [5] employs absolute position embedding, where periodic functions are utilized during embedding, rendering the resulting embedding associated with the absolute positions within the input sequence. To reflect the relative positional information within the sequence, Transformer-XL [14] adopts relative position embedding by adding positional information to the embedding, which also employs periodic functions. Roformer [15] encodes absolute positions through a rotation matrix, naturally integrating relative positional dependencies into the self-attention mechanism. This method is referred to as RoPE (Rotary Position Embedding). Unlike traditional additive position embedding methods, RoPE incorporates positional information via rotation operations, enabling the model to capture relative dependencies between different positions more effectively.
In the field of time series prediction, the distribution of data can evolve over time, a phenomenon known as “concept drift”. This shift in data distribution can significantly impact the accuracy of prediction results. To address this challenge, the Revin [16] model normalizes the input data to fix their distribution in accordance with the mean and variance and restores the output to its original distribution through inverse normalization. The DDG-DA [17] model tackles the issue of concept drift in time series forecasting by optimizing the training process via inner and outer layers, with the aim of predicting future data distributions and enhancing the accuracy of time series forecasting. The DRAIN [18] framework models the changes in model parameters as a dynamic edge-weighted graph problem, where each neuron in the neural network is represented as a node in the graph, and the changes in network parameters over time are reflected as dynamic alterations in edge weights. This enables the model to acquire knowledge of how network parameters evolve under the influence of concept drift. The SAN [19] model improves the accuracy of time series forecasting by means of more flexible normalization and inverse normalization. Firstly, SAN eliminates the non-stationarity of time series by operating on local time segments (that is, subsequences). Secondly, SAN models the evolving trends in the statistical characteristics of the original time series separately.

3. Model Construction

The expressive power of neural networks augments with depth; nevertheless, time series forecasting models are frequently constrained by the size of the training set, rendering it arduous to employ deep models. Augmenting the model’s expressive capacity is an efficacious solution. The ALD model proposed in this paper builds upon the core concepts of decoder-only models and the SAN model, effectively capitalizing on the advantages of both to offer a new approach to time series forecasting. The fundamental concept of the ALD model lies in the fact that the Softmax operation in attention mechanisms projects the values of the input sequence onto the range [0, 1], with all the values summing up to 1. The attention matrix of a decoder-only model is a lower triangular matrix, and upon applying the Softmax operation, the diagonal of this triangular matrix contains positive values, signifying that the determinant is also positive. Consequently, the attention matrix of the decoder-only model is a full-rank matrix, endowing the ALD model with robust expressive capabilities.
Furthermore, time series models are influenced by concept drift. The ALD model makes improvements to the idea from the SAN model, where a separate network is employed to learn changes in the data distribution. Through the incorporation of low-rank decomposition, the ALD model decreases the space needed for storing and transmitting data. Low-rank decomposition decomposes a large matrix into two smaller matrices of lower ranks, enabling the original data to be approximately represented with less storage space and enhancing computational efficiency. The fundamental structure of the ALD model mainly comprises a decoder layer and a statistical forecasting layer, as depicted in Figure 1.
During the forward propagation process, suppose the input time series to the model is X = { x i } i = 1 N . In order to capture distributional changes caused by concept drift in a timely fashion, the input data need to be further segmented into finer-grained data. Firstly, given a time span T, x i is partitioned into M smaller time slices x 1 : N i = x 1 i , , x N i , i = 1 , , M . Each slice s { x j i } j = 1 M undergoes normalization to eliminate non-stationary factors prior to being independently fed into the backbone network. Finally, the backbone network yields the forecasting x ^ ( i ) = ( x ^ N + 1 ( i ) , , x ^ N + T ( i ) ) .
Rotary Position Embedding (RoPE) integrates the merits of both absolute and relative position embedding. Assume that the slice s, when input into the backbone network, is transformed into the query vector q m and the key vector k n by adding position embedding as follows: q m = f ( s m , m ) and k n = f ( s n , n ) , where q m and k n represent the vectors at positions m and n , respectively. The essence of the attention mechanism lies in computing the similarity between vectors through the inner product, which determines the weight matrix, and the final features are extracted based on these weights. In order to incorporate relative positional information into the inner product results, there must be an operation G that satisfies q m , k n = G ( s m , s n , m n ) . The Roformer [7] model offers functions f and G that fulfill this relationship, and their forms are as follows:
f s m , m = W q s m e i m θ ,
f s n , n = W k s n e i m θ ,
G s m , s n , m n = R e W q s m W k s n × e i m θ ,
where R e denotes the real part of a complex number. This can further be expressed as follows:
f s m , m = c o s m θ s i n m θ s i n m θ c o s m θ W q 1,1 W q 1,2 W q 2,1 W q 2,2 s m 1 s m 2 = c o s m θ s i n m θ s i n m θ c o s m θ q m 1 q m 2 ,
f s n , n = c o s m θ s i n m θ s i n m θ c o s m θ W k 1,1 W k 1,2 W k 2,1 W k 2,2 s n 1 s n 2 = c o s m θ s i n m θ s i n m θ c o s m θ k n 1 k n 2 .
Finally, G ( s m , s n , m n ) can be expressed as follows:
  G s m , s n , m n = q m 1 , q m 2 c o s m n θ s i n m n θ s i n m n θ c o s m n θ k n 1 k n 2 .
The training task of the adaptive learning model based on the decoder for time series is a non-stationary data forecasting task, which can be decomposed into a statistical data forecasting task and a stationary data forecasting task. The training process is bifurcated into two stages. Firstly, the original data are fed into the statistical forecasting layer for training, and the parameters of the statistical forecasting layer are frozen upon the completion of the training. Subsequently, the normalized data are fed into the decoder layer. Employing the potent fitting capability of the decoder, the stationary data are utilized for training, and ultimately, the output of the decoder is restored through inverse normalization to retrieve the missing statistical information.
In existing studies, it is widely acknowledged that the overall mean of the input sequence is the maximum likelihood estimate of the mean of the target sequence [19]. Based on this, the statistical forecasting layer employs residual learning techniques to enable the module to learn the difference between the future slice mean μ i and the input sequence mean ρ i , rather than predicting a specific value in the future. Furthermore, two learnable weights, namely W 1 and W 2 , are utilized to predict the statistics in the form of a weighted sum. The statistical forecasting process is depicted as follows: μ ^ i = W 1 × M L P μ i ρ i , s ¯ i ρ i + W 2 × ρ i , σ ^ i = M L P σ i , s ¯ i , where μ i = [ μ 1 i , μ 2 i , , μ M i ] represents the means of all slices of a time series in the input model, and μ ^ i represents the future mean values of these slices. s i = [ s 1 i , s 2 i , , s M i ] represents all time slices in the input model, and s ¯ i represents the predicted values of these slices. σ i represents the standard deviation of the slices within the input model, and σ ^ i represents the future standard deviations of these slices. Finally, the MSE between the predicted statistics and the true values is employed as the loss function to train the network through backpropagation.
This paper employs a standard Transformer decoder to generate output sequences based on time series data represented by rotary position embedding. The decoder comprises eight identical multi-head attention layers that are stacked together. For each input slice s { x j i } j = 1 M , a trainable D-dimensional linear layer W p R D × p projects the slice into a higher-dimensional space to extract features and enhance the expressive ability of the model. Subsequently, a learnable rotary position embedding layer W p o s R D × N adds relative positional information to the high-dimensional mapped slices. Finally, the slice s ( i ) is mapped as s d i = W p s p i + W p o s , where s d ( i ) R D × N , and this is fed into the decoder. Each head h = 1 , , H in the multi-head attention layer converts s d ( i ) into a query matrix Q h ( i ) = ( s d ( i ) ) T W h Q , a key matrix k h ( i ) = ( s d ( i ) ) T W h K , and a value matrix V h ( i ) = ( s d ( i ) ) T W h V , where W h Q , W h K R D × d k , and W h V R D × D . Following attention computation, the final output O h ( i ) R D × N is derived as follows:
  O h i T = A t t e n t i o n Q h i , k h i , V h i = s o f t m a x Q h i k h i T d k V h i .
The decoder layer ultimately generates the forecasting x ^ ( i ) = ( x ^ N + 1 ( i ) , , x ^ N + T ( i ) ) .
Low-rank decomposition is capable of reducing model complexity and lowering computational requirements, thereby enhancing the efficiency of neural networks in deep learning. Following attention computation, the output O h ( i ) R D × N traverses a feed-forward neural network layer to yield the final output. The feed-forward neural network comprises two linear layers, which can be represented by two matrices A R m × n and B R n × p . Matrix multiplication C = A × B has a computational complexity of O ( m n p ) , which can be time-consuming for large matrices since it entails multiplying and summing n times for each element. To mitigate this complexity, matrix A can be approximated by a low-rank matrix of rank r , namely, A U Σ V T , where U R m × r , Σ R r × r , V T R r × n . This decomposition condenses the original representation of matrix A into the product of three smaller matrices, where r is significantly smaller than m and n . The matrix multiplication then becomes C = ( U Σ V T ) × B , and the computational complexity is as follows:
  • Compute V T × B , V T R r × n , B R n × p , with a complexity of O ( r n p ) .
  • Compute Σ × ( V T × B ) , Σ R r × r , with a complexity of O ( r 2 p ) .
  • Compute U × ( Σ ( V T × B ) ) , U R m × r , with a complexity of O ( m r p ) .
The total complexity thereby becomes O ( ( n + r + m ) r p ) , and given that r n and r m , the overall complexity is conspicuously reduced compared to the original O ( m n p ) . Both the statistical forecasting layer and the feed-forward neural network layer within the decoder of the ALD model employ low-rank decomposition, thereby effectively enhancing computational efficiency.

4. Experimental Setup and Analysis of Results

4.1. Datasets

To verify the performance of the adaptive learning model based on the decoder (ALD model), its prediction accuracy was tested on five datasets, which are classified into three categories, including power Transformer temperature data (ETT) [8] (ETTh1, ETTh2, ETTm1), exchange rate data (Exchange), and customer electricity consumption data (ECL). The power Transformer dataset contains Transformer load data and oil temperature data collected from July 2016 to July 2018. Specifically, the ETTm1 dataset consists of sampling data at 15 min intervals, while the ETTh1 and ETTh2 datasets are composed of sampling data at 1 h intervals. The exchange rate dataset comprises daily exchange rates for eight countries—Australia, the United Kingdom, Canada, Switzerland, China, Japan, New Zealand, and Singapore—spanning the period from 1990 to 2016. The electricity dataset contains the hourly electricity consumption of 321 customers from 2012 to 2014. Table 1 presents a summary of the statistical information of these five commonly used datasets. These datasets are widely used as benchmarks for time series prediction models and are publicly available.

4.2. Benchmark Models and Experimental Setup

The benchmark models chosen for this study encompass iTransformer (ICLR 2024) [20], PatchTST (ICLR 2023) [21], Crossformer (ICLR 2023) [22], TiDE (Google 2023) [23], TimesNet (ICLR 2023) [24], DLinear (AAAI 2023) [25], SCINet (NeurIPS 2022) [26], and FEDformer (ICML 2022) [27]. To compare the performance of ALD over different forecasting horizons, the input length was set at 96, and the model was evaluated with forecasting steps of {96, 192, 336, 720}. Two evaluation metrics were employed for each forecasting window: Mean Square Error M S E = 1 / n i = 1 n ( y y ^ ) 2 and Mean Absolute Error M A E = 1 / n i = 1 n y y ^ .

4.3. Model Parameters

By default, ALD encompasses three encoder layers, with each layer featuring eight attention heads and a hidden layer dimension of 512. The feed-forward network in the decoder layer comprises four linear layers, with ReLU (Rectified Linear Unit) [28] serving as the activation function. The first three linear layers jointly undertake low-rank decomposition operations. In all experiments, a dropout with a probability of 0.1 was implemented in the decoder layers.

4.4. Results and Analysis

Table 2 summarizes the experimental results of nine models across five datasets. The lower the MSE and MAE, the more accurate the forecasting. Compared to other baseline models, the proposed ALD model demonstrates superior performance in terms of prediction accuracy. Specifically, compared to the best results of the other baseline models, ALD achieved an overall 2.6% reduction in the MSE and a 1.8% reduction in the MAE. These findings validate the effectiveness of the ALD model in learning deep nonlinear correlations in time series data.

4.5. Ablation Study

To validate the rationality and efficacy of the statistical forecasting layer in the ALD model, a detailed component removal experiment was carried out on the financial dataset. As depicted in Table 3, the statistical forecasting layer is of crucial importance in alleviating the impact of concept drift on the model.

4.6. Hyperparameter Sensitivity

We assessed the hyperparameter sensitivity of the ALD model in accordance with the following factors: learning rate, the number of decoder layers, and hidden layer dimensions. The results are presented in Figure 2 and Figure 3. The results are documented with an input length of 96 and a forecasting window length of 96. On both the ETT and exchange rate datasets, it was found that the model achieved the best performance with a learning rate of 0.0001, three decoder layers, and a hidden layer dimension of 512. In the ALD model, augmenting the number of decoder layers and hidden dimensions did not inevitably enhance the model’s performance.

5. Conclusions and Future Work

To overcome the constraints of existing Transformer-based time series forecasting models in time series modeling, this paper presents an adaptive learning model based on decoder framework, which can be utilized in real-world time series forecasting tasks. By employing a decoder-only structure with a full-rank attention matrix, the ALD model augments the expressiveness of the model, while the design of the statistical forecasting module addresses the concept drift issue inherent in time series data. This enables the model to maintain the strong fitting capability of Transformer models while addressing the concept drift problem in time series data. The experimental results indicate that the ALD model surpasses existing benchmark models and is more suitable for time series forecasting.
In the future, we intend to integrate the statistical forecasting layer with the Transformer decoder layer and explore parameter sharing between them to further streamline the model structure without sacrificing forecasting accuracy.

Author Contributions

Conceptualization, writing—review and editing, and funding acquisition, J.H.; methodology and writing—original draft preparation, Q.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Graduate Student Research Innovation Program of Shanxi Province (Grant No. 2023KY523).

Data Availability Statement

The original data presented in the study are openly available at https://github.com/juyongjiang/TimeSeriesDatasets.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Sun, J.; Cao, Z.; Li, H.; Qian, S.; Wang, X.; Yan, L.; Xue, W. Application of artificial intelligence technology to numerical weather forecasting. J. Appl. Meteorol. Sci. 2021, 32, 1–11. [Google Scholar]
  2. Ding, F.; Jiang, M.Y. Housing price forecasting based on improved lion swarm algorithm and BP neural network model. J. Shandong Univ. (Eng. Sci.) 2021, 51, 8–16. [Google Scholar]
  3. Zhao, W.Z.; Yuan, G.; Zhang, Y.M.; Qiao, S.; Wang, S.; Zhang, L. Multi-view Fused Spatial-temporal Dynamic GCN for Urban Traffic Flow Forecasting. J. Softw. 2024, 35, 1751–1773. [Google Scholar]
  4. Wang, C.; Wang, Y.; Zheng, T.; Dai, Z.M.; Zhang, K.F. Multi-Energy Load Forecasting in Integrated Energy System Based on ResNet-LSTM Network and Attention Mechanism. Trans. China Electrotech. Soc. 2022, 37, 1789–1799. [Google Scholar]
  5. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
  6. Tang, S.Q.; Feng, C.; Gao, K. Recurrent concept drift data stream classification based on online transfer learning. J. Comput. Res. Dev. 2016, 53, 1781–1791. [Google Scholar]
  7. Dong, Y.H.; Cordonnier, J.B.; Loukas, A. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. In Proceedings of the International Conference on Machine Learning, Vienna, Austria, 21–27 July 2021; pp. 2793–2803. [Google Scholar]
  8. Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021; Volume 35, pp. 11106–11115. [Google Scholar]
  9. Liu, S.; Yu, H.; Liao, C.; Li, J.; Lin, W.; Liu, A.X.; Dustdar, S. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In Proceedings of the International Conference on Learning Representations, Virtual Conference, 3–7 May 2021. [Google Scholar]
  10. Devlin, J.; Chang, M.-W.; Lee, K.; 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, Minneapolis, MN, USA, 2–7 June 2019; Volume 1, pp. 4171–4186. [Google Scholar]
  11. Radford, A.; Narasimhan, K.; Salimans, T.; Sutskever, I. Improving Language Understanding by Generative Pre-Training. Preprint. 2018. Available online: https://scholar.google.com/citations?view_op=view_citation&hl=zh-CN&user=dOad5HoAAAAJ&citation_for_view=dOad5HoAAAAJ:W7OEmFMy1HYC (accessed on 10 December 2024).
  12. Chowdhery, A.; Narang, S.; Devlin, J.; Bosma, M.; Mishra, G.; Roberts, A.; Barham, P.; Chung, H.W.; Sutton, C.; Gehrmann, S.; et al. Palm: Scaling language modeling with pathways. J. Mach. Learn. Res. 2023, 24, 1–113. [Google Scholar]
  13. Touvron, H.; Lavril, T.; Izacard, G.; Martinet, X.; Lachaux, M.-A.; Lacroix, T.; Rozière, B.; Goyal, N.; Hambro, E.; Azhar, F.; et al. Llama: Open and efficient foundation language models. arXiv 2023, arXiv:2302.13971. [Google Scholar]
  14. Dai, Z.; Yang, Z.; Yang, Y.; Carbonell, J.; Le, Q.V.; Salakhutdinov, R. Transformer-XL: Attentive Language Models beyond a Fixed-Length Context. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019. [Google Scholar]
  15. Su, J.; Lu, Y.; Pan, S.; Murtadha, A.; Wen, B.; Liu, Y. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing 2024, 568, 127063. [Google Scholar] [CrossRef]
  16. Kim, T.; Kim, J.; Tae, Y.; Park, C.; Choi, J.H.; Choo, J. Reversible Instance Normalization for Accurate Time-Series Forecasting against Distribution Shift. In Proceedings of the International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
  17. Li, W.; Yang, X.; Liu, W.; Xia, Y.; Bian, J. Ddg-da: Data distribution generation for predictable concept drift adaptation. In Proceedings of the AAAI Conference on Artificial Intelligence, Arlington, VA, USA, 17–19 November 2022; Volume 36, pp. 4092–4100. [Google Scholar]
  18. Bai, G.J.; Ling, C.; Zhao, L. Temporal Domain Generalization with Drift-Aware Dynamic Neural Network. arXiv 2022, arXiv:2205.10664. [Google Scholar]
  19. Liu, Z.; Cheng, M.; Li, Z.; Huang, Z.; Liu, Q.; Xie, Y.; Chen, E. Adaptive normalization for non-stationary time series forecasting: A temporal slice perspective. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
  20. Liu, Y.; Hu, T.; Zhang, H.; Wu, H.; Wang, S.; Ma, L.; Long, M. iTransformer: Inverted transformers are effective for time series forecasting. arXiv 2023, arXiv:2310.06625. [Google Scholar]
  21. Nie, Y.; Nguyen, N.H.; Sinthong, P.; Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. In Proceedings of the International Conference on Learning Representations, Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  22. Zhang, Y.; Yan, J. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In Proceedings of the International conference on learning representations, Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  23. Das, A.; Kong, W.; Leach, A.; Mathur, S.; Sen, R.; Yu, R. Long-term forecasting with tide: Time-series dense encoder. arXiv 2023, arXiv:2304.08424. [Google Scholar]
  24. Wu, H.; Hu, T.; Liu, Y.; Zhou, H.; Wang, J.; Long, M. Timesnet: Temporal 2d-variation modeling for general time series analysis. In Proceedings of the International conference on learning representations, Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  25. Zeng, A.; Chen, M.; Zhang, L.; Xu, Q. Are transformers effective for time series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Washington DC, USA, 7–14 February 2023; pp. 11121–11128. [Google Scholar]
  26. Liu, M.; Zeng, A.; Chen, M.; Xu, Z.; Lai, Q.; Ma, L.; Xu, Q. Scinet: Time series modeling and forecasting with sample convolution and interaction. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022. [Google Scholar]
  27. Zhou, T.; Ma, Z.; Wen, Q.; Wang, X.; Sun, L.; Jin, R. FEDformer: Frequency enhanced decomposed transformer for long-term series forecasting. In Proceedings of the International Conference on Machine Learning, Baltimore, MD, USA, 17–23 July 2022; pp. 27268–27286. [Google Scholar]
  28. Glorot, X.; Bordes, A.; Bengio, Y. Deep sparse rectifier neural networks. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Fort Lauderdale, FL, USA, 11–13 April 2011; pp. 315–323. [Google Scholar]
Figure 1. The framework of the adaptive learning time series forecasting model based on decoder framework.
Figure 1. The framework of the adaptive learning time series forecasting model based on decoder framework.
Mathematics 13 00490 g001
Figure 2. Hyperparameter sensitivity on the ETTh1 dataset. (a) learning rate; (b) decoder layers; (c) hidden dimension.
Figure 2. Hyperparameter sensitivity on the ETTh1 dataset. (a) learning rate; (b) decoder layers; (c) hidden dimension.
Mathematics 13 00490 g002
Figure 3. Hyperparameter sensitivity on the exchange rate dataset. (a) learning rate; (b) decoder layers; (c) hidden dimension.
Figure 3. Hyperparameter sensitivity on the exchange rate dataset. (a) learning rate; (b) decoder layers; (c) hidden dimension.
Mathematics 13 00490 g003
Table 1. Statistical information of five common datasets.
Table 1. Statistical information of five common datasets.
DatasetVariablesForecasting LengthDataset SizeFrequencyInformation
ETTh1, ETTh27{96, 192, 336, 720}(8545, 2881, 2881)HourlyElectricity
ETTm17{96, 192, 336, 720}(34,465, 11,521, 11,521)15 minElectricity
Exchange8{96, 192, 336, 720}(5120, 665, 1422)DailyEconomy
ECL321{96, 192, 336, 720}(18,317, 2633, 5261)HourlyElectricity
Table 2. Comparison of experimental results for nine forecasting models on five datasets.
Table 2. Comparison of experimental results for nine forecasting models on five datasets.
ModelsALDiTransformerPatchTSTCrossformerTiDETimesNetDLinearSCINetFEDformer
MetricMSEMAEMSEMAEMSEMAEMSEMAEMSEMAEMSEMAEMSEMAEMSEMAEMSEMAE
ETTh1960.3870.3970.3860.4050.4140.4190.4230.4480.4790.4640.3840.4020.3860.4000.6540.5990.3760.419
1920.4520.4370.4410.4360.4600.4450.4710.4740.5250.4920.4360.4290.4370.4320.7190.6310.4200.448
3360.5090.4690.4870.4580.5010.4460.5700.5460.5650.5150.4910.4690.4810.4590.7780.6590.4590.465
7200.5650.5220.5030.4910.5000.4880.6530.6210.5940.5580.5210.5000.5190.5160.8360.6990.5060.507
ETTh2960.3040.3580.2970.3490.3020.3480.7450.5840.4000.4400.3400.3740.3330.3870.7070.6210.3580.397
1920.3770.4030.3800.4000.3880.4000.8770.6560.5280.5090.4020.4140.4770.4760.8600.6890.4290.439
3360.4180.4370.4280.4320.4260.4331.0430.7310.6430.5710.4520.4520.5940.5411.0000.7440.4960.487
7200.4340.4560.4270.4450.4310.4461.1040.7630.8740.6790.4620.4680.8310.6571.2490.8380.4630.474
ETTm1960.1840.2770.3340.3680.3290.3670.4040.4260.3640.3870.3380.3750.3450.3720.4180.4380.3790.419
1920.2500.3220.3770.3910.3670.3850.4500.4510.3980.4040.3740.3870.3800.3890.4390.4500.4260.411
3360.3140.3640.4260.4200.3990.4100.5320.5150.4280.4250.4100.4110.4130.4130.4900.4850.4450.459
7200.4150.4250.4910.4590.4540.4390.6660.5890.4870.4610.4780.4500.4740.4530.5950.5500.5430.490
Exchange960.0770.1980.0860.2060.0880.2050.2560.3670.0940.2180.1070.2340.0880.2180.2670.3960.1480.278
1920.1640.2900.1770.2990.1760.2990.4700.5090.1840.3070.2660.3440.1760.3150.3510.4590.2710.315
3360.3170.4090.3310.4170.3010.3971.2680.8830.3490.4310.3670.4480.3130.4271.3240.8530.4600.427
7200.8430.6880.8470.6910.9010.7141.7671.0680.8520.6980.9640.7460.8390.6951.0580.7971.1950.695
ECL960.1760.2610.1480.2400.1950.2850.2190.3140.2370.3290.1680.2720.1970.2820.2470.3450.1930.308
1920.1750.2620.1620.2530.1990.2890.2310.3220.2360.3300.1840.2890.1960.2850.2570.3550.2010.315
3360.1850.2700.1780.2690.2150.3050.2460.3370.2490.3440.1980.3000.2090.3010.2690.3690.2140.329
7200.2180.2940.2250.3170.2560.3370.2800.3630.2840.3730.2200.3200.2450.3330.2990.3900.2460.355
Note: the best results are shown in bold, and the second best results are underlined.
Table 3. Ablation study of ALD model.
Table 3. Ablation study of ALD model.
ModelsTransformer Decoder Layer + Statistical Forecasting LayerTransformer Decoder LayerFEDformer
MetricsMSEMAEMSEMAEMSEMAE
Exchange960.0770.1980.0840.2030.1480.278
1920.1640.2900.1840.3050.2710.315
3360.3170.4090.3340.4180.4600.427
7200.8430.6880.8730.7021.1950.695
Note: the best results are highlighted in bold, while the second best results are underlined.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hao, J.; Sun, Q. An Adaptive Learning Time Series Forecasting Model Based on Decoder Framework. Mathematics 2025, 13, 490. https://doi.org/10.3390/math13030490

AMA Style

Hao J, Sun Q. An Adaptive Learning Time Series Forecasting Model Based on Decoder Framework. Mathematics. 2025; 13(3):490. https://doi.org/10.3390/math13030490

Chicago/Turabian Style

Hao, Jianlong, and Qiwei Sun. 2025. "An Adaptive Learning Time Series Forecasting Model Based on Decoder Framework" Mathematics 13, no. 3: 490. https://doi.org/10.3390/math13030490

APA Style

Hao, J., & Sun, Q. (2025). An Adaptive Learning Time Series Forecasting Model Based on Decoder Framework. Mathematics, 13(3), 490. https://doi.org/10.3390/math13030490

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop