A multi-hop reasoning question answering method based on cross-language knowledge graph

By using the combination of multilingual BERT and entity alignment methods on the cross-language knowledge graph, the problem of error transmission in cross-language knowledge graph Q&A is solved, efficient cross-language knowledge utilization and accurate multi-hop reasoning are achieved, and the question-and-answer system is improved performance.

CN114780754BActive Publication Date: 2024-12-17SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210552441.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-12-17
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

Traditional Q&A methods rely on error transmission caused by pre-fusion maps when using cross-language knowledge graphs, resulting in errors in entity alignment processes, seriously affecting the performance of the Q&A system.

Method used

Through a general representation based on multilingual BERT, iteratively mines pseudo-aligned annotations to enhance the performance of the entity alignment model, correct errors in the multi-hop inference model, and realize Q&A System efficient use of cross-language knowledge.

Benefits of technology

It makes up for the gap in the traditional multi-hop inference model that cannot pass inference information on one graph to another graph, improves the inference accuracy and robustness of entity alignment on cross-language knowledge graphs, and enhances the performance of the question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780754B_ABST
    Figure CN114780754B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-hop reasoning question-answering method based on a cross-language knowledge graph, which is mainly used to improve the existing intelligent question-answering system so that it can effectively integrate and utilize information in knowledge graphs of different languages ​​when answering questions raised by users. The present invention focuses on the problem of error transmission caused by the traditional question-answering method relying on pre-fused graphs when using cross-language knowledge graphs, proposes a cross-graph reasoning method, and further establishes an iterative framework for combining multi-hop reasoning with entity alignment methods. The former uses multilingual‑BERT to universally represent text so that reasoning information can be transmitted between graphs of different languages. Bidirectional LSTM is used to encode questions and reasoning paths. The question representation is updated through an attention mechanism for relationship prediction. The latter combines the former with an entity alignment method, takes the input question as a query, generates multiple groups of candidate paths from the graph, and iteratively extracts pseudo-alignment annotations from them to enhance the entity alignment method, thereby improving the question-answering performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a multi-hop reasoning question-answering method based on a cross-language knowledge graph, and belongs to the technical field of natural language intelligent question-answering. Background Art

[0002] A knowledge graph is a structured information collection consisting of rich entities and relationships. In order to cover more knowledge resources in the world, resources in different languages ​​are brought together to form a multilingual knowledge graph, with DBpedia, YAGO, and Wikidata as benchmarks.

[0003] In recent years, with the continuous development and enrichment of non-English knowledge graphs, the complementary relationship between English and non-English resources has become increasingly obvious. Taking Chinese as an example, Chinese knowledge graphs represented by Baidu Encyclopedia, CN-DBpedia and Zhishi.me cover tens of millions of entity information. Therefore, how to integrate and utilize cross-language resources has attracted the attention of academic and industrial researchers.

[0004] Question answering based on cross-language knowledge graphs requires the question answering system to combine information from knowledge graphs in at least two different languages ​​to answer input natural language questions. This requires the question answering system to have two functions:

[0005] 1. Resource linking capabilities on cross-language knowledge graphs. This means identifying referential phrases in input natural language questions through multilingual semantic parsing technology and finding their corresponding entities and relationships on cross-language knowledge graphs.

[0006] 2. Based on the results of resource links, the query graph corresponding to the question is obtained through multi-hop reasoning on the cross-language knowledge graph, and the answer is returned.

[0007] In the past, researchers have proposed numerous methods for parsing multilingual problems to extract knowledge from dominant language resources, such as semantic parsing methods based on dependency syntactic structures, methods based on machine translation, and methods based on general representation learning. However, no specific method has yet been proposed for function 2. Function 2 is typically solved by breaking it down into two steps. First, entity alignment methods are used to establish more connections between cross-language graphs, merging them into a single graph. The problem is then converted to multi-hop reasoning question answering on a single knowledge graph. However, since there are typically only a few known alignments (primarily entity alignments) between cross-language knowledge graphs, using these as annotations makes it difficult to train a high-quality entity alignment model. This results in errors generated during the entity alignment process being passed to the reasoning stage, severely impacting the performance of the question-answering system.

[0008] The goal of this invention is to establish a new cross-graph reasoning model to achieve multi-hop reasoning on cross-language knowledge graphs without relying on fusion graphs. Furthermore, this model is used to build a joint framework to combine multi-hop reasoning question-answering technology with entity alignment technology to solve the above-mentioned problems of insufficient alignment annotation and error transmission. This provides a model for question-answering systems to efficiently utilize cross-language knowledge. Summary of the Invention

[0009] Technical problem: The technical problem to be solved by the present invention is to provide a multi-hop reasoning question-answering method based on a cross-language knowledge graph in response to the erroneous transmission caused by the traditional question-answering method's reliance on pre-fused graphs when using cross-language knowledge graphs.

[0010] Technical solution: The present invention establishes a cross-graph reasoning method that does not rely on graph fusion through a universal representation based on multilingual BERT, and further combines it with an entity alignment method. The reasoning method iteratively mines pseudo-aligned annotations from the cross-lingual graph to enhance the performance of the entity alignment method, and uses the enhanced entity alignment to correct errors generated by the multi-hop reasoning model in the question-answering process, thereby achieving mutual reinforcement between the two, so that the question-answering system can effectively use cross-lingual knowledge to answer input natural language questions.

[0011] To achieve the above objectives, the technical solution of the present invention is as follows: a multi-hop reasoning question answering method based on a cross-language knowledge graph, the method comprising the following steps:

[0012] Step 1) Initialize the multi-hop reasoning question answering task;

[0013] Step 2) Build a cross-graph reasoning model;

[0014] Step 3) Multi-hop reasoning-entity alignment question answering framework;

[0015] Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process;

[0016] Step 5) Pathway ranking based on sequence similarity.

[0017] Among them, step 1) initializes the multi-hop reasoning question answering task as follows: first determine the target question type (multi-relational complex question), collect relevant questions and a sample set O consisting of query annotations on the corresponding knowledge graph for the target question, split the sample set, and split the original sample into multiple one-hop reasoning sub-samples based on the number of relations contained in the annotated sample, and replace the original sample in O to obtain L.

[0018] Among them, O can be written as:

[0019] O = [[q1, path1], [q2, path2], …, [qn, pathn]]. q represents the natural language question text in each training data. Here, ENTITY_zh represents the Chinese entity and ENTITY_en represents the English entity (the same below), for example, "What is the home stadium of the team that ENTITY_zh plays for in the NBA?"; path represents the complete reasoning path annotation corresponding to the question, for example, "ent_zh:ENTITY_zh→rel_zh:NBA team→ent_zh:Houston Rockets→ent_en:HustonRockets→rel_en:stadiums→ent_en:Toyota Center". ent_zh and ent_en represent the entity and its graph label, here respectively. Similarly, rel represents the relationship and graph label.

[0020] L can be written as:

[0021] L = [[[q1, pastpath11, path11], [q1, pastpath12, path12], …, [[qm, pastpathm1, pathm1], [qm, pastpathm2, pathm2], …, [qm, pastpathmn, pathmn]]], where each q corresponds to a set of annotations consisting of multiple paths and pastpaths. The former represents the path that needs to be completed for reasoning (the starting node of the path is the main entity of the current reasoning), and the latter represents the reasoning path that has been used (no longer used). These paths are split from the path samples in O. The specific form is as follows:

[0022] [q:What is the name of the home stadium of the NBA team played by ENTITY_zh? ,pastpath:“ent_zh:ENTITY_zh→rel_zh:NBA team”,path:“ent_zh:Houston Rockets→rel_en:stadiums→ent_en:ToyotaCenter” (or “ent_en:Huston Rockets→rel_en:stadiums→ent_en:Toyota Center”)].

[0023] Through step 1, the multi-hop training samples are split into multiple groups of single-hop training samples, providing a sufficient training set for updating the problem vector in step 2-2 using cross-graph historical reasoning information. The split single-hop samples greatly enrich the scale of the training set used to predict relationships in step 2-3.

[0024] Step 2) Build a cross-graph reasoning model. The details are as follows: The cross-graph reasoning model is a deep learning model based on a pre-trained text encoder. It takes the natural language question, the historical reasoning path on the cross-language graph, and the main entity as input, and outputs predicted relationships and entities. It is divided into the following three parts:

[0025] 2-1) Question encoding based on multilingual BERT+Bi-LSTM: The input natural language question is first encoded by the multilingual pre-trained language model m-BERT to obtain the encoding vector of each token in the question. The entire question sentence is then encoded using Bi-LSTM to obtain the question encoding vector with sequence position information.

[0026] 2-2) Question vector update based on cross-graph historical reasoning information: The input historical reasoning path is encoded by multilingual BERT into a historical reasoning information vector. Then, through an attention layer, the information related to the historical reasoning path in the question encoding vector is extracted and used to update the question encoding vector to obtain a question vector representation related to the current reasoning.

[0027] 2-3) Relationship prediction: The main entity is encoded by multilingual BERT into a main entity vector, which is combined with the updated question vector to form the target "entity-relationship" feature vector. The cosine similarity is calculated with the candidate "entity-relationship" vectors in the knowledge graph, and the candidate with the highest similarity is obtained to obtain the relationship currently predicted by inference.

[0028] Through step 2, a cross-graph reasoning model is established. This model addresses the inability of traditional multi-hop reasoning models to transfer reasoning information from one graph to another for continued reasoning. The use of multilingual BERT encoding in steps 2-3 eliminates the model's reliance on entity alignment candidates provided by the entity alignment model for cross-graph reasoning. Furthermore, the use of a combined entity-relationship feature vector increases the robustness of relationship prediction.

[0029] Step 3) Iterative multi-hop reasoning-entity alignment question-answering framework. This framework consists of four parts: candidate reasoning path generation module, multi-hop reasoning question-answering module, entity alignment module, and pseudo-alignment discrimination module. The specific working process includes the following:

[0030] 3-1) The candidate reasoning path generation module, based on the results of entity linking and relationship recognition, exhaustively enumerates all possible reasoning path directions between cross-language knowledge graphs according to the length of the multi-hop reasoning path. For example, there are four reasoning path directions for a two-hop path: KG1→KG1, KG1→KG2, KG2→KG1, and KG2→KG2.

[0031] 3-2) Multi-hop reasoning question answering module. In the training phase, the training set L is used to train and update the model parameters. In the iteration phase, the training set L is regarded as a query. According to the exhaustive reasoning path direction, potential alignment paths (or alignment path fragments) are mined from the cross-lingual KG. For example, “ent_zh:ENTITY_zh→rel_zh:NBA team→ent_zh:Houston Rockets→ent_en:Huston Rockets→rel_en:stadiums→ent_en:Toyota Center” and “ent_en:ENTITY_en→rel_en:team→ent_zh:Huston Rockets→ent_zh:Rockets→rel_zh:stadiums→ent_en:Toyota Center”.

[0032] 3-3) Entity alignment module. In the training phase, the initial entity alignment model is obtained using the seed alignments provided by the knowledge graph. In the iterative phase, the alignment path is first jointly mined with the inference model. Then, the potential alignments mined by the multi-hop reasoning question-answering module are added to the seed alignments. The parameters of the alignment model are trained and updated, such as "ent_zh:ENTITY_zh" and "ent_en:ENTITY_en" in the above example.

[0033] 3-4) The pseudo-alignment discrimination module uses a binary classifier based on a single-layer neural network trained using seed alignments to judge and filter pseudo-aligned entities corresponding to nodes in potential alignment paths.

[0034] Through step 3, a joint framework for multi-hop reasoning and entity alignment is established. In this framework, the multi-hop reasoning model, which has been trained in this stage, is treated as an information mining tool. Using question samples in the training set as queries, it mines potential equivalent (aligned) paths in the cross-language graph, thereby obtaining pseudo-entity alignments with a certain degree of confidence. These are added to the training set of the entity alignment model to enhance the performance of the alignment model. The enhanced entity alignment model provides more accurate entity alignment candidates for the multi-hop reasoning model during the cross-graph question-answering process, thereby achieving mutual enhancement between the two.

[0035] Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process is as follows:

[0036] 4-1) Initialize the multi-hop reasoning-entity alignment question answering framework. Use the training set L to train the multi-hop reasoning question answering model. Use the seed alignments provided by the cross-lingual knowledge graph to train the entity alignment model and the pseudo-alignment discrimination model to obtain the initialization framework.

[0037] 4-2) Pseudo-aligned entity mining: traverse the training set samples L. For each question in L, use the multi-hop reasoning model + entity alignment model to mine the alignment path (path fragment) from the cross-language graph, and use the pseudo-alignment discrimination module to filter the pseudo-aligned entities from the alignment path.

[0038] 4-3) Model update: add pseudo-alignment entities such as seed alignments and update the entity alignment model.

[0039] 4-4) Iteration termination condition: When no new false alignment is found, the iteration terminates.

[0040] Step 4 provides a feasible training mode for the framework proposed in step 3, and the termination condition is that no new pseudo-alignments are found, which means that this training mode enables the above framework to basically explore all the enhancements it can achieve during the training process.

[0041] Step 5) Path sorting based on sequence similarity is as follows:

[0042] 5-1) After completing the iterative enhancement process, the test phase begins. For the input test problem sample, the candidate reasoning path generation module first generates a multi-hop candidate reasoning path direction.

[0043] 5-2) The multi-hop question-answering model and the entity alignment model jointly complete the reasoning of paths in various directions and obtain multiple candidate answer paths.

[0044] 5-3) Encode the candidate answer path through multilingual BERT to obtain the candidate path vector

[0045] 5-4) The final answer path is obtained by sorting the candidate path vectors with the input question vector based on cosine similarity, completing the question-answering test.

[0046] Step 5 continues to use a highly recognized candidate answer ranking method for cross-graph question answering. The slight difference is that the multi-hop question answering path obtained by 5-2 fully considers the different ways of answering questions on the cross-language graph, that is, the multiple possible question answering path directions.

[0047] Beneficial effects: Compared with the prior art, the present invention has the following advantages: the cross-graph reasoning model constructed by the present invention fills the gap that the traditional multi-hop reasoning model cannot transfer the reasoning information on a certain graph to another graph for continued reasoning, so that the reasoning on the cross-language knowledge graph is no longer completely dependent on the pre-knowledge graph fusion (alignment). Furthermore, in the joint framework of multi-hop reasoning and entity alignment, the multi-hop reasoning model completed by stage training is regarded as an information mining tool, which mines potential equivalent (alignment) paths in the cross-language graph, thereby obtaining pseudo-entity alignment with a certain degree of confidence to enhance the performance of the alignment model. The enhanced entity alignment model provides more accurate entity alignment candidates for the multi-hop reasoning model in the cross-graph question and answer process, thereby achieving mutual enhancement between the two. On the other hand, the candidate multi-hop question and answer path constructed by the present invention fully considers the different ways of answering questions on the cross-language graph, that is, the possible multiple question and answer path directions, so that the proposed method can not only support knowledge question and answer on the cross-language graph, but also retains support for the knowledge question and answer function on a single graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of the overall process of the present invention;

[0049] Figure 2 This is a schematic diagram of the basic structure of the cross-graph reasoning model of the present invention;

[0050] Figure 3 This is a schematic diagram of the process of generating a multi-hop reasoning path by the cross-graph reasoning model of the present invention;

[0051] Figure 4 It is a schematic diagram of the iterative framework structure and process of the joint reasoning-entity alignment of the present invention; DETAILED DESCRIPTION

[0052] The implementation process of the present invention is described in detail below with reference to the examples and accompanying drawings.

[0053] Example 1: A multi-hop reasoning question answering method based on a cross-language knowledge graph, the method comprising the following steps:

[0054] Step 1) Initialize the multi-hop reasoning question answering task;

[0055] Step 2) Build a cross-graph reasoning model;

[0056] Step 3) Multi-hop reasoning-entity alignment question answering framework;

[0057] Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process;

[0058] Step 5) Pathway ranking based on sequence similarity.

[0059] Among them, step 1) initializes the multi-hop reasoning Q&A task, which is specifically as follows: First, determine the target question type (multi-relational complex question). For the target question, collect a sample set O composed of relevant questions and corresponding query annotations on the knowledge graph. Split the sample set. According to the number of relationships contained in the annotated samples, split the original samples into multiple one-hop reasoning sub-samples, and replace the original samples in O to obtain L. Among them, O can be denoted as:

[0060] O = [[q1, path1], [q2, path2], …, [qn, pathn]]. q represents the natural language question text in each piece of training data. Here, ENTITY_zh represents Chinese entities, and ENTITY_en represents English entities (the same below). For example, for a two-hop question: "What is the home stadium of the team where ENTITY_zh plays in the NBA?"; path represents the complete reasoning path annotation corresponding to the question, such as: "ent_zh:ENTITY_zh → rel_zh:NBA team → ent_zh:Houston Rockets → ent_en:HustonRockets → rel_en:stadiums → ent_en:Toyota Center". Among them, ent_zh and ent_en represent entities and their graph markings, which are the Chinese graph and the English graph respectively. Similarly, rel represents the relationship and its graph marking. In O, the path composition of a three-hop question is similar to that of a two-hop question, but longer. For example Figure 3 For the three-hop question "What is the home stadium of ENTITY_en's college basketball team?", its path is in the form of "ent_zh:ENTITY_zh → rel_zh:university → ent_zh:Wake Forest University → ent_en:Wake Forest University → rel_en:men’s basketball → ent_en:Wake Forest Demon Deacons → rel_en:stadium → ent_en:Lawrence Joel Veterans Memorial Coliseum", which contains three relationships (rel).

[0061] L can be denoted as:

[0062] L = [[[q1, pastpath11, path11], [q1, pastpath12, path12], …, [[qm, pastpathm1, pathm1], [qm, pastpathm2, pathm2], …, [qm, pastpathmn, pathmn]]], where each q corresponds to a set of annotations consisting of multiple paths and pastpaths. The former represents the path that needs to be completed for reasoning (the starting node of the path is the main entity of the current reasoning), and the latter represents the reasoning path that has been used (no longer used). These paths are split from the path samples in O. The specific form is as follows:

[0063] Two-hop problem splitting:

[0064] What is the name of the home stadium of ENTITY_zh's NBA team? ,pastpath:“ent_zh:ENTITY_zh→rel_zh:NBA team”,path:“ent_zh:Houston Rockets→rel_en:stadiums→ent_en:ToyotaCenter” (or “ent_en:Huston Rockets→rel_en:stadiums→ent_en:Toyota Center”)

[0065] Three-hop problem splitting:

[0066] [[q:What is the home stadium of ENTITY_en's college basketball team? ,pastpath:"ent_zh:ENTITY_zh→rel_zh:university",path:"ent_zh:Wake Forest University→ent_en:Wake Forest University→rel_en:men's basketball→ent_en:Wake Forest DemonDeacons→rel_en:stadium→ent_en:Lawrence Joel Veterans Memorial Coliseum"]

[0067] [q:What is the home stadium of ENTITY_en's college basketball team?,pastpath:“ent_zh:ENTITY_zh→rel_zh:大学→rel_en:men’s basketball”,path:“ent_en:Wake Forest Demon Deacons→rel_en:stadium→ent_en:Lawrence Joel Veterans Memorial Coliseum”]]Since the path is longer, the three-hop problem can be split into more forms of pastpath, and more training samples can be obtained. The current step provides a sufficient training set for updating the question vector using cross-graph historical reasoning information in step 2-2, and the split single-hop samples greatly enrich the scale of the training set for predicting relationships in step 2-3.

[0068] Step 2) Construct a cross-graph reasoning model as follows: The cross-graph reasoning model is a deep learning model based on a pre-trained text encoder. It takes a natural language question, historical reasoning paths on a cross-lingual graph, and a main entity as inputs, and outputs predicted relationships and entities. It is divided into the following three parts:

[0069] 2-1) Question encoding based on multilingual BERT + Bi-LSTM. The input natural language question is first encoded by the multilingual pre-trained language model m-BERT to obtain the encoding vectors of each token in the question. Then, Bi-LSTM is used to encode the entire question sentence to obtain a question encoding vector with sequence position information. Taking the above two sets of split samples as an example, here the encoder encodes "What is the home stadium of the team where ENTITY_zh plays in the NBA?" and "What is the home stadium of ENTITY_en's college basketball team?", and the encoded vector Vec question contains all the information of the natural language question.

[0070] 2-2) Problem vector update based on cross-graph historical reasoning information. The input historical reasoning path is encoded into a historical reasoning information vector by multilingual BERT. Then, through an attention layer, the information related to the historical reasoning path in the problem encoding vector is extracted and used to update the problem encoding vector, obtaining a problem vector representation related to the current reasoning. The historical reasoning information is the pastpath in the split sample (such as "ent_zh:ENTITY_zh→rel_zh:university→rel_en:men’s basketball" in the above example). Its encoding process is as follows: Use multilingual BERT to obtain the word vectors of "ENTITY_zh", "university", and "men’s basketball" respectively, and then combine them as the vector representation Vec of the historical path. pastpath , this vector and Vec question are used to train an attention layer. The goal is to extract the part related to Vec question from Vec pastpath , and subtract it from Vec question , thus completing the update of Vec question in the current reasoning stage.

[0071] 2-3) Relationship prediction. The main entity is encoded into a main entity vector by multilingual BERT, combined with the updated problem vector to form a target "entity-relationship" feature vector. Calculate the cosine similarity with the candidate "entity-relationship" vectors in the knowledge graph, and obtain the candidate with the highest similarity, getting the relationship predicted in the current reasoning. Take the above sample [q:What is the home stadium of ENTITY_en's college basketball team?,pastpath:“ent_zh:ENTITY_zh→rel_zh:university”,path:“ent_zh:Wake Forest University→ent_en:Wake Forest University→rel_en:men’s basketball→ent_en:Wake Forest Demon Deacons→rel_en:stadium→ent_en:Lawrence Joel Veterans Memorial Coliseum”] as an example. Its main entity is "Wake Forest University", that is, the head node of the path, and its vector Vec topicent and the updated Vec question together constitute the "entity-relationship" feature vector.

[0072] Through this process, a cross-graph reasoning model was built and trained. By using historical reasoning paths as a medium for transferring historical reasoning information and employing multilingual BERT as a universal encoding, this model enables the transfer of this information across cross-lingual graphs. This model addresses the inability of traditional multi-hop reasoning models to transfer reasoning information from one graph to another for continued reasoning. The combined entity-relationship feature vector increases the robustness of relationship prediction.

[0073] Step 3) Iterative multi-hop reasoning-entity alignment question-answering framework. This framework consists of four parts: candidate reasoning path generation module, multi-hop reasoning question-answering module, entity alignment module, and pseudo-alignment discrimination module. The specific working process includes the following:

[0074] 3-1) The candidate reasoning path generation module, based on the results of entity linking and relationship recognition, exhaustively enumerates all possible reasoning path directions between cross-language knowledge graphs according to the length of the multi-hop reasoning path. For example, there are four possible reasoning path directions for a two-hop path:

[0075] KG1→KG1, KG1→KG2, KG2→KG1, KG2→KG2;

[0076] There are eight inference path directions for a three-hop path:

[0077] KG1→KG1→KG1, KG1→KG1→KG2, KG1→KG2→KG2, KG1→KG2→KG1, KG2→KG1→KG1, KG2→KG1→KG2, KG2→KG2→KG2, KG2→KG2→KG1;

[0078] 3-2) Multi-hop reasoning question answering module. In the training phase, the training set L is used to train and update the model parameters. In the iteration phase, the training set L is regarded as a query, and potential alignment paths (or alignment path fragments) are mined from the cross-lingual KG based on the exhaustive reasoning path direction. For example, for the two-hop question mentioned above, "What is the home stadium of the team that ENTITY_zh plays for in the NBA?" can be used as a query to mine "ent_zh:ENTITY_zh→rel_zh:NBA team→ent_zh:Houston Rockets→ent_en:Huston Rockets→rel_en:stadiums→ent_en:Toyota Center" and "ent_en:ENTITY_en→rel_en:team→ent_zh:Huston Rockets→ent_zh:Rockets→rel_zh:stadiums→ent_zh:Toyota Center" from the Chinese-English cross-lingual graph. Potential alignments include "ent_zh:ENTITY_zh, ent_en:ENTITY_en", "ent_zh:Houston Rockets, ent_zh:Huston Rockets", etc.

[0079] 3-3) Entity alignment module: In the training phase, the initial entity alignment model is obtained using the seed alignments provided by the knowledge graph. In the iterative phase, the alignment path is first jointly mined with the inference model. Then, the potential alignments mined by the multi-hop reasoning question-answering module are added to the seed alignments. The parameters of the alignment model are trained and updated. For example, in the above example, "ent_zh:ENTITY_zh" and "ent_en:ENTITY_en" are used. Figure 4 The process of obtaining pseudo alignment by mining the three-hop question "What is the home stadium of the university basketball team where ENTITY_zh is located?" is also listed.

[0080] 3-4) The pseudo-alignment discrimination module uses a binary classifier based on a single-layer neural network trained using seed alignments to identify and filter pseudo-alignment entities corresponding to nodes in the potential alignment path. Because the pseudo-alignment entities mined in step 3-3 are not always correct, a trained classifier is used here to filter the pseudo-alignments obtained in the above step, removing those with low confidence, ensuring that the data used to enhance the alignment model is less noisy.

[0081] After step 3, a joint framework for multi-hop reasoning and entity alignment is established. In this framework, the multi-hop reasoning model that has completed stage training is regarded as an information mining tool. Using the question samples in the training set as queries, potential equivalent (alignment) paths are mined in the cross-language graph, thereby obtaining pseudo-entity alignments with a certain degree of confidence. After selection, they are added to the training set of the entity alignment model to enhance the performance of the alignment model.

[0082] Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process is as follows:

[0083] 4-1) Initialize the multi-hop reasoning-entity alignment question answering framework. Use the training set L to train the multi-hop reasoning question answering model. Use the seed alignments provided by the cross-lingual knowledge graph to train the entity alignment model and the pseudo-alignment discrimination model to obtain the initialization framework.

[0084] 4-2) Pseudo-aligned entity mining: traverse the training set samples L. For each question in L, use the multi-hop reasoning model + entity alignment model to mine the alignment path (path fragment) from the cross-language graph, and use the pseudo-alignment discrimination module to filter the pseudo-aligned entities from the alignment path.

[0085] 4-3) Model update: add pseudo-alignment entities such as seed alignments and update the entity alignment model, such as Figure 4 The process of enumeration.

[0086] 4-4) Iteration termination condition: When no new false alignment is found, the iteration terminates.

[0087] Step 4 provides a feasible training mode for the framework proposed in step 3, and the termination condition is that no new pseudo-alignments are found, which means that this training mode enables the above framework to basically explore all the enhancements it can achieve during the training process.

[0088] Step 5) Path sorting based on sequence similarity is as follows:

[0089] 5-1) After completing the iterative enhancement process, the test phase begins. For the input test problem sample, the candidate reasoning path generation module first generates a multi-hop candidate reasoning path direction.

[0090] 5-2) The multi-hop question answering model and the entity alignment model jointly complete the reasoning of paths in various directions and obtain multiple candidate answer paths in the form of Figure 4 As shown in the "Generating Candidate Inference Paths" section.

[0091] 5-3) Encode the candidate answer path through multilingual BERT to obtain the candidate path vector

[0092] 5-4) The final answer path is obtained by sorting the candidate path vectors with the input question vector based on cosine similarity, completing the question-answering test.

[0093] Step 5 continues to use a highly recognized candidate answer ranking method for cross-graph question answering. The slight difference is that the multi-hop question answering path obtained by 5-2 fully considers the different ways of answering questions on the cross-language graph, that is, the multiple possible question answering path directions.

[0094] Example 2: Reference Figure 1 , Figure 2 , Figure 3 and Figure 4 , a multi-hop reasoning question answering method based on a cross-language knowledge graph, which includes the following steps:

[0095] Step 1) Initialize the multi-hop reasoning question answering task;

[0096] First, determine the target problem type (a complex problem with multiple relations). For the target problem, collect a sample set O consisting of related questions and query annotations on the corresponding knowledge graph. Split the sample set and, based on the number of relations contained in the annotated sample, split the original sample into multiple one-hop reasoning sub-samples. Replace the original sample in O to obtain L.

[0097] Step 2) Build a cross-graph reasoning model;

[0098] The cross-graph reasoning model takes natural language questions, historical reasoning paths on the cross-language graph, and main entities as input, and outputs predicted relationships and entities.

[0099] The input natural language question is first encoded using the multilingual pre-trained language model m-BERT to obtain an encoding vector for each token in the question. The entire question sentence is then encoded using a Bi-LSTM to obtain a question encoding vector with sequence position information. The input historical reasoning path is encoded by multilingual BERT into a historical reasoning information vector. Then, through an attention layer, information related to the historical reasoning path in the question encoding vector is extracted and used to update the question encoding vector, resulting in a question vector representation relevant to the current reasoning. The update process is as follows:

[0100]

[0101]

[0102] Among them, Q represents the question vector representation obtained after Bi-LSTM encoding, P represents the historical reasoning path vector representation, and α_j represents the attention weight between different question words Qi and paths Pj in the attention layer.

[0103] Next, the main entity is encoded by multilingual BERT into a main entity vector, which is combined with the updated question vector to form the target "entity-relationship" feature vector. The cosine similarity is calculated with the candidate "entity-relationship" vectors in the knowledge graph. The following formula is used to obtain the candidate with the highest similarity, and the relationship and entity predicted by the current inference are obtained.

[0104]

[0105] Step 3) Multi-hop reasoning-entity alignment question answering framework;

[0106] The iterative multi-hop reasoning-entity alignment question-answering framework consists of four parts: a candidate reasoning path generation module, a multi-hop reasoning question-answering module, an entity alignment module, and a pseudo-alignment discrimination module. The specific working process is as follows: the candidate reasoning path generation module, based on the results of entity linking and relationship recognition, exhaustively enumerates all possible reasoning path directions between cross-language knowledge graphs according to the length of the multi-hop reasoning path. The multi-hop reasoning question-answering module and the entity alignment module then perform multi-hop reasoning based on the exhaustive reasoning path directions to obtain multiple sets of aligned reasoning paths (i.e., candidate paths for the test phase). The pseudo-alignment discrimination module then mines potential aligned entities from these paths.

[0107] Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process is as follows:

[0108] 4-1) Initialize the multi-hop reasoning-entity alignment question answering framework. Use the training set L to train the multi-hop reasoning question answering model. Use the seed alignments provided by the cross-lingual knowledge graph to train the entity alignment model and the pseudo-alignment discrimination model to obtain the initialization framework.

[0109] 4-2) Pseudo-aligned entity mining: traverse the training set samples L. For each question in L, use the multi-hop reasoning model + entity alignment model to mine the alignment path (path fragment) from the cross-language graph, and use the pseudo-alignment discrimination module to filter the pseudo-aligned entities from the alignment path.

[0110] 4-3) Model update: add pseudo-alignment entities such as seed alignments and update the entity alignment model.

[0111] 4-4) Iteration termination condition: When no new false alignment is found, the iteration terminates.

[0112] Step 5) Path sorting based on sequence similarity is as follows:

[0113] 5-1) After completing the iterative enhancement process, the test phase begins. For the input test problem sample, the candidate reasoning path generation module first generates a multi-hop candidate reasoning path direction.

[0114] 5-2) The multi-hop question-answering model and the entity alignment model jointly complete the reasoning of paths in various directions and obtain multiple candidate answer paths.

[0115] 5-3) Encode the candidate answer path through multilingual BERT to obtain the candidate path vector

[0116] 5-4) The final answer path is obtained by sorting the candidate path vectors with the input question vector based on cosine similarity, completing the question-answering test.

[0117] The above embodiments are only preferred implementations of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and equivalent substitutions can be made without departing from the principles of the present invention. These technical solutions after improvements and equivalent substitutions to the claims of the present invention all fall within the scope of protection of the present invention.

Claims

1. A multi-hop reasoning question answering method based on a cross-language knowledge graph, characterized in that: The method comprises the following steps: Step 1) Initialize the multi-hop reasoning question answering task; Step 2) Build a cross-graph reasoning model; Step 3) Multi-hop reasoning-entity alignment question answering framework; Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process; Step 5) Pathway ranking based on sequence similarity; Among them, step 2) constructs a cross-graph reasoning model, which is as follows: The cross-graph reasoning model is a deep learning model based on a pre-trained text encoder, which takes natural language questions, historical reasoning paths on the cross-language graph, and main entities as inputs, and is divided into the following three parts: 2-1) Question encoding based on multilingual BERT+Bi-LSTM: The input natural language question is first encoded by the multilingual pre-trained language model m-BERT to obtain the encoding vector of each token in the question, and then the entire question sentence is encoded by Bi-LSTM to obtain the question encoding vector with sequence position information; 2-2) Question vector update based on cross-graph historical reasoning information: the input historical reasoning path is encoded by multilingualBERT into a historical reasoning information vector, and then through an attention layer, the information related to the historical reasoning path in the question encoding vector is extracted and used to update the question encoding vector to obtain the question vector representation related to the current reasoning; 2-3) Relationship prediction: the main entity is encoded by multilingualBERT into a main entity vector, which is combined with the updated question vector as the target "entity-relationship" feature vector, and the cosine similarity is calculated with the candidate "entity-relationship" vector in the knowledge graph, and the candidate with the highest similarity is obtained to obtain the current inference predicted relationship; Step 3) Iterative multi-hop reasoning-entity alignment question-answering framework, which consists of four parts: candidate reasoning path generation module, multi-hop reasoning question-answering module, entity alignment module, and pseudo-alignment discrimination module. The specific working process includes the following: 3-1) Candidate reasoning path generation module, based on the results of entity linking and relationship recognition, exhaustively enumerates all possible reasoning path directions between cross-language knowledge graphs according to the length of the multi-hop reasoning path. 3-2) Multi-hop reasoning question answering module, in the training phase, the training set L is used to train and update the model parameters. In the iteration phase, the training set L is regarded as a query, and potential alignment paths or alignment path fragments are mined from the cross-language KG according to the exhaustive reasoning path direction. 3-3) Entity alignment module: In the training phase, the seed alignments provided by the knowledge graph are used to obtain the initial entity alignment model. In the iteration phase, the alignment path is first jointly mined with the reasoning model, and then the potential alignment mined by the multi-hop reasoning question-answering module is added to the seed alignments to train and update the parameters of the alignment model. 3-4) The pseudo-alignment discrimination module uses a binary classifier trained with seed alignments to judge and screen pseudo-aligned entities corresponding to nodes in potential alignment paths.

2. The multi-hop reasoning question answering method based on cross-language knowledge graph according to claim 1 is characterized in that: Step 1) Initialize the multi-hop reasoning question answering task, as follows: First, determine the target question type, collect a sample set O consisting of natural language questions and their corresponding query annotations for the target question, split the sample set, and split the original sample into multiple one-hop reasoning sub-samples based on the number of relations contained in the annotated sample, replacing the original sample L in O.

3. The multi-hop reasoning question answering method based on cross-language knowledge graph according to claim 1 is characterized in that: Step 4) Iterative pseudo-entity alignment annotation mining and alignment model enhancement training process, as follows: 4-1) Initialize the multi-hop reasoning-entity alignment question answering framework. Use the training set L to train the multi-hop reasoning question answering model. Use the seed alignments provided by the cross-language knowledge graph to train the entity alignment model and the pseudo-alignment discrimination model to obtain the initialization framework. 4-2) Pseudo-aligned entity mining: traverse the training set samples L. For each question in L, use the multi-hop reasoning model + entity alignment model to mine the alignment path or path fragment from the cross-language graph, and use the pseudo-alignment discrimination module to filter the pseudo-aligned entities from the alignment path. 4-3) Model update, add pseudo-alignment entities such as seed alignments, and update the entity alignment model. 4-4) Iteration termination condition, when no new pseudo-alignment is found, the iteration terminates.

4. The multi-hop reasoning question answering method based on cross-language knowledge graph according to claim 1 is characterized in that: Step 5) Path sorting based on sequence similarity, as follows: 5-1) After completing the iterative enhancement process, the test phase begins. For the input test problem sample, the candidate reasoning path generation module first generates a multi-hop candidate reasoning path direction. 5-2) The multi-hop question-answering model and the entity alignment model jointly complete the reasoning of paths in each direction and obtain multiple candidate answer paths. 5-3) The candidate answer paths are encoded through multilingualBERT to obtain candidate path vectors. 5-4) The final answer path is obtained by cosine similarity sorting between the candidate path vectors and the input question vectors to complete the question-answering test.