Embeddings in action: behind daily life
Have you ever been amazed by how accurately your preferred music, video, or news platform recommends content to you? How about restaurant recommendations in a food delivery app? Data embeddings are key in matching content to our preferences in these and many other cases.
As we outlined in a previous article, embeddings are a technique for converting various types of information into a numerical representation. This process identifies similarities or relationships between concepts and ensures that similar elements are represented close to each other in the embedding space.
This is how embedding works: a graphic example
To help understand how this technology operates, imagine a giant corkboard placed in a room. On this board are various images of different kinds, such as pictures of your friends, maps of the trips you’ve taken, postcards of paintings from a museum you’ve visited, and posters of movies you enjoy. Furthermore, you decide to arrange these images in a specific way, grouping the elements that belong to the same theme or have some kind of similarity between them. In essence, you are acting as an embedding by capturing the relationships that exist between these elements.
A specific embedding will store information about a specific piece of data, contextualized with other data with which it shares properties in the real world. Just like in the corkboard, similar or related data will be closer to each other.
Embeddings can encode information of different natures beyond text. As we will see here, we interact with this technology throughout our daily lives.
A day through embeddings
MorningStaying up-to-date: searching for news in your browser |
You wake up, yawn, and reach for your cell phone. With a cup of coffee in your hand, you decide to browse the latest news on your browser. Using word embedding technology, Google analyses your search to capture the context and understand precisely what you seek.1 In this process, the words you write are converted into numerical vectors and then organized in a structured vector space. This arrangement helps to place words with similar or related meanings close to each other. As a result, the search engine can accurately understand the intended meaning of terms that have multiple interpretations. For example, “jaguar” could refer to an animal, a car brand, or a sports team. Embeddings help Google determine the most relevant meaning for you based on the full context of your search and your previous interactions. This technology also allows Google to process and understand naturally formulated queries, bringing the interaction with the search engine closer to a real conversation. So, when you ask, “What happened in the world today?” Google effectively interprets your open-ended query, providing you with a summary of the most relevant news of the day, demonstrating a deep understanding of the current context and relevance of the information to you. |
On the go: music to your ears with Spotify |
As you step out of your house, you open up Spotify to listen to some music. To your delight, the app suggests a personalized playlist that perfectly aligns with your mood and musical taste. This level of personalization is made possible through CoSeRNN2, an advanced neural network architecture that analyzes your listening patterns and contextual variables to predict what music will resonate with you. This powerful model transforms your interactions with the platform into a sequence of embeddings, generating precise and contextual recommendations. It ultimately transforms each listening session into a truly personalized experience. On the other hand, Spotify uses the well-known word2vec model to generate the latent representation of songs, allowing it to measure similarities between tracks. This is how Spotify can generate personalized recommendations: it captures the characteristics of the songs played in a listening session and structures all this information. When offering the recommendation, it considers your historical sessions and the present context, such as the time of day and the device you are using. Recommendations come in the form of playlists that Spotify creates especially for you. These playlists reflect your tastes and invite you to explore new genres and artists, broadening your musical repertoire. |
AfternoonComing home: AI-powered virtual assistants |
When you get home, you ask your virtual assistant to remind you of an important meeting. Behind this seemingly simple interaction, embeddings are hard at work. These intelligent assistants, like Alexa, use word embeddings to understand your questions (decoding your command, natural language processing) and respond to you (encoding a message, natural language generation). Alexa uses embeddings to improve its understanding of natural language (NLU). These embeddings capture the context of previous dialogues or interactions, the device you use, and your preferences.3 By doing so, Alexa can accurately interpret your intentions even when your expressions vary. For instance, “Do I have tomorrow off?” and “Can you remind me what I have to do tomorrow?” may sound different, but they both lead to the same type of response: knowing your schedule for tomorrow. |
No time to cook: ordering food from home |
When you open your favorite food delivery app, a list of recommended restaurants appears almost instantly. This selection will differ from that of a friend who lives in a different city and follows a vegetarian diet. Uber Eats could offer you millions of options. However, if its machine learning model predicts the best restaurants for you in real-time, you might lose your appetite before receiving a response. Fortunately, embeddings come into play to speed up the process. Embeddings are used on two fronts4: on the one hand, to obtain numerical representations of users, capturing their preferences, locations, and customer profiles. On the other, to obtain vectors representing information about restaurants, including their menus, location, prices and other general information. This double layer of embeddings facilitates fast and efficient search, matching users with their ideal restaurant choices. |
EveningIt’s time to relax: Netflix and chill |
You lie on the couch and end the day by logging on to Netflix to watch a new show. When you log in, you are astounded by how many new shows Netflix is producing. How is it possible that they are all so successful? Netflix creators want their new productions to have the most eye-catching titles. Traditionally, this has meant researching the titles of previous productions and the audiences they reached. However, with an ever-growing library of titles across genres, Netflix now uses machine learning models to optimize and create innovative new titles5. The use of embedding is also a factor in this decision-making process. |
A day through embeddings
Morning
Staying up-to-date: searching for news in your browser
You wake up, yawn, and reach for your cell phone. With a cup of coffee in your hand, you decide to browse the latest news on your browser. Using word embedding technology, Google analyses your search to capture the context and understand precisely what you seek.1
In this process, the words you write are converted into numerical vectors and then organized in a structured vector space. This arrangement helps to place words with similar or related meanings close to each other. As a result, the search engine can accurately understand the intended meaning of terms that have multiple interpretations.
For example, “jaguar” could refer to an animal, a car brand, or a sports team. Embeddings help Google determine the most relevant meaning for you based on the full context of your search and your previous interactions.
This technology also allows Google to process and understand naturally formulated queries, bringing the interaction with the search engine closer to a real conversation. So, when you ask, “What happened in the world today?” Google effectively interprets your open-ended query, providing you with a summary of the most relevant news of the day, demonstrating a deep understanding of the current context and relevance of the information to you.
On the go: music to your ears with Spotify
As you step out of your house, you open up Spotify to listen to some music. To your delight, the app suggests a personalized playlist that perfectly aligns with your mood and musical taste. This level of personalization is made possible through CoSeRNN2, an advanced neural network architecture that analyzes your listening patterns and contextual variables to predict what music will resonate with you.
This powerful model transforms your interactions with the platform into a sequence of embeddings, generating precise and contextual recommendations. It ultimately transforms each listening session into a truly personalized experience.
On the other hand, Spotify uses the well-known word2vec model to generate the latent representation of songs, allowing it to measure similarities between tracks.
This is how Spotify can generate personalized recommendations: it captures the characteristics of the songs played in a listening session and structures all this information. When offering the recommendation, it considers your historical sessions and the present context, such as the time of day and the device you are using.
Recommendations come in the form of playlists that Spotify creates especially for you. These playlists reflect your tastes and invite you to explore new genres and artists, broadening your musical repertoire.
Afternoon
Coming home: AI-powered virtual assistants
When you get home, you ask your virtual assistant to remind you of an important meeting. Behind this seemingly simple interaction, embeddings are hard at work. These intelligent assistants, like Alexa, use word embeddings to understand your questions (decoding your command, natural language processing) and respond to you (encoding a message, natural language generation).
Alexa uses embeddings to improve its understanding of natural language (NLU). These embeddings capture the context of previous dialogues or interactions, the device you use, and your preferences.3 By doing so, Alexa can accurately interpret your intentions even when your expressions vary. For instance, “Do I have tomorrow off?” and “Can you remind me what I have to do tomorrow?” may sound different, but they both lead to the same type of response: knowing your schedule for tomorrow.
No time to cook: ordering food from home
When you open your favorite food delivery app, a list of recommended restaurants appears almost instantly. This selection will differ from that of a friend who lives in a different city and follows a vegetarian diet.
Uber Eats could offer you millions of options. However, if its machine learning model predicts the best restaurants for you in real-time, you might lose your appetite before receiving a response. Fortunately, embeddings come into play to speed up the process.
Embeddings are used on two fronts4: on the one hand, to obtain numerical representations of users, capturing their preferences, locations, and customer profiles. On the other, to obtain vectors representing information about restaurants, including their menus, location, prices and other general information. This double layer of embeddings facilitates fast and efficient search, matching users with their ideal restaurant choices.
Evening
It’s time to relax: Netflix and chill
You lie on the couch and end the day by logging on to Netflix to watch a new show. When you log in, you are astounded by how many new shows Netflix is producing. How is it possible that they are all so successful?
Netflix creators want their new productions to have the most eye-catching titles. Traditionally, this has meant researching the titles of previous productions and the audiences they reached. However, with an ever-growing library of titles across genres, Netflix now uses machine learning models to optimize and create innovative new titles5. The use of embedding is also a factor in this decision-making process.
Conclusions
Embedding technology translates our actions and behaviors into a language machines can understand, enabling more intuitive human-machine interaction.
In the banking industry, embedding technology has the potential to create a breakthrough user experience. It allows for the understanding and analysis of every interaction that takes place in your banking app, which can lead to better operations and an improved overall customer experience.
Embeddings are essentially numerical vectors that encapsulate the complexity of user actions. This technology is crucial in personalizing services and offering tailored products to each customer.
Notes
References
- Manish Patel, TinySearch – Semantics based Search Engine using Bert Embeddings. ↩︎
- Casper Hansen, Christian Hansen, Lucas Maystre, Rishabh Mehrotra, Brian Brost, Federico Tomasi and Mounia Lalmas, Contextual and Sequential User Embeddings for Music Recommendation. ↩︎
- Larry Hardesty, The engineering behind Alexa’s contextual speech recognition. ↩︎
- Bo Ling, Melissa Barr, Dhruva Dixith Kurra, Chun Zhu, Nicholas Marcott, Innovative Recommendation Applications Using Two Tower Embeddings at Uber. ↩︎
- Melody Dye, Chaitanya Ekanadham, Avneesh Saluja, Ashish Rastogi, Supporting content decision makers with machine learning. ↩︎