A multi-view graph neural network community question and answer expert recommendation method
By combining a multi-view graph neural network with Graphsage and a multi-view attention mechanism, the problem of underutilization of data relationships in expert recommendations is solved, resulting in more accurate expert recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-03-27
AI Technical Summary
Existing community Q&A expert recommendation methods fail to fully utilize the relationships between different types of data and fail to effectively extract information about the relationships between experts.
A multi-view graph neural network combined with Graphsage is used to extract multi-hop neighbor information, and a rich vector representation is formed through a multi-view attention mechanism to predict the relevance of candidate experts to the target problem.
This method improves the accuracy and efficiency of expert recommendations. Experimental results show that it significantly improves the recommendation performance compared to methods that do not consider the textual information of the questions and the relationship between the expert's historical question set.
Smart Images

Figure CN117633206B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a multi-view graph neural network community question answering expert recommendation method and belongs to the technical field of data processing. BACKGROUND
[0002] In a community question answering (CQA) website, users can share knowledge by publishing and answering questions, and the CQA website will recommend users with corresponding knowledge and ability to answer the questions, and such users are also called expert users. For example, in the community question answering website Zhihu, the question "What is deep learning?" is published, and Zhihu will give a list of suitable candidate answerers in the recommendation column, and the question publisher can invite these candidate answerers to answer the question, and the process of selecting the best candidate answerer list is called expert recommendation.
[0003] In recent years, there have been some popular expert recommendation methods for recommending the most suitable candidate answerers for a question. In 2019, Expert2Vec model proposed by Sara Mumtaz et al. is an embedding-based method, which finds the best answerer for a given question by calculating the similarity between the professional knowledge representation of the question and the candidate expert user. In 2021, TSAR model proposed by Jian Song et al. combines a deep structured semantic model (DSSM) to propose a graph-based algorithm, which solves the problem of long response time of recommended expert users. In 2022, Qiyao Peng et al. proposed a multi-view attention matching method for personalized expert search, which aims to understand the comprehensive relationship between experts and questions. Although these studies have solved some shortcomings of current community question answering expert recommendation, they still do not extract information about the relationship between experts when extracting candidate expert information, and do not fully utilize the association between different types of data.
[0004] The application combines graph neural network Graphsage to extract multi-hop neighbor information, and combines a multi-view attention mechanism to extract the association information between multiple view data, so as to form a rich vector representation for prediction. The key difficulty is how to effectively combine the multi-view graph neural network and the community question answering expert recommendation. SUMMARY
[0005] The application provides a multi-view graph neural network community question answering expert recommendation method, which represents target question text data and expert historical question content into vectors respectively, and learns the association relationship between the target question and the expert historical question set and the association relationship between the expert information data by using graph neural network and multi-view learning, and then calculates the correlation score, and the score is high. The expert becomes the recommended expert of the target question.
[0006] The technical solution of the present application is: a multi-view graph neural network community question and answer expert recommendation method, the specific steps of the method are as follows:
[0007] Step1, expert historical question set undirected graph matrix construction: taking the question as the node, a edge is established between the questions answered by the same expert, and then an expert historical question set undirected graph matrix is formed;
[0008] Step2, vectorization of data: respectively put the target question information matrix and the expert historical question set undirected graph matrix into the question text encoder, extract information with transformer, generate target question vector and expert historical question vector;
[0009] Step3, learning using graph representation to generate multi-view data matrix: graph representation learning is performed on the expert historical question vector to obtain three view representations of label, title and body;
[0010] Step4, learning candidate expert vector using multi-view attention mechanism: the preference of each expert to the question is different, and each has its own emphasis. The three view representations of label, title and body are combined with the attention mechanism to learn the part related to the target question in the expert historical question set, and finally form the candidate expert vector;
[0011] Step5, prediction: on the basis of Step2 and Step4, the target question vector and the candidate expert vector are spliced and scored to predict, and the one with high score becomes the candidate expert of the target question, realizing the multi-view graph neural network community question and answer expert recommendation.
[0012] Further, Step2 includes:
[0013] For the i-th label of a given question The result of converting it using the label embedding layer is The given question includes the target question and the expert historical question; then, since the label is an independent classification feature, a dense layer is used to learn the label hidden feature, which is represented as:
[0014]
[0015] Denote the bias of the dense layer;
[0016] Then, stack all the label hidden features and aggregate all the label hidden features through an average aggregator, which is calculated as follows:
[0017]
[0018] v represents the length of the label hidden feature;
[0019] For long text information, after embedding, the transformer is used to extract the information of the text features of the title, denoted as E
[0020]
[0021] l represents the length of the text features of the title;
[0022] For title information, after embedding, the transformer is used to extract the information of the title features, denoted as E t ;
[0023] Through the above process, the target question vector and the expert historical question vector are obtained, the target question vector includes the label hidden features, the title features and the text features of the target question, and the expert historical question vector includes the label hidden features, the title features and the text features of the expert historical question.
[0024] Further, the Step3 includes:
[0025] Step3.1, using the mean aggregator to aggregate E g , E b , and E t , to obtain O g = MEAN(E g ), and O t , O b , that is, the view information matrix of the label, the title and the text; MEAN(.) represents the mean aggregation processing;
[0026] Step3.2, inputting the three view information matrices, that is, O g , O t , and O b , into the graph neural network GraphSAGE, using GraphSAGE to extract the information of the first-order neighbor and the second-order neighbor of the node, and the formula is as follows:
[0027]
[0028] Finally, the view representation of the label, the title and the text is formed and W G is a projection matrix, n represents the number of sampling nodes, and the input is the feature embedding combination of the two-hop neighbor f i and the first-hop neighbor f s .
[0029] Further, the Step4 includes:
[0030] Step4.1, according to the multi-view features of the candidate expert, that is and respectively, the label view, the title view, the text view, the weight of the expert user under the attention of the label view is calculated as follows:
[0031]
[0032] Among them, l g , l t , l b respectively represent the attention score of the label view, the title view and the text view;
[0033] For the title and text view features, their weights are calculated respectively by the same method and
[0034]
[0035]
[0036] So as to capture the view internal correlation between the candidate expert and the target problem through the interactive attention mechanism of the three views;
[0037] Then, according to the different weights of different view features, the candidate expert vector u is obtained:
[0038]
[0039] The attention weight of the expert user in the label view, the title view and the text view is respectively, and the knowledge and ability degree of the expert user in the label, the title and the text.
[0040] Further, the Step5 includes:
[0041] First, the candidate expert vector u and the target problem vector q are spliced, and then a linear layer is used to calculate the correlation score S c between them, and the candidate expert with the highest correlation score is recommended as the expert of the target problem.
[0042] The beneficial effects of the present application are:
[0043] The present application combines the graph neural network Graphsage to extract multi-hop neighbor information, and combines the multi-view attention mechanism to extract the associated information between multiple view data, so as to form a rich vector representation for prediction;
[0044] The present application respectively analyzes a plurality of association relationships between problem text data and expert historical problem set data, extracts semantic features of the problem text through a transformer, extracts multi-view information of the user historical problem set using a graph neural network and multi-view learning, forms rich vector representations of the expert user, and learns the association information between the target problem text and the expert user. Experimental results show that the recommendation method achieves good results, and compared with the method without considering the relationship between the problem text information data and the expert historical problem set, the recommendation effect is improved to a certain extent. BRIEF DESCRIPTION OF DRAWINGS
[0045] Fig. 1 is a problem relationship node graph proposed by the present application;
[0046] Fig. 2 is a community Q&A expert recommendation method based on a multi-view graph neural network proposed by the present application, and a corresponding recommendation model flowchart. DETAILED DESCRIPTION
[0047] Embodiment 1: As shown in the following, a multi-view graph neural network community Q&A expert recommendation method, the specific steps of the method are as follows: Figs. 1-2
[0048] Step 1, expert historical problem set undirected graph matrix construction: taking the problem as a node, establishing an edge between the problems answered by the same expert, and then forming an expert historical problem set undirected graph matrix;
[0049] Step 2, vector representation of data: respectively putting the target problem information matrix and the expert historical problem set undirected graph matrix into the problem text encoder, extracting information using the transformer, and generating the target problem vector and the expert historical problem vector;
[0050] The Step 2 includes:
[0051] For the i-th label of a given problem The result of converting it using the label embedding layer is The given problem includes a target problem and an expert historical problem; then, since the label is an independent classification feature, a dense layer is used to learn the label hidden feature, which is represented as:
[0052]
[0053] denotes the bias of the dense layer;
[0054] Then, stack all the label hidden features, and aggregate all the label hidden features through an average aggregator, and calculate as follows:
[0055]
[0056] v represents the length of the label hidden feature;
[0057] For long text information, after embedding, the transformer is used to extract the body text feature, denoted as:
[0058]
[0059] l represents the length of the body text feature;
[0060] For title information, after embedding, the transformer is used to extract the title feature, denoted as E t ;
[0061] Through the above process, the target question vector and the expert historical question vector are obtained, the target question vector includes the label hidden feature, the title feature and the body text feature of the target question, and the expert historical question vector includes the label hidden feature, the title feature and the body text feature of the expert historical question.
[0062] Step3, learning using graph representation to generate multi-view data matrix: learning the graph representation of the expert historical question vector to obtain three view representations of labels, titles and bodies;
[0063] The Step3 includes:
[0064] Step3.1, using the mean aggregator to aggregate E g , E b , E t , to obtain O g = MEAN(E g ), and O t , O b , that is, the view information matrix of labels, titles and bodies; MEAN(.) represents the mean aggregation processing;
[0065] It is considered that the experts who have answered the same question have similar knowledge and ability, so learning the neighbor features of an expert node helps to obtain a more rich representation of the expert node. The application uses a Graphsage graph neural network to extract the features.
[0066] Suppose the parameters of K aggregation functions have been learned, which aggregate information from neighbor nodes, denoted as AGGREGATE k , , which is used to propagate the information graph matrix W k , At each iteration or search depth, the nodes aggregate information from their neighbors, and as the process iterates, the nodes gradually obtain more and more information from further parts of the graph.
[0067] Step3.2, input the three view information matrices, i.e. g , t , b into the graph neural network GraphSAGE, and use GraphSAGE to extract the information of the first-order neighbors and the second-order neighbors of the nodes, as shown in the following formula:
[0068]
[0069] Finally, the view representations of the label, title, and body are formed and W G is a projection matrix, n represents the number of sampled nodes, and the input is a combination of the feature embedding of the two-hop neighbors f i and the one-hop neighbors f s .
[0070] Step4, learn the candidate expert vector using the multi-view attention mechanism: each expert has different preferences for problems and focuses on different aspects. The three view representations of the label, title, and body are combined with the attention mechanism to learn the part of the expert's historical problems that is related to the target problem, and finally form the candidate expert vector;
[0071] Considering that experts have answered questions in different fields, and the relevance of the problems the experts have answered to the target problem is different. Therefore, we need to extract the part of the expert's historical answers that is related to the target problem. Therefore, we conducted research on the multi-view attention mechanism. After the last graph representation learning layer, three views are formed, which are aggregated to form the target problem vector. As for the candidate experts, because each expert not only answers questions in his own field, but also may answer questions that he is interested in, we need to extract the part of his answers that is related to the target problem.
[0072] The Step4 includes:
[0073] Step4.1, according to the multi-view features of the candidate experts, i.e. and are the label view, title view, and body view respectively, calculate the weight of the expert user under the label view attention as follows:
[0074]
[0075] wherein, l g , l t , l brespectively represent the attention scores of the label view, the title view and the content view;
[0076] For the title and content view features, their weights are calculated respectively by the same method as and
[0077]
[0078]
[0079] Thus, the view-in view relevance between the candidate expert and the target question is captured through the interactive attention mechanism of the three views;
[0080] Then, according to the different weights of different view features, the candidate expert vector u is obtained:
[0081]
[0082] respectively represent the attention weights of the label view, the title view and the content view of the expert user, and the knowledge and ability level of the expert user in the label, title and content.
[0083] Step5, prediction: on the basis of Step2 and Step4, the target question vector and the candidate expert vector are spliced to perform scoring prediction, and the candidate expert with a high score becomes the candidate expert of the target question, thereby realizing the community question and answer expert recommendation of the multi-view graph neural network.
[0084] Further, the Step5 includes:
[0085] First, the candidate expert vector u and the target question vector q are spliced, and then a linear layer is used to calculate the relevance score S between them c The candidate expert with the highest relevance score is recommended as the expert of the target question.
[0086] In order to illustrate the performance of the present application, a model without using a graph neural network is selected for comparison, and a model without using multi-view learning is selected for comparison.
[0087] The method in which the input layer does not use a graph neural network as auxiliary input is denoted as M1, and the method in which the input layer uses a graph neural network as auxiliary input is denoted as M2;
[0088] MRR (Mean reciprocal rank) is an internationally recognized mechanism for evaluating search algorithms, that is, the first result matches, the score is 1, the second match score is 0.5, the nth match score is 1 / n, and if there is no matching sentence, the score is 0. The final score is the sum of all scores. The optimal method of expert recommendation is verified by comparing and analyzing the mrr value of the expert recommendation result.
[0089] Table 1 is the average mrr value of different methods
[0090]
[0091] From the above data, it can be seen that the effect of using graph neural network and multi-view learning expert historical question set and question text data is better than that of the model without using graph neural network and multi-view learning. The experimental results prove that the present application has achieved good results in the MRR, NDCG and P@1 indexes of the recommendation system ranking.
[0092] The specific embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the above-mentioned embodiments, and various changes can be made within the knowledge possessed by those skilled in the art without departing from the purpose of the present application.
Claims
1. A multi-view graph neural network community question-answering expert recommendation method, characterized in that: The specific steps of the method are as follows: Step 1: Construction of an undirected graph matrix of expert history problem set: Treat the problem as a node, establish an edge between the problems answered by the same expert, and then form an undirected graph matrix of expert history problem set; Step 2, Vectorization of data: The target question information matrix and the undirected graph matrix of the expert historical question set are respectively put into the question text encoder, and the information is extracted using the transformer to generate the target question vector and the expert historical question vector. Step 3: Use graph representation to learn and generate a multi-view data matrix: Perform graph representation learning on the expert historical question vectors to obtain three view representations: labels, titles, and body text; Step 4: Use a multi-view attention mechanism to learn candidate expert vectors: Each expert has different preferences for questions and their own focus. By combining the three view representations of labels, titles, and body text with the attention mechanism, we can learn the part of the expert's historical questions that are related to the target question, and finally form candidate expert vectors. Step 5, Prediction: Based on Step 2 and Step 4, the target question vector and candidate expert vector are concatenated and then scored and predicted. The expert with the higher score becomes the candidate expert for the target question, thus realizing the community question answering expert recommendation of multi-view graph neural network. Step 3 includes: Step 3.1: Use the mean aggregator to... , , Perform polymerization to obtain Similarly, we can obtain , This is a view information matrix consisting of tags, titles, and body text; (.) indicates that mean aggregation is performed; Step 3.2: Combine the three view information matrices... , , The input is fed into the GraphSAGE graph neural network, which uses GraphSAGE to extract information about the first-order and second-order neighbors of each node, as shown in the following formula: (1); The final result is a view representation of labels, titles, and body text. , and , It is a projection matrix, where n represents the number of sampling nodes, and the input is the two-hop neighbor. and a neighbor who jumped Feature embedding combination; Step 4 includes: Step 4.1: Based on the multi-view characteristics of candidate experts, i.e. , and These are the tag view, title view, and body view. The weight of expert users' attention to the tag view is calculated as follows: = , (0,1) (2); in, , , These represent the attention scores for the label view, title view, and body view, respectively. For the title and body text view features, their weights are calculated using the same method. and ; = , (0,1) (3); = , (0,1) (4); This allows us to capture the intra-view relevance between candidate experts and the target question through an interactive attention mechanism involving three views. Then, the candidate expert vectors are aggregated based on the different weights of different view features. : = + + (5); , , These represent the attention weights of expert users in the tag view, title view, and body view, respectively, and the level of knowledge and ability of expert users in the tags, titles, and body views.
2. The multi-view graph neural network community question-answering expert recommendation method according to claim 1, characterized in that: Step 2 includes: For the i-th label of a given problem The result of using a tag embedding layer is The given problem includes the target problem and the expert history problem; then, since the labels are independent classification features, a dense layer is used to learn the label hidden features, represented as: + (6); Indicates the deviation of dense layers; Then, all the label hidden features are stacked, and all the label hidden features are aggregated by an average aggregator, calculated as follows: =[ , ,..., ] (7); v represents the length of the hidden feature of the label; For long text information, after embedding, a transformer is used to extract the main text features, represented as follows: =[ , ,..., ] (8); l represents the length of the main text feature; For title information, after embedding, a transformer is used to extract title features, represented as follows: ; Through the above process, we obtain the target question vector and the expert historical question vector. The target question vector includes the hidden label features, title features, and body text features of the target question. The expert historical question vector includes the hidden label features, title features, and body text features of the expert historical questions.
3. The multi-view graph neural network community question-answering expert recommendation method according to claim 2, characterized in that: Step 5 includes: First, the candidate expert vectors are... and the target problem vector The data is concatenated, and then a linear layer is used to calculate the correlation score between them. The candidate expert with the highest relevance score is recommended as the expert for the target question.