CN115809374A - 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
- CN115809374A CN115809374A CN202310104256.6A CN202310104256A CN115809374A CN 115809374 A CN115809374 A CN 115809374A CN 202310104256 A CN202310104256 A CN 202310104256A CN 115809374 A CN115809374 A CN 115809374A
- Authority
- CN
- China
- Prior art keywords
- mainstream
- user
- dynamic
- vector
- degree
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 82
- 238000003860 storage Methods 0.000 title claims abstract description 15
- 230000003993 interaction Effects 0.000 claims abstract description 238
- 238000012549 training Methods 0.000 claims abstract description 17
- 239000013598 vector Substances 0.000 claims description 215
- 230000006870 function Effects 0.000 claims description 54
- 238000001914 filtration Methods 0.000 claims description 52
- 238000009826 distribution Methods 0.000 claims description 50
- 238000004364 calculation method Methods 0.000 claims description 29
- 230000004913 activation Effects 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 12
- 238000010276 construction Methods 0.000 claims description 10
- 238000005070 sampling Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 8
- 238000013480 data collection Methods 0.000 claims description 7
- 230000000694 effects Effects 0.000 abstract description 6
- 238000012937 correction Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 5
- 230000002452 interceptive effect Effects 0.000 description 5
- 238000004140 cleaning Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 230000007474 system interaction Effects 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001364 causal effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
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 interaction data of the user after weighting is used as the training data of model training, through the method, the mainstream degree of the user can be considered in the reconstruction of the model, and the phenomenon of excessively recommending popular goods can not occur, so that the influence of mainstream deviation on a 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 during the training process, so that the recommendation of a small part of popular items is prone to be realized, and the recommendation of a large part of items is difficult to obtain the recommendation 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 application number 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 deviations 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 make the method difficult to realize in the actual production environment. In addition, the existing method for correcting the deviation of the main stream does not consider the characteristic of the change of the main stream, a group of users belonging to the main stream at present are not necessarily the main stream users in the past, and a group of users not belonging to the main stream in the past can also become the main stream 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 vectorsCo-occurrence vector of article;
Step S2, calculating the mainstream score
According to co-occurrence vector of articlesCalculating the total interaction times of the articles(ii) a According to user co-occurrence vectorsCalculating the total number of interactions of the user(ii) a According to the total number of interactions of the articleTotal number of interactions of userItem categories, computing usersDynamic mainstream degree score of(ii) a According to the userDynamic mainstream level score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreAnd forming global dynamic mainstream degree scores of all 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 mainstream degree vector output by the step S2Spliced and used as input of dynamic mainstream degree characteristic modelOutputting 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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (a) and generate separatelyMean value ofVariance, forming a mean vector of the userSum variance vectorWherein the two vectors are both in t dimension, and constitute the mean vector of the userSum variance vectorWherein the two vectors are both in t dimension, and then h dimension user interaction hidden vectors are generated 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 encoderAs input to a decoder, the decoder output reconstructs user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor 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 the training completion in the step S4The encoder outputs a user interaction hidden vector(ii) a Then the user interaction is hiddenAnd 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, any user is constructed according to the user item interaction informationUser co-occurrence vector with all itemsConstructing any article according to the user article interaction informationCo-occurrence vector with all articles;
Wherein,which represents the total number of users,the total number of items is indicated and,the items are shown as being in the form of objects,is shown asThe number of the articles is one,representing a userAnd articlesThe interaction situation of (a) is,representing an articleAnd the userThe interaction scenario of (2).
Further, in step S2, according to the articleCo-occurrence vector with articleCalculating the total number of article interactions;
According to the userCo-occurrence vector with userAnd 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 interactionsItem categories, computing usersDynamic mainstream level score of(ii) a In the case of insensitive number of interactions, for the categoryArticle of, userDynamic mainstream level score ofCalculating according to the formula (1); in the case of sensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (2);
according to the userDynamic mainstream degree score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreThe calculation formula is as follows:
then, the global dynamic mainstream degree scores of all the article categories are dividedMake up a dimension ofGlobal dynamic mainstream level vector ofExpressed as:
wherein,、all of which represent the time of day,representing the hyper-parameter (for controlling the logarithmic curve),representing an articleBelong to the category,Which represents the total number of users,a set of all the users is represented,representing the total number of categories of items.
Furthermore, a co-occurrence vector weighting process is also performed, and the weighting process is described as: user will beTo belong to the categoryArticle of (2)Of the interaction situationMultiplication by the userIn the category ofDynamic mainstream degree score of;
For user co-occurrence vectorsEach item in the list is weighted, and after the weighting is finished, the co-occurrence vector of the whole user is obtainedNormalizing by using a softmax function to obtain user interaction data for inputting into the collaborative filtering module:
wherein,representing a userThe age information of the person to be treated is quantified,representing a userThe binary gender information of (1);
Further, in step S4, the loss function of the filter module is cooperatedDividing into reconstructed target lossesDistribution approximation lossAnd dynamic mainstream eigenvector approximation lossThree parts, loss functionThe calculation formula of (2) is as follows:
wherein,a hidden vector representing the user interaction is shown,representing the data of the user interaction(s),representing the posterior distribution of each user data sample,representing variation distributionAnd posterior distributionIn the approximation that the difference between the first and second values,to representTo pairIn the expectation that the position of the target is not changed,in order to be a hyper-parameter,is a user interaction implicit vectorKL represents the KL divergence,a distribution is represented a priori, which is,which represents a vector of the variance (m) of the signal,which represents the square of the mean vector and,in order to be a hyper-parameter,representing the original dynamic mainstream feature vector,representing the reconstructed dynamic mainstream feature vector.
A system for correcting deviations in a mainstream of a recommendation system, 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 vectorsCo-occurrence vector of article;
A mainstream score calculation module for calculating a mainstream score based on the co-occurrence vector of the articleCalculating the total interaction times of the articles(ii) a According to user co-occurrence vectorsCalculating the total number of interactions(ii) a According to the total number of interaction times of the articlesTotal number of user interactionsItem categories, computing usersDynamic mainstream level score of(ii) a According to the userDynamic mainstream degree score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreAnd forming the global dynamic mainstream degree scores of all the article categories into a global dynamic mainstream degree 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 the global dynamic mainstream degree vector output by the mainstream fraction calculation moduleSpliced as input of dynamic mainstream degree characteristic modelOutputting 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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (1), and separately generateMean value ofVariance, forming a mean vector of usersSum variance vectorWherein the two vectors are both in t dimension, and then h dimension user interaction hidden vectors are generated 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 function of the decoder is softmax functions; dynamic mainstream feature hidden vectors output by a dynamic mainstream degree feature model building module and user interaction hidden vectors output by an encoderAs input to the decoder, the decoder outputs reconstructed user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor 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 hiddenAnd 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 carry out the steps of the above method.
A computer-readable storage medium, storing a computer program 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 by 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 a 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 vectorsCo-occurrence vector of article。
Constructing any user according to user article interaction informationUser co-occurrence vectors with all items,Representing a userAnd articlesThe interaction scenario of (2). In the scene with insensitive interaction times (only paying attention to whether there is interaction, but not paying attention to the interaction times, such as movie recommendation, book recommendation and the like), if explicit interaction is generatedOtherwise(ii) a In the case of sensitive interaction times (concerning whether there is an interaction, and also concerning the number of interactions, such as music recommendation, short video recommendation, etc.), if an explicit interaction is generatedWhereinRepresenting a userAnd articlesThe number of interactions; otherwise。
Constructing any article according to user article interaction informationCo-occurrence vector with all articles,Representing an articleAnd the userThe interaction scenario of (2). In the scene with sensitive interaction times (only paying attention to whether there is interaction, but not paying attention to the interaction times, such as movie recommendation, book recommendation and the like), if explicit interaction is generatedOtherwise, otherwise. In case of sensitive interaction times (concerning whether there is any interaction, and also concerning the number of interactions, such as music recommendations, short video recommendations, etc.), if an explicit interaction is generatedIn whichRepresenting an articleAnd the userThe number of interactions; otherwise。
Wherein,which represents the total number of users,the total number of items is indicated and,to represent an item of material that is,denotes the firstThe number of the articles is increased, and the articles,representing the user.
The 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 of the data cleaning is to remove 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 articleThe total number of interactions of the article can be calculated. Since the degree of mainstream is a dynamically changing concept, the number of item interactions can be filtered based on time, e.g. only considering the occurrenceInteraction in the time period only takes the release date into considerationPrevious item with total number of item interactions ofNumber of interactions of any article thereinOnly data within this time period is considered.
According to the userCo-occurrence vector with userThe total number of interactions of the user can be calculated. Since the degree of mainstream is a dynamically changing concept, the number of user interactions can be filtered according to time, e.g. only considering the occurrenceAnd (3) the total interaction times of the user in the time period are as follows:wherein is arbitraryOnly the interactive data in the time period is considered, and the release date isThe 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 interaction times of the articlesTotal number of interactions of userItem category, computing userDynamic mainstream degree score of. In the case of insensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (1); in the case of sensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (2);
wherein,will be provided withWithin a time period, the userAll items that have interacted add up to the number of interactions of all users. The phenomenon of power law distribution (i.e. small part) due to the interactive recording of real world objectsItems occupy most of the interactions, and most items have little), so the total number of interactions with other users for each item using a logarithmic functionInhibition, base numberIs a hyper-parameter. Dynamic mainstream score of user in case of insensitive interaction timesEach interaction record is given the same weight. Dynamic mainstream score of user in case of sensitive interaction timesEach interaction record is given a different weight,representing a userAnd articlesThis 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 userDynamic mainstream level score ofFor categories ofArticle of (1), global dynamic mainstream level scoreIs the average of the dynamic mainstream level scores of all users, so the global dynamic masterFractional degree of flowThe calculation formula of (c) is:
then, the global dynamic mainstream degree scores of all the article categories are dividedMake up a dimension ofGlobal dynamic mainstream level vector ofExpressed as:
wherein,、both of which represent the time that it takes,representing the hyper-parameter (for controlling the logarithmic curve),representing an articleBelong to the category,Which represents the total number of users,a set of all the users is represented,representing the total number of categories of items.
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 be connectedTo belong to the categoryArticle ofOf the interaction situationMultiplication by the userIn the category ofDynamic mainstream degree 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 finishedNormalizing by using softmax function to obtain user interaction data for inputting into the collaborative filtering module:
User interaction data derived therefromAs 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 slot arbitrary userWith respect to any category of item collectionsMain stream degree score of. For any userCalculating its mainstream level scores for all the categories of the item set, these mainstream level scores may constitute oneVector 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 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 mainstream degree vector output by the step S2Spliced as input of dynamic mainstream degree characteristic model。
wherein,representing a userThe age information of the person to be treated is quantified,representing a userThe binary gender information of (1);
Input the methodAnd 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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (1), and separately generateMean value ofVariance, forming a mean vector of the userSum variance vectorWherein the two vectors are both in t dimension, and then h dimension user interaction hidden vector is generated 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 by the step S3 and the user interaction hidden vector output by the encoderAs input to the decoder, the decoder outputs reconstructed user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor completing the reconstruction of the decoder.
The variational autoencoder reasoning process is as follows, assuming the userCorresponding user interaction hidden vectorComplianceNormal distribution of (c). Assuming user interaction data input to the encoder according to the recommendation system interaction data characteristicsObey probability ofThe likelihood function of the polynomial distribution of (1) is as follows:
wherein,representing hidden vectors interacted by userIs determined and isProbability 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 estimationTo approximate. Suppose thatSatisfy a Gaussian distributionIn whichIs a variance vectorDiagonal covariance matrix of. Then the optimization goal of the network at this time is to optimize the parameter generation mean vectorSum variance vectorMake variation distributeAnd posterior distributionAs similar as possible.
Wherein the reparameterization method operates as follows, assuming noiseObey normal distributionUser interaction implicit vectorMay be represented by a variance vectorMean vector ofAnd 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 vectorThereafter, the input generated in step S3 is inputtedIs spliced atAnd then fed into the decoder. The generating part of the decoder may be divided into reconstructing user interaction dataAnd reconstructing dynamic mainstream feature vectors。
In conclusion, loss function of collaborative filtering model based on asymmetric variational self-encoderDividing into reconstructed target lossesDistribution approximation lossAnd dynamic mainstream eigenvector approximation lossThree parts, loss functionThe calculation formula of (2) is as follows:
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 lossIs to make the variation distributedAs close to a posterior distribution as possibleFor measuring the approximation degree of two distributions, the calculation formula is:
in order to convert the original dynamic mainstream feature vectorAnd reconstructing dynamic mainstream feature vectorsWith its negative number as a loss term, with the aim of enabling the reconstruction of dynamic mainstream feature vectorsIn the direction of original dynamic main flow feature vectorApproximate losses by dynamic mainstream feature vectors as close as possibleThe method can enable a decoder to complete the reconstruction process by using the dynamic mainstream characteristics as much as possible. Dynamic mainstream feature vectorApproximate lossThe calculation formula of (c) is:
wherein,a hidden vector representing the user interaction is shown,representing the data of the user interaction(s),representing the posterior distribution of each user data sample,representing variation distributionAnd posterior distributionIn the approximation that the difference between the first and second values,to representTo pairIn the expectation of the above-mentioned method,is a hyper-parameter, is used for controlling the punishment of the distribution similarity degree to the whole objective function,is a user interaction implicit vectorOf (2)The degree, KL, indicates the KL divergence,which represents a distribution a priori, and,the variance vector is represented by a vector of variances,which represents the square of the mean vector and,in order to be a super-parameter,representing the original dynamic mainstream feature vector,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 dataEncoder output mean vectorSum variance vectorThen is represented by the formulaCalculating to obtain a user interaction hidden vector(ii) a Then the user interaction is hiddenAnd step S3 outputThe decoder outputs reconstructed user interaction data, the dimensionality of the decoder is n-dimensional and is the same as the quantity of all articles, and the value of each dimensionality is 0,1]In between.
Aiming at the obtained reconstructed user interaction data, firstly, eliminating articles which do not meet the time requirement, and only consideringAnd the previous time period, then any release time isAnd setting the value of the dimension where the subsequent article serial number is positioned as 0. Secondly, removing the objects which have appeared in the historical data and the currently observed interaction situationAnd 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, sequencing the reconstructed user interaction data from large to small, wherein the dimension serial number of top-N is the user to be predictedThe top 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 vectorsCo-occurrence vector of article。
Constructing any user according to user article interaction informationUser co-occurrence vectors with all items,Representing a userAnd articlesThe interaction scenario of (2). In the scene with insensitive interaction times (only paying attention to whether there is excessive interaction, but not paying attention to the interaction times, such as movie recommendation, book recommendation and the like), if the explicit interaction is generatedOtherwise, otherwise(ii) a In the case of sensitive interaction times (concerning whether there is an interaction, and also concerning the number of interactions, such as music recommendation, short video recommendation, etc.), if an explicit interaction is generatedWhereinRepresenting a userAnd articlesThe number of interactions; otherwise。
Constructing any article according to user article interaction informationCo-occurrence vector with all articles,Representing an articleAnd the userThe interaction scenario of (2). In the scene with sensitive interaction times (only paying attention to whether there is interaction, but not paying attention to the interaction times, such as movie recommendation, book recommendation and the like), if explicit interaction is generatedOtherwise. In case of sensitive interaction times (concerning whether there is any interaction, and also concerning the number of interactions, such as music recommendations, short video recommendations, etc.), if an explicit interaction is generatedIn whichRepresenting an articleAnd the userThe number of interactions; otherwise。
Wherein,which represents the total number of users,the total number of items is indicated and,the items are shown as being in the form of objects,is shown asThe number of the articles is increased, and the articles,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 articleThe total number of interactions of the article can be calculated. Since the mainstream degree is a dynamically changing concept, the article interaction times can be filtered according to time, such as only considering occurrenceInteraction in the time period only takes the release date into considerationPrevious article with total number of article interactions ofNumber of interactions of any article thereinOnly data within this time period is considered.
According to the userCo-occurrence vector with userThe total number of interactions of the user can be calculated. Since the degree of main flow is a dynamically changing concept, the number of user interactions can be filtered according to time, e.g. only considering the occurrenceAnd (3) the total interaction times of the user in the time period are as follows:wherein is arbitraryOnly the interactive data in the time period are considered, and the release date isThe 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 interactions of userItem category, computing userDynamic mainstream degree score of. In the case of insensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (1); in the case of sensitive number of interactions, for the categoryArticle of, userDynamic mainstream level score ofCalculating according to the formula (2);
wherein,will be provided withDuring the period of time, the user can select the time period,user' sAll items that have interacted add up to the number of interactions of all users. Because the interaction records of real-world objects have the phenomenon of power law distribution (namely a small part of the objects occupy most of the interactions, and most of the objects have no interactions), the total number of interactions between each object and other users is determined by using a logarithmic functionInhibition, base numberIs a hyper-parameter. Dynamic mainstream score of user in case of insensitive interaction timesEach interaction record is given the same weight. Dynamic mainstream score of user in case of sensitive interaction timesEach interaction record is given a different weight,representing a userAnd articlesThis 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 userDynamic mainstream degree score ofFor the category ofGlobal dynamic mainstream level scoreIs the average of the dynamic mainstream level scores of all users, so the global dynamic mainstream level scoreThe calculation formula of (c) is:
then, the global dynamic mainstream degree scores of all the article categories are dividedMake up a dimension ofGlobal dynamic mainstream level vector ofExpressed as:
wherein,、both of which represent the time that it takes,representing the hyper-parameter (for controlling the logarithmic curve),representing an articleBelong to the category,Which represents the total number of users,a set of all the users is represented,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 beTo belong to the categoryArticle ofOf the interaction situationMultiplication by the userIn the category ofDynamic mainstream degree 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 softmax function, resulting in input collaborative filteringUser interaction data for modules:
User interaction data obtained hereAs well as the input of the encoder followed by the collaborative filtering module.
And the dynamic mainstream degree characteristic model building module is used for building the dynamic mainstream degree characteristic model.
Can be calculated according to the mainstream score calculation module whenTime slot arbitrary userWith respect to any category of item collectionsScore of degree of mainstream. For any userCalculating its mainstream level scores for the set of all categories of items, which may constitute one mainstream level scoreVector 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. 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 mainstream degree vector output by the mainstream fraction calculation moduleSpliced and used as input of dynamic mainstream degree characteristic model。
wherein,representing a userThe age information of the patient is quantified by the age-information-measuring device,representing a userThe 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.
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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (1), and separately generateMean value ofVariance, forming a mean vector of usersSum variance vectorWherein the two vectors are both in t dimension, and then h dimension user interaction hidden vectors are generated 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. Dynamic mainstream characteristic hidden vectors output by the dynamic mainstream degree characteristic model building module and user interaction hidden vectors output by the encoderAs input to a decoder, the decoder output reconstructs user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor completing the reconstruction of the decoder.
Variational autocoder inference procedures are as follows, assuming a userCorresponding user interaction hidden vectorComplianceIs normally distributed. Assuming user interaction data input to the encoder according to the recommendation system interaction data characteristicsObey probability ofThe likelihood function of the polynomial distribution of (1) is as follows:
wherein,representing hidden vectors interacted by userIs determined and isProbability 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 estimationTo approximate. Suppose thatSatisfy the Gaussian distributionIn whichIs a variance vectorDiagonal covariance matrix of. Then the optimization goal of the network at this time is to optimize the parameter generation mean vectorSum variance vectorMake variation distributionAnd posterior distributionAs similar as possible.
Wherein the reparameterization method operates as follows, assuming noiseObey normal distributionHidden vector of user interactionCan be represented by a variance vectorMean vector ofLinearly combined with noise to obtainThereby enabling the network to 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 vectorThen, the input generated in the dynamic mainstream degree characteristic model building module is inputIs spliced atAnd then fed into the decoder. The generating part of the decoder may be divided into reconstructing user interaction dataAnd reconstructing dynamic mainstream feature vectors。
In conclusion, loss function of collaborative filtering model based on asymmetric variational self-encoderDividing into reconstructed target lossesDistribution approximation lossAnd dynamic mainstream eigenvector approximation lossThree parts, loss functionThe 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 lossIs to make the variation distributedAs close to a posterior distribution as possibleFor measuring the approximation degree of the two distributions, the calculation formula is:
to convert the original dynamic mainstream feature vectorAnd reconstructing dynamic mainstream feature vectorsWith its negative number as a loss term, with the aim of enabling the reconstruction of dynamic mainstream feature vectorsIn the direction of and withOriginal dynamic mainstream feature vectorApproximate losses by dynamic mainstream feature vectors as close as possibleThe method can enable a decoder to complete the reconstruction process by using the dynamic mainstream characteristics as much as possible. Dynamic mainstream eigenvector approximation lossThe calculation formula of (2) is as follows:
wherein,a hidden vector representing the user interaction is shown,representing the data of the user interaction(s),representing the posterior distribution of each user data sample,representing variation distributionAnd posterior distributionIn the approximation that the difference between the first and second values,representTo pairIn the expectation of the above-mentioned method,is a hyper-parameter, is used for controlling the punishment of the distribution similarity degree to the whole objective function,is a user interaction implicit vectorKL represents the KL divergence,which represents a distribution a priori, and,which represents a vector of the variance (m) of the signal,which represents the square of the mean vector and,in order to be a hyper-parameter,representing the original dynamic mainstream feature vector(s),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 dataEncoder output mean vectorSum variance vectorThen by the formulaCalculating to obtain a user interaction hidden vector(ii) a Then the user interaction is hiddenInputting 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 between.
Aiming at the obtained reconstructed user interaction data, firstly, eliminating articles which do not meet the time requirement, and only consideringAnd the previous time period, then any release time isAnd setting the value of the dimension where the subsequent article serial number is positioned as 0. Secondly, removing the objects which have appeared in the historical data and the currently observed interaction situationAnd 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, sequencing the reconstructed user interaction data from large to small, wherein the dimension serial number with the large top-N is the user to be predictedThe 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 through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
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), or the like provided on the computer device. Of course, the memory may also include both internal and external storage units 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, and the computer program, when executed by a processor, causes the processor to execute the steps of the above 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 solutions of the present application or portions contributing 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 (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method for correcting mainstream deviations of the recommendation system according to the embodiments of the present application.
Claims (9)
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 vectorsCo-occurrence vector of article;
Step S2, calculating the mainstream score
According to co-occurrence vector of articlesCalculating the total interaction times of the articles(ii) a According to user co-occurrence vectorsCalculating the total number of interactions(ii) a According to the total number of interaction times of the articlesTotal number of interactions of userItem categories, computing usersDynamic mainstream degree score of(ii) a According to the userDynamic mainstream level score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreAnd forming global dynamic mainstream degree scores of all article categories into a global dynamic mainstream degree vector;
S3, constructing a dynamic mainstream degree characteristic model
MLP model structure based on three-layer perceptronBuilding a dynamic mainstream degree characteristic 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 mainstream degree vector output by the step S2Spliced as input of dynamic mainstream degree characteristic modelOutputting 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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (a) and generate separatelyMean value ofVariance, forming a mean vector of usersSum variance vectorWherein the two vectors are both in t dimension and are randomly sampled to generate h dimensionUser interaction hidden vector of;
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; the dynamic mainstream characteristic hidden vector output by the step S3 and the user interaction hidden vector output by the encoderAs input to a decoder, the decoder output reconstructs user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor 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 the training completion in the step S4The encoder outputs a user interaction hidden vector(ii) a Then the user interaction is hiddenAnd inputting the dynamic mainstream characteristic hidden vector output in the step S3 into a decoder, and outputting reconstructed user interaction data by the decoder.
2. The method of claim 1, wherein the deviation of the mainstream of the recommendation system is correctedThe method is characterized in that: in step S1, any user is constructed according to the user article interaction informationUser co-occurrence vector with all itemsConstructing any article according to user article interaction informationCo-occurrence vector with all articles;
Wherein,which represents the total number of users,the total number of the items is represented,the items are shown as being in the form of objects,denotes the firstThe number of the articles is one,representing a userAnd articlesThe interaction situation of (a) is,representing an articleAnd the userThe interaction scenario of (2).
3. 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 articleCalculating the total number of article interactions;
According to the userCo-occurrence vector with userAnd the total number of times of interaction of the user is calculated,;
according to the total number of interactions of the articleTotal number of interactions of userItem category, computing userDynamic mainstream degree score of(ii) a In the case of insensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (1); in the case of sensitive number of interactions, for the categoryArticle of, userDynamic mainstream degree score ofCalculating according to the formula (2);
according to the userDynamic mainstream degree score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreThe calculation formula is as follows:
then, the global dynamic mainstream degree scores of all the article categories are dividedMake up a dimension ofGlobal dynamic mainstream level vector ofExpressed as:
4. A method of correcting deviations in a recommendation system mainstream according to claim 3, wherein: and carrying out co-occurrence vector weighting processing, wherein the weighting processing is described as follows: user will beTo belong to the categoryArticle ofOf the interaction situationMultiplication by the userIn the category ofDynamic mainstream degree score of;
For user co-occurrence vectorsEach item in the list is weighted, and after the weighting is finished, the co-occurrence vector of the whole user is obtainedNormalizing by using a softmax function to obtain the user interaction number for inputting the collaborative filtering moduleAccording to:
5. A method for correcting deviations in a recommendation system mainstream according to claim 1, wherein: in step S3, the user information vectorExpressed as:
wherein,representing a userThe age information of the person to be treated is quantified,representing a userThe binary gender information of (1);
6. A method for correcting deviations in a recommendation system mainstream according to claim 1, wherein: in step S4, the loss function of the collaborative filtering moduleDivided into reconstructed target lossesDistribution approximation lossAnd dynamic mainstream eigenvector approximation lossThree parts, loss functionThe calculation formula of (2) is as follows:
wherein,a hidden vector representing the user interaction is shown,representing the data of the user interaction(s),representing the posterior distribution of each user data sample,representing variation distributionAnd posterior distributionIn the approximation that the difference between the first and second values,to representTo pairIn the expectation that the position of the target is not changed,in order to be a hyper-parameter,is a user interaction hidden vectorKL represents the KL divergence,a distribution is represented a priori, which is,the variance vector is represented by a vector of variances,which represents the square of the mean vector and,in order to be a hyper-parameter,representing the original dynamic mainstream feature vector,representing the reconstructed dynamic mainstream feature vector.
7. A system for correcting deviations in a recommendation system mainstream comprising:
a data collecting and processing module for obtaining user information, article information and user article interaction information in the recommendation system and respectively constructing user co-occurrence vectorsCo-occurrence vector of article;
A mainstream score calculation module for calculating a mainstream score based on the co-occurrence vector of the articleCalculating the total interaction times of the articles(ii) a According to user co-occurrence vectorsCalculating the total number of interactions of the user(ii) a According to the total number of interactions of the articleTotal number of interactions of userItem category, computing userDynamic mainstream level score of(ii) a According to the userDynamic mainstream degree score ofCalculating the average value of the dynamic mainstream degree scores of all the users to obtain the global dynamic mainstream degree scoreAnd forming global dynamic mainstream degree scores of all article categories into a global dynamic mainstream degree 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 the global dynamic mainstream degree vector output by the mainstream fraction calculation moduleSpliced as input of dynamic mainstream degree characteristic modelOutputting 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 dataInput encoder, encoder calculating user interaction dataAnd each dimension of (1), and separately generateMean value ofVariance, forming a mean vector of usersSum variance vectorWherein the two vectors are both in t dimension, and then h dimension user interaction hidden vector is generated 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 encoderAs input to the decoder, the decoder outputs reconstructed user interaction dataAnd reconstructing dynamic mainstream feature vectorsReconstructing dynamic mainstream feature vectorsFor 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 hiddenAnd dynamic mainstream level characteristicsAnd inputting the dynamic mainstream characteristic hidden vector output by the model building module into a decoder, and outputting reconstructed user interaction data by the decoder.
8. 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 perform the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: stored with a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
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 true CN115809374A (en) | 2023-03-17 |
CN115809374B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116186421A (en) * | 2023-05-04 | 2023-05-30 | 中国科学技术大学 | Recommendation method, system, equipment and storage medium for eliminating popularity deviation |
Citations (13)
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 |
US20160179950A1 (en) * | 2014-12-22 | 2016-06-23 | Rovi Guides, Inc. | Systems and methods for filtering techniques using metadata and usage data analysis |
CN108647226A (en) * | 2018-03-26 | 2018-10-12 | 浙江大学 | A kind of mixing recommendation method based on variation autocoder |
CN112184391A (en) * | 2020-10-16 | 2021-01-05 | 中国科学院计算技术研究所 | Recommendation model training method, medium, electronic device and recommendation model |
CN113158024A (en) * | 2021-02-26 | 2021-07-23 | 中国科学技术大学 | Causal reasoning method for correcting popularity deviation of recommendation system |
CN113987358A (en) * | 2021-11-15 | 2022-01-28 | 中国科学技术大学 | Training method, recommendation method and recommendation system of recommendation model |
CN114428910A (en) * | 2022-01-28 | 2022-05-03 | 腾讯科技(深圳)有限公司 | Resource recommendation method and device, electronic equipment, product and medium |
US20220188899A1 (en) * | 2019-08-30 | 2022-06-16 | Tata Consultancy Services Limited | System and method for handling popularity bias in item recommendations |
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 |
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 (13)
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 |
US20160179950A1 (en) * | 2014-12-22 | 2016-06-23 | Rovi Guides, Inc. | Systems and methods for filtering techniques using metadata and usage data analysis |
CN108647226A (en) * | 2018-03-26 | 2018-10-12 | 浙江大学 | A kind of mixing recommendation method based on variation autocoder |
US20220188899A1 (en) * | 2019-08-30 | 2022-06-16 | Tata Consultancy Services Limited | System and method for handling popularity bias in item recommendations |
CN112184391A (en) * | 2020-10-16 | 2021-01-05 | 中国科学院计算技术研究所 | Recommendation model training method, medium, electronic device and recommendation model |
CN113158024A (en) * | 2021-02-26 | 2021-07-23 | 中国科学技术大学 | Causal reasoning method for correcting popularity deviation of recommendation system |
CN113987358A (en) * | 2021-11-15 | 2022-01-28 | 中国科学技术大学 | Training method, recommendation method and recommendation system of recommendation model |
CN114428910A (en) * | 2022-01-28 | 2022-05-03 | 腾讯科技(深圳)有限公司 | Resource recommendation method and device, electronic equipment, product and medium |
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 |
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 |
Non-Patent Citations (3)
Title |
---|
P. BEDI 等: "Using novelty score of unseen items to handle popularity bias in recommender systems" * |
ZHIHONG CHEN 等: "Co-training Disentangled Domain Adaptation Network for Leveraging Popularity Bias in Recommenders" * |
机器之心PRO: "如何斩获KDD Cup两冠一季?美团广告团队公开解决方案" * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116186421A (en) * | 2023-05-04 | 2023-05-30 | 中国科学技术大学 | Recommendation method, system, equipment and storage medium for eliminating popularity deviation |
Also Published As
Publication number | Publication date |
---|---|
CN115809374B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110162703B (en) | Content recommendation method, training device, content recommendation equipment and storage medium | |
Catherine et al. | Transnets: Learning to transform for recommendation | |
Kim et al. | TWILITE: A recommendation system for Twitter using a probabilistic model based on latent Dirichlet allocation | |
EP4181026A1 (en) | Recommendation model training method and apparatus, recommendation method and apparatus, and computer-readable medium | |
CN110378731A (en) | Obtain method, apparatus, server and the storage medium of user's portrait | |
CN109903103B (en) | Method and device for recommending articles | |
US11216518B2 (en) | Systems and methods of providing recommendations of content items | |
CN113158024B (en) | Causal reasoning method for correcting popularity deviation of recommendation system | |
CN106610970A (en) | Collaborative filtering-based content recommendation system and method | |
CN114519145A (en) | Sequence recommendation method for mining long-term and short-term interests of users based on graph neural network | |
CN114202061A (en) | Article recommendation method, electronic device and medium based on generation of confrontation network model and deep reinforcement learning | |
CN110598120A (en) | Behavior data based financing recommendation method, device and equipment | |
CN111768239A (en) | Property recommendation method, device, system, server and storage medium | |
CN110781401A (en) | Top-n project recommendation method based on collaborative autoregressive flow | |
CN115809374B (en) | Method, system, device and storage medium for correcting mainstream deviation of recommendation system | |
CN112699310A (en) | Cold start cross-domain hybrid recommendation method and system based on deep neural network | |
US20240037133A1 (en) | Method and apparatus for recommending cold start object, computer device, and storage medium | |
CN113362139A (en) | Data processing method and device based on double-tower structure model | |
JP2017059193A (en) | Time series image compensation device, time series image generation method, and program for time series image compensation device | |
CN116975427A (en) | Method, device and computing equipment for determining interest degree of object in resource information | |
He et al. | Interest HD: An interest frame model for recommendation based on HD image generation | |
CN115544379A (en) | Quaternion map convolutional neural network-based recommendation method and device | |
CN112749332A (en) | Data processing method, device and computer readable medium | |
Hien et al. | A Deep Learning Model for Context Understanding in Recommendation Systems | |
Sun et al. | Personalized recommendation for Weibo comic users |
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 |