Map Enhanced Route Travel Time Prediction using Deep Neural Networks

by   Soumi Das, et al.

Travel time estimation is a fundamental problem in transportation science with extensive literature. The study of these techniques has intensified due to availability of many publicly available large trip datasets. Recently developed deep learning based models have improved the generality and performance and have focused on estimating times for individual sub-trajectories and aggregating them to predict the travel time of the entire trajectory. However, these techniques ignore the road network information. In this work, we propose and study techniques for incorporating road networks along with historical trips' data into travel time prediction. We incorporate both node embeddings as well as road distance into the existing model. Experiments on large real-world benchmark datasets suggest improved performance, especially when the train data is small. As expected, the proposed method performs better than the baseline when there is a larger difference between road distance and Vincenty distance between start and end points.



page 1

page 2

page 3

page 4


Neural Networks Model for Travel Time Prediction Based on ODTravel Time Matrix

Public transportation system commuters are often interested in getting a...

Spatial-Temporal Dual Graph Neural Networks for Travel Time Estimation

Travel time estimation is a basic but important part in intelligent tran...

Inference for travel time on transportation networks

Travel time is essential for making travel decisions in real-world trans...

Road Network and Travel Time Extraction from Multiple Look Angles with SpaceNet Data

Identification of road networks and optimal routes directly from remote ...

Detecting Braess Routes: an Algorithm Accounting for Queuing Delays With an Extended Graph

The Braess paradox is a counter-intuitive phenomenon whereby adding road...

Partitioned Graph Convolution Using Adversarial and Regression Networks for Road Travel Speed Prediction

Access to quality travel time information for roads in a road network ha...

Travel Time Estimation without Road Networks: An Urban Morphological Layout Representation Approach

Travel time estimation is a crucial task for not only personal travel sc...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1. Introduction

Travel time estimation (Mridha et al., 2017; Wang et al., 2018) is an important and core research problem in the area of intelligent transportation, with applications in route recommendation, planning and navigation (Mridha et al., 2017)

, congestion and anomaly detection

(yuan Chen et al., 2016), etc. Not surprisingly, the problem has been extensively studied for the past few decades (Dharia and Adeli, 2003; Mridha et al., 2017; Wang et al., 2018). While a detailed survey is provided in Section 2, a recent deep learning based approach, called “Geo-convolution” (Wang et al., 2018), has seen considerable success over its competitors. The key idea of geo-convolution is to extract representations from short segments of trajectories for prediction of their travel times and then stitch them together using multi-task learning. However, the above method does not take the road network into account. In this paper, we study the effectiveness of using the map information explicitly into the prediction process.

We propose to attribute each point in a trajectory to a node in the road network. We utilize two extra pieces of information from the road network: (1) embeddings of nodes using unsupervised network representation learning techniques e.g. Node2Vec (Grover and Leskovec, 2016), and (2) the network/map distance between source and destination points. While the node embeddings are used in the geo-convolution layer, map distance is used for the combined end to end prediction. We evaluate all combinations of proposed techniques on two real world benchmark datasets. We find the additional information indeed improves the overall accuracy of prediction, especially when the number of training trajectories is lower. Additionally, we find that proposed method performs better than the baseline technique in cases where there is a larger difference between actual distance and map distance, confirming the hypothesis that the road network indeed provides additional information for predicting travel times.

2. Related Work

Travel time prediction problem has been extensively studied for the past few decades (Dharia and Adeli, 2003; Mridha et al., 2017; Wang et al., 2018). While early papers on travel time prediction mostly use static data collection techniques, recent techniques have focused on large amounts of publicly collected GPS traces (Wang et al., 2018; Zhang et al., 2018), which have resulted in large training datasets for complex deep learning models. Recent success of Deep Learning in uncovering complex feature interaction patterns has led to its application in link travel time prediction as well. Siripanpornchana et al. (Siripanpornchana et al., 2016)

has used Deep Belief Network with a stack of Restricted Boltzmann Machine to learn the features in unsupervised fashion. Recurrent Neural Networks such as LSTMs are capable of capturing sequential patterns, and have also been adopted to select optimal features automatically

(Duan et al., 2016). Zhang et al. (Zhang et al., 2018) have learned spatio-temporal grid parameters using BiLSTMs and auxiliary supervision for penalizing the deviation from prediction of travel times at intermediate points. Wang et al. (Wang et al., 2018) have used geo-convolution layer which captures learned combinations of points in short segments, and a 2-layer stacked LSTM to capture spatial and temporal dependencies among the trajectories. The overall architecture is expected to capture both short term signals from different segments as well as a long term prediction.

3. Travel Time Prediction

In this section, we describe the problem of trip travel time prediction followed by a recent state-of-the-art baseline approach (Wang et al., 2018) for predicting trip travel times, without information of the road network. We then describe our proposed modifications (in Section 3.3) over the baseline approach which uses the information of the road network for predicting the travel times.

3.1. Problem Definition

Let be a given set of trips. A trip is represented by a sequence of unmapped locations , the identity of the driver assigned to the trip (), the day of the month and week in which the trip occurs (, ), starting time of the trip (), distance covered in the trip (), total time taken for the trip (), and s and s. Both and are provided by the difference between time and distance between current location and first location of the trip. Each location is in the form of , denoting its latitude and longitude. The attribute corresponds to the slot number which is obtained on dividing a day into 1440 timeslots.

Additionally, let denote the road network where is the set of all vertices (locations) in the graph. Hence, each element of the set , denoted by is in the form of , denoting latitude and longitude of the location . An edge set denoted as , represents the set of road links between locations. Given a road network and a set of unattributed/unmapped trips , we can attribute the locations in the trips to the locations (nodes) in the road network, hence obtaining an attributed/mapped set of trips . Hence, each trip is characterised by sequence of mapped nodes , along with , , , , , , and . The problem of trip travel time prediction thus stands as learning a function such that it takes a trip or and predicts the travel time : (unmapped) or (mapped). We have performed our experiments using the set of mapped trips in all the upcoming methodologies.

3.2. Node Geo-convolution model

We consider the baseline model described in (Wang et al., 2018) to set up the architecture. We term this architecture as L-GC. The authors have used three components in their model - Attribute, Spatio-Temporal, Multi-Task Learning. The Attribute component considers the basic information of the trips viz. driverID, timeID etc, the Spatio-Temporal component tries to learn the spatial and temporal dependencies from the trip nodes, and the Multi-Task learning component relies on the other two components to learn the travel times of a path and also its respective sub-paths.

The main architecture resides in the Spatio-Temporal component. This component is made up of two sub-parts, one being the geo-convolutional neural network which intends to capture the spatial correlation between successive nodes by forming feature maps from the nodes, and the other being the Recurrent Neural Network which captures the temporal correlation in the feature maps.

Each node in the trip sequence is non-linearly mapped into output sequence which represents the geographical features of the original node with being the corresponding weight matrix for non linear mapping.


The output sequence is convolved using a filter of kernel size with weight matrix . This step typically learns the spatial feature of the local path comprising of nodes.


The output of the convolutional layer is appended with the distance of the local path leading to a refined feature map

. This resultant map essentially retrieves the spatial dependencies of every local path. In order to capture temporal dependencies among the local paths, Recurrent Neural Networks are added to the output of the geo-convolution layer. Thus, it goes as one of the inputs to the Recurrent Neural Networks aided by the representation vector of the attributes (

attr) obtained from Attribute component. The Recurrent Neural Network is thus updated with as the hidden state in the following way:


This spatio-temporal sequence of local paths comprising of is converted to a scalar having used fully connected layers. The scalar gives the predicted travel time of local path . In order to predict the travel time of the entire path, the authors have used attention pooling mechanism over the sequence . Following this, the local path estimation loss () and entire path estimation loss () are linearly weighted to train the model.


3.3. Embedding enhanced Geo-convolution model

We develop some modifications over the existing baseline model (Wang et al., 2018) described in Section 3.2. Having used the second variant of trips described in Section 3.1, we learn the embeddings of the nodes of graph using the standard Node2Vec (Grover and Leskovec, 2016) framework. We use 128-dimensional Node2Vec embeddings for our experiments. The intuition behind using embeddings is that nodes and edges lying close to each other will get similar embedding patterns. This will aid in capturing the spatial dependencies among the roads in a trip. Each node is represented as a 128 dimensional embedded vector. Let denote the embeddings where each element is a feature representation of a node. Let denote the identities of nodes where each element ranges from and n denotes the total number of vertices in the graph G. We rewrite each node in the form where represents the embedding and represents the ID of node .

Our modifications lie in some proposed changes in the Spatio-Temporal component which stands as the main building block for the entire architecture. Having used the sequence of mapped nodes, we propose two modifications to the baseline model described in Section 3.2:

Emb-Geo-Conv (E-GC): In this method, we map the embedding (Emb) of every node of the trip sequence, denoted by into the output sequence . The convolution operation and update of recurrent layer follow the same procedure described in Section 3.2. Equation set  (5) represent the mapping, convolution operation and recurrent layer update respectively.


Emb-Node-Geo-Conv (EL-GC): We map the concatenation of embedding of , denoted by and the mapped node denoted by and into the output sequence . This is represented using Equation set  (6) which follow the convolution operation and recurrent layer update as described in Section 3.2


4. Experimental Results

In this section, we describe the empirical results comparing existing state-of-the-art (Wang et al., 2018) and map enhanced techniques described in this paper. We demonstrate our studies with the real world benchmark dataset from the city of Porto and Beijing. In Section 4.1, we describe the dataset pre-processing for extraction of trips, acquisition of map from OpenStreetMap and the map attribution of the unmapped points. In Section 4.2, we compare the baseline technique with new proposed techniques using the metric Mean Absolute Percentage Error(MAPE).

4.1. Dataset Creation

Porto GPS Taxi Dataset: We have used this publicly available dataset for our experiments. Each trip information in this dataset is represented by several attributes among which we used TAXI_ID, TIMESTAMP and POLYLINE to obtain the trip sequence format described in Section 3.1.
TAXI_ID gives the unique number for the taxi driver of that trip, TIMESTAMP denotes the trip’s start time and POLYLINE contains a list of GPS coordinates with each pair of coordinates defining 15 seconds of trip. This dataset consists of a total of 3,26,424 trips, out of which 79% was used for training, 9% was used for validation and the remaining was used as the test set.
Beijing Taxi Dataset: We have used the sample Beijing dataset provided by the authors in the baseline model (Wang et al., 2018). This has been laid out in the format described in Section 3.1. The sample dataset consists of a total of 15,772 trips, out of which 68% was used for training, 23% was used for validation and the rest was used as the test set.
OSM Dataset: Following standard practice in trip travel time prediction e.g. (Toole et al., 2015), we use OpenStreetMap (OSM) data for creating the road network. We use the OSMNX (Boeing, 2017) python package to create the road topology of Porto between longitude range : (-8.835479, -8.285479) and latitude range : (40.893646, 41.443646) and that of Beijing between longitude range : (103.47912, 104.507725) and latitude range : (30.292236, 30.957301). We thus obtain 454842 nodes and 864853 line-strings (connected nodes) from the Porto Map and 179469 nodes and 320649 line-strings from Beijing Map. The justification behind the choice of the above range has been explained later in this section.
Mapping Points: We use Locality Sensitive Hashing(LSH) (Indyk and Motwani, 1998) to map the unmapped location to the closest node in the road network represented by graph G. Owing to the large number of map nodes, we optimize the LSH mapping. We divide the entire area into a number of grids bounded by a max and min pair of (lat,lon). Each OSM node and Porto/Beijing trip data node is mapped into one of the grids. This eventually leads to querying in one of the grids while mapping any trip data node to OSM node, thus reducing the computation time. Figure 1 demonstrates the distribution of attribution/mapping error on both the datasets, which is measured by the vincenty distance (Vincenty, 1975) between each unmapped node in the trip data and its corresponding mapped node from OSM obtained using LSH. As seen from the figure, the attribution/mapping error does not cross 0.2 km (in case of Porto data) and 0.25 km (in case of Beijing data).

(a) Porto Data
(b) Beijing Data
Figure 1. Attribution error of trip nodes with frequency of errors on y-axis and error (in km) on x-axis.

Formation of trip data: The original Porto GPS Taxi Dataset encompasses an area between longitude range : (-9.385479, -6.724395) and latitude range : (38.693646, 42.069915). We have selected a region of a specific width (0.55 0.55) where maximum number of trips were covered thus taking the area between longitude range : (-8.835479, -8.285479) and latitude range : (40.893646, 41.443646). Having used TAXI_ID, TIMESTAMP and POLYLINE features from the dataset and mapping them to OSM nodes using LSH mapping, we modified the existing dataset to create the trip data of mapped nodes in the sequence described in Section 3.1. However, in case of Beijing data, we considered the entire region covered in the sample trip data, thus obtaining the map in the previously mentioned range.

4.2. Results

In this section, we tabulate the performance of the baseline method (L-GC) beside our proposed modifications (E-GC and EL-GC). We perform the experiments on the two datasets, Porto and Beijing described in Section 4.1.

In order to perform the experiments, we have used two types of distance measures:
Coordinate Distance: It is found by computing the vincenty distance (Vincenty, 1975) between two geographical points (lat,lon). The attributes, and dist in the data (described in section 3.1) have coordinate distance values organized in them.
Network/Map Distance: It is computed by finding the shortest path between two points, from the graph obtained using OpenStreetMap (OSM). The points are the coordinates obtained after mapping the original trip data to OSM (described in Section 4.1). Thus, the attributes and dist in the data (described in Section 3.1) have the map distance values organized in them.
The reason behind using Map Distance is that there will be several pair of nodes which do not have a direct edge between them, but has a series of nodes connecting the pair in the road network. Coordinate distance fails to capture this information of road network. On the contrary, Map distance essentially retrieves the connecting nodes from the road network and returns the shortest path between the individual node in the pair.

We have reported the Mean Absolute Percentage Error (MAPE) on the test set of both the datasets using the baseline model L-GC and our proposed modifications, E-GC and EL-GC described in Section 3.2 and 3.3 using the above-mentioned distance measures. Table  1 (under Coordinate Distance) shows the comparison of performance metric (MAPE) obtained using these three methodologies and Coordinate Distance as the distance measure. We observe that both our proposed modifications E-GC and EL-GC perform better in comparison to L-GC (the baseline model (Wang et al., 2018)) overall, for both the datasets. However, the margin of difference is noted higher in Beijing than that in Porto. We also performed the similar experiment using the Map Distance as the distance measure in Table 1 (under Map Distance). The proposed modifications performed better than the baseline, with a lower margin.

Dataset Distance Measure
Map &
Beijing 31.08 28.54 27.32 30.66 29.51 26.23 31.05 28.32 26.01
Porto 14.90 14.75 14.67 14.67 14.45 14.42 14.65 14.61 14.53
Table 1. Comparison of Baseline (L-GC) against the modifications (E-GC and EL-GC) on the basis of Mean Absolute Percentage Error (MAPE %) using Coordinate Distance, Map Distance and both combined.

We also show the variation of MAPE across different distance buckets for Beijing dataset. Figure 1(a) shows the variation across Coordinate distance bucket while Figure 1(b) shows the variation across Map distance bucket. It is observed that L-GC has a very high MAPE for the shorter path trips (with Coordinate distance), which eventually keeps on decreasing with longer trips. Alongside, E-GC and EL-GC perform better across all length paths. For paths with Map distance, L-GC and EL-GC show similar performance while E-GC degrades in performance for longer path trips. However, in overall EL-GC performs the best across all length trips of both Map and Coordinate distance.

Following the same set of experiments, we modified on the grounds of using distance metric. We concatenated both the Map Distance and Coordinate Distance to the output of the convolution layer (). Table 1 (under Map & Coordinate Distance) shows the comparison of the baseline method L-GC with that of the two modifications E-GC and EL-GC. We observe that both the modifications E-GC and EL-GC outperform L-GC. We also plot the MAPE across varying buckets holding the difference between Map Distance and Coordinate Distance. The assumption that holds in coordinate distance, that all nodes are directly connected is violated by map distance which includes the map information to find the shortest distance between two nodes (which can be connected by a series of nodes in map). It can be clearly seen from Figure 3 that although at a lower difference value in distance (on x-axis), L-GC starts at a lower MAPE, it keeps increasing as the difference gets higher. On the other hand, E-GC and EL-GC remain on the lower side as the difference in distance increases. The inclusion of embeddings along with the nodes help in a better interpretation of spatial dependencies among the nodes thus aiding in better prediction of the trips with large difference between map and coordinate distance. This suggests that our proposed modifications perform better for trips which have the subsequent nodes connected by a series of nodes in the road network (and not directly connected).

(a) Coordinate Distance
(b) Map Distance
Figure 2. Distribution of MAPE(y-axis) across L-GC, E-GC and EL-GC over varying Coordinate and Map distance buckets (x-axis) on Beijing Dataset.
Figure 3. Distribution of MAPE(y-axis) across L-GC, E-GC and EL-GC over the varying difference between Coordinate and Map distance buckets (x-axis) on Beijing Dataset.

5. Conclusion

In this paper, we study the problem of travel time prediction of any given path. We build our modifications on an existing state-of-the-art method (Wang et al., 2018) based on deep neural networks. We incorporate Map Distance and node embeddings in the network which prove to perform better compared to the baseline method. The information from the road network aided by the embeddings which essentially captures the vicinity of nodes around each other, account for the better performance of the modifications, thus confirming our hypothesis.


  • (1)
  • Boeing (2017) Geoff Boeing. 2017. OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks. 65 (07 2017), 126–139.
  • Dharia and Adeli (2003) Abhijit Dharia and Hojjat Adeli. 2003. Neural network model for rapid forecasting of freeway link travel time.

    Engineering Applications of Artificial Intelligence

    16, 7-8 (2003), 607–613.
  • Duan et al. (2016) Yanjie Duan, Yisheng Lv, and Fei-Yue Wang. 2016. Travel time prediction with LSTM neural network. In 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC). 1053–1058.
  • Grover and Leskovec (2016) Aditya Grover and Jure Leskovec. 2016. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 855–864.
  • Indyk and Motwani (1998) Piotr Indyk and Rajeev Motwani. 1998.

    Approximate nearest neighbors: towards removing the curse of dimensionality. In

    Proceedings of the thirtieth annual ACM symposium on Theory of computing

    . ACM, 604–613.
  • Mridha et al. (2017) Sankarshan Mridha, Niloy Ganguly, and Sourangshu Bhattacharya. 2017. Link Travel Time Prediction from Large Scale Endpoint Data. In Proceedings of the 25th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. ACM, 71.
  • Siripanpornchana et al. (2016) C. Siripanpornchana, S. Panichpapiboon, and P. Chaovalit. 2016. Travel-time prediction with deep learning. In 2016 IEEE Region 10 Conference (TENCON). 1859–1862.
  • Toole et al. (2015) Jameson L. Toole, Serdar Colak, Bradley Sturt, Lauren P. Alexander, Alexandre Evsukoff, and Marta C. González. 2015. The path most traveled: Travel demand estimation using big data resources. Transportation Research Part C: Emerging Technologies 58 (2015), 162 – 177. Big Data in Transportation and Traffic Engineering.
  • Vincenty (1975) Thaddeus Vincenty. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey review 23, 176 (1975), 88–93.
  • Wang et al. (2018) Dong Wang, Junbo Zhang, Wei Cao, Jian Li, and Yu Zheng. 2018. When Will You Arrive? Estimating Travel Time Based on Deep Neural Networks, In AAAI.
  • yuan Chen et al. (2016) Yuan yuan Chen, Y. Lv, Z. Li, and F. Wang. 2016. Long short-term memory model for traffic congestion prediction with online open data. In 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC). 132–137.
  • Zhang et al. (2018) Hanyuan Zhang, Hao Wu, Weiwei Sun, and Baihua Zheng. 2018. DeepTravel: a Neural Network Based Travel Time Estimation Model with Auxiliary Supervision. In Proceedings of the International Joint Conference on Artificial Intelligence.