# MDGCN: Multiple Graph Convolutional Network Based on the Differential Calculation for Passenger Flow Forecasting in Urban Rail Transit

Authors: Chenxi Wang; Huizhen Zhang; Shuilin Yao; Wenlong Yu; Ming Ye
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

Passenger flow forecasting plays an important role in urban rail transit (URT) management. However, complex spatial and temporal correlations make this task extremely challenging. Previous work has been done by capturing spatiotemporal correlations of historical data. However, the spatiotemporal relationship between stations not only is limited to geospatial adjacency, but also lacks different perspectives of station correlation analysis. To fully capture the spatiotemporal correlations, we propose a deep learning model based on graph convolutional neural networks called MDGCN. Firstly, we identify the heterogeneity of stations under two spaces by the Multi-graph convolutional layer. Secondly, we designed the Diff-graph convolutional layer to identify the changing trend of heterogeneous features and used the attention mechanism unit with the LSTM unit to achieve adaptive fusion of multiple features and modeling of temporal correlation. We evaluate this model on real datasets. Compared to the best baselines, the root-mean-square errors of MDGCN are improved by 1%–15% for different prediction intervals.


---

## Body

## 1. Introduction

With the expansion of urban traffic congestion, URT has become one of the important solutions to alleviate the congestion problem. As an important research topic in URT, short time passenger flow forecasting can help decision-makers to make timely emergency plans and enhance security forces [1], as well as providing an important reference basis for the optimization of bus line networks.Accurate, real-time passenger flow forecasting in URT is a challenging task. This is because the accuracy of forecasting can be affected by various aspects, such as the URT network’s development, its topology, and spatiotemporal correlation. The short-term prediction models of URT passenger flow range from the initial mathematical-statistical models such as Autoregressive Integrated Moving Average (ARIMA) [2] to traditional machine learning models such as Support Vector Machines (SVM) [3] to various deep learning models. However, mathematical-statistical models cannot mine the nonlinear features of traffic flow data, and traditional machine learning models rely on feature extraction, so their adaptability to data is not stable. Compared with traditional mathematical-statistical models and machine learning models, deep learning models perform better in the extraction of spatiotemporal features and are mainly classified into three categories: CNN-based, RNN-based, and GCN-based.In the earliest stage, many scholars treated traffic data as image pixels and used a convolutional neural network (CNN) for local spatiotemporal feature extraction. For example, Luo et al. [4] modeled the traffic flow as a two-dimensional spatiotemporal matrix to describe the images of spatiotemporal relationships of traffic flow and used CNN to predict the traffic speed. Similarly, based on converting the passenger flow data into images, Zhang et al. [5] introduced the residuals into CNN. However, applying CNN to the passenger flow prediction cannot accurately capture the spatiotemporal correlation. Regarding this problem, Zhang et al. [6] proposed a multitask learning prediction model called MTL-TCNN that considered the relevance of multiple regions for the prediction problem, but CNN is only suitable for Euclidean space, and traffic data is typical non-Euclidean data. Recurrent neural network (RNN) and its variant models have good performance in handling time-series data because of their self-circulation mechanism. For example, Fu et al. [7] used gate recurrent unit (GRU) for traffic flow prediction for the first time. Ma et al. [8] and Yang et al. [9] used long-short term memory (LSTM) to capture the trend of long and short time series. Abduljabbar et al. [10] extended the one-way LSTM into a two-way LSTM; thus, the accuracy was further improved by training the data twice by forward and backward. However, RNN and CNN cannot reasonably extract the correlation of spatial dimensions and are not suitable for traffic flow data processing.Researchers gradually realize the advantages of GCN in dealing with non-Euclidean data such as traffic flow. Many scholars tend to apply GCN to traffic flow prediction with other models that perform well in capturing temporal correlations. Some studies [11–13] integrated GCN- and RNN-based models to predict. For example, Zhao et al. [14] and Lv et al. [15] combined GCN with GRU; Geng et al. [16] combined GCN with RNN; Zhang et al. [1], Chai et al. [17], and He et al. [18] combined GCN with LSTM to make up for the shortcoming of GCN in capturing temporal dependence poorly. Zhang et al. [19] proposed a model including attention mechanism, GCN, and sequence-to-sequence for multistep prediction. Besides, some studies tried to propose novel models, such as Wu et al. [20], who proposed an adaptive adjacency matrix to change the structure of a fixed graph and used extended convolution to capture temporal correlation. Park et al. [21] used the transformer model [22] and the self-attention mechanism with encoder-decoder architecture. Hao et al. [23] constructed a sequence-to-sequence architecture with attentional mechanisms. Also, a hybrid prediction model [24] based on kernel ridge regression (KRR) and Gaussian process regression (GPR) is proposed to predict the short-term passenger flow. However, these studies only consider the topological structure of the URT network. More correlations between stations should be explored. Effectively exploring correlations among stations could further improve the prediction performance. For example, Geng et al. [16], Chai et al. [17], Wang et al. [25], and Wang et al. [26] reconstructed the relationship graph from different perspectives. However, they ignored the correlation hidden in historical data and the changing trend which could help capture the movement patterns of passenger flow.The above research indicates that there are still two problems to be solved in the current research on URT passenger flow prediction: the correlation between stations and the extraction of changing trends. To be exact, the relationship between stations is not limited to the adjacency relationship of geographical space; there is a lack of station correlation analysis from different perspectives. And it is necessary to construct an appropriate model to mine the changing trends.In this paper, we propose MDGCN (Multi-Graph Differential Convolutional Network). It can mine the correlations between stations in heterogeneous space for URT passenger flow prediction. The contributions of this paper are as follows:(i)
The correlation of boarding and alighting passenger flows between stations that are physically distant from each other is also important for passenger flow prediction. Therefore, to more accurately represent the connectivity between stations, we reconstruct the connectivity of stations by historical passenger flow data and station geographic information.(ii)
We design a layer of Multi-GCN that can jointly mine the correlation between stations in physical space and nonphysical space to gain the heterogeneous spatial correlation between stations.(iii)
We introduce the concept of difference and construct the difference feature extraction layer called Diff-GCN to extract the changing trends of heterogeneous spatial features.(iv)
We conducted experiments on two datasets. The experimental results show that the prediction error of the proposed model is reduced by 1%–15% compared with the optimal baseline.The arrangement of the paper is shown below. Section2 introduces the basic problem definition of passenger flow forecasting. Section 3 presents the model framework. Section 4 discusses the experimental results. Conclusions are made in Section 5.


## 2. Preliminary

In this section, we define some key concepts and give the problem definition of the studied content.Definition 1.
(urban rail transit network). We define the URT network using the graph as GV,E,A, where the set of stations is used as nodes V=v1,v2,…,vn of G, and n is the number of stations. Figure 1 illustrates sample lines related to the URT network. The connection relationships between stations are used as edges E=ek:vi,vj∈V×V of G. We use the matrix A∈Rn∗n to record the adjacent relationships between stations, and the value δi,j represents the strength of the association between stations. So, we reconstruct the spatial relationships of the URT network from two perspectives.Figure 1
A sample of an urban rail transit network.Definition 2.
(node characteristics). We take the passenger flow of a station as the characteristics of a network node; i.e., given a station Vi and a period t, the passenger flow of the station at that period is denoted as XtVi, and the passenger flow of all stations in the past m periods is denoted as X=Xt,Xt−1,Xt−2,…,Xt−m−1; then the temporal characteristics of the set V of stations in the past m periods can be written as X∈Rn∗m.Problem.
Definition. This problem can be defined as learning a mapping function to predict the passenger flow data at the next moment given the URT network GV,E,A with the historical passenger flow data X. The process can be referred to as (1)Xt+1=fG,X.


## 3. Study Methodology

This section introduces the framework of our model, research methods, and pseudocode.


### 3.1. Modeling Framework

This model (Figure2) can be divided into four main parts: the reconstruction of the relationship of station, the layer of Multi-GCN, the layer of Diff-GCN, and the layer of output.(i)
The first part is based on the relationship between the physical space and the nonphysical space of stations and combines the historical passenger flow data as the input of the subsequent model.(ii)
The second part is the Multi-GCN (Multiple-Graph Convolutional Network) layer, which can jointly model the correlation between stations in both physical space and nonphysical space; i.e., the Multi-GCN layer is constructed to capture the heterogeneous spatial correlation between stations.(iii)
The third part is a Diff-GCN (Differential Graph Convolutional Network) layer, a differential feature extraction module, to extract the changing trends of heterogeneous spatial features. Besides, the attention mechanism is used to adaptively fuse the features of the Multi-GCN layer and the Diff-GCN layer.(iv)
The fourth part is the LSTM unit for global temporal correlation extraction and the fully connected network layer for prediction result output.Figure 2
The architecture of MDGCN.


#### 3.1.1. Reconstruction of the Correlation of Stations

The key for a neural network being able to be trained is in the input data. And the input to a GCN consists of two parts: the adjacency matrix and the node features. Whether the adjacency matrix correctly encodes the relationships of the network nodes is related to the performance of the model. Therefore, we interpret the URT network from two perspectives. Stations in close geographical proximity may have similar passenger flow patterns. Given this, we construct the topology of the physical spaceGDV,ED,AD based on the physical adjacency and distances between station i and station j.Firstly, we obtain the adjacency matrixA (in (2)) between stations using the physical adjacency relationship of stations. Then, we build the distance matrix D (in (3)) based on the inverse of the distance between stations. Finally, we reconstruct the topology matrix AD using the Hadamard product formula [1] (in (4)).(2)A=a11a12a13…a1na21a22a23…a2na31⋮an1a32⋮…a33⋮……aij…a3n⋮ann,aij=1,ifiandjis adjacent,0,ifiandjis not adjacent,(3)D=d11d12d13…d1nd21d22d23…d2nd31⋮dn1d32⋮dn2d33⋮……dij…d3n⋮dnn,dij=1distanceij,i≠j,0,i=j,(4)AD=A∘D.However, the flow pattern could make two stations with no spatial adjacency have a certain association, and the strength of the association is determined by the passenger flow. This flow pattern truly reflects the trend of passenger flow movement between stations. Therefore, we describe the passenger flow movement pattern and movement intensity between stations based on the data of historical passenger flow (in (5)) to construct the associated graph GCV,EC,AC. Denote pij as the passenger flow from station i to j.(5)AC=p11p12p13…p1np21p22p23…p2np31⋮pn1p32⋮pn2p33⋮pn3…pij…p3n⋮pnn.


#### 3.1.2. Multi-GCN Network

Two different network topologies are obtained by spatial relationship reconstruction of stations. We propose the layer of Multi-GCN to extract heterogeneous spatial correlation by GCN. The propagation rule of GCN can be expressed as(6)Hl+1=δD^−1/2A^D^−1/2HlWl,where Hl is the input of l-layer and its original value is X. A^=NormalizationA+I is the adjacent of a graph with added self-connections, D^=∑jA^ij is degree matrix, δ represents the sigmoid function for a nonlinear model, and Wl is a weight matrix of the current layer.In particular, GCN has a powerful ability to model higher-order neighborhood interactions by stacking multiple layers. As shown in Figure3, taking the red site as an example, the first layer of GCN can capture the influence of two neighboring stations of the red one. As the number of network layers deepens, the correlation of all stations can be captured completely. The spatial features in the URT network, i.e., the topology AD based on the physical space and the station association matrix AC in the passenger space, will be extracted by the N-layer GCN. So we input them into the layer of Multi-GCN to obtain the outputs ZD (in (7)) and ZC (in (8)) of the multigraph convolutional layers, respectively.(7)ZD=ZDN=δD^−1/2A^DD^−1/2ZDN−1W,(8)ZC=ZCN=δD^−1/2A^CD^−1/2ZCN−1W.Figure 3
The process of capturing the spatial correlation of passenger flows using GCNs (taking red station as an example).


#### 3.1.3. Diff-GCN Network

The difference reflects the variation between two discrete quantities. We introduce the concept of differencing to construct the layer of Diff-GCN to extract the tendency of heterogeneous spatial features. As shown in Figure4, the passenger flow data Xt, Xt−1 based on time t and t−1, and the adjacent matrix A are put into Multi-GCN, respectively, and the respective feature matrices ZN,t and ZN,t−1 are obtained after Multi-GCN, the difference is calculated, and the final difference factor ΔZ (in (9)) is obtained by using GCN for spatial feature extraction.Figure 4
The architecture of Diff-GCN.Here, we obtain two factorsΔZD (in (10)) and ΔZC (in (11)) based on two spatial relationships.(9)ΔZ=δD^−1/2A^D^−1/2ZN,t−ZN,t−1W,(10)ΔZD=ΔZDN=δD^−1/2A^DD^−1/2ZDN,t−ZDN,t−1W,(11)ΔZC=ΔZCN=δD^−1/2A^CD^−1/2ZCN,t−ZCN,t−1W.


#### 3.1.4. Attention

ForZD and ZC obtained from the layer of Multi-GCN and ΔZD and ΔZC obtained from the layer of Diff-GCN, we use the attention mechanism to learn the importance α1,α2,α3,α4 of these four features as follows (in (12)). Firstly, we calculate the hidden state vector scoring S1 of ZD using a nonlinear transformation and one shared attention vector Q (in (13)). Here, W is the weight matrix and b is the bias vector. Similarly, the embedding ZC,ΔZD,ΔZC do the same operation to get S2,S3,S4. Secondly, we perform a normalization operation (in (14)) to obtain the coefficient (αi) of the individual embedding vector. Finally, the linear operation is used to combine the four components to obtain Z (in (15)).(12)α1,α2,α3,α4=AttentionZD,ZC,ΔZD,ΔZC,(13)S1=QT⋅tanhW⋅ZDT+b,(14)αi=softmaxSi=expSi∑i=14expSi,(15)Z=α1⋅ZD+α2⋅ZC+α3⋅ΔZD+α4⋅ΔZC.


#### 3.1.5. Prediction

After obtainingZ by attention, we use LSTM that is shown in Figure 5 to capture temporal features. LSTM is one of the most common neural network structures in time series forecasting problems. It uses the concept of gates to control the selective passage of information. As can be seen in (16) and Figure 5, it has three gates: Forget Gate, Input Gate, and Output Gate. Forget Gate filters the input information. Input Gate decides what new memory is stored. And Output Gate gets the processed results. The processing of each gate can be seen in (16).Figure 5
The architecture of prediction.As can be seen in Figure5, after Z|Z1,Z2,…,Zt is inputted into LSTM, the result h|h1,h2,⋯,ht is gained. Then we obtain the predicted output Xt+1|Xt+1V1,Xt+1V2,…,Xt+1Vt via the layer of fully connected with n neurons which means the number of stations.(16)Forget Gate:ft=σWf⋅ht−1,zt+bf,Input Gate:it=σWi⋅ht−1,zt+bt,C˜t=tanhWc⋅ht−1,zt+bc,Ct=ft⋅Ct−1+it⋅C˜t,Output Gate:ot=σWo⋅ht−1,zt+bo,ht=ot⋅tanhCt.


### 3.2. Pseudocode

MDGCN pseudocode is shown in Algorithm1. Besides, to evaluate the complexity of this deep learning algorithm, we use two indicators, FLOPs and Params. The time complexity is determined by the number of operations of the model, i.e., FLOPs (0.0126 G), and the space complexity is determined by the number of parameters, i.e., Params (2, 147, 895).Algorithm 1: MDGCN.
Input: Historical passenger flowX|X1,X2,…,Xt (described in Section 4.2.);GC, GD (described in Section 3.1.1).Output: Passenger flowXt+1 of t+1.Process:(1)
fori = 1, 2, …, n do(2)
ZD,t−1,ZD,t⟵Multi_GCNX1Vi,X2Vi,…,XtVi,AD by equation (7)(3)
ZC,t−1,ZC,t⟵Multi_GCNX1Vi,X2Vi,…,XtVi,AC by equation (8)(4)
ΔZD,ΔZC⟵Diff_GCNZD,t−1,ZD,t,ZC,t−1,ZC,t by equations (10) and (11)(5)
Z⟵AttentionZD,t,ZC,t,ΔZD,ΔZC(6)
Xt+1Vi⟵FCLSTMZ(7)
end(8)
Xt+1|Xt+1V1,Xt+1V2,…,Xt+1Vn (Forecasted passenger flow of all stations)


## 3.1. Modeling Framework

This model (Figure2) can be divided into four main parts: the reconstruction of the relationship of station, the layer of Multi-GCN, the layer of Diff-GCN, and the layer of output.(i)
The first part is based on the relationship between the physical space and the nonphysical space of stations and combines the historical passenger flow data as the input of the subsequent model.(ii)
The second part is the Multi-GCN (Multiple-Graph Convolutional Network) layer, which can jointly model the correlation between stations in both physical space and nonphysical space; i.e., the Multi-GCN layer is constructed to capture the heterogeneous spatial correlation between stations.(iii)
The third part is a Diff-GCN (Differential Graph Convolutional Network) layer, a differential feature extraction module, to extract the changing trends of heterogeneous spatial features. Besides, the attention mechanism is used to adaptively fuse the features of the Multi-GCN layer and the Diff-GCN layer.(iv)
The fourth part is the LSTM unit for global temporal correlation extraction and the fully connected network layer for prediction result output.Figure 2
The architecture of MDGCN.


### 3.1.1. Reconstruction of the Correlation of Stations

The key for a neural network being able to be trained is in the input data. And the input to a GCN consists of two parts: the adjacency matrix and the node features. Whether the adjacency matrix correctly encodes the relationships of the network nodes is related to the performance of the model. Therefore, we interpret the URT network from two perspectives. Stations in close geographical proximity may have similar passenger flow patterns. Given this, we construct the topology of the physical spaceGDV,ED,AD based on the physical adjacency and distances between station i and station j.Firstly, we obtain the adjacency matrixA (in (2)) between stations using the physical adjacency relationship of stations. Then, we build the distance matrix D (in (3)) based on the inverse of the distance between stations. Finally, we reconstruct the topology matrix AD using the Hadamard product formula [1] (in (4)).(2)A=a11a12a13…a1na21a22a23…a2na31⋮an1a32⋮…a33⋮……aij…a3n⋮ann,aij=1,ifiandjis adjacent,0,ifiandjis not adjacent,(3)D=d11d12d13…d1nd21d22d23…d2nd31⋮dn1d32⋮dn2d33⋮……dij…d3n⋮dnn,dij=1distanceij,i≠j,0,i=j,(4)AD=A∘D.However, the flow pattern could make two stations with no spatial adjacency have a certain association, and the strength of the association is determined by the passenger flow. This flow pattern truly reflects the trend of passenger flow movement between stations. Therefore, we describe the passenger flow movement pattern and movement intensity between stations based on the data of historical passenger flow (in (5)) to construct the associated graph GCV,EC,AC. Denote pij as the passenger flow from station i to j.(5)AC=p11p12p13…p1np21p22p23…p2np31⋮pn1p32⋮pn2p33⋮pn3…pij…p3n⋮pnn.


### 3.1.2. Multi-GCN Network

Two different network topologies are obtained by spatial relationship reconstruction of stations. We propose the layer of Multi-GCN to extract heterogeneous spatial correlation by GCN. The propagation rule of GCN can be expressed as(6)Hl+1=δD^−1/2A^D^−1/2HlWl,where Hl is the input of l-layer and its original value is X. A^=NormalizationA+I is the adjacent of a graph with added self-connections, D^=∑jA^ij is degree matrix, δ represents the sigmoid function for a nonlinear model, and Wl is a weight matrix of the current layer.In particular, GCN has a powerful ability to model higher-order neighborhood interactions by stacking multiple layers. As shown in Figure3, taking the red site as an example, the first layer of GCN can capture the influence of two neighboring stations of the red one. As the number of network layers deepens, the correlation of all stations can be captured completely. The spatial features in the URT network, i.e., the topology AD based on the physical space and the station association matrix AC in the passenger space, will be extracted by the N-layer GCN. So we input them into the layer of Multi-GCN to obtain the outputs ZD (in (7)) and ZC (in (8)) of the multigraph convolutional layers, respectively.(7)ZD=ZDN=δD^−1/2A^DD^−1/2ZDN−1W,(8)ZC=ZCN=δD^−1/2A^CD^−1/2ZCN−1W.Figure 3
The process of capturing the spatial correlation of passenger flows using GCNs (taking red station as an example).


### 3.1.3. Diff-GCN Network

The difference reflects the variation between two discrete quantities. We introduce the concept of differencing to construct the layer of Diff-GCN to extract the tendency of heterogeneous spatial features. As shown in Figure4, the passenger flow data Xt, Xt−1 based on time t and t−1, and the adjacent matrix A are put into Multi-GCN, respectively, and the respective feature matrices ZN,t and ZN,t−1 are obtained after Multi-GCN, the difference is calculated, and the final difference factor ΔZ (in (9)) is obtained by using GCN for spatial feature extraction.Figure 4
The architecture of Diff-GCN.Here, we obtain two factorsΔZD (in (10)) and ΔZC (in (11)) based on two spatial relationships.(9)ΔZ=δD^−1/2A^D^−1/2ZN,t−ZN,t−1W,(10)ΔZD=ΔZDN=δD^−1/2A^DD^−1/2ZDN,t−ZDN,t−1W,(11)ΔZC=ΔZCN=δD^−1/2A^CD^−1/2ZCN,t−ZCN,t−1W.


### 3.1.4. Attention

ForZD and ZC obtained from the layer of Multi-GCN and ΔZD and ΔZC obtained from the layer of Diff-GCN, we use the attention mechanism to learn the importance α1,α2,α3,α4 of these four features as follows (in (12)). Firstly, we calculate the hidden state vector scoring S1 of ZD using a nonlinear transformation and one shared attention vector Q (in (13)). Here, W is the weight matrix and b is the bias vector. Similarly, the embedding ZC,ΔZD,ΔZC do the same operation to get S2,S3,S4. Secondly, we perform a normalization operation (in (14)) to obtain the coefficient (αi) of the individual embedding vector. Finally, the linear operation is used to combine the four components to obtain Z (in (15)).(12)α1,α2,α3,α4=AttentionZD,ZC,ΔZD,ΔZC,(13)S1=QT⋅tanhW⋅ZDT+b,(14)αi=softmaxSi=expSi∑i=14expSi,(15)Z=α1⋅ZD+α2⋅ZC+α3⋅ΔZD+α4⋅ΔZC.


### 3.1.5. Prediction

After obtainingZ by attention, we use LSTM that is shown in Figure 5 to capture temporal features. LSTM is one of the most common neural network structures in time series forecasting problems. It uses the concept of gates to control the selective passage of information. As can be seen in (16) and Figure 5, it has three gates: Forget Gate, Input Gate, and Output Gate. Forget Gate filters the input information. Input Gate decides what new memory is stored. And Output Gate gets the processed results. The processing of each gate can be seen in (16).Figure 5
The architecture of prediction.As can be seen in Figure5, after Z|Z1,Z2,…,Zt is inputted into LSTM, the result h|h1,h2,⋯,ht is gained. Then we obtain the predicted output Xt+1|Xt+1V1,Xt+1V2,…,Xt+1Vt via the layer of fully connected with n neurons which means the number of stations.(16)Forget Gate:ft=σWf⋅ht−1,zt+bf,Input Gate:it=σWi⋅ht−1,zt+bt,C˜t=tanhWc⋅ht−1,zt+bc,Ct=ft⋅Ct−1+it⋅C˜t,Output Gate:ot=σWo⋅ht−1,zt+bo,ht=ot⋅tanhCt.


## 3.1.1. Reconstruction of the Correlation of Stations

The key for a neural network being able to be trained is in the input data. And the input to a GCN consists of two parts: the adjacency matrix and the node features. Whether the adjacency matrix correctly encodes the relationships of the network nodes is related to the performance of the model. Therefore, we interpret the URT network from two perspectives. Stations in close geographical proximity may have similar passenger flow patterns. Given this, we construct the topology of the physical spaceGDV,ED,AD based on the physical adjacency and distances between station i and station j.Firstly, we obtain the adjacency matrixA (in (2)) between stations using the physical adjacency relationship of stations. Then, we build the distance matrix D (in (3)) based on the inverse of the distance between stations. Finally, we reconstruct the topology matrix AD using the Hadamard product formula [1] (in (4)).(2)A=a11a12a13…a1na21a22a23…a2na31⋮an1a32⋮…a33⋮……aij…a3n⋮ann,aij=1,ifiandjis adjacent,0,ifiandjis not adjacent,(3)D=d11d12d13…d1nd21d22d23…d2nd31⋮dn1d32⋮dn2d33⋮……dij…d3n⋮dnn,dij=1distanceij,i≠j,0,i=j,(4)AD=A∘D.However, the flow pattern could make two stations with no spatial adjacency have a certain association, and the strength of the association is determined by the passenger flow. This flow pattern truly reflects the trend of passenger flow movement between stations. Therefore, we describe the passenger flow movement pattern and movement intensity between stations based on the data of historical passenger flow (in (5)) to construct the associated graph GCV,EC,AC. Denote pij as the passenger flow from station i to j.(5)AC=p11p12p13…p1np21p22p23…p2np31⋮pn1p32⋮pn2p33⋮pn3…pij…p3n⋮pnn.


## 3.1.2. Multi-GCN Network

Two different network topologies are obtained by spatial relationship reconstruction of stations. We propose the layer of Multi-GCN to extract heterogeneous spatial correlation by GCN. The propagation rule of GCN can be expressed as(6)Hl+1=δD^−1/2A^D^−1/2HlWl,where Hl is the input of l-layer and its original value is X. A^=NormalizationA+I is the adjacent of a graph with added self-connections, D^=∑jA^ij is degree matrix, δ represents the sigmoid function for a nonlinear model, and Wl is a weight matrix of the current layer.In particular, GCN has a powerful ability to model higher-order neighborhood interactions by stacking multiple layers. As shown in Figure3, taking the red site as an example, the first layer of GCN can capture the influence of two neighboring stations of the red one. As the number of network layers deepens, the correlation of all stations can be captured completely. The spatial features in the URT network, i.e., the topology AD based on the physical space and the station association matrix AC in the passenger space, will be extracted by the N-layer GCN. So we input them into the layer of Multi-GCN to obtain the outputs ZD (in (7)) and ZC (in (8)) of the multigraph convolutional layers, respectively.(7)ZD=ZDN=δD^−1/2A^DD^−1/2ZDN−1W,(8)ZC=ZCN=δD^−1/2A^CD^−1/2ZCN−1W.Figure 3
The process of capturing the spatial correlation of passenger flows using GCNs (taking red station as an example).


## 3.1.3. Diff-GCN Network

The difference reflects the variation between two discrete quantities. We introduce the concept of differencing to construct the layer of Diff-GCN to extract the tendency of heterogeneous spatial features. As shown in Figure4, the passenger flow data Xt, Xt−1 based on time t and t−1, and the adjacent matrix A are put into Multi-GCN, respectively, and the respective feature matrices ZN,t and ZN,t−1 are obtained after Multi-GCN, the difference is calculated, and the final difference factor ΔZ (in (9)) is obtained by using GCN for spatial feature extraction.Figure 4
The architecture of Diff-GCN.Here, we obtain two factorsΔZD (in (10)) and ΔZC (in (11)) based on two spatial relationships.(9)ΔZ=δD^−1/2A^D^−1/2ZN,t−ZN,t−1W,(10)ΔZD=ΔZDN=δD^−1/2A^DD^−1/2ZDN,t−ZDN,t−1W,(11)ΔZC=ΔZCN=δD^−1/2A^CD^−1/2ZCN,t−ZCN,t−1W.


## 3.1.4. Attention

ForZD and ZC obtained from the layer of Multi-GCN and ΔZD and ΔZC obtained from the layer of Diff-GCN, we use the attention mechanism to learn the importance α1,α2,α3,α4 of these four features as follows (in (12)). Firstly, we calculate the hidden state vector scoring S1 of ZD using a nonlinear transformation and one shared attention vector Q (in (13)). Here, W is the weight matrix and b is the bias vector. Similarly, the embedding ZC,ΔZD,ΔZC do the same operation to get S2,S3,S4. Secondly, we perform a normalization operation (in (14)) to obtain the coefficient (αi) of the individual embedding vector. Finally, the linear operation is used to combine the four components to obtain Z (in (15)).(12)α1,α2,α3,α4=AttentionZD,ZC,ΔZD,ΔZC,(13)S1=QT⋅tanhW⋅ZDT+b,(14)αi=softmaxSi=expSi∑i=14expSi,(15)Z=α1⋅ZD+α2⋅ZC+α3⋅ΔZD+α4⋅ΔZC.


## 3.1.5. Prediction

After obtainingZ by attention, we use LSTM that is shown in Figure 5 to capture temporal features. LSTM is one of the most common neural network structures in time series forecasting problems. It uses the concept of gates to control the selective passage of information. As can be seen in (16) and Figure 5, it has three gates: Forget Gate, Input Gate, and Output Gate. Forget Gate filters the input information. Input Gate decides what new memory is stored. And Output Gate gets the processed results. The processing of each gate can be seen in (16).Figure 5
The architecture of prediction.As can be seen in Figure5, after Z|Z1,Z2,…,Zt is inputted into LSTM, the result h|h1,h2,⋯,ht is gained. Then we obtain the predicted output Xt+1|Xt+1V1,Xt+1V2,…,Xt+1Vt via the layer of fully connected with n neurons which means the number of stations.(16)Forget Gate:ft=σWf⋅ht−1,zt+bf,Input Gate:it=σWi⋅ht−1,zt+bt,C˜t=tanhWc⋅ht−1,zt+bc,Ct=ft⋅Ct−1+it⋅C˜t,Output Gate:ot=σWo⋅ht−1,zt+bo,ht=ot⋅tanhCt.


## 3.2. Pseudocode

MDGCN pseudocode is shown in Algorithm1. Besides, to evaluate the complexity of this deep learning algorithm, we use two indicators, FLOPs and Params. The time complexity is determined by the number of operations of the model, i.e., FLOPs (0.0126 G), and the space complexity is determined by the number of parameters, i.e., Params (2, 147, 895).Algorithm 1: MDGCN.
Input: Historical passenger flowX|X1,X2,…,Xt (described in Section 4.2.);GC, GD (described in Section 3.1.1).Output: Passenger flowXt+1 of t+1.Process:(1)
fori = 1, 2, …, n do(2)
ZD,t−1,ZD,t⟵Multi_GCNX1Vi,X2Vi,…,XtVi,AD by equation (7)(3)
ZC,t−1,ZC,t⟵Multi_GCNX1Vi,X2Vi,…,XtVi,AC by equation (8)(4)
ΔZD,ΔZC⟵Diff_GCNZD,t−1,ZD,t,ZC,t−1,ZC,t by equations (10) and (11)(5)
Z⟵AttentionZD,t,ZC,t,ΔZD,ΔZC(6)
Xt+1Vi⟵FCLSTMZ(7)
end(8)
Xt+1|Xt+1V1,Xt+1V2,…,Xt+1Vn (Forecasted passenger flow of all stations)


## 4. Results and Discussion

### 4.1. Experimental Settings

This model is implemented in Tensorflow and Keras. All experiments were run on a graphics processing unit (GPU) platform with an NVIDIA GeForce GTX 1070 Ti graphics card and 8GB GPU memory. We train our model using Adam optimizer with a learning rate of 0.0001. The training epoch is 150. Two kinds of evaluation metrics are adopted, including root mean squared errors (RMSE), mean absolute errors (MAE), and the evaluation indicators which are shown in(17)RMSE=1n∑i=1nyi−y^i2,(18)MAE=1n∑i=1nyi−y^i2,where yi is the true value, y^i is the predicted value, and n is the number of samples.


### 4.2. Dataset

We used two real-world datasets from China to evaluate our model, i.e., data collected from Xiamen and Shanghai subway Automatic Fare Collection (AFC) System.SH dataset was collected from 1 April to 31 April 2015. This dataset includes records from 14 lines and 313 stations. The example of this dataset is shown in Table1. Each record contains the card number (ID), travel date (DATE), card-swiping time (TIME), the name of stations (STATION_NAME), the number of lines (LINE_ID), and TPYE. Passenger flow is calculated by formula (19). xt−ba represents the number of passenger flows of station a in period t−b. Here, a is determined by “STATION_NAME” and t−b is determined by “DATE” and “TIME.”Table 1
The sample of Shanghai dataset.
IDDATETIMESTATION_NAMELINE_IDFARETYPE6021∗∗1282015/4/179 : 34 : 30Xinzhuang12Discount2801∗∗2732015/4/1718 : 23 : 59Dalian Road41Nondiscount1014∗∗8192015/4/179 : 16 : 18Guanglan Road24DiscountXM dataset was collected from 1 December to 31 December 2019. This dataset includes records from two lines and 52 stations. The example of this dataset is shown in Table2. We use the same procedure of data preprocessing to gain passenger flow.(19)X=xt1xt−11xt−b1…xt−m−11xt2xt−12xt−b2…xt−m−12xtaxt−1axt−ba…xt−m−1a⋮⋮⋮⋱⋮xtnxt−1nxt−bn…xt−m−1n.Table 2
The sample of Xiamen dataset.
IDDATETIMESTATION_IDSTATION_NAMELINE_IDKHTYPE17∗∗25201912245109021DongFu2E-card82∗∗47201912107372511HuoJuYuan1E-card94∗∗60201912316839726GuanYin2E-card


### 4.3. Experiment Results

In this section, we conducted four main parts of experiments to demonstrate the validity of the proposed model and the reasonableness of each module.


#### 4.3.1. Evaluation of the Number of GCN Layers

To determine the optimal value of the number of GCN stacks, we conduct experiments at different stacking values to obtain the corresponding prediction values, and the prediction results are shown in Figure6. We found that the experiment worked best when N=3, so we set the number of stacks to 3 in the experiment.Figure 6
Performance with different number of GCN layer.


#### 4.3.2. The Results in Baselines

To evaluate the competitive performance of the proposed method (i.e., MDGCN), we compared it with two types of models, covering the most basic mathematical-statistical models and the deep learning models. All baselines are optimized to output the best performance.(i)
HA [27]: it means historical average model, which uses the average of several previous periods as the prediction. In this paper, we use the average of the last ten periods as the forecast value.(ii)
ARIMA [28]: we used SPSS software to make predictions so that we could get the best predictions.(iii)
SVR: we used support vector regression (SVR) to predict passenger flow. Here, the kernel function is rbf, epsilon is 0.2.(iv)
GBDT: we used gradient boosting decision tree (GBDT) to predict passenger flow. Here, n_estimators is 100, min_samples_split is 2, and learning_rate is 0.1.(v)
LSTM: Ma et al. [8] used this method to predict traffic flow. In this paper, we use the same method to predict passenger flow. We used a stacked LSTM which has 128 and 276 neurons for the first and second layers.(vi)
GCN + LSTM: Chai et al. [17] used this method to predict bike flow. Likewise, we use the same method to predict passenger flow. We used a 2-layer GCN and a layer of LSTM which has 64 neurons.(vii)
ResLSTM: it refers to the method in [29], which combines ResNet and GCN with LSTM to predict the traffic flow. Here we use the same setting as it is without branch 4.(viii)
Conv-GCN: it refers to the method in [1], which combines the 3D-Conv with GCN to predict the traffic flow. Also, we use the same setting as is.The results are shown in Table3. The following trends can be seen from the results. Firstly, deep learning models (including LSTM, Conv-GCN, ResLSTM, GCN + LSTM, and MDGCN) have a better performance than traditional mathematical-statistical (including HA and ARIMA) and shallow machine learning models (including SVR and GBDT). This result shows that deep learning methods can better capture nonlinear spatiotemporal correlations. Second, the variant of recurrent neural network (including LSTM and ResLSTM) outperforms machine learning methods (including SVR and GBDT). It indicates these time-series models can capture temporal correlation deeply. By comparison, the spatial deep learning-based models (including Conv-GCN, GCN + LSTM, and MDGCN) outperform the variant of LSTM. It demonstrates the effectiveness of spatial correlation in passenger flow prediction. Also, MDGCN mines the relationship of all the stations deeply to have the best performance compared to all baselines. Thirdly, almost all the models behave much better on XM than SH. The biggest reason must be the complexity of the dataset. SH dataset has more lines and stations than XM. Thus, the traffic condition patterns in Shanghai would be much more complex than in Xiamen. Finally, MDGCN has the best performance in these two datasets. Compared with the optimal baseline, it reduced error by 1% to 15%. This shows that it can get better performance by capturing various correlations (including spatial and temporal) and deeply mining the historical passenger flow.Table 3
The performance in different baselines.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minHA69.81289.21095.57435.95449.03454.601ARIMA51.04481.012156.25629.05744.25782.964SVR30.45436.21439.75417.20719.90321.169GBDT29.93539.36432.54216.56120.00117.342LSTM28.05926.54129.35415.70514.67215.584Conv-GCN22.15421.09725.64511.25414.36014.391ResLSTM26.38729.54829.64214.08715.26516.005GCN + LSTM20.16521.36424.60813.90414.36713.927MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minHA67.24185.45595.14735.26447.75153.813ARIMA50.69579.568175.26528.56443.56195.556SVR29.36535.52436.52416.45418.42819.658GBDT33.63537.65250.56217.05819.95226.895LSTM28.54526.42130.24114.21416.75419.241Conv-GCN19.42120.14524.24512.25613.97815.842ResLSTM24.00723.55726.35214.54515.81218.731GCN + LSTM18.95419.14522.29611.92510.77013.754MDGCN16.71316.92718.5609.92410.24711.155


#### 4.3.3. Evaluation of Spatial Relationship Reconstruction of MDGCN

In the third experiment, we try to evaluate the effectiveness of spatial relationship reconstruction. Specifically, we compare the performance of the following three variants of MDGCN. Here,AM represents the adjacent matrix that is put into the Multi-GCN layer.(i)
MDGCN-A: it concludes only the most basic adjacency matrix (i.e., AM=A)(ii)
MDGCN-AD: it concludes only the physical topology matrix based on the adjacency matrix with distance inverse recoding (i.e., AM=AD)(iii)
MDGCN-AC: it concludes only the topological matrix based on the passenger space (i.e., AM=AC)(iv)
MDGCN: it combines the topological matrix of both physical space and passenger space (i.e.,AM=AD∪AC)The experiment results are shown in Table4. On the one hand, MDGCN has the best overall performance and MDGCN-A has the worst. It demonstrates the importance and effectiveness of recoding. On the other hand, MDGCN-AC outperforms MDGCN-A and MDGCN-AD, and it has almost the same level of accuracy as MDGCN. It suggests that the topology of the passenger space more accurately describes the correlations between stations.Table 4
The evaluation results of spatial relationship reconstruction.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A35.54830.67429.54119.06616.07815.597MDGCN-AD25.68535.54736.54514.95016.63518.654MDGCN-AC20.36526.65423.31511.02714.02812.389MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A27.24127.62430.14818.27918.69823.039MDGCN-AD22.14855.51227.53914.20826.38414.257MDGCN-AC18.21419.01222.35110.85211.10913.691MDGCN16.71316.92718.5609.92410.24711.155


#### 4.3.4. Evaluation of the Diff-GCN Layer of MDGCN

In the last experiment, we evaluate the performance of the layer of Diff-GCN. We compare the performance of MDGCN with its variant called MGCN which does not conclude the module of Diff-GCN. The experiment results are shown in Figure7.Figure 7
The evaluation of Diff-GCN under different time intervals. (a) RMSE. (b) MAE.
(a)(b)It is clear from the results on these two datasets are consistent with each other. The layer of Diff-GCN reduces the prediction error because it can fully extract the trend information among passenger flow.


## 4.1. Experimental Settings

This model is implemented in Tensorflow and Keras. All experiments were run on a graphics processing unit (GPU) platform with an NVIDIA GeForce GTX 1070 Ti graphics card and 8GB GPU memory. We train our model using Adam optimizer with a learning rate of 0.0001. The training epoch is 150. Two kinds of evaluation metrics are adopted, including root mean squared errors (RMSE), mean absolute errors (MAE), and the evaluation indicators which are shown in(17)RMSE=1n∑i=1nyi−y^i2,(18)MAE=1n∑i=1nyi−y^i2,where yi is the true value, y^i is the predicted value, and n is the number of samples.


## 4.2. Dataset

We used two real-world datasets from China to evaluate our model, i.e., data collected from Xiamen and Shanghai subway Automatic Fare Collection (AFC) System.SH dataset was collected from 1 April to 31 April 2015. This dataset includes records from 14 lines and 313 stations. The example of this dataset is shown in Table1. Each record contains the card number (ID), travel date (DATE), card-swiping time (TIME), the name of stations (STATION_NAME), the number of lines (LINE_ID), and TPYE. Passenger flow is calculated by formula (19). xt−ba represents the number of passenger flows of station a in period t−b. Here, a is determined by “STATION_NAME” and t−b is determined by “DATE” and “TIME.”Table 1
The sample of Shanghai dataset.
IDDATETIMESTATION_NAMELINE_IDFARETYPE6021∗∗1282015/4/179 : 34 : 30Xinzhuang12Discount2801∗∗2732015/4/1718 : 23 : 59Dalian Road41Nondiscount1014∗∗8192015/4/179 : 16 : 18Guanglan Road24DiscountXM dataset was collected from 1 December to 31 December 2019. This dataset includes records from two lines and 52 stations. The example of this dataset is shown in Table2. We use the same procedure of data preprocessing to gain passenger flow.(19)X=xt1xt−11xt−b1…xt−m−11xt2xt−12xt−b2…xt−m−12xtaxt−1axt−ba…xt−m−1a⋮⋮⋮⋱⋮xtnxt−1nxt−bn…xt−m−1n.Table 2
The sample of Xiamen dataset.
IDDATETIMESTATION_IDSTATION_NAMELINE_IDKHTYPE17∗∗25201912245109021DongFu2E-card82∗∗47201912107372511HuoJuYuan1E-card94∗∗60201912316839726GuanYin2E-card


## 4.3. Experiment Results

In this section, we conducted four main parts of experiments to demonstrate the validity of the proposed model and the reasonableness of each module.


### 4.3.1. Evaluation of the Number of GCN Layers

To determine the optimal value of the number of GCN stacks, we conduct experiments at different stacking values to obtain the corresponding prediction values, and the prediction results are shown in Figure6. We found that the experiment worked best when N=3, so we set the number of stacks to 3 in the experiment.Figure 6
Performance with different number of GCN layer.


### 4.3.2. The Results in Baselines

To evaluate the competitive performance of the proposed method (i.e., MDGCN), we compared it with two types of models, covering the most basic mathematical-statistical models and the deep learning models. All baselines are optimized to output the best performance.(i)
HA [27]: it means historical average model, which uses the average of several previous periods as the prediction. In this paper, we use the average of the last ten periods as the forecast value.(ii)
ARIMA [28]: we used SPSS software to make predictions so that we could get the best predictions.(iii)
SVR: we used support vector regression (SVR) to predict passenger flow. Here, the kernel function is rbf, epsilon is 0.2.(iv)
GBDT: we used gradient boosting decision tree (GBDT) to predict passenger flow. Here, n_estimators is 100, min_samples_split is 2, and learning_rate is 0.1.(v)
LSTM: Ma et al. [8] used this method to predict traffic flow. In this paper, we use the same method to predict passenger flow. We used a stacked LSTM which has 128 and 276 neurons for the first and second layers.(vi)
GCN + LSTM: Chai et al. [17] used this method to predict bike flow. Likewise, we use the same method to predict passenger flow. We used a 2-layer GCN and a layer of LSTM which has 64 neurons.(vii)
ResLSTM: it refers to the method in [29], which combines ResNet and GCN with LSTM to predict the traffic flow. Here we use the same setting as it is without branch 4.(viii)
Conv-GCN: it refers to the method in [1], which combines the 3D-Conv with GCN to predict the traffic flow. Also, we use the same setting as is.The results are shown in Table3. The following trends can be seen from the results. Firstly, deep learning models (including LSTM, Conv-GCN, ResLSTM, GCN + LSTM, and MDGCN) have a better performance than traditional mathematical-statistical (including HA and ARIMA) and shallow machine learning models (including SVR and GBDT). This result shows that deep learning methods can better capture nonlinear spatiotemporal correlations. Second, the variant of recurrent neural network (including LSTM and ResLSTM) outperforms machine learning methods (including SVR and GBDT). It indicates these time-series models can capture temporal correlation deeply. By comparison, the spatial deep learning-based models (including Conv-GCN, GCN + LSTM, and MDGCN) outperform the variant of LSTM. It demonstrates the effectiveness of spatial correlation in passenger flow prediction. Also, MDGCN mines the relationship of all the stations deeply to have the best performance compared to all baselines. Thirdly, almost all the models behave much better on XM than SH. The biggest reason must be the complexity of the dataset. SH dataset has more lines and stations than XM. Thus, the traffic condition patterns in Shanghai would be much more complex than in Xiamen. Finally, MDGCN has the best performance in these two datasets. Compared with the optimal baseline, it reduced error by 1% to 15%. This shows that it can get better performance by capturing various correlations (including spatial and temporal) and deeply mining the historical passenger flow.Table 3
The performance in different baselines.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minHA69.81289.21095.57435.95449.03454.601ARIMA51.04481.012156.25629.05744.25782.964SVR30.45436.21439.75417.20719.90321.169GBDT29.93539.36432.54216.56120.00117.342LSTM28.05926.54129.35415.70514.67215.584Conv-GCN22.15421.09725.64511.25414.36014.391ResLSTM26.38729.54829.64214.08715.26516.005GCN + LSTM20.16521.36424.60813.90414.36713.927MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minHA67.24185.45595.14735.26447.75153.813ARIMA50.69579.568175.26528.56443.56195.556SVR29.36535.52436.52416.45418.42819.658GBDT33.63537.65250.56217.05819.95226.895LSTM28.54526.42130.24114.21416.75419.241Conv-GCN19.42120.14524.24512.25613.97815.842ResLSTM24.00723.55726.35214.54515.81218.731GCN + LSTM18.95419.14522.29611.92510.77013.754MDGCN16.71316.92718.5609.92410.24711.155


### 4.3.3. Evaluation of Spatial Relationship Reconstruction of MDGCN

In the third experiment, we try to evaluate the effectiveness of spatial relationship reconstruction. Specifically, we compare the performance of the following three variants of MDGCN. Here,AM represents the adjacent matrix that is put into the Multi-GCN layer.(i)
MDGCN-A: it concludes only the most basic adjacency matrix (i.e., AM=A)(ii)
MDGCN-AD: it concludes only the physical topology matrix based on the adjacency matrix with distance inverse recoding (i.e., AM=AD)(iii)
MDGCN-AC: it concludes only the topological matrix based on the passenger space (i.e., AM=AC)(iv)
MDGCN: it combines the topological matrix of both physical space and passenger space (i.e.,AM=AD∪AC)The experiment results are shown in Table4. On the one hand, MDGCN has the best overall performance and MDGCN-A has the worst. It demonstrates the importance and effectiveness of recoding. On the other hand, MDGCN-AC outperforms MDGCN-A and MDGCN-AD, and it has almost the same level of accuracy as MDGCN. It suggests that the topology of the passenger space more accurately describes the correlations between stations.Table 4
The evaluation results of spatial relationship reconstruction.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A35.54830.67429.54119.06616.07815.597MDGCN-AD25.68535.54736.54514.95016.63518.654MDGCN-AC20.36526.65423.31511.02714.02812.389MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A27.24127.62430.14818.27918.69823.039MDGCN-AD22.14855.51227.53914.20826.38414.257MDGCN-AC18.21419.01222.35110.85211.10913.691MDGCN16.71316.92718.5609.92410.24711.155


### 4.3.4. Evaluation of the Diff-GCN Layer of MDGCN

In the last experiment, we evaluate the performance of the layer of Diff-GCN. We compare the performance of MDGCN with its variant called MGCN which does not conclude the module of Diff-GCN. The experiment results are shown in Figure7.Figure 7
The evaluation of Diff-GCN under different time intervals. (a) RMSE. (b) MAE.
(a)(b)It is clear from the results on these two datasets are consistent with each other. The layer of Diff-GCN reduces the prediction error because it can fully extract the trend information among passenger flow.


## 4.3.1. Evaluation of the Number of GCN Layers

To determine the optimal value of the number of GCN stacks, we conduct experiments at different stacking values to obtain the corresponding prediction values, and the prediction results are shown in Figure6. We found that the experiment worked best when N=3, so we set the number of stacks to 3 in the experiment.Figure 6
Performance with different number of GCN layer.


## 4.3.2. The Results in Baselines

To evaluate the competitive performance of the proposed method (i.e., MDGCN), we compared it with two types of models, covering the most basic mathematical-statistical models and the deep learning models. All baselines are optimized to output the best performance.(i)
HA [27]: it means historical average model, which uses the average of several previous periods as the prediction. In this paper, we use the average of the last ten periods as the forecast value.(ii)
ARIMA [28]: we used SPSS software to make predictions so that we could get the best predictions.(iii)
SVR: we used support vector regression (SVR) to predict passenger flow. Here, the kernel function is rbf, epsilon is 0.2.(iv)
GBDT: we used gradient boosting decision tree (GBDT) to predict passenger flow. Here, n_estimators is 100, min_samples_split is 2, and learning_rate is 0.1.(v)
LSTM: Ma et al. [8] used this method to predict traffic flow. In this paper, we use the same method to predict passenger flow. We used a stacked LSTM which has 128 and 276 neurons for the first and second layers.(vi)
GCN + LSTM: Chai et al. [17] used this method to predict bike flow. Likewise, we use the same method to predict passenger flow. We used a 2-layer GCN and a layer of LSTM which has 64 neurons.(vii)
ResLSTM: it refers to the method in [29], which combines ResNet and GCN with LSTM to predict the traffic flow. Here we use the same setting as it is without branch 4.(viii)
Conv-GCN: it refers to the method in [1], which combines the 3D-Conv with GCN to predict the traffic flow. Also, we use the same setting as is.The results are shown in Table3. The following trends can be seen from the results. Firstly, deep learning models (including LSTM, Conv-GCN, ResLSTM, GCN + LSTM, and MDGCN) have a better performance than traditional mathematical-statistical (including HA and ARIMA) and shallow machine learning models (including SVR and GBDT). This result shows that deep learning methods can better capture nonlinear spatiotemporal correlations. Second, the variant of recurrent neural network (including LSTM and ResLSTM) outperforms machine learning methods (including SVR and GBDT). It indicates these time-series models can capture temporal correlation deeply. By comparison, the spatial deep learning-based models (including Conv-GCN, GCN + LSTM, and MDGCN) outperform the variant of LSTM. It demonstrates the effectiveness of spatial correlation in passenger flow prediction. Also, MDGCN mines the relationship of all the stations deeply to have the best performance compared to all baselines. Thirdly, almost all the models behave much better on XM than SH. The biggest reason must be the complexity of the dataset. SH dataset has more lines and stations than XM. Thus, the traffic condition patterns in Shanghai would be much more complex than in Xiamen. Finally, MDGCN has the best performance in these two datasets. Compared with the optimal baseline, it reduced error by 1% to 15%. This shows that it can get better performance by capturing various correlations (including spatial and temporal) and deeply mining the historical passenger flow.Table 3
The performance in different baselines.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minHA69.81289.21095.57435.95449.03454.601ARIMA51.04481.012156.25629.05744.25782.964SVR30.45436.21439.75417.20719.90321.169GBDT29.93539.36432.54216.56120.00117.342LSTM28.05926.54129.35415.70514.67215.584Conv-GCN22.15421.09725.64511.25414.36014.391ResLSTM26.38729.54829.64214.08715.26516.005GCN + LSTM20.16521.36424.60813.90414.36713.927MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minHA67.24185.45595.14735.26447.75153.813ARIMA50.69579.568175.26528.56443.56195.556SVR29.36535.52436.52416.45418.42819.658GBDT33.63537.65250.56217.05819.95226.895LSTM28.54526.42130.24114.21416.75419.241Conv-GCN19.42120.14524.24512.25613.97815.842ResLSTM24.00723.55726.35214.54515.81218.731GCN + LSTM18.95419.14522.29611.92510.77013.754MDGCN16.71316.92718.5609.92410.24711.155


## 4.3.3. Evaluation of Spatial Relationship Reconstruction of MDGCN

In the third experiment, we try to evaluate the effectiveness of spatial relationship reconstruction. Specifically, we compare the performance of the following three variants of MDGCN. Here,AM represents the adjacent matrix that is put into the Multi-GCN layer.(i)
MDGCN-A: it concludes only the most basic adjacency matrix (i.e., AM=A)(ii)
MDGCN-AD: it concludes only the physical topology matrix based on the adjacency matrix with distance inverse recoding (i.e., AM=AD)(iii)
MDGCN-AC: it concludes only the topological matrix based on the passenger space (i.e., AM=AC)(iv)
MDGCN: it combines the topological matrix of both physical space and passenger space (i.e.,AM=AD∪AC)The experiment results are shown in Table4. On the one hand, MDGCN has the best overall performance and MDGCN-A has the worst. It demonstrates the importance and effectiveness of recoding. On the other hand, MDGCN-AC outperforms MDGCN-A and MDGCN-AD, and it has almost the same level of accuracy as MDGCN. It suggests that the topology of the passenger space more accurately describes the correlations between stations.Table 4
The evaluation results of spatial relationship reconstruction.
ModelSHRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A35.54830.67429.54119.06616.07815.597MDGCN-AD25.68535.54736.54514.95016.63518.654MDGCN-AC20.36526.65423.31511.02714.02812.389MDGCN17.04120.96222.35410.55212.78613.452ModelXMRMSEMAE10 min15 min30 min10 min15 min30 minMDGCN-A27.24127.62430.14818.27918.69823.039MDGCN-AD22.14855.51227.53914.20826.38414.257MDGCN-AC18.21419.01222.35110.85211.10913.691MDGCN16.71316.92718.5609.92410.24711.155


## 4.3.4. Evaluation of the Diff-GCN Layer of MDGCN

In the last experiment, we evaluate the performance of the layer of Diff-GCN. We compare the performance of MDGCN with its variant called MGCN which does not conclude the module of Diff-GCN. The experiment results are shown in Figure7.Figure 7
The evaluation of Diff-GCN under different time intervals. (a) RMSE. (b) MAE.
(a)(b)It is clear from the results on these two datasets are consistent with each other. The layer of Diff-GCN reduces the prediction error because it can fully extract the trend information among passenger flow.


## 5. Conclusions

In this paper, we propose a deep learning model called MDGCN to predict passenger flow. We construct the Multi-GCN layer to extract heterogeneous correlations under two spatial relationships, and we use the Diff-GCN layer to extract the changing trend of heterogeneous features to fully capture the spatiotemporal correlations. Eventually, it is validated in the actual datasets and obtained better results. However, there are still many points for improvement in the above work, for example, how to construct dynamic connectivity of stations using historical passenger flow data and how to consider the impact of various factors such as weather and unexpected accidents on the prediction results. Therefore, future work will focus on addressing these issues.



---

*Source: 2956151-2021-12-01.xml*