Next Article in Journal
A Lightweight Anomaly Detection System for Black Hole Attack
Next Article in Special Issue
Improved Design and Application of Security Federation Algorithm
Previous Article in Journal
Task Assignment for UAV Swarm Saturation Attack: A Deep Reinforcement Learning Approach
Previous Article in Special Issue
Efficient Reachability Ratio Computation for 2-Hop Labeling Scheme
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Spatio-Temporal Heterogeneous Graph Neural Networks for Estimating Time of Travel

1
School of Information Science and Engineeing, Yanshan University, Qinhuangdao 054000, China
2
School of Economics and Law, Shijiazhuang Tiedao University, Shijiazhuang 050043, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(6), 1293; https://doi.org/10.3390/electronics12061293
Submission received: 2 February 2023 / Revised: 4 March 2023 / Accepted: 5 March 2023 / Published: 8 March 2023
(This article belongs to the Special Issue Intelligent Analysis and Security Calculation of Multisource Data)

Abstract

:
Estimating Time of Travel (ETT) is a crucial element of intelligent transportation systems. In most previous studies, time of travel is estimated by identifying the spatio-temporal features of road segments or intersections independently. However, due to continuous changes in road segments and intersections in a path, dynamic features should be coupled and interactive. Therefore, employing only road segment or intersection features is inadequate for improving the accuracy of ETT. To address this issue, we proposed a novel deep learning framework for ETT based on a spatio-temporal heterogeneous graph neural network (STHGNN). Specifically, a heterogeneous traffic graph was first created based on intersections and road segments, which implies an adjacency correlation. Next, a learning approach for spatio-temporal heterogeneous convolutional attention networks was proposed to obtain the spatio-temporal correlations of joint intersections and road segments. This approach integrates temporal and spatial features. Finally, a fusion prediction approach was employed to estimate the travel time of a given path. Experiments were conducted on real-world path datasets to evaluate our proposed model. The results showed that STHGNN significantly outperformed the baselines.

1. Introduction

With the process of modernization and urbanization, increasingly powerful sensors and application terminals are used to collect travel path data. This trend is conducive to fully exploiting these data for real-time monitoring and prediction of traffic dynamics in urban areas, thereby promoting the construction of smart cities. Estimating Time of Travel (ETT) is a core function of intelligent transportation systems that estimate the time interval for a certain vehicle from a starting point to an endpoint. Accurate ETT benefits route planning, vehicle navigation, etc. [1,2].
A user’s travel path is a sequence of road segments and intersections that appear alternately. Therefore, the features of road segments and intersections are very important in ETT. Specifically, at least 10% of users’ travel time is delayed by stopping at intersections temporarily due to traffic control and congestion [3]. Additionally, the average speeds of vehicles on road segments have a more direct impact on ETT. However, most previous studies utilize the features of road segments or intersections separately to estimate travel time [4,5,6,7]. If the features of the two are integrated, the accuracy of ETT can be improved.
However, it is challenging to model road segments and intersections together. The reasons are as follows: First, intersections and road segments have their own static attributes, such as road segment distances, traffic lights of intersections, and types of intersections. These could affect traffic conditions on road networks and impact travel time. Second, road segments and intersections appear alternately on road networks and have mutual influences on traffic conditions. These mutual influences show non-linear dependence. If congestion occurs at a certain intersection (or road segment), the traffic condition of road segments (or intersections) adjacent to the intersection (or road segment) will be affected due to spatial extensibility and temporal continuity of the congestion.
In this paper, we introduced a heterogeneous network to jointly model intersections and road sections and proposed a novel deep learning framework, STHGNN, based on heterogeneous networks. The general process is as follows: First, we constructed a heterogeneous traffic network containing two kinds of nodes (intersections and road segments) and two relationships (i.e., <intersection, road segment>, <road segment, intersection>). Then, we integrated the attributes of adjacent intersections and road segments and completed the initialization and mutual augmentation of the attributes of intersections and road segments. Next, we constructed a spatio-temporal feature learning block (STFL block) composed of a two-layer temporal gated convolutional neural network and a heterogeneous graph attention network to obtain the latent representations of intersections and road segments. Lastly, we estimated the travel time from a given starting point to an endpoint through the two-layer fully connected neural network.
Our main contributions are summarized as follows:
(1)
We utilized a heterogeneous information network to model intersections and road segments simultaneously and fused the spatio-temporal features of intersections and road segments to obtain the latent correlation of interactions.
(2)
We proposed the STHGNN framework based on deep learning and extracted spatial and temporal features to estimate travel time.
The rest of this paper is organized as follows: The related work is introduced in Section 2. The definitions are given in Section 3. The details of STHGNN that we proposed are described in Section 4. The experiments designed to evaluate our model and the parameters we applied are described in Section 5. Finally, a conclusion is made in Section 6.

2. Related Work

ETT plays an important role in intelligent transportation systems. Traditional solutions for ETT mainly fall into two categories. One is the route-based approach, which is used to estimate travel time by considering road segments and intersections in the path route. SMA modeled the correlation of different road segments based on historical patterns [8]. Wang et al. aggregated the roads adjacent to the starting points and endpoints to estimate the travel time of the entire route [2]. Zheng Wang presented ETT as a regression issue and proposed a wide-deep-recurrent (WDR) architecture [9], where the recurrent module was specially designed to handle time sequences. The other solution is the statistical learning approach, which is used to improve estimation accuracy in a data-driven manner. B. Gupta proposed a gradient-boosting tree regression approach for improving the accuracy of ETT on a road [10]. D. Wang proposed an integrative learning approach for predicting the travel time of a taxi using multiple variants of gradient-boosted models [11]. However, these approaches cannot effectively capture the dynamic spatio-temporal correlations of the traffic on a given path. As a result, prediction accuracy is limited.
In recent years, approaches based on deep learning have become increasingly important for ETT. Classical approaches based on deep learning mainly employ variations of classical deep learning models, such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs). Z. Wang proposed an efficient deep learning framework to capture the spatio-temporal dependence on a given path [9]. H. Zhang modeled a road network as a grid graph [12] and designed a deep learning framework to obtain spatial and temporal patterns from the grid graph for ETT. T.-y. Fu proposed a novel deep framework to efficiently integrate multiple information elements for ETT [13]. Although these classical deep learning approaches effectively capture the spatio-temporal correlation, they ignore the spatial structure of real-world road networks.
Graph neural networks (GNNs) can extract important information from graphs and make useful predictions to effectively address representation learning from non-Euclidean data. In the past two years, GNNs have drawn significant attention to ETT, and a large amount of related work has been carried out. Some researchers attempted to model the spatial and temporal dependence of road traffic using spatio-temporal graph convolutions. In DCRNN [14], traffic flow was regarded as a diffusion process on a directed graph, and diffusion convolutions were introduced to capture spatial dependencies. In addition, a sequence-to-sequence architecture with a gated recurrent unit (GRU) was used to capture temporal dependence. Yu et al. proposed an end-to-end STGNN framework to capture spatial and temporal correlations using GNNs and 1D convolutional neural networks, respectively [15]. Guo et al. proposed an attention-based STGNN framework to capture superior long-distance temporal correlations [16]. However, these studies only considered the spatio-temporal attributes of road segments, ignoring the interactive relationship between intersections and road segments. Different from these studies, our study proposed a new deep learning model based on a heterogeneous traffic network, jointly modeling intersections and road segments for fusion learning.

3. Related Definitions

Definition 1. 
Heterogeneous traffic network. The heterogeneous traffic network is a traffic network that is modeled as the heterogeneous graph G = (V, E,  X ), where  V = { v | v S I   o r   v S S }  is the set of nodes, in which SI is the set of intersections, and SS is the set of road segments.  E = e i j | e i j = v i , v j v i , v j V   a n d   ( v i S I   a n d   v j S S   o r   v i S S   a n d   v j S I )  is the set of edges, where the edge  v i , v j  indicates whether intersections and road segments are connected, and vi and vj are different types of nodes.  X = { x i R | V | × n } i = 1 | V |  is the feature matrix of nodes, where xi represents the n-dimensional static and dynamic features of nodes.
The heterogeneous traffic network in Definition 1 contains two kinds of nodes, i.e., intersections and road segments, and two kinds of edges, i.e., relationships, i.e., R = {<intersection, road segment>, <road segment, intersection>}. Node features can be classified into static features and dynamic features. The static features of intersections reflect intersection type, traffic light type, and quantity of traffic lights. The dynamic features mainly involve average transit time. The static features of road segments reflect indicators such as the length of road segments and the number of lanes. The dynamic features mainly involve time-related traffic flow and average speed. A schema of a simple heterogeneous traffic network is shown in Figure 1.
To better capture the latent relationship between nodes of the same type in the heterogeneous traffic network, the road network meta path is defined as follows:
Definition 2. 
Meta path of a road network. Given the heterogeneous traffic network G and the edge relationship R = {<intersection, segment>, <segment, intersection>}, the meta path Φ of the road network is defined as  v 1 r v 2  (abbreviated as v1rv2), where v V and r R.
Figure 1b shows two examples of meta paths of a road network: ISI (intersection-segment-intersection) and SIS (segment-intersection-segment).
Definition 3. 
nth-order neighbors based on meta paths. For a node v in a heterogeneous traffic network, its nth-order neighbors  N i n  are defined as the set of nodes connected to node i through meta path Φ with n-hop of the road network. Figure 1d,e respectively show the 1-order neighbor of I1, which is  N i 1 = I 1 , I 2 , and the 2-order neighbor of I1, which is  N i 2 = I 1 , I 3   a n d   I 4 . It should be noted that the nth-order neighbors of a meta path of a road network include that meta path.
The historical paths of vehicles provide dynamic features of intersections and road segments on road networks, such as average travel time on intersections and road segments, and average speeds on road segments. The vehicle paths are formalized as follows:
Definition 4. 
Vehicle path. A vehicle path is a series of continuous nodes consisting of intersections and road segments that appear alternately. T = {S1, I1, S2, I2…Si, Ij}, where  S i S S I j S I .
Problem Formulation: Given a query Q = O q , D q , T q , our target is to develop a function F that predicts the travel time t Θ from the starting point O q to the endpoint D q based on the heterogeneous traffic network G at time T q .
The formulation is defined as follows:
t Θ F O q , D q , T q , G
For convenience, we list the interpretations of primary symbols throughout the paper in Table 1.

4. Methods

To jointly model intersections and road segments, a deep learning framework based on heterogeneous information networks, i.e., STHGNN, is proposed in this section. The framework consists of three main layers: a feature augmentation layer, a spatio-temporal feature learning layer, and a travel time estimation layer. The design of the model is shown in Figure 2.
  • Feature augmentation layer: In the heterogeneous traffic network, intersections and road segments appear alternately, and their attributes will inevitably affect the traffic conditions of adjacent road segments or intersections. Therefore, in this layer, we integrated the attributes of intersections and road segments and mapped them to a high-dimensional latent space to initialize feature representations of intersections and road segments, which laid a good foundation for the next layer to effectively learn more complex spatio-temporal heterogeneous features.
  • Spatio-temporal feature learning layer: To jointly learn the heterogeneous spatio-temporal features of intersections and road segments, an embedded learning layer based on temporal gated convolutions and heterogeneous graph attention networks was constructed. This layer consists of STFL blocks, as shown in Figure 3a. First, STFL blocks take advantage of temporal gated convolutions to learn the temporal features of different networks. Then, the heterogeneous graph attention convolution layer is used to fuse the features of a node and its neighbor nodes based on the meta path of the road network. Finally, a temporal gated convolution is used to augment the temporal features.
  • Travel time estimation layer: In this layer, the latent representations of the corresponding intersections and road segments are selected from the spatio-temporal feature learning layer according to the index of the starting point and the endpoint in the query. Then, the selected latent representations are fused and imported into the two-layer fully connected network with the vector representations of the starting point, the endpoint, and the query time.

4.1. Road Network Feature Augmentation Layer

The features of the intersections and road segments are mapped to the high-dimensional latent feature space, which is used to initialize the feature representation and serve as the input for the next layer. Intersections and road segments are mutually influenced. For this reason, when initializing the features of intersections and road segments, the features of the adjacent road segments and intersections can be identified in an integrated manner. To map the imported features to the high-dimensional latent space, each node goes through a shared linear transformation process with an activation function (e.g., tanh is used in this paper). This is a common feature augmentation approach [17,18], which can result in better representation ability by embedding representation. The specific approach is explained in terms of road segments and intersections separately as follows:
Given that a road segment is connected to two intersections, the features of the road segment and the two intersections are integrated. The initialized representation of a road segment is defined as:
X s t = t a n h ( W s [ v s t , d s , h I 1 t , p I 1 , h I 2 ( t ) , p I 2 ] )
where [] is a 6-dimensional vector, in which v s t is the average speed of the road segment at time t; ds is the distance of the road segment; h I 1 t and h I 2 ( t ) are, respectively, the average travel time of the two intersections connected to the road segment at time t; and p I 1 and p I 2 , respectively, indicate whether there is a red traffic light at the intersection: 0 means no, and 1 means yes. Ws is a learnable parameter that maps the features of the road segment to a high-dimensional latent space, and [ ] is a concatenation operator. The first two items in Equation (1) reflect the dynamic and static attributes of the road segment; the last four items are in pairs, representing the dynamic and static attributes of the intersections directly connected to the road segment.
Given that an intersection is connected to several road segments, the representation of the intersection can be initialized by integrating the features of the connected road segments. Therefore, the representation of an intersection is defined as:
X I t = t a n h ( W I [ [ s = 1 n v s t n , s = 1 n d s n ] , h I t , p I ] )
where v s t is the a v e r a g e   s p e e d of each road segment adjacent to the intersection at time t; ds is the length of the road segment; h I ( t )   i s   t h e   a v e r a g e   t r a v e l   t i m e   o f   t h e   i n t e r s e c t i o n   a t   t i m e   t ; pI indicates whether there are traffic lights at the intersection; W I is a learnable parameter that maps the features of the intersection to a high-dimensional latent space; and [ ] is a concatenation operator. The first two items in Equation (2) reflect the dynamic and static attributes of all the road segments connected to the intersection, and the last four items reflect the dynamic and static attributes of the intersection itself.
Finally, Equation (3) is used to fuse the representation of intersection X I t   a n d   r e p r e s e n t a t i o n   o f   r o a d   s e g m e n t   X s t . X t is used as the initial feature representation of the node and imported into the spatio-temporal feature learning layer.
X ( t ) = X I t X S t
In this way, each road segment not only explores its own attributes but also integrates the attributes of the adjacent intersections. Similarly, each intersection integrates the static and dynamic features of the adjacent road segments and its own static and dynamic features. These attributes and features are mapped to a high-dimensional latent feature space through feature augmentation.

4.2. Spatio-Temporal Feature Learning Layer

The spatio-temporal feature learning layer is the core layer of STHGNN. Its purpose is to obtain the latent representation of road segments and intersections for the next time interval on the basis of the previous M time steps. As shown in Figure 3a, this layer consists of a heterogeneous graph attention neural network and two temporal gated convolutional neural networks, which are used to process, respectively, the spatial features and temporal features from the neighbor nodes of a meta path on the road network.

4.2.1. Temporal Gated CNNs

Although RNN and LSTM models are widely used in time series analysis, they do not solve problems such as time-consuming iterations, complex gating mechanisms, and slow responses to dynamic changes. Compared with RNN and LSTM, CNN has the advantages of fast training speed, simple structure, and not being subject to the previous steps. Causal convolution is a deep learning network specially designed for time series prediction. It can simulate LSTM using CNN.
Therefore, in this paper, causal convolutions are used on the time axis to capture the temporal dynamic behavior of traffic flow. To adapt the dynamic temporal correlations, a gated mechanism is used to control the temporal information flow in convolutions, which is crucial in recurrent neural networks. Taking the first temporal gated convolution in Figure 3b as an example, (X(tq−M+1), X(tq−M+2), , and X(tq)) ∈ RM×|V|×n is used as the input and then the results of the two causal convolutions are fused together through the Hadamard products. One of the causal convolutions goes through the Sigmoid function, and the other uses the residual connection to reduce the vanishing gradient. Finally, the hidden state H1 ∈ R (M−LK+1) ×|V|×C1 is the output. The equation is:
H 1 = K X ( t ) σ K X ( t ) R M - L K + 1 × V × C o u t
where K is the convolution kernel with a size of [LK × 1 × Cin, C1], in which Cin and C1 represent the number of input channels and output channels of the causal convolutions, respectively. In this paper, Cin is assumed to be equal to C1. ⊙ represents the Hadamard product (element-wise product). The Sigmoid function σ(·) is used to control the proportion of information flowing to the next layer.
The second temporal gated convolution in Figure 3a is used to augment temporal features. Its structure is exactly the same as the first one, except that the size of its convolution kernel is [(M − LK + 1)) × 1 × C3, C3], and the output is X(tq)′ ∈ R|V| × C3, where X(tq)′ is the final representation of all intersections and road segments at time tq.

4.2.2. Spatial Feature Learning Based on Heterogeneous Graph Attention Mechanism

The travel time of a road segment is affected not only by the adjacent intersections but also by the upstream road segments. The intersections also have problems. Therefore, it is necessary to learn the spatial information between nodes using heterogeneous information networks and meta paths. The heterogeneous graph attention mechanism has proved to be an effective approach for obtaining spatial features in heterogeneous information networks [19,20]. Therefore, in this paper, a heterogeneous graph attention mechanism is used to identify the spatial features of road segments and intersections.
The basic idea of identifying the latent spatial features of intersections and road segments in the heterogeneous graph attention mechanism is as follows: First, the importance between node pairs is identified through the meta path of a road network. Then, the attention coefficient is identified through the softmax function. Finally, the feature representation of the node is obtained by making a weighted summation of the attention coefficient with the features of the neighbors around the node.
Specifically, in a heterogeneous traffic network, e i j n is used to express the importance of the intersection or road segment X i t and nth-order neighbor X j t that are connected by meta path Φ, which is computed as:
e i j n = a f n n X i t , X j t
where afnn represents a feedforward neural network.
Then, the node features of the network are embedded into the model through the self-attention mechanism, i.e., only the e i n of j N i n is calculated, where N i n is the set of all nth-order neighbor nodes of node i based on the meta path Φ. Next, the importance obtained above are normalized, and the attention coefficient a i j n is learned through the softmax function. The equation is as follows:
a i j n = s o f t m a x e i j n = e x p ( σ ( a Φ t · [ X i | | X j ] ) ) k N i n Φ e x p ( σ ( a Φ t · [ X i | | X k ] ) )
where σ represents the activation function, || represents the connection operation, and a Φ t is the attention vector of the meta path Φ. It can be concluded from the above equation that the attention coefficient of (i, j) depends on their latent features. The attention weight coefficients of a i j n are asymmetrical, which means that they contribute differently to one another because the concatenate order is in the numerator and because they have different neighbors.
Finally, the feature representation of the node is obtained by making a weighted summation of the attention coefficient obtained above with the features of the neighbors around the node and by going through the activation function. The equation is as follows:
z i Φ = σ ( j ϵ N i n a i j n · X j )
where z i Φ is the learning representation of meta path Φ-based node i.
Given that a heterogeneous graph possesses the properties of a scale-free network, the variance of the graph data is quite high. To solve the above problems, multi-head attention is applied to make the training process more stable. Specifically, the above process is repeated K times, and finally, the feature representation of node i is obtained:
z i Φ = | | K k = 1 σ ( j ϵ N i n a i j n · X j )
To identify the influence of the latent features of neighbor nodes, the influence of third-order neighbors based on the meta path of the road network on nodes is studied. That means the output H1 of the temporal gated convolution in the previous layer is used as the input. After three rounds of heterogeneous graph attention convolutions, the final feature dimension of each node becomes C2, and H 4 R M - L K - 1 × V × C 2 is exported.

4.3. Travel Time Estimation Layer

A two-layer fully connected network with the size of [λ, 1] is used to estimate the travel time. The latent representations of the corresponding intersections and road segments are selected from the spatio-temporal feature learning layer according to the index of the starting point and the endpoint in the query. Then, the selected latent representations are imported to the fully connected network to estimate the travel time t Θ .
  • Loss function:
MAPE is used as the loss function, which is defined as follows:
L o s s t Θ ; G = t Θ - t Θ ^ t Θ ^
where t Θ is the estimated travel time, and t Θ ^ is the real travel time.

5. Experiment Settings and Results Analysis

5.1. Experiment

We used a real taxi trajectory collected from Shenzhen and released in GISCUP 2021 [21]. The data from 1 August to 31 August was used as the training dataset, and the data on 1 September was used as the testing data. Table 2 lists the statistics of the dataset.
Evaluation Metric. Mean Absolute Percentage Error (MAPE) computes the percentage between predicted values and ground truth: M A P E = 1 | D | i = 1 | D | t i - t i ^ t i . MAPE is one of the most popular metrics for ETT tasks. Mean Average Error (MAE) calculates the absolute residual for each data point:  M A E = 1 | D | i = 1 | D | | t i - t i ^ | . A smaller MAE indicates good prediction. Root Mean Squared Error (RMSE) describes the spread of residuals: R M S E = 1 | D | i = 1 | D | | t i - t i ^ | 2 . Baselines: We compared the performance with the following baselines.
  • AVG: This is a classic method that has been deployed in multiple map services. The average speed of each link in a given city during a specific time interval is calculated. The travel time of a given path can be estimated using the historical average speed and a given departure time.
  • DeepTTE [11]: This is a hybrid end-to-end deep learning model that adopts a Geo-Conv layer to capture spatial dependencies and a GRU layer to capture temporal dependencies. DeepTTE learns the spatio-temporal correlations based on the consecutive sampling points along the query path.
  • DCRNN [14]: This is a spatio-temporal graph-based deep framework. This model exploits diffusion graph convolution to capture spatial dependencies and then uses the recurrent neural networks to model temporal dependencies. We leverage its core architecture for travel time estimation in our experiments.
In the preprocessing stage, the trajectories that were extremely long and extremely short were removed from the trajectory set. We used the trajectory duration as the pruning metric. If a trajectory duration was less than 3 min, the trajectory was considered too short to be meaningful. As we know, a passenger can cancel a taxi reservation in 3 min. On the other hand, we also deleted the trajectories with durations of more than 30 min. After the data preprocessing, 94% of the dataset remained.
For our model, the sizes of embedded dimensions for intersections and road segments were set as 20. The number of spatio-temporal learning cells was set at three by default. The size LK of the causal convolution kernels in the gated CNN was set to two, with the output channels C1 = 8 and C3 = 11. We set a time slice of 5 min so that days are divided into 288 data points. We used the historical information on intersection and road segments at the first 12 time steps with slots of 5 min for temporal learning. We adopted two layered, fully-connected networks with hidden units that were both set as 60. Additionally, the learning rate was set to 0.001, the batch size was set to 100, and Adam was employed to optimize the parameters.

5.2. Experimental Evaluation

Table 3 shows the experimental results of our model and three baselines. The lower these metrics, the better the performance. The parameters of other baseline algorithms followed the best settings in their proposed papers.
From the experimental results, we have the following observations. STHGNN shows the best prediction performance under all settings. Comparing the other three methods with our STHGNN, the neural network-based methods DeepTTE and DCRNN have better prediction precision than AVG. Our proposed STHGNN shows the best performance.
For instance, MAPE errors of DeepTTE, DCRNN, and STHGNN were approximately 10.4%, 19%, and 22.1% lower than AVG. This is mainly because AVG is a classic method that has difficulty handling complex time series data. Meanwhile, the spatial correlation hidden in the trajectories cannot be exploited, nor can the spatio-temporal features. Comparing the other three methods, DeepTTE, DCRNN, and STHGNN all use LSTM or GRU to identify the temporal features. For the spatial aspect, DeepTTE uses a Geo-Conv layer to identify the spatial features, while DCRNN and STHGNN both use graph structures to capture the spatial features. There, the MAPE of DCRNN and STHGNN is slightly lower. After all, taxis run on the road network. The graph model shows the benefit of spatial correlation learning.
For the graph-based methods, STHGNN models road sections and intersections as nodes on the same graph and learns the spatial features of road sections and intersections at the same time. It uses the neighbor based on the meta path to fully mine more spatial information. Thus, the MAPE of STHGNN is lower than DCRNN.

5.3. Ablation Study

In order to verify the effectiveness of our proposed heterogeneous information network, we conducted an ablation study, including (1) w/o intersections, which only adopts the spatio-temporal features from the road segments; (2) w/o road segments, which only adopts the spatio-temporal features from the intersections; and (3) w/o a feature augmentation layer, which adopts the spatio-temporal features from the intersections and road segments but does not augment and fuse.
Table 4 shows the performance of STHGNN against its ablations on the ETT task. From Table 4, we find that the performance of w/o feature augmentation is worse than STHGNN. For example, its performance degrades by 3.13%, 4.87%, and 4.72% in terms of RMSE, MAE, and MAPE when applied to the Shenzhen dataset compared with our model. This is because STHGNN integrated the attributes of intersections and road segments and mapped them to a high-dimensional latent space to initialize feature representations of intersections and road segments.
The results are shown in Table 4, from which we find that obvious declines occur in estimation performance when removing the road segments or intersections. This is because the road segments and intersections all play a central role in affecting traffic. Based on the above ablation study, we conclude that the heterogeneous traffic network and feature augmentation layer we proposed can effectively improve the accuracy of estimating the time of travel.

6. Conclusions

In order to integrate the road segments and intersections, we proposed a novel spatio-temporal heterogeneous graph neural network framework called STHGNN for estimating travel time in this paper. STHGNN combines gated convolution neural networks and graph neural networks to capture the correlations in spatio-temporal information. To evaluate the effectiveness of our model, we conduct experiments on a real-world dataset, and the experimental results show that STHGNN can achieve a higher degree of accuracy in estimating travel time. However, there are still some limitations that can be addressed in the future. First, we did not consider certain external data, such as weather conditions and special events, which could have a significant impact on traffic states. Second, we may have obtained less heterogeneous information due to limited data resources. In the future, we will consider more external factors that have a significant impact on travel time and attempt to apply more heterogeneous information about the road network.

Author Contributions

Methodology, L.W.; Formal analysis, L.W.; Investigation, L.W. and Y.Z.; Writing—original draft, L.W.; Writing—review & editing, L.W., Y.T. and P.Z.; Supervision, Y.T.; Funding acquisition, Y.T. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Hebei Provincial Department of Education (ZD2018040, 2018GJJG240), the National Natural Science Foundation of China(F2021210005).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Grotenhuis, J.W.; Wiegmans, B.W.; Rietveld, P. The desired quality of integrated multimodal travel information in public transport: Customer needs for time and effort savings. Transport Policy 2007, 14, 27–38. [Google Scholar] [CrossRef]
  2. Yuan, N.J.; Zheng, Y.; Zhang, L.; Xie, X. T-finder: A recommender system for finding passengers and vacant taxis. IEEE Trans. Knowl. Data Eng. 2012, 25, 2390–2403. [Google Scholar] [CrossRef]
  3. Tirachini, A. Estimation of travel time and the benefits of up-grading the fare payment technology in urban bus services. Transp. Res. Part C Emerg. Technol. 2013, 30, 239–256. [Google Scholar] [CrossRef]
  4. Wang, H.; Tang, X.; Kuo, Y.H.; Kifer, D.; Li, Z. A simple baseline for travel time estimation using large-scale trip data. ACM TIST 2019, 10, 1–22. [Google Scholar] [CrossRef] [Green Version]
  5. Wang, M.X.; Lee, W.C.; Fu, T.Y.; Yu, G. Learning embeddings of intersections on road networks. In Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Chicago, IL, USA, 5–8 November 2019; pp. 309–318. [Google Scholar]
  6. Chen, W.; Chen, L.; Xie, Y.; Cao, W.; Gao, Y.; Feng, X. Multirange attentive bicomponent graph convolutional network for traffic forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 3529–3536. [Google Scholar]
  7. Wu, C.-H.; Ho, J.-M.; Lee, D. Travel-time prediction with support vector regression. IEEE Trans. Intell. Transp. Syst. 2004, 5, 276–281. [Google Scholar] [CrossRef] [Green Version]
  8. Jenelius, E.; Koutsopoulos, H.N. Travel time estimation for urban road networks using low frequency probe vehicle data. Transp. Res. Part B Methodol. 2013, 53, 64–81. [Google Scholar] [CrossRef] [Green Version]
  9. Wang, Z.; Fu, K.; Ye, J. Learning to estimate the travel time. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, ACM, London, UK, 19–23 August 2018; pp. 858–866. [Google Scholar]
  10. Gupta, B.; Awasthi, S.; Gupta, R.; Ram, L.; Kumar, P.; Prasad, B.R.; Agarwal, S. Taxi travel time prediction using ensemble-based random forest and gradient boosting model. In Advances in Big Data and Cloud Computing; Springer: Berlin/Heidelberg, Germany, 2018; pp. 63–78. [Google Scholar]
  11. Wang, D.; Zhang, J.; Cao, W.; Li, J.; Zheng, Y. When will you arrive? In estimating travel time based on deep neural networks. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; pp. 2500–2507. [Google Scholar]
  12. Zhang, H.; Wu, H.; Sun, W.; Zheng, B. Deeptravel: A neural network based travel time estimation model with auxiliary supervision. arXiv 2018, arXiv:1802.02147. [Google Scholar]
  13. Fu, T.Y.; Lee, W.C. Deepist: Deep image-based spatio-temporal network for travel time estimation. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 69–78. [Google Scholar]
  14. Li, Y.; Yu, R.; Shahabi, C.; Liu, Y. Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. In Proceedings of the International Conference on Learning Representations (ICLR’18), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
  15. Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; Yu, P.S. A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst. 2020, 32, 4–24. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  16. Zhang, J.; Shi, X.; Xie, J.; Ma, H.; King, I.; Yeung, D.Y. Gaan:Gated attention networks for learning on large and spatio-temporal graphs. arXiv 2018, arXiv:1803.07294. [Google Scholar]
  17. Velickovic, P.; Cucurull, G.; Casanova, A.; Romero, A.; Lio, P. Graph attention networks. In Proceedings of the International Conference on Learning Representations (ICLR’18), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
  18. Jin, G.; Yan, H.; Li, F.; Huang, J.; Li, Y. Spatio-Temporal Dual Graph Neural Networks for T ravel Time Estimation. arXiv 2021, arXiv:2105.13591. [Google Scholar]
  19. Zhang, C.; Song, D.; Huang, C.; Swami, A.; Chawla, N.V. Heterogeneous Graph Neural Network. In Proceedings of the 25th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019. [Google Scholar]
  20. Wang, X.; Ji, H.; Shi, C.; Wang, B.; Ye, Y.; Cui, P.; Yu, P.S. Heterogeneous Graph Attention Network. In Proceedings of the International World Wide Web Conference (WWW’19), San Francisco, CA, USA, 13–17 May 2019. [Google Scholar]
  21. Available online: https://sigspatial2021.sigspatial.org/ (accessed on 11 November 2022).
Figure 1. An illustrative example of a heterogeneous traffic network.
Figure 1. An illustrative example of a heterogeneous traffic network.
Electronics 12 01293 g001
Figure 2. The overview of STHGNN.
Figure 2. The overview of STHGNN.
Electronics 12 01293 g002
Figure 3. Spatio-Temporal Heterogeneous Graph Learning Layer.
Figure 3. Spatio-Temporal Heterogeneous Graph Learning Layer.
Electronics 12 01293 g003
Table 1. Interpretation of symbols.
Table 1. Interpretation of symbols.
TermDescriptionTermDescription
G the heterogeneous traffic networkQa query
Vthe set of nodes t Θ the estimated travel time
Ethe set of edges X s t the initialized representation of a road segment at time t,
Xthe feature matrix of nodes X I t the initialized representation of an intersection at time t,
Rthe edge relationships X ( t ) the initial feature representation of the node at time t
Φthe meta pathHoutput the hidden state
N i n the nth-order neighbors of node i based on the meta path a f n n a feedforward neural network
Tthe vehicle path z i Φ the learning representation of meta path Φ-based node i
Table 2. The numerical statistics of real-world datasets.
Table 2. The numerical statistics of real-world datasets.
DatasetShenzhen
number of trajectories8,562,030
number of intersections356,208
number of road segments378,984
average travel time (s)236.54
average moving distance (m)1325.78
Table 3. Performance of STHGNN and baselines.
Table 3. Performance of STHGNN and baselines.
MethodRMSE (s)MAE (s)MAPE
AVG256.2152.670.163
DeepTTE232.7138.350.146
DCRNN208.1124.010.132
STHGNN201.3119.960.127
Table 4. Ablation results.
Table 4. Ablation results.
MethodRMSE (s)MAE (s)MAPE
w/o intersection218.7132.280.145
w/o road segments213.5129.390.138
w/o feature augmentation207.6125.810.133
STHGNN201.3119.960.127
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wu, L.; Tang, Y.; Zhang, P.; Zhou, Y. Spatio-Temporal Heterogeneous Graph Neural Networks for Estimating Time of Travel. Electronics 2023, 12, 1293. https://doi.org/10.3390/electronics12061293

AMA Style

Wu L, Tang Y, Zhang P, Zhou Y. Spatio-Temporal Heterogeneous Graph Neural Networks for Estimating Time of Travel. Electronics. 2023; 12(6):1293. https://doi.org/10.3390/electronics12061293

Chicago/Turabian Style

Wu, Lei, Yong Tang, Pei Zhang, and Ying Zhou. 2023. "Spatio-Temporal Heterogeneous Graph Neural Networks for Estimating Time of Travel" Electronics 12, no. 6: 1293. https://doi.org/10.3390/electronics12061293

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop