EthanLab. Software Development · Product Management · Tech Reviews
Back to research notes

Introduction to Recommendation Algorithms

Updated

As the Internet becomes increasingly prevalent, digital content exhibits an exponential growth trend, submerging people in a torrent of information. For example, Netflix has tens of thousands of movies, Amazon has millions of books, and Del.icio.us has over one billion bookmarked web pages. With so much information, we cannot browse through it all. Traditional search engines can only present users with the same ranked list, failing to provide personalized services based on different user preferences. Personalized search and recommendation systems are one of the effective methods for solving the current information overload.

Among these, recommendation systems are a subset of information filtering systems. They attempt to predict the ratings or preferences users will assign to items (e.g., books, music, or movies) or social elements (e.g., individuals or groups) that they have not yet considered.

In a real-world recommendation system, the number of items to consider can be in the tens of thousands, or even exceed millions, as seen in platforms like Amazon, eBay, and YouTube. The number of users is also enormous, necessitating accurate and efficient recommendation systems. In a fiercely competitive environment, existing recommendation systems have achieved outstanding results in the e-commerce domain, but in other domains, advanced efforts and expert development are still required.

A complete recommendation system consists of three parts: a behavior logging module that collects user information, a model analysis module that analyzes user preferences, and a recommendation algorithm module. The behavior logging module is responsible for recording user behaviors, such as ratings, purchases, or browsing. The model analysis module analyzes user behaviors to build appropriate models describing user preferences. The recommendation algorithm module is responsible for filtering user-preferred items from the item set in real-time for recommendation; this is the most core part of the recommendation system.

The main recommendation algorithms can be categorized into Collaborative Filtering, Content-based, and Hybrid Approaches. I will introduce them one by one and further explain how to incorporate Context-awareness into Collaborative Filtering.

Collaborative Filtering Approaches

Collaborative Filtering is currently one of the most successful recommendation algorithms. The typical approach is to search a large group of people to find a small subset with tastes similar to ours. The algorithm calculates other content preferred by these people to generate an ordered recommendation list.

Goldberg designed Tapestry, the earliest system to apply Collaborative Filtering. This system allowed people to add tags based on their level of interest in documents and used this information to filter documents for others. GroupLens, designed by Konstan et al., was applied to news filtering, helping readers filter news content according to their preferences. Users rate content after viewing it, and the system records these scores for future reference. Unlike Tapestry, which filters only within a single system, GroupLens is a cross-system news filtering mechanism. Additionally, Tapestry does not aggregate ratings for the same item, whereas GroupLens sums ratings for the same item from different users.

Collaborative Filtering algorithms can be divided into two categories: Memory-based and Model-based. Memory-based algorithms make predictions based on all rated items in the system. Model-based algorithms use machine learning on collected rating data to obtain user behavior models for prediction.

Collaborative Filtering requires calculating the similarity between two users. Common similarity measurement methods include Distance-based, Correlation-based, and Cosine-based.

In summary, Collaborative Filtering has the following advantages: it has the ability to recommend new information and discover users’ latent preferences; it can recommend items that are difficult to analyze by content, such as music, restaurants, and movies.

Although Collaborative Filtering is widely applied, it also has many issues. For example, the Cold Start problem involves how to recommend to new users or how to recommend new items to users. In any recommendation system, the number of rated items is usually much smaller than the number of items needing recommendation, leading to the Sparsity problem which reduces accuracy. Facing an ever-increasing number of users, the data volume increases sharply, leading to the Scalability problem. Therefore, some recommendation systems adopt Item-based Collaborative Filtering. In systems where the number of items is relatively stable, this method is very effective.

Content-based Approaches

Initially, Content-based approaches were an extension and development of Collaborative Filtering. They do not rely on user ratings of items but instead calculate similarity between users based on the content of items they have already selected, thereby recommending suitable items. Content-based recommendation systems rely on information retrieval and filtering. By analyzing content that has been purchased or browsed, profiles are built for users and items. The system can compare the similarity between user and item profiles to directly recommend the most similar items to the user.

In summary, Content-based approaches have the following advantages: they can handle the Cold Start problem for new users and new items; they are not limited by rating sparsity; they can recommend new items and non-popular items, and discover hidden items; they can list the features of recommended items through profiles, providing a deeper understanding of why these items are recommended.

Content-based approaches also face common information retrieval issues. For example, multimedia data (images, music, and videos) is difficult to structure textually, which imposes significant limitations.

Hybrid Approaches

Every algorithm has some drawbacks. To select the best and eliminate the worst, some recommendation systems combine different methods, which we call Hybrid Approaches. Currently, the most common hybrid recommendation systems combine Content-based and Collaborative Filtering approaches. These can be mainly divided into independent systems combined with each other, and Collaborative Filtering systems augmented with Content-based methods.

Combining independent systems involves using two or more algorithms separately to generate recommendation results, then integrating these results to make recommendations using a linear combination of predicted ratings.

In Collaborative Filtering systems augmented with Content-based methods, such as Fab, user profiles are generated using Collaborative Filtering, while user similarity is calculated using Content-based methods rather than referencing co-rated items. This allows the system to not only recommend items from users with co-ratings but also recommend items similar to the user profile.

Collaborative Filtering with Context

Traditional Collaborative Filtering can be viewed as a two-dimensional problem, where one dimension is users and the other is items. The interaction between each user and item is the user’s rating of the item. When we add context to the recommendation problem, it becomes a multi-dimensional problem.

Traditional recommendation algorithms cannot directly handle this type of problem. However, many researchers have attempted to modify existing methods to support context-awareness. Adomavicius proposed a quite famous method, the main spirit of which is to fix dimensions during recommendation, meaning only considering all ratings under that specific context. This transforms the multi-dimensional problem into a two-dimensional problem. However, this method makes the Cold Start problem more difficult. Therefore, Adomavicius et al. also proposed a method extending contexts with hierarchical attributes. To increase accuracy, they also designed an algorithm to segment contexts.

Another method is to measure the similarity between different contexts to weight ratings. Since user preferences for items change with context, if users consistently prefer an item in certain contexts, Chen infers that these contexts are very suitable for that item. Therefore, he uses Correlation-based similarity measurement to calculate itemisimilarity weights under two contextsxandy.

Chen also assumes that each dimension is linearly independent, so the similarity between two contexts can be calculated separately in each dimension.