Answer generation device and program
By combining multiple single-answer models and using token frequency analysis with thresholds, the system effectively addresses the challenge of extracting multiple answers, improving accuracy in question answering systems.
Patent Information
- Application Number
- JP2020038077
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-03-05
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-03-05
AI Technical Summary
Existing question answering systems are limited to extracting single answers and struggle to accurately handle multiple answers, especially when complex machine reading data for multiple-answer questions is not readily available.
A system that combines multiple single-answer models to determine the frequency of token appearances, using two thresholds to identify single or multiple answers based on the concentration of answer ranges, allowing for the extraction of multiple answers by leveraging the dispersed outputs of individual models.
Improves the accuracy of answer extraction by correctly identifying single or multiple answers, enhancing performance in multiple-answer scenarios without relying on specific single-answer models.
Smart Images

Figure 0007562961000009 
Figure 0007562961000010 
Figure 0007562961000011
Abstract
Description
[Technical field]
[0001] The present invention relates to an answer generating device and a program. [Background technology]
[0002] Conventionally, techniques have been proposed for extracting an appropriate answer from a given question and related text.
[0003] Patent Document 1 describes a device that enables a question that can be answered with polarity to be answered with high accuracy using polarity. The machine comprehension unit estimates the start and end of a range in the input text that is the basis for the answer to the question, based on the input text and question, using a pre-trained reading comprehension model for estimating the range. The judgment unit judges the polarity of the answer to the question, based on information obtained by processing of the machine comprehension unit, using a pre-trained judgment model for judging whether the polarity of the answer to the question is positive or not.
[0004] Patent Document 2 describes an apparatus that realizes highly accurate question answering. The apparatus has an answer generating means that receives a document and a question as input and executes a process of generating an answer sentence to a question using words included in a union of a predetermined first vocabulary and a second vocabulary composed of words included in the document and the question, using a trained model. The trained model includes a trained neural network that has previously trained as to whether or not a word included in the answer sentence is included in the second vocabulary, and the trained neural network increases or decreases the probability that a word included in the second vocabulary is selected as a word included in the answer sentence when the answer sentence is generated. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2019-220142 A [Patent Document 2] JP 2019-191827 A Summary of the Invention [Problem to be solved by the invention]
[0006] The present invention aims to provide a technology that, when a question and analysis target data, which is data to be analyzed such as text related to the question, are given, can extract multiple answers to the question from the analysis target data. [Means for solving the problem]
[0007] The invention described in claim 1 includes an input unit for inputting a question and analysis target data, which is data to be analyzed, a processor, and an output unit, and the processor executes a program to output a previously prepared output when the question and the analysis target data are input. A plurality of different single answer models each extracting a single answer from the analysis target data to the question. Answer to the above question using candidate are extracted independently from the analysis target data, and for all tokens included in the analysis target data, A plurality of answer candidates independently extracted from the analysis target data by the plurality of different single answer models Calculate the frequency of occurrence of In the determination process, a first threshold and a second threshold smaller than the first threshold are used, and when the occurrence frequency of the token to be determined is equal to or greater than the first threshold, the token whose occurrence frequency is equal to or greater than the first threshold is determined to be a single answer token and selected; when the occurrence frequency of the token to be determined is less than the first threshold and equal to or greater than the second threshold, the token whose occurrence frequency is less than the first threshold and equal to or greater than the second threshold is determined to be a multiple answer token and selected; when the occurrence frequency of the token to be determined is less than the second threshold, the token is not selected as an answer token; and after the determination process is completed, a token structure consisting of the tokens selected in the determination process is selected. The answer generating device extracts one or more answers and outputs them to the output unit.
[0009] Claim 2 In the invention described in the above, the processor determines whether the determination results are the same for a plurality of consecutive tokens to be determined. and selects a token according to the result of the judgment. If you want to use Select individually Instead, the sequence length is maximized. Consecutive token Select Claims 1 The answer generating device according to the present invention is
[0010] Claim 3 In the invention described in the above, the processor performs a single response to the token to be judged. Token After judging, the next token to be judged is multiple answer token Judged or answered Token If you do not select The aboveSingle Answer Token Only tokens that are determined to be choice do, The above The determination process is terminated. 1 The answer generating device according to the present invention is
[0011] Claim 4 In the invention described in the above, the processor Number The plurality of different Claims 1 to 3 using a single answer model 3 The answer generating device according to any one of the above items.
[0012] Claim 5 The invention described in different Each of the single answer models is a model that encodes the question and the analysis target data into a distributed representation based on a deep learning method, and extracts a maximum probability answer range from the analysis target data based on the encoded distributed representation by a fully connected layer for estimating the start point and end point of the answer. 4 The answer generating device according to any one of the above items.
[0013] Claim 6 The invention described in different Each of the single answer models is trained using training data to which only a single answer is assigned to a question. 5 The answer generating device according to any one of the above items.
[0014] Claim 7 The invention described in claim 1 to claim 2 is characterized in that the analysis target data is text data, and the tokens are words or character strings in the text data. 6 The answer generating device according to any one of the above items.
[0015] Claim 8 The invention described in the above includes a step of inputting data to be analyzed, which is data to be subjected to a question and an analysis, into a computer, and a step of inputting data to be analyzed, which is prepared in advance. Extracting a single answer from the analysis target data for each of the questions A method for answering the question using a plurality of different single answer models candidatefrom the analysis target data, and for all tokens included in the analysis target data, calculating an occurrence frequency of a plurality of answer candidates independently extracted from the analysis target data by the plurality of different single answer models; in a determination process, using a first threshold and a second threshold smaller than the first threshold, when the occurrence frequency of a token to be determined is equal to or greater than the first threshold, determining and selecting the token having the occurrence frequency equal to or greater than the first threshold as a single answer token; when the occurrence frequency of a token to be determined is less than the first threshold and is equal to or greater than the second threshold, determining and selecting the token having the occurrence frequency less than the first threshold and equal to or greater than the second threshold as a multiple answer token; and when the occurrence frequency of a token to be determined is less than the second threshold, not selecting the token as an answer token; Steps and After the determination process is completed, Single or multiple answers Leave and a program for executing the steps of: Effect of the Invention
[0016] Claim 1, 8 According to the invention described in, when a question and analysis target data are given, a plurality of answers to the question can be extracted from the analysis target data.
[0017] Claim 2, 3 to According to the described invention, it is further possible to determine and output whether a single answer, multiple answers, or no answer has been given.
[0018] Claim 4,5 According to the invention described in the above, the accuracy of the answer can be further improved.
[0019] Claim 6 According to the invention described in the above, furthermore, learning data can be secured.
[0020] Claim 7 According to the invention described in the above, it is further possible to extract words or character strings as answers from text data. [Brief description of the drawings]
[0021] [Figure 1] This is an explanatory diagram (part 1) of related texts and questions. [Diagram 2] This is an explanatory diagram (part 2) of related texts and questions. [Diagram 3] FIG. 13 is a graph showing the average number of different answers to single-answer QA and multiple-answer QA. [Figure 4] 1 is a configuration block diagram of a response generating device according to an embodiment; [Diagram 5] FIG. 2 is a functional block diagram of the embodiment. [Figure 6]FIG. 2 is a configuration diagram of a machine reading comprehension model according to an embodiment. [Figure 7] 3 is a process flowchart of the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0022] Hereinafter, an embodiment of the present invention will be described with reference to the drawings, taking text data as an example of analysis target data, which is data that is the subject of analysis.
[0023] <Basic principle> First, the basic principle of this embodiment will be described.
[0024] Machine comprehension tasks aim to understand a given text and answer questions, and are important tasks for benchmarking the reading comprehension capabilities of models. For example, in extractive machine comprehension such as SQuAD (Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100,000+ questions for machine comprehension of text. In EMNLP, 2016.), when a question and related text (context) are given, the most appropriate answer is extracted from the context.
[0025] Figure 1 shows an example of a question and related text (Context). “Russel” is extracted from the related text as an appropriate answer to the question.
[0026] However, previous extractive machine comprehension techniques have been limited to question-answering in which the correct answer to a question is based on a single answer range (hereinafter referred to as "single-answer QA"), and cannot handle question-answering in which multiple answers are possible at the same time.
[0027] On the other hand, several models have been proposed to extract appropriate answers without excess or deficiency in order to extract answers in multiple ranges. However, all of these models are based on the premise that they are trained using machine reading comprehension data with multiple answer Q&A, and it is not realistic to always prepare such complex data.
[0028] When a model that allows only a single answer (hereinafter referred to as a "single answer model") is applied, the answer estimated by the model is always limited to one. The applicant of the present application applied several single answer models to multiple answer QA and found that the answers output by each model were dispersed.
[0029] Figure 2 shows an example of a single-answer QA and an example of a multiple-answer QA. The top row in Figure 2 shows related text, the middle row shows answers from a single-answer model, and the bottom row shows answers from multiple (specifically, 10) single-answer models. The single-answer model extracts "50" as the answer, but the multiple single-answer models extract "100 peso note" and "500 peso notes" as answers, resulting in a dispersion of answers.
[0030] Similarly, when comparing the degree of agreement of answers for each model in single / multiple answer QAs, it can be seen that the degree of agreement of answers tends to be higher in single answer QAs.
[0031] Figure 3 shows the degree of agreement between single-answer QA and multiple-answer QA. In Figure 3, DROP (single-span) shows single-answer QA, and DROP (multi-span) shows multiple-answer QA. The vertical axis shows the average number of different answers, and the number of differences is set to 1 when the answers estimated by each model are a perfect match. Each model has BiDAF:(Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603, 2016.) QANet:(Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V Le. Qanet: Combining local convolution with global self-attention for reading comprehension. arXiv preprint arXiv:1804.09541, 2018.) BERT BASE :(Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.) BERT LARGE :(Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.) It is.
[0032] The single-answer QA models are 10 single-answer QA models that were trained in advance. As shown in Figure 3, the single-answer QA has a smaller average number of different answers and a higher degree of agreement between answers. This is due to the constraint that each single-answer QA model outputs only one answer that it considers to be optimal. Therefore, when multiple answers are scattered in the context, the answers of each model often do not match.
[0033] Therefore, in this embodiment, the property that the answers of multiple single-answer QA models do not particularly match in multiple-answer QA is utilized. Specifically, a model that allows multiple answers is realized by combining multiple models that can only allow a single answer.
[0034] The specific model is as follows:
[0035] SQuAD, a typical dataset for extractive machine comprehension, aims to extract the most appropriate answer from the given context for a question, and many models have already been reported to exceed human comprehension. SQuAD2.0 (Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don't know: Unanswerable questions for SQuAD. In ACL, 2018.) added new questions to answer questions that cannot be answered if the answer to the question does not exist in the context. DROP (Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs. In NAACL, 2019.) added questions to consider the extraction of multiple answer ranges (multiple answer QA), which had not been addressed before. SQuAD2.0 has two patterns: a single answer or no answer, but DROP asks for any number of answers greater than one, so it can be said that DROP is a dataset that requires a greater variety of answer patterns.
[0036] A multi-answer model by Hu et al. (Minghao Hu, Yuxing Peng, Zhen Huang, and Dongsheng Li. A multi-type multi-span network for reading comprehension that requires discrete reasoning. In EMNLP-IJCNLP, 2019.) predicts how many answers there are in the context for a question, and iteratively extracts the answer range based on the predicted number of answers, showing that it is possible to answer multiple-answer questions in DROP. Efrat et al. (Avia Efrat, Elad Segal, and Mor Shoham. Tag-based multi-span extraction in reading comprehension. arXiv preprint arXiv:1909.13375, 2019.) considers answer extraction as a sequence labeling problem and proposes Multi-span Head, which assigns BIO tags to each token. Here, a "token" is the smallest component of a sentence, such as a word or a string. Although these models are capable of multiple answers, it is necessary to prepare sufficient machine reading comprehension data, including multiple answer QAs, in advance for training.
[0037] Therefore, this embodiment requires only a dataset of extraction-type machine comprehension that targets only a single answer, and by combining multiple simple models that can only give a single answer, it is possible to answer multiple-answer QAs. This embodiment can be said to utilize the property that the answers of multiple models that can only give a single answer do not particularly match in multiple-answer QAs.
[0038] This embodiment will be described in more detail below.
[0039] <Configuration> FIG. 4 is a block diagram showing the configuration of the answer generating device in this embodiment.
[0040] The answer generating device is configured as a computer, and includes a processor 10, a ROM 12, a RAM 14, an input section 16, an output section 18, and a model storage section 20.
[0041] The processor 10 realizes a machine reading comprehension task by reading a processing program stored in the ROM 12 or other program memory and executing it using the RAM 14 as a working memory. The processor 10 extracts appropriate single or multiple answers to the question from the related text using a trained model stored in the model storage unit 20 based on the input related text and question.
[0042] The input unit 16 is composed of a keyboard, a communication interface, etc., and is used to input the related text 22 and the question 24. The related text 22 and the question 24 are basically text data, but may be image data. In the case of image data, it is converted into text data using OCR (Optical Character Recognition) technology.
[0043] The output unit 18 is composed of a display, a communication interface, etc., and outputs the results of the machine reading comprehension task performed by the processor 10, that is, the answers extracted from the relevant text.
[0044] The model storage unit 20 stores N different single answer models. The N different single answer models are trained models trained in advance using only a dataset of single answer QA. The single answer model can be, for example, a well-known BERT (Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.), but is not limited thereto. The single answer model will be described further below.
[0045] The processor 10 refers to a processor in a broad sense, and includes a general-purpose processor (e.g., a CPU (Central Processing Unit) and a dedicated processor (e.g., a GPU (Graphics Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), a programmable logic device, etc.). The operation of a processor may not only be performed by a single processor, but may also be performed by multiple processors located at physically separate locations working together.
[0046] FIG. 5 illustrates functionally the machine-readable process executed by processor 10.
[0047] The processor 10 inputs related text 22 and a question 24. The related text 22 is arbitrary, but may be, for example, “In the first quarter, Cincinnati trailed early as Patriots kicker Stephen Gostkowski got a 31-yard field goal, while QB Tom Brady completed a 1-yard TD pass to LB Mike Vrabel.(…) QB Carson Palmer completing a 1-yard TD pass to LB Mike Vrabel.(…)” Question 24 is also optional, but for example, “Which two players both completed 1-yard TD pass?” Note that the question may not be limited to a single correct answer, but may include multiple correct answers (the above question has two correct answers).
[0048] The machine reading comprehension model 26 is a set of N different single-answer models (M = {m1, . . . , m N}), and these single answer models are trained in advance using only single answer QAs. When the well-known BERT is used as the single answer model, for example, the question Q and related text (context) are input and trained to output a probability distribution representing the start and end points of the answer. N independent answer candidates are obtained from N different single answer models. Each answer candidate is a probability distribution representing the start and end points. In FIG. 5, from the machine reading comprehension model 26, "Brady" "Tom" "Carson Palmer" "Tom Brady completed" ... "Palmer" etc. indicate that a token at the start and end points, i.e. a word or character string, has been output. The N independent answer candidates from the N different single answer models are provided to the RC-Rewriter 28 .
[0049] The RC-rewriter 28 includes a single / multiple answer selection unit 30 that selects which answer should ultimately be adopted from N independent answer candidates. The single / multiple answer selection unit 30 determines that if the answer range is concentrated in a specific token (character string or word string) in the related text (context), the target token is a single answer, whereas if the answer range is distributed across multiple tokens, it is multiple answers, and selects an answer. In FIG. 5, it is determined that the answer range is distributed across multiple tokens, and multiple answers are selected as the final answer. "Tom Brady" "Carson Palmer" It is possible to determine whether the answer range is concentrated in a specific token or dispersed among multiple tokens by calculating the degree of agreement of the answers and comparing the degree of agreement of the answers with a preset threshold value.
[0050] FIG. 6 shows a schematic diagram of a machine reading comprehension model 26. The machine reading comprehension model 26 is a set of N different single answer models M={m 1, m 2, , mN}, and each model is trained using only the single-answer QA dataset. In the BERT-based single-answer model, when a question Q and a context C are given, x = [CLS]Q[SEP]C[SEP] Let x be the input to BERT. Here, [CLS] is a token that represents the representation of the entire sentence pair, and [SEP] is a token that explicitly divides the input pair. Therefore, by inputting x to BERT, a d-dimensional distributed representation H H.R. d×L is obtained. To extract the answer range, two types of fully connected layers are used to calculate the probability distribution for predicting the start and end points of the answer based on the following formula.
[0051]
number
[0052]
number
[0053] where Ws,We are weight matrices, and bs,be are bias terms.
[0054] Finally, the single response model m i The answer is calculated by dividing the tokens with the maximum pstart and pend by the start and end points of the answer. i Extract.
[0055] In this way, the extraction of answers is based on the maximum value of the probability distribution, so the single answer model m i always extracts only one answer, regardless of the number of answers latent in the context C. The N different single answer models of the machine reading comprehension model 26 output N independent answer candidates to the RC-rewriter 28 in the above manner.
[0056] The single / multiple answer selection unit 30 of the RC-rewriter 28 determines that the target token is a single answer if the answer range is concentrated in a specific token in the context C, and that it is multiple answers if the answer range is distributed among multiple tokens, and selects an answer.
[0057] Specifically, to calculate the degree of agreement between each answer, we first calculate the frequency with which each token appears in answer candidate a for all tokens T = {t1, t2, ...} included in context C.
[0058] The frequency fi at which token t1 appears in answer candidate a is calculated using the following formula:
[0059]
number
[0060]
number
[0061] By applying this calculation to all tokens in context C, we obtain a sequence F = {f1, f2, ...} that represents the frequency with which each token appears in answer candidate a.
[0062] Next, while referring to the frequency F of occurrence of each token in the answer candidates, a final answer a is obtained based on two preset thresholds, a threshold u and a threshold l, where u>l and u≧0.5×N.
[0063] More specifically, all tokens in the context C are selected based on the following operations.
[0064] Operation 1:f i If ≧u, then t i is determined to be a single answer token and added to the final answer (single answer QA) Operation 2: u>f i If ≧l, then t iis determined to be a multiple answer token and added to the answer (multiple answer QA) Operation 3:l>f i If t i is not an answer token By performing the above operations 1 to 3, a single answer or multiple answers can be obtained as the final answer. for example, u=0.9×N l=0.2×N Then, the occurrence frequency f i ≧0.9×N, that is, if the degree of match is 90% or more, it is a single-answer QA. Also, the occurrence frequency f i 0.9>f i ≧0.2N, that is, if the degree of agreement is less than 90% and more than 20%, it becomes a multiple answer question. i If the match was >0.2 × N, i.e., less than 20%, then no response was determined.
[0065] In addition, in operation 1 or operation 2, when the same operation is repeated for multiple consecutive tokens T, each token is not added individually to the final answer, but the token with the longest sequence is added to the final answer.
[0066] Also, t j After performing operation 1 on t j+1 If the processing for is other than operation 1, the token sequence obtained in operation 1 is added to the final answer as a single answer, and answer selection is terminated.
[0067] In the single / multiple answer selection unit 30 of the RC-Rewriter 28, the answer candidates extracted by the machine reading comprehension model 26 are reconstructed based on the frequency of each token, as shown in FIG. "Tom" "Brady" From the separately extracted tokens "Tom Brady" The answer can be constructed as follows.
[0068] <Processing Flowchart> 7 is a process flowchart of this embodiment. The processes in S101 to S103 are a model learning process, and the processes in S104 to S107 are an answer creation process using the learned model.
[0069] First, a plurality of N single answer models are prepared (S101). The number N and type of single answer models are arbitrary, but for example, 20 single answer models based on BERT are prepared. The single answer models may be of the same type or different types.
[0070] Next, each of the prepared single answer models is trained using only the single answer QA dataset (S102). That is, a question and related text (context) are input, and the model is trained to output a probability distribution representing the start and end points of the answer. The trained model is stored in the storage unit (S103). After the training process is completed, the process proceeds to the answer creation process.
[0071] First, the relevant text and the question are input (S104).
[0072] Next, an answer is output (S105) using the trained model stored in the storage unit, that is, machine reading comprehension model 26. The N single answer models of machine reading comprehension model 26 output N independent answer candidates.
[0073] Next, the RC-rewriter 28 selects single / multiple answers from the N answers output from the machine reading comprehension model 26 (S106). That is, based on the following judgment operation using two thresholds u and l, all tokens t in the context are selected. i Select the following. Operation 1:f i If ≧u, then t i is determined to be a single answer token and added to the final answer (single answer QA) Operation 2: u>f i If ≧l, then t i is determined to be a multiple answer token and added to the answer (multiple answer QA) Operation 3:l>f i If ti is not an answer token When single / multiple answers or no answer are selected in this manner, the selection result is output as the final answer (S107). EXAMPLES
[0074] For the dataset, we used the extraction-type machine reading comprehension included in DROP (Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs. In NAACL, 2019.) as a single-answer QA (single-span) and multiple-answer QA (multi-span) with two or more answers. Note that the multiple-answer QA from DROP was not used as training data, but was used only for evaluation. Therefore, only DROP (single-span) was used for training.
[0075] Table 1 shows the statistics of the single / multiple answer QAs used in the examples.
[0076] [Table 1]
[0077] BiDAF, QA Net We used BERT, a pre-trained model. BASE and BERT LARGE was used. We pre-trained 20 models with different seeds for use as machine reading comprehension models26 using Adam optimization. Table 2 shows the parameters used in each model.
[0078] [Table 2]
[0079] In addition, we set two thresholds for the frequency of each token when selecting an answer in RC-Rewriter28. u=0.9N l=0.2N In addition, N corresponds to the number of models used in the machine reading comprehension model 26. N=20 It is.
[0080] <Comparative Example> On the other hand, as a comparative example, we prepared a single answer model as a baseline, trained under the same conditions as the model prepared as the machine reading comprehension model26. In addition, we prepared Oraclesingle as the upper limit of performance for the single answer model. In Oraclesingle, from among multiple true answers assigned to each question, the answer with the highest F1 value is extracted.
[0081] Following Dua et al., we used EM (Exact Match) and F1 (macro-averaged) modified for evaluating DROP. With EM, the evaluation value is 1 when all answers included in the correct answer perfectly match the answers predicted by the model. In addition, F1 aligns the correct answer and the predicted answer, calculates F1 for all combinations, and then performs normalization, so the evaluation value is maximized by obtaining multiple answers without excess or deficiency.
[0082] Table 3 shows the results of DROP's multiple-span QA.
[0083] [Table 3]
[0084] As shown in Table 3, when comparing the baseline single-answer model with the method using RC-rewriter 28, we confirmed that F1 improved by approximately 10 points for all models.
[0085] Furthermore, since the single-answer model extracts only one answer, EM = 0 for all models including Oraclesingle. On the other hand, it was confirmed that the method of the embodiment can correctly extract all answers in the context in up to 5.61% of multiple-answer QAs.
[0086] As described above, in this embodiment, it is possible to significantly improve performance in multiple answer QA without relying on a specific single answer model.
[0087] <Variation 1> The number and types of single answer models used as the machine reading comprehension model 26 in this embodiment can be set arbitrarily.
[0088] The applicant of the present application has confirmed that performance improves by increasing the number of models, compared to the condition where the number of single-answer models is minimized (N=1). At the same time, it has also been confirmed that performance tends to decrease when the number of models increases too much. Therefore, although it is necessary to prepare a certain number of single-answer models to solve multiple-answer Q&A, performance improvement cannot be expected by increasing the number of models indefinitely, and it is desirable to set an appropriate number. In general, the number is equal to or greater than the desired number of answers, and may be equal to or less than an upper limit set according to the desired number of answers.
[0089] Furthermore, in this embodiment, it is preferable that the single response models are not of the same type, but that different types of single response models are combined.
[0090] Table 4 shows the results of comparing the different single-response models with and without combinations.
[0091] [Table 4]
[0092] In Table 4, in order to standardize the number of single-answer models among the models being compared, the number of models in each combination model was set to 5, for a total of 20 single-answer models. In multi-span, when comparing the combination model with the same type of single-answer model, we confirmed that the performance improved by 0.54 points in EM and 2.9 points in F1.
[0093] In light of the above, it can be said that in order to improve the accuracy rate of multiple-answer QA, it is desirable to combine various types of single-answer models as the machine reading comprehension model26, rather than using only the single-answer model with the highest performance.
[0094] <Variation 2> In this embodiment, the data to be analyzed is text data such as related text, but the present invention can be applied to other data formats such as image data. When the data to be analyzed is image data, pixels can be used as tokens. [Explanation of symbols]
[0095] 10 processor, 12 ROM, 14 RAM, 16 input section, 18 output section, 20 model memory section, 22 related text (context), 24 questions.
Claims
1. an input unit for inputting analysis target data that is data that is the subject of a query and analysis; A processor; An output unit; The processor executes a program to extracting answer candidates to the question from the analysis target data independently using a plurality of different single answer models, each of which extracts a single answer from the analysis target data to the question, that have been prepared in advance when the question and the analysis target data are input; calculating an occurrence frequency of each token in a plurality of answer candidates independently extracted from the analysis target data by the plurality of different single answer models for all tokens included in the analysis target data, and in a determination process, using a first threshold and a second threshold smaller than the first threshold, when the occurrence frequency of the token to be determined is equal to or greater than the first threshold, determining and selecting the token whose occurrence frequency is equal to or greater than the first threshold as a single answer token, when the occurrence frequency of the token to be determined is less than the first threshold and is equal to or greater than the second threshold, determining and selecting the token whose occurrence frequency is less than the first threshold and is equal to or greater than the second threshold as a multiple answer token, and when the occurrence frequency of the token to be determined is less than the second threshold, not selecting the token as an answer token, After the determination process is completed, a single answer or multiple answers constituted by the tokens selected in the determination process are extracted and output to the output unit. Answer generator.
2. The processor, When the judgment result is the same for a plurality of consecutive tokens to be judged, and a token is selected in accordance with the judgment result, the consecutive tokens with the longest sequence length are selected instead of selecting each token individually. The answer generating device according to claim 1 .
3. The processor, after determining that the token to be determined is a single answer token, if the next token to be determined is determined to be a multiple answer token or is not selected as an answer token, select only the token determined to be the single answer token and terminate the determination process; The answer generating device according to claim 1 .
4. The processor, using the plurality of different single answer models in a number equal to or greater than the number of answers of the plurality of answers; The answer generating device according to any one of claims 1 to 3.
5. Each of the plurality of different single answer models is a model that encodes the question and the analysis target data into a distributed representation based on a deep learning method, and extracts a maximum probability answer range from the analysis target data based on the encoded distributed representation by a fully connected layer for estimating a start point and an end point of the answer. The answer generating device according to any one of claims 1 to 4.
6. Each of the plurality of different single answer models is trained using training data in which only a single answer is given to a question. The answer generating device according to any one of claims 1 to 5.
7. The analysis target data is text data, The token is a word or a character string in the text data. The answer generating device according to any one of claims 1 to 6.
8. On the computer, inputting data to be analyzed, which is data to be subjected to queries and analysis; extracting answer candidates to the question from the analysis target data independently using a plurality of different single answer models prepared in advance, each of which extracts a single answer from the analysis target data to the question; a step of calculating an occurrence frequency of each token in a plurality of answer candidates independently extracted from the analysis target data by the plurality of different single answer models for all tokens included in the analysis target data, and in a determination process, using a first threshold and a second threshold smaller than the first threshold, determining and selecting a token having an occurrence frequency equal to or greater than the first threshold as a single answer token when the occurrence frequency of a token to be determined is equal to or greater than the first threshold, determining and selecting a token having an occurrence frequency equal to or greater than the first threshold as a multiple answer token when the occurrence frequency of a token to be determined is less than the first threshold and equal to or greater than the second threshold, and selecting a token having an occurrence frequency equal to or less than the first threshold as a multiple answer token when the occurrence frequency of a token to be determined is less than the first threshold and equal to or greater than the second threshold, and not selecting a token as an answer token when the occurrence frequency of a token to be determined is less than the second threshold; After the determination process is completed, outputting one or more answers composed of tokens selected in the determination process; A program that executes the following.
Citation Information
Patent Citations
Question word weight calculation apparatus, question answer retrieval apparatus, question word weight calculation method, question answer retrieval method, program and record medium
JP2019008367A
Question answering device, question answering method and program
JP2019191827A
Answer learning device, answer learning method, answer generating device, answer generating method, and program
JP2019220142A
