GCN-GAN: Integrating Graph Convolutional Network and Generative Adversarial Network for Traffic Flow Prediction

As a necessary component in intelligent transportation systems (ITS), traffic flow-based prediction can accurately estimate the traffic flow in a certain period and area in the future. However, despite the success of traditional research and current machine learning methods, traffic flow prediction models have limitations in terms of prediction accuracy and efficiency. In this work, we propose a novel traffic flow prediction model named Graph Convolution and Generative Adversative Neural Network (GCN-GAN), which leverages Graph Convolution Neural Network (GCN) module and Generative Adversative Neural Network (GAN) module to predict urban traffic flow. Firstly, the GCN module extracts historical traffic flow information in the graph structure. Secondly, the GAN module generates reliable traffic flow prediction results by adversative training. Additionally, GCN-GAN can parallelly generate prediction results rather than traditional one by one. Through experiments on the traffic flow dataset at multiple intersections, our GCN-GAN model outperforms the baseline methods by over 30.54% and has apparent advantages in multi-step prediction.

number of traffic officers [3] and restricting travel according 23 to the license plate number [4], [5]. Compared with invest- 24 ing a lot of costs in control, if we can predict the traffic 25 flow in advance, the occurrence of traffic congestion can be 26 The associate editor coordinating the review of this manuscript and approving it for publication was Joey Tianyi Zhou. considerably avoided. Thus, it is necessary to propose an 27 accurate prediction method suitable for modern governance. 28 Due to the disruptive impact of computing and commu-29 nication in the field of transportation, several professionals 30 jointly proposed the term Intelligent Transportation Systems 31 (ITS) in the 1980s [6]. ITS is a system that attempts to solve 32 various road traffic problems using information and commu-33 nication technology [7]. Specifically, by integrating sensors, 34 traffic signals, and personnel information, ITS can achieve 35 precise prediction and control of traffic. In the process of 36 using ITS, traffic prediction can effectively improve the effect 37 of traffic information regulation [8]. 38 Time series prediction is a method to extract valuable 39 information and predict the next trend of the system by 40 analyzing the past data [9]. As one of the typical time series 41 problems, urban traffic flow forecast is essential in ITS. 42 For example, driving routes can be dynamically planned 43 conditional mean of the traffic flow sequence and the het-96 eroscedasticity can be calculated. 97 Conditional mean and conditional variance contained 98 in the data can be predicted simultaneously by the 99 ARIMA-GARCH model [15], thus a continuous time-varying 100 confidence interval can be calculated. These calculated 101 time-variant confidence intervals are more temporally deter-102 ministic than the consistent confidence intervals provided by 103 standard ARIMA. 104 In addition to being suitable for traffic flow prediction, 105 ARIMA is also effective for flow prediction in subways [16], 106 scenic spots, and other places. 107 However, using the ARIMA model to achieve high-108 accuracy prediction of traffic flow requires a large amount of 109 traffic data for model training. Therefore, ARIMA does not 110 perform well when the amount of data is insufficient. Kalman 111 filter [17] is a state-space method in the time domain, which 112 regards the signal as the output of the linear system under 113 the action of white noise. It has the advantages of a flexible 114 selection factor and short prediction time. In view of the 115 problem that the performance of the classical Kalman filter 116 and the extended Kalman filter degrades when dealing with 117 non-Gaussian noise, many improved Kalman filter models 118 have been proposed in recent years [18], [19], [20]. In addi-119 tion to the above models, statistical methods also include the 120 Grey prediction method [21], [22] and Exponential smooth-121 ing method [23]. 122 The statistical methods have the advantages of simple 123 parameters and easy calculation. However, the model's per-124 formance highly depends on the stationarity of the data. They 125 can not reflect the uncertainty and non-linear characteristics 126 of dynamic traffic flow and can not overcome the influence 127 of random disturbance factors.

129
In the field of Machine Learning Methods, Castro-Neto et al. 130 [24] applied Support Vector Regression (SVR) to the field of 131 traffic prediction as early as 2009. 132 Luo et al. [25] proposed a high-accuracy predictive model 133 that combines SVR and Discrete Fourier Transform (DFT). 134 Compared with ARIMA, EMD-SVR and other models, 135 DFT-SVR has outstanding performance in short-term predic-136 tion. Due to the development of computing power in recent 137 years, deep learning [26], as a new non-linear method, has 138 attracted great attention and use by researchers and business 139 people. A Deep learning network is a complex perceptron 140 with multiple layers, each containing a large number of 141 neurons. It implements the complex calculation by learning 142 the weights in the non-linear network structure and finally 143 realizes the purpose of high-precision traffic flow predic-144 tion. Kumar et al. [27] applied ANN to achieve short-term 145 predictions for the future based on traffic data from past 146 periods. Their experimental results indicated that when the 147 time interval of traffic flow prediction is increased to 300% 148 of the original, the prediction accuracy of the neural network 149 remains consistent.
To realize the prediction of traffic flow in different time 151 steps, Chen et al. [28] Table 1.

196
The characteristic of the algorithm is that the whole graph

207
GCN belongs to a kind of GNN. GCN differs from ordinary 208 GNN because it introduces a convolution function to learn by 209 extracting spatial features. The most significant innovation of 210 GCN based on GNN lies in using a convolution operator for 211 information aggregation.
where the independent variable x represents the time in sec-218 onds, and the transformation variable u represents frequency 219 (to Hertz units). 220 We define an acyclic graph G with vertices N , its Laplacian 221 matrix M L can be defined as is the degree (in-degree and out-degree) matrix, and M A is 223 the adjacency matrix. The specific calculation formula of the 224 element of M L is as follows: The GCN model [35] usually generates a new node repre-229 sentation by aggregating the node itself and the surrounding 230 information of the node.

231
After essential spectrum convolution and Layer-wise linear 232 model processing [36], the expression of GNN is as follows: 233 In the above formula, the input of layer l network is M l H ∈ 235 R N×D (initial input is M H (0) = X ), and D represents the 236 dimension of each node vector. X represent the matrices input 237 into the GCN.
In 2014, Generative Adversarial Network (GAN) [37] was 242 proposed by Goodfellow and has been widely applied in 243 the field of computer vision. The basic idea of GAN is 244 that the inputs (randomly distributed vectors) pass through 245 a generator composed of neural networks to generate struc-246 tured high-dimensional data. When the GAN network is 247 trained, the discriminant network will continuously improve 248 the recognition ability. In contrast, the generative network 249 will continuously improve the generative ability and reduce 250 the discriminant network's discriminant ability. In the process 251 of competition between the two networks, the ability of GAN 252 to generate new samples will be improved. Generator is a neural network whose goal is to find the set 267 of parameters θ that minimizes the distance between T data (x) 268 and T G (x; θ).
The goal of the discriminator is to be a ''quality inspector'' by 271 distinguishing as much as possible between real data from the 272 dataset and mock data from the generator, but also to improve 273 performance in correcting errors.
Assuming G is a fixed value in the above formula, then: If we want to find the best discriminator D, we need to 280 maximize the following formula The unavoidable problem of the traditional RNN model 310 and LSTM model (Figure 1) is that information can only be 311   where k(k >= 1) is the step size of prediction, Predict is the 336 prediction method we need to seek.

338
The traditional traffic flow forecast is a single-step forecast, 339 and the result is not ideal. A hybrid model network structure 340 (GCN-GAN) based on GCN and GAN is proposed in this 341 section to improve the accuracy of traffic flow prediction and 342 increase the step length of traffic flow prediction. GCN-GAN 343 is designed to jointly predict the traffic flow at multiple 344 intersections within a single step or multiple steps (as shown 345 in Figure 3). The general idea is to apply graph convolution 346 directly to historical traffic flow data Flow his (graph structure 347 data represented by matrix). GCN extracts patterns and fea-348 tures in the frequency domain, and the extracted information 349 is used for time series prediction.

350
It is complicated to calculate with graph information, so we 351 convert it into SE matrices of traffic flow. In the SE matrix, 352 when the nodes are connected, the position corresponding 353 to a particular row and column is marked as 1. Otherwise, 354 it is marked as 0. Then a filter is constructed in the Fourier 355 domain, and GCN is used to extract the spatial information 356 features of multiple urban traffic intersections and their adja-357 cent regions in the SE matrix.
In the above formula, M W is the parameter matrix of the l 360 layer GCN neural network for traffic information extraction, 361 which will be optimized in each iteration.    tends to be 1, and the score of generated data tends to be 0. 392 The Algorithm process of GCN-GAN is shown as 394 Algorithm 1.  of a forgetting mechanism, an input mechanism, and an 462 output mechanism and is mainly used to solve the prob-463 lems of memory retention and gradient disappearance in 464 VOLUME 10, 2022       structure to the graph convolutional network (GCN). 469 The model can learn the temporal and spatial character-470 istics of traffic data.     value and the observed value. between the actual and predicted value.  Table 3, Table 5 520  and Table 7), we can see that GCN-GAN has a significant 521 improvement in the overall prediction effect. To demonstrate 522 the superiority of our model in traffic flow prediction more 523 clearly, we take the ARIMA algorithm as the benchmark 524 to calculate the improvement of SVR, DNN, LSTM, and 525 GCN-GAN in prediction results compared with ARIMA (as 526 shown in Table 4, Table 6, Table 8). The above prediction 527 results and improvement are visualized for further analy-528 sis (as shown in Figure 7, Figure 8, Figure 9, Figure 10, 529 Figure 11, Figure 12).

530
As shown in Table 3, Table 5 and Table 7, regardless of the 531 prediction step size, GCN-GAN achieves better performance 532 than other baseline algorithms on all four indexes. Since MSE 533 is more sensitive to the fluctuation of outliers than MSE, the 534 value of MSE avg is much larger than MAE avg and MSE avg 535 in terms of error. MAE avg showed the intuitive accuracy of 536 GAN-GAN algorithm's prediction, which reached the lowest 537 values of 10.44 (k = 1), 15.04 (k = 3) and 20.27 (k = 5) in 538 the three-step sizes. With the increase in predicted step size, 539 the results of MSE avg and RMSE avg revealed the stability of 540 GCN-GAN. While the improvement of other baseline algo-541 rithms decreased with the increase of predicted step size, the 542 improvement of GCN-GAN still increased. When k=5, the 543 improvement of RMSE was 48.32%. Although the prediction 544 accuracy will decrease with the step size increase for all 545 prediction models, GCN-GAN shows the best characteristics 546 compared with other baseline methods. The decline rate is 547 slow and stable for GCN-GAN.

548
To more intuitively show the influence of step size changes 549 on the prediction error of the GCN-GAN model, we calcu-550 lated the average error of ARIMA, SVR, DNN, LSTM and 551 T-GCN algorithms under three steps and further calculated 552 the improvement of the GCN-GAN's prediction error relative 553 to the average error (as shown in Table 9). As shown in 554 Figure 13, with the increase of the predicted step length, the 555 overall improvement of the three indicators of the GCN-GAN 556 model is gradually improving, even though the absolute error 557 is increasing. This phenomenon shows that our model per-558 forms better than other baseline algorithms in multi-step 559 prediction. That is, the rate of accuracy decline is relatively 560 gentle and stable. It is worth noting that GCN-GAN's predic-561 tion of the traffic flow at multiple intersections generates the 562 a prediction model program at each intersection in turn or at 564 the same time greatly accelerates the prediction speed.  This promising result will encourage us to continue to use 595 the model for large-scale traffic flow prediction problems.

596
In the following study, we will consider adding a 597 self-attention mechanism to the GCN-GAN model to achieve 598 more optimized prediction results for timing information.