Recommender System Overview of Recommender System Series (Part 1)

In today's era of rapid information development, recommendation systems are a hot topic and technical field. Some cloud vendors also provide SaaS services for recommendation systems, such as Amazon Personalize from Amazon Cloud Technology, to solve customers' problems of quickly building recommendation systems from scratch. pain points and difficulties. In our daily life, recommendation systems can be seen everywhere, such as Amazon e-commerce shopping, iQiyi video, Meituan Waimai, Douyin short video and today's headlines, anchor live broadcast platforms, etc., which we often use. Based on the recommendation system and computational advertising projects I have participated in in the past few years, I have summarized some practical experience and shared it with you in the form of a series of articles on the recommendation system. I hope that everyone will have a newer and deeper understanding of the recommendation system after reading it. This series of articles includes: an overview of the recommendation system, an in-depth discussion of the recall phase in the recommendation system, a sample project of the ranking task, and the practice of tuning the ranking model. More details and more details can refer to my  github repo .

The Amazon cloud technology developer community provides developers with global development technology resources. There are technical documents, development cases, technical columns, training videos, activities and competitions, etc. Help Chinese developers connect with the world's most cutting-edge technologies, ideas, and projects, and recommend outstanding Chinese developers or technologies to the global cloud community. If you haven't paid attention/favorite yet, please don't rush over when you see this, click here to make it your technical treasure house!

We first introduce the overview of the recommendation system, the general content is as follows:

  • Introduction to Recommender Systems
  • Common concepts in recommender systems
  • Evaluation metrics commonly used in recommender systems
  • General Recall Strategy for Homepage Recommendation Scenarios
  • Recall strategy for recommended scenarios on detail pages
  • Sorting models commonly used in the sorting phase
  • rearrangement stage
  • The Cold Start Problem of Recommender Systems
  • Recommended System Architecture

Introduction to Recommender Systems

Recommendation systems can be divided into broad recommendation systems and narrow recommendation systems (we will only focus on narrow recommendation systems in future discussions), refer to the following table:

image.png

The recommendation system is a type of application that judges the items/services that the user currently needs or is interested in based on the user's historical behavior, social relationship, points of interest, and context. The recommendation system itself is a method of information filtering, and it forms three mainstream information filtering methods together with search and category navigation. We can look at the usefulness of the recommendation system from different perspectives: for users, the recommendation system can help users find favorite items/services and help them make decisions; for service providers, the recommendation system can provide users with personalized services , improve user trust and stickiness, and increase revenue. It is said that 2/3 of Netflix’s watched movies come from the recommendation system, 38% of Google News’ clicks come from the recommendation system; 35% of Amazon’s e-commerce sales come from the recommendation of the recommendation system.

For many people (including me in the past), a common misconception is that the engineering implementation of the recommendation system is similar to that of computational advertising. In fact, the implementation of the two is quite different, as shown in the following table:

image.png

Common concepts in recommender systems

Common scenarios for recommendation systems: homepage recommendation (more emphasis on user-centered) and detail page recommendation (more emphasis on item-centered).

Personalized recommendation and non-personalized recommendation: Personalized recommendation is almost the current mainstream, and it is to make different recommendations for each user, that is, thousands of people and thousands of faces. Home page recommendations will consider personalization, and details page recommendations will increasingly consider personalization. The common methods of non-personalized recommendation include: the recommendation of the entire market historical ranking list (such as within 1 year, within 1 month, within 1 week); the recommendation of each category's historical ranking list (such as within 1 year, 1 within a month, within 1 week); periodic recommendations related to festivals (such as recommendations for items during the National Day Golden Week and Christmas holidays); recommendations related to emergencies (such as recommendations for items related to sudden infectious diseases); Recommendations for newly released items (eg within 1 week).

The product form of the recommendation system: the item is the exposure form of the item (such as flipping pages up and down, flipping pages left and right, and their mixed methods); the arrangement of exposure partitions (for a recommendation method, such as personalized TOP-N recommendation, you can consider putting Other methods are incorporated into the recall phase of personalized TOP-N recommendations as a recall strategy; multiple recommendation methods, each row of Netflix’s homepage recommendation corresponds to a recommendation method (each row of which can be flipped left and right to browse movie items), this is also called Mixed recommendations by partition. For example, one row is exclusive play recommendation, one row is popular recommendation, one row is new product recommendation, and one row is personalized TOP-N recommendation). For the convenience of writing, we make an assumption for the following discussion: only the personalized recommendation method is used, and other methods are used as the recall strategy of personalized recommendation.

Recall stage, sorting stage, and rearrangement stage: They are the three subdivision stages of the entire process of personalized Top-N recommendation. In different scenarios (such as homepage recommendation or detail page recommendation), not all three stages are required for different types of users (whether they are long-tail and cold-start users). We will discuss the details in another part of this series of articles. Involved in the article "In-Depth Discussion on the Recall Phase in Recommender Systems". There are many names for the rearrangement phase, such as the model post-processing phase or the business operation intervention phase.

Exploration and utilization: Exploration refers to digging out some hobbies related items that cannot be reflected in the behavior of users; utilization refers to the knowledge learned by the recommendation system based on the user's historical behavior and predicts that users with high probability may be interested thing. For cold-start items and long-tail items, it is a common approach to do exploration during the rearrangement phase. In practice, there are often fixed exposure positions reserved for cold-start items and long-tail items.

Offline recommendation and online recommendation: The so-called offline recommendation means that the recommended result list is pre-calculated and stored in a memory-based NoSQL (such as Amazon ElastiCache for Redis) when it is offline. It is taken directly from NoSQL; the so-called online recommendation means that when a user requests it, the system temporarily generates a recommendation list based on a combination of rules, strategies, or models.

Offline recall and online real-time recall: The so-called offline recall refers to pre-calculating the item candidate set that needs to be recalled in advance and storing it in a memory-based NoSQL when offline; the so-called online real-time recall refers to What is important is that when a user request comes, the recall service temporarily obtains recall candidates based on certain logic (such as using the model to obtain a real-time user interest vector, and then use this user interest vector to the vector retrieval library to find topK similar item vectors) set.

There is a difference in the recall strategy between e-commerce payment recommendation systems and content consumption recommendation systems such as news/movies/videos. For the home page recommendation scenario, their recall strategies or recommendation methods may not be much different. For the scene recommended by the detail page, their recall strategies are very different. The content consumption recommendation system such as news/movies/videos may place the list obtained by the recommendation method based on the similarity of the item representation vector in a more favorable exposure position or It would be better to give the highest priority to the recall strategy based on the similarity of the item representation vector (because for content consumption scenarios, users prefer the similarity of the item content itself); and for e-commerce payment recommendation systems, it may be necessary There are more recommendation methods or recall strategies than content consumption recommendation systems. For example, item-based association recommendation methods or recall strategies may be necessary in e-commerce detail page recommendations, but optional in content consumption recommendation systems. For example, the associated recommendation of "frequently bought together" and/or the associated recommendation of "users who browsed this item also browsed" (because in this scenario, the current user may be interested in the next item in addition to paying attention to the item on the detail page. other items that this item often appears with).

For e-commerce payment recommendation systems, there may be scenarios such as shopping cart page recommendation and payment completion page recommendation. For such a scenario, it may be better to put the list obtained by the association recommendation method in a more favorable exposure position or give the highest priority to the association recommendation recall strategy, while the recall strategy or recommendation method based on the similarity of the item representation vector may be in the This scenario is not suitable, that is to say, when the current purchase intention is very certain, the user prefers the co-occurrence between items, because the user probably does not want to buy another item with similar content immediately. .

Evaluation metrics commonly used in recommender systems

There are two main types of evaluation indicators: online business evaluation indicators and offline evaluation indicators. Generally speaking, online business evaluation indicators are more important (often need to look at multiple indicators together), which include conversion indicators (such as conversion rate, click rate, GMV total turnover, etc.) and content consumption satisfaction indicators (such as retention rate , dwell time, watch time, etc.)

Among the offline evaluation indicators, the most commonly used indicators are AUC and GAUC, especially AUC. AUC is subdivided into AUC-ROC and AUC-PR, with AUC-ROC probably being more commonly used. AUC-ROC means that given a random positive sample and a negative sample, the probability that the classifier outputs the positive sample as positive is greater than the probability that the classifier outputs the negative sample as positive. GAUC (Group AUC) calculates the AUC of each user, then weights the average, and finally obtains the Group AUC. In actual processing, the weight can generally be set to the number of views or clicks of each user, and it is necessary to filter out whether a single user is all positive or negative. For the sample situation, the specific formula is as follows:

image.png

When offline, it is best to pay attention to both AUC and GAUC indicators. In practice, don't pursue a high AUC of the offline verification set too deliberately. A too high AUC of the verification set may indicate that the model is overfit to this verification set, and the online effect may be poor. Generally, the offline AUC may be between 0.7 and 0.85 before going online.

General Recall Strategy for Homepage Recommendation Scenarios

Recall strategy based on heat/popularity/leaderboard

It can be combined from two dimensions: the statistical period and the top-level category of the item. For example, count the number of evaluations of all items of the same purpose and the average score of the item within a certain period of time, and sort according to the ratings. Since the number of evaluations of different items may vary greatly, sorting directly based on the average score is not effective. For the sake of fairness, it is more reasonable to use weighted scoring, you can refer to the following formula:

image.png

v is the number of users participating in the scoring of an item, and m is the threshold of the number of scoring users for screening, that is, if the number of users scoring an item is lower than the threshold, the item will be ignored (for example, 20% of the number of scoring users is used) % quantile to determine the threshold), R is the average score of the item, and C is the average score of all items.

Recall strategy based on item portrait

The so-called item portrait refers to the depiction of a certain aspect of the item itself. For example, the brand of the item, the price of the item, the category of the item, etc., are called the portrait of the item. These portraits have obvious physical meanings, and we call them explicit portraits; if the item id of the item is passed through a model "Black knowledge" learned, this black knowledge we call embedding, this embedding is unexplainable, we call it implicit portrait. From the perspective of explicit portraits and implicit portraits, recall strategies based on item portraits are naturally divided into: recall based on item content and recall based on the overall embedding of the item.

image.png

The item portrait-based recall in the home page recommendation scenario is based on the current user’s dense behavior (dense behavior means that the user has acted on many items, not just 3 or 4 items), which will be introduced later The common recall based on the similarity of the item representation vector in the detail page recommendation scene does not need to consider the dense behavior of the current user. For the recall process based on item content, the structured representation and unstructured representation of the item should not be concatenated directly and used to calculate the similarity between vectors, because they are not representations from the same space. If you want to calculate the similarity of the representation vector, it is best to use it as two different representations of the item and as two different recall strategies; if it is based on a supervised model to classify and model user preferences, structured representation and unstructured Representations can be modeled together as features into a model.

Recall strategy based on collaborative filtering

This method is only designed based on user behavior data, that is, based on the User-Item matrix or the graph composed of user and item, and does not include any other features. In essence, it is the idea of ​​matrix completion. It is precisely because of the matrix-based processing that as long as the user or item changes, or even the action changes, recalculation or retraining may be required (currently there are some methods in the industry to do incremental collaborative filtering or near real-time collaborative filtering). The recall strategy based on collaborative filtering is subdivided into the following three methods: user-based collaborative filtering/UserCF; item-based collaborative filtering/ItemCF; model-based collaborative filtering.

  • Based on user-based collaborative filtering, the core idea is to first calculate the neighbor set of the target user according to the similarity, and then use the weighted combination of neighbor user scores/interactions to make recommendations for the target user. It is usually divided into three steps: first, use the item rating/interaction matrix of all users to calculate the similarity between the target user and other users (using Pearson correlation coefficient, cosine similarity, etc.); then select the most similar to the target user K users; finally, predict the rating/interest level of the target user for each Item that he has not rated/interacted by himself by weighted summation of ratings/interactions of neighbor users. The weighting here refers to using the similarity between users as the weight of scoring/interaction, such as sim(u,ui) in the formula in the figure below.

image.png

U in the above formula represents the set of neighbor users of the target user u (that is, the set of topK similar users), and s represents the item that has appeared in the user-item interaction matrix and has been interacted by neighbor users and has not been interacted by the target user past item. score(ui,s) is user ui's preference for item s, and for implicit feedback, it is 1 (as long as the operation behavior is not directly rated by the user, it is considered implicit feedback, including browsing, clicking, playing, favorites, comments, likes , retweets, etc.), and for non-implicit feedback, the value is the user's rating for the item.

The main disadvantage of UserCF is that as the number of users of the website increases, the time complexity and space complexity of its calculations will explode with the growth of users. News/information/knowledge websites generally use user-based CF to recall, because the articles of these types of websites are updated too fast and too many, it may not be suitable to use item-based CF.

  • Collaborative filtering based on items (item-based), the core is to calculate the similarity of two items based on the Item-Item co-occurrence matrix through a similarity measure, which is different from the content-based recommendation method, and there is no need for item features here The modeling itself is entirely based on the user's historical data on the behavior of the Item. The method is mainly divided into three steps: first, it is necessary to construct an item-item co-occurrence matrix, traverse the training data, calculate the number of users who like two or two items, and fill them in the matrix. Then calculate the similarity between items, you need to punish popular items and active users, the formula is as follows:

image.png

Generate a recommendation list for the user based on the similarity of the item and the user's historical behavior:

image.png

S in the above formula represents the collection of items that appear in the training set; i is the item that user u has acted on and appears in the training set;

image.png

Refers to the target user u's rating on item i (explicit feedback is the user's specific rating, and the value of implicit feedback is 1).

ItemCF It may be the most widely used recall strategy in the industry. For example, Amazon e-commerce, Netflix online video and other websites often use ItemCF as one of the recalls in their homepage recommendations.

  • Model-based collaborative filtering is different from the above two neighborhood-based methods. Model-based CF uses traditional machine learning for modeling. Such as SVD and its variants, graphical models such as SimRank, etc. SVD and its variants are based on the user-item matrix for matrix decomposition. They decompose the User-Item scoring matrix into the product of two low-rank matrices. These two low-rank matrices are the hidden vector sets of User and Item respectively. The user's interest in unseen items is predicted through the dot product of User and Item latent vectors. From this perspective, matrix decomposition is also a method to generate embedding representations.
Recall strategy based on user portrait

Simply put, user portraits are tags for users. One of the important purposes of labeling is to allow people to understand and facilitate computer processing. Recall based on user portraits is the essence of personalized recommendation, because personalization is reflected through user portraits. User portraits include the following three categories:

image.png

The general implementation idea of ​​user portrait is as follows:

image.png

Summarize

This concludes the first lecture of an overview of recommender systems. This article first introduces the common concepts and commonly used evaluation indicators of the recommendation system, and then introduces in detail the four general recall strategies for homepage recommendation scenarios, namely, the recall strategy based on popularity/popularity/ranking list, the recall strategy based on item portrait, and the recall strategy based on collaboration Filtered recall strategy and recall strategy based on user portrait. I believe that now everyone has a deeper understanding of the recommendation system. In the second lecture, we will continue to introduce the rest of the recommendation system overview. Thank you for reading.

image.png

Liang Yuhui is  an Amazon cloud technology machine learning product technical expert, responsible for the consultation and design of machine learning solutions based on Amazon cloud technology, focusing on the promotion and application of machine learning, and deeply participating in the construction and optimization of many real customer machine learning projects. He has extensive experience in distributed training of deep learning models, recommendation systems and computational advertising.

Article source: https://dev.amazoncloud.cn/column/article/630b3545269604139cb5e9e8?sc_medium=regulartraffic&sc_campaign=crossplatform&sc_channel=CSDN 

Guess you like

Origin blog.csdn.net/u012365585/article/details/132329835