Social recommendation method based on decentralized graph neural network

文档序号:7863 发布日期:2021-09-17 浏览:29次 中文

1. A social recommendation method based on a decentralized graph neural network is characterized by comprising the following steps:

processing the original interaction graph into a decentralized graph by utilizing the statistical information, wherein the decentralized graph comprises the decentralized user-item interaction graph, the item-user interaction graph and the social relationship strength between users;

through a GNN collaborative filtering model, respectively carrying out user modeling and item modeling by utilizing a decentralized user-item interaction diagram and an item-user interaction diagram, carrying out social modeling by utilizing the social relationship strength between users, and predicting the scores of the users on the items by utilizing a user's representation vector, an item's representation vector and a user's social user representation vector set which are obtained by modeling;

and generating a recommendation list of the item according to the grade of the item by the user.

2. The method of claim 1, wherein the processing the original interaction graph into the decentralized graph by using the statistical information comprises:

for each user, acquiring a decentralized user-item interaction graph by utilizing the average score of each item interacted with the user;

for each item, acquiring a decentralized item-user interaction graph by using the average score of each user interacting with the item;

for two users, the social relationship strength of the two users is obtained by utilizing the scores of the two users on the same item.

3. The social recommendation method based on the decentralized graph neural network according to claim 2,

the obtaining a decentralized user-item interaction graph by using the average score of each item interacted with the decentralized user-item interaction graph comprises the following steps: subtracting the average score of the corresponding item from the score of the user for each item to obtain a decentralized user-item interaction graph;

the obtaining a decentralized item-user interaction graph by using the score of each user interacting with the user comprises the following steps: and subtracting the average score of the corresponding user from the score given by each user interacting with the user to obtain a decentralized item-user interaction graph.

4. The social recommendation method based on the decentralized graph neural network according to claim 1 or 2,

the original interaction graph comprises: the interaction graph of the interaction relation between the user and the corresponding item comprises the grade of the user for the corresponding item; and a social graph of the user's social relationship to the user;

the statistical information includes: a user's score for an item, an average score for each user, and an average score for each item.

5. The social recommendation method based on the decentralized graph neural network according to claim 2, wherein the formula for obtaining the social relationship strength of two users by using the scores of the two users on the same item is as follows:

wherein, TikRepresenting user uiWith user ukStrength of social relationship of rij、rkjEach representing a user uiUser ukFor the same article vjScore of (a), R (u)i)、R(ui) Each representing a user uiUser ukA set of interacted articles; when condition x is true, i (x) is 1, otherwise 0; delta is a threshold value to evaluate whether two users like the same item.

6. The social recommendation method based on the decentralized graph neural network according to claim 2, wherein the decentralized graph is used for user modeling, and the obtained representation vector of the user comprises:

for user uiItem v in a decentralized user-item interaction graphjThe difference in score of rij-E(vj) Transform it to a positive integer value:wherein r isijRepresenting user uiFor article vjScore of, E (v)j) Representing an article vjThe average score of (a) is calculated,and | is an integer function and an absolute function, respectively;

a vector lookup table is created in advance, and the scoring difference values of different positive integer values are comparedMapping to different vectorsThen user uiWith the article vjThe interaction representation vector of (a) is:wherein L isUIn order to realize the multi-layer perceptron,representing an article vjThe embedded vector of (2);

aggregating users u through a commodity aggregation functioniAll interacted articles, the article aggregation function is expressed as:

wherein R (u)i) Representing user uiSet of interacted objects, ηijRepresenting an attention weight;

the end user's representation vector is:

wherein, WUAnd bURepresenting the weight matrix and bias terms when modeling by the user.

7. The social recommendation method based on the decentralized graph neural network according to claim 6, wherein the attention weight ηijCalculated by means of an attention network whose input is the user uiWith the article vjIs represented by a vector xijAnd user uiEmbedded vector ofAttention weight ηijThe calculation formula of (2) is as follows:

wherein the content of the first and second substances,representing a calculated attention weight ηijIntermediate parameter of time, vlRepresenting user uiItem subject to interaction, intermediate parameterAndthe calculation principle is the same; w is aU2And WU1As a weight matrix, bU1And bU2A bias term is represented.

8. The social recommendation method based on the decentralized graph neural network according to claim 6, wherein the item modeling is performed in the same way as the user modeling, and the obtained expression vector of the item is represented as:

wherein the content of the first and second substances,representing an article vjIs a vector ofIAnd bIRepresenting weight matrix and bias terms, u, in the modeling of an articlekRepresents a user, R (v)j) To be in contact with an article vjSet of users who have interacted, yjkRepresenting user ukWith the article vjIs used to represent the vector ξjkIndicating the attention weight.

9. The social recommendation method based on the decentralized graph neural network according to claim 6, characterized in that the social modeling is performed in the same way as the user modeling, and for the user uiThe representation vector of each social association user can be obtained through social modeling to form a user uiRepresent a set of vectors by social usersWherein, N (u)i) Is user uiA set of users directly connected in a social network.

10. The social recommendation method based on the decentralized graph neural network according to claim 6, 8 or 9, characterized in that the representation vector of the user obtained by modeling is usedRepresentation vector of an articleAnd a set of social user representation vectors for the userPredicting the user's score for the item includes:

first, a user's representation vector is usedWith the representation vector of the articlePreliminary prediction of user uiFor article vjIs scoredExpressed as:

z2=Tanh(WK2·z1+bK2)

wherein z is1And z2Is an intermediate parameter, WK1、WK2And wKAs a weight matrix, bK1And bK2Is a bias term;

thereafter, in the same manner, the vectors are represented using social usersWith the representation vector of the articleComputing a set of preference scoresWherein, N (u)i) Is user uiA set of users directly connected in a social network;

finally, combining the preliminarily predicted scores and the preference score set to calculate final predicted scores

Wherein, E (u)i)、E(vj) Each representing a user uiArticle vjAverage score of (a); f (u)i,vj) By passingAnd preference score setAnd calculating by the formula:

wherein λ isikAs a weight, TikFor user uiWith user ukThe strength of the social relationship.

Background

In the face of massive network users and information explosion, the recommendation system is important for relieving information overload and providing more efficient and high-quality service for the users. With the development of social media, recommendation performance can be remarkably improved by using social relationships for recommendation, and social recommendation gradually becomes a popular recommendation method.

The traditional recommendation method is to project users and articles to a vector space respectively by using a matrix decomposition method, obtain representations of the users and the articles based on fitting of training data, and then calculate the preference of integral values in vectors of the users and the articles for recommendation. Traditional social recommendation adds modeling on social relations on the basis of the matrix decomposition method to improve recommendation performance. Although the matrix factorization method is efficient, it still has shortcomings in modeling relationships, and cannot model higher-order user-item or user-user relationships.

The development of deep learning techniques has effectively solved the above-mentioned problems. The deep learning has strong expression capability and can model each order relation. Graph Neural Networks (GNNs) are a deep learning method that utilizes graph data. GNNs are a promising approach to solve the social recommendation problem, since graph data well restores the relationships between user-user and user-item in social networks.

However, the GNN-based recommendation method is almost all learned from the original interaction graph data, and the statistical information in the graph is rarely concerned, so that the real preference of the user and the quality of the goods are misunderstood, and the learned user and goods representation has problems. Furthermore, social relationships between users are often simple, so not distinguishing between social relationships would make recommendation results suboptimal.

Disclosure of Invention

The invention aims to provide a social recommendation method based on a decentralized graph neural network, which can provide better and more accurate personalized recommended articles for target users.

The purpose of the invention is realized by the following technical scheme:

a social recommendation method based on a decentralized graph neural network comprises the following steps:

processing the original interaction graph into a decentralized graph by utilizing the statistical information, wherein the decentralized graph comprises the decentralized user-item interaction graph, the item-user interaction graph and the social relationship strength between users;

through a GNN collaborative filtering model, user modeling and item modeling are respectively carried out by utilizing a decentralized user-item interaction diagram and an item-user interaction diagram, social modeling is carried out by utilizing the social relationship strength between users, and the scores of the users on the items are predicted by utilizing a user representation vector, an item representation vector and a user social user representation vector set which are obtained by modeling;

and generating a recommendation list of the item according to the grade of the item by the user.

According to the technical scheme provided by the invention, the original interaction graph is processed into the decentralized graph by utilizing the statistical information, and the user and the article are represented and learned on the decentralized graph. Meanwhile, the strength of the user-user social relationship is explicitly modeled by using the user-item interaction data, so that the role of the social relationship in recommendation is improved; and finally, capturing and learning fine-grained representation of the user and the article by utilizing the GNN collaborative filtering model, and improving the performance of recommendation.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.

Fig. 1 is a flowchart of a social recommendation method based on a decentralized graph neural network according to an embodiment of the present invention;

FIG. 2 is a diagram illustrating data in a conventional social recommendation according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of processing raw data according to an embodiment of the present invention;

fig. 4 is a schematic diagram of a GDSRec network framework according to an embodiment of the present invention;

fig. 5 is a diagram illustrating the performance comparison between GDSRec and three variants thereof provided by the embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.

The embodiment of the invention provides a social recommendation method based on a decentralized graph neural network, which mainly comprises the following steps as shown in fig. 1:

step 1, processing an original interaction graph into a decentralized graph by utilizing statistical information, wherein the decentralized graph comprises a decentralized user-item interaction graph, an item-user interaction graph and social relationship strength between users.

And 2, through a GNN collaborative filtering model, respectively carrying out user modeling and item modeling by utilizing a decentralized user-item interaction diagram and an item-user interaction diagram, carrying out social modeling by utilizing the social relationship strength between users, and predicting the scores of the users on the items by utilizing a user's representation vector, an item's representation vector and a user's social user representation vector set which are obtained by modeling.

And 3, generating a recommendation list of the articles according to the grade of the articles by the user.

In the embodiment of the present invention, after the scores of the items of the user are obtained through the steps 1 to 2, the step 3 may be implemented in a conventional manner, that is: and arranging corresponding articles according to the grade in a descending order, extracting the articles with the appointed number at the front end, generating a recommendation list and pushing the recommendation list to the user.

According to the scheme of the embodiment of the invention, the original interaction graph is processed into the decentralized graph by utilizing the statistical information in the graph data so as to enhance the representation learning of users and articles, the user-user relationship strength is explicitly modeled, and the recommendation performance is improved through the GNN collaborative filtering model, and the method mainly comprises the following two parts: 1. processing original interactive data; 2. model construction, data processing and scoring prediction.

Before the above two parts are introduced, data and symbol definitions are first provided: user uiFor article vjIs given a score of rijIs a collection of observable evaluation data (i.e. r)ij≠0),R(vj) To be in contact with an article vjSet of interacted users, R (u)i) For user uiA collection of items with which interaction has been performed. Let N (u)i) Is user uiA set of users directly connected in a social network. Vector quantityRepresenting user uiIs inserted (Embedding) of the vector(s),representing an article vjWherein D is a dimension.Andby constructing a vector table for the user ID and the article ID, respectivelyThen, the table is looked up and obtained, and the table is continuously updated in training. E (u)i) And E (v)j) Respectively represent users uiAnd an article vjWherein, the average score of a user refers to the average of the scores of all the interactive items of the user, and similarly, the average score of an item is the average of the scores given by all the users who interact with the item.And | is an integer function and an absolute function, respectively.Is a concatenation operation of two vectors.

1. And processing original interaction data.

As shown in fig. 2, the data in the conventional social recommendation mainly includes two parts, where the left side is a user-item scoring matrix, u is a user, v is an item, and the subscript number is a user/item serial number. The right side is the user-item interaction graph and the social (user-user) graph, the user-item interaction graph is the interaction graph of the user and the corresponding item interaction relation, called the original interaction graph, wherein the score of the user on the corresponding item is included, the social relation between the current user and other users is included in the social graph, and the right part of fig. 2 shows the user u1For article v2And v4Score of, user u1With user u2And u4Have a social relationship.

In the embodiment of the present invention, statistical information (scores of users on items, average scores of users, and average scores of items) in raw data is introduced, and the raw interaction graph may be processed into decentralized graph data, as shown in fig. 3, the processing method includes:

1) for each user uiIn other words, a decentralized user-item interaction graph is obtained using the average score of each item interacting with the user u, specifically, the user u is divided intoiFor each article vjScore rijSubtract the mean score E (v) of the corresponding itemj) To obtain a decentralized user-objectAnd (4) a product interaction diagram. The above processing is because it is desirable to capture different attitudes that the current user and other users have on the same item, reflecting the unique interests of the user. As shown in the upper right part of FIG. 3, user u1For article v2And v4The average scores of the items are respectively subtracted from the scores of the items, and a user-item decentralized interaction graph is obtained.

2) For each item, a decentralized item-user interaction graph is obtained, using the average score of each user with whom it is interacting, in particular, each user u with whom it is interactingiGiven score rijSubtract the average score E (u) of the corresponding useri) And obtaining a decentralized object-user interaction graph. The above-mentioned processing is to capture the characteristics of the target item and other items which are different from each other and which are shown in the middle part of the right side of fig. 3, with respect to the item v2User u interacting therewith1And u4In this way, its item-user decentralized interaction graph can be obtained.

3) In order to differentiate the different social relationship strengths and improve the social recommendation performance, the social relationship between the two users is quantified by a simple and efficient method. The calculation formula is as follows:

wherein r isij、rkjEach representing a user uiUser ukFor the same article vjScore of (a), R (u)i)、R(ui) Each representing a user uiUser ukA set of interacted articles; when condition x is established (i.e., r is satisfied)ij-rkjδ | ≦ δ), i (x) 1, otherwise 0; delta is a threshold value to evaluate whether two users like the same item. The above equation calculates the correlation coefficient TijExplicitly describe user uiWith user ukIndicates the similarity in preference between the two users. As shown in the lower right part of fig. 3, user u1With user u2And u4Having social relationship, T can be calculated respectively12And T14And obtaining the determined social relationship strength.

Through the above series of processing, fine-grained data is obtained.

2. Model construction, data processing and score prediction

In the embodiment of the invention, a GNN-based network model called GDSRec is constructed, the network model utilizes a decentralized graph to carry out user modeling and article modeling, utilizes the social relationship strength between users to carry out social modeling, and utilizes a user representation vector, an article representation vector and a user social user representation vector set obtained by modeling to predict the scores of the users to the articles. Specifically, the model comprises four module components which are respectively used for user modeling, article modeling, social modeling and score prediction, and is shown in fig. 4 as a GDSRec network framework, and detailed descriptions are provided below for the modeling and score prediction parts.

1) And (4) modeling by a user.

When modeling the user, the decentralized user-item interaction graph obtained in the foregoing needs to be used, and the interaction relationship and the score difference value therein are utilized to learn the representation vector of the userIn particular for user uiItem v in decentralized user-item interaction graphjThe difference in score of rij-E(vj) Due to rij-E(vj) Not a positive integer value, but rather a vector, which is transformed into a positive integer value:wherein r isijRepresenting user uiFor article vjScore of, E (v)j) Representing an article vjThe average score of (a) is calculated,and | is an integer function and an absolute function, respectively.

In the embodiment of the invention, a vector lookup table is created in advance, and the grading difference values of different positive integer values are usedMapping to different vectorsThen user uiWith the article vjThe interaction representation vector of (a) is:wherein L isUIn order to realize the multi-layer perceptron,representing an article vjThe embedded vector of (2);

aggregating users u through a commodity aggregation functioniAll interacted articles, the article aggregation function is expressed as:

wherein R (u)i) Representing user uiSet of interacted objects, ηijThe attention weight η indicates a degree of action of the user in learning the expression of the user with the object, and indicates the differenceijCalculated by attention network, the input to attention network is user uiWith the article vjIs represented by a vector xijAnd user uiEmbedded vector ofAttention weight ηijThe calculation formula of (2) is as follows:

wherein the content of the first and second substances,representing a calculated attention weight ηijIntermediate parameter of time, vlRepresenting user uiItem subject to interaction, intermediate parameterAndthe same calculation principle (the difference is only different for the corresponding articles); w is aU2And WU1As a weight matrix, bU1And bU2Representing the bias term, and T is the matrix transpose symbol.

Finally, the user's representation vector is:

wherein, WUAnd bURepresenting the weight matrix and bias terms when modeling by the user.

2) And (4) modeling the article.

In the embodiment of the invention, the article modeling is carried out in the same way as the user modeling, and the obtained expression vector of the article is represented as follows:

wherein the content of the first and second substances,representing an article vjEach part in the formula can be calculated by directly referring to a user modeling mode; wIAnd bIRepresenting weight matrices and bias terms in modeling an article,ukRepresents a user, R (v)j) To be in contact with an article vjA set of users who have interacted; y isjkRepresenting user ukWith the article vjIs used to represent the vector ξjkIndicating the attention weight, yjkAnd xijHas the same calculation formula, ξjkAnd ηijThe same calculation formula can be simply understood that the user models through the interactive object, and the object models through the interactive user.

3) And (4) social modeling.

In the embodiment of the invention, the purpose of social modeling is to model a user who is socially related to a target user, the social modeling is carried out in the same way as the user modeling, and the user u is subjected to the social modelingiThe representation vector of each social association user can be obtained through social modeling to form a user uiRepresent a set of vectors by social users Is to directly utilize user ukThe related information is substituted into the formula of the user modeling to be calculated.

4) And (4) score prediction.

In the embodiment of the invention, the expression vector of the user is obtained by modelingRepresentation vector of an articleAnd a set of social user representation vectors for the userPredicting a user's score for an item; the method mainly comprises the following steps:

first, a user's representation vector is usedWith the representation vector of the articlePreliminary prediction of user uiFor article vjIs scored byExpressed as:

z2=Tanh(WK2·z1+bK2)

wherein z is1And z2Is an intermediate parameter, WK1、WK2And wKAs a weight matrix, bK1And bK2Is a bias term;

thereafter, in the same manner, the vectors are represented using social usersWith the representation vector of the articleComputing a set of preference scoresThe above three formulas are also used in this stage, except thatInstead of the former

Finally, the scores of the preliminary predictions are combined withA set of preference scores, calculating a final prediction score

Wherein, E (u)i)、E(vj) Each representing a user uiArticle vjAverage score of (a); f (u)i,vj) By passingIntegration with preference evaluationAnd calculating by the formula:

wherein λ isikAs a weight, TikFor user uiWith user ukThe strength of the social relationship.

It should be noted that, in the embodiment of the present invention, the network parameters of each module in the GDSRec are not shared.

According to the scheme of the embodiment of the invention, the defects of the existing method are considered from the perspective of users and articles, namely statistical information in data is not used so that the preference of the users and the representation of the articles can be misunderstood, and the fine-grained representation of the users and the articles is captured and learned by a GDSRec model through a decentralized interaction diagram, so that the recommendation performance is improved.

The scheme of the embodiment of the invention can be applied to a scoring recommendation system, and by utilizing historical scoring records and social information and decentralized interactive graph processing provided by the method, finer-grained data is provided for a GDSRec model to perform representation learning of users and articles, so that better-quality and accurate personalized recommended articles can be provided for target users.

To verify the improvement in performance, two public data sets, Ciao and Epinions, were chosen, where Ciao is a data set scoring DVD and Epinions is a data set scoring products, both data sets containing the user's social relationship. As shown in table 1, is the data statistic for two data sets.

Data set Number of users Number of articles Score of Social relationship coefficient
Ciao 7317 10,4975 283,319 111,781
Epinions 18,088 261,649 764,352 355,813

TABLE 1 statistical information of data sets

Three types of methods are selected for comparison with the model (GDSRec) proposed by us, and the methods are respectively as follows: traditional recommendation methods PMF — only score information is utilized; the traditional social recommendation method SoRec utilizes social information on the basis of scoring information; deep learning methods-NeuMF and GraphRec, wherein the NeuMF only utilizes scoring information, and the GraphRec is the current optimal social recommendation method. The mean absolute error MAE and the root mean square error RMSE are used as performance metrics. The data set is divided into a training set, a validation set and a test set, wherein the training set accounts for 60% (80%), and the validation set and the test set each account for 20% (10%). The comparison results are shown in table 2.

Table 2 comparison of the performance of different methods on two data sets

From table 2, it can be found that, compared with PMF and SoRec, adding social information can significantly improve the accuracy of prediction, which indicates that social recommendation can effectively improve performance compared with conventional recommendation. And the comparison of PMF and NeuMF shows that the deep learning can be used for enhancing the modeling of the user and the article, so that better user and article representation is learned, and the recommendation performance is improved. For the method provided by the invention, it can be seen that it performs optimally on all datasets, comprehensively surpassing the currently best method graphRec, which proves the superiority of the invention. It is also observed that the more sparse the training data is, the more significant the effect of the boost, which indicates that the effect of the statistical information is more effective in the face of sparse data.

In addition, the main part of the invention is also verified in performance:

1) ablation experiment: three variants of GDSRec were designed, GDSRec-RC respectively (coefficient of relationship T)ijAll set to 1), GDSRec-SN (remove social modeling portion, i.e.GDSRec-RD (representative learning of users and items using raw scores instead of score differences in the model). Comparison of the performance of GDSRec with these three variants is shown in fig. 5, where the data set used in the upper part of fig. 5 is Ciao and the performance metrics used in the left and right parts are MAE and RMSE, respectively; the lower part uses a data set of eponations and the left and right parts use performance metrics of MAE, RMSE, respectively. From a comparison in fig. 5, it can be seen that GDSRec performance is optimal and that different components in the removal process may compromise performance to varying degrees.

2) The role of the threshold δ in the social relationship coefficient. Different δ results in different performance, which was tested. Table 3 shows the results of the experiments as shown,

as shown in table 3, the performance of the present invention is best when δ is 1, because the social relationship data is very sparse when δ is 0, and a lot of noise is introduced when δ >1, so that the performance is degraded.

Through the above description of the embodiments, it is clear to those skilled in the art that the above embodiments can be implemented by software, or by software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the above embodiments may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于门机制的序列社交推荐方法、系统及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!