## 1 Introduction  
Currently, due to the development of advanced traffic sensing and artificial intelligence technology, Intelligent Transportation Systems (ITSs) have been constantly developed in order to improve the transportation management and the travel guidance [1, 2]. On the basis of the massive traffic data, traffic flow forecasting could provide fundamental support for the basic functions of ITSs, such as traffic congestion control, the resource allocation, and personalized trip recommendations [3, 4]. The existing method for traffic flow forecasting can be roughly divided into three categories: early traffic flow forecasting based on statistical analysis, traffic flow forecasting based on machine learning models, and traffic flow forecasting based on deep learning models. At the early stage, the majority of the methods for traffic flow forecasting are related to time series forecasting. The forecasting results are attained by statistical analysis, such as by the history average (HA) model, the autoregressive integrated moving average (ARIMA) model [5, 6], the Kalman filtering model [7], etc. As a typical statistical model, the original HA model makes the average traffic flow value in the past forecasting interval the forecasting result, which has also been widely used in the early European path planning system [8]. Although the HA model is simple and fast, its forecasting accuracy is low due to the nonlinear characteristics of traffic flow. Thus, the ARIMA model was proposed to forecast the traffic flow in 1976 [9], which relies on a large amount of historical data but is not precise in forecasting the non-stationary traffic flow. The vector auto-regression model (VAR) is suitable for multiple time series interact in forecasting complex traffic flows [10]. Therefore, the statistical analyzing models cannot capture the nonlinear characteristics of traffic flow. Fortunately, machine learning methods, such as support vector machine (SVM) [11; 12] and \(K\)-nearest neighbor [13; 14], can improve the effectiveness of extracting the temporal dependence characteristics of traffic flow. The \(K\)-nearest neighbor method forecasts future traffic flows based on the similarity between the historical and current traffic flow states [15]. According to this method, a high forecasting accuracy in terms of the time series forecasting with a high time complexity can be obtained. However, once some erroneous data appear in the traffic data, its accuracy may deteriorate. The traffic forecasting method based on the support vector regression (SVR) is especially effective in dealing with non-linear traffic [16]. The models for forecasting SVM-based traffic flow are usually sensitive to the adjustment of parameter and the selection of sum function [17]. The machine-learning-based methods for forecasting traffic flows are more accurate in forecasting than the statistical models that only capture the nonlinear characteristics of traffic flow. However, in these models only the temporal dependence of traffic flow are taken into consideration. In the past, some scholars only used the deep learning method based on a feedforward neural network (FNN) to forecast traffic flow, but it was difficult to achieve satisfactory results under the complex spatial-temporal characteristics of traffic flow [18]. Ref. [19] used the ensemble empirical mode decomposition (EEMD) model to suppress noise in the original traffic flow data and input traffic flow data into the artificial neural network (ANN) to forecast traffic flow with different step sizes, but the temporal and spatial characteristics of traffic flow was not taken into consideration. The deep-learning methods have been widely employed to capture the spatial-temporal correlation of traffic flow in recent years. Recurrent neural network (RNN) and convolutional neural network (CNN) methods have been applied to traffic flow forecasting. Combining the gated recurrent unit (GRU), the long short-term memory (LSTM), and the variants of RNN, ref.