A negative sample sampling method based on personalized recommendation system

By estimating user interest transfer and calculating negative sample sampling probability in the personalized recommendation system, the problem of negative sample collection in the personalized recommendation system is solved, the performance and accuracy of the recommendation system are improved, and the ability to adapt to changes in user interests is improved.

CN118657591BActive Publication Date: 2024-10-25LIAOCHENG LAIKE INTELLIGENT ROBOT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411139571.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-10-25
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

In personalized recommendation systems, collaborative filtering algorithms based on implicit feedback are difficult to effectively collect negative samples. Existing negative sampling methods may ignore changes in users' specific interests or cause instability, and lack expertise in incremental learning frameworks.

Method used

By estimating the user's interest transfer between time blocks, using sliding windows to count the number of interactions between users and items, calculating the interest transfer probability and negative sample sampling probability, sampling high-quality negative samples, and integrating them into the incremental learning model , update the implicit representation vectors of users and items.

Benefits of technology

It improves the performance of the recommendation system, enables the model to better adapt to changes in user interests, generates more accurate recommendation results, and balances the stability and flexibility of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_3
    Figure QLYQS_3
  • Figure QLYQS_7
    Figure QLYQS_7
  • Figure QLYQS_10
    Figure QLYQS_10
Patent Text Reader

Abstract

A negative sample sampling method based on a personalized recommendation system belongs to the field of personalized recommendation, including: step 1: collecting user historical interaction data, counting the number of user interactions with different commodity categories in different time windows; step 2: according to the user's historical interaction data, using a sliding window method, within a given time window, the number of user interactions with each commodity category is counted as a positive sample; step 3: calculating the user interest transfer probability, and at the same time calculating the sampling probability of negative samples; step 4: sampling items in each category according to probability, combining the sampled negative samples with positive samples, training the recommendation model, and then obtaining the number of negative sample samplings; step 5: incremental learning model update, and redeployment online. The present invention estimates the user's interest transfer relative to the project cluster between time blocks, uses the estimated user interest change to bias the negative sampler, and provides high-quality negative samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of personalized recommendation, and in particular relates to a negative sample sampling method based on a personalized recommendation system. Background Art

[0002] Recommendation systems are core components of modern online platforms. They aim to provide personalized product or content recommendations by analyzing user preferences and behaviors. With the popularity of the Internet and the surge in user-generated data, the application of recommendation systems in fields such as e-commerce, social media, and content distribution has become increasingly important. Recommendation systems are information recommendation technologies based on information such as user behavior and content features. Their main goal is to provide users with relevant items, services, or information. Recommendation systems can make recommendations based on a variety of factors such as user historical behavior, real-time behavior, and content features, such as content-based recommendations, collaborative filtering-based recommendations, and hybrid recommendations based on content and collaborative filtering. In recommendation systems, items that users like are considered positive samples, and items that users do not like are considered negative samples. However, in actual recommendation scenarios, considering the difficulty of data collection, it is difficult to obtain users' explicit feedback information (such as users' ratings of items) to know exactly which items users like and dislike. Most of the data is users' implicit feedback information (such as records of items that users have consumed). For implicit feedback, the data does not have clear labels. In order to train the model, it is generally assumed that items that users have interacted with are positive examples, and a portion of the items that users have not interacted with are selected as negative examples through sampling.

[0003] Generally speaking, it is difficult to collect negative samples, and positive samples account for a small proportion of the entire sample set. Therefore, in order to better train the model, negative sampling is required, and a part of negative examples are extracted to assist the model in learning and improve the model's computational efficiency.

[0004] For collaborative filtering algorithms based on implicit feedback, if negative sampling is not performed for each item that a user interacts with, and all items that the user has not interacted with are optimized as negative examples, then the update of each user will involve all item embeddings, which is inefficient. Although negative sampling is crucial in training based on implicit feedback, there is currently no negative sampling technology specifically for incremental learning frameworks. Current negative sampling methods still have limitations. For example, negative sampling methods based on item popularity may ignore changes in user-specific interests, and random negative sampling methods may cause instability. Summary of the invention

[0005] The purpose of the present invention is to provide a negative sample sampling method based on a personalized recommendation system, by estimating the user's interest transfer relative to item clusters between time blocks, and then using the estimated user interest changes to bias the negative sampler to provide high-quality negative samples.

[0006] The technical solution adopted by the present invention is:

[0007] A negative sample sampling method based on a personalized recommendation system includes the following steps:

[0008] Step 1: Collect user historical interaction data;

[0009] Collect the interaction data between users and products, including user ID, product ID and interaction time, and use this interaction data to count the number of times users interact with different product categories in different time windows, where the time window is set according to actual conditions;

[0010] Step 2: Positive sample counting statistics;

[0011] Based on the user's historical interaction data, a sliding window method is used to count the number of interactions between the user and each product category within a given time window as positive samples;

[0012] Step 3: Calculate the probability of user interest transfer and the sampling probability of negative samples;

[0013] Negative samples refer to products that users have not interacted with;

[0014] Assume that there are K categories of goods in total. At time t, the number of interactive goods between a single user u and K categories is , the total number of interactions between a single user u and all commodities at time t is , then the probability of interest transfer of a single user u in each category from time t-1 to time t is:

[0015] ;

[0016] in, is the probability of interest transfer; is the coefficient; is the time decay function, and the calculation formula is:

[0017] ;

[0018] Among them, Tt is the difference between the current time T and time t, is the attenuation coefficient;

[0019] Calculate the sampling probability of negative samples based on the posterior distribution and the probability of interest transition :

[0020] ;

[0021] in, The number of negative samples of category k selected for user u at time t;

[0022] Finally, according to the sampling probability of each product category, negative samples are sampled for each user in the current time window;

[0023] Step 4: Negative sample sampling;

[0024] The items in each category are sampled according to probability, and the negative samples obtained by sampling are combined with the positive samples to train the recommendation model; according to the sampling probability of each category , and Y negative samples for each category K and each user u that have not interacted at time t, the number of negative sample samples for each category K is calculated as ;

[0025] Step 5: Incremental learning model update;

[0026] Use negative sample sets to train collaborative filtering models and update implicit representation vectors of users and products; fuse some newly added sample data with the old model to obtain a fused recommendation model; use the fused recommendation model to provide real-time recommendation services to users;

[0027] Integrating a negative sampler into incremental learning can effectively improve the performance of the recommendation system and enable the model to better adapt to changes in user interests. This ensures that the model can always learn the latest user interests and generate more accurate recommendation results.

[0028] Furthermore, the calculation process of the posterior distribution is:

[0029] Assume that the interest distribution of a single user u in K categories at time t conforms to the Dirichlet distribution, expressed as:

[0030] ;

[0031] in, is a multidimensional beta function,

[0032] ;

[0033] in, represents the gamma function, usually expressed as ;

[0034] Using prior Dirichlet distribution and multinomial distribution Calculate the user's posterior distribution as , the calculation formula is as follows:

[0035] ;

[0036] in, is the intermediate variable, is N factorial, where N represents the total number of negative samples extracted from all categories. and is an exponential function, which means of The power and of Second power, is the probability distribution vector of different samples of user u at time t; is the probability vector containing K;

[0037] The multinomial distribution of negative sample counts for each user u at time t is used to describe the probability distribution of users for samples of different categories. The calculation formula is:

[0038] ;

[0039] in, .

[0040] Beneficial effects of the present invention:

[0041] The negative sample sampling method of the present invention generates high-quality negative samples in a targeted manner by tracking changes in user interests, thereby improving the performance of the recommendation system. The method is easy to implement and has good scalability, and can be widely used in various personalized recommendation scenarios.

[0042] Specifically:

[0043] (1) The introduction of the time decay factor can more accurately reflect the changing trend of user interests.

[0044] (2) It can track the changes in the interaction ratio of each user to different item categories in different time blocks, thereby modeling the changes in user interests and providing personalized guidance for negative sampling.

[0045] (3) Based on the prediction results of the previous time block, more difficult and more informative negative samples are selected from the samples that are predicted by the model to be negative but are actually positive, thereby improving the training effect.

[0046] (4) Adjusting the sampling strategy of the negative sample library according to changes in user interests can enable the recommendation system model to adapt to changes in user interests more quickly.

[0047] (5) By encouraging the model to remember stable user preferences and selectively forget the parts where user interests change, the stability and flexibility of the model are balanced. DETAILED DESCRIPTION

[0048] A negative sample sampling method based on a personalized recommendation system includes the following steps:

[0049] Step 1: Collect user historical interaction data;

[0050] In the online shopping system of e-commerce, the interaction data between users and products can be obtained from the user behavior logs of the e-commerce platform, such as user clicks, purchases, browsing, etc. The data usually contains the following information:

[0051] User ID: an identifier that uniquely identifies a user, Product ID: an identifier that uniquely identifies a product, Interaction time: the timestamp of the user's interaction with the product, Interaction type: for example, click, purchase, browse, etc.

[0052] Step 2: Positive sample counting statistics;

[0053] Based on the user's historical interaction data, a sliding window method is used to count the number of interactions between the user and each product category within a given time window as positive samples;

[0054] Sliding window method: Divide the user's historical interaction data into multiple time windows, such as daily, weekly, monthly, etc. In each time window, count the number of user interactions with different product categories.

[0055] Product categories: Product categories can be divided according to the attributes of the products, such as clothing, home appliances, digital products, etc.

[0056] Sample count: For each user, count the number of items they interact with in each time window and do the statistics by item category.

[0057] In this embodiment, the data of the user with id 1 purchasing three commodities at different times is counted by taking the week as the time window, as shown in the following table. The values ​​corresponding to the three commodities represent the purchase quantity:

[0058] User ID Time window apparel Home Appliances Digital 1 2022-12-25 5 10 5 1 2023-01-02 3 3 9

[0059] Step 3: Calculate the probability of user interest transfer and the sampling probability of negative samples;

[0060] Interest transfer probability: that is, calculate the interest transfer probability of each user in each category in different time windows, from t-1 to t. Assume that there are K categories of products, and the number of interactive products between a single user u and K categories at time t is , the total number of interactions between a single user u and all commodities at time t is , then the probability of interest transfer of a single user u in each category from time t-1 to time t is:

[0061] ;

[0062] in, is the probability of interest transfer; is the coefficient; is the time decay function; is the attenuation coefficient; Tt is the difference between the current time T and time t;

[0063] assumed The attenuation coefficient is 0.01. =90, the current time is 2023-01-03, then the probability of user 1's interest transfer on 2023-01-02 is:

[0064] ;

[0065] ;

[0066] ;

[0067] Then calculate the sampling probability of negative samples according to the interest transfer probability :

[0068] ;

[0069] Assume that 9 negative samples are expected to be drawn, and the initial situation is that each category are all 30, then the sampling probabilities of each category for user 1 are as follows:

[0070] ;

[0071] ;

[0072] ;

[0073] Step 4: Negative sample sampling;

[0074] Assume that user 1 needs to collect 90 negative samples on 2023-01-02. The number of negative samples for clothing, home appliances, and digital products are:

[0075] Clothing: User 1 randomly samples 90X0.3345=30 negative samples from the clothing samples that were not interacted with on 2023-01-02.

[0076] Home appliances: User 1 randomly samples 90X0.3850=35 negative samples from the home appliance samples that were not interacted with on 2023-01-02.

[0077] Digital: User 1 randomly samples 90X0.2805=25 negative samples from the digital samples that were not interacted with on 2023-01-02.

[0078] Correspondingly, the interest transfer probabilities of the three product categories are adjusted as follows:

[0079] The number of interactions of user 1 in the home appliance category began to decline from the time window of 2023-01-02, indicating that his interest in home appliances may have weakened. Therefore, in order to more accurately reflect the user's current preferences, the negative sample sampling probability of the home appliance category should be increased, for example, from the initial 0.33 to 0.38.

[0080] On the contrary, the number of interactions with digital products increased during the same period, from 5 to 9, which indicates that user 1 may have a stronger interest in digital products. Therefore, the probability of negative sample sampling for digital products should be reduced accordingly, for example, from the initial 0.33 to 0.28.

[0081] Final result:

[0082] The negative samples sampled by user 1 on 2023-01-02 are: 30 negative samples of clothing, 35 negative samples of home appliances, and 25 negative samples of digital products.

[0083] Step 5: Update the incremental learning model and redeploy it online;

[0084] User 1 has a high interest in home appliances on December 25, 2022, but his interest in home appliances has decreased on January 2, 2023, while his interest in digital products has increased. Perform incremental learning on January 2, 2023: Use the user-product interaction matrix and negative sample set of user 1 from December 25, 2022 to January 2, 2023 for model training. Update the implicit representation vectors of user 1's clothing, home appliances, and digital products. According to step 4, reduce the negative sample sampling probability of digital products, while increasing the negative sample sampling probability of home appliances. Update the model using the incremental update strategy, and use the weighted average method to fuse the newly trained model with the old model. The updated model will eventually recommend digital products to user 1 with a high probability. Better capture changes in user interests and generate more accurate recommendation results. This can help user 1 discover products that they may be interested in, thereby improving the user experience.

Claims

1. A negative sample sampling method based on a personalized recommendation system, characterized in that: The following steps are involved: Step 1: Collect user historical interaction data; Collecting the interaction data between users and commodities, including user ID, commodity ID and interaction time, and counting the number of user interactions with different commodity categories in different time windows through the interaction data, wherein the time window is set according to the actual situation; Step 2: Positive sample counting statistics; Based on the user's historical interaction data, a sliding window method is used to count the number of interactions between the user and each product category within a given time window as positive samples; Step 3: Calculate the probability of user interest transfer and the sampling probability of negative samples; Assume that there are K categories of goods in total. At time t, the number of interactive goods between a single user u and K categories is , the total number of interactions between a single user u and all commodities at time t is , then the probability of interest transfer of a single user u in each category from time t-1 to time t is: ; in, is the probability of interest transfer; is the coefficient; is the time decay function, and the calculation formula is: ; Among them, Tt is the difference between the current time T and time t, is the attenuation coefficient; Calculate the sampling probability of negative samples based on the posterior distribution and the probability of interest transition : ; in, The number of negative samples of category k selected for user u at time t; Finally, according to the sampling probability of each product category, negative samples are sampled for each user in the current time window; Step 4: Negative sample sampling; The items in each category are sampled according to probability, and the negative samples obtained by sampling are combined with the positive samples to train the recommendation model; according to the sampling probability of each category , and Y negative samples for each category K and each user u that have not interacted at time t, the number of negative sample samples for each category K is calculated as ; Step 5: Incremental learning model update; Use the negative sample set to train the collaborative filtering model and update the implicit representation vectors of users and products; fuse some of the newly added sample data with the old model to obtain a fused recommendation model; use the fused recommendation model to provide real-time recommendation services to users.

2. The negative sample sampling method based on the personalized recommendation system according to claim 1, characterized in that: The calculation process of the posterior distribution is: Assume that the interest distribution of a single user u in K categories at time t conforms to the Dirichlet distribution, expressed as: ; in, is a multidimensional beta function, ; in, represents the gamma function, expressed as ; Using prior Dirichlet distribution and multinomial distribution Calculate the user's posterior distribution as , the calculation formula is as follows: ; in, is the intermediate variable, is N factorial, where N represents the total number of negative samples extracted from all categories. and is an exponential function, which means of The power and of Second power, is the probability distribution vector of different samples of user u at time t; is the probability vector containing K; The multinomial distribution of the negative sample counts for each user u at time t is calculated as: ; in, .