{'fraction_non_alphanumeric': 0.036907239075676265, 'fraction_numerical': 0.011006461504763991, 'mean_word_length': 4.783090563647878, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Spatio-Temporal Cross-Platform Graph Embedding Fusion for Urban Traffic Flow Prediction

In this paper, we have proposed STC-GEF, a novel Spatio-Temporal Cross-platform Graph Embedding Fusion approach for the urban traffic flow prediction. We have designed a spatial embedding module based on graph convolutional networks (GCN) to extract the complex spatial features within traffic flow data. Furthermore, to capture the temporal dependencies between the traffic flow data from various time intervals, we have designed a temporal embedding module based on recurrent neural networks. Based on the observations that different transportation platforms trip data (e.g., taxis, Uber, and Lyft) can be correlated, we have designed an effective fusion mechanism that combines the trip data from different transportation platforms and further uses them for cross-platform traffic flow prediction (e.g., integrating taxis and ride-sharing platforms for taxi traffic flow prediction). We have conducted extensive real-world experimental studies based on real-world trip data of yellow taxis and ride-sharing (Lyft) from the New York City (NYC), and validated the accuracy and effectiveness of STC-GEF in fusing different transportation platform data and predicting traffic flows.


INTRODUCTION
Urban traffic prediction for transportation platforms such as taxis, ride-sharing, as well as other public/private vehicles has attracted much attention recently due to the important social and business values [1,6,17,18]. With urban traffic prediction and emerging big mobility data, various ubiquitous and urban computing applications have been enabled or strengthened, including vehicle routing [15], event monitoring [12], and autonomous driving. However, two major technical challenges remain when deploying a large-scale data-driven traffic prediction system: • Dynamic and complex mobility activity/usage patterns in different regions: To predict the traffic flow in a future time interval, one may use the historical traffic flow data to calculate spatial and temporal features. However, there exist various types of traffic patterns in the historical data and designing a model to effectively capture the most critical and related ones based on different conditions is highly challenging. • Absence of cross-platform mobility data fusion: The traffic flow is highly correlated to different transportation platforms such as bike sharing or ride-sharing systems (e.g., Lyft and Uber). Therefore, to have an accurate prediction of the traffic flow, such correlation must be identified and effectively taken into account, which is a challenging task.
To address the above challenges, we propose STC-GEF, the novel Spatio-Temporal Cross-platform Graph Embedding Fusion approach for the urban taxi flow prediction. In this prototype study, we have made the following three major contributions: (1) Spatial and Temporal Graph Embedding Learning: To extract the complex spatial features within traffic flow data, we propose a spatial embedding module based on graph convolutional networks (GCN). Additionally, to capture the temporal dependencies between the traffic flow data from various time intervals, we leverage a temporal embedding module based on recurrent neural networks.
(2) Cross-platform Mobility Data Fusion: Based on our data analysis, we have identified that different transportation platforms' trip data (e.g., taxis, Uber, and Lyft) may be highly correlated. Therefore, we have proposed an effective fusion mechanism that combines the trip data from different transportation platforms and further uses them for cross-platform traffic flow prediction. In particular, in the preliminary studies, we leverage historical taxi and Lyft trip data to predict the future traffic flow of the taxis in NYC. (3) Extensive Experimental Evaluations: We have performed data analytics and experimental studies on two public realworld datasets to evaluate the effectiveness of our STC-GEF. Specifically, we have studied a total of 4,464,090 yellow taxi and Lyft trip records provided by the NYC's open data program [4,5] and shown that our proposed framework outperforms the baseline methods for traffic flow prediction.
The rest of our paper is organized as follows. We first review some of the previous studies for traffic flow prediction in Sec. 2. Then, we present an overview of our framework in Sec. 3 followed by dataset details, problem formulation, and framework designs in Sec. 4. We demonstrate our experimental studies in Sec. 5, and finally conclude our work in Sec. 6.

RELATED WORKS
We briefly go through the related studies as follows. Various traditional time series forecasting methods have been explored for traffic flow prediction. Chen et al. [7] leveraged the auto-regressive integrated moving average for traffic prediction. On the other hand, Kumar et al. [13] designed a Kalman Filter to forecast the traffic flow. Dong et al. [9] used the Gradient Boosting Decision Tree algorithm to perform short-term traffic flow prediction.
With the recent advances of big mobility data [20] and deep learning, many recent studies have proposed various network architectures based on convolutional neural networks (CNN), long shortterm memory (LSTM) or residual neural networks (ResNet [11]) to perform traffic flow prediction. Zhang et al. [22] proposed DeepST, a network based on CNN and ResNet modules to predict the crowd flow. Yang et al. [20] proposed a method based on graph neural networks and attention mechanism to predict the crowd inflow/outflow of different buildings. Zheng et al. [23] converted the road network to a weighted graph and leveraged graph neural networks with attention mechanisms for traffic flow prediction. Likewise, Shi et al. [16] proposed a graph neural network with a novel attention mechanism that considers both long-term and short-term periodical dependencies. Pan et al. [14] proposed a framework based on graph neural networks, which is trained based on meta learning to predict the traffic flow for multiple locations at the same time. Zhang et al. [21] combined the external factors such as weather conditions to better predict the traffic flow. Different from these prior studies, we propose a novel graph embedding approach that fuses the different transportation platforms to further enhance the prediction accuracy. We have designed a novel mobility data fusion approach and validated the performance with real-world transportation platform data.

CORE MODEL OVERVIEW
We present the overall workflow of our proposed framework in Fig. 1, which consists of two main stages as follows: (1) Data Preprocessing and Feature Extraction: In the preprocessing stage, we first perform spatial discretization. Specifically, we use the same taxi regions specified by the NYC open data program [4], which are visualized in [3] to divide the target city into multiple regions. Moreover, each region is a polygon with its coordinates specified on the city map. Then, a unique number is assigned to each region, which is used to specify the pickup and drop-off location of the trips. Next, we perform temporal discretization by dividing each day into equal time intervals. Afterward, we convert the traffic data into multiple directed weighted graphs represented by adjacency matrices, in which the nodes represent the taxi regions and the edges are the traffic inflow/outflow between different regions. Finally, for each node, we calculate the sum of the traffic inflow and outflow from other regions and consider them as the node features.
(2) Spatial and Temporal Learning: After the preprocessing and feature extraction stage, we feed the extracted node features and graph adjacency matrices to the spatial embedding module that converts them into spatial embeddings. Then, the output of the spatial embedding module is further processed by the temporal embedding module to produce the final spatial and temporal embedding of the input graphs, which is used to predict the traffic inflow/outflow for the future time interval.

DATASETS & PROBLEM DEFINITION 4.1 Overview of Datasets
Our datasets used in this paper are presented as follows.
• Yellow Taxi Trip Data: We collected the yellow taxi trip data from NYC's open data program [4] from 2021/01/01 to 2021/01/31 time period, which includes 1,369,765 taxi trips with the pickup and drop-off locations in a total of 265 taxi regions [3].
•Lyft Trip Data: Similarly, we collected the Lyft trip data [5] from the the time period of 2021/01/01 to 2021/01/31, which includes 3,094,325 Lyft trips with the pickup and drop-off locations in the same taxi regions [3].

Model Design Motivations
To support our motivations, we illustrate the pickup and dropoff data of different transportation platforms (i.e., Taxi [4], Citi Bike [2], Uber, and Lyft [5]) for a week in January 2021, which are accumulated for each day in Fig. 2. From the figures, we can observe that different transportation platforms have similar and correlated pickup ( Fig. 2(a)) and drop-off ( Fig. 2(b)) trends. Therefore, we are motivated to combine different traffic flow data from various transportation platforms to improve our model's prediction accuracy.

Problem Formulation
As stated earlier, we formulate the traffic flow data as graphs to further use for future inflow/outflow predictions. Moreover, we consider each taxi region shown in [3] as a node and calculate the number of the taxi/Lyft trips between them as the weight of their edges and form the adjacency matrices. We denote the adjacency matrices created for the taxi trips on the -th day and the -th time interval by G Taxi , ∈ R × , where is the number of the taxi regions (265 in this study). Similarly, we denote the adjacency matrices based on the Lyft trips for the -th day and the -th time interval by G Lyft , ∈ R × . Taking the taxi trips as an example, given the adjacency matrices of the -th time interval in the -th day, we calculate the sum of the inflow and outflow trips to each node (i.e., region) and consider them as two node features. We denote the node features extracted from the taxi trips at -th time interval in the -th day by N Taxi , ∈ R 2× . Similarly, we denote the node features of the Lyft trips at the -th time interval in the -th day by N Lyft , ∈ R 2× , which are similarly calculated as mentioned above.
Given the historical adjacency matrices and node features of the taxi trip data for the time intervals prior to target time interval of the -th day, {G Taxi  , . We note that since our target is to predict for a future -th time interval of the -th day, it would be impractical to assume the availability of the Lyft trip data for the exact same -th time interval in the -th day. Therefore, we consider the Lyft trip data of the same time period of a day before the target date, ( − 1), as we observed that two consecutive days may exhibit correlations regarding their traffic inflow/outflow patterns (Fig. 2).
We present the overall architecture of STC-GEF in Fig. 3. In particular, it first inputs the historical adjacency matrices and node features of the taxi trip data from the time interval ( − ) to ( − 1) of the -th day to the graph convolutional network (GCN) to produce the spatial node embeddings, {N Taxi , − , . . . ,N Taxi , −1 }. Similarly, the historical adjacency matrices and node features of the Lyft trip data in the -th time interval of the ( − 1)-th day are converted to spatial embeddings,N Lyft −1, . Next, the output spatial embedding is concatenated together and passed through the temporal embedding module to produce the spatial and temporal embeddings, which are finally processed by fully connected layers to generate the final traffic inflow/outflow prediction, N Taxi , , for the -th time interval of the -th day.

Spatial and Temporal Embedding Modules
The role of this module is to process the traffic flow graph adjacency matrices and node features and produce spatial embeddings. Specifically, given adjacency matrix G mode , , and node features N mode , , mode ∈ {Taxi, Lyft}, we process them by graph convolutional network (GCN), followed by a Dropout layer [10] for regularization and a fully connected layer (FC) to get the spatial node embeddingŝ N mode , ∈ R 2× , i.e., The role of this module is to process the output of the spatial embedding module to produce spatial and temporal embeddings. In particular, given spatial taxi node embeddings in time interval − to − 1, {N Taxi , − , . . . ,N Taxi , −1 } of the -th day and the spatial Lyft node embeddings in -th time interval of the ( −1)-th day, denoted asN Lyft −1, , we process them by an long short-term memory (LSTM) layer followed by three fully connected (FC) layers to produce the final traffic inflow/outflow prediction for, i.e.,

EXPERIMENTAL STUDIES 5.1 Experimental Settings
• Baselines: In this prototype study, we compare our proposed method with the following deep learning-based baselines: (1) GCN: We consider a model based on graph convolutional neural networks (GCN) as a baseline, which accepts the same input as our proposed framework.
(2) -(4) LSTM, GRU, and RNN: We implement neural networks based on recurrent long short-term memory (LSTM), gated recurrent unit (GRU) and simple recurrent neural network (RNN) modules to compare with our framework, which consists of one recurrent layer followed by fully connected (FC) layers. We input the node features to these baselines to predict the inflow/outflow of the target time interval . (5) GAT: We implement a neural network based on graph convolutional layers with attention mechanism [19] to generate the graph embeddings, which is followed by fully connected layers to generate the final inflow/outflow of the target time interval . (6) CGCN: We implement a network based on Chebyshev convolutional layer [8] to produce the graph embeddings, which is similarly followed by fully connected layers to generate the final output.
• Parameter Settings: We set = 8 and divide each day into 8 equal 3-hour time intervals. Also, we set = 3 and predict the inflow/outflow of each region for the time interval using the historical data of the last three time intervals. We use 70% of our dataset for training and the rest for evaluation. Also, we use the Adam optimizer [10] with a learning rate of 0.001 to train our framework and the baselines. Moreover, we use 32 and 16 neurons for the GCN and the fully connected layers of the graph embedding module. Additionally, we use an LSTM layer with 32 neurons for the temporal embedding module with a linear activation function. Furthermore, all our STC-GEF and the baselines all consist of three fully connected layers consisting of 32, 128, and 2 × 265 neurons to generate the output with the appropriate shape. For baselines (2)-(4), we use 32 neurons for the recurrent components. Finally, for baselines (5) and (6), we use 32 neurons for the graph neural layers to generate the node embeddings.
• Performance Metrics: We use the mean absolute error (MAE) and mean squared error (MSE) as metrics to measure the difference between the predictions and ground-truths of traffic inflows and outflows.

Experimental Results
We present our experimental results as follows.
• Overall Performance: We feed the historical taxi and Lyft trip data to our STC-GEF and the baselines for performance evaluation and present the overall results in Fig. 4. We can observe that our STC-GEF outperforms the other baselines in terms of MSE and MAE errors. Furthermore, the figure implies that models based on graph neural networks perform better than the methods based on recurrent neural networks. However, the combination of both graph and recurrent neural layers is required for more effective traffic flow prediction.
• Ablation Studies: To show the importance and role of each component in our framework, we perform ablation studies on different variations of our framework. In particular, we consider the following variations: (1) the complete model, (2) without the graph embedding module, (3) without the temporal embedding module, and (4) without fusing other transportation platform data (Lyft trip data in our studies). We illustrate the results in Fig. 6, from which we can see that the highest performance drop is caused by removing the temporal embedding module (variation 3). Furthermore, we can observe that removing the spatial embedding module (variation 2) also reduced the model's performance, thus showing the effectiveness of this module. Finally, we can see that by removing the Lyft trip data, the model's error is increased, which implies that the fusion of different transportation data is necessary for higher traffic flow prediction accuracy. • Visualization: We illustrate the predictions of our model compared to the ground truth traffic inflow values for the test data in Fig. 5, in which the warm colors indicate a high inflow/outflow rate between the corresponding regions while cooler colors represent otherwise. We can observe that our model's prediction is significantly close to the ground truth values. Additionally, by calculating the difference between the ground truth and the predicted values, we realized only 5% of the regions had an error higher than the average error reported in Table. 4, which further shows the effectiveness of our model.

CONCLUSION
We have proposed STC-GEF, a novel traffic prediction architecture based on graph convolutional and recurrent neural networks that extracts spatial and temporal information from the traffic flow data across different transportation platforms. We have designed a novel spatio-temporal graph embedding approach to fuse the traffic flow data from taxis and ride-sharing platforms. We have performed experimental studies to show the effectiveness of STC-GEF, and our results have demonstrated that our model has outperformed the baseline models in traffic flow prediction. In our future work, we will further conduct extensive data analytics for more comprehensive model studies, including comparison with more state-of-the-art approaches.

ACKNOWLEDGMENT
This project is supported, in part, by the 2021 Google Research Scholar Program Award and the 2021 NVIDIA Applied Research Accelerator Program Award.