Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

How does Google Maps use Graph Neural Networks?
Latest

How does Google Maps use Graph Neural Networks?

Last Updated on June 28, 2021 by Editorial Team

Author(s): Daksh Trehan

Deep Learning, Algorithms

Traffic & ETA prediction with Graph NeuralΒ Networks

Gone were the days, when travelers used to look for long, rough maps to chose their route. Now, they rely upon a popular tool, GoogleΒ Maps.

Every day, around 1 billion kilometers are traveled using Google maps that are present in more than 220 countries worldwide. When you hop in your cars/bikes and start navigating, Google maps helps you by predicting traffic, an estimated travel time, an estimated time of arrival(ETA), and the best route for you toΒ take.

But, behind this super-functionality of Google Maps, there is a pinch ofΒ AI.

How does Google determines LiveΒ traffic?

Photo by Isaac Mehegan onΒ Unsplash

Google maps are smart, they can easily predict the traffic conditions on roads all over the world. When people navigate with Google Maps, their aggregate location, the route, the speed at which they’re traveling are all recorded by Google and are used to help users who might be taking that routeΒ soon.

By computing the speed of various users at a particular route, the AI can easily determine whether the route is affected by the traffic jam and thus helping future commuters.

If a lot of Google Maps users are stuck at a particular portion of the route, it means that route might suffer traffic jams, and thus AI colors that part as red, similarly for slow moving traffic AI colors that part toΒ yellow.

Signals for traffic condition, Source

But, Google Maps can only show the live location and can’t predict the future condition of traffic on theΒ road.

Information collected by Google Map to predict liveΒ traffic:

  • Live location of theΒ user.
  • Total cars, their speeds, conditions of roads, feedbacks ofΒ users.
  • Traffic history for the specific route at a specificΒ time.

How Google Maps calculate ETA and offers the bestΒ route?

ETA(Estimated Time of Arrival) is one of the highlighted features of Google Maps. Google Maps tries to calculate the different routes to reach the destination and then upon calculating the ETA, it suggests users the best route. And that’s where Machine Learning comes intoΒ play.

To calculate the ETA for each route, the algorithms divide the route into smaller routes and then calculate ETA for each route separately.

Dividing the route to multiple smallerΒ routes

But, how ETA is calculated for eachΒ path?

Step 1:

To calculate ETA for a particular segment, we need the road segment, the previousΒ path.

We could use feed the above-mentioned requirements to Feed Forward Neural Networks, but usually, Feed Forward Neural Networks require independent samples, but in practicality, the traffic on one segment of the road can directly influence the traffic on another road which eventually would lead to inaccuracies.

The data fed by us would be sequential, and hence RNNs/Transformers could be of great help. But, RNNs require a high amount of data. If we wish to use RNNs for Google Maps, it would need different data for eachΒ route.

Even if, we’re able to gather the data, it would require high computation power to learn the relation between each route fromΒ scratch.

The optimal solution could beΒ Graphs.

Each city can be represented in the form of graphs where each road segment can be distinguished as a vertex and each node can be defined as anΒ edge.

Node Network β†’ Embeddings β†’ Feedforward Neural Network β†’ ETA for eachΒ segment

Step 2:

After deploying each city as a graph, to learn the routes we require embeddings.

For each node, an embedding would be defined andΒ updated.

Since the routes are interconnected, the embeddings would be created, the states would be updated and new embeddings would be created until we reach the destination.

For complexΒ paths:

A + B + AC + BC β†’ encoder-decoder β†’ embedding forΒ C

Each new message will be created for a single pass for a singleΒ node.

Since the nodes are interconnected, each node has the following information:

  • Its neighbors.
  • Its neighbor’s neighbors.

The above information helps to create a relationship between each node with different nodes and thus helps us to improve our accuracies.

After X passes, the final embeddings for the route will be generated which can be updated in dictionaries with road vector as the key and information and relations as theΒ values.

Traffic information + Speed Limit + Accident + Previous record β†’ Feedforward Neural Network β†’ ComputeΒ ETAs.

Final WorkΒ Flow:

Google Maps ETA calculation workflow, Designed by Author, All Rights Reserved.
  • Start.
  • Find someΒ path.
  • Determine segments.
  • Road Embedding mappers.
  • Add real-time feature β†’ Feed Forward Neural Network β†’Β ETA
  • Calculate sum of allΒ ETAs.

Conclusion

Google Maps is a powerful tool and bliss for travelers. The combination of Graph Neural Networks and the use of embeddings help the algorithm to calculate ETA and return with the best route forΒ users.

If you like this article, please consider subscribing to my newsletter: Daksh Trehan’s Weekly Newsletter.

References:

[1] Traffic prediction with advanced Graph Neural Networks |Β DeepMind

[2] This Is How Google Maps Worksβ€Šβ€”β€ŠPriteshΒ Pawar

[3] Google Maps 101: How AI helps predict traffic and determine routes (blog.google)

Find me on Web: www.dakshtrehan.com

Follow me at LinkedIn: www.linkedin.com/in/dakshtrehan

Read my Tech blogs: www.dakshtrehan.medium.com

Connect with me at Instagram: www.instagram.com/_daksh_trehan_

Want to learnΒ more?

How is YouTube using AI to recommend videos?
Detecting COVID-19 Using Deep Learning
The Inescapable AI Algorithm: TikTok
GPT-3 Explained to a 5-year old.
Tinder+AI: A perfect Matchmaking?
An insider’s guide to Cartoonization using Machine Learning
How Google made β€œHum to Search?”
One-line Magical code to perform EDA!
Give me 5-minutes, I’ll give you a DeepFake!

Cheers


How does Google Maps use Graph Neural Networks? was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

Published via Towards AI

Feedback ↓