Uber's Billion Dollar Problem: Predicting ETAs Reliably And Quickly
A visual deep dive into how Uber uses graph theory, embeddings and self-attention and to predict ETAs
Get a list of personally curated and freely accessible ML, NLP, and computer vision resources for FREE on newsletter sign-up.
To read more on this topic see the references section at the bottom. Consider sharing this post with someone who wants to know more about machine learning.
Imagine you have a flight to catch in an hour, and you're relying on Uber to get you to the airport. An accurate Estimated Time of Arrival or ETA allows you to relax, knowing exactly how much time you have. In contrast, an unreliable ETA can be a recipe for stress, leaving you scrambling to hail another cab or risk missing your flight.
For Uber, accurate ETAs are crucial not just for user experience, but also for their bottom line. Imagine a scenario where riders consistently experience delays due to inaccurate ETAs. This can lead to frustration and a decrease in ridership, impacting Uber's revenue.
0. Why is predicting ETA so important?
Predicting an accurate Estimated Time of Arrival or ETA is crucial for Uber's success. Inaccurate ETAs can result in a poor user experience, leading to decreased usage and lost earnings [4].
This directly affects the company's earnings, resulting in a loss of millions of dollars over a few weeks in just a few cities. Extrapolating this to all of Uber's operational countries would result in a substantial financial loss of billions of dollars [4].
Further, Uber's ETA prediction service is used by internal products and helps allocate resources efficiently. During a ride, the ETA service shows the user the time to destination, dispatches the best car to minimize wait time, and takes the user from source to destination, updating ETA multiple times.
1. Uber’s Design Decisions
In the past, Uber used gradient-boosted decision tree ensembles to predict ETAs. With the increasing amount of training data available with time, it was only natural to scale to more powerful machine learning models.
Uber decided to switch from decision tree ensembles to deep learning models. Switching to models closer to state-of-the-art meant they would need to solve problems that come with scaling to such models. Uber designed the ML system with the following constraints [2] in mind:
Latency: The ETA prediction ML model has the highest queries per second at Uber. It needs to scale and be a low-latency service used by internal Uber customers.
Accuracy: Uber's primary metric is the mean absolute error (MAE) between predicted ETA and true ETA. The new ML model must improve over the XGBoost model.
Generalizable: Uber’s model must provide reliable ETA predictions across Uber’s countries and different business cases such as Uber Eats and Uber Rides
2. Don’t Reinvent The Wheel
Uber's ETA system is a clever marriage of traditional routing algorithms and cutting-edge deep learning. Think of it like a layered cake. The first layer is a routing engine that uses map data, traffic patterns, and vehicle speeds to create a basic estimate of travel time.