# Long-Term Forecasting Using MAMTF: A Matrix Attention Model Based on the Time and Frequency Domains
## 2 Related Work  
The methods for time series forecasting include regression-based models [18; 19; 20; 21], recurrent-neural-network-based models [11; 22], convolution-based models [12; 23], models based on a family of self-attention mechanisms [13; 14; 15; 16], and others. The recurrent neural networks used for prediction are mainly modeled as long and short-term memory networks [11] and gated recurrent units [22]. Recurrent neural networks are prone to the problem of gradient vanishing or gradient explosion because the next operation requires the result of the previous step. Long and short-term memory networks are structured with input gates, forgetting gates, and output gates, which have a higher prediction accuracy but a longer prediction time due to their computational complexity. The gated recurrent unit only exists the update gate and reset gate, which is simpler in structure, with fewer parameters and faster computation, but the gated recurrent unit reduces the prediction accuracy due to the reduced computation. In addition, time series prediction using convolution is also a major direction of current development. The TCN model [12] is designed with inflated causal convolution, which can parallelize the data to speed up the model computing speed, but this data processing is still for one-dimensional data, which can not extract the features that exist between the data. Due to the various shortcomings of the above models, short-term forecasting has mainly been performed in previous studies. With the proposal of a transformer [13], the self-attention mechanism has received a lot of attention, and many time series prediction models have been generated around the self-attention mechanism, which are able to extract the long-term trend changes in and local dynamics of data features and show superior capabilities in long-term multivariate time series prediction. For example, [PERSON] et al. [24] proposed a pyramid attention module based on the self-attention mechanism, which enhances the model to capture the dependencies between long sequences and reduces the memory consumption and forecasting time cost. [PERSON] et al. [14] designed ProbSparse self-attention and used convolution and pooling to dramatically reduce the computational effort of the model and improve the computational efficiency of the model while also capturing the long-term change patterns of the data. [PERSON] et al. [15] designed the Auto-Correlation Mechanism on the basis of the self-attention mechanism, which involves the decomposition of the structure in the decoder to divide time series into seasonal components and trend components, which increases the data information, allows the model to extract the trend changes in the original data, and strengthens the stability of the model for long-term forecasting. [PERSON] et al. [16] designed Frequency-Enhanced Attention with the Fourier Transform and Frequency-Enhanced Attention with the Wavelet Transform by mapping the time domain data to the frequency domain to explore the long-term change patterns in time series by extracting the frequency information. However, [PERSON] et al. [17] designed a DLinear model with a linear structure to outperform the prediction accuracy of a prediction model based on a family of self-attention mechanisms on several publicly available datasets. This confirms that simple linear models can also achieve excellent prediction results in long-term multivariate time series forecasting. The DLinear model divides the raw data into trend and seasonal components, then the forecast components are obtained using two simple linear layers, respectively, and the forecast components are fused to obtain the final forecast. This inspires us to explore the time series forecasting problem from a new perspective. Currently, most of the models make predictions from the perspective of the time domain, but for complex and volatile data, mapping them to the frequency domain can reduce the complexity of the data, which is conducive to data feature extraction. [PERSON] et al.