Recommendation System

Avik Das
4 min readJan 18, 2020

— — a great recommendation system helps users find things they wouldn’t have thought to look for on their own.

What are Recommendation Systems?

A recommendation system helps users find compelling content in a large corpora.

Every platform has unique characteristics that must be carefully considered.

These include:
User-item sparsity
Available engagement data (clicks, likes, purchases, etc)
Seasonality trends
Item categorization/diversity
Variety of user behavior

Recommendation Systems Overview

One common architecture for recommendation systems consists of the following components:

  • candidate generation
  • scoring
  • re-ranking

Candidate Generation

In this first stage, the system starts from a potentially huge corpus and generates a much smaller subset of candidates. The following table shows two common candidate generation approaches:

Scoring

Next, another model scores and ranks the candidates in order to select the set of items to display to the user. Since this model evaluates a relatively small subset of items, the system can use a more precise model relying on additional queries.

Re-ranking

Finally, the system must take into account additional constraints for the final ranking. For example, the system removes items that the user explicitly disliked or boosts the score of fresher content. Re-ranking can also help ensure diversity, freshness, and fairness.

Content-based Filtering Advantages & Disadvantages

Advantages

  • The model doesn’t need any data about other users, since the recommendations are specific to this user. This makes it easier to scale to a large number of users.
  • The model can capture the specific interests of a user, and can recommend niche items that very few other users are interested in.

Disadvantages

  • Since the feature representation of the items are hand-engineered to some extent, this technique requires a lot of domain knowledge. Therefore, the model can only be as good as the hand-engineered features.
  • The model can only make recommendations based on existing interests of the user. In other words, the model has limited ability to expand on the users’ existing interests.

Collaborative Filtering

To address some of the limitations of content-based filtering, collaborative filtering uses similarities between users and items simultaneously to provide recommendations. This allows for serendipitous recommendations; that is, collaborative filtering models can recommend an item to user A based on the interests of a similar user B. Furthermore, the embeddings can be learned automatically, without relying on hand-engineering of features.

Advantages

No domain knowledge necessary

We don’t need domain knowledge because the embeddings are automatically learned.

Serendipity

The model can help users discover new interests. In isolation, the ML system may not know the user is interested in a given item, but the model might still recommend it because similar users are interested in that item.

Great starting point

To some extent, the system needs only the feedback matrix to train a matrix factorization model. In particular, the system doesn’t need contextual features. In practice, this can be used as one of multiple candidate generators.

Disadvantages

Cannot handle fresh items

The prediction of the model for a given (user, item) pair is the dot product of the corresponding embeddings. So, if an item is not seen during training, the system can’t create an embedding for it and can’t query the model with this item. This issue is often called the cold-start problem. However, the following techniques can address the cold-start problem to some extent:

  • Projection in WALS. Given a new item i0 not seen in training, if the system has a few interactions with users, then the system can easily compute an embedding vi0 for this item without having to retrain the whole model. The preceding equation corresponds to one iteration in WALS: the user embeddings are kept fixed, and the system solves for the embedding of item i0. The same can be done for a new user.
  • Heuristics to generate embeddings of fresh items. If the system does not have interactions, the system can approximate its embedding by averaging the embeddings of items from the same category, from the same uploader (in YouTube), and so on.

Hard to include side features for query/item. Side features are any features beyond the query or item ID. For movie recommendations, the side features might include country or age. Including available side features improves the quality of the model. Although it may not be easy to include side features in WALS, a generalization of WALS makes this possible.

--

--