Visual recommendation analysis method and device based on interpretable graph neural network
By converting the recommendation problem into a graph classification problem and designing a multi-view interactive process, the problem of lack of universality and multi-grainedness of the existing recommendation system interpretation results is solved, and the multi-grainedness interpretation of the recommended results and the model performance improvement is achieved.
Patent Information
- Application Number
- CN202311392127.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2043-10-25
AI Technical Summary
The existing recommendation system based on graph neural networks lacks universality and multi-grained interpretation capabilities when interpreting recommended results, and the visual design is simple and cannot support in-depth interactive exploration.
The interpreted graph neural network model is used to convert the recommendation problem into graph classification problem, and the optimized recommended graph path is obtained through auxiliary node path optimization methods, and multi-view and interaction processes are designed to support analysts to perform multi-grained graph pattern mining and interpretation verification.
It realizes multi-grained interpretation of recommended results, enhances the universality and reliability of explanations, supports users to make in-depth understanding and personalized adjustments of recommended results, and improves the performance of the recommendation model.
Smart Images

Figure CN117216408B_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes a recommendation explanation visual analysis method and device based on an explanatory graph neural network. The present invention converts the recommendation problem into a graph classification problem, uses an explanatory graph neural network model to explain the recommendation results, and supports multi-granularity explanations in recommendation scenarios from the instance level and group level. The present invention also integrates analysts as behavioral subjects into the visualization process, designs multiple views and the interaction processes between them, which facilitates analysts to conduct graph pattern mining and helps them understand the recommendation details of the graph neural network. Background Art
[0002] Graph structures are widely used in many fields, such as social networks, traffic routes, molecular structures, etc. In order to mine the information of graph structures, many successful and widely used graph neural network models have been proposed, and remarkable results have been achieved in tasks such as node classification and link prediction. Graph neural networks are also widely used in recommendation systems. By constructing the relationship between users and items, items and attributes into a graph structure, iteratively aggregating neighborhood information, updating node representations, and obtaining recommendation results based on the embedding representation of nodes. In recommendation systems, it is very necessary to explain the recommendation results. Reasonable and effective explanations can help users understand the relationship between recommendation results and their historical behaviors, and then let users build trust in the recommendation model.
[0003] Most of the previous work on explaining recommendations includes analyzing user interest preferences, profiling user characteristics, and thus explaining the current recommendation results. Existing recommendation systems based on graph neural networks start from the path between users and recommendation results, and use the path with the maximum attention score as an explanation. These works can provide effective explanations for recommendation results to a certain extent, but these explanations are not based on models and are all targeted at specific users. They are often unique to individuals and cannot be applied to other users, so such explanations are not convincing. Therefore, how to expand the explanation to a local range and give a general explanation applicable to the group is a problem that currently exists; in addition, previous work is relatively simple in the visualization design of recommendations, usually simply displaying static information of recommendation results, lacking interactive design, and unable to support users to conduct in-depth interactive exploration of recommendation results. However, users usually expect to understand the reasoning process behind the recommendation, the reliability of the recommendation results, and the possibility of personalizing the recommendation results. Summary of the invention
[0004] In order to overcome the above-mentioned deficiencies of the prior art, the present invention proposes a method and device for visual analysis of recommendation explanations based on an explanatory graph neural network.
[0005] The recommendation interpretation visual analysis method based on the interpretation graph neural network of the present invention comprises the following steps:
[0006] Step 1: Clean and preprocess the data according to certain rules to ensure the validity of the data, and calculate the feature relevance score based on the movie viewing data;
[0007] Step 2: Take the processed data as input and train it with the representative graph neural network model KGAT to obtain the high-dimensional embedding representation and recommendation results of the entity; convert the embedding space distribution into a classification task, use the auxiliary node path optimization method to obtain the optimized user recommendation path graph, and use the explanatory graph neural network interpretation model GNNExplainer to extract the graph patterns that are important for recommendation prediction;
[0008] Step 3: Design a data visualization view to display the interpretation process, and design an interpretation exploration analysis view for the obtained graph pattern to facilitate analysts to conduct multi-granular graph pattern mining. At the same time, the reliability of the interpretation model is verified through the preference analysis comparison view combined with the interpretation evaluation view;
[0009] Step 4: Provide analysts with an understanding of the recommendation results through model calculation and visualization design, and obtain visual insights based on this. Improve the recommendation performance of the model through iterative interactive analysis to verify the reliability of the analysis method and form a closed loop of model-visual analysis system-model.
[0010] Further, step 1 specifically includes:
[0011] 1.1 Get the original data set. Use the scrapy framework to crawl data from real movie websites, including user data, movie data, director data, actor data, and user historical movie viewing records. These movie data cover detailed information such as release year, type, label, director, actor, screenwriter, etc.
[0012] 1.2 Preprocess the original data set. To ensure data quality and prevent invalid data, data filtering was performed based on the following conditions: the user's movie viewing record was at least greater than 50, the number of times the movie was viewed by valid users was greater than 20, and the movie's genre text was complete. In addition, considering that recommendation tasks in real scenarios usually face cold start problems, 10% of users with a movie viewing record of less than 50 movies were retained as cold start data to fully evaluate the model performance.
[0013] 1.3 Calculate the feature relevance score. Use the feature relevance score (feature score) to measure the user's viewing characteristics. This method is based on the attribute characteristics of each movie in the target user's historical viewing records, including the genre, director and actor relevance scores. Taking the genre relevance score as an example, the specific calculation formula is:
[0014]
[0015]
[0016] Type set L = {L1, L2, L3, ..., L i ,…L 35}, because the types of all movies are within the range of 35 types; user set U = {U1,U2,U3,…U k ,…U 9622}, indicating 9622 users; for user U k For example, suppose he has watched n movies, which is the set M k ={m1,m2,m3,…m j ,…m n}, where movie m j The corresponding type set is G j ,use Representative movie m j Medium Type L i The feature score is shown in formula (1).
[0017] The genre relevance score for the user is the genre L in the movies he has watched. i The correlation score is The calculation of is shown in formula (2). The calculation of the relevance score of the user group is to perform a summation operation based on the relevance scores of the users.
[0018] Furthermore, step 2 specifically includes: training with the representative graph neural network model KGAT to obtain high-dimensional embedding representations and recommendation results of entities, converting the recommendation problem into a graph classification problem, and using the idea of GNNExplainer to explain the recommendation problem. The conversion of the recommendation problem into a graph classification problem is divided into two steps. The first step is to convert the embedding space distribution obtained by the recommendation into a classification task; the second step is to convert the user recommendation results into a graph structure; through this conversion method, the recommendation problem is converted into a graph classification problem.
[0019] 2.1 Convert the embedding space distribution obtained by recommendation into a classification task. Douban data is used as input, including information such as users, movies watched, and movie features. After training the data using the recommendation model KGAT, the embedding representation of all entities is obtained. However, after dimensionality reduction and clustering of the user's embedding representation, it is found that the clustering effect is poor, and there is overlap between different user groups (different clusters). Therefore, in order to obtain a more meaningful user group, the present invention updates the user's embedding representation, combines the user's recommended movie embedding representation with the user's original embedding representation, and thus updates the user's embedding representation.
[0020] Clustering and dimensionality reduction are performed on the embedded representation. In the initial experiment, T-SNE was used for dimensionality reduction, but it was found that its processing speed was slow and only the local structure of the data was retained. Then, UMAP, a method based on manifold theory, was used, which can better retain the global structure of the data, so that the data points after dimensionality reduction are closer to the global layout of the original data in the low-dimensional space. At the same time, in order not to be affected by the initial center selection, DBSCAN was selected for clustering. Subsequently, through multiple parameter experiments, a meaningful user group distribution was obtained. The boundaries between user groups are clear and not mixed. The significance of the clustering results is to classify users. Users in each cluster have a certain degree of similar recommendation semantic information. On the contrary, there must be differences in recommendation information between user groups that are far away in space, which constitutes a classification task.
[0021] 2.2 Convert the user's recommendation results into a graph structure. First, based on the user's ID in the user group, obtain the top 20 item IDs recommended by the recommendation model. With the user as the starting point, the recommended item as the target point, and the user's movie viewing information as the intermediate node, a complete path graph between the user and the recommended item is constructed. Then, the auxiliary node path optimization method in step 2.4 is used to optimize the recommendation graph path and obtain the optimized recommendation graph path. Through this process, the recommendation results are converted into a graph structure.
[0022] 2.3 Interpretable graph neural network model based on GNNExplainer in recommendation scenario. The core idea of GNNExplainer is to identify the subgraph structure and node features that have the greatest influence on the prediction results. The workflow of GNNExplainer is to take a trained GNN model and its prediction results as input, and then output a subgraph that can have the greatest impact on the prediction results of the GNN model. In this process, graph masks are used to select the truly important subgraphs, and feature masks are used to select the truly important sub-feature sets. Given a node v, the goal is to identify the subgraph (c is the category) and related features XS = {Xj|Vj∈Gs}, which are important for GNN's prediction y^. The concept of importance is formalized using mutual information and the optimization formula (3) is formulated:
[0023]
[0024] Among them, since GNNExplainer is interpreted on the trained GNN model, H(Y) is a constant. After the above formula is converted, As[j, k] is used to represent the expectation of the existence of edge (Vj, Vk), and EG is replaced by Ac⊙σ(M), where M is the GraphMask to be learned. Since many tasks only care about nodes of some classes and how their models predict these classes, we correct it to formula (4) for class c.
[0025]
[0026] Then, we use GNNExplainer to extract the subgraph that really affects the recommendation results from the recommendation path graph. This subgraph is called the explanation subgraph (i.e., graph pattern) as the explanation of the recommendation results. Then, we evaluate the reliability of the explanation, and compare the generated graph pattern with the user preference pattern as a benchmark to visually verify the explanation.
[0027] 2.4 Auxiliary node path optimization method. In order to solve the problem that the recommendation graph path is complicated due to the large number of movies that users have watched, and thus there is no common graph pattern, the present invention draws on the idea of data augmentation and proposes an auxiliary node path optimization method. Without affecting the semantics, data augmentation is performed on the recommendation graph path, specifically, the numerous recommendation path graphs are optimized. The reason for classifying director D, actor A, and similar user UL as a type of node is: taking the actor as an example, if the particularity of the actor node is retained, the common graph pattern of the user group cannot be extracted due to the large number of actors, so the actor particularity is shielded. Through the auxiliary node path optimization method, the particularity of the type node in the path can be retained, while the particularity of the auxiliary node is shielded to obtain an optimized recommendation graph path.
[0028] Further, step 3 specifically includes:
[0029] 3.1 Constructing feature score overview and embedding distribution details. Starting from features and feature combinations, in order to enable analysts to obtain preference patterns and compare them with the consistency of embedding space distribution, feature list view, feature attention view, and embedding distribution view are designed for display. Analysts can select features of interest or combine multiple features in the feature list view, and view the user groups that pay attention to the feature combination in the feature attention view.
[0030] After selecting the user groups of interest, their spatial locations will be highlighted in the embedding space distribution map, which is obtained through the recommended high-dimensional embedding dimensionality reduction clustering, and allows analysts to expand their observations on the user groups of interest, view the user's type, actor, director relevance scores, and can also drill down on only a certain relevance metric to explore the users of interest in a more fine-grained manner.
[0031] 3.2 Build a preference analysis comparison. The preference analysis comparison consists of a user group preference analysis comparison view and a user preference analysis comparison view. The user group preference analysis comparison is implemented using bar charts, radar charts, and doughnut charts. The bar chart shows the degree of attention paid by different user groups to different features. The radar chart is used to present the coverage of features that different user groups pay attention to. The outermost doughnut chart is used to highlight the differences in the features that user groups pay attention to. The user preference analysis comparison consists of a bubble chart, historical movie viewing information, and movie detail information. Analysts can use bubble charts to conduct in-depth research on users of interest. By clicking on the actor entity in the bubble chart, a list of movies watched by the user with the actor’s participation can be presented, and then the posters and detailed information of the movie can be viewed in the movie detail information chart.
[0032] 3.3 Construct an explanatory pattern exploration analysis. It consists of a recommendation result traceability graph and a pattern comparison exploration graph. The recommendation result traceability graph uses a scalable force-directed graph to display the graph path between the target user and the recommendation results. The pattern comparison exploration graph consists of column circles. This view can provide an overall overview of the extracted graph pattern and adjust the number of important nodes in the graph pattern. In the upper right corner of the column circle, there are a recommendation detail button and an explanation detail button. Click the recommendation detail button to display the detailed information of the recommended movie. Click the explanation detail button to display the recommendation result traceability graph, which includes the recommendation detail graph and the explanation detail graph.
[0033] 3.4 Constructing an overview of explanation evaluation. In order to quantitatively evaluate the explanation patterns and verify the reliability of the explanation patterns of the user group, a bidirectional bar chart is designed to show the quantitative proportion of a certain explanation graph pattern extracted in all explanation graph patterns. At the same time, by conducting a joint analysis with the preference analysis comparison chart, the consistency of its explanation graph pattern with the historical preference pattern can be checked, thereby evaluating the reliability of the explanation graph pattern.
[0034] Furthermore, step 4 specifically includes: providing analysts with an understanding of the recommendation results through model calculation and visualization design, and obtaining visual insights based on this, improving the recommendation performance of the model through iterative interactive analysis, thereby verifying the reliability of the analysis method, and forming a closed loop of the model, visual analysis system, and model.
[0035] To this end, the present invention designs a comparative experiment. First, the system is used to extract the interpretation pattern of the user group, and the recommended movies that meet the interpretation pattern are obtained (regardless of whether they are hits). Then, the training set is randomly replaced and adjusted, and the model is trained again. Using the new recommendation results, the performance of the recommendation model on the commonly used indicators of the recommendation system, such as precision rate P, recall rate R, accuracy rate AUC, and ranking index NDCG, is calculated.
[0036] Finally, combined with the experimental results, it can be clearly observed that with the help of the system of the present invention, the recommendation performance of the recommendation model on the four indicators has been improved in most cases, which proves the reliability and effectiveness of the method of the present invention.
[0037] The second aspect of the present invention relates to a recommendation interpretation visual analysis device based on an explanatory graph neural network, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the recommendation interpretation visual analysis method based on an explanatory graph neural network of the present invention.
[0038] The third aspect of the present invention relates to a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the recommendation interpretation visual analysis method based on an interpretation graph neural network of the present invention.
[0039] The present invention mainly solves the following three problems: ① Using interpretable graph neural network to explain the recommendation system: convert the recommendation problem into a graph classification problem, use the auxiliary node path optimization method to process the recommendation path graph, extract the graph pattern through the interpretation model, and thus explain the recommendation results; ② Starting from the instance level and group level, explore the graph patterns of single users, user groups, and multiple user groups, conduct multi-granularity graph pattern mining, and reveal the recommendation pattern of the graph neural network; ③ Through the real Douban movie heterogeneous graph data, the reliability of the visual analysis method is verified and evaluated, which solves the black box problem of recommendation and increases the interpretability.
[0040] The advantages of the present invention are: (1) simple operation and strong expressiveness. The system view layout and interactive design are designed according to the principles of visualization design. Users can perform simple selection operations in the visualization interface from top to bottom and from left to right. The system will display the recommendation results, explain the details and their rich contextual features, and make intuitive comparisons and evaluations. (2) Strong innovation. At present, there is no visualization analysis method that uses an interpretable graph neural network model to analyze recommendation results. This method uses an interpretable graph neural network to interpret the recommendation results by converting the recommendation problem into a graph classification problem. At the same time, the important behavioral subject "analyst" is also included in the visualization process. Visual insights are obtained through the system view, and the model is trained again. After iterative adjustment, the index performance of the recommendation model is improved. (3) Practical significance. The present invention not only uses the real Douban movie data set to make the system results feasible, but also can help non-model developers quickly understand the origin of the recommendation results, support multi-granularity interpretation in the recommendation scenario, reveal the recommendation mode of the graph neural network, and increase the interpretability of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1It is the overall flow chart of the method of the present invention.
[0042] Figure 2 It is the actual system interface of the method of the present invention. DETAILED DESCRIPTION
[0043] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0044] Example 1
[0045] This embodiment provides a Douban movie recommendation method using the recommendation interpretation visual analysis method based on the interpretation graph neural network of the present invention, referring to the technical Figure 2 The present invention includes four stages in total, namely, cleaning and processing Douban user and movie data, calculating the explanation model, explaining the recommended movies based on users, designing data visualization views for the explanation process, and then carrying out analysis and evaluation of the explanation and reliability experiments, and finally applying the model to recommend Douban movies.
[0046] Step 1: Data cleaning and processing: Clean and pre-process Douban data according to certain rules to ensure the validity of the data, and calculate the user's feature relevance score based on the movie viewing data;
[0047] 1.1 Get the original data set. Use the scrapy framework to crawl a large amount of data from the real Douban movie website, including 20,000 Douban user data, 20,000 Douban movie data, 10,000 director data, 10,000 actor data, and 3 million user historical movie records. These movie data cover detailed information such as release year, type, label, director, actor, screenwriter, etc.
[0048] 1.2 Preprocess the original data set. To ensure data quality and prevent invalid data, the data was filtered based on Douban users’ movie viewing records, the number of times a movie was viewed by valid users, and the completeness of the movie genre text. In addition, considering that recommendation tasks in real scenarios usually face the cold start problem, 10% of users with a viewing record of less than 50 movies were retained as cold start data to fully evaluate the model performance.
[0049] 1.3 Calculate the feature relevance score. Use the feature relevance score (feature score) to measure the user's viewing characteristics. This method is based on the attribute characteristics of each movie in the target user's historical viewing records, including type relevance score, director relevance score and actor relevance score.
[0050] Step 2: Model calculation; use a representative graph neural network model for training to obtain the user's high-dimensional embedding representation and the movie recommendation results for each Douban user, and convert the user's embedding space distribution into a classification task; then use the auxiliary node path optimization method to obtain the optimized path graph between Douban users and recommended movies, and then use the explanatory graph neural network model GNNExplainer to extract important graph patterns in movie recommendation prediction.
[0051] 2.1 Convert the recommendation problem into a graph classification problem. Specifically, the method of converting the movie recommendation problem into a graph classification problem is adopted, and then the idea of GNNExplainer is used to explain the recommendation problem. Converting the recommendation problem into a graph classification problem is divided into two steps. The first step is to convert the embedding space distribution obtained by the recommendation model into a classification task, as shown in step 2.2; the second step is to convert the Douban user movie recommendation results into a graph structure, as shown in step 2.3; through these two steps, the movie recommendation problem is converted into a graph classification problem.
[0052] 2.2 Convert the embedding space distribution obtained by recommendation into a classification task. Douban data is used as input, including information such as users, movies watched by users, and movie features. After training Douban data using the recommendation model KGAT, the embedding representation of all entities is obtained. In addition, in order to obtain a more meaningful user embedding distribution, the present invention updates the embedding representation of the user, combines the embedding representation of the user's recommended movies with the user's original embedding representation, and thus updates the embedding representation of the user. Clustering and dimensionality reduction are performed on the embedding representation, and the method UMAP based on manifold theory is used, which can better retain the global structure of the data, so that the data points after dimensionality reduction are closer to the global layout of the original data in the low-dimensional space. At the same time, in order not to be affected by the initial center selection, DBSCAN is selected for clustering. Through multiple parameter adjustment experiments, the boundaries between user groups are clear and not mixed, and the scattered point positions contain certain recommendation semantic information. The significance of clustering Douban users is to classify users. Users in each cluster (user group) have a certain degree of similar recommendation semantic information. On the contrary, there must be differences in recommendation information between user groups with far-flung spatial positions, which constitutes a classification task.
[0053] 2.3 Convert the movie recommendation results of the user into a graph structure. According to the user ID, obtain the top 20 movie IDs recommended by the recommendation model. With the user as the starting point, the recommended movie as the target point, and the user's movie viewing information as the intermediate node, a complete path graph between the user and the recommended movie is constructed. Then, the auxiliary node path optimization method is used to optimize the recommendation graph and obtain the optimized recommendation graph path. Through this process, the recommendation results are converted into a graph structure.
[0054] 2.4 Interpretable graph neural network model based on GNNExplainer in recommendation scenario. The core idea of GNNExplainer is to identify the subgraph structure and node features that have the greatest influence on the prediction results. The workflow of GNNExplainer is to take a trained GNN model and its prediction results as input, and then output a subgraph that can have the greatest impact on the prediction results of the GNN model.
[0055] 2.5 Auxiliary node path optimization method. In order to solve the problem that the recommendation graph path is complicated due to the large number of movies that users have watched, and there is no common graph pattern, the present invention draws on the idea of data augmentation and proposes a new method, the auxiliary node path optimization method. Without affecting the semantics, data augmentation is performed on the recommendation graph path. Specifically, the numerous recommendation path graphs are optimized, which can retain the particularity of the type nodes in the path, while shielding the particularity of the auxiliary nodes, to obtain an optimized recommendation graph path.
[0056] Step 3: Design data visualization views based on the interpretation process; design interpretation exploration analysis views for the obtained user recommendation graph patterns to facilitate analysts to conduct multi-granular graph pattern mining. At the same time, extract user preference patterns through preference analysis comparison views, and combine with interpretation evaluation views to verify the reliability of the interpretation model.
[0057] 3.1 Build an overview of feature scores and embedding distribution details. Analysts can select features of interest or combine multiple features in the feature list view, and view the user groups that pay attention to this feature combination in the feature attention view, and highlight their spatial distribution positions in the embedding space distribution map. Analysts are allowed to expand their observations on user groups of interest, and support in-depth research on only a certain correlation indicator, exploring users of interest in a more granular manner.
[0058] 3.2 Construct preference analysis comparison. Preference analysis comparison consists of user group preference analysis comparison view and user preference analysis comparison view. User group preference analysis comparison is implemented using bar charts, radar charts, and doughnut charts. Bar charts show the degree of attention paid by different user groups to different features. Radar charts are used to show the coverage of features that different user groups pay attention to. The outermost doughnut chart is used to highlight the differences in the features that user groups pay attention to.
[0059] 3.3 Construct explanatory pattern exploration analysis. It consists of a recommendation result traceability graph and a pattern comparison exploration graph. The recommendation result traceability graph uses a scalable force-directed graph to display the graph path between the target user and the recommended movie. By clicking on a node of interest, you can expand the detailed entity information contained in that type of node, such as which movie the user watched, which type it belongs to, which director and actor participated in it, and other fine-grained information. In order to intuitively display the differences in graph patterns of different user groups, a column-oriented circle view is designed, which can provide an overall overview of the extracted recommendation graph patterns and adjust the number of important nodes in the graph pattern. In the column-oriented circle, the node color represents the node type. In the upper right corner of the column-oriented circle, there are a recommendation detail button and an explanation detail button. Click the recommendation detail button to display the detailed information of the recommended movie. Click the explanation detail button to display the traceability information of the recommended movie.
[0060] 3.4 Constructing an overview of explanation evaluation. In order to quantitatively evaluate the explanation pattern and verify the reliability of the explanation pattern of the user group, a bidirectional bar chart is designed to show the quantitative proportion of the explanation graph pattern. At the same time, by conducting a joint analysis with the preference analysis comparison chart, the consistency of its explanation graph pattern with the user's historical preference pattern can be checked, thereby evaluating the reliability of the explanation graph pattern.
[0061] Step 4: Analysis and evaluation of explanations: Through model calculation and visualization design, analysts are provided with multi-granular explanations of the recommendation results. On this basis, the present invention evaluates the explanation method. The evaluation idea is to use the visual insights obtained by the analysis method to improve the recommendation performance indicators of the model, thereby verifying the reliability of the analysis method and forming a closed loop of the model, visual analysis system, and model. The present invention aims to provide analysts with an understanding of the recommendation results through the model calculation and visualization design of the above steps, and obtain visual insights based on this, and improve the recommendation performance of the model through iterative interactive analysis.
[0062] Step 5: Apply the model to recommend Douban movies; in the Douban movie recommendation scenario, use the KGAT model to recommend movies for each user, extract the TOP20 movies, and then use the explanation model GNNExplainer to extract the recommended explanation graph pattern, and retain the recommended movies that meet the explanation graph pattern. Then, randomly replace and adjust the training set, and train the model again. Using the new recommendation results, calculate the performance of the recommendation model on the commonly used indicators of the recommendation system, such as precision P, recall R, accuracy AUC, and ranking index NDCG. The recommended indicator results are shown in Table 1.
[0063] Table 1 Recommended performance
[0064]
[0065] It can be seen from the results that the method of the present invention has improved the four recommendation indicators in the movie recommendation scenario of Douban users, thereby achieving more accurate movie preference recommendations.
[0066] Figure 2 It is the actual system interface of the method of the present invention, wherein part (a) is the feature view, part (b) is the feature attention view, part (c) is the embedding distribution view, part (d) is the user group preference analysis comparison view, part (e) is the user preference analysis comparison view, part (f) is the pattern comparison exploration view, part (g) is the recommendation tracing view, and part (h) is the explanation evaluation diagram.
[0067] Example 2
[0068] This embodiment relates to a recommendation interpretation visual analysis device based on an explanatory graph neural network, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the recommendation interpretation visual analysis method based on an explanatory graph neural network of Example 1.
[0069] Example 3
[0070] This embodiment relates to a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the recommended interpretation visual analysis method based on an interpretation graph neural network of embodiment 1 is implemented.
[0071] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A recommendation explanation visual analysis method based on an explanation graph neural network includes the following steps: Step 1: Clean and preprocess the data to ensure data validity, and calculate feature relevance scores based on movie viewing data; Step 2: Take the processed data as input and train it with the representative graph neural network model KGAT to obtain the high-dimensional embedding representation and recommendation results of the entity; Convert the embedding space distribution into a classification task, use the auxiliary node path optimization method to obtain the optimized user recommendation path graph, and use the explanatory graph neural network interpretation model GNNExplainer to extract the graph patterns that are important for recommendation prediction; Step 3: Design a data visualization view to display the interpretation process. Design an interpretation exploration analysis view for the obtained graph pattern to facilitate analysts to conduct multi-granular graph pattern mining. At the same time, verify the reliability of the interpretation model through the preference analysis comparison view combined with the interpretation evaluation view. Step 4: Provide analysts with an understanding of the recommendation results through model calculation and visualization design, and obtain visual insights based on this. Improve the recommendation performance of the model through iterative interactive analysis to verify the reliability of the analysis method and form a closed loop of model-visual analysis system-model; Step 2 specifically includes: The representative graph neural network model KGAT is used for training to obtain high-dimensional embedding representations and recommendation results of entities, and the recommendation problem is converted into a graph classification problem. The idea of GNNExplainer is used to explain the recommendation problem. The conversion of the recommendation problem into a graph classification problem is divided into two steps. The first step is to convert the embedding space distribution obtained by the recommendation into a classification task. The second step is to convert the user recommendation results into a graph structure. Through this conversion method, the recommendation problem is converted into a graph classification problem. 2.1 Convert the embedding space distribution obtained by recommendation into a classification task; use Douban data as input, including information about users, movies watched, and movie features; obtain the user's embedding representation by training the data using the recommendation model KGAT; update the user's embedding representation, combining the user's recommended movie embedding representation with the user's original embedding representation, thereby updating the user's embedding representation; Clustering and dimensionality reduction are performed on the embedded representation of the updated user. UMAP, a method based on manifold theory, is used. DBSCAN is selected for clustering. Subsequently, a meaningful user group distribution is obtained through multiple parameter experiments. The boundaries between user groups are clear and not mixed. The significance of the clustering result lies in classifying users. Users in each cluster have a certain degree of similar recommendation semantic information. On the contrary, there must be differences in recommendation information between user groups that are far away in space, which constitutes a classification task. 2.2 Convert the user's recommendation results into a graph structure; first, according to the user's ID in the user group, obtain the top 20 item IDs recommended by the recommendation model; with the user as the starting point, the recommended item as the target point, and the user's movie viewing information as the intermediate node, a complete path graph between the user and the recommended item is constructed; then, the auxiliary node path optimization method in step 2.4 is used to optimize the recommendation graph path, and the optimized recommendation graph path is obtained; through this process, the recommendation results are converted into a graph structure; 2.3 Interpretable graph neural network model based on GNNExplainer in recommendation scenario; The core idea of GNNExplainer is to identify the subgraph structure and node features that have the greatest influence on the prediction results; The workflow of GNNExplainer is to take a trained GNN model and its prediction results as input, and then output a subgraph that can have the greatest impact on the prediction results of the GNN model; In this process, graph masks are used to select the truly important subgraphs, and feature masks are used to select the truly important sub-feature sets; Given a node v, the goal is to identify the subgraph And the related features Xs = {Xj|Vj∈Gs}, where c is the category, these features are important for GNN's prediction y^; the concept of importance is formalized using mutual information and the optimization formula (3) is formulated: Since GNNExplainer is interpreted on the trained GNN model, H(Y) is a constant. After the above formula is converted, As[j, k] is used to represent the expectation of the existence of edge (Vj, Vk), and EG is replaced by Ac⊙σ(M), where M is the graph mask to be learned. Since many tasks only care about nodes of some classes and how their models predict these classes, for class c, it is corrected to formula (4); Then, we use GNNExplainer to extract the subgraph that really affects the recommendation results from the recommendation path graph. This subgraph is called the explanation subgraph, which serves as the explanation of the recommendation results. Then, we evaluate the reliability of the explanation, and compare the generated graph pattern with the user preference pattern as a benchmark to visually verify the explanation. 2.4 Auxiliary node path optimization method; In order to solve the problem of redundant recommendation graph paths caused by the large number of movies watched by users and the absence of common graph patterns, the idea of data augmentation is borrowed, and an auxiliary node path optimization method is proposed; without affecting the semantics, data augmentation is performed on the recommendation graph path, specifically, the numerous recommendation path graphs are optimized; director D, actor A, and similar users UL are each classified as a type of node; through the auxiliary node path optimization method, the particularity of the type node in the path can be retained, while the particularity of the auxiliary node is shielded, and an optimized recommendation graph path is obtained.
2. The recommendation explanation visual analysis method based on the explanation graph neural network according to claim 1, characterized in that: Step 3 specifically includes: 3.1 Construct an overview of feature scores and embedding distribution details; Starting from features and feature combinations, in order to enable analysts to obtain preference patterns and compare them with the consistency of embedding space distribution, feature list view, feature attention view, and embedding distribution view are designed for display; analysts can select features of interest or combine multiple features in the feature list view, and view the user groups that pay attention to the feature combination in the feature attention view; After selecting the user group of interest, their spatial location will be highlighted in the embedding space distribution map, which is obtained by the recommended high-dimensional embedding dimensionality reduction clustering, and allows analysts to expand observations on the user group of interest, view the user's type, actor, director relevance score, and can also drill down to only a certain relevance metric to explore the users of interest in a more granular manner; 3.2 Construct preference analysis comparison; preference analysis comparison consists of user group preference analysis comparison view and user preference analysis comparison view; user group preference analysis comparison is realized by using bar chart, radar chart and doughnut chart; bar chart shows the degree of attention paid by different user groups to different features; radar chart is used to present the coverage of features paid attention to by different user groups; the outermost doughnut chart is used to highlight the differences in the features paid attention to by user groups; user preference analysis comparison consists of bubble chart, historical movie viewing information and movie details information; analysts can conduct in-depth research on users of interest through bubble chart; by clicking on the actor entity in the bubble chart, a list of movies watched by the user with the participation of the actor can be presented, and then the poster and detailed information of the movie can be viewed in the movie details information chart; 3.3 Construct explanatory pattern exploration analysis; including recommendation result traceability diagram and pattern comparison exploration diagram; recommendation result traceability diagram uses a scalable force-directed diagram to display the graph path between the target user and the recommendation result; the pattern comparison exploration diagram is composed of column circles, which can provide an overall overview of the extracted graph pattern and adjust the number of important nodes in the graph pattern; in the upper right corner of the column circle, there are recommendation details button and explanation details button; click the recommendation details button to display the detailed information of the recommended movie; click the explanation details button to display the recommendation result traceability diagram, including the recommendation details diagram and the explanation details diagram; 3.4 Construct an overview of explanation evaluation; In order to quantitatively evaluate the explanation pattern and verify the reliability of the explanation pattern of the user group, a bidirectional bar chart is designed to show the quantitative proportion of a certain explanation graph pattern extracted in all explanation graph patterns. At the same time, by performing a joint analysis with the preference analysis comparison chart, the consistency of its explanation graph pattern with the historical preference pattern can be viewed, thereby evaluating the reliability of the explanation graph pattern.
3. The recommendation explanation visual analysis method based on the explanation graph neural network according to claim 1, characterized in that: Step 1 specifically includes: 1.1 Obtain the original data set; use the scrapy framework to crawl data from real movie websites, including user data, movie data, director data, actor data, and user historical movie viewing records; the movie data covers detailed information such as release year, type, label, director, actor, and screenwriter; 1.2 Preprocess the original data set; To ensure data quality and prevent invalid data, we filter data based on the following conditions: the user’s movie viewing record is at least greater than 50, the number of times a movie has been viewed by valid users is greater than 20, and the movie’s genre text is complete; In addition, considering that recommendation tasks in real scenarios often face cold start problems, we retain 10% of users with less than 50 movie viewing records as cold start data to fully evaluate the model performance; 1.3 Calculate the feature relevance score; use the feature relevance score to measure the user's viewing characteristics; calculate based on the attribute characteristics of each movie in the target user's historical viewing record, including the type, director and actor relevance score. The specific calculation formula is: Type set L = {L1, L2, L3, ..., L i ,…L 35 }, because the types of all movies are within the range of 35 types; user set U = {U1,U2,U3,…U k ,…U 9622 }, indicating 9622 users; for user U k For example, suppose he has watched n movies, which is the set M k ={m1,m2,m3,…m j ,…m n }, where movie m j The corresponding type set is G j ,use Representative movie m j Medium Type L i The feature score of is shown in formula (1); The genre relevance score for a user is the genre relevance score of the movies that the user has watched. i The correlation score is The calculation of is shown in formula (2); the calculation of the relevance score of the user group is to perform a summation operation based on the relevance scores of the users.
4. The recommendation explanation visual analysis method based on the explanation graph neural network according to claim 1, characterized in that: Step 4 specifically includes: Through model calculation and visualization design, analysts can understand the recommendation results and obtain visual insights. Through iterative interactive analysis, the recommendation performance of the model can be improved to verify the reliability of the analysis method and form a closed loop of model-visual analysis system-model. Design a comparative experiment; first, use this system to extract the explanation pattern of the user group and obtain recommended movies that match the explanation pattern; then, randomly replace and adjust the training set and train the model again; use the new recommendation results to calculate the performance of the recommendation model in terms of precision P, recall R, accuracy AUC, and ranking index NDCG, which are commonly used indicators in recommendation systems.
5. A recommendation explanation visual analysis device based on an explanatory graph neural network, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the recommendation explanation visual analysis method based on an explanatory graph neural network according to any one of claims 1 to 4.
6. A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the recommendation interpretation visual analysis method based on an interpretation graph neural network as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Object recommendation method and device based on path reasoning and electronic equipment
CN112884548A
Interpretable recommendation method based on graph neural network reasoning
CN113158045A