Movie recommendations with Deep Learning. Find a perfect match to your mood.

Deep learning


Go to

Read on


“What movie should i watch this evening?” — have you ever had to answer this question at least once when you came home from work? As for us — yes, and more than once. Here we will say a few words about what we’ve been working on for the past six months: an interactive movie recommender system The system is based on Deep Learning and it adapts to the user preferences in real time. As big movie fans we felt the need for such a service, and we believe that it will be useful for every movie lover.

From Big Dreams to actual product

Here is the phrase from J.Schmidhuber, which we can not get rid of:

Google of the future together with all its services is just a single giant LSTM.

Here we mean that there is one large neural network that interacts with the user and solves a variety of his tasks.

The idea seems too ambitious, perhaps utopian. We tried to “land” this idea and find the domain where a single large neural network can solve all the tasks for the user. So the idea was born to build a movie recommender system, which will interact with the user in a smart way, and to model the interaction in “end to end” manner with deep lstm like network.

Pic 1. Movix

Today there is a huge hype around chatbots. As for the academic community, at the end of the day, it’s all about passing the Turing test. For the large companies operational cost optimization is a concern, so guys from tech support should keep a weather eye open. All jokes aside. In many cases, typing text as a way to talk to the computer may be inconvenient and the “language of clicks” is more appropriate.

Many recommender systems are built on the concept of similar items — that is, for each movie there is a predefined set of movies similar to it. This does not take into account the preferences of a particular user. As a consequence, the user is forced to explore the static content and have no tool to tell the system about his preferences. This is not interactive approach. One the other hand, we believe that interactivity is a “must have” component of a good recommender system.

Our concept is the following: no registration is required, the user visits the site, makes a few clicks on movies or tags and receives recommendations reflecting his current mood and preferences. There are two entities which the system predicts: the movies and tags. The movie is the ultimate goal, i.e. the user is here because he wants to find a movie to watch, whereas tags are additional user interaction tool allowing the user to feed his current preferences faster into the system.

Pic 2. Movix

Technology stack and training data

Our deep model is LSTM based neural network that is built using the TensorFlow framework.

To create a training data, we’ve used the MovieLens dataset, where we took user’s movie preferences. We parsed IMDB and used the Movie DB API to form tags database.

The API interacts with TensorFlow through ZeroMQ, and Elastic Search acts as a storage for information retrieval about the movies. The frontend is made using Vue.js and Element UI. features

Movix allows you to perform the following actions:

  • Like and dislike both movies and tags;
  • Reorder “liked” or “disliked” movies (the more to the right, the more important);
  • Filter recommendations by rating and release date;
  • View trailer and stills from the movie;
  • Save your favorite movies.

The features mentioned above, allow you to interact with the system in a flexible way. For example, choosing a few old favorite movies, and then, turning on the filter “2010s”, allows you to discover the most recent movies that are similar to the ones you have chosen (“liked”). The same logic works in opposite direction — to discover the old movies.

Improvements to make: deep learning aspects

Let’s say a few words about the improvements to make the system more interactive and intelligent. We will focus more on Deep Learning aspects, rather than possible features and GUI:

  • Negative feedback or dislike button. For now, implementation of this function is a little hack outside the neural network. Of course, negative feedback must be modeled in the training stage. Our current attempts to do so did not lead to the results we expected. Often, if some movie strongly recommended by the model, disliking this movie does not make the model change its mind, neural net still recommends this movie. The issue has a lot to do with neural network structure, objective function and the way training data is generated.
  • Shorter path to relevant movies. Now, in some cases you need to like more than one movie to get something relevant. And the key question is: what our model is trained to do? Currently, the model is trained to guess the next movie in a sequence for a given user. So if a user liked only one movie (i.e. we have very little information to determine his preferences) it’s not an unreasonable strategy, at least from a human perspective, to guess that the next movie is a blockbuster.
  • More Deep Learning techniques. There are a number of deep learning techniques that are keys to obtain state of the art performance in various tasks — attention, beam search, bi-directional RNNs, and others. We need to figure out how to utilize the state of the art approaches in order to make the system smarter.
  • Our dreams in term of deep learning. We would really love to build a truly intelligent neural network within well specified domain such as movie recommendations. For example, a neural network could ask user questions so that he could quickly find a movie to watch. After all, the ability to ask the right questions is a good sign of intelligence. For example, such questions might be: “Are you interested in movies until the year X or after?”, “Do you like the actor / director Y”, etc. The good news is that the training datasets (MovieLens + what is possible to parse from the Web) have enough information to train the system to ask these kinds of questions and use the answers to recommend better. Bad — these questions are too trivial, we want something beyond it. We’ll try to formulate: We would like to train the neural network to maximize the “quality of user experience”. Any ideas? Let us know!
Next project

Self-driving car