Table fact verification method, apparatus and device, medium and product

By sorting the similarity of table rows and extracting semantic features, and using language models and convolutional neural networks to process table fact verification, the problem of processing too long, complex and diversified tabular data in the existing technology is solved, and more efficient verification results are achieved.

CN120339688APending Publication Date: 2025-07-18ZHEJIANG GONGSHANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510390729.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process too long, complex and diverse tabular data, resulting in poor performance of table fact verification methods in the real world.

Method used

By obtaining multiple declarations and corresponding tables, sorting table rows based on similarity scores, using the trained language model to generate a matrix and a vector marked at the beginning of the sample, combining text convolutional neural networks of multiple different convolution kernels to extract semantic features, and inputting the full connection layer to output prediction results to achieve authenticity verification of declarations and tables.

Benefits of technology

It improves the ability to understand complex contexts, enhances the prediction accuracy of the model, reduces the computational cost, and can effectively process excessively long, complex and diverse tabular data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339688A_ABST
    Figure CN120339688A_ABST
Patent Text Reader

Abstract

The invention discloses a table fact verification method and device, equipment, a medium and a product, and relates to the technical field of natural language processing.The method includes the steps that for any declaration, according to similarity scores between the declaration and all table lines, all the table lines are ranked, and ranked tables are determined; the sorted tables and declarations serve as table fact verification samples to be input into a trained language model, and a first matrix and a vector of a sample beginning mark are generated; according to the first matrix, a vector marked at the beginning of the sample and a text convolutional neural network of a plurality of different convolution kernels, extracting semantic features between the declarated and sorted tables; inputting the semantic features into a first full connection layer, and outputting a prediction result corresponding to the statement; and taking a prediction result corresponding to each declaration as a table fact verification result. According to the method and the device, authenticity verification between the declaration and the table and effective processing of overlong, complex and diversified table data are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of natural language processing, and particularly to a method, apparatus, device, medium, and product for table fact verification. Background Art

[0002] A large amount of information exists in the form of tables on the Internet and various documents. These tables often contain rich entity, attribute, and relationship information. Table fact verification refers to verifying the authenticity or relevance of a given statement through the analysis and reasoning of structured table data. However, due to the complexity and diversity of table data, as well as possible errors or inconsistencies therein, traditional methods often cannot effectively perform fact verification, which poses challenges to applications such as information extraction, data analysis, and decision support.

[0003] In recent years, with the rapid development of artificial intelligence and natural language processing technologies, table fact verification has become one of the research hotspots. As a common form of structured data, table data contains rich information. Effective fact verification of it can help better understand the entities, attributes, and relationships therein, and provide more reliable support for data analysis and decision-making. The development of table fact verification technology can improve the accuracy and credibility of information extraction and data quality. By automatically verifying the information in the table, possible errors or inconsistencies can be effectively discovered, improving the quality and credibility of the data, and providing a reliable data basis for subsequent information extraction and applications. The research on table fact verification can also promote the application and development of artificial intelligence and natural language processing technologies in the field of structured data analysis. By exploring and solving the key technologies and challenges in table fact verification, new ideas and methods can be provided for technological innovation and application in related fields, promoting the further development of the field.

[0004] Table fact verification aims to verify whether a given natural language statement is consistent with the facts in a semi-structured table. Its goal is to determine whether the facts stated in the statement are supported in the corresponding table according to the given statement and the table.

[0005] Currently, researchers have proposed various methods based on machine learning and deep learning to solve this problem and have made certain progress. These methods mainly rely on introducing external knowledge and converting the table content into text according to a set template for subsequent prediction. Although this method can solve the problem of table-to-text conversion and obtain corresponding prediction results, the table data in the real world is usually long, and together with the statements, the length often exceeds the input length of the model. Therefore, existing methods usually rely on templates to preprocess table evidence or convert tables into text. Such templates usually rely on specific table structures. They perform poorly when dealing with overly long, complex, and diverse table structures. Due to the limitations of the rules, these methods often struggle to adapt to the diversity and dynamics of table data in the real world. Summary of the Invention

[0006] The purpose of this application is to provide a method, device, equipment, medium, and product for table fact verification, which can solve the problem that when dealing with overly long, complex, and diverse table data, it is impossible to effectively process and predict whether the statement can be supported by the facts in the table.

[0007] To achieve the above purpose, this application provides the following solutions:

[0008] In the first aspect, this application provides a method for table fact verification, including:

[0009] Obtain multiple statements and the corresponding table for each statement; the statement is a custom natural language statement;

[0010] For any statement, sort each table row according to the similarity score between the statement and each table row, and determine the sorted table; the table row represents any row in the table corresponding to the statement and the content in the row table;

[0011] Use the sorted table and the statement as a table fact verification sample;

[0012] Input the table fact verification sample into a trained language model to generate a first matrix and a vector of the sample start marker; the sample start marker includes the start marker of the statement and the start marker of the sorted table, and the start marker of the statement and the start marker of the sorted table are the same;

[0013] According to the first matrix, the vector of the sample start marker, and a text convolutional neural network with multiple different convolutional kernels, extract the semantic features between the statement and the sorted table;

[0014] Input the semantic features into the first fully connected layer and output the prediction result corresponding to the statement; the prediction result corresponding to the statement is the probability that the statement is supported by the content in the corresponding table.

[0015] Use the prediction results corresponding to each statement as the table fact verification results.

[0016] In a second aspect, the present application provides a table fact verification device, including:

[0017] An acquisition module, configured to acquire a plurality of statements and the table corresponding to each statement; the statement is a custom natural language statement.

[0018] A calculation and sorting module, configured to, for any statement, sort each table row according to the similarity score between the statement and each table row, and determine the sorted table; the table row represents any row in the table corresponding to the statement and the content in the row table.

[0019] A language model module, configured to use the sorted table and the statement as a table fact verification sample; input the table fact verification sample into a trained language model to generate a first matrix and a vector of sample start tokens; the sample start tokens include the start token of the statement and the start token of the sorted table, and the start token of the statement and the start token of the sorted table are the same.

[0020] An extraction module, configured to extract the semantic features between the statement and the sorted table according to the first matrix, the vector of sample start tokens, and a text convolutional neural network with multiple different convolutional kernels.

[0021] A determination module, configured to input the semantic features into the first fully connected layer, output the prediction result corresponding to the statement, and use the prediction results corresponding to each statement as the table fact verification results; the prediction result corresponding to the statement is the probability that the statement is supported by the content in the corresponding table.

[0022] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the table fact verification method described above.

[0023] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the table fact verification method described above is implemented.

[0024] In a fifth aspect, the present application provides a computer program product, including a computer program which, when executed by a processor, implements the tabular fact verification method described above.

[0025] According to the specific embodiments provided by the present application, the following technical effects are disclosed:

[0026] The present application provides a tabular fact verification method, apparatus, device, medium and product. The present application first obtains a plurality of statements and the corresponding tables of the statements, and sorts the table rows based on the similarity scores to filter out the table rows more relevant to the statements. Then, for each tabular fact verification sample, a first matrix and a vector of the sample start marker are generated based on the trained language model. That is, the sorted table rows are obtained through the sorted table, and are input into the trained language model in the order of the table rows. The trained language model preferentially processes the table rows most relevant to the statement, reducing irrelevant interference and avoiding the poor performance of the language model in processing long tables in the related art, and also reducing the calculation cost. Further, the text convolutional neural network based on multiple different convolutional kernels helps the first matrix and the vector of the sample start marker to focus on the most important features, that is, semantic features, so that both the calculation efficiency is improved and the performance of the language model is enhanced. Further, the semantic features are input into the first fully connected layer, and the prediction results corresponding to the statements are output, and the prediction results corresponding to each statement are determined based on a plurality of tabular fact verification samples, realizing the authenticity verification between the statements and the tables and the effective processing of long, complex and diverse tabular data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0028] Figure 1 It is a schematic flowchart of a tabular fact verification method provided in an embodiment of the present application;

[0029] Figure 2 It is a schematic diagram of a model of a tabular fact verification method provided in an embodiment of the present application;

[0030] Figure 3 It is a diagram of tabular fact verification problems and examples provided in an embodiment of the present application;

[0031] Figure 4 It is an evaluation schematic flowchart of a tabular fact verification method provided in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] Next, in combination with the accompanying drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0033] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0034] As Figure 1 shown, the present application provides a method for verifying table facts, including:

[0035] Step 101: Obtain a plurality of statements and the corresponding table for each statement; the statement is a custom natural language statement.

[0036] In practical applications, referring to Figure 2 and Figure 3 , to filter out the table rows more relevant to the statement, the statement and the table (by row) need to be input into the pre-trained language model RoBERTa to obtain the corresponding CLS representation vectors of the statement and the table row, and and use these two vectors to calculate the similarity score between the table row and the statement. Where represents the CLS representation vector of the statement, represents the CLS representation vector of the i-th row of the table, and CLS is the start token of each input sequence. Exemplarily, the statement: On Friday, October 2, the league is live on BUCS play, and the corresponding table after the statement is shown in Table 1.

[0037] Table 1 Table before sorting

[0038] Monday, September 7 Registration begins Friday, September 18 Registration ends Friday, October 2 The league is live on BUCS play Monday, October 5 - Wednesday, December 16 Fixed window

[0039] Step 102: For any statement, sort each of the table rows according to the similarity score between the statement and each table row, and determine the sorted table; the table row represents any row table in the table corresponding to the statement and the content in the row table.

[0040] In some embodiments, step 102 specifically includes: sorting the similarity scores in descending order to obtain the sorted table.

[0041] Specifically, calculate the similarity score between the statement and the table row according to the similarity score According to the size, re - sort the table as shown in Table 2. The table row with the highest similarity is placed at the front, and so on. Due to the input length limit (512) of the model, discard the irrelevant table content.

[0042] Table 2 after sorting

[0043] Friday, October 2 The league is live on BUCS play Monday, October 5 - Wednesday, December 16 Fixed window Friday, September 18 Registration ends Monday, September 7 Registration begins

[0044] Step 103: Take the sorted table and the statement as a table fact - verification sample.

[0045] Step 104: Input the table fact - verification sample into the trained language model to generate the first matrix and the vector of the sample start token; the sample start token includes the start token of the statement and the start token of the sorted table, and the start token of the statement and the start token of the sorted table are the same.

[0046] Step 105: According to the first matrix, the vector of the sample start token, and the text convolutional neural network with multiple different convolutional kernels, extract the semantic features between the statement and the sorted table.

[0047] Step 106: Input the semantic features into the first fully - connected layer and output the prediction result corresponding to the statement; the prediction result corresponding to the statement is the probability that the content in the corresponding table supports the statement.

[0048] Step 107: Take the prediction results corresponding to each statement as the table fact - verification result.

[0049] In some embodiments, before step 102, it further includes: calculating the similarity score between the statement and each table row using cosine similarity; the similarity score is:

[0050]

[0051] Where, cls represents the start token; represents the cls representation vector of the statement; represents the cls representation vector of the i - th row of the table; Claim represents the statement; Row i represents the i - th row of the table; |||| represents the two - norm; represents the similarity score between the i - th row of the table and the statement; sim() represents the similarity function.

[0052] In some embodiments, step 105 specifically includes steps 201 - 204.

[0053] Step 201: Determine the first fusion vector according to the first matrix and the text convolutional neural network with multiple different convolutional kernels.

[0054] In some embodiments, step 201 specifically includes: after inputting the first matrix into a text convolutional neural network with multiple different convolutional kernels, passing through a pooling layer, and outputting a second matrix; obtaining a transposed matrix according to the second matrix, the third fully connected layer, and an activation function; concatenating vectors obtained after performing dimensionality reduction and normalization processing on the transposed matrix to obtain a first fusion vector.

[0055] Specifically, input the declared and sorted table row by row into a pre-trained language model, i.e., the language model. The language model can be RoBERTa. Based on RoBERTa, generate a vector of the sample start token. and the first matrix H PLM , truncate it if its length exceeds 512, or pad it with the character '0' at the end to obtain a representation vector, and extract the CLS vector. CLS is the start token. Among them, represents the representation vector of the special token [CLS], and H PLM represents the output representation matrix of the input text InputTxt with length L). Then input H PLM into a text convolutional neural network with multiple convolutional kernels, and then through max pooling, obtain a second matrix

[0056] Then input the second matrix through the third fully connected layer, and perform normalization and matrix transposition to obtain a transposed matrix Then input the transposed matrix reduce its dimension, and perform min-max normalization to obtain a vector

[0057] Since the text convolutional neural network has Z convolutional kernels, concatenate these Z vectors to obtain a first fusion vector h Con .

[0058] Step 202: Input the vector of the sample start token into the second fully connected layer to obtain a vector of the sample.

[0059] Step 203: Concatenate the vector of the sample and the first fusion vector to obtain a second fusion vector.

[0060] Step 204: Use the second fusion vector as the semantic feature.

[0061] Input the vector of the sample start token output by the trained language model into the second fully connected layer to obtain a vector of the sample The vector of the sample and the first fusion vector hCon Concatenate to obtain a new representation vector h Fusion , that is, the second fusion vector.

[0062] In some embodiments, before step 104, it further includes: constructing a language model; inputting the historical table fact verification sample into the language model to generate a historical first matrix and a vector of the historical sample start marker; based on the historical first matrix, the vector of the historical sample start marker, and a text convolutional neural network with multiple different convolutional kernels, extracting historical semantic features between the historical claim and the historically sorted table; inputting the historical semantic features into a first fully connected layer to output a historical prediction result corresponding to the historical claim; training the language model with the goal of minimizing the loss between the historical prediction result and the true prediction result to obtain a trained language model.

[0063] Among them, this application uses a cross-entropy loss function to train the language model to make the network parameters reach the optimal state.

[0064] As Figure 3 shown, "Claim: On Friday, October 2, the league was live broadcast on BUCS play". The sorted table extracts the table row that was originally in the third row to the first row because the content in the third row is the most direct evidence for verifying the authenticity of the claim. Then, the claim and the sorted table content are input into the model, and the pre-trained model RoBERta is used to convert the input text into a vector. Subsequently, multiple TextCNNs with different convolutional kernel sizes are applied for further parallel encoding to extract deeper semantic features between the claim and the table. After normalization, a fully connected layer is used for prediction. Compared with the existing methods, the method proposed in this application can greatly improve the model's understanding of complex contexts, and then improve the model prediction accuracy. Table fact verification has great development prospects and has certain practicality and promotion value.

[0065] Embodiment 2: Refer to Figure 2 , the process of table fact verification is as follows.

[0066] Step 1: Data processing.

[0067] In the table fact verification dataset, each claim is represented as Claim = {w1, w2,..., w k}, where k represents the claim length, and w k represents the k-th word in the claim. The table is represented as Table = {Row1, Row2,..., Row n} = {Col1, Col2,..., Col m} = {cell ij} 1≤i≤n,1≤j≤m, where n represents the number of rows in the table, m represents the number of columns in the table, Row i represents the i-th row, Col j represents the j-th column, and cell ij represents the cell in the i-th row and j-th column of the table. The claim and the table (by row) are input into the pre-trained language model RoBERTa to obtain:

[0068]

[0069] Among them, R represents the set of real numbers, d0 represents the number of hidden layers of RoBERTa. Here, d0 is 1024, [CLS] is the start token of each input sequence, and RoBERTa([CLS]Claim) means inputting the claim into RoBERTa, represents the CLS representation vector of the claim, represents the CLS representation vector of the i-th row of the table, where i is the serial number.

[0070] Step 2: Calculate the similarity score.

[0071] Calculate the similarity score using cosine similarity and of the similarity score and re-sort the table rows in descending order of the similarity score. The formula for calculating the similarity score is as follows.

[0072]

[0073] Step 3: Convolutional network.

[0074] Input the claim and the sorted table into the pre-trained language model RoBERTa to obtain:

[0075]

[0076] Among them, represents the first output matrix obtained after inputting the claim and the sorted table into RoBERTa. Here, L is 512, represents a matrix with dimensions 512×d0, represents the representation vector of the start token [CLS]. For classification tasks, the final hidden state vector of this token is used as the aggregated representation of the entire input sequence. [SEP] represents the sentence separator, and Tab2Txt_X represents the sorted table.

[0077] Then input H PLM into the text convolutional neural network TextCNN with multiple convolutional kernels, and then through max pooling Maxpooling, obtain:

[0078]

[0079] Among them represents the output matrix after passing through the Text Convolutional Neural Network (TextCNN) layer represents the output matrix after passing through the Maxpooling layer, which is used for subsequent classification decisions. The filter size of the Text Convolutional Neural Network (TextCNN) is z×d0, and the number of channels is d, where z = 2i + 1, i = 1, 2, …, Z, and z is the number of Text Convolutional Neural Networks. After encoding through multiple Text Convolutional Neural Networks, each output will be further processed by the Maxpooling layer. The filter size of this layer is 1×2, and this filter slides on the feature map, covering two adjacent token vectors each time. The token vector is each column vector in the matrix and the maximum value is selected from them. This operation helps to capture the local maximum response, thus retaining the most important features. The stride is 2 to reduce the dimension of each token representation vector. In this way, the Maxpooling layer not only reduces the feature dimension but also helps the model focus on the most important features, improving the computational efficiency and potentially enhancing the model's performance.

[0080] Step 4: Fully Connected Layer & Normalization & Transpose.

[0081] After passing through the fully connected layer, we get: After passing through the fully connected layer, we get:

[0082] Among them, represents the matrix obtained after passing through the fully connected layer (FC). Then, after passing through the activation function Softmax, the activation function Softmax converts the input into a set of probability distributions, ensuring that all output values are between 0 and 1, and the sum of all output values is 1. This makes the activation function output interpretable as the probability of each class, facilitating the understanding and interpretation of the model output, helping the model to produce more diverse classification results in the face of complex data distributions, and improving the model's generalization ability. After passing through the activation function, we get:

[0083] After transposing the matrix we get:

[0084] Among them, represents a matrix with dimensions L×3, that is, a 512×3 matrix represents a matrix with dimensions 3×L, that is, a 3×512 matrix, and Transpose represents the matrix transpose function express The transposed matrix paves the way for subsequent matrix dimensionality reduction.

[0085] Then Dimensionality reduction. In some cases, the dimension of the matrix may be too large, resulting in high computational complexity. By reducing the matrix into a sequence, the computational complexity can be reduced and the computational efficiency can be improved. The reduced sequence usually has a lower dimension than the original matrix. And the subsequent feature fusion is more suitable for processing sequence data rather than matrix data. By reducing the matrix into a sequence, the model can be made easier to handle. After dimensionality reduction, we get:

[0086] in, AvePooling means pooling the 3×L matrix Reduce the dimension to a 1×L vector, and get a vector of length 512 Prepare for the vector splicing required for subsequent feature fusion.

[0087] Then, the vector of samples Do the maximum-minimum normalization to get the vector

[0088]

[0089] in express The minimum value in yes The maximum value in is the normalized data.

[0090] Step 5: Feature fusion.

[0091] A vector As a feature, since there are Z convolution kernels, these Z vectors Splice to get the first fusion vector h Con .

[0092]

[0093] Among them, h Con ∈R Z×L represents the concatenated vector of Z vectors. That is, the representation vector of the beginning tag is input into the fully connected layer to obtain:

[0094] Then the vector of samples With the first fusion vector h ConConcatenate to obtain a new representation, i.e., the second fusion vector The second fusion vector h Fusion By concatenating features from different sources, it is possible to utilize more types of information, which can provide a more comprehensive data representation and help the model better understand the input data.

[0095]

[0096] Finally, input h Fusion into the fully connected layer to obtain the declared prediction result p:

[0097] p = FC(h Fusion ).

[0098] Step 6: Loss function.

[0099] Use the cross-entropy loss function:

[0100] where y i represents the true label, which is a one-hot vector. In a one-hot vector, the element corresponding to the correct class is 1, and the rest are 0. p i is the probability vector predicted for the i-th sample (consisting of a table and a claim) in the training set with a batch size of B. The batch size is set to 4, which means each batch contains 4 claims as individual samples. This application uses the Adam optimizer with a learning rate of 1e-05. A weight decay of 0.01 is applied to prevent overfitting. During training, it is necessary to calculate for each sample i, sum them up, and then take the average. Specifically, as Figure 3 shown, the true label y i = [1, 0, 0] represents support, while the predicted label p i = [0.7, 0.1, 0.2], indicating that the support probability is 0.7, the opposition probability is 0.1, and the neutral probability is 0.2. Then the loss contribution is -log(0.7) because only the term corresponding to the correct class (i.e., the first class) will be considered.

[0101] Step 7: Verify the accuracy of the prediction results for the claims.

[0102] Use indicators such as ALL(F1), Sup(F1), Ref(F1), NEI(F1), ACC to observe the model performance. The F1 score is a commonly used evaluation metric in classification problems, especially suitable for cases of class imbalance. Among them, the classes refer to the three probability classes of support, neutral, and opposition. The F1 score is the harmonic mean of precision and recall. The formula for the F1 score is as follows: Among them, for any category, Precision is the proportion of samples that are actually of the said category among the samples predicted by the model as the said category: Recall is the proportion of samples that are actually of the said category and are correctly predicted by the model (for example, if the said category is actually support and the prediction is also support): Among them, TP represents the number of samples that are actually of the said category and are correctly predicted by the model as the said category. FP represents the number of samples that are actually of another category but are wrongly predicted by the model as the said category. FN represents the number of samples that are actually of the said category but are wrongly predicted by the model as another category. ACC represents the accuracy rate, and the formula is as follows: Here, k represents there are k categories. Since this is a three-classification problem, k is equal to 3. TP i represents the number of samples correctly predicted by the model in the i-th category, and Total Number of Samples represents the total number of samples. Sup(F1), Ref(F1), and NEI(F1) represent the F1 scores of the three categories of entailment, contradiction, and neutrality respectively, and ACC represents the accuracy rate. Among them, Sup(F1) represents the F1 score when the statement is supported; Ref(F1) represents the F1 score when the statement is opposed; NEI(F1) represents the F1 score when the statement is neutral. ALL(F1) and Macro F1 both represent the average of the three F1 scores of Sup(F1), Ref(F1), and NEI(F1), that is, the overall F1 score.

[0103] For example, assume there are 100 samples, as shown in Table 1. Table 1 is a table of the corresponding sample quantities of the true labels and predicted labels. Among them, Category 1 means the statement is supported; Category 2 means the statement is opposed, and Category 3 means the statement is neutral.

[0104] Table 1

[0105] True category \ Predicted category Category 1 Category 2 Category 3 Category 1 30 2 1 Category 2 1 25 3 Category 3 2 1 35

[0106] Then, the F1 score of Category 1 is The F1 score of Category 2 is The F1 score of Category 2 is Then Accuracy rate

[0108] Such as Figure 4As shown, on the test set, the samples are predicted to determine the declared labels. In the figure, Epoch is a hyperparameter that represents the process of the model training once completely on the entire training dataset. When a model has completed one traversal of the entire training dataset (i.e., all training samples have been used for training once), it is called one Epoch. Preferably, Epoch is set to 4. Finally, the F1 value is calculated, and the F1 value is used as the language model evaluation criterion to record the performance of the language model.

[0109] Based on the table-to-text method of importance evaluation, in order to obtain table content more relevant to the declaration, table data screening and sorting are used, and the table is reordered according to the similarity between the table rows and the declaration. Experiments are conducted on two datasets, namely PubHealthTab and InfoTabS. The common baseline models for these two datasets include RoBERTa+Con, RoBERTa+TemCon, RoBERTa+TemSen, RoBERTa+T5Con, and RoBERTa+T5Tem, all of which use RoBERTa as the pre-trained language model (i.e., the language model). That is, these baseline models enhance the original RoBERTa model by combining different techniques (such as Con, TemCon, TemSen, T5Con, and T5Tem) to meet the requirements of specific tasks.

[0110] To be consistent with the pre-trained model used by the baseline model, RoBERTa is also used. RoBERTa has achieved significant performance improvements in multiple natural language processing tasks. It not only proves the potential of the pre-trained language model but also provides an important optimization direction for subsequent research. Existing methods usually rely on templates to preprocess table evidence or convert tables into text. Such templates usually rely on specific table structures and cannot adapt to complex and diverse table structures. In addition, it also includes connections based on templates and based on T5. The table-to-text method based on importance evaluation in this application can better handle overly long tables, and is more focused on extracting relevant content, reducing the interference of irrelevant rows, and also reducing the computational cost.

[0111] In an exemplary embodiment, a table fact verification device is further provided, including: an acquisition module, configured to acquire a plurality of statements and a corresponding table for each statement; the statement is a custom natural language statement; a calculation and sorting module, configured to, for any statement, sort each table row according to the similarity score between the statement and each table row, and determine the sorted table; the table row represents any row table in the table corresponding to the statement and the content in the row table; a language model module, configured to use the sorted table and the statement as a table fact verification sample; input the table fact verification sample into a trained language model to generate a first matrix and a vector of sample start tokens; the sample start tokens include the start token of the statement and the start token of the sorted table, and the start token of the statement is the same as the start token of the sorted table; an extraction module, configured to extract semantic features between the statement and the sorted table according to the first matrix, the vector of sample start tokens, and a text convolutional neural network with a plurality of different convolutional kernels; a determination module, configured to input the semantic features into a first fully connected layer, output a prediction result corresponding to the statement, and use the prediction results corresponding to each statement as a table fact verification result; the prediction result corresponding to the statement is the probability that the statement is supported by the content in the corresponding table.

[0112] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above method is implemented.

[0113] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0114] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0116] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0117] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0118] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0119] Specific examples are used in the present application to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for verifying tabular facts, characterized in that, including: obtaining a plurality of statements and a corresponding table for each statement; the statement is a custom natural language statement; for any statement, sorting each of the table rows according to the similarity score between the statement and each table row to determine a sorted table; the table row represents any row in the table corresponding to the statement and the content in the row table; using the sorted table and the statement as a table fact verification sample; inputting the table fact verification sample into a trained language model to generate a first matrix and a vector of sample start tokens; the sample start tokens include the start token of the statement and the start token of the sorted table, and the start token of the statement is the same as the start token of the sorted table; extracting semantic features between the statement and the sorted table according to the first matrix, the vector of sample start tokens, and a text convolutional neural network with multiple different convolutional kernels; inputting the semantic features into a first fully connected layer to output a prediction result corresponding to the statement; the prediction result corresponding to the statement is the probability that the statement is supported by the content in the corresponding table; using the prediction results corresponding to each statement as the table fact verification results.

2. The table fact verification method according to claim 1, characterized in that Before sorting each of the table rows according to the similarity score between the statement and each table row to determine a sorted table, it further includes: calculating the similarity score between the statement and each table row using cosine similarity; the similarity score is: Among them, cls represents the start tag; The cls represented indicates the vector; The cls represented indicates the vector of the i-th row of the table; Claim represents the claim; Row i Indicates the i-th row of the table; |||| represents the second norm; Indicates the similarity score between the i-th row of the table and the claim; sim() represents the similarity function.

3. The table fact verification method according to claim 1, characterized in that, extracting semantic features between the statement and the sorted table according to the first matrix, the vector of sample start tokens, and a text convolutional neural network with multiple different convolutional kernels, specifically including: determining a first fusion vector according to the first matrix and a text convolutional neural network with multiple different convolutional kernels; inputting the vector of sample start tokens into a second fully connected layer to obtain a vector of the sample; concatenating the vector of the sample and the first fusion vector to obtain a second fusion vector; using the second fusion vector as the semantic features.

4. The table fact verification method according to claim 3, wherein Determining a first fusion vector according to the first matrix and a text convolutional neural network with multiple different convolutional kernels, specifically including: after inputting the first matrix into a text convolutional neural network with multiple different convolutional kernels and passing through a pooling layer, outputting a second matrix; obtaining a transposed matrix according to the second matrix, a third fully connected layer, and an activation function; concatenating vectors obtained by performing dimensionality reduction and normalization processing on the transposed matrix to obtain a first fusion vector.

5. The table fact verification method according to claim 1, characterized in that, Sorting each of the table rows according to the similarity score between the statement and each table row to determine a sorted table, specifically including: sorting the similarity scores in descending order to obtain a sorted table.

6. The table fact verification method according to claim 1, characterized in that Before inputting the table fact verification sample into a trained language model to generate a first matrix and a vector of sample start tokens, it further includes: constructing a language model; inputting historical table fact verification samples into the language model to generate a historical first matrix and a vector of historical sample start tokens; Based on the historical first matrix and the vector of the historical sample start marker, and a text convolutional neural network with multiple different convolutional kernels, extract the historical semantic features between the historical claim and the historically sorted table; Input the historical semantic features into the first fully connected layer to output the historical prediction result corresponding to the historical claim; Taking minimizing the loss between the historical prediction result and the true prediction result as the goal, train the language model to obtain a trained language model.

7. A table fact verification device, characterized in that, Comprising: An acquisition module for acquiring a plurality of claims and the table corresponding to each claim; the claim is a custom natural language claim; A calculation and sorting module for, for any claim, sorting each table row according to the similarity score between the claim and each table row to determine a sorted table; the table row represents any row table in the table corresponding to the claim and the content in the row table; A language model module for using the sorted table and the claim as a table fact verification sample; inputting the table fact verification sample into the trained language model to generate a first matrix and a vector of the sample start marker; the sample start marker includes the start marker of the claim and the start marker of the sorted table, and the start marker of the claim and the start marker of the sorted table are the same; An extraction module for extracting the semantic features between the claim and the sorted table according to the first matrix and the vector of the sample start marker, and a text convolutional neural network with multiple different convolutional kernels; A determination module for inputting the semantic features into the first fully connected layer to output the prediction result corresponding to the claim, and using the prediction results corresponding to each claim as the table fact verification result; the prediction result corresponding to the claim is the probability that the claim is supported by the content in the corresponding table; 8. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the table fact verification method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the table fact verification method according to any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the table fact verification method according to any one of claims 1-6.