Cross-chapter fact verification method and system
By constructing sentence diagrams and statement-evidence diagrams using BERT encoder and self-attention mechanisms, the problems of low efficiency of evidence sentence retrieval and lack of interpretability in fact verification in the prior art are solved, and more efficient and accurate evidence retrieval and verification are achieved.
Patent Information
- Application Number
- CN202411372749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-28
AI Technical Summary
The existing cross-section fact verification methods rely on insufficient information in the most similar sentences, which is difficult to provide a comprehensive verification basis, and are prone to loss of information in large text collections.
The BERT encoder was used to obtain semantic embedding features, construct a sentence graph and process nodes using a self-attention mechanism, obtain prediction results and sort them to obtain the most relevant evidence sentences, and then construct a statement-evidence graph to evaluate the importance of the evidence sentences.
It improves the efficiency and accuracy of evidence sentence retrieval, enhances the interpretability of fact verification, captures effective information in the text, and improves model performance.
Smart Images

Figure CN119538910A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fact verification research, and in particular to a cross-chapter fact verification method and system. Background Art
[0002] The cross-text fact verification task aims to retrieve relevant evidence from multiple documents to verify the authenticity of a given claim, relying on the quality of the retrieved evidence. The remarkable advancement of social media has inevitably led to the increase of fake news and online rumors. To mitigate the negative impact of such false statements, automatic fact verification has attracted considerable attention in recent research. Fact verification aims to verify the authenticity of a given claim by retrieving relevant evidence from a reliable corpus. Specifically, a fact verification system is required to label a claim as "support", "refute", or "insufficient information", indicating whether the evidence can support, refute, or is insufficient to support the claim. However, existing cross-text fact verification methods heavily rely on specific heuristics or rule-based strategies, using semantic or surface-level similarity measures between claims and documents for evidence retrieval. Therefore, how to retrieve more credible evidence sentences that are more conducive to verifying the factuality of a claim is a difficult problem in the cross-text fact verification task.
[0003] Augenstein et al. proposed using summary snippets returned by Google as evidence. A key limitation of this approach is that summary snippets do not provide enough information to verify a claim. Nie et al. selected the top k sentences as evidence by sorting their semantic similarity. This approach tends to prioritize sentences based on high similarity. It ignores the inclusion of sentences that express different views or present different information. Therefore, this limitation hinders the diversity of evidence and makes the system more vulnerable to information filtering challenges. Therefore, it is necessary to train fact verification systems to learn how to effectively retrieve evidence sentences from full documents on web pages.
[0004] Zhou et al. regard each claim-evidence pair as a single node and construct a fully connected graph based on the graph attention mechanism to propagate node information. On this basis, Liu et al. improved the node feature aggregation algorithm using the kernel attention mechanism at the sentence and token levels. In addition, Chen et al. introduced entity graphs to capture fine-grained evidence features and model their semantic relationships. Summary of the invention
[0005] In view of the above existing problems, the present invention is proposed.
[0006] Therefore, the present invention provides a cross-chapter fact verification method and system to solve the problem that the existing fact verification method is not sufficient to provide comprehensive verification basis and explanation based on the information of the most similar sentences, and is prone to information loss in large text collections.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, the present invention provides a cross-chapter fact verification method, comprising: using a BERT encoder to obtain a first semantic embedding feature and a second semantic embedding feature of a data set; constructing a sentence graph through the first semantic embedding feature and the second semantic embedding feature, and using a self-attention mechanism to process the nodes in the sentence graph to obtain corresponding prediction results; fitting the prediction results with actual sentence labels to calculate prediction probabilities, and sorting the prediction probabilities to obtain the most relevant sentences as evidence sentences; constructing a statement-evidence graph based on the evidence sentences, and using a self-attention mechanism to evaluate the importance of the evidence sentences, using a loss function to fit the evaluation results and the statement labels, and adjusting parameters through back propagation to form a learning result of an objective function optimization model.
[0009] As a preferred solution of the cross-chapter fact verification method of the present invention, the method of using the BERT encoder to obtain the first semantic embedding feature and the second semantic embedding feature of the data set includes:
[0010] Perform preliminary feature extraction on the text on the open source cross-chapter fact verification dataset, that is, process the given sentence of the input text into the form of "[CLS] sentence [SEP]", and use the BERT encoder to encode it to obtain the corresponding features;
[0011] For each statement in the open source cross-text fact verification dataset, a candidate evidence sentence set is formed by aggregating all sentences in each document corresponding to the statement, and then a BERT encoder is used to obtain the first semantic embedding features of the statement and each sentence in the candidate evidence sentence set;
[0012] All the golden evidence sentences corresponding to each statement are concatenated into a long sentence and special tags are added, and the BERT encoder is used to obtain the second semantic embedding features of the golden evidence sentences with the special tags.
[0013] As a preferred solution of the cross-chapter fact verification method of the present invention, the step of constructing a sentence graph and using a self-attention mechanism to process nodes in the sentence graph to obtain corresponding prediction results includes:
[0014] Construct a sentence graph G=(V,E) by using the first semantic embedding feature and the second semantic embedding feature, where the node V includes the sentences in the text and the golden evidence sentences, and the edge E connects all the nodes;
[0015] Use the golden evidence sentence as the first node to add sentences in the text one by one;
[0016] The attention mechanism is used to enable the training model to learn the sentence most relevant to the golden evidence sentence as the evidence sentence to retrieve evidence to assist the fact verification task, and the evidence sentence is output as the prediction result of the attention mechanism.
[0017] As a preferred solution of the cross-chapter fact verification method of the present invention, the fitting calculation prediction probability includes:
[0018] The prediction probability is calculated by fitting the prediction result with the actual sentence label, which is expressed as: Among them, W L represents the weight matrix of the final linear transformation, Represents the final table of node i obtained by the last layer of the graph attention neural network model;
[0019] The graph attention neural network model generates a prediction probability of each class through input data to form a learning result of the objective function optimization model, and uses the minimized loss function as the objective function to update the parameters of the graph attention neural network model through back propagation;
[0020] The calculation of the minimization loss function is:
[0021]
[0022] Among them, y i Represents the prediction result of the i-th category label.
[0023] As a preferred scheme of the cross-chapter fact verification method described in the present invention, the predicted probabilities obtained by fitting the predicted results with the actual sentence labels are sorted from large to small according to the probabilities associated with the label 1, and the top k sentences are selected as the most relevant evidence sentences to assist in subsequent fact verification, wherein nodes with an index of 0, i.e., golden evidence sentence nodes, are excluded.
[0024] As a preferred solution of the cross-chapter fact verification method of the present invention, it includes:
[0025] Construct a statement-evidence graph based on the most relevant evidence sentences, take the statement in the open source cross-chapter fact verification dataset as the first node, and add the most relevant evidence sentences in sequence;
[0026] Each node has different attention weights with its adjacent nodes. The self-attention mechanism is used to process the attention weights between nodes in the claim-evidence graph, so that the model automatically learns the importance of different evidences, exchanges and fuses information between different nodes, and obtains updated node representations.
[0027] As a preferred solution of the cross-chapter fact verification method of the present invention, it also includes:
[0028] Calculating the predicted probability by fitting the updated node representation with the actual declared label;
[0029] The graph attention neural network model generates a prediction probability of each class through input data to form a learning result of the objective function optimization model, and uses the loss function as the objective function to update the parameters of the graph attention neural network model through back propagation to form a learning result of the objective function optimization model;
[0030] The loss function is calculated as:
[0031]
[0032] In a second aspect, the present invention provides a cross-chapter fact verification system, comprising:
[0033] A sentence encoding module, used to obtain a first semantic embedding feature and a second semantic embedding feature of a data set using a BERT encoder;
[0034] A relevant evidence selection module, configured to construct a sentence graph using the first semantic embedding feature and the second semantic embedding feature, process the nodes in the sentence graph using a self-attention mechanism to obtain corresponding prediction results, fit the prediction results with actual sentence labels to calculate prediction probabilities, and sort the prediction probabilities to obtain the most relevant sentences as evidence sentences;
[0035] The claim verification module is used to construct a claim-evidence graph based on the evidence sentence, and use the self-attention mechanism to evaluate the importance of the evidence sentence, use the loss function to fit the evaluation result and the claim label, and adjust the parameters through back propagation to form the learning result of the objective function optimization model.
[0036] In a third aspect, the present invention provides a computing device, comprising:
[0037] Memory and processor;
[0038] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method are implemented.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the method when executed by a processor.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention proposes a cross-chapter fact verification method and system based on an evidence graph attention neural network to solve the problems of low efficiency in evidence sentence retrieval and lack of explainability in fact verification, and proposes to use GAT to capture the sentences most relevant to the golden evidence sentences as evidence, which can capture effective information in the text and help improve the model performance; in addition, the present invention also designs an attention mechanism that enables the model to automatically learn the importance of different evidences. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0042] Figure 1 This is an overall flow chart of a cross-chapter fact verification method according to an embodiment of the present invention;
[0043] Figure 2 A model flow chart of a cross-chapter fact verification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0045] Example 1
[0046] Reference Figure 1-2 As an embodiment of the present invention, most of the existing research on fact verification tasks is based on the sentences that are most similar to the statement. In actual scenarios, the most similar sentences can only provide one-sided information and cannot provide explanations for the decision of statement verification. For large text collections, simple sorting algorithms such as TF-IDF may lead to sparse representation and cause some information to be lost. Therefore, a cross-chapter fact verification method based on an evidence graph attention neural network is proposed, which takes into account the role of golden evidence sentences in evidence retrieval, and provides explanations for statement verification, significantly improving the verification performance. Specifically, the following steps are included:
[0047] S100: using a BERT encoder to obtain a first semantic embedding feature and a second semantic embedding feature of a data set;
[0048] In the embodiment of the present application, a preliminary feature extraction is performed on the text on an open source cross-chapter fact verification dataset, that is, a given sentence of the input text is processed into the form of "[CLS] sentence [SEP]", and the corresponding features are obtained by encoding using the BERT encoder;
[0049] For each statement in the open source cross-text fact verification dataset, in order to utilize information from multiple documents, a candidate evidence sentence set is formed by aggregating all sentences in each document corresponding to the statement, and then a BERT encoder is used to obtain the first semantic embedding features of each sentence in the statement and the candidate evidence sentence set;
[0050] All the golden evidence sentences corresponding to each statement are concatenated into a long sentence and special tags are added. The BERT encoder is used to obtain the second semantic embedding features of the specially marked golden evidence sentences.
[0051] It should be noted that the first semantic embedding feature is a fixed-length vector representation of each sentence in the statement and candidate evidence sentence set. In order to obtain these features, each sentence in the statement and candidate evidence sentence set must first be processed into the form of "[CLS] sentence [SEP]", and then encoded using the BERT encoder. The BERT encoder generates a fixed-length vector representation for each sentence, which contains the semantic information of the sentence. The second semantic embedding feature is a fixed-length vector representation of the specially marked golden evidence sentence. In order to obtain these features, all the golden evidence sentences must first be concatenated into a long sentence, special markers must be added, and then the long sentence must also be encoded using the BERT encoder. The BERT encoder generates a fixed-length vector representation for this long sentence, which contains the semantic information of all golden evidence sentences.
[0052] It should be noted that by obtaining the first semantic embedding feature and the second semantic embedding feature of the dataset, information from multiple documents can be used to verify the authenticity of the statement. During the training process, the model will learn how to extract key information from these semantic embedding features to determine whether the statement is true. In the testing phase, we can input new statements and candidate evidence sentences, and then use the trained model to predict which sentences are the most convincing evidence. Through BERT embedding, the complex relationships and semantic information between sentences can be captured, providing rich contextual information for subsequent tasks.
[0053] S200: constructing a sentence graph using the first semantic embedding feature and the second semantic embedding feature, processing nodes in the sentence graph using a self-attention mechanism to obtain corresponding prediction results, fitting the prediction results with actual sentence labels to calculate prediction probabilities, and sorting the prediction probabilities to obtain the most relevant sentences as evidence sentences;
[0054] In an embodiment of the present application, constructing a sentence graph and using a self-attention mechanism to process nodes in the sentence graph to obtain corresponding prediction results includes:
[0055] Construct a sentence graph G = (V, E) through the first semantic embedding feature and the second semantic embedding feature, where the node V includes the sentences in the text and the golden evidence sentences, and the edge E connects all the nodes;
[0056] Use the golden evidence sentence as the first node to add sentences in the text one by one;
[0057] The attention mechanism is used to enable the training model to learn the sentences most relevant to the golden evidence sentences as evidence sentences to retrieve evidence to assist in fact verification tasks, and the evidence sentences are output as the prediction results of the attention mechanism;
[0058] Furthermore, the prediction probability is calculated by fitting the prediction result with the actual sentence label, which is expressed as: Among them, W L represents the weight matrix of the final linear transformation, Represents the final table of node i obtained by the last layer of the graph attention neural network model;
[0059] The graph attention neural network model generates the prediction probability of each class through input data, forms the learning result of the objective function optimization model, and uses the minimized loss function as the objective function to update the parameters of the graph attention neural network model through back propagation;
[0060] It should be noted that the calculation of minimizing the loss function is:
[0061]
[0062] Among them, y i Represents the prediction result of the i-th category label.
[0063] Furthermore, the predicted probabilities obtained by fitting the predicted results with the actual sentence labels are sorted from large to small according to the probabilities associated with the label 1, and the first k sentences are selected as the most relevant evidence sentences to assist in subsequent fact verification, where the node with index 0, i.e., the golden evidence sentence node, is excluded.
[0064] S300: Construct a claim-evidence graph based on the most relevant evidence sentences, and use the self-attention mechanism to evaluate the importance of the evidence sentences. Use the loss function to fit the evaluation results and the claim labels, and adjust the parameters through backpropagation to form the learning result of the objective function optimization model.
[0065] In the embodiment of the present application, a statement-evidence graph is constructed based on the most relevant evidence sentences, with the statement in the open source cross-chapter fact verification dataset as the first node, and the most relevant evidence sentences are added in sequence;
[0066] Each node has different attention weights with its adjacent nodes. The self-attention mechanism is used to process the attention weights between nodes in the claim-evidence graph, so that the model automatically learns the importance of different evidences, exchanges and fuses information between different nodes, and obtains updated node representations.
[0067] Furthermore, the prediction probability is calculated by fitting the updated node representation with the actual declaration label;
[0068] The graph attention neural network model generates the prediction probability of each class through input data to form the learning result of the objective function optimization model, and uses the loss function as the objective function to update the parameters of the graph attention neural network model through back propagation to form the learning result of the objective function optimization model;
[0069] It should be noted that the loss function is calculated as:
[0070]
[0071] From the above, it can be seen that the present invention proposes a cross-chapter fact verification method and system based on evidence graph attention neural network to solve the problems of low efficiency in evidence sentence retrieval and lack of explainability in fact verification, and proposes to use GAT to capture the sentences most relevant to the golden evidence sentences as evidence, which can capture effective information in the text and help improve the model performance; in addition, the present invention also designs an attention mechanism that enables the model to automatically learn the importance of different evidence.
[0072] The above is a schematic scheme of a cross-chapter fact verification method of this embodiment. It should be noted that the technical scheme of the cross-chapter fact verification system and the technical scheme of the above-mentioned cross-chapter fact verification method belong to the same concept. For details not described in detail in the technical scheme of the cross-chapter fact verification system in this embodiment, please refer to the description of the technical scheme of the above-mentioned cross-chapter fact verification method.
[0073] like Figure 2 As shown, this embodiment also provides a cross-chapter fact verification system, including a sentence encoding module, a relevant evidence selection module and a statement verification module;
[0074] Specifically, the sentence encoding module is used to use the BERT encoder to obtain the first semantic embedding feature and the second semantic embedding feature of the data set, wherein, for each statement in the open source cross-chapter fact verification data set, a candidate evidence sentence set is formed by aggregating all sentences in each document corresponding to the statement, and then the BERT encoder is used to obtain the first semantic embedding feature of each sentence in the statement and the candidate evidence sentence set; all the golden evidence sentences corresponding to each statement are concatenated into a long sentence and special tags are added, and the BERT encoder is used to obtain the second semantic embedding feature of the specially marked golden evidence sentence;
[0075] Specifically, the relevant evidence selection module is used to construct a sentence graph through the first semantic embedding feature and the second semantic embedding feature, use the self-attention mechanism to process the nodes in the sentence graph to obtain the corresponding prediction results, fit the prediction results with the actual sentence labels to calculate the prediction probability, and sort the prediction probabilities to obtain the most relevant sentences as evidence sentences;
[0076] Specifically, the claim verification module is used to construct a claim-evidence graph based on the most relevant evidence sentences, and use the self-attention mechanism to evaluate the importance of the evidence sentences, use the loss function to fit the evaluation results and the claim labels, and adjust the parameters through back-propagation to form the learning results of the objective function optimization model.
[0077] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.
[0078] This embodiment also provides a computing device, which includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cross-chapter fact verification method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0079] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiment is implemented.
[0080] The storage medium proposed in this embodiment and the method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0081] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0082] Example 2
[0083] Based on the previous embodiment, this embodiment provides an application example of a cross-chapter fact verification method and system to verify and illustrate the technical effects adopted in this method.
[0084] In this embodiment, the F1 score is calculated as the evaluation index of the evidence retrieval stage, which is expressed as E-F1. The specific data is shown in Table 1.
[0085] Table 1
[0086]
[0087] As can be seen from Table 1, EGAT performs well in retrieving relevant evidence, surpassing all previous baselines. Compared with the previous state-of-the-art model ReRead, EGAT achieves an E-F1 score of 96.5% in the evidence retrieval module, surpassing ReRead’s 95.1%, a relative improvement of 1.4%. This indicates that the supervision of golden evidence and the interaction of contextual information help EGAT obtain higher quality evidence.
[0088] Furthermore, in the present embodiment, Micro F1 and Macro F1 are calculated as evaluation indicators in the claim verification stage, which are respectively denoted as Micro C-F1 and Macro C-F1 and are defined as follows:
[0089]
[0090] Among them, C is the number of categories; Pi, Ri are the precision and recall of category i.
[0091] As can be seen from Table 2, EGAT achieves a Micro C-F1 score of 73.89%, surpassing ReRead’s 70.87%, a relative improvement of +3.02%. ReRead attributes its performance enhancement to the faithful and credible evidence retrieved from the source documents. In addition to retrieving more relevant evidence, we attribute the improvement of EGAT to three aspects: first, the model pays more attention to the part of the evidence that is relevant to the claim. Therefore, the information it captures can more effectively verify the authenticity of the claim; second, the model understands the semantic relations and interactions between evidence, providing more comprehensive contextual information for claim verification; finally, due to the flexibility of EGAT in learning the relationship weights between different evidence, the model has high generalization performance in different scenarios.
[0092] Table 2
[0093]
[0094] From the above, it can be seen that the cross-chapter fact verification method and system based on the evidence graph attention neural network proposed in the present invention solves the problems of low efficiency in evidence sentence retrieval and lack of explainability in fact verification, and proposes to use GAT to capture the sentences most relevant to the golden evidence sentences as evidence, which can capture effective information in the text and help improve the model performance; in addition, the present invention also designs an attention mechanism that enables the model to automatically learn the importance of different evidence.
[0095] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0096] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0097] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0098] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0100] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0101] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A cross-chapter fact verification method, characterized in that: include: Use BERT encoder to obtain the first semantic embedding feature and the second semantic embedding feature of the data set; Constructing a sentence graph by using the first semantic embedding feature and the second semantic embedding feature, and processing the nodes in the sentence graph by using a self-attention mechanism to obtain corresponding prediction results; Fitting the prediction results with the actual sentence labels to calculate the prediction probabilities, and sorting the prediction probabilities to obtain the most relevant sentences as evidence sentences; A claim-evidence graph is constructed based on the evidence sentences, and the importance of the evidence sentences is evaluated using a self-attention mechanism. The evaluation results and the claim labels are fitted using a loss function, and the parameters are adjusted through back-propagation to form a learning result of the objective function optimization model.
2. The cross-chapter fact verification method according to claim 1, characterized in that: The method of using the BERT encoder to obtain the first semantic embedding feature and the second semantic embedding feature of the data set includes: Perform preliminary feature extraction on the text on the open source cross-chapter fact verification dataset, that is, process the given sentence of the input text into the form of "[CLS] sentence [SEP]", and use the BERT encoder to encode it to obtain the corresponding features; For each statement in the open source cross-text fact verification dataset, a candidate evidence sentence set is formed by aggregating all sentences in each document corresponding to the statement, and then a BERT encoder is used to obtain the first semantic embedding features of the statement and each sentence in the candidate evidence sentence set; All the golden evidence sentences corresponding to each statement are concatenated into a long sentence and special tags are added, and the BERT encoder is used to obtain the second semantic embedding features of the golden evidence sentences with the special tags.
3. The cross-chapter fact verification method according to claim 2, characterized in that: The step of constructing a sentence graph and using a self-attention mechanism to process nodes in the sentence graph to obtain corresponding prediction results includes: Construct a sentence graph G=(V,E) by using the first semantic embedding feature and the second semantic embedding feature, where the node V includes the sentences in the text and the golden evidence sentences, and the edge E connects all the nodes; Use the golden evidence sentence as the first node to add sentences in the text one by one; The attention mechanism is used to enable the training model to learn the sentence most relevant to the golden evidence sentence as the evidence sentence to retrieve evidence to assist the fact verification task, and the evidence sentence is output as the prediction result of the attention mechanism.
4. The cross-chapter fact verification method according to claim 3, characterized in that: The fitting calculation prediction probability comprises: The prediction probability is calculated by fitting the prediction result with the actual sentence label, which is expressed as: Among them, W L represents the weight matrix of the final linear transformation, Represents the final table of node i obtained by the last layer of the graph attention neural network model; The graph attention neural network model generates the prediction probability of each class through input data, forms the learning result of the objective function optimization model, and uses the minimized loss function as the objective function to update the parameters of the graph attention neural network model through back propagation.
5. The cross-chapter fact verification method according to claim 4, characterized in that: The predicted probabilities obtained by fitting the predicted results with the actual sentence labels are sorted from large to small according to the probabilities associated with the label 1, and the first k sentences are selected as the most relevant evidence sentences to assist in subsequent fact verification, wherein the nodes with index 0, i.e., the golden evidence sentence nodes, are excluded.
6. The cross-chapter fact verification method according to claim 5, characterized in that: include: Construct a statement-evidence graph based on the most relevant evidence sentences, take the statement in the open source cross-chapter fact verification dataset as the first node, and add the most relevant evidence sentences in sequence; Each node has different attention weights with its adjacent nodes. The self-attention mechanism is used to process the attention weights between nodes in the claim-evidence graph, so that the model automatically learns the importance of different evidences, exchanges and fuses information between different nodes, and obtains updated node representations.
7. The cross-chapter fact verification method according to claim 6, characterized in that: Also includes: Calculating the predicted probability by fitting the updated node representation with the actual declared label; The graph attention neural network model generates the prediction probability of each class through input data to form the learning result of the objective function optimization model, and uses the loss function as the objective function to update the parameters of the graph attention neural network model through back propagation to form the learning result of the objective function optimization model.
8. A system using the cross-chapter fact verification method according to any one of claims 1 to 7, characterized in that: include: A sentence encoding module, used to obtain a first semantic embedding feature and a second semantic embedding feature of a data set using a BERT encoder; A relevant evidence selection module, configured to construct a sentence graph using the first semantic embedding feature and the second semantic embedding feature, process the nodes in the sentence graph using a self-attention mechanism to obtain corresponding prediction results, fit the prediction results with actual sentence labels to calculate prediction probabilities, and sort the prediction probabilities to obtain the most relevant sentences as evidence sentences; The claim verification module is used to construct a claim-evidence graph based on the evidence sentence, and use the self-attention mechanism to evaluate the importance of the evidence sentence, use the loss function to fit the evaluation result and the claim label, and adjust the parameters through back propagation to form the learning result of the objective function optimization model.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Automatic fact verification method fusing graph converter and common attention network
CN114048286A
Method and device for identifying credibility of chapter-level event and storage medium
CN115982348A
Ffact verification method and system based on mixed evidence and storage medium
CN116383239A
Fact validation method and system, computer device and storage medium
US20220230050A1