Community Blog Exploration and Practice of Deep Learning Application in AMAP ETA

Exploration and Practice of Deep Learning Application in AMAP ETA

This article summarizes the exploration and practice of applying deep learning to predict estimated time of arrival (ETA) in AMAP.

Driving navigation is a core scenario of digital maps. When a user is planning the navigation, AMAP provides three routes for the user to choose from, which are designed based on different factors such as the number of traffic lights.


For most users, the estimated time of arrival (ETA) is a key factor of consideration when selecting a route. And this means that a higher ETA accuracy brings better travel experience for our users. After a user specifies the starting location and the destination, the AMAP app needs to provide a predicted ETA accurately and in real time, which poses significant technical challenges to the AMAP team. In order to achieve this, the team at AMAP employs deep learning based models to predict the flow of traffic based on current and historical data. The following sections will explore these data models and the overall design approach used by AMAP to tackle this challenge.

Exploration and Practice Based on Deep Learning Models

Model Selection

Traditional machine learning models that are often used for ETA calculation are mainly regression models such as linear regression, Random Forest (RF), and Gradient Boosting Decision Tree (GBDT). Linear models are less expressive, requiring a large amount of feature engineering analysis to get effective features in advance. RF introduces more randomness through sample and feature randomness and solves the problem of weak generalization of decision trees. GBDT achieves regression by using an additive model (linear combination of basis functions) and continuously reducing the residual generated in the training process.

Traditional machine learning models are simpler and easier to understand, and can also achieve good results. However, they have two problems:

  • The expressive power of a model is dependent on the features that are selected. Effective features need to be worked out manually in advance.
  • The impact of upstream road sections on downstream ones is not considered, which causes problems like losing association information between upstream and downstream road sections and uncertainties due to the impact of the upstream road sections on downstream ones.

The first problem is easy to understand and can be properly solved by deep learning models. We will illustrate the second problem with the uncertainty in selecting historical speed information as an example. Historical speed information is a historical average time in a 10-minute interval and is specific to the seven days of a week. It can be selected based on the 10-minute interval which contains the estimated point in time when the user enters the road section. The curve in the following figure represents the change of historical average speed over the time period from 00:00 to 24:00, with the value fluctuating greatly during morning and evening rush hours.


The historical average time is selected based on the estimated time of entry, which in turn is dependent on the estimated travel time of the upstream road section. Therefore, the historical average time that will be selected is uncertain, which leads to inaccurate ETA.

In view of this problem, we concatenate all road sections in a route based on the idea of time series in Recurrent Neural Networks (RNNs) to predict the ETA of the route.

Considering the long-term dependency learning problem with RNN and the actual situation of the service, we further choose to use a Long Short Term Memory (LSTM) model for modeling. Additionally, the selectivity offered by the gates in LSTM enables the model to learn on its own to decide which upstream features to retain for prediction.

Network Architecture


The preceding figure shows the framework of the model, which consists of two parts. The LSTM module is used to predict the ETA of the road sections in the route and finally the fully connected N-layer module is used to predict the ETA of the entire route based on the cumulative road section ETA and features of the route.

Prediction of Road Section ETA


The preceding figure shows the LSTM structure for predicting section ETAs. Xt is the feature information of the t-th road section in the route, including real-time traffic, historical traffic, and static characteristics of the road section.

The LSTM model takes time series as input for prediction. Based on this idea, we input each road section in the route into the model in sequence.

Prediction of Route ETA

After the LSTM module gets the predicted value of the cumulative road section ETA, the fully connected N-layer module integrates this value with the static properties of the route to output the predicted value of the route ETA.

Property features of a route are manually extracted features that are used to make the model more expressive in different scenarios. They include length of the route, the feature date of the navigation planning, and whether in morning or evening rush hours.

The loss function is the Mean Squared Error (MSE) function, a common square form of linear regression. The formula is as follows:


In the formula, N is the number of routes, ETA Route j is the route ETA, which is the predicted value, and User Travel Time j is the length of time actually spent to travel the route by the user, which is the actual value.

Model Performance

To evaluate the performance of the model, which is the predicted route ETA, we mainly consider the accuracy. Generally, users have higher tolerance for longer ETAs than shorter ones. For example, if a user wants to go to the airport, a predicted ETA that is 10 minutes shorter than the actual time might do more harm to the user than a predicted ETA that is 10 minutes longer. Therefore, the metric for accuracy is designed to favor longer ETAs, which is defined as the ratio of requests that meet a certain range of user tolerance, that is, accuracy is used as the major metric for evaluation.

The experimental results in Beijing show that ETA accuracy is significantly improved with a MSE loss decrease by 28.2%.


This article describes how to build a model for predicting ETA during navigation planning by introducing a deep learning model to resolve the deficiencies of linear models. It also makes room for introducing more features and exploring more possibilities in the future, such as the uncertainty of historical speed information, timeliness, periodicity, emergencies, and road network structure.

0 0 0
Share on


15 posts | 2 followers

You may also like



15 posts | 2 followers

Related Products