© 2017 by Doran Bae 

You are reading Coding Otter, stuffed with articles about big data, data science development, ML in production, managing data science projects, and many more. ​
About the host
I'm Doran Bae, Data Scientist @TVB turning data into products and stories. More about me.

word2vec to video2vec

Word embeddings discussion is the hot topic being talked about by every data scientists for many years. It is a technique initially developed for the purpose of Natural Language Processing (NLP). The beauty of embedding is that it can represent high-dimensional and sparse features into low dimensional representations. More recently, the concept of embedding has been extended beyond word representations to other applications outside of NLP domain: web, e-commerce and marketplace.

Human language and computers

Humans have always wanted to teach computers our language. Because it was difficult for the computers to understand our characters, we decided to convert, or embed, each unique word into a number.

Now, one unique feature about our language is that it has semantic meanings, and without understanding this semantic information, computers cannot use the language as we do. So scientists came up with a way to somehow 'code' this semantic meanings into the numbers, or vectors as we call them in industry. In a nut-shell, the act of converting a qualitative value into real-value vectors is embedding, and the logic behind is algorithm.

word2vec to video2vec

We can train word embeddings by treating a sequence of words in a sentence as context. The same can be done for training of embeddings of user actions by treating sequence of user actions as context.

Let's have an example for a video recommendation. Let's assume we have a set of watched video obtained from N users, Given this data set, the goal is to learn N-dimensional real-value representation of each unique videos, such that similar listings lie nearby in the embedding space.

What did the embeddings learn?

One way to evaluate the representation of the embeddings is to see the similarity in video genres. We can clearly observe below that videos with similar genres are grouped together.

video2vec embedding result visualization

Other useful resource on word embeddings:

Word embeddings: exploration, explanation, and exploitation

Understanding Word Embeddings

Playing with word vectors

A Simple Introduction to Word Embeddings


Listing Embeddings in Search Ranking