How to Build a Deep Learning Based Recommender System | Sphere Blog

Sphere
October 13, 2022
15 min read

Amazon, Netflix, and Indeed don’t simply provide more options than traditional retail stores, video rental stores, and newspapers — they provide so many more options that the human mind can effectively comprehend and parse. Users need to be shown what will most appeal to them.

There were recommender systems before deep learning, but until that advancement, technical constraints ensured choice remained tyrannical. Deep learning has become an essential component of recommender systems, and anyone who wants to understand the latter must understand the former. 

How Traditional Recommender Systems Worked 

Traditional recommender systems make recommendations to users based on previous user interactions or attributes, depending on whether the recommender system uses content-based filtering, collaborative filtering, or a hybrid of the two. 

Content-based Filtering

Content-based filtering recommends items with similar features to items a user interacted with in the past. Filtering is typically based on actions the user took (e.g., adding an item to their shopping cart) or explicit feedback the user offered (e.g., thumbing a video up or down). Additionally, content-based filtering methods often use the description of the item and a profile of the user’s choices to find recommended items that align with what the user chose previously.

Collaborative Filtering

Collaborative filtering uses the preferences of other users, as revealed by their actions, to make recommendations to a new user. The “collaborative” part comes from the methodology’s assumption that if two users share one preference, they’ll share another.

User-user collaborative filtering uses similar users to recommend new items; item-item collaborative filtering uses similar items to recommend new items. 

Hybrid Filtering

Many traditional recommender systems combine content-based filtering and collaborative filtering. There are different ways to combine the two approaches: merge the predictions of each, or add the capabilities of one to the other. 

Some research has shown that hybrid filtering can overcome some of the limitations of content-based and collaborative filtering. Still, even hybrid filtering can’t compete with deep learning recommender systems.  

How Deep Learning Recommender Systems Work

Many of us use deep learning recommender systems. For example, according to research, 80% of the movies users select and watch on Netflix were recommended to them, and 60% of video clicks on YouTube come from homepage recommendations. eBay, Twitter, and Spotify have also adopted these systems. 

Deep learning recommender systems depend on neural networks that mirror the neural networks in the human brain. Essentially, a web of nodes (neurons in the brain) connects, and each node receives an input, processes the information, and passes the output to the next node. 

Neural networks can also process information nonlinearly and provide more richly informed and complex recommendations. Depending on the use case, deep learning recommender systems use multiple neural networks to make intelligent recommendations. 

Users can provide little input and get fine-tuned suggestions when everything works well. As a result, companies profit (due to more purchases), and users are more satisfied (due to a smooth user experience and better product choices).

Advantages to deep learning recommender systems

Deep learning recommender systems can handle complexity and granularity better than traditional ones. Why? Because they process information nonlinearly and can identify and construct new features from a raw dataset.

We can see how this advantage bears out in three situations: nonlinear networks, sequence modeling, and representation learning. 

Nonlinear networks, like all neural networks, use activation functions to break linearity, enabling them to process information outside the limits of a straight causal line. Deep learning recommender systems use nonlinear networks to process more complex user and item interaction patterns than traditional systems. 

Sequence modeling is when a deep learning model takes sequential content, such as text streams or audio clips, and outputs data sequences known as sequence models. Some data depends on the information that came before it (such as this parenthetical, which only makes sense with the clause that comes before it). So, without sequence modeling, traditional recommender systems are left treating all data points as relatively equal in weight. Deep learning recommender systems use neural networks to model complex sequences that traditional recommender systems struggle with. Think of deep learning-powered chatbots, which need to be able to process sequential text data to respond to a human conversationalist.  

Representation learning (also called feature learning) is when a deep learning system learns about the features it needs to be able to classify from a pool of raw data at the same time as it uses those features to perform a task. Traditional feature engineering is manual, requiring engineers to use domain knowledge to identify and extract relevant information from data. Deep learning enables recommender systems to parse massive amounts of descriptive information and fuel recommendations with representations that make further learning and recommendations easier. 

Three Popular Techniques for Deep Learning-Based Recommender Systems 

A deep learning recommender system is nothing without the machine learning models and neural networks that fuel it. Different ML models can support recommender systems in different ways. Choosing among them depends on the use case. 

Neural Collaborative Filtering

Neural Collaborative Filtering (NCF) mixes the nature of nonlinear neural networks with the power of matrix factorization to produce a deep understanding of the interaction between users and items. 

Matrix factorization, which has been used in traditional recommender systems for years, is an important part of NCF systems. By modeling user and item interactions through a scalar product, matrix factorization reduces the matrix of users and items into separate matrices that the system can multiply together to form a prediction. 

With a neural network, matrix factorization can happen nonlinearly. An NCF can take data, feed it into a matrix factorization process, feed the results into a neural network, and then combine everything to predict whether a user will interact with a given item. 

Session-based Recommenders

To provide intelligent recommendations, session-based recommenders use recurrent neural networks (RNNs) to combine sequence modeling with deep learning.

Recommender systems use RNNs when information has to be processed in order, such as language translation or natural language processing — both of which are incorporated into technologies like voice assistants and Google Translate. 

RNNs, like other neural networks, require training, but they’re unique in that they have a form of memory. RNNs consume the information of prior inputs and use that information to shape their output. Other neural networks assume inputs and outputs are distinct and independent, whereas RNNs make outputs dependent on prior inputs. 

Session-based recommenders take the outputs of RNNs to predict the likelihood of users selecting a candidate item. Interactions between users and items in a given session feed into an RNN, which provides context that fuels the eventual recommendation. 

Wide and Deep Recommenders

Wide and deep recommender systems use neural networks that combine the outputs of two models, a wide one and a deep one, to create a prediction. 

The wide model focuses on memorization, meaning it learns how often related items emerge and stores these patterns as data. The deep model uses abstract relationships between items to generate wide possibilities for prediction and recommendation, called generalization. 

The most significant advantage of the wide and deep model is that it’s greater than the sum of its parts. The wide model can create a “filter bubble” experience for users, whereas the deep model can recommend irrelevant items. However, when used together, the system can provide rich recommendations informed both by linear and abstract relationships. 

Four Best Resources for Exploring Deep Learning Recommender Systems

The information we’ve covered is only a broad overview of deep learning recommender systems. To learn how these systems work in detail — and how you can use them yourself — we recommend diving deeper by taking a course or exploring online resources.

1. Designing State-of-the-art Recommendation Systems (Sphere)

In this course, run by Sphere, you’ll learn how to build modern recommender systems from experts who’ve designed and implemented them at major companies. 

Take instructor Xavier Amatriain: As a Netflix engineer back in 2011, he figured out that viewing behavior data was more important than viewer ratings. Now he leads the engineering team at Quora. Your other instructor, Deepak Agarwal, deployed one of the first recommender systems for web applications at Yahoo! in the early aughts. At LinkedIn, he established an AI/ML org; now, he’s VP of engineering at Pinterest. 

During live online sessions over just two or three weeks, you not only interact with these pioneers in recommender systems. You’ll also meet and even work with other learners from around the world. Build your professional network and learn from the best at the same time. 

Your L&D department may cover the course cost because the Continuing Professional Development Standards Office accredits all Sphere courses.

2. Recommendation systems (Google)

In this course, run by Google, you’ll learn about recommendation systems in general as well as the different models recommendation systems use. 

The course is free, but the learning process is asynchronous, meaning you won’t be able to interact with other students or the teachers. It might also be hard to apply lessons from the course to your own work because there won’t be an instructor available to help you overcome context-specific obstacles.

3. Recommender Systems and Deep Learning in Python (Udemy)

In this course, run by Udemy, you’ll learn how to use simple and advanced algorithms to implement recommender systems. 

As with the Google course, the Udemy course is asynchronous, so you won’t be able to connect with any instructors or students. Unlike the Google course, you must pay for the course, but the fee is less expensive than other options. It’s worth noting, too, that Udemy courses, in general, have a high churn rate — most students don’t even complete a third of the course content they sign up for. 

4. Degree/certification

Outside of one-off courses, you can pursue a degree or certification. 

Many available courses cover recommender systems, most of which typically form part of a larger degree or certification. A few examples include:

In general, such courses are effective for gaining in-depth knowledge but can be repetitive for professionals already working in related fields. Additionally, these courses tend to be expensive and time-consuming. 

5. NVIDIA Merlin

If you’re not interested in starting with a course, NVIDIA Merlin might be a good place to begin. NVIDIA bills Merlin as an “open-source framework for building high-performing recommender systems at scale.” Merlin provides libraries, methods, and tools to help with the building of recommender systems. 

NVIDIA built Merlin with common challenges in mind, including preprocessing, feature engineering, training, and inference, all of which are easier to address using Merlin. It is meant to be end-to-end but does support existing recommender workflows. 

Deep learning presents a paradigm shift in the industry’s ability to build recommender systems, make recommendations, and optimize search functions. 

As is typical with modern paradigm shifts, technological advancement has made deep learning possible: the invention of GPUs. They offer massively parallel architectures that enable greater performance at lower costs than traditional CPUs. Companies and engineers worldwide are looking at ways to use these advancements within and beyond deep learning. 

The opportunity is especially ripe for curious learners because the deep learning community publishes much of its work. Netflix, for example, published a case study that explored some of the challenges the company encountered while building its recommender system. YouTube, too, has published some of its research into deep learning.

It’s surprisingly easy to start, too, with any of the courses above or by first learning about traditional recommender systems and ML. For example, a well-tuned collaborative filtering method is a great foundation on which to layer deep learning as you study it. 

And even without deep learning, a well-built recommender system can still make effective recommendations. Scholastic, for instance, uses a traditional recommender system to recommend books to libraries

Companies with smaller budgets or teams can start with traditional recommender systems, offer their developers education in deep learning, and then layer in more advanced recommendation capabilities over time.

Heading 2

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Heading 3

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

Heading 4

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Heading 5

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Heading 6

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Block quote