CN115809374B - Method, system, device and storage medium for correcting mainstream deviation of recommendation system - Google Patents
Method, system, device and storage medium for correcting mainstream deviation of recommendation system Download PDFInfo
- Publication number
- CN115809374B CN115809374B CN202310104256.6A CN202310104256A CN115809374B CN 115809374 B CN115809374 B CN 115809374B CN 202310104256 A CN202310104256 A CN 202310104256A CN 115809374 B CN115809374 B CN 115809374B
- Authority
- CN
- China
- Prior art keywords
- user
- mainstream
- dynamic
- vector
- interaction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Abstract
The invention discloses a method, a system, equipment and a storage medium for correcting mainstream deviation of a recommendation system, belongs to mainstream deviation correction of the recommendation system in the field of data recommendation, and aims to solve the technical problems of low overall recommendation accuracy and low recommendation fairness caused by the fact that the mainstream deviation is not fully considered by the recommendation system in the prior art. According to the method, the mainstream score of the user is calculated and weighted, then the weighted user interaction data is used as training data of model training, through the method, the mainstream degree of the user can be considered in the reconstruction of the model, the phenomenon of excessively recommending popular articles can be avoided, the influence of mainstream deviation on the recommendation system can be effectively reduced, the effect of the recommendation system on a wider user group is improved, higher fairness is realized, the overall recommendation accuracy of the recommendation system is improved, and the recommendation fairness of the recommendation system is higher.
Description
Technical Field
The invention belongs to the technical field of data recommendation, relates to the field of mainstream deviation correction of a recommendation system, and particularly relates to a method, a system, equipment and a storage medium for correcting mainstream deviation of the recommendation system.
Background
With the expansion of the scale of the internet and information systems, the amount of information generated by the internet and information systems also shows an explosive growth situation, and the difficulty of a user in retrieving the content desired by the user from mass information is greatly improved. At present, various websites use a recommendation system in the background, the recommendation system calculates candidate products most suitable for being recommended to a user according to the access characteristics of the user, and then the candidate products are displayed to the user for selection. As a technology capable of effectively solving information overload, the recommendation system can filter out the most interesting part of the user from massive contents according to personalized requirements of different users, so that the recommendation system is widely applied to the fields of e-commerce, video and audio entertainment, accurate advertisement delivery and the like. The collaborative filtering method is a common method in a recommendation system, and can be divided into user-based collaborative filtering and article-based collaborative filtering according to different targets. The collaborative filtering based on the users takes the users as the center, and the idea is to recommend articles similar to the users to the target users; item-based collaborative filtering is item-centric, with the idea being to recommend similar items to a target item to a user who likes the current item. However, due to the influence of the user crowd effect, the platform display mechanism, the quality difference of the articles, and other factors, a phenomenon that the interaction of many users is concentrated on a small part of the articles easily occurs. The traditional collaborative filtering method is easy to learn the deviation in the training process, so that the small part of popular items tend to be recommended, and the large part of the popular items are difficult to obtain the recommended opportunity, so that the recommendation result cannot reflect the real preference of the user. This causes that the recommendation effect received by the mainstream users who like to pursue the hot spot is often very good, while the recommendation effect received by the rest of the broader user groups is not satisfactory, and the received recommendation effect of different users is greatly different due to different mainstream degrees, which is the mainstream deviation phenomenon in the recommendation system.
Most of the existing deviation correcting schemes start from the perspective of articles, namely, the mainstream deviation is indirectly reduced by correcting the popularity deviation of the articles in a recommendation system. The invention patent application with the application number of CN202110218946.5 discloses a causal reasoning method for correcting popularity deviation of a recommendation system, which comprises the following steps: acquiring a matching score of a user and an article in a current recommendation system; predicting an item score according to the popularity of the item, and predicting a user score according to the preference of the user; and aggregating the matching scores of the user and the articles, the article scores and the user scores, predicting the matching scores of the user and the articles, and removing the influence caused by the popularity deviation to obtain the final matching scores of the user and the articles. The method is a model-independent counterfactual reasoning framework, can be suitable for various recommendation systems, improves the recommendation performance of the recommendation system by eliminating the popularity deviation, and can provide high-quality and accurate personalized recommendation content for users. The method is the same as other article-based collaborative filtering methods, mainly aims at improving the phenomenon that recommendation is concentrated on a small part of popular articles, reduces the influence of the popular articles on the overall model recommendation decision in the training process by adopting modes such as inverse tendency fraction weighting, and the like, and simultaneously gives higher weight to the long-tail articles to increase the recommendation probability of the long-tail articles.
In recent years, there are also methods for removing mainstream deviation from the perspective of users, such as adjusting weights of different users in a training process, training a model separately for user groups with different preferences, and the like, so as to enhance capturing capability of the model for preferences of a specific user group. The invention patent application with the application number of CN201911056270.3 discloses a recommendation list re-ranking method for improving the diversity of a recommendation system. The method is the same as other collaborative filtering based on the user, different requirements of the user on diversity of the recommendation list can be considered, so that the recommended articles are more fit for real feeling of people, grading deviation of different users on the same article is also considered, the diversity is properly improved on the balance of accuracy and diversity, and the influence on the accuracy is small.
The method for correcting the mainstream deviation of the recommendation system can actually expand the recommendation range of the recommendation system, so that the recommendation system can not be limited to a part of popular articles, but can take care of some long-tail articles, and the fairness problem in article recommendation is solved to a certain extent. However, this does not mean that these long-tailed items can be recommended to the appropriate users, but rather reduces the accuracy of the recommendation system if recommended to mainstream users who prefer to pursue hot spots. Therefore, a method of correcting the deviation of popularity alone does not necessarily play a positive role in correcting the deviation of the mainstream. The existing method for directly correcting the mainstream deviation also has a certain problem, and the effect of the part of users is easily damaged by reducing the weight of the mainstream user in the training process, so that the overall accuracy of the recommendation system is reduced; the method for training different models separately for different user groups also has problems, and the division of the user groups, the training of a plurality of models and the consumption during integration all make the method difficult to realize in the actual production environment. In addition, the existing method for correcting the mainstream deviation does not consider the characteristic of the mainstream change, a group of users belonging to the mainstream at present are not necessarily mainstream users in the past, and a group of users which are not mainstream in the past can also become mainstream users in the future due to pursuit of hot spots.
Disclosure of Invention
The invention aims to: in order to solve the technical problems of low overall recommendation accuracy and low recommendation fairness caused by the fact that a recommendation system does not fully consider mainstream deviation in the prior art, the invention provides a method, a system, equipment and a storage medium for correcting the mainstream deviation of the recommendation system.
The invention specifically adopts the following technical scheme for realizing the purpose:
a method for correcting mainstream deviation of a recommendation system comprises the following steps:
step S1, data collection and processing
Obtaining user information, article information and user article interaction information in a recommendation system, and respectively constructing user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>;
Step S2, calculating the mainstream score
According to co-occurrence vector of articlesCalculating the total number of times of interaction of the object>(ii) a Based on the user co-occurrence vector->Calculating the total number of user interactions>(ii) a Based on total number of times of interaction of items>Total number of user interactions->Item category, count user->Is greater than or equal to the dynamic main flow degree score of>(ii) a According to user>Dynamic mainstream level score ofComputing stationObtaining the global dynamic mainstream degree score by the average value of the dynamic mainstream degree scores of the usersAnd forming the global dynamic mainstream degree scores of all the article categories into a global dynamic mainstream degree vector;
S3, constructing a dynamic mainstream degree characteristic model
Constructing a dynamic mainstream degree characteristic model based on a three-layer perceptron MLP model, wherein the first two layers of the dynamic mainstream degree characteristic model use a ReLU function as an activation function, and the last layer of the dynamic mainstream degree characteristic model uses a softmax activation function; with user information vectorsAnd the global dynamic main flow degree vector ≥ output in step S2>Spliced and used as input of a dynamic mainstream degree characteristic model>Outputting a dynamic mainstream characteristic hidden vector by the dynamic mainstream degree characteristic model;
s4, constructing a collaborative filtering module
Constructing a collaborative filtering module comprising an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model; user interaction dataAn input encoder that calculates user interaction data &>And generates &, respectively>Mean and>a variance constituting a mean vector &' for the user>And the variance vector pick>Wherein both vectors are in the t dimension, forming a mean vector ≥ for the user>And the variance vector pick>Wherein both vectors are t-dimensional, and then generating a h-dimensional user interaction hidden vector ≥ by random sampling>;
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions; step S3, outputting the dynamic mainstream characteristic hidden vector and the user interaction hidden vector output by the encoderThe decoder output reconstructs the user interaction data ≥ as input from the decoder>And reconstructing the dynamic mainstream feature vector->Reconstructing a dynamic mainstream feature vector>For completing the reconstruction of the decoder;
step S5, recommendation result generation
Inputting the user number to be predicted according to the collaborative filtering module obtained by the training completion in the step S4Previously observed user interaction dataThe encoder outputs a user interaction hidden vector ≥>(ii) a Then the user interaction is hidden by the vector->And inputting the dynamic mainstream characteristic hidden vector output by the step S3 into a decoder, and outputting reconstructed user interaction data by the decoder.
Further, in step S1, an arbitrary user is constructed according to the user item interaction informationUser co-occurrence vector with all items>Any item/device is constructed according to user and item interaction information>Co-occurrence vector with all items>;
Wherein, the first and the second end of the pipe are connected with each other,represents the total number of users, and>indicates the total number of items, based on the number of items present in the container>Indicates a item +>Indicates the fifth->Each item>Represents a user>And (iv) an article>In a predetermined interaction condition, based on the presence of a predetermined condition in the system, and>indicates that the article is present>And the user->The interaction scenario of (2).
Further, in step S2, according to the articleCo-occurrence vector with an item->And calculating the total number of times of interaction of the article>;
According to the userCo-occurrence with user vector &>Calculating the total number of times of user interaction, based on the calculated total number of times of user interaction>;
According to the total number of interaction times of the articlesTotal number of user interactions->Articles, and the likeDetermining whether the user is present or not>Is greater than or equal to the dynamic main flow degree score of>(ii) a In case the number of interactions is not sensitive, it is ≥ for the class>Article of, userIs greater than or equal to the dynamic main flow degree score of>Calculating according to the formula (1); in the case of sensitive number of interactions, a @ class>User->Is greater than or equal to the dynamic main flow degree score of>Calculating according to the formula (2);
according to the userDynamic mainstream level score of>Calculating the average of the dynamic mainstream level scores of all users to obtain a global dynamic mainstream level score>The calculation formula is as follows:
then, the global dynamic mainstream degree scores of all the article categories are dividedConstitute a dimension of->Is determined by the global dynamic prevailing degree vector->Expressed as:
wherein the content of the first and second substances,、/>each represents a time +>Representing a hyper-parameter (for controlling a logarithmic curve)>Indicates that the article is present>Belongs to the category->,/>Represents a total number of users, <' > based on>Represents a collection of all users, and>representing the total number of item categories.
Furthermore, a co-occurrence vector weighting process is also performed, and the weighting process is described as: user will be connectedTo belong to the categoryIn combination with a sun or a sun/sun unit>In the interaction->Multiply by user>Is in the category->On a dynamic main flow degree score->;
For user co-occurrence vectorsEach item in the list is weighted, and the co-occurrence vector of the whole user is obtained after the weighting is finishedNormalization using a softmax function results in user interaction data ≥ being used for input to the collaborative filtering module>:
wherein, the first and the second end of the pipe are connected with each other,indicates that the user is pickand place>In the age database, based on age information, based on the age value of the subject>Indicates that the user is pickand place>The binary sex information of (2);
Further, in step S4, the loss function of the filter module is cooperatedIs divided into a reconstruction target loss->Approximate loss of distribution>And dynamic mainstream feature vector approximation loss>Three portions, the loss function>The calculation formula of (c) is:
wherein the content of the first and second substances,represents a user interaction hidden vector, <' > or>Represents user interaction data, and->Represents a posterior distribution of each user data sample, <' > based on the data sample>Represents a variation profile, a variation profile>And the posterior distribution->In the approximation that the difference between the first and second values,represents->Is paired and/or matched>Is desired, is based on>Is hyperparameter, is greater than or equal to>Is a user interaction hidden vector->KL represents KL divergence, and>represents a prior distribution, <' > or>Represents a variance vector, < > based on the variance>Represents the square of the mean vector, <' > is selected>Is hyperparameter, is greater than or equal to>Represents the original dynamic mainstream feature vector, <' > or>Representing the reconstructed dynamic mainstream feature vector.
A system for correcting deviations in a recommendation system mainstream comprising:
the data collection and processing module is used for acquiring the user information, the article information and the user article interaction information in the recommendation system and respectively constructing the user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>;
A mainstream score calculation module for calculating a mainstream score according to the co-occurrence vector of the articleCalculate the total number of times of the interaction of the article->(ii) a Based on the user co-occurrence vector->Calculating the total number of times of the user's interaction>(ii) a Based on the total number of times of interaction of the article>Total number of user interactions->Item category, count user->Dynamic primary flow degree ofNumber/device>(ii) a According to the userIs greater than or equal to the dynamic main flow degree score of>Calculating the average value of the dynamic mainstream degree scores of all the users to obtain a global dynamic mainstream degree score->And the global dynamic mainstream level scores of all the item classes are combined into a global dynamic mainstream level vector->;
The dynamic mainstream degree characteristic model building module is used for building a dynamic mainstream degree characteristic model based on a three-layer perceptron MLP model, the ReLU function is used as an activation function in the first two layers of the dynamic mainstream degree characteristic model, and the softmax activation function is used in the last layer of the dynamic mainstream degree characteristic model; with user information vectorsAnd a global dynamic mainstream level vector output by the mainstream score calculation module>Spliced and used as input of a dynamic mainstream degree characteristic model>Outputting a dynamic mainstream characteristic hidden vector by the dynamic mainstream degree characteristic model;
the collaborative filtering module construction module is used for constructing a collaborative filtering module comprising an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model; user interaction dataAn input encoder that calculates user interaction data &>And generates &, respectively>Mean and->Variance, forming a mean vector ≥ of users>And the variance vector pick>Wherein the two vectors are in t dimension, and then a user interactive hidden vector ^ in h dimension is generated through random sampling>;
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions; dynamic mainstream characteristic hidden vectors output by the dynamic mainstream degree characteristic model building module and user interaction hidden vectors output by the encoderThe decoder output reconstructs the user interaction data ≥ as input from the decoder>And reconstructing a dynamic mainstream feature vector>Reconstructing the dynamic mainstream feature vector->For completing the reconstruction of the decoder;
recommendation generation module for rootInputting user interaction data currently observed by a user to be predicted according to a collaborative filtering module obtained by training of a collaborative filtering module construction moduleThe encoder outputs a user interaction hidden vector ≥>(ii) a Then the user interaction is hidden by the vector->And inputting the dynamic mainstream characteristic hidden vector output by the dynamic mainstream degree characteristic model building module into a decoder, and outputting reconstructed user interaction data by the decoder.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the above method.
A computer-readable storage medium, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of the above-mentioned method.
The invention has the following beneficial effects:
1. in the invention, in the process of dynamically correcting the mainstream deviation, the mainstream score of the user is calculated and weighted, and then the weighted user interaction data is used as the training data of model training.
2. In the invention, a collaborative filtering module based on an asymmetric variational self-encoder is constructed, and the capability of capturing and utilizing dynamic mainstream characteristics of a model is enhanced through asymmetric structural design and introduction of dynamic mainstream characteristic vectors.
3. In the invention, two scenes of sensitive interaction times and insensitive interaction times are fully considered, a method for dynamically calculating the mainstream degree score of the user is provided, the mainstream degree score can be used as input data of a variational self-encoder through a weighting normalization process, the influence of mainstream deviation is fully considered, the overall recommendation accuracy of the recommendation system is improved, and the recommendation fairness of the recommendation system is higher.
Drawings
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a detailed flow diagram of the present invention;
FIG. 3 is a schematic diagram of the structure of the collaborative filtering module according to the present invention.
Detailed Description
Example 1
The embodiment provides a method for correcting a mainstream deviation of a recommendation system, a flow diagram of which is shown in fig. 1, and the method comprises the steps of data collection and processing, mainstream score calculation, dynamic mainstream degree feature model construction, collaborative filtering module construction and recommendation result generation. The detailed flow diagram of the method is shown in fig. 2, and specifically includes:
step S1, data collection and processing
Obtaining user information, article information and user article interaction information in a recommendation system, and respectively constructing user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>。
Constructing any user according to user article interaction informationUser co-occurrence vector with all items,/>Indicates that the user is pickand place>And article>The interaction scenario of (2). In scenarios where the number of interactions is not sensitive (only regarding whether there are interactions, but not regarding the number of interactions, such as movie recommendations, book recommendations, etc.), if an explicit interaction is generated, then ≧>Otherwise->(ii) a In sensitive cases of number of interactions (concern about whether there is an interaction, also concerning the number of interactions, such as music recommendations, short video recommendations, etc.), if an explicit interaction is generated ≧>Wherein->Indicates that the user is pickand place>And article>The number of interactions; otherwise->。
Constructing any article according to user article interaction informationCo-occurrence vector with all articles,/>Indicating a goods>And the user->The interaction scenario of (2). In sensitive interaction times scenarios (only regarding whether there is an interaction, but not regarding the number of interactions, such as movie recommendations, book recommendations, etc.), if an explicit interaction is generated, then ≧>Otherwise->. In sensitive cases of number of interactions (concern about whether there is an interaction, also concerning the number of interactions, such as music recommendations, short video recommendations, etc.), if an explicit interaction is generated ≧>Wherein->Indicates that the article is present>And the user->The number of interactions; otherwise->。
Wherein the content of the first and second substances,represents the total number of users, and>indicates the total number of items, based on the number of items present in the container>Indicates a substance is present>Indicates the fifth->Each item>Representing the user.
Data cleaning is mainly to filter out part of users and articles according to a threshold (for example, to filter out articles with interaction times smaller than a certain threshold), and the purpose is to clear abnormal data to ensure normal operation of a recommendation process.
Step S2, calculating the mainstream score
The step mainly quantizes the user and the global mainstream degree, so that a dynamic mainstream degree feature vector can be generated in the step S3 conveniently. Since the concept of mainstream level involves both individual users and overall users, the mainstream level scores of individual users and global can be calculated separately here.
According to the articleCo-occurrence vector with the item->The total number of interactions of the item can be calculated>. Since the degree of main flow is a dynamically changing concept, the number of item interactions can be filtered over time, if only the occurrence is taken into account>Interactions within a time period, then only the release date is considered @>Previous article with total number of article interactions ofIn which arbitrary objects interactNumber of times>Only data within this time period is considered.
According to the userCo-occurrence vector with user->The total number of interactions by the user can be calculated>. Since the degree of main flow is a dynamically changing concept, the number of user interactions can be filtered over time, if only the occurrence is taken into account>And (3) the total interaction times of the user in the time period are as follows: />Wherein arbitrarily->Considering only the interaction data during this time period, the release date is @>The subsequent item interaction data are all set to 0.
According to the idea of collaborative filtering, the degree of user's mainstream depends on whether their interactive items are interacted with by other users. Meanwhile, the method considers that the preference degrees of users to different categories of articles are inconsistent, so the influence of the article category factor is also considered in the calculation process of the mainstream degree score of the user. According to the total number of interactions of the articleTotal number of user interactions->Articles, and the likeDetermining whether the user is present or not>Is greater than or equal to the dynamic main flow degree score of>. In case the number of interactions is not sensitive, it is ≥ for the class>User->Is greater than or equal to the dynamic main flow degree score of>Calculating according to the formula (1); in the case of sensitive number of interactions, a @ class>User->Dynamic mainstream degree score ofCalculating according to the formula (2);
wherein the content of the first and second substances,will be/are>In a time period, the user->All items that have interacted add up to the number of interactions of all users. Since the power law distribution phenomenon exists in the interaction records of real-world items (namely a small part of items occupy most of interactions, and a large part of items have no interactions), the total interaction times of each item and other users are combined by using a logarithmic function>Performing inhibition, and counting at the bottom>Is a hyper-parameter. In case the number of interactions is not sensitive, the user's dynamic mainstream score is ≥ based on ≥ the number of interactions>Each interaction record is given the same weight. In the case where the number of interactions is sensitive, the user's dynamic mainstream score is ≧ or>Assigning a different weight, based on the number of interactive records, to each of the interactive records>Represents a user>And article>This means that the greater the number of user interactions, the greater the weight of the item in the user mainstream level score evaluation.
According to the userIs greater than or equal to the dynamic main flow degree score of>To for category is ^ er>Is determined, the global dynamic mainstream degree score->Is the average of all users' dynamic mainstream level scores, so a global dynamic mainstream level score ≧>The calculation formula of (c) is:
then, the global dynamic mainstream degree scores of all the article categories are dividedConstitute a dimension of->Is determined by the global dynamic prevailing degree vector->Expressed as:
wherein the content of the first and second substances,、/>all indicate a time>Represents a hyper-parameter (for controlling a logarithmic curve), -is>Indicates that the article is present>Belongs to the category->,/>Represents the total number of users, and>represents a collection of all users, and>representing the total number of item categories.
And then weighting the co-occurrence vectors of the users according to the obtained mainstream degree scores of the users, namely introducing the mainstream information of the users into the co-occurrence vectors. The weighting process is described as: user will beFor belonging to the category of->Is based on>In the interaction->Multiplied by user pick>Is in the category->Dynamic mainstream level score of &>;
For user co-occurrence vectorsEach item in the list is weighted, and the co-occurrence vector of the whole user is obtained after the weighting is finishedUsing softmax functionRow normalization to obtain user interaction data ≥ for input into the collaborative filtering module>:
User interaction data obtained hereAs well as the input of the encoder followed by the collaborative filtering module.
S3, constructing a dynamic mainstream degree characteristic model
Can be calculated according to the step (2) inTime period arbitrary user>Respect to any type of item set >>Is greater than or equal to the prevailing degree score of>. For any user->For all categories of items, the main flow degree scores are calculated, which can form a ^ based on>Vector of dimensions, denoted asThe vector may characterize the userThe mainstream degree of all the item categories, the larger the score of the mainstream degree of an item category is, the more the user prefers popular items in the category, and the smaller the score is, the more the user prefers popular items in the category.
In order to enable the collaborative filtering model in step S4 to make full use of the user information and the global information, a dynamic mainstream feature expression based on the user information and the global information needs to be obtained. A dynamic mainstream level feature model is thus constructed here. And constructing a dynamic mainstream degree feature model based on the three-layer perceptron MLP model, wherein the dynamic mainstream degree feature model is used for extracting key features in user information and global information and reducing the original input into a hidden vector with a lower dimensionality. The first two layers of the dynamic mainstream degree characteristic model use a ReLU function as an activation function, and the last layer of the dynamic mainstream degree characteristic model uses a softmax activation function. With user information vectorsAnd the global dynamic main flow degree vector ≥ output in step S2>Spliced and used as input of a dynamic mainstream degree characteristic model>。
wherein the content of the first and second substances,indicates that the user is pickand place>Is quantified age information and is greater or less than>Indicates that the user is pickand place>The binary gender information of (1);
Input deviceAnd outputting the dynamic mainstream characteristic hidden vector after dimensionality reduction of the three-layer perceptron of the dynamic mainstream degree characteristic model.
S4, constructing a collaborative filtering module
An asymmetric variational self-encoder (VAE) is used as a main structure of the collaborative filtering model, and the structure is shown in fig. 3. The method adopts an asymmetric variational self-encoder to carry out collaborative filtering, and aims to add extra dynamic mainstream degree information into a hidden layer between an encoder and a decoder, so that the decoder can directly utilize personal information of a user and global mainstream degree during decoding.
The collaborative filtering module comprises an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model. User interaction dataAn input encoder that calculates user interaction data &>And generates £ respectively>Mean and->Variance, forming a mean vector ≥ of users>And the variance vector pick>Wherein both vectors are t-dimensional, and then generating a h-dimensional user interaction hidden vector ≥ by random sampling>,. Since the network cannot perform back propagation due to the random sampling method, the re-parameterization method is adopted to complete the sampling process.
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions and are used for generating probability distribution. The dynamic mainstream characteristic hidden vector output in the step S3 and the user interaction hidden vector output by the encoder->The decoder output reconstructs the user interaction data ≥ as input from the decoder>And reconstructing the dynamic mainstream feature vector->Reconstruction of dynamic mainstream featuresSign vector->For completing the reconstruction of the decoder.
The variational autoencoder reasoning process is as follows, assuming the userCorresponding user interaction hidden vector ≥>ComplianceIs normally distributed. Based on the recommender system interaction data characteristic, it is assumed that user interaction data entered into the encoder is @>Obey probability is->The likelihood function of the polynomial distribution of (2) is as follows:
wherein the content of the first and second substances,indicating that the vector is hidden by a user interaction>Determined and/or>Probability of individual item interaction>
In order to enable the network to learn the parameters by back-propagation, a posteriori distributions for each user data sample must be foundSince this posterior distribution is not easy to find, it is used here by using a variation inferenceDistribution of variationTo approximate>. Hypothesis->Satisfies a Gaussian distribution->Wherein->Is a variance vector pick>The diagonal covariance matrix of (2). The optimization goal of the network at this point is that the optimization parameter generates a mean vector ≥ then>And the variance vector pick>So that the differentiation profile->And the posterior distribution->As similar as possible.
Wherein the reparameterization method operates as follows, assuming noiseObey a normal distribution>Hidden vector of user interactionCan be determined by the variance vector>Mean vector @>And noise are linearly combined, so that the network can learn. The reparameterization formula is as follows:
unlike the standard variational self-encoder network, an asymmetric structure is used to obtain the user interaction implicit vectorAfter that, the input generated in step S3 is ^ ed>Spliced on/in>And then fed into the decoder. The generating part of the decoder may be divided into reconstructing user interaction data ≥>And reconstructing the dynamic mainstream feature vector->。
In conclusion, loss function of collaborative filtering model based on asymmetric variational self-encoderIs divided into a reconstruction target loss->Approximate loss of distribution>And a dynamic mainstream feature vector approximation loss>Three sections, loss function>The calculation formula of (c) is:
reconstructing object lossThe purpose of this is to make the reconstructed user interaction data output by the decoder as identical as possible to the user interaction data input to the encoder, the calculation formula being:
distribution approximation lossWith the aim of making the variational distribution->As close as possible to a posterior distribution>For measuring the approximation degree of two distributions, the calculation formula is:
to convert the original dynamic mainstream feature vectorAnd reconstructing the dynamic mainstream feature vector->As an objective function, the negative number of which is taken as a loss term, with the aim of reconstructing the dynamic mainstream feature vector ≥ s>Is directionally correlated with the original dynamic main flow feature vector->As close as possible, losses are approximated by dynamic mainstream feature vectors>The method can enable a decoder to complete the reconstruction process by using the dynamic mainstream characteristics as much as possible. Approximate loss of a dynamic mainstream feature vector>The calculation formula of (2) is as follows:
wherein the content of the first and second substances,represents a user-interactive hidden vector, < '> based on a user's interaction>Represents user interaction data, and->Represents a posterior distribution of each user data sample, <' > based on the data sample>Represents a variational distribution, a variational distribution->And the posterior distribution->In the approximation that the difference between the first and second values,represents->Is paired and/or matched>Is desired, is based on>Is a hyper-parameter for controlling the penalty degree of the distribution similarity degree on the whole objective function, and is used for judging whether the distribution similarity degree is greater than or equal to the penalty degree>Is a user interaction hidden vector->KL represents KL divergence, ->Represents a prior distribution, <' > or>Represents a variance vector, < > based on the variance>Represents the square of the mean vector>Is hyperparameter, is greater than or equal to>Represents the original dynamic mainstream feature vector, <' > or>Representing the reconstructed dynamic mainstream feature vector.
Step S5, recommendation result generation
Inputting the user to be predicted according to the collaborative filtering module obtained by the training completion of the step S4Currently observed user interaction data &>The encoder outputs a mean vector &>And variance vector +>Then according to the formula->Calculating to obtain a user interaction hidden vector->(ii) a Then the user interaction is hidden by the vector->Inputting the dynamic mainstream characteristic hidden vector output in the step S3 into a decoder, and outputting the reconstructed user interaction data by the decoder, wherein the dimensionality of the user interaction data is n-dimensionality, the dimensionality is the same as the quantity of all articles, and the value of each dimensionality is [0,1 ]]In the meantime.
Aiming at the obtained reconstructed user interaction data, firstly, eliminating articles which do not meet the time requirement, and only consideringAnd a previous time period, then any issue time is>And setting the value of the dimension where the subsequent article serial number is positioned as 0. Second, items that have already appeared in the history are culled, and the currently observed interaction is->And recording the dimension serial numbers with the values not being 0, and setting the dimensions of the reconstructed user interaction data as 0. And finally, sorting the reconstructed user interaction data from large to small, wherein the dimension serial number of top-N is the user to be predicted->Front ofAnd N item recommendation lists.
Example 2
The embodiment provides a system for correcting mainstream deviation of a recommendation system, which comprises a data collection and processing module, a mainstream score calculation module, a dynamic mainstream degree feature model construction module, a collaborative filtering module construction module and a recommendation result generation module, wherein the specific content of each module is as follows:
the data collection and processing module is used for acquiring the user information, the article information and the user article interaction information in the recommendation system and respectively constructing the user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>。
Constructing any user according to user article interaction informationUser co-occurrence vector with all items,/>Indicates that the user is pickand place>And article>The interaction scenario of (2). In scenarios where the number of interactions is not sensitive (only regarding whether there are interactions, but not regarding the number of interactions, such as movie recommendations, book recommendations, etc.), if an explicit interaction is generated, then ≧>Otherwise->(ii) a In case of sensitive number of interactions (off)Note if there is an interaction, also note the number of interactions, such as music recommendations, short video recommendations, etc.), if an explicit interaction results ≦>Wherein->Represents a user>And article>The number of interactions; or else>。
Constructing any article according to user article interaction informationCo-occurrence vector with all articles,/>Indicating a goods>And the user->The interaction scenario of (2). In sensitive interaction times scenarios (only regarding whether there is an interaction, but not regarding the number of interactions, such as movie recommendations, book recommendations, etc.), if an explicit interaction is generated, then ≧>Otherwise->. In the case of sensitive interaction times (concerning whether there is interaction, also concerning the number of interactions)E.g., music recommendation, short video recommendation, etc.)), if an explicit interaction is generated ≦ device>In which>Indicates that the article is present>And the user->The number of interactions; otherwise->。
Wherein the content of the first and second substances,represents a total number of users, <' > based on>Indicates the total number of items, based on the number of items present in the container>Indicates a substance is present>Indicates the fifth->Each item>Representing the user.
Data cleaning is mainly to filter out part of users and articles according to a threshold (for example, to filter out articles with interaction times smaller than a certain threshold), and the purpose is to clear abnormal data to ensure normal operation of a recommendation process.
And the mainstream score calculating module is mainly used for quantizing the user and the global mainstream degree and facilitating the generation of the dynamic mainstream degree characteristic vector in the dynamic mainstream degree characteristic model building module. Since the concept of mainstream level involves both individual users and overall users, the mainstream level scores of individual users and global can be calculated separately here.
According to the articleCo-occurrence vector with the item->The total number of interactions of the item can be calculated>. Since the degree of main flow is a dynamically changing concept, the number of item interactions can be filtered over time, if only the occurrence is taken into account>Interactions within a time period, then only the release date is considered @>Previous article with total number of article interactions ofWherein any item has been exchanged a number of times>Only data within this time period is considered.
According to the userCo-occurrence vector with user->The total number of interactions by the user can be calculated>. Since the degree of main flow is a dynamically changing concept, the number of user interactions can be filtered over time, for example only taking into account the occurrence &>And (3) the total interaction times of the user in the time period are as follows: />In which optionally>Considering only the interaction data during this time period, the release date is @>The subsequent item interaction data are all set to 0.
According to the idea of collaborative filtering, the degree of user's mainstream depends on whether their interactive items are interacted with by other users. Meanwhile, the method considers that the preference degrees of users to different categories of articles are inconsistent, so the influence of the article category factor is also considered in the calculation process of the mainstream degree score of the user. According to the total number of interactions of the articleTotal number of user interactions->Item category, count user->Is greater than or equal to the dynamic main flow degree score of>. In case the number of interactions is not sensitive, it is ≥ for the class>User->Is greater than or equal to the dynamic main flow degree score of>Calculating according to the formula (1); in case of sensitive interaction timesDown, for a category->User->Dynamic mainstream degree score ofCalculating according to the formula (2);
wherein the content of the first and second substances,will->In a time period, the user->All items that have interacted add up to the number of interactions of all users. Since the power law distribution phenomenon exists in the interaction records of real-world items (namely a small part of items occupy most of interactions, and a large part of items have no interactions), the total interaction times of each item and other users are combined by using a logarithmic function>Performing inhibition, and counting at the bottom>Is a hyper-parameter. In case the number of interactions is not sensitive, the user's dynamic mainstream score is ≥ based on ≥ the number of interactions>Each interaction record is given the same weight. In thatWith sensitive number of interactions, a user's dynamic mainstream score in &>Assigning a different weight, based on the number of interactive records, to each of the interactive records>Indicates that the user is pickand place>And article>This means that the greater the number of user interactions, the greater the weight in the evaluation of the degree of item occupancy in the score of the degree of mainstream of the user.
According to the userIs greater than or equal to the dynamic main flow degree score of>For a category is->Is determined, the global dynamic mainstream degree score->Is the average of all users' dynamic mainstream level scores, so the global dynamic mainstream level score ≧>The calculation formula of (2) is as follows:
then, the global dynamic mainstream degree scores of all the article categories are dividedConstitute a dimension of->Is determined by the global dynamic prevailing degree vector->Expressed as:
wherein the content of the first and second substances,、/>all indicate a time>Represents a hyper-parameter (for controlling a logarithmic curve), -is>Indicates that the article is present>Belongs to the category->,/>Represents the total number of users, and>representing a total set of users, <' > based on>Representing the total number of item categories.
And then weighting the co-occurrence vectors of the users according to the obtained mainstream degree scores of the users, namely introducing the mainstream information of the users into the co-occurrence vectors. The weighting process is described as: user will beFor belonging to the category of->Is based on>In the interaction->Multiplied by user pick>In category +>Dynamic mainstream level score of &>;
For user co-occurrence vectorsEach item in the list is weighted, and the co-occurrence vector of the whole user is obtained after the weighting is finishedNormalization using a softmax function resulting in user interaction data &forinput to the collaborative filtering module>:
User interaction data obtained hereAlso as a subsequent collaborative filtering moduleThe input of the device.
And the dynamic mainstream degree characteristic model building module is used for building a dynamic mainstream degree characteristic model.
Can be calculated according to the mainstream score calculation module whenSubscriber arbitrarily for a time period>Respect to any type of item set >>Is greater than or equal to the prevailing degree score of>. For any user->Calculating its mainstream score for all of the categories of items, which can constitute a ≧ or { (R) }>Vector of dimensions, denoted asThe vector may characterize the userThe mainstream degree of all the item categories, the larger the score of the mainstream degree of an item category is, the more the user prefers popular items in the category, and the smaller the score is, the more the user prefers popular items in the category.
In order to enable the collaborative filtering model of the collaborative filtering module building module to fully utilize the user information and the global information, a dynamic mainstream feature expression based on the user information and the global information needs to be obtained. A dynamic mainstream level feature model is thus constructed here. Constructing a dynamic mainstream degree characteristic model based on a three-layer perceptron MLP model, extracting key characteristics in user information and global information,and reduces the original input to a hidden vector of lower dimensionality. The first two layers of the dynamic mainstream degree characteristic model use a ReLU function as an activation function, and the last layer of the dynamic mainstream degree characteristic model uses a softmax activation function. With user information vectorsAnd a global dynamic mainstream degree vector output by the mainstream score calculation module>Spliced and used as input of a dynamic mainstream degree characteristic model>。
Wherein the content of the first and second substances,indicates that the user is pickand place>Is quantified age information and is greater or less than>Indicates that the user is pickand place>The binary sex information of (2);
wherein, the first and the second end of the pipe are connected with each other,representing vector stitching operations
Input deviceAnd outputting the dynamic mainstream characteristic hidden vector after dimensionality reduction of the three-layer perceptron of the dynamic mainstream degree characteristic model.
The collaborative filtering module construction module is used for constructing a collaborative filtering module, and adopts an asymmetric variational self-encoder (VAE) as a main structure of a collaborative filtering model, and the structure of the collaborative filtering module is shown in FIG. 3. The method adopts an asymmetric variational self-encoder to carry out collaborative filtering, and aims to add extra dynamic mainstream degree information into a hidden layer between an encoder and a decoder, so that the decoder can directly utilize personal information of a user and global mainstream degree during decoding.
The collaborative filtering module comprises an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model. User interaction dataAn input encoder that calculates user interaction data &>And generates £ respectively>Mean and->Variance, forming a mean vector ≥ of users>And the variance vector pick>Wherein the two vectors are both in t dimension, and then randomly samplingGenerating a user-interaction hidden vector ≥ of h-dimension>,. Since the network cannot perform back propagation due to the random sampling method, the re-parameterization method is adopted to complete the sampling process.
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions and are used for generating probability distribution. Dynamic mainstream characteristic hidden vector output by the dynamic mainstream degree characteristic model building module and user interaction hidden vector/device output by the encoder>The decoder output reconstructs the user interaction data ≥ as input from the decoder>And reconstructing a dynamic mainstream feature vector>Reconstructing the dynamic mainstream feature vector->For completing the reconstruction of the decoder.
The variational autoencoder reasoning process is as follows, assuming the userCorresponding user interaction hidden vector ≥>ComplianceIs normally distributed. Interacting data according to a recommendation systemFeature, presuming user interaction data entered into the encoder>Obey probability is->The likelihood function of the polynomial distribution of (2) is as follows:
wherein the content of the first and second substances,indicating that the vector is hidden by a user interaction>Determined and/or>Probability of individual item interaction;
in order to enable the network to learn the parameters by back-propagation, a posteriori distributions for each user data sample must be foundSince this posterior distribution is not easy to find, the variation distribution is used here by means of variation deductionTo approximate>. Hypothesis->Satisfies a Gaussian distribution->Wherein->Is a variance vector pick>The diagonal covariance matrix of (2). The optimization goal of the network at this point is that the optimization parameter generates a mean vector ≥ then>And the variance vector pick>So that the differentiation profile->And the posterior distribution->As similar as possible.
Wherein the reparameterization method operates as follows, assuming noiseObey a normal distribution>Hidden vector of user interactionCan be determined by the variance vector>The mean vector->And noise are linearly combined so that the network can learn. The reparameterization formula is as follows:
unlike standard variational self-encoder networks, this isThe asymmetric structure is used in the method, and the user interaction hidden vector is obtainedThereafter, the input generated in the dynamic mainstream severity feature model building module is ≥ based on the input ≥ generated in the dynamic mainstream severity feature model building module>Spliced on/in>And then fed into the decoder. The generating part of the decoder may be divided into reconstructing user interaction data &>And reconstructing the dynamic mainstream feature vector->。
In conclusion, loss function of collaborative filtering model based on asymmetric variational self-encoderIs divided into a reconstruction target loss->The distribution is approximately lost>And a dynamic mainstream feature vector approximation loss>Three portions, the loss function>The calculation formula of (2) is as follows:
reconstructing object lossesThe aim of this is to make the reconstructed user interaction data output by the decoder as identical as possible to the user interaction data input to the encoder, the calculation formula being:
distribution approximation lossWith the aim of making the variational distribution->As close as possible to a posterior distribution>For measuring the approximation degree of two distributions, the calculation formula is:
to convert the original dynamic mainstream feature vectorAnd reconstructed dynamic mainstream feature vector>As an objective function, the negative number of which is taken as a loss term, with the aim of reconstructing the dynamic mainstream feature vector ≥ s>Is directionally correlated with the original dynamic main flow feature vector->As close as possible, the loss is approximated by a dynamic main flow feature vector>The method can enable a decoder to complete the reconstruction process by utilizing the dynamic mainstream characteristics as much as possible. Approximate loss of a dynamic mainstream feature vector>The calculation formula of (2) is as follows:
wherein, the first and the second end of the pipe are connected with each other,represents a user interaction hidden vector, <' > or>Represents user interaction data, and->Represents a posterior distribution of each user data sample, based on the posterior distribution of the user data sample>Represents a variational distribution, a variational distribution->And the posterior distribution->In the approximation that the difference between the first and second values,represents->To (X)>Is desired, is based on>Is a hyperparameter for controlling the penalty of distribution similarity on the overall objective function, and>is a user interaction hidden vector->KL represents KL divergence, and>represents a prior distribution, <' > or>Represents a variance vector, < > based on the variance>Represents the square of the mean vector>Is hyperparameter, is greater than or equal to>Represents the original dynamic mainstream feature vector>Representing the reconstructed dynamic mainstream feature vector.
A recommendation result generation module for inputting the user to be predicted according to the collaborative filtering module obtained by the collaborative filtering module construction module after trainingCurrently observed user interaction data ≧>The encoder outputs a mean vector->Sum variance vectorThen according to the formula->Calculating to obtain a user interaction hidden vector>(ii) a Then interact with the userHidden vector->Inputting the dynamic mainstream characteristic hidden vector output by the dynamic mainstream degree characteristic model building module into a decoder, outputting the reconstructed user interaction data by the decoder, wherein the dimensionality of the user interaction data is n-dimensional and is the same as the quantity of all articles, and the value of each dimensionality is [0,1 ]]In the meantime.
Aiming at the obtained reconstructed user interaction data, firstly, eliminating articles which do not meet the time requirement, and only consideringAnd a previous time period, then any issue time is @>And setting the value of the dimension where the subsequent article serial number is positioned as 0. Secondly, items which have already appeared in the history data are eliminated, and the currently observed interaction situation is combined>And recording the dimension serial numbers with the values not being 0, and setting the dimensions of the reconstructed user interaction data as 0. And finally, sorting the reconstructed user interaction data from large to small, wherein the dimension serial number of top-N is the user to be predicted->The top N item recommendation lists.
Example 3
The present embodiment provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the above method for correcting a mainstream deviation of a recommendation system.
The computer device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The computer equipment can carry out man-machine interaction with a user in a keyboard mode, a mouse mode, a remote controller mode, a touch panel mode or a voice control equipment mode.
The memory includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the memory may also include both internal and external storage devices of the computer device. In this embodiment, the memory is usually used for storing an operating system and various types of application software installed on the computer device, for example, program codes of the method for correcting the mainstream deviation of the recommendation system, and the like. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.
The processor may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor is typically used to control the overall operation of the computer device. In this embodiment, the processor is configured to execute the program code stored in the memory or process data, for example, execute the program code of the method for correcting the deviation of the main stream of the recommendation system.
Example 4
The present embodiment provides a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, causes the processor to carry out the steps of the above-mentioned method for correcting a deviation of a mainstream of a recommendation system.
Wherein the computer readable storage medium stores an interface display program executable by at least one processor to cause the at least one processor to perform the steps of the method for correcting a recommended system mainstream deviation as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method for correcting mainstream deviation of a recommendation system according to the embodiment of the present application.
Claims (7)
1. A method for correcting deviations in a recommendation system mainstream comprising the steps of:
step S1, data collection and processing
Obtaining user information, article information and user article interaction information in a recommendation system, and respectively constructing user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>;
Step S2, calculating the mainstream score
At [ t1, t2]Within a time period, according to the co-occurrence vector of the articlesCalculate the total number of times of the interaction of the article->(ii) a Based on the user co-occurrence vector->Calculating the total number of times of the user's interaction>(ii) a Based on the total number of times of interaction of the article>Total number of user interactions->Item category, calculating user &>Dynamic mainstream level score of>(ii) a According to user>Dynamic mainstream level score of>Calculating the average of the dynamic mainstream level scores of all users to obtain a global dynamic mainstream level score>And the global dynamic mainstream level scores of all the item classes are combined into a global dynamic mainstream level vector->;
And carrying out co-occurrence vector weighting processing, wherein the weighting processing is described as follows: user will be connectedFor belonging to the category of->Is based on>In the interaction->Multiplied by user pick>In category +>On a dynamic main flow degree score->;
For user co-occurrence vectorsEach term appearing in (a) is weighted and the entire user co-occurrence vector is then evaluated against>Normalization using a softmax function results in user interaction data ≥ being used for input to the collaborative filtering module>:
S3, constructing a dynamic mainstream degree characteristic model
Dynamic mainstream constructed based on three-layer perceptron MLP modelThe degree characteristic model, the ReLU function is used as an activation function in the first two layers of the dynamic mainstream degree characteristic model, and the softmax activation function is used in the last layer of the dynamic mainstream degree characteristic model; with user information vectorsAnd the global dynamic main flow degree vector ≥ output in step S2>Spliced and used as input of a dynamic mainstream degree characteristic model>Outputting a dynamic mainstream characteristic hidden vector by the dynamic mainstream degree characteristic model;
s4, constructing a collaborative filtering module
Constructing a collaborative filtering module comprising an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model; user interaction dataAn input encoder that calculates user interaction data &>And generates &, respectively>Mean and->A variance constituting a mean vector &' for the user>And the variance vector pick>Where both vectors are in the t dimension, and then by randomizationSampling to generate a user-interaction hidden vector ≥ h-dimension>;
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions; step S3, outputting the dynamic mainstream characteristic hidden vector and the user interaction hidden vector output by the encoderAs input to a decoder, the decoder output reconstructs user interaction data>And reconstructing the dynamic mainstream feature vector->Reconstructing the dynamic mainstream feature vector->For completing the reconstruction of the decoder;
step S5, recommendation result generation
Inputting user interaction data currently observed by the user to be predicted according to the collaborative filtering module obtained by training in the step S4The encoder outputs a user interaction hidden vector ≥>(ii) a Then the user interaction is hidden by the vector->Inputting the dynamic mainstream characteristic hidden vector output in the step S3 into a decoder, and outputting reconstructed user interaction data by the decoder;
in step S1, optional use is constructed according to user article interaction informationHouseholdUser co-occurrence vector with all itemsAnd any item is constructed according to the item interaction information of the user>Co-occurrence vector with all items>;
Wherein the content of the first and second substances,represents a total number of users, <' > based on>Indicates the total number of items, based on the number of items present in the container>Indicates a substance is present>Indicates the fifth->Each item>Representing a userAnd article>In a predetermined condition, or a predetermined condition, based on the presence of a predetermined condition>Indicates that the article is present>And user>The interaction scenario of (2).
2. A method for correcting deviations in a recommendation system mainstream according to claim 1, wherein: in step S2, according to the articleCo-occurrence vector with the item->Calculating the total number of article interactions;
According to the userCo-occurrence vector with user->And the total number of times of interaction of the user is calculated,;
according to the total number of interaction times of the articlesTotal number of user interactions->Item category, count user->Is greater than or equal to the dynamic main flow degree score of>(ii) a In case the number of interactions is not sensitive, it is ≥ for the class>User->Dynamic mainstream level score of>Calculating according to the formula (1); in the case of sensitive number of interactions, a @ class>User->Is greater than or equal to the dynamic main flow degree score of>Calculating according to the formula (2);
according to the userDynamic mainstream level score of>Calculating the average value of the dynamic mainstream degree scores of all the users to obtain a global dynamic mainstream degree score->The calculation formula is as follows:
then, the global dynamic mainstream degree scores of all the article categories are dividedConstitute a dimension of->Is determined by the global dynamic prevailing degree vector->Expressed as:
wherein, the first and the second end of the pipe are connected with each other,、/>all indicate a time>Indicates a hyper-parameter->Indicating a goods>Belongs to the category->,/>Represents the total number of users, and>representing a total set of users, <' > based on>Representing the total number of categories of items.
3. A method for correcting deviations in a recommendation system mainstream according to claim 1, wherein: in step S3, the user information vectorExpressed as:
wherein the content of the first and second substances,represents a user>Is quantified age information and is greater or less than>Indicates that the user is pickand place>The binary gender information of (1); />
4. A method of correcting deviations in a mainstream of a recommender system as set forth in claim 1, wherein: in step S4, the loss function of the collaborative filtering moduleGrouping into reconstruction target loss>Approximate loss of distribution>And a dynamic mainstream feature vector approximation loss>Three sections, loss function>The calculation formula of (2) is as follows:
wherein the content of the first and second substances,represents a user-interactive hidden vector, < '> based on a user's interaction>Represents user interaction data, and->Represents a posterior distribution of each user data sample, <' > based on the data sample>Represents a variation profile, a variation profile>And the posterior distribution->Is approximately, is greater than>Represents->To (X)>In a predetermined direction, in a predetermined direction>In the case of hyper-parameters>Is a user interaction hidden vector->KL represents KL divergence, ->Represents an a priori profile, is>Represents a variance vector, < > based on the variance>Represents the square of the mean vector, <' > is selected>Is hyperparameter, is greater than or equal to>Represents the original dynamic mainstream feature vector, <' > or>Representing the reconstructed dynamic mainstream feature vector.
5. A system for correcting deviations in a recommendation system mainstream comprising:
the data collection and processing module is used for acquiring the user information, the article information and the user article interaction information in the recommendation system and respectively constructing the user co-occurrence vectorsThe co-occurrence vector of the object is greater or less than>;
A mainstream score calculation module for calculating the score at [ t1, t2 ]]Within a time period, according to the co-occurrence vector of the articlesCalculating the total number of times of interaction of the object>(ii) a Based on the user co-occurrence vector->Calculating the total number of times of the user's interaction>(ii) a Based on the total number of times of interaction of the article>Total number of user interactions->Item category, count user->Dynamic mainstream degree score of(ii) a According to user>Is greater than or equal to the dynamic main flow degree score of>Calculating the average value of the dynamic mainstream degree scores of all the users to obtain a global dynamic mainstream degree score->And the global dynamic mainstream level scores of all the item classes are combined into a global dynamic mainstream level vector->;
And carrying out co-occurrence vector weighting processing, wherein the weighting processing is described as follows: user will beFor belonging to the category of->Is based on>In a mobile communication system situation->Multiply by user>Is in the category->On a dynamic main flow degree score->;
For user co-occurrence vectorsEach term appearing in (a) is weighted and the entire user co-occurrence vector is then evaluated against>Normalization using a softmax function results in user interaction data ≥ being used for input to the collaborative filtering module>:
The dynamic mainstream degree characteristic model building module is used for building a dynamic mainstream degree characteristic model based on a three-layer perceptron MLP model, the ReLU function is used as an activation function in the first two layers of the dynamic mainstream degree characteristic model, and the softmax activation function is used in the last layer of the dynamic mainstream degree characteristic model; with user information vectorsAnd a global dynamic mainstream degree vector output by the mainstream score calculation module>Spliced and used as input of a dynamic mainstream degree characteristic model>Outputting a dynamic mainstream characteristic hidden vector by the dynamic mainstream degree characteristic model;
the collaborative filtering module construction module is used for constructing a collaborative filtering module comprising an encoder and a decoder;
the encoder is constructed by adopting a three-layer perceptron MLP model; user interaction dataAn input encoder that calculates user interaction data &>And generates &, respectively>Mean and>variance, forming a mean vector ≥ of users>And variance vector +>Wherein both vectors are t-dimensional, and then generating a h-dimensional user interaction hidden vector ≥ by random sampling>;
The decoder is constructed by adopting a four-layer perceptron MLP model, the first three layers of activation functions of the decoder are tanh functions, and the last layer of activation functions of the decoder are softmax functions; dynamic mainstream characteristic hidden vectors output by the dynamic mainstream degree characteristic model building module and user interaction hidden vectors output by the encoderThe decoder output reconstructs the user interaction data ≥ as input from the decoder>And reconstructing the dynamic mainstream feature vector->Reconstructing the dynamic mainstream feature vector->For completing the reconstruction of the decoder;
a recommendation result generation module for inputting the user interaction data currently observed by the user to be predicted according to the collaborative filtering module obtained by the collaborative filtering module construction module after trainingThe encoder outputs a user interaction hidden vector ≥>(ii) a Then the user interaction is hidden by the vector->Inputting the dynamic mainstream characteristic hidden vector output by the dynamic mainstream degree characteristic model building module into a decoder, and outputting reconstructed user interaction data by the decoder;
in the data collecting and processing module, any user is constructed according to the user article interaction informationUser co-occurrence vector with all items pick>And any item is constructed according to the item interaction information of the user>Co-occurrence vector with all items>;
Wherein the content of the first and second substances,represents the total number of users, and>indicates the total number of items, based on the number of items present in the container>Indicates a item +>Indicates the fifth->Each item>Representing a userAnd article>In a predetermined condition, or a predetermined condition, based on the presence of a predetermined condition>Indicates that the article is present>And the user->The interaction scenario of (2).
6. A computer device, characterized by: comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium characterized by: a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310104256.6A CN115809374B (en) | 2023-02-13 | 2023-02-13 | Method, system, device and storage medium for correcting mainstream deviation of recommendation system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310104256.6A CN115809374B (en) | 2023-02-13 | 2023-02-13 | Method, system, device and storage medium for correcting mainstream deviation of recommendation system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115809374A CN115809374A (en) | 2023-03-17 |
CN115809374B true CN115809374B (en) | 2023-04-18 |
Family
ID=85487843
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310104256.6A Active CN115809374B (en) | 2023-02-13 | 2023-02-13 | Method, system, device and storage medium for correcting mainstream deviation of recommendation system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115809374B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116186421B (en) * | 2023-05-04 | 2023-07-14 | 中国科学技术大学 | Recommendation method, system, equipment and storage medium for eliminating popularity deviation |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113987358A (en) * | 2021-11-15 | 2022-01-28 | 中国科学技术大学 | Training method, recommendation method and recommendation system of recommendation model |
CN114861783A (en) * | 2022-04-26 | 2022-08-05 | 北京三快在线科技有限公司 | Recommendation model training method and device, electronic equipment and storage medium |
CN114912033A (en) * | 2022-05-16 | 2022-08-16 | 重庆大学 | Knowledge graph-based recommendation popularity deviation adaptive buffering method |
CN115129945A (en) * | 2022-06-23 | 2022-09-30 | 阿里巴巴新加坡控股有限公司 | Graph structure contrast learning method, equipment and computer storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080097821A1 (en) * | 2006-10-24 | 2008-04-24 | Microsoft Corporation | Recommendations utilizing meta-data based pair-wise lift predictions |
US10289733B2 (en) * | 2014-12-22 | 2019-05-14 | Rovi Guides, Inc. | Systems and methods for filtering techniques using metadata and usage data analysis |
CN108647226B (en) * | 2018-03-26 | 2021-11-02 | 浙江大学 | Hybrid recommendation method based on variational automatic encoder |
WO2021038592A2 (en) * | 2019-08-30 | 2021-03-04 | Tata Consultancy Services Limited | System and method for handling popularity bias in item recommendations |
CN112184391B (en) * | 2020-10-16 | 2023-10-10 | 中国科学院计算技术研究所 | Training method of recommendation model, medium, electronic equipment and recommendation model |
CN113158024B (en) * | 2021-02-26 | 2022-07-15 | 中国科学技术大学 | Causal reasoning method for correcting popularity deviation of recommendation system |
CN114428910A (en) * | 2022-01-28 | 2022-05-03 | 腾讯科技(深圳)有限公司 | Resource recommendation method and device, electronic equipment, product and medium |
CN115147192A (en) * | 2022-07-29 | 2022-10-04 | 华东师范大学 | Recommendation method and recommendation system based on double-view-angle deviation correction |
CN115438871A (en) * | 2022-09-23 | 2022-12-06 | 哈尔滨商业大学 | Ice and snow scenic spot recommendation method and system integrating preference and eliminating popularity deviation |
-
2023
- 2023-02-13 CN CN202310104256.6A patent/CN115809374B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113987358A (en) * | 2021-11-15 | 2022-01-28 | 中国科学技术大学 | Training method, recommendation method and recommendation system of recommendation model |
CN114861783A (en) * | 2022-04-26 | 2022-08-05 | 北京三快在线科技有限公司 | Recommendation model training method and device, electronic equipment and storage medium |
CN114912033A (en) * | 2022-05-16 | 2022-08-16 | 重庆大学 | Knowledge graph-based recommendation popularity deviation adaptive buffering method |
CN115129945A (en) * | 2022-06-23 | 2022-09-30 | 阿里巴巴新加坡控股有限公司 | Graph structure contrast learning method, equipment and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115809374A (en) | 2023-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Catherine et al. | Transnets: Learning to transform for recommendation | |
CN111127142B (en) | Article recommendation method based on generalized nerve attention | |
EP3862893A1 (en) | Recommendation model training method, recommendation method, device, and computer-readable medium | |
CN111461841B (en) | Article recommendation method, device, server and storage medium | |
CN109102127B (en) | Commodity recommendation method and device | |
CN110969516A (en) | Commodity recommendation method and device | |
EP4181026A1 (en) | Recommendation model training method and apparatus, recommendation method and apparatus, and computer-readable medium | |
CN110084670B (en) | Shelf commodity combination recommendation method based on LDA-MLP | |
CN109903103B (en) | Method and device for recommending articles | |
CN111400603A (en) | Information pushing method, device and equipment and computer readable storage medium | |
CN113761359B (en) | Data packet recommendation method, device, electronic equipment and storage medium | |
CN113158024B (en) | Causal reasoning method for correcting popularity deviation of recommendation system | |
CN114202061A (en) | Article recommendation method, electronic device and medium based on generation of confrontation network model and deep reinforcement learning | |
CN110955826A (en) | Recommendation system based on improved recurrent neural network unit | |
CN115809374B (en) | Method, system, device and storage medium for correcting mainstream deviation of recommendation system | |
CN110598120A (en) | Behavior data based financing recommendation method, device and equipment | |
CN112396492A (en) | Conversation recommendation method based on graph attention network and bidirectional long-short term memory network | |
US20240037133A1 (en) | Method and apparatus for recommending cold start object, computer device, and storage medium | |
CN116452293A (en) | Deep learning recommendation method and system integrating audience characteristics of articles | |
CN115544379A (en) | Quaternion map convolutional neural network-based recommendation method and device | |
CN115456656A (en) | Method and device for predicting purchase intention of consumer, electronic equipment and storage medium | |
Chae et al. | Adversarial training of deep autoencoders towards recommendation tasks | |
CN112801743B (en) | Commodity recommendation method and device, electronic equipment and storage medium | |
Peng et al. | Credit scoring model in imbalanced data based on cnn-atcn | |
CN113763111A (en) | Article collocation method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |