An explicit and implicit collaborative filtering recommendation method based on multi-task learning
Through the multi-task learning method, explicit feedback and implicit feedback knowledge sharing solves the shortcomings of existing recommendation systems in the utilization of single feedback, and improves the accuracy of recommendations and the ability to capture user preferences, especially in the same field. Recommended scenario.
Patent Information
- Application Number
- CN202210261079.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-03-16
AI Technical Summary
When existing recommendation systems use a single explicit or implicit feedback, it is difficult to fully utilize the advantages of both types of feedback, resulting in limited recommendation accuracy, especially in terms of reflecting user preferences and privacy protection.
Using a multi-task learning method, we set up auxiliary tasks to handle explicit feedback and implicit feedback respectively, and integrate them into the main task. We use underlying parameters for knowledge sharing to improve the accuracy of recommendations and the ability to capture user preferences.
Through multi-task learning, knowledge sharing of explicit feedback and implicit feedback improves the accuracy of recommendations and the ability to capture user preferences, and enhances the effect of the recommendation system, especially in recommendation scenarios in the same field.
Smart Images

Figure CN114662010B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of recommendation, and is applicable to recommendation scenarios such as movies, books, and food where both explicit and implicit user feedback exist. Background Art
[0002] With the rapid development of the Internet and the increasing penetration rate of the Internet, the Internet has become an important channel for people to obtain information. However, the Internet is full of various information and services, such as movies, books, food, news, etc. When people are faced with such a huge amount of data, they cannot quickly find the information they are interested in or even don’t know what information they are interested in, that is, the problem of information overload occurs.
[0003] Recommendation system is an effective means to solve this kind of problem, and collaborative filtering [1] It is the most widely used recommendation algorithm in recommendation systems. The idea of collaborative filtering is to make recommendations based on group wisdom, find out user information similar to the target user for analysis, and then make reasonable recommendations to the target user. It mainly uses historical interaction records between users and items. Interaction records can be divided into explicit feedback and implicit feedback. The early collaborative filtering method used explicit feedback for rating prediction, constructed a user-item rating matrix with the rating information of users and items, calculated the similarity between users (items) by distance, similarity, etc., and then calculated the similarity into a rating. Then, the items with high ratings were recommended to users, but this method completely relied on the user's rating data for the items. However, in real scenarios, rating records require additional operations from users. At the same time, with the development of artificial intelligence technology and the emergence of various privacy issues, people's awareness of privacy protection has become stronger and stronger. Under such circumstances, it is more and more difficult to collect user rating information. Some users even provide false ratings to the recommendation system in order to protect their personal privacy, which will seriously affect the accuracy of recommendations.
[0004] With the rise of e-commerce and various online platforms, recommending a list of items of interest to users is more in line with the reality of recommendation scenarios. This recommendation method no longer focuses on specific ratings, but simply places the items that users are more interested in at the top of the recommendation list. This is Top-N recommendation, also called ranking recommendation. This type of recommendation algorithm uses implicit feedback, which does not require additional user operations, is easy to collect, and is large in number. Therefore, the use of implicit feedback for recommendation has been widely studied by academia and industry. At the same time, deep learning computer vision [2] , Natural Language Processing [3]With the successful application of deep neural networks in the recommendation field, many researchers have applied deep neural networks to the recommendation field and achieved breakthrough progress. Implicit feedback data contains richer structural information between users and items, and deep neural networks are good at mining complex nonlinear relationships in data, which has led many researchers to turn their attention to implicit feedback. For example, references [4], [5].
[0005] However, in real online platforms, explicit feedback and implicit feedback coexist. Existing research uses a single feedback for recommendation. Some studies in recent years have shown that explicit feedback and implicit feedback have a complementary relationship. [6-8] , using both feedbacks at the same time can effectively improve the accuracy of recommendations. However, existing fusion methods have binarized the specific scores in explicit feedback to a certain extent. For example, a score greater than the average score is marked as 1, otherwise it is marked as 0. This will reduce the ability of explicit feedback to reflect the degree of user preference. At the same time, explicit feedback can more accurately reflect user preferences and the degree of preference. Existing methods interact the explicit feedback features with the implicit feedback features when training the model, and use one feedback as a supplement to the other, which does not fully utilize the respective advantages of the two feedbacks. In order to solve the above shortcomings, the present invention introduces the idea of multi-task learning. [9] , using different auxiliary tasks in one model to process explicit feedback and implicit feedback respectively, making full use of the ability of explicit feedback to reflect user preferences and preference levels as well as the rich structural information of implicit feedback, while allowing the main task of the model to integrate the features of explicit feedback and implicit feedback. Since the underlying parameters of multi-task learning will be jointly updated by three tasks, that is, the knowledge in the explicit feedback and implicit feedback data will be transferred and shared through the underlying parameters, so that both types of data can be implicitly enhanced, further improving the accuracy of recommendations.
[0006] After searching, the application publication number CN112785376A is a multi-field recommendation method based on multi-task learning. For users in multiple fields, the present invention extracts user dimension vectors in multiple fields, integrates the implicit user vectors of users in multiple fields through the combination of fully connected neural networks and "cross-stitch" multi-task learning networks, interactively mines the real implicit interest vectors of users, and improves the accuracy of user recommendations in various fields. The present invention uses multi-task learning technology to integrate user interest preferences in various fields, enrich the implicit interest vectors of users in various fields, and make the recommended items more in line with user needs; and if a single field lacks the user interaction data, it can be combined with user data in other fields to solve the cold start problem of users in this field.
[0007] The above patents are aimed at different fields, and use explicit feedback (rating data) from users in different fields to solve the problem of cold start of users in a certain field. However, the reason why multi-task learning is effective is that each task is related, so that a task can use the additional features provided by other tasks, that is, implicit data enhancement. Therefore, the above patents need to be in two closely related fields (or two fields are similar) to get good recommendation effects. For example, when recommending movies to users, combined with the explicit feedback of users on food, these are undoubtedly two unrelated fields and introduce more noise, which may make the recommendation effect worse. At the same time, the above patents only use the user's display feedback and ignore the user's implicit feedback. The present invention uses both explicit feedback and implicit feedback from users to capture more comprehensive user preferences from the two types of feedback, thereby improving the accuracy of recommendations. In the present invention, both types of user feedback are in one field, such as user ratings of movies (explicit feedback) and user behavior data such as clicking and watching movies (implicit feedback). These two types of feedback are different behaviors generated by users on items in the same field, so when different tasks in multi-task learning are used to process these data, the tasks are strongly correlated, so that knowledge sharing between the two types of feedback can be achieved, thereby improving the accuracy of recommendations. The above patents use the same feedback (explicit feedback) in different fields, while the present invention uses two types of feedback (explicit feedback and implicit feedback) in the same field. However, the present invention can also be applied to other fields where both types of feedback exist, such as movie recommendations, book recommendations, food recommendations, etc.
[0008] [1]Goldberg D,Nichols D,Oki BM,et al.Using collaborative filtering to weave an information tapestry[J].Communications of the ACM,1992,35(12):61-70.
[0009] [2]Gustafsson FK,Danelljan M.,Schon TBEvaluating scalablebayesian deep learning methods for robust computer vision[C] / / 2020 IEEE / CVFConference on Computer Vision and Pattern Recognition Workshops.Piscataway:IEEE,2020:1289-1298.
[0010] [3]Yao Liang,Mao Chengsheng,Luo Yuan.Graph convolutional networks fortext classification[C] / / Proceedings of the AAAI conference on artificialintelligence.Palo Alto:AAAI,2019:7370-7377.
[0011] [4]He Xiangnan,Liao Lizi,Zhang Hanwang,et al.Neural collaborativefiltering[C] / / Proceedings of the 26th International Conference on World WideWeb,WWW 2017.Perth:ACM,2017:173-182
[0012] [5]Xue Hongjian,Dai Xinyu,Zhang Jianbing,et al.Deep matrixfactorization models for recommender systems[C] / / Proceedings of theInternational Joint Conference on Artificial Intelligence(IJCAI).Melbourne:IJCAI,2017:3203-3209.
[0013] [6]Liu Nannathan N,Xiang Evanwei,Zhao Min,et al.Unifying explicit andimplicit feedback for collaborative filtering[C] / / Proceedings of the 19thACMinternational conference on Information and knowledge management.Toronto:ACM,2010:1445-1448.
[0014] [7]Jadidinejad AH,Macdonald C.,Ounis I.Unifying explicit and implicit feedback for rating prediction and ranking recommendation tasks[C] / / Proceedings of the 2019 ACM SIGIR International Conference on Theory ofInformation Retrieval.Santa Clara:ACM,2019:149-156.
[0015] [8] Chen Biyi, Huang Ling, Wang Changdong, et al. Collaborative filtering recommendation algorithm integrating explicit feedback and implicit feedback[J]. Journal of Software, 2020, 31(3): 794-805.
[0016] [9]Ruder S.An overview of multi-task learning in deep neural networks[EB / OL].http: / / arxiv.org / abs / 1706.05098. Summary of the invention
[0017] The present invention aims to solve the above problems of the prior art. A method for explicit and implicit collaborative filtering recommendation based on multi-task learning is proposed. The technical solution of the present invention is as follows:
[0018] An explicit and implicit collaborative filtering recommendation method based on multi-task learning comprises the following steps:
[0019] S1, data preprocessing step: Integrate the historical interaction data of explicit feedback and implicit feedback, use the leave-one-out method to divide the test set and training set, and then sample a certain number of negative samples for each test data and training data, and organize the explicit feedback into a scoring matrix;
[0020] S2, set up the three task steps of the model respectively: set up auxiliary task 1 and auxiliary task 2 to process explicit feedback and implicit feedback respectively, and a main task to fuse explicit feedback and implicit feedback;
[0021] S3, objective function integration step: Integrate the losses of the three tasks into one loss function, use this loss function as the objective function when training the model, and then optimize this objective function;
[0022] S4, step of obtaining a recommendation list: taking the user ID and some item IDs that the user has not interacted with as input to the model, a personalized recommendation list generated for the user is obtained.
[0023] Furthermore, the data preprocessing step in step S1 includes: the data set includes explicit feedback and implicit feedback, generally including user ID, item ID, rating, whether there is implicit interaction, if there is implicit interaction between the user and the item, it is marked as 1, otherwise it is marked as 0, and at the same time, the displayed feedback records are integrated into a rating matrix, in which the unrated positions are filled with 0, and then the integrated data set is divided into a training set and a test set using the leave-one-out method.
[0024] Furthermore, the use of the leave-one-out method to divide the integrated data set into a training set and a test set specifically includes: taking the latest interaction record of each user in the integrated data set as a test set, and the remaining records as a training set.
[0025] Furthermore, the step S1 samples a certain number of negative examples for each test data and training data, and organizes the explicit feedback into a scoring matrix, which specifically includes:
[0026] A certain number of negative samples are sampled for each test data and training data. Negative samples refer to the IDs of items that have not been interacted with by users. Four negative samples are sampled for each training data, and 99 negative samples are sampled for each test data. That is, 100 test samples are used to test whether the model can correctly put the item that has been interacted with by the user into the recommendation list, and observe the position of the item in the recommendation list to evaluate the accuracy of the recommendation list. The rating data is organized into a rating matrix, r ui Then is the element of the scoring matrix, u and i correspond to the u-th row and i-th column of the matrix respectively, so the scoring matrix is constructed as follows:
[0027]
[0028] Furthermore, S2 sets three tasks of the model respectively: auxiliary task 1 and auxiliary task 2 are set to process explicit feedback and implicit feedback respectively, and a main task is used to integrate explicit feedback and implicit feedback, specifically including:
[0029] (1) Set auxiliary task 1 to process explicit feedback: embed the rows and columns of the rating matrix to obtain the preference vectors e for users and items respectively. u d i , using cosine similarity to calculate e u d i The similarity is then mapped to [0,1] to obtain the final output of the task. The calculation method is:
[0030]
[0031] Among them, cosine and sigmoid represent the cosine similarity and the activation function of the output layer respectively. The cross entropy loss is used as the objective function of this task. The loss of this task is
[0032] L ECF The calculation method is:
[0033]
[0034] Where u and i represent a user and an item respectively, and y + ,y - ,y ui Respectively represent the positive sample set, the negative sample set, and whether there is implicit interaction between user u and item i (that is, the actual label of a piece of data);
[0035] (2) Set auxiliary task 2 to process implicit feedback: represent the user ID and item ID using one-hot vectors, and use the embedding mechanism to embed the one-hot vectors of the user and item to obtain the user latent vector p u and item latent vector q i ; The possibility of interaction between user u and item i is obtained through the inner product The calculation method is:
[0036]
[0037] Finally, the cross entropy loss function is used as the objective function of this task. The loss L of this task is EICF The calculation is as follows:
[0038]
[0039] Furthermore, the setting of the main task to fuse explicit feedback and implicit feedback specifically includes: interacting the user global preference vector extracted from the explicit feedback with the item potential vector extracted from the implicit feedback to obtain two vectors that can represent the user's preference for the item; obtaining the preference vector of user u for item i from the user's perspective, using the two preference vectors as the input of the neural network, and obtaining the output of the main task. The calculation is as follows:
[0040]
[0041] ......
[0043]
[0044]
[0045] Where W * , b * 、h * represents the weight, bias, and output of a layer, α * ReLU is the activation function of the hidden layer, while Sigmoid is the activation function of the output layer. σ represents a way of connecting two vectors in the input layer, such as multiplying the elements at corresponding positions of the vectors. At the same time, the output results of the two auxiliary tasks are aggregated to obtain the output of the main task. The calculation is as follows:
[0046]
[0047] Finally, the cross entropy loss function is used as the objective function of this task, which is calculated as follows:
[0048]
[0049] Furthermore, the main task step of setting the fusion of explicit feedback and implicit feedback includes: interacting the global preference vector obtained from the explicit feedback and the potential vector obtained from the implicit feedback, and the calculation method is:
[0050] f ui =e u ⊙q i
[0051] g iu =d i ⊙p u
[0052] where f ui and g iu They represent the user preference vector from the user's perspective and the user preference vector from the item's perspective respectively, and ⊙ represents the multiplication of the corresponding positions of the vectors.
[0053] Furthermore, the S3, integrated objective function specifically includes: optimizing the model by adopting the joint learning method in multi-task learning, integrating the losses of the three tasks into one loss function, taking the loss function as the objective function of the model, and then optimizing the objective function, and the calculation method is as follows:
[0054] L=L EICF +L EICF (L ECF +L ICF ).
[0055] Furthermore, the step S4 of obtaining the recommendation list specifically includes: integrating the user ID and some item IDs into <user ID, item ID> pairs, using their one-hot representations as inputs to the model, and obtaining the personalized recommendation list for the user through calculations of the model.
[0056] The advantages and beneficial effects of the present invention are as follows:
[0057] The present invention proposes a multi-task based explicit and implicit collaborative filtering recommendation method, which uses explicit feedback and implicit feedback at the same time, and adopts a multi-task learning model to share the knowledge of the two feedbacks. The fusion method of this method is more reasonable than the fusion method of using one feedback as the supplementary data of another feedback, and gives full play to the advantages of the two feedbacks, thereby improving the accuracy of the recommendation.
[0058] The present invention combines the idea of multi-task learning to propose a collaborative filtering recommendation method (MTLEICF) that integrates explicit feedback and implicit feedback. The features of explicit feedback and implicit feedback are extracted respectively through different tasks. The advantage of this is that the features of each type of data are different. A task can extract the features of explicit feedback very well, but this task can definitely extract the features of implicit feedback very well. Vice versa, different tasks are used to process different data to extract the features of the data very well. At the same time, the main task is used to integrate the features of explicit feedback and implicit feedback. When a task is used to integrate the features of explicit feedback and implicit feedback, the output of the main task is combined with the outputs of the two tasks to obtain an accurate prediction result. The underlying parameters of the model constructed by the present invention are shared by three tasks, and the three tasks will optimize the underlying parameters, which enables the knowledge of explicit feedback and implicit feedback to be transferred to each other through the underlying parameters, and the knowledge is shared, thereby improving the accuracy of the recommendation list. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 The present invention provides a preferred embodiment MTLEICF framework diagram;
[0060] Figure 2 is a schematic diagram of a user preference vector provided by the present invention;
[0061] Figure 3 It is a graph of experimental results of MTLEICF and a comparative method provided by the present invention under different prediction factors;
[0062] Figure 4 It is a graph of experimental results of MTLEICF and a comparison method provided by the present invention under different recommendation list lengths. DETAILED DESCRIPTION
[0063] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.
[0064] The technical solution of the present invention to solve the above technical problems is:
[0065] An explicit and implicit collaborative filtering recommendation method based on multi-task learning. The basic framework of this method is as follows Figure 1 As shown, it includes the following steps:
[0066] S1. Data preprocessing. The dataset used in this example is the public MovieLens (ML-1M) dataset, which contains 1 million ratings of 3706 movies by 6040 users, and each user has at least 20 ratings. Implicit feedback can be obtained by ignoring the specific ratings, because when the rating behavior occurs, implicit interaction must also occur. Let r ui is the rating of item i by user u, y ui =1 means that user u and item i have implicit interaction, y ui = 0, no implicit interaction occurs. Then the implicit feedback is converted as follows: the <user ID, item ID> pair with a rating is marked as 1, otherwise it is marked as 0. ui ,y ui >For such a quadruple, the leave-one-out method is used to divide the test set and the training set. That is, the user's latest interaction is used as the test set, and the other records are used as the training set. Then, a certain number of negative samples are sampled for each test data and training data. Negative samples refer to item IDs that have not interacted with the user. In this example, 4 negative samples are sampled for each training data, and 99 negative samples are sampled for each test data. That is, in 100 test samples, the model is tested to see whether it can correctly put the item that has interacted with the user into the recommendation list, and observe the position of the item in the recommendation list, so as to evaluate the accuracy of the recommendation list. The rating data is organized into a rating matrix, r ui Then is the element of the scoring matrix, u and i correspond to the u-th row and i-th column of the matrix respectively, so the scoring matrix is constructed as follows:
[0067]
[0068] S2. Set the three tasks of the model separately: set auxiliary task 1 and auxiliary task 2 to process explicit feedback and implicit feedback respectively, and a main task is used to fuse explicit feedback and implicit feedback.
[0069] (1) Set auxiliary task 1 to process explicit feedback: embed the rows and columns of the rating matrix to obtain the preference vectors e for users and items respectively. u di . Use cosine similarity to calculate e u d i The similarity is then mapped to [0,1] to obtain the final output of the task. The calculation method is:
[0070]
[0071] Using cross entropy loss as the objective function of this task, the loss L of this task ECF The calculation method is:
[0072]
[0073] (2) Set auxiliary task 2 to process implicit feedback: Use one-hot vectors to represent user IDs and item IDs, because the user and item vectors represented by one-hot encoding are high-dimensional and sparse. Take user encoding as an example. In this example, the user has 6040 bits, so the user's one-hot encoding is 6040-dimensional, and only one dimension is 1, and the other dimensions are 0. High-dimensional sparse vectors cannot directly participate in the calculation of neural networks, so it is necessary to use an embedding mechanism to embed the one-hot vectors of users and items to obtain the user's latent vector p u and item latent vector q i The embedding size in this example is set to 64 by default. Then, the possibility of user u interacting with item i is obtained through the inner product The calculation method is:
[0074]
[0075] Finally, the cross entropy loss function is used as the objective function of this task. The loss L of this task is ICF The calculation is as follows:
[0076]
[0077] (3) Setting the main task to fuse explicit feedback and implicit feedback: The global preference vector of the user (item) extracted from the explicit feedback is interacted with the item (user) potential vector extracted from the implicit feedback to obtain two vectors that can represent the user's preference for the item. Although these two preference vectors have the same meaning, they are observed from different angles. Figure 2 The following figure shows the preference vector diagram of user u for item i from the user's perspective. Then the two preference vectors are used as the input of the neural network to obtain the output of the main task. The calculation is as follows:
[0078]
[0079] ......
[0081]
[0082]
[0083] Where W * , b * represents weight and bias, α * Represents the activation function. The activation function of the hidden layer is ReLU, while the activation function of the output layer is Sigmoid. At the same time, the output results of the two auxiliary tasks are aggregated to obtain the output of the main task. The calculation is as follows:
[0084]
[0085] Finally, the cross entropy loss function is used as the objective function of this task. The loss L of this task is EICF The calculation is as follows:
[0086]
[0087] S3. Integrated objective function: The present invention uses the joint learning method in multi-task learning to optimize the model, so the losses of the three tasks are integrated into one loss function, and this loss function is used as the objective function of this model, and then the objective function is optimized. The calculation method is as follows:
[0088] L=L EICF +L EICF (L ECF +L ICF )
[0089] S4. Obtain recommendation list: The user ID and some item IDs that the user has not interacted with are sorted into <user ID, item ID> pairs as input, and a personalized recommendation list can be generated for the user through model calculation.
[0090] Application of the method on the MovieLens (ML-1M) dataset
[0091] We use the public dataset MovieLens (ML-1M), which contains 1 million ratings of 3706 movies by 6040 users, with each user having at least 20 ratings. The methods involved in the comparative experiment are:
[0092] MLP: This method is an improvement on the latent semantic model, using a multi-layer neural network to replace the inner product operation in traditional matrix decomposition.
[0093] NeuMF: This method is a "shallow + deep" model structure. MLP can capture the deep relationship between users and items, while generalized matrix factorization (GMF) can capture the shallow relationship between users and items. NeuMF combines these two methods for recommendation. This model is one of the most advanced collaborative filtering recommendation models.
[0094] DeepCF: This method uses formula (3.1) to construct the interaction matrix and extracts the latent vectors of users and items from the interaction matrix, combining the advantages of representation learning and matching learning.
[0095] MTLEICF: The method proposed in this invention.
[0096] The hit rate (HR) and normalized discounted cumulative gain (NDCG) are used to evaluate the recommendation list. The hit rate (HR) measures whether the positive examples in the test set are in the ranking list, while the NDCG measures the ranking of the positive examples in the ranking list. The higher the ranking, the greater the NDCG.
[0097] First, we conducted the HR@10 and NDCG@10 of all methods under different prediction factors. The prediction factor refers to the dimension of the output vector of the hidden layer of the neural network of the main task. HR@10 represents the HR index when the length of the recommendation list is 10, and the same is true for NDCG@10. The experimental results are shown in the figure. Figure 3 . From the figure, we can see that MTLEICF performs better than other methods in both indicators. The advantage of MTLEICF is not only the two types of feedback data used, but also the knowledge of the two types of feedback is shared through the underlying parameters, thereby improving the model's ability to capture user preferences. The HR@10 and NDCG@10 of all models generally increase with the increase in the number of predictors. It cannot be ignored that when the predictor increases to a certain extent, this growth trend gradually slows down, and some models even show a downward trend. This is because the larger the predictor, the higher the dimension of the embedding vector. Although the higher the dimension of the embedding vector can contain more features, it may also make the model more prone to overfitting, thereby reducing the performance of the model. MTLEICF is still rising with the increase of the predictor, which shows that MTLEICF is less likely to overfit, and continuing to increase the predictor will not reduce the performance of the model. Then the performance of each model at different recommendation list lengths (Factors = 16) was evaluated. The experimental results are as follows: Figure 4. In general, the HR@k and NDCG@k of all models have similar changing trends on different data sets, gradually increasing and tending to be moderate as the length of the recommendation list increases. Moreover, MTLEICF performs better than other methods. It can also be seen from the figure that MTLEICF performs better than the baseline model when the recommendation list is small, and the advantage of MTLEICF becomes more obvious as the length of the recommendation list increases. At the same time, the NDCG@k of MTLEICF is significantly better than the baseline model, which shows that MTLEICF better captures the user's preferences, and the items that the user is interested in are given a higher ranking, which effectively improves the ranking quality. The above experiments illustrate the effectiveness of the present invention.
[0098] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0099] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0100] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. An explicit and implicit collaborative filtering recommendation method based on multi-task learning, characterized in that: The following steps are involved: S1, data preprocessing step: Integrate the historical interaction data of explicit feedback and implicit feedback, use the leave-one-out method to divide the test set and training set, and then sample a certain number of negative samples for each test data and training data, and organize the explicit feedback into a scoring matrix; S2, set up the three task steps of the model respectively: set up auxiliary task 1 and auxiliary task 2 to process explicit feedback and implicit feedback respectively, and a main task to fuse explicit feedback and implicit feedback; S3, objective function integration step: Integrate the losses of the three tasks into one loss function, use this loss function as the objective function when training the model, and then optimize this objective function; S4, step of obtaining a recommendation list: taking the user ID and the item IDs that the user has not interacted with as input to the model, a personalized recommendation list generated for the user is obtained; The S2 sets three tasks of the model respectively: auxiliary task 1 and auxiliary task 2 are set to process explicit feedback and implicit feedback respectively, and a main task is used to fuse explicit feedback and implicit feedback, specifically including: (1) Set auxiliary task 1 to process explicit feedback: embed the rows and columns of the rating matrix to obtain the preference vectors e for users and items respectively. u d i , using cosine similarity to calculate e u d i The similarity is then mapped to [0,1] to obtain the final output of the task. The calculation method is: Among them, cosine and sigmoid represent the activation function of cosine similarity and output layer respectively; cross entropy loss is used as the objective function of this task, and the loss of this task is L ECF The calculation method is: Where u and i represent a user and an item respectively. y ui Respectively represent the positive sample set, the negative sample set, and whether there is implicit interaction between user u and item i; (2) Set auxiliary task 2 to process implicit feedback: represent the user ID and item ID using one-hot vectors, and use the embedding mechanism to embed the one-hot vectors of the user and item to obtain the user latent vector p u and item latent vector q i ; The possibility of interaction between user u and item i is obtained through the inner product The calculation method is: Using cross entropy loss as the objective function of this task, the loss L of this task is ICF The calculation is as follows: Setting the main task to integrate explicit feedback and implicit feedback specifically includes: interacting the user global preference vector extracted from the explicit feedback with the item potential vector extracted from the implicit feedback to obtain two vectors that can represent the user's preference for the item; obtaining the preference vector of user u for item i from the user's perspective, using the two preference vectors as the input of the neural network, and obtaining the output of the main task The calculation is as follows: ...... Where W*, b * 、h * Indicates the weight, bias, and output of a layer. The symbol * represents 2…L, W L It represents the weight matrix of the L-th layer neural network, α * Represents the activation function. The activation function of the hidden layer is ReLU, while the activation function of the output layer is Sigmoid. σ represents a way for the input layer to connect two vectors and aggregate the output results of the two auxiliary tasks to obtain the output of the main task. The calculation is as follows: Finally, the cross entropy loss function is used as the objective function of this task. The loss L of this task is EICF The calculation is as follows: The steps for setting up the main task of fusing explicit feedback and implicit feedback include: interacting the global preference vector obtained from the explicit feedback with the potential vector obtained from the implicit feedback, and the calculation method is: f ui =e u ⊙q i g iu =d i ⊙p u where f ui and g iu They represent the user preference vector from the user's perspective and the user preference vector from the item's perspective respectively, and ⊙ represents the multiplication of the corresponding positions of the vectors.
2. According to the method of claim 1, the explicit and implicit collaborative filtering recommendation method based on multi-task learning is characterized in that: The data preprocessing step in step S1 includes: the data set includes explicit feedback and implicit feedback, generally including user ID, item ID, rating, whether there is implicit interaction, if there is implicit interaction between the user and the item, it is marked as 1, otherwise it is marked as 0, and at the same time, the displayed feedback records are integrated into a rating matrix, in which the unrated positions are filled with 0, and then the integrated data set is divided into a training set and a test set using the leave-one-out method.
3. The method for explicit and implicit collaborative filtering recommendation based on multi-task learning according to claim 2, characterized in that: The use of the leave-one-out method to divide the integrated data set into a training set and a test set specifically includes: taking the latest interaction record of each user in the integrated data set as a test set, and the remaining records as a training set.
4. The method for explicit and implicit collaborative filtering recommendation based on multi-task learning according to claim 2 or 3, characterized in that: The step S1 further samples a certain number of negative examples for each test data and training data, and organizes the explicit feedback into a scoring matrix, specifically including: A certain number of negative samples are sampled for each test data and training data. Negative samples refer to the IDs of items that have not been interacted with by users. Four negative samples are sampled for each training data, and 99 negative samples are sampled for each test data. That is, 100 test samples are used to test whether the model can correctly put the item that has been interacted with by the user into the recommendation list, and observe the position of the item in the recommendation list to evaluate the accuracy of the recommendation list. The rating data is organized into a rating matrix, r ui Then is the element of the scoring matrix, u and i correspond to the u-th row and i-th column of the matrix respectively, so the scoring matrix is constructed as follows:
5. The method for explicit and implicit collaborative filtering recommendation based on multi-task learning according to claim 1, characterized in that: The S3, integrated objective function specifically includes: optimizing the model by adopting the joint learning method in multi-task learning, integrating the losses of the three tasks into one loss function, taking the loss function as the objective function of the model, and then optimizing the objective function. The calculation method is as follows: L=L EICF +L ECF +L ICF .
6. The method for explicit and implicit collaborative filtering recommendation based on multi-task learning according to claim 5, characterized in that: The step S4 of obtaining the recommendation list specifically includes: integrating the user ID and the item ID into a <user ID, item ID> pair, using their one-hot representation as the input of the model, and obtaining the personalized recommendation list of the user through calculation of the model.
