An Explainable Graph Neural Network Recommendation Method
By using graph convolutional encoder and HSIC-Lasso model in the graph neural network recommendation algorithm, the weights of user and item characteristics are calculated, and the problem of opaque recommendation results in the user-item two-part graph is solved, improving the recommendation accuracy and explanatory nature .
Patent Information
- Application Number
- CN202210166279.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-02-21
AI Technical Summary
The existing graph neural network recommendation algorithm lacks interpretability in the user-item two-part graph, resulting in opaque recommendation results and making it difficult to provide explanation and debugging for users and system designers.
By obtaining the feature matrix and adjacency matrix of the user-item bipartite graph, a graph convolutional encoder model is established, a bilinear decoder is used to perform scoring prediction, and the maximum weight is calculated by similarity sampling and HSIC-Lasso nonlinear feature selection model Features, providing interpreted recommendation results.
It improves the interpretability and user trust of the recommendation results, and enhances the interpretability and recommendation accuracy of the model.
Smart Images

Figure CN114970806B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of recommendation algorithms, and in particular to an explainable graph neural network recommendation method. Background Art
[0002] As an information filtering algorithm, the recommendation system has been widely used. It provides users with more personalized services and brings considerable economic benefits to businesses. Because the recommendation system has such important application value, research in this field has been emerging. In recent years, with the development of deep learning technology, the recommendation method based on deep neural network (DNN) has become the mainstream in the recommendation field, especially the recommendation algorithm based on graph neural network (GNN), which has greatly improved the performance of the recommendation system. However, like many deep learning models, the GNN model is a black box model. The recommendation results given by GNN are difficult to explain from its internal data interaction and processing logic, resulting in an opaque recommendation system. For users, the recommendation results are not convincing and credible, and it is not convenient for system designers to diagnose, debug and improve the recommendation algorithm. Therefore, how to improve the interpretability of the GNN algorithm in the recommendation field is an urgent problem to be solved.
[0003] At present, the interpretability research of graph neural network algorithms can be divided into two categories: one is to use interpretable models (such as linear regression) to locally approximate black box models, and find the features of the explained instance as an explanation. Such as LIME and GraphLIME algorithms. The other category focuses on the structure of the graph, by finding subgraphs and feature subsets of explained nodes as explanations, such as GNNExplainer. However, the existing methods are mainly used in the field of node classification to process homogeneous data. For heterogeneous data such as user-item bipartite graphs in the recommendation field, the existing methods cannot solve the interaction between users and items in sampling and model construction, so they are not suitable for interpretability research of graph neural network recommendation algorithms. In view of the above limitations, the present invention proposes a method, first of all, a new neighborhood is generated for the explained instance according to similarity sampling, and then the HSIC-Lasso nonlinear feature selection model is used on the neighborhood to calculate the user and item features with the largest weight as an explanation, so that the recommendation results have a certain degree of interpretability. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and propose an explainable graph neural network recommendation method, which helps to improve users' trust in the recommendation results and solves the opacity problem of the graph neural network recommendation algorithm.
[0005] The main work of the present invention is as follows:
[0006] The present invention provides an explainable graph neural network recommendation method, comprising:
[0007] Obtain the feature matrix X and adjacency matrix A of the user-item bipartite graph;
[0008] The feature matrix X and the adjacency matrix A are used to build a graph convolutional encoder model to obtain the embedding representation matrix Z of the bipartite graph. u , Z v ;
[0009] According to the embedding matrix Z u , Z v , through the bilinear decoder model, return the reconstructed score matrix To complete the rating prediction task;
[0010] Next, we complete the explanation task and obtain the similar user feature matrix X based on the similarity calculation sampling. u , similar item feature matrix X v And the corresponding rating
[0011] The sampled X u , X v As a feature, the corresponding score As the label, β is obtained through the nonlinear feature selection model u , β v , choose the features with the most weight as explanation.
[0012] The graph convolutional encoder model is calculated by a first formula, which is:
[0013]
[0014] Among them, accum(.) represents an aggregation operation, σ(.) represents the activation function, and u j→i,r The information transmitted from item j to user i.
[0015] Will Convert to get the user's embedded representation The second formula is: Similarly, we can get the embedding representation of the item
[0016] The u j→i,r It is calculated by the third formula,
[0017] The third formula is:
[0018]
[0019] Among them, cij is the regularization constant, W r is a parameter matrix of edge type, Represents the feature matrix of item node j.
[0020] The score prediction matrix is calculated by formula 4, and the fourth formula is:
[0021]
[0022] The decoder generates a probability distribution by performing a bilinear operation on the possible rating levels and then applying a softmax function. The fifth formula is calculated as follows:
[0023]
[0024] Among them, Q r It is a trainable parameter matrix of dimension H*H, where H is the dimension of the implicit features of the user or item.
[0025] The sampled user feature matrix X u 、Item feature matrix X v They are calculated by formula 7 and formula 8 respectively, and the seventh formula is:
[0026] X u =concatenate(U m ,v)
[0027] The eighth formula is:
[0028] X v =concatenate(u,V n )
[0029] Among them U m =[u1,...,u m ],V n =[v1,...,v n ], the similarity is calculated by cosine similarity.
[0030] The β u , β v Calculated by Formula 9 and Formula 10 respectively, the ninth formula is:
[0031]
[0032] The tenth formula is:
[0033]
[0034] where ||.|| F is the Frobenius norm, is the standard central norm matrix, L ij =L(y i ,y j ) is the kernel function of the output value, is the center matrix, l n is the n-dimensional identity matrix, 1 n is a unit vector whose elements are all 1. is the standard central norm matrix of the k-th dimension feature, is the kernel function of the k-th dimension input feature. We use the Gaussian kernel for the input and prediction results of the given model. Finally, we use minimum angle regression to optimize the equation and obtain the coefficient vector β u , β v .
[0035] The Gaussian kernel function is calculated by the eleventh formula and the twelfth formula, and the eleventh formula is:
[0036]
[0037] The twelfth formula is:
[0038]
[0039] By comparing β u , β v The weights are used to obtain the features that have the greatest influence on the prediction results to complete the explanation task.
[0040] The present invention provides an explainable graph neural network recommendation method, which combines a local explainable algorithm with a recommendation system. For heterogeneous graphs such as user-item bipartite graphs, graph neural networks are used to perform recommendation tasks, thereby improving the recommendation accuracy. At the same time, an explanation method is proposed to solve the opacity problem of recommendations, thereby improving users' credibility in the system and the explainability of the model itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings:
[0042] Figure 1 It is a flowchart of an explainable graph neural network recommendation method. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all embodiments. On the basis of the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example
[0045] An explainable graph neural network recommendation method, the process is as follows Figure 1 As shown, the following is a specific introduction using a movie dataset as an example. The method using a movie user u and a movie v as an example includes the following steps:
[0046] (1) Obtain the user and item feature matrix X and adjacency matrix A from the user-movie bipartite graph through data preprocessing;
[0047] (2) Based on the feature matrix X and adjacency matrix A obtained in step (1), a graph convolutional encoder model is established to obtain the embedding representation matrix Z of the bipartite graph. u , Z v , the specific formula is:
[0048]
[0049]
[0050] Among them, the embedding representation matrix is calculated by the following formula Then, it is calculated through linear transformation, and the formula is:
[0051]
[0052] The linear conversion formula is as follows:
[0053]
[0054] u j→i The formula is:
[0055] Among them, c ij is the regularization constant, W r is a parameter matrix of edge type, Represents the feature matrix of item node j.
[0056] (3) Pass the embedding matrix obtained in step (2) through the bilinear decoder to return a reconstructed rating matrix The specific formula is as follows:
[0057]
[0058] The decoder generates a probability distribution by performing a bilinear operation on the possible rating levels and then applying a softmax function, so The formula is as follows:
[0059]
[0060] Among them, Q r It is a trainable parameter matrix of dimension H*H, where H is the dimension of the implicit features of the user or item.
[0061] (4) Next, we complete the interpretation task. First, we perform local sampling near the interpreted instance by similarity calculation to obtain a new user feature matrix U. m And the item feature matrix V n , and the corresponding prediction score M ij , and then aggregate the explained instance and the feature matrix of similar samples through the aggregation algorithm. The specific formula is as follows:
[0062] X u =concatenate(U m ,v)
[0063] X v =concatenate(u,V n )
[0064] Among them, U m =[u1,...,u m ],V n =[v1,...,v n ], the similarity is calculated by cosine similarity.
[0065] (5) According to step (4), the cosine similarity formula is as follows:
[0066]
[0067] Among them, u i 、u j are the characteristics of the i-th and j-th users respectively.
[0068] (6) The sampled X u , X v As a feature, the corresponding score M ij As a label, the weight coefficient is calculated through a nonlinear feature selection model to obtain β u , β v The calculation formula is as follows:
[0069]
[0070]
[0071] where ||·|| F is the Frobenius norm, is the standard central norm matrix, L ij =L(y i ,y j ) is the kernel function of the output value, is the center matrix, l n is the n-dimensional identity matrix, 1 n is a unit vector whose elements are all 1. is the standard central norm matrix of the k-th dimension feature, is the kernel function of the k-th dimension input feature. We use the Gaussian kernel for the input and prediction results of the given model. Finally, we use minimum angle regression to optimize the equation and obtain the coefficient vector β u , β v .
[0072] (7) According to step (6), the Gaussian kernel calculation formula is as follows:
[0073]
[0074] Among them, σ x is the width of the Gaussian kernel. By comparing β u , β v Obtain the features that have the greatest influence on the prediction results to complete the explanation task.
[0075] The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An explainable graph neural network recommendation method, It is characterized in that include: Obtain the feature matrix X and adjacency matrix A of the user-item bipartite graph; Input the feature matrix X and adjacency matrix A into the graph convolutional encoder model to obtain the embedding representation matrix Z of the bipartite graph u , Z v ; According to the embedding matrix Z u , Z v , through the bilinear decoder model, returning the reconstructed rating matrix To complete the rating prediction task; Next, we complete the explanation task and obtain the similar user feature matrix X based on the similarity calculation sampling. u , similar item feature matrix X v And the corresponding rating The sampled X u , X v As a feature, the corresponding score As the label, β is obtained through the nonlinear feature selection model u , β v , choose the features with the most weight as explanation.
2. The method according to claim 1, It is characterized in that The graph convolutional encoder model is calculated by a first formula, which is: Among them, accum(.) represents an aggregation operation, σ(.) represents the activation function, and u j→i,r The information transmitted from item j to user i.
3. The method according to claim 2, Convert to get the user's embedded representation The second formula is: Similarly, we can get the embedding representation of the item 4. The method according to claim 2, It is characterized in that The u j→i,r It is calculated by the third formula, The third formula is: Among them, c ij is the regularization constant, W r is a parameter matrix of edge type, Represents the feature matrix of item node j.
5. The method according to claim 1, It is characterized in that The score prediction matrix is calculated by formula 4, and the fourth formula is:
6. The method of claim 5, wherein the decoder generates a probability distribution by performing a bilinear operation on the possible rating levels and then applying a softmax function. The fifth formula is calculated as follows: in, Q r It is a trainable parameter matrix of dimension H*H, where H is the dimension of the implicit features of the user or item.
7. The method according to claim 1, It is characterized in that The sampled user feature matrix X u 、Item feature matrix X v They are calculated by formula 7 and formula 8 respectively, and the seventh formula is: X u =concatenate(U m ,v) The eighth formula is: X v =concatenate(u,V n ) Among them U m =[u 1 ,...,u m ],V n =[v 1 ,...,v n ], the similarity is calculated by cosine similarity.
8. The method according to claim 1, It is characterized in that The β u , β v Calculated by Formula 9 and Formula 10 respectively, the ninth formula is: The tenth formula is: where ||.|| F is the Frobenius norm, is the standard central norm matrix, L ij =L(y i ,y j ) is the kernel function of the output value, is the center matrix, l n is the n-dimensional identity matrix, 1 n is a unit vector whose elements are all 1, is the standard central norm matrix of the k-th dimension feature, is the kernel function of the k-th dimension input feature, where we use the Gaussian kernel for the input and prediction results of the given model. Finally, we use minimum angle regression to optimize the equation and obtain the coefficient vector β u , β v .
9. The method according to claim 8, It is characterized in that The Gaussian kernel function is calculated by the eleventh formula and the twelfth formula, and the eleventh formula is: The twelfth formula is: By comparing β u , β v The weights are used to obtain the features that have the greatest influence on the prediction results to complete the explanation task.
Citation Information
Patent Citations
Techniques for recommending items to users
CA3118083A1
Public test recommendation method based on graph neural network
CN113377656A
