A factoid question answering system's graph attention mechanism feature fusion method
Patent Information
- Application Number
- CN202410030685.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2044-01-09
AI Technical Summary
然而,事实性知识问答系统在处理复杂推理和多步问题时,传统的基于知识图谱或基于语言模型的问答系统可能不足以应对这些挑战,难以为用户提供更准确和有逻辑推理的答案
[0045]本发明提供了一种事实性知识问答系统的图注意力机制特征融合方法,包括:获取事实性知识问题和待选择的多个答案选项;根据所述事实性知识问题和所述答案选项,得到问题上下文和候选子图;基于预训练语言模型,根据所述问题上下文确定问题上下文特征;基于神经网络层,根据所述候选子图和问题上下文确定联合子图特征;将所述问题上下文特征和所述联合子图特征进行特征融合,得到融合特征;基于多头注意力机制,根据所述融合特征获得综合相似度;根据各所述答案选项的综合相似度,确定最佳的答案选项。本发明的模型融合了问题上下文特征和联合子图特征,以实现将两者的优点结合起来。所使用的综合相似度是对融合两种特征后,计算得到各个答案选项与问题的相似度。所使用的问题上下文特征具备广泛的语义理解能力,可以理解问题的含义和背景。所使用的联合子图特征提供了结构化的领域知识,可以帮助理解问题中涉及的实体、属性和关系。通过融合上述两者的特征,可以实现可以更准确地理解问题,提供更符合语义和语境的答案,从而更全面有效地回答事实性知识问题。
Smart Images

Figure CN117892256B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a graph attention mechanism feature fusion method for a factual knowledge question answering system. Background Technology
[0002] With the advent of the information age, people's demand for factual knowledge in various fields is constantly growing. Whether it's practical skills in daily life, cultural knowledge, or scientific knowledge, people hope to consult relevant institutions or individuals and obtain reliable answers. For example, in daily life, people may need to consult on practical skills such as how to repair home appliances, how to care for pets, or how to grow flowers and plants. They hope to receive guidance from professionals to ensure they can operate correctly and achieve the desired results. In the field of cultural knowledge, people may be interested in historical events, famous works, and artworks, and hope to learn more about related information. Furthermore, scientific knowledge is also one of the important areas of interest. With the continuous advancement of technology, people's demand for knowledge in the scientific field is also constantly increasing. They may be interested in new scientific discoveries, medical research, environmental protection, etc., and hope to receive answers and guidance from professionals to increase their scientific literacy. In short, regardless of the field of factual knowledge, people's demand for knowledge is constantly growing. They hope to obtain reliable answers and satisfy their thirst for knowledge through communication with professional institutions or individuals.
[0003] Given the above, people are motivated to use factual knowledge-based intelligent question-answering systems to obtain everyday answers to factual knowledge questions. Existing factual knowledge question-answering systems are diverse, based on technologies such as large-scale corpora, question-answer pairs, knowledge graphs, and large-scale language models. They obtain answers to factual knowledge questions from factual knowledge question-answering datasets. However, when dealing with complex reasoning and multi-step questions, traditional knowledge graph-based or language model-based question-answering systems may be insufficient to meet these challenges and fail to provide users with more accurate and logically reasoned answers. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, the purpose of this invention is to provide a graph attention mechanism feature fusion method for factual knowledge question answering systems.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] A graph attention mechanism feature fusion method for a factual knowledge question answering system includes:
[0007] Obtain factual knowledge questions and multiple answer options to choose from;
[0008] Based on the factual knowledge question and the answer options, the question context and candidate subgraph are obtained;
[0009] Based on a pre-trained language model, problem context features are determined according to the problem context.
[0010] Based on the neural network layer, joint subgraph features are determined according to the candidate subgraph and the problem context;
[0011] The problem context features and the joint subgraph features are fused to obtain fused features;
[0012] Based on a multi-head attention mechanism, a comprehensive similarity is obtained according to the fusion features;
[0013] The best answer option is determined based on the overall similarity of each answer option.
[0014] Preferably, based on the factual knowledge question and the answer options, a question context and candidate subgraph are obtained, including:
[0015] By combining the factual knowledge question with multiple different answer options, the question context is obtained;
[0016] The external knowledge graph is retrieved based on the factual knowledge questions and answer options to obtain candidate entities and candidate relationships;
[0017] Based on the knowledge graph construction method, candidate subgraphs are determined according to the candidate entities and candidate relationships.
[0018] Preferably, based on a pre-trained language model, problem context features are determined according to the problem context, including:
[0019] Determine the category of the pre-trained language model;
[0020] The problem context is subjected to embedding vector encoding to obtain the input representation;
[0021] The input representation is encoded into the pre-trained language model to obtain the output of the hidden layer;
[0022] The output of the last layer of the hidden layer is used as the problem context feature.
[0023] Preferably, based on a neural network layer, joint subgraph features are determined according to the candidate subgraph and the problem context, including:
[0024] The problem context features are subjected to pooling and linear transformation operations, and then input into the activation function to obtain the first data;
[0025] The candidate subgraph is subjected to embedding vector encoding to obtain the second data;
[0026] The first data and the second data are vector-concatenated to obtain the third data;
[0027] The third data is processed by a graph neural network message passing method to obtain joint subgraph features.
[0028] Preferably, the problem context features and the joint subgraph features are fused to obtain fused features, specifically including:
[0029] Initialize the learnable weight matrix;
[0030] Matrix operations are performed based on the problem context features and the joint subgraph features to obtain a fusion matrix vector;
[0031] The attention weight matrix is obtained by weighted summing of the problem context features, the joint subgraph features, the fusion matrix vector, and the learnable weight matrix.
[0032] After normalizing the attention weight matrix, matrix operations are performed with the problem context features to obtain the fused problem context features;
[0033] After performing transpose and normalization operations on the attention weight matrix, matrix operations are performed with the joint subgraph features to obtain fused joint subgraph features;
[0034] The fusion feature is obtained by concatenating the fusion problem context features and the fusion joint subgraph features into vectors.
[0035] Preferably, based on a multi-head attention mechanism, the comprehensive similarity is obtained according to the fusion features, including:
[0036] Initialize the key vector and value vector in the multi-head attention mechanism based on the fusion features;
[0037] Initialize the query vector in the multi-head attention mechanism based on the problem context features;
[0038] The key vector, the value vector, and the query vector are split, and the splitting results are stacked into a multi-head tensor.
[0039] The attention weights are obtained by performing linear transformations and matrix multiplications on the query vector and the key vector, dividing by a scaling factor, and normalizing.
[0040] The attention weights and the value vector are weighted and summed to obtain a weighted value vector.
[0041] The weighted vector is subjected to linear transformation and regularization to obtain the comprehensive similarity.
[0042] Preferably, the best answer option is determined based on the overall similarity of all the answer options, including:
[0043] The answer option with the highest overall similarity is determined as the best answer option.
[0044] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0045] This invention provides a graph attention mechanism feature fusion method for a factual knowledge question-answering system, comprising: acquiring a factual knowledge question and multiple answer options to be selected; obtaining a question context and candidate subgraphs based on the factual knowledge question and the answer options; determining question context features based on the question context using a pre-trained language model; determining joint subgraph features based on the candidate subgraphs and the question context using a neural network layer; fusing the question context features and the joint subgraph features to obtain fused features; obtaining a comprehensive similarity based on the fused features using a multi-head attention mechanism; and determining the optimal answer option based on the comprehensive similarity of each answer option. The model of this invention fuses question context features and joint subgraph features to combine the advantages of both. The comprehensive similarity used is the similarity between each answer option and the question calculated after fusing the two features. The question context features used have broad semantic understanding capabilities, enabling the understanding of the meaning and background of the question. The joint subgraph features used provide structured domain knowledge, which can help understand the entities, attributes, and relationships involved in the question. By integrating the features of both, we can more accurately understand the problem and provide answers that are more semantically and contextually appropriate, thus answering factual knowledge questions more comprehensively and effectively. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A flowchart of the method provided in an embodiment of the present invention;
[0048] Figure 2 A flowchart illustrating the steps for obtaining each feature in an embodiment of the present invention;
[0049] Figure 3A flowchart illustrating the steps of the feature fusion method provided in this embodiment of the invention;
[0050] Figure 4 A flowchart illustrating the steps of the multi-head attention mechanism provided in this embodiment of the invention;
[0051] Figure 5 A flowchart illustrating the steps for generating a comprehensive similarity score, provided in an embodiment of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] The purpose of this invention is to provide a graph attention mechanism feature fusion method for factual knowledge question answering systems. By fusing the features of the two methods mentioned above, it is possible to understand the question more accurately and provide answers that are more semantically and contextually consistent, thereby answering factual knowledge questions more comprehensively and effectively.
[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Figure 1 The method flowchart provided in the embodiments of the present invention is as follows: Figure 1 As shown, this invention provides a graph attention mechanism feature fusion method for a factual knowledge question answering system, comprising:
[0056] Step 100: Obtain factual knowledge questions and multiple answer options to be selected;
[0057] Step 200: Based on the factual knowledge question and the answer options, obtain the question context and candidate subgraph;
[0058] Step 300: Based on the pre-trained language model, determine the problem context features according to the problem context;
[0059] Step 400: Based on the neural network layer, determine the joint subgraph features according to the candidate subgraph and the problem context;
[0060] Step 500: Perform feature fusion on the problem context features and the joint subgraph features to obtain fused features;
[0061] Step 600: Based on the multi-head attention mechanism, obtain the comprehensive similarity according to the fusion features;
[0062] Step 700: Determine the best answer option based on the overall similarity of each answer option.
[0063] Specifically, such as Figure 2 This invention provides a graph attention mechanism feature fusion method for a factual knowledge question answering system, including but not limited to the following steps:
[0064] S1. Obtain factual knowledge questions and answer options;
[0065] S2. Based on the factual knowledge questions and answer options, obtain the question context and candidate subgraphs;
[0066] S3. Based on the problem context, use a pre-trained language model to obtain problem context features;
[0067] S4. Based on the candidate subgraph and the problem context, obtain joint subgraph features through a neural network layer;
[0068] S5. Perform feature fusion on the problem context features and joint subgraph features to obtain fused features;
[0069] S6. Based on the fusion features, optimize the multi-head attention mechanism to obtain the comprehensive similarity;
[0070] S7. Based on the overall similarity of the various answer options, determine an answer option to return.
[0071] In this embodiment, a subgraph is constructed by retrieving entity nodes related to factual knowledge questions and answer options from an external knowledge graph. The factual knowledge question answering system obtains answers to factual knowledge questions from the factual knowledge question answering dataset. Discrete hyperparameters include the type of pre-trained language model, the type of pooling operation in a convolutional neural network, the type in a graph neural network, the type of activation function, etc.; continuous hyperparameters include regularization rate, learning rate, etc.
[0072] In this embodiment, the following steps can be performed to obtain the problem context and candidate subgraphs:
[0073] S201. By combining the factual knowledge question with multiple different answer options, the question context is obtained;
[0074] S202. Retrieve the external knowledge graph based on the factual knowledge questions and answer options to obtain candidate entities and candidate relationships;
[0075] S203. Based on the candidate entities and candidate relationships, use a knowledge graph construction method to obtain candidate subgraphs.
[0076] The principle of steps S201-S203 is as follows: Figure 3 As shown. In step S201, a factual knowledge question may correspond to multiple different answer options. The text of the factual knowledge question is concatenated with the texts of multiple answer options to form a question context. Next, in step S202, external knowledge graph data is first read, including structured data such as node ID, node type, edge ID, and edge type. Based on the entities present in the factual knowledge question and answer options, a search is performed to determine candidate entities and candidate relationships in the external knowledge graph. In step S203, a new knowledge graph is created, and then the candidate entities and candidate relationships are sequentially added to the subgraph to obtain candidate subgraphs.
[0077] In this embodiment, based on the problem context features, the following steps can be performed:
[0078] S301. Determine the category of the pre-trained language model;
[0079] S302. Perform embedding vector encoding on the problem context to obtain the input representation;
[0080] S303. Encode the input representation into the pre-trained language model to obtain the output of the hidden layer;
[0081] S304. Use the output of the last layer of the hidden layer as the problem context feature.
[0082] The principle of steps S301-S304 is as follows: Figure 3 As shown. In this embodiment, various pre-trained language models can be used for encoding, and different pre-trained language models may have different abilities to understand and capture contextual information. During step S302, the embedding vector encoding method converts the problem context into a continuous vector representation so that the pre-trained language model can understand and process it. Next, in step S303, the pre-trained language model processes the input representation, encoding it through multiple levels of attention mechanisms and feedforward neural networks to capture semantic and contextual information in the input. These encoding processes produce a series of hidden layer outputs. In step S304, the output of the last hidden layer can be considered as a feature of the language model.
[0083] In this embodiment, to combine subgraph features, the following steps can be performed:
[0084] S401. Perform pooling and linear transformation operations on the problem context features, and then input them into the activation function to obtain the first data;
[0085] S402. Perform embedding vector encoding processing on the candidate subgraph to obtain the second data;
[0086] S403. Perform vector concatenation on the first data and the second data to obtain the third data;
[0087] S404. Perform message passing on the third data using a graph neural network to obtain joint subgraph features.
[0088] The principle of steps S401-S404 is as follows: Figure 3 As shown. In step S401, pooling and linear transformation operations are performed on the problem context features generated in steps S401-S403, and the results are input into the activation function to obtain a more compact and expressive feature representation. In step S402, embedding vector encoding is performed on the candidate subgraphs generated in steps S301-S304 to obtain input representations. This is to convert the nodes, edges, or other elements in the candidate subgraphs into embedding vector representations so that they can be better combined with the problem context features. As shown in step S403, vector concatenation techniques can be used to embed the problem context into the candidate subgraph in the form of features, thereby obtaining a joint subgraph feature containing the problem context features.
[0089] In this embodiment, to obtain the fusion features, the following steps can be performed:
[0090] S501. Initialize the learnable weight matrix;
[0091] S502. Based on the problem context features and joint subgraph features, perform matrix operations to obtain a fusion matrix vector;
[0092] S503. The three features and the learnable weight matrix are weighted and summed to obtain the attention weight matrix;
[0093] S504. After normalizing the attention weight matrix, perform matrix operations with the problem context features to obtain fused problem context features;
[0094] S505. After performing transpose and normalization operations on the attention weight matrix, matrix operations are performed with the joint subgraph features to obtain fused joint subgraph features;
[0095] S506. Concatenate the vectors of the aforementioned features to obtain the fused features.
[0096] The principle of step 501 is as follows: Figure 4As shown. In this embodiment, the learnable weight matrix plays a role in controlling feature weights and fusing features in the model, helping the model to better represent features and extract information, thereby improving the model's performance on the task. As shown in steps S502-S503, the fused matrix vector aims to fuse and integrate different features. The attention weight matrix represents the importance or relevance of each feature in the entire question context. In steps S504 and S505, the purpose of this step is to perform weighted fusion of question context features and joint subgraph features according to attention weights. As shown in step 506, the fused question context features, joint subgraph features, and other features are concatenated into vectors to obtain the final fused feature vector. This fused feature vector will contain information from multiple features, including the word vector representation of the question, the syntactic structure features of the question, the topic features of the question, etc., which can describe the content, semantics, and contextual information of the question. It also incorporates structured data features from the knowledge graph, which can help the model capture the relationship between entities in the factual knowledge question and answer options, thereby aiding understanding and reasoning.
[0097] In this embodiment, to obtain the overall similarity, the following steps can be performed:
[0098] S601. Based on the fusion features, initialize the key vector and value vector in the multi-head attention mechanism;
[0099] S602. Based on the problem context features, initialize the query vector in the multi-head attention mechanism;
[0100] S603. Segment the aforementioned vectors and stack them into a multi-head tensor;
[0101] S604. Perform matrix multiplication on the query vector and key vector to obtain the attention score;
[0102] S605. Perform scaling and normalization operations on the attention scores to obtain attention weights;
[0103] S607. The attention weights and value vectors are weighted and summed to obtain a weighted value vector;
[0104] S608. Perform linear transformation and regularization operations on the weighted vector to obtain the comprehensive similarity.
[0105] The principle of steps S601-S608 is as follows: Figure 5As shown. During steps S601-S602, the key vector serves to provide a representation for measuring the correlation between elements in the input sequence. The value vector stores specific information or feature representations of each element in the input sequence. The query vector represents the information or target that the current attention head should focus on. Initializing the key and value vectors in the multi-head attention mechanism using the fused features helps the multi-head attention mechanism better model the correlation in the input sequence and improves logical reasoning ability. It can also capture contextual information and semantic similarity, helping to model semantic relationships between words and improve the model's semantic understanding ability. In step 603, the multi-head attention mechanism typically consists of multiple independent attention heads, each with its own key vector, query vector, and value vector. By segmenting these vectors and stacking them into a multi-head tensor, different inputs can be provided to each attention head, thus focusing on more comprehensive information. Executing steps S604-S608, the importance of each element in the input sequence can be determined through the calculation of attention scores and attention weights, and a comprehensive similarity representation can be generated.
[0106] In this embodiment, the answer options with the highest similarity are combined for return.
[0107] As explained in steps S1-S7 above, the comprehensive similarity used is the similarity between each answer option and the question calculated after fusing two features. The question context feature used has broad semantic understanding capabilities, capable of comprehending the meaning and background of the question. The joint subgraph feature used provides structured domain knowledge, which helps in understanding the entities, attributes, and relationships involved in the question. By fusing these two features, a more accurate understanding of the question can be achieved, providing answers that are more semantically and contextually consistent, thus enabling a more comprehensive and effective response to factual knowledge questions.
[0108] It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature, or indirectly fixed or connected to the other feature. Furthermore, the descriptions of "upper," "lower," "left," and "right" used in this disclosure are only relative to the relative positional relationships of the various components of this disclosure in the accompanying drawings. The singular forms "a," "described," and "the" used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. Moreover, unless otherwise defined, all technical and scientific terms used in this embodiment have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this embodiment specification is only for describing particular embodiments and is not intended to limit the invention. The term "and / or" as used in this embodiment includes any combination of one or more of the associated listed items.
[0109] It should be understood that although the terms first, second, third, etc., may be used to describe various elements in this disclosure, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, a first element may also be referred to as a second element without departing from the scope of this disclosure, and similarly, a second element may also be referred to as a first element. The use of any and all instances or exemplary language (“e.g.,” “such as,” etc.) provided in this embodiment is intended only to better illustrate embodiments of the invention and, unless otherwise required, does not impose a limitation on the scope of the invention.
[0110] It should be recognized that embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can be implemented using standard programming techniques—including a non-transitory computer-readable storage medium configured with a computer program, wherein such a storage medium causes the computer to operate in a specific and predefined manner—according to the methods and drawings described in the specific embodiments. Each program can be implemented in a high-level procedural or target-terminal programming language to communicate with the computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).
[0111] Furthermore, the procedures described in this embodiment can be performed in any suitable order unless otherwise indicated by this embodiment or clearly contradicted by the context. The procedures (or variations and / or combinations thereof) described in this embodiment can be executed under the control of one or more computer systems configured with executable instructions, and can be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program includes a plurality of instructions executable by one or more processors.
[0112] Furthermore, the method can be implemented in any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention described in this embodiment includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques described in the invention, the invention also includes the computer itself.
[0113] A computer program can be applied to input data to perform the functions described in this embodiment, thereby transforming the input data to generate output data stored in non-volatile memory. The output information can also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents a physical and tangible target terminal, including a specific visual depiction of the physical and tangible target terminal generated on the display.
[0114] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0115] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A graph attention mechanism feature fusion method for a factual knowledge question answering system, characterized in that, include: Obtain factual knowledge questions and multiple answer options to choose from; Based on the factual knowledge question and the answer options, the question context and candidate subgraph are obtained; Based on a pre-trained language model, problem context features are determined according to the problem context. Based on the neural network layer, joint subgraph features are determined according to the candidate subgraph and the problem context; The problem context features and the joint subgraph features are fused to obtain fused features; Based on a multi-head attention mechanism, a comprehensive similarity is obtained according to the fusion features; The best answer option is determined based on the overall similarity of the various answer options. The problem context features and the joint subgraph features are fused to obtain fused features, specifically including: Initialize the learnable weight matrix; Matrix operations are performed based on the problem context features and the joint subgraph features to obtain a fusion matrix vector; The attention weight matrix is obtained by weighted summing of the problem context features, the joint subgraph features, the fusion matrix vector, and the learnable weight matrix. After normalizing the attention weight matrix, matrix operations are performed with the problem context features to obtain the fused problem context features; After performing transpose and normalization operations on the attention weight matrix, matrix operations are performed with the joint subgraph features to obtain fused joint subgraph features; The fusion problem context features and the fusion joint subgraph features are concatenated as vectors to obtain the fusion features; Based on a multi-head attention mechanism, a comprehensive similarity is obtained according to the fusion features, including: Initialize the key vector and value vector in the multi-head attention mechanism based on the fusion features; Initialize the query vector in the multi-head attention mechanism based on the problem context features; The key vector, the value vector, and the query vector are split, and the splitting results are stacked into a multi-head tensor. The attention weights are obtained by performing linear transformations and matrix multiplications on the query vector and the key vector, dividing by a scaling factor, and normalizing. The attention weights and the value vector are weighted and summed to obtain a weighted value vector. The weighted vector is subjected to linear transformation and regularization to obtain the comprehensive similarity.
2. The graph attention mechanism feature fusion method for the factual knowledge question answering system according to claim 1, characterized in that, Based on the factual knowledge question and the answer options, a question context and candidate subgraph are obtained, including: By combining the factual knowledge question with multiple different answer options, the question context is obtained; The external knowledge graph is retrieved based on the factual knowledge questions and answer options to obtain candidate entities and candidate relationships; Based on the knowledge graph construction method, candidate subgraphs are determined according to the candidate entities and candidate relationships.
3. The graph attention mechanism feature fusion method for the factual knowledge question answering system according to claim 1, characterized in that, Based on a pre-trained language model, problem context features are determined according to the problem context, including: Determine the category of the pre-trained language model; The problem context is subjected to embedding vector encoding to obtain the input representation; The input representation is encoded into the pre-trained language model to obtain the output of the hidden layer; The output of the last layer of the hidden layer is used as the problem context feature.
4. The graph attention mechanism feature fusion method for the factual knowledge question answering system according to claim 1, characterized in that, Based on the neural network layer, joint subgraph features are determined according to the candidate subgraph and the problem context, including: The problem context features are subjected to pooling and linear transformation operations, and then input into the activation function to obtain the first data; The candidate subgraph is subjected to embedding vector encoding to obtain the second data; The first data and the second data are vector-concatenated to obtain the third data. The third data is processed by a graph neural network message passing method to obtain joint subgraph features.
5. The graph attention mechanism feature fusion method for the factual knowledge question answering system according to claim 1, characterized in that, The best answer option is determined based on the overall similarity of the various answer options, including: The answer option with the highest overall similarity is determined as the best answer option.