Model training device, model training method, and computer program
The use of multiple neural networks and enhanced background knowledge extraction improves the accuracy of causal relationship determination, addressing context mismatches and achieving superior performance in identifying causal relationships.
Patent Information
- Application Number
- JP2020058332
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-03-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-03-27
AI Technical Summary
Existing methods for determining causal relationships in natural language processing face challenges in achieving high accuracy due to context mismatches, and there is a need for improved machine learning models to enhance the precision of causal relationship determination.
A model training device and machine learning model utilizing multiple neural networks, including BERTs, to extract various types of background knowledge, generate training data, and perform fine-tuning to improve the accuracy of causal relationship determination by incorporating synonyms, binary patterns, and evaluator feedback.
The proposed method significantly enhances the F-measure and average precision in determining causal relationships, outperforming conventional techniques by up to 2.2 in F-measure and 3.0 in average precision.
Smart Images

Figure 0007550432000022 
Figure 0007550432000014 
Figure 0007550432000006
Abstract
Description
[Technical field]
[0001] The present invention relates to a training device for a machine learning model, and in particular to a machine learning model that determines whether a causal relationship candidate is appropriate as a causal relationship, and a device that trains the machine learning model. [Background technology]
[0002] Causal relationships between events, such as "smoking cigarettes → dying of lung cancer" (hereafter simply referred to as "causal relationships"), have been considered basic knowledge for language understanding. For this reason, much research has been done on causal relationships, and they have been applied to various natural language applications. Therefore, determining causal relationships with high accuracy is an essential technology for natural language processing.
[0003] Additionally, some researchers are attempting to derive new causal relationships (here called "scenario") such as "global warming progresses → ocean temperature rises → contamination by Vibrio parahaemolyticus occurs" by linking the two causal relationships of "global warming progresses → ocean temperature rises → contamination by Vibrio parahaemolyticus occurs." The relationship between climate change caused by human actions and contamination by Vibrio was first reported in the Baltic Sea in 2013, but a scenario generated using the above method from text collected from the web in 2007 (which did not contain any description of the above relationship) already contained a description of the above relationship. This example also shows that the technology for generating scenarios from causal relationships is useful.
[0004] In other words, by linking known causal relationships, new causal relationships can be discovered. This can be used as very useful information when making decisions.
[0005] However, in generating scenarios, it is necessary to avoid mismatches in context, which is the biggest challenge. For example, if you chain the causal relationships of "receiving light with solar panels → consuming energy" and "consuming energy → restoring human cells," you will get a strange scenario. This is a problem that occurs because the contexts surrounding these causal relationships do not match each other.
[0006] Non-Patent Document 1, which will be described later, proposes a solution to these problems. The method of recognizing causal relationships disclosed in Non-Patent Document 1 uses the BERT (Bidirectional Encoder Representations from Transformers) model (hereinafter, simply referred to as "BERT"). BERT is a model that includes multiple transformer models internally, and can perform pre-learning from a large amount of text without a teacher. Furthermore, it is said that high accuracy can be obtained even with a relatively small amount of teacher data for a specific task by performing training called fine tuning for that task.
[0007] In Non-Patent Document 1, three types of fine-tuning methods are proposed after pre-training BERT with text containing a large amount of causal relationships. In one of these methods, as input data for fine-tuning BERT, a causal relationship candidate, a label by an evaluator indicating whether the causal relationship candidate is appropriate as a causal relationship, and information indicating background knowledge are given. There are three evaluators, and a separate softmax layer is provided for each evaluator to receive the same BERT output, and BERT and each softmax layer are trained. At this time, the labels by each evaluator are used as training data, and each evaluator is trained using a separate softmax layer. After training of BERT and the three softmax layers is completed in this way, the output of the combination of BERT and each of the three softmax layers is calculated according to the input, and the average of these is the final result. The background knowledge used is that described in Non-Patent Document 2. This background knowledge includes binary patterns, answers obtained from a why-type question-answering system, and sentences containing clue words.
[0008] A binary pattern is the shortest path that connects a noun phrase in the cause part of a causal relationship (hereafter referred to as "cause noun") with a noun phrase in the result part (hereafter referred to as "result noun") in the dependency structure of text collected from the web. For example, in the case of a causal relationship "A causes B," A is the cause noun and B is the result noun. Combinations of cause nouns and result nouns that occur with such binary patterns (for example, "cigarettes" and "lung cancer") strongly suggest the existence of a causal relationship. In a binary pattern, the cause noun is replaced with some variable that represents it (for example, "A"), and the result noun is replaced with some variable that similarly represents it (for example, "B").
[0009] An answer obtained from a why-type question-answering system refers to a question automatically generated from the result part of a causal relationship, such as "Why do people die from lung cancer?", and an answer obtained from an existing why-type question-answering system, such as "Because they smoke."
[0010] In addition, the cause part of a causal relationship is generally in the form of "cause noun + predicate of the cause part", and the result part is generally in the form of "result noun + predicate of the result part".
[0011] A sentence containing a clue word is a sentence in which a cause noun and a result noun are linked by a clue word such as "tame" (to be) or "kara" (from) which is a conjunction that is said to express a causal relationship.
[0012] According to Non-Patent Document 1, in an experiment using BERT trained using such information, the F-measure value and average precision were higher than those of conventional techniques, and the F-measure value in particular was significantly higher than those of conventional techniques. Here, the F-measure and average precision are indices as to whether the obtained expression of causal relationship is appropriate as a causal relationship, and the higher the value, the higher the accuracy. [Prior art documents] [Non-patent literature]
[0013] [Non-Patent Document 1] Kazuma Kadowaki, Ryu Iida, Kentaro Torisawa, Jong-Hoon Oh, and Julien Kloetzer. 2019. Event causality recognition exploiting multiple annotators’ judgments and background knowledge. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5816-5822, Hong Kong, China. Association for Computational Linguistics. [Non-Patent Document 2] Canasai Kruengkrai, Kentaro Torisawa, Chikara Hashimoto, Julien Kloetzer, Jong-Hoon Oh, and Masahiro Tanaka. 2017. Improving event causality recognition with multiple background knowledge sources using multi-column convolutional neural networks. In Proceedings of the 31st AAAI Conference on Artificial Intelligence, pages 3466-3473. [Non-Patent Document 3] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin (2017). Attention is All You Need. In Proceedings of the 31st Neural Information Processing Systems Conference (NIPS), pp. 5998-6008.
Non-Patent Document 4
Non-Patent Document 5
[0014] The technology described in Non-Patent Document 1 has the excellent effect of showing a higher F-measure and precision rate than conventional technologies. However, as mentioned above, in this field, a model for determining causal relationships that shows higher performance is always required. For this purpose, it is necessary to search for a more desirable machine learning model to be used for the determination and to train the machine learning model appropriately.
[0015] Therefore, an object of the present invention is to provide a model training device and a machine learning model capable of training a machine learning model so as to determine causal relationships with higher accuracy than conventional methods. [Means for solving the problem]
[0016] A model training device according to a first aspect of the present invention is a model training device for training a machine learning model, the machine learning model including a plurality of neural networks and a classification layer that outputs a classification result based on the output of the plurality of neural networks, the model training device including background knowledge extraction means that extracts a plurality of types of background knowledge related to causal relationships from each of a plurality of causal relationship candidates, each of the plurality of types of background knowledge being associated with a different one of the plurality of neural networks, and a training data generation means that generates, for each of the plurality of causal relationship candidates, training data that combines the causal relationship, the background knowledge, and an evaluation result related to the causal relationship candidate for each of the plurality of types of background knowledge extracted from the causal relationship candidate, and a training means that trains the machine learning model using an output of the classification layer when the training data obtained for the plurality of types of background knowledge from the causal relationship candidates is input to the plurality of neural networks and the evaluation result of the training data.
[0017] Preferably, the multiple neural networks include multiple BERTs of identical configuration to each other.
[0018] More preferably, the background knowledge extraction means includes: a synonym acquisition means for extracting a cause noun and a result noun from each of the multiple causal relationship candidates and acquiring synonyms for each of the cause noun and the result noun; a synonymous binary pattern extraction means for extracting from the document archive a binary pattern connecting any combination of a synonym of the cause noun acquired by the synonym acquisition means and a synonym of the result noun; a causal relationship storage means for storing the causal relationship; and a synonymous causal relationship extraction means for extracting from the causal relationship storage means a causal relationship having one of the synonyms of the cause noun acquired by the synonym acquisition means and one of the synonyms of the result noun.
[0019] More preferably, the model training device further includes an evaluation result storage means for storing evaluation results by the multiple evaluators, and a majority decision result storage means for storing evaluation results by a majority decision of the evaluation results by the multiple evaluators, and the training data generation means includes evaluator-specific training data generation means for generating, for each of the multiple causal relationship candidates, for each of the evaluation results by the multiple evaluators for the causal relationship candidate, training data that combines the causal relationship candidate, the background knowledge, an identifier indicating the evaluator, and an evaluation result by each evaluator represented by an identifier related to the causal relationship candidate, for each of the multiple types of background knowledge extracted from the causal relationship candidate, and training data that combines the causal relationship candidate, the background knowledge, an identifier indicating the evaluation result by majority decision for the causal relationship candidate, and the evaluation result by majority decision for the causal relationship candidate, for each of the multiple types of background knowledge extracted from the causal relationship candidate.
[0020] A machine learning model according to a second aspect of the present invention is a machine learning model trained by any of the model training devices described above.
[0021] A computer program according to a third aspect of the present invention causes a computer to function as each of the means of any one of the above-mentioned devices.
[0022] The above and other objects, features, aspects and advantages of the present invention will become apparent from the following detailed description of the invention taken in conjunction with the accompanying drawings. [Brief description of the drawings]
[0023] [Figure 1] FIG. 1 is a diagram showing a schematic diagram of the process of generating a scenario from causal relationships. [Diagram 2] FIG. 2 is a diagram showing a schematic configuration of background knowledge used in Non-Patent Document 1. In FIG. [Diagram 3] FIG. 3 is a diagram illustrating a configuration of a machine learning model based on BERT used in Non-Patent Document 1. [Figure 4]FIG. 4 is a diagram showing a schematic configuration of background knowledge used in the first embodiment of the present invention. [Diagram 5] FIG. 5 is a diagram illustrating a schematic configuration of a machine learning model using multi-BERTs used in the first embodiment. [Figure 6] FIG. 6 is a block diagram showing a configuration of the machine learning model training device according to the first embodiment. [Figure 7] FIG. 7 is a block diagram showing the configuration of the background knowledge extraction unit 242 shown in FIG. [Figure 8] FIG. 8 is a block diagram showing a configuration of a causal relationship determining device using a multi-BERT trained by the machine learning model training device according to the first embodiment. [Figure 9] FIG. 9 is a diagram showing, in a table format, the performance of a causal relationship determination device trained by the machine learning model training device according to the first embodiment compared with the performance according to the conventional technology. [Figure 10] FIG. 10 is a block diagram showing a configuration of a machine learning model training device according to the prior art. [Figure 11] FIG. 11 is a diagram illustrating a schematic configuration of the scenario determination unit illustrated in FIG. [Figure 12] FIG. 12 is a block diagram showing a configuration of a machine learning model training device according to the second embodiment of the present invention. [Figure 13] FIG. 13 is a diagram illustrating a schematic configuration of the scenario determination unit illustrated in FIG. [Figure 14] FIG. 14 is a diagram showing, in a table format, the performance of the multi-BERT trained by the machine learning model training device according to the second embodiment of the present invention in comparison with the conventional technology. [Figure 15] FIG. 15 is a diagram illustrating a conventional technique for calculating a score of a scenario. [Figure 16] FIG. 16 is a diagram illustrating a scenario calculation method according to the third embodiment of the present invention. [Figure 17] FIG. 17 is a diagram illustrating a scenario calculation method according to the fourth embodiment of the present invention. [Figure 18] FIG. 18 is a flowchart representing a control structure of a program implementing the scenario score calculation method according to the third embodiment of the present invention. [Figure 19] FIG. 19 is a flowchart showing a control structure of a program implementing the scenario score calculation method according to the fourth embodiment of the present invention. [Figure 20] FIG. 20 is a flowchart showing a control structure of another program implementing the scenario score calculation method according to the fourth embodiment of the present invention. [Figure 21] FIG. 21 is a diagram showing, in a table format, the accuracy of scenario calculation by the scenario calculation methods according to the third and fourth embodiments of the present invention. [Figure 22] FIG. 22 is an external view of a computer system for implementing the apparatus and method according to each embodiment of the present invention. [Figure 23] FIG. 23 is a hardware block diagram of the computer shown in FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] In the following description and drawings, the same parts are given the same reference numerals, and therefore detailed descriptions thereof will not be repeated.
[0025] 1st prior art 1. Scenario Generation A general flow of scenario generation is shown in Fig. 1. Referring to Fig. 1, a scenario generation system 50 includes a causal relationship acquisition unit 62 that collects causal relationships from a web 60, and a scenario generation unit 64 that generates a causal scenario 66 from the causal relationships collected by the causal relationship acquisition unit 62. The scenario generation unit 64 includes a scenario candidate acquisition processing unit 70 that acquires (generates) a plurality of scenario candidates, and a scenario ranking unit 72 that ranks the plurality of scenario candidates acquired by the scenario candidate acquisition processing unit 70 based on their scores and outputs several scenario candidates with the highest scores as causal scenarios 66.
[0026] The causal relationships may be collected automatically or manually.
[0027] 2. Background knowledge The causal relationship determination described in Non-Patent Document 1 uses background knowledge such as that shown in Figure 2.
[0028] As a causal relationship 90 between events, consider "cause noun + predicate of cause" → "result noun + predicate of result." For example, a combination of "medicine" as the cause noun and "side effect" as the result noun is conceivable. In this case, binary patterns linking the cause noun (medicine) and the result noun (side effect) are extracted from general sentences. These are called binary pattern (BP) background knowledge 92. In addition, questions are automatically generated from combinations of result nouns and result predicates, and binary patterns linking the cause noun and the result noun are extracted from the answers obtained by inputting the questions into a why-type question answering system. These are called WHY background knowledge 94. Finally, binary patterns linking the cause noun and the result noun extracted from a passage with a clue word are extracted. These are called CLUE background knowledge 96.
[0029] This background knowledge is basically extracted from the Web 98. In Non-Patent Document 1, this is used as background knowledge to determine causal relationships.
[0030] 3. Machine Learning Models FIG. 3 shows a schematic configuration of the machine learning model used in Non-Patent Document 1. Referring to FIG. 3, this machine learning model 110 includes a BERT 122 trained to receive an input 120 consisting of a vector and output a judgment result indicating whether or not an input sentence x represented by the input 120 is appropriate as a causal relationship, and a classification layer 124 trained to receive the output of the BERT 122 and output values according to three probability distributions each representing the judgment results of three judges regarding whether or not the input sentence x is appropriate as a causal relationship. Note that the BERT 122 has been pre-trained using a large amount of general documents. The fact that the BERT has been pre-trained is the same in each embodiment described below.
[0031] The input 120 is a vector in which an input sentence x, which is a candidate for a causal relationship to be determined, BP background knowledge 92, WHY background knowledge 94, and CLUE background knowledge 96 are concatenated with delimiters in between. When inputting to BERT, delimiters are inserted between each input string. In the following explanation, when inputs to BERT are concatenated, it is assumed that delimiters are inserted between them. Each character constituting these inputs may be a so-called one-hot vector or an embedding vector.
[0032] BERT122 receives input 120 and outputs the encoded input (h 0 ), a first transformer layer 132 that receives the output of the input layer 130, a second transformer layer 134 that receives the output of the first transformer layer 132, and then several other transformer layers (not shown). N ) to the classification layer 124.
[0033] The neural networks called transformers, such as the first transformer layer 132 and the second transformer layer 134, are a model recently proposed in Non-Patent Document 3. BERT is a model proposed even more recently in Non-Patent Document 4, and includes multiple transformers. BERT has become the de facto standard model in natural language processing due to its high performance, ease of pre-training, and ease of transfer learning to specific tasks.
[0034] In this prior art, three judges judge whether the input sentence x is suitable as a causal relationship. The classification layer 124 includes three linear sum and softmax layers corresponding to the three judges. Training of the machine learning model 110 is performed for the classification layer 124 using the judgment results by each judge as teacher labels.
[0035] 2. First embodiment 1. Configuration (1) New background knowledge Fig. 4 shows a schematic diagram of background knowledge used in the first embodiment of the present invention. With reference to Fig. 4, an example of a causal relationship similar to the causal relationship 90 of events in the prior art will be described. In this embodiment, the BP background knowledge 92 and WHY background knowledge 94 shown in Fig. 2 are used as prior art. However, in this embodiment, instead of the CLUE background knowledge 96 in Fig. 2, new background knowledge 150 using synonyms for both cause nouns and result nouns is used.
[0036] Specifically, synonymous nouns 160 consisting of synonyms of the cause noun (hereinafter referred to as "synonymous cause nouns") and synonyms of the result noun (hereinafter referred to as "synonymous result nouns") are generated from both the cause noun and the result noun of the causal relationship 90 of the event. Next, SIM-BP background knowledge 162 consisting of binary patterns linking synonymous cause nouns and synonymous result nouns, and SIM-EC background knowledge 164 consisting of causal relationships linking synonymous cause nouns and synonymous result nouns are generated from sentences about causal relationships extracted from the Web 98, and these are used as background knowledge for determining causal relationships. Here, the SIM-EC background knowledge is generated by extracting causal relationships using synonymous cause nouns and synonymous result nouns, utilizing a database of causal relationships constructed using conventional technology. For example, assuming that the causal relationship database contains the causal relationship "I got a lung disease because I smoked cigarettes," and the cause noun is "tobacco" and the result noun is "lung cancer," the above causal relationship can be generated by using "cigarette" as a synonymous cause noun and "lung disease" as a synonymous result noun. In the configuration of the embodiment, as background knowledge, the causal relationship extracted from the causal relationship database (in the previous example, the sentence (sentence or group of sentences) on which the causal relationship ("I got a lung disease because I smoked cigarettes") is based) is combined with the cause noun and the result noun and used as training data. The same applies when the name of a specific brand of cigarettes is obtained as the synonymous cause noun instead of "cigarette."
[0037] (2) Machine learning model 5 shows a schematic configuration of the machine learning model 180 of this embodiment. The machine learning model 180 includes BERTs 192, 196, 200, and 204, which receive inputs 190, 194, 198, and 202 each consisting of a vector, and output vectors of inference results, and a classification layer 206, which is connected to receive the outputs of the BERTs 192, 196, 200, and 204, and outputs a classification result regarding whether or not the causal relationship candidate to be judged is appropriate according to a probability distribution according to the judgment results of three judges.
[0038] The configurations of the BERTs 192, 196, 200, and 204 are the same as those shown in Fig. 3. In this specification, a model in which multiple BERTs are combined in this manner is referred to as a "multi-BERT."
[0039] Input 190 to BERT192 is x 1 is a vector that concatenates the sentence of the target causal relation candidate and the BP background knowledge obtained based on this sentence. x 2 is a vector that connects the target sentence and the WHY background knowledge obtained from a why-based question-answering system to a question obtained based on the sentence. x 3 is a vector that connects the target sentence with the SIM-BP background knowledge obtained from the cause noun and result noun of the sentence. 4 is a vector that connects the target sentence with the SIM-EC background knowledge obtained from the cause noun and result noun of this sentence.
[0040] In this embodiment, the classification layer 206 again includes three linear sum and softmax layers, one for each of the three judges, all connected to receive the outputs of the BERTs 192, 196, 200 and 204.
[0041] (3) Training equipment Fig. 6 is a block diagram of a training device for training the machine learning model 180 shown in Fig. 5. Referring to Fig. 6, the training device 220 includes a causal relationship candidate storage unit 230 for storing a large number of causal relationship candidates used for training, a thesaurus storage unit 232 for storing a thesaurus, a binary pattern dictionary storage unit 234 for storing a binary pattern dictionary consisting of a large number of binary patterns relating to causal relationships, A causal relationship database 235 that records causal relationships constructed using prior art; and a web archive storage unit 236 for storing a web archive containing a number of documents extracted from the web.
[0042] The training device 220 further includes a causal relationship evaluation unit 238 that reads out causal relationship candidates from the causal relationship candidate storage unit 230 and has three evaluators evaluate the causal relationship candidates (whether or not the causal relationship candidates are appropriate as causal relationships), an evaluation result storage unit 240 that stores the evaluation results by the causal relationship evaluation unit 238 for each combination of the causal relationship candidate and the evaluator, a background knowledge extraction unit 242 that refers to the causal relationship candidate storage unit 230, the thesaurus storage unit 232, and the binary pattern dictionary storage unit 234, and extracts the above-mentioned background knowledge related to the causal relationship candidates from the web archive storage unit 236, and a causal relationship evaluation unit 240 that evaluates the causal relationship candidates based on the background knowledge extracted by the background knowledge extraction unit 242. candidate and a background knowledge storage unit 244 for storing the background knowledge for each of the plurality of pieces of information.
[0043] The training device 220 further candidate 5. The machine learning model 180 includes a training data creation unit 246 for creating training data that combines the inputs 190, 194, 198, and 202 shown in FIG. 5 with teacher labels based on the background knowledge stored in the background knowledge storage unit 244 and the evaluation results for each evaluator stored in the evaluation result storage unit 240, a training data storage unit 248 for storing the training data created by the training data creation unit 246, and a BERT training unit 250 for training (fine-tuning) the machine learning model 180 using the training data stored in the training data storage unit 248.
[0044] Fig. 7 is a more detailed block diagram of the background knowledge extraction unit 242 shown in Fig. 6. Referring to Fig. 7, the background knowledge extraction unit 242 includes a cause word / result word extraction unit 270 that reads out causal relationship candidates from the causal relationship candidate storage unit 230 and extracts cause nouns and result nouns of the causal relationship candidates, and a synonym search unit 272 that searches the thesaurus dictionary storage unit 232 for and retrieves synonyms (similar cause nouns and similar result nouns) for each of the cause nouns and result nouns extracted by the cause word / result word extraction unit 270.
[0045] The background knowledge extraction unit 242 further extracts the cause nouns and result nouns extracted by the cause word / result word extraction unit 270, the synonymous cause nouns and the synonymous result nouns output by the synonym search unit 272, the binary pattern dictionary stored in the binary pattern dictionary storage unit 234, Causal relationships stored in the causal relationship database 235; and a background knowledge generating unit 274 for generating and outputting BP background knowledge, SIM-BP background knowledge, and SIM-EC background knowledge by referring to a number of documents stored in the web archive storage unit 236.
[0046] The background knowledge extraction unit 242 further includes a question generation unit 278 that reads out the causal relationship candidates from the causal relationship candidate storage unit 230 and automatically generates a question from the result in a conventional manner, an answer collection unit 282 that provides the question generated by the question generation unit 278 to an external why-type question answering system 280 and receives the answers together with their scores, an answer selection unit 284 that selects a predetermined number of answers with high scores from among the answers collected by the answer collection unit 282, and a binary pattern extraction unit 286 that refers to the binary pattern dictionary storage unit 234 and extracts answers that match any of the binary patterns stored in the binary pattern dictionary storage unit 234 from the answers selected by the answer selection unit 284 and outputs them as WHY background knowledge.
[0047] The background knowledge extraction unit 242 further includes a background knowledge storage unit 244 for storing background knowledge output by the background knowledge generation unit 274 and the binary pattern extraction unit 286. The background knowledge storage unit 244 includes a BP storage unit 300 for storing BP background knowledge, a SIM-BP storage unit 302 for storing SIM-BP background knowledge, a SIM-EC storage unit 304 for storing SIM-EC background knowledge, and a WHY storage unit 306 for storing WHY background knowledge output by the binary pattern extraction unit 286.
[0048] (4) Determination of causal relationship 8 illustrates the configuration of a device that uses the machine learning model 180 trained with the training data described above to determine whether an input causal relationship candidate is appropriate as a causal relationship. FIG. 8 illustrates the configuration of a causal relationship determination device 330 that is an example of such a device. Referring to FIG. 8, the causal relationship determination device 330 includes a thesaurus storage unit 232, a binary pattern dictionary storage unit 234, Causal relationship database 235; and a causal relationship candidate receiving unit 352 that receives the causal relationship candidates 350, vectorizes them, and outputs them.
[0049] The causal relationship determination device 330 further includes a cause word / result word extraction unit 354 having a function similar to that of the cause word / result word extraction unit 270 of FIG. 7 and extracting cause nouns and result nouns from the causal relationship candidates 350 accepted by the causal relationship candidate acceptance unit 352, a synonym search unit 356 having a function similar to that of the synonym search unit 272 shown in FIG. 7 and searching the synonym dictionary storage unit 232 for each of the cause nouns and result nouns extracted by the cause word / result word extraction unit 354 and outputting synonyms, and a background knowledge generation unit 358 that uses the cause nouns extracted by the cause word / result word extraction unit 354 and the synonyms output by the synonym search unit 356 to generate BPs 360, SIM-BPs 362, and SIM-ECs 364 by referring to the binary patterns stored in the binary pattern dictionary storage unit 234.
[0050] The causal relationship determination device 330 further determines the causal relationship candidate ComplementaryThe system includes a question generation unit 368 that automatically generates a question sentence from the result portion, an answer collection unit 372 that provides the question sentence generated by the question generation unit 368 to an external why-type question answering system 370 and collects the answers, an answer selection unit 374 that selects the answer with the highest score from the answers collected by the answer collection unit 372, and a binary pattern extraction unit 376 that refers to the binary pattern dictionary stored in the binary pattern dictionary storage unit 234, extracts a binary pattern from the answer selected by the answer selection unit 374, and outputs it as WHY background knowledge 378.
[0051] The causal relationship determination device 330 further includes a first input generation unit 380 for generating an input having the configuration of the input 190 in FIG. 5 using the BP 360 output by the background knowledge generation unit 358 and the output of the causal relationship candidate reception unit 352, and for inputting the input to the BERT 192; and a second input generation unit 380 for generating an input having the configuration of the input 194 in FIG. 5 using the WHY background knowledge 378 output by the binary pattern extraction unit 376 and the output of the causal relationship candidate reception unit 352, and for providing the input to the BERT 196. 5 using SIM-BP362 output by the background knowledge generation unit 358 and the output of the causal relationship candidate reception unit 352, and provides the input having the configuration of input 202 in FIG. 5 to the BERT 204.
[0052] The outputs of BERTs 192, 196, 200 and 204 are all connected to the inputs of three linear sum and softmax layers in classification layer 206. Each of these three linear sum and softmax layers has an output that indicates the decision corresponding to one of the three evaluators.
[0053] The training device 220 and the causal relationship determining device 330, the configurations of which have been described above, operate as follows.
[0054] 2. Operation (1) Preliminary learning In pre-training, BERT192, 196, 200, and 204 are trained using a large number of sentences collected from the web in advance. The method of pre-training BERT is well known, so the details will not be repeated here.
[0055] (2) Preparation of training data Training data for training (fine-tuning) the machine learning model 180 is prepared as follows. With reference to Fig. 6, a large number of causal relationship candidates are stored from the web or the like in the causal relationship candidate storage unit 230. Necessary data is also stored in the thesaurus storage unit 232, the binary pattern dictionary storage unit 234, and the web archive storage unit 236.
[0056] The causal relationship evaluation unit 238 reads out each of the causal relationship candidates from the causal relationship candidate storage unit 230 and provides the causal relationship evaluation unit 238. The causal relationship evaluation unit 238 has the three evaluators determine whether the causal relationship candidates are appropriate as causal relationships, and stores the results in the evaluation result storage unit 240.
[0057] On the other hand, the background knowledge extraction unit 242 operates as follows. With reference to Fig. 7, the cause word / result word extraction unit 270 reads out causal relationship candidates from the causal relationship candidate storage unit 230, and extracts cause nouns and result nouns of the causal relationship candidates. The synonym search unit 272 searches the thesaurus dictionary storage unit 232 for synonyms (similar cause nouns and similar result nouns) for each of the cause nouns and result nouns extracted by the cause word / result word extraction unit 270, and extracts them.
[0058] The background knowledge generating unit 274 extracts the cause nouns and result nouns extracted by the cause word / result word extracting unit 270, the synonymous cause nouns and the synonymous result nouns output by the synonym search unit 272, Causal relationships stored in the causal relationship database 235; Also, by referring to the binary pattern dictionary stored in the binary pattern dictionary storage unit 234, the BP background knowledge, the SIM-BP background knowledge, and the SIM-EC background knowledge are generated and output.
[0059] The question generator 278 reads out the causal relationship candidates from the causal relationship candidate storage unit 230, and automatically generates a question from the result in the same manner as in the past. The answer collector 282 provides the question generated by the question generator 278 to an external why-type question answering system 280, and receives the answers together with their scores. The answer selector 284 selects a predetermined number of answers with the highest scores from the answers collected by the answer collector 282. The binary pattern extractor 286 refers to the binary pattern dictionary storage unit 234, and extracts answers that match any of the binary patterns stored in the binary pattern dictionary storage unit 234 from the answers selected by the answer selector 284, and outputs them as WHY background knowledge.
[0060] The BP storage unit 300 of the background knowledge storage unit 244 stores BP background knowledge. The SIM-BP storage unit 302 stores SIM-BP background knowledge. The SIM-EC storage unit 304 stores SIM-EC background knowledge. The WHY storage unit 306 stores the WHY background knowledge output by the binary pattern extraction unit 286.
[0061] Returning to FIG. 6 , the training data creation unit 246 creates training data by combining the causal relationship candidates read out from the causal relationship candidate storage unit 230, the background knowledge related to those causal relationship candidates stored in the background knowledge storage unit 244, and each of the evaluation results of the three evaluators stored in the evaluation result storage unit 240 for those causal relationship candidates, and stores the created training data in the training data storage unit 248.
[0062] (3) Fine Tuning 5, and uses the evaluation results of these as teacher labels to train (fine-tune) the machine learning model 180. Fine-tuning is performed using the usual backpropagation method.
[0063] (4) Causal relationship determination process 8, the causal relation determining device 330 operates as follows: A causal relation candidate receiving unit 352 of the causal relation determining device 330 receives a causal relation candidate 350, vectorizes it, and outputs it.
[0064] 7, the cause word / result word extraction unit 354 extracts cause nouns and result nouns from the causal relationship candidates 350 accepted by the causal relationship candidate acceptance unit 352. Similar to the synonym search unit 272 shown in FIG. 7, the synonym search unit 356 searches the thesaurus storage unit 232 for each of the cause nouns and result nouns extracted by the cause word / result word extraction unit 354, and outputs synonyms. The background knowledge generation unit 358 uses the cause nouns extracted by the cause word / result word extraction unit 354 and the synonyms output by the synonym search unit 356 to search the binary pattern dictionary storage unit 234 for synonyms. , the causal relationships stored in the causal relationship database 235; It also generates BP 360, SIM-BP 362, and SIM-EC 364 by referencing sentences in multiple documents stored in the web archive storage unit 236.
[0065] A question generator 368 of the causal relationship determination device 330 automatically generates a question sentence from the result portion of the causal relationship candidate receiver 352. An answer collector 372 provides the question sentence generated by the question generator 368 to an external why-type question answering system 370 and collects the answers. An answer selector 374 selects the answer with the highest score from the answers collected by the answer collector 372. A binary pattern extractor 376 refers to the binary pattern dictionary stored in the binary pattern dictionary storage unit 234, extracts a binary pattern from the answer selected by the answer selector 374, and outputs it as WHY background knowledge 378.
[0066] The first input generation unit 380 of the causal relationship determination device 330 generates an input having the configuration of the input 190 in FIG. 5 using the BP 360 output by the background knowledge generation unit 358 and the output of the causal relationship candidate reception unit 352, and inputs the generated input to the BERT 192. The second input generation unit 384 generates an input having the configuration of the input 194 in FIG. 5 using the WHY background knowledge 378 output by the binary pattern extraction unit 376 and the output of the causal relationship candidate reception unit 352, and provides the input to the BERT 196. The third input generation unit 388 generates an input having the configuration of the input 198 in FIG. 5 using the SIM-BP 362 output by the background knowledge generation unit 358 and the output of the causal relationship candidate reception unit 352, and provides the input to the BERT 200. The fourth input generation unit 392 uses the SIM-EC 364 output by the background knowledge generation unit 358 and the output of the causal relationship candidate acceptance unit 352 to generate an input having the configuration of the input 202 in FIG.
[0067] The outputs of the BERTs 192, 196, 200, and 204 are all provided to the inputs of three linear sum and softmax layers in the classification layer 206. Each of these three linear sum and softmax layers outputs a value indicating a judgment result corresponding to one of the three evaluators. For example, the average of these three values (probability values) can be calculated and used as the judgment result to determine whether the causal relationship candidate 350 is appropriate as a causal relationship.
[0068] 3. Experiments and Effects FIG. 9 shows the results of an experiment to confirm the effect of the first embodiment. In the experiment, the same causal relationship candidates as those used in Non-Patent Document 3 were used. These were extracted from 600 million web pages. Each causal relationship candidate included a cause part, an effect part, and the original sentence from which they were extracted. Three evaluators judged each causal relationship candidate as being causal or non-causal, and labeled it.
[0069] All of the methods using BERT included a 4 × 10 8 A base model pre-trained using sentences (BERT BASE) was used. For the evaluation, we used the F-measure (F1) and average precision obtained by optimizing each BERT on the development set and then applying it to the test set. To ensure the reliability of the results, we used model averaging for all five models.
[0070] The results are shown in table form in Fig. 9. From the top, Fig. 9 shows the results of simple BERT using the background knowledge described in Non-Patent Document 2, simple BERT using the new background knowledge described in the above embodiment, the method described in Non-Patent Document 1 using the above-mentioned new background knowledge, multi-BERT described in the above embodiment using the new background knowledge, and the best result by Non-Patent Document 1.
[0071] By comparing the first and second lines, it can be seen that by using new background knowledge, the average precision is 3.0 higher than that described in Non-Patent Document 2. Also, by comparing the third and fourth lines, it can be seen that the average precision is 1.1 higher when using the multi-BERT of the above embodiment compared to the method of Non-Patent Document 1. Furthermore, by comparing the fifth and fourth lines, the model according to the above embodiment is 0.9 higher in F-measure and 2.2 higher in average precision than the method of Non-Patent Document 1. Therefore, it was confirmed that the high performance of the multi-BERT according to the embodiment of the present application and the effectiveness of the new background knowledge were confirmed.
[0072] 4. Modifications In the above embodiment, the information about the evaluator is only about the teacher label during fine tuning. However, the present invention is not limited to such an embodiment. The identifier of the evaluator may be added as a prefix to any position (for example, the beginning) of the inputs 190, 194, 198, and 202 shown in FIG. 5. In addition, the identifier "MAJ" indicating the evaluation result by majority vote, which will be described later in the embodiment, may be added as a prefix to perform fine tuning. In the case of this modified example, only one linear sum and softmax layer is prepared, and a probability value indicating whether it is appropriate as a causal relationship is output.
[0073] Although not described here, we also conducted an experiment using Multi-BERT to measure the performance using a test set after removing any of the new background knowledge described above. The experimental results showed that the results fell short of those shown in Figure 9 regardless of which background knowledge was removed. As a result, it can be seen that each of the new background knowledge described above is important.
[0074] Third Second Embodiment 1. Configuration (1) Prior art The second embodiment relates to a device that generates a scenario by linking causal relationships. Fig. 10 shows the configuration of a scenario generation device obtained by applying the technique described in Non-Patent Document 1 to scenario generation.
[0075] Referring to Figure 10, a scenario generation device 410 relating to the prior art includes a causal relationship memory unit 420 that stores a large number of causal relationships, a scenario candidate generation unit 422 that generates a large number of scenario candidates by extracting and linking causal relationships from the causal relationships stored in the causal relationship memory unit 420 in which one result part and the other cause part match, a scenario candidate memory unit 424 that stores the scenario candidates generated by the scenario candidate generation unit 422, a scenario candidate evaluation unit 426 that has a predetermined number (for example, three) of evaluators evaluate each of the scenario candidates stored in the scenario candidate memory unit 424 and obtains evaluation results, a majority voting unit 428 for determining the evaluation of the scenario candidate by majority vote of the three evaluation results obtained by the scenario candidate evaluation unit 426 for each scenario candidate, and a majority voting result memory unit 430 for storing the evaluation results by the majority voting unit 428.
[0076] The scenario generation device 410 further includes a training data creation unit 432 that creates training data from each scenario candidate stored in the scenario candidate memory unit 424 and the majority vote evaluation results for the scenario candidates stored in the majority vote result memory unit 430, a training data memory unit 434 for storing the training data created by the training data creation unit 432, and a BERT training unit 436 for training a scenario determination unit 438 including BERT that uses the training data storage unit 434 to determine whether a scenario candidate is appropriate as a causal scenario.
[0077] (2) Prior Art Machine Learning Models Fig. 11 shows a schematic configuration of the scenario determination unit 438 of Fig. 10. Referring to Fig. 11, the scenario determination unit 438 includes a BERT 452 that receives an input 450 as its input. The input 450 is a vector x M The teacher label is the majority vote result (y M ).
[0078] Similar to the first embodiment, the BERT452 includes an input layer that encodes the input, an output layer that outputs hidden vectors as output, and multiple transformer layers arranged in series between the input layer and the output layer.
[0079] The scenario determination unit 438 further includes a classification layer 454 that receives the hidden vector output by the BERT 452 and outputs a value indicating the classification result for the input 450 (whether or not it is appropriate as a scenario) using a weighted linear sum of each element of this vector and a softmax function.
[0080] (3) Training device according to embodiment Fig. 12 shows a schematic block diagram of a scenario generation device 470 according to the second embodiment. Referring to Fig. 12, the scenario generation device 470 has almost the same configuration as the scenario generation device 410 shown in Fig. 10. The scenario generation device 470 differs from the scenario generation device 410 in that it includes an evaluation result storage unit 480 that stores the evaluations of three evaluators for each scenario candidate output by the scenario candidate evaluation unit 426, and in that it includes a training data creation unit 482, a training data storage unit 484, a BERT training unit 486, and a scenario determination unit 488 instead of the training data creation unit 432, the training data storage unit 434, the BERT training unit 436, and the scenario determination unit 438 of Fig. 10.
[0081] 10, the training data creation unit 482 creates training data for each scenario candidate in the same number as the number of evaluators + 1. The configuration of the training data also differs from that shown in FIG.
[0082] More specifically, referring to FIG. 13 , when there are three evaluators, the training data creation unit 482 creates four pieces of training data: a majority input 500, a first evaluator input 502, a second evaluator input 504, and a third evaluator input 506.
[0083] The training data storage unit 484 and the BERT training unit 486 are functionally the same as the training data storage unit 434 and the BERT training unit 436 in FIG. 10, except that the training data they handle is different.
[0084] (4) Machine learning model and training data according to the embodiment Referring to FIG. 13, the majority input 500 of the training data is an input x M and output y M Includes y M is the result of the majority vote. Input x M is the output y M This is the concatenation of the identifier “MAJ”, which indicates that this is the result of a majority vote, and the first and second sentences of the scenario candidates.
[0085] The first evaluator input 502 is the input x 1 and output y1 Includes y 1 is the evaluation result of this scenario candidate by the first evaluator. Input x 1 is the output y 1 is a concatenation of the identifier "ANN1" indicating that the scenario is evaluated by the first evaluator, and the first and second sentences of the scenario candidate. Similarly, the second evaluator input and the third evaluator input are training data for the second evaluator and the third evaluator, respectively.
[0086] The basic configuration of the scenario determination unit 488 is also similar to that of the scenario determination unit 438 shown in Fig. 11, and includes a BERT 508 and a classification layer 510 that receives the output of the BERT 508 and outputs a probability value indicating the appropriateness of the scenario. However, as described above, the input configuration is different from that of the scenario determination unit 438, and therefore the scenario determination unit 488 differs from the scenario determination unit 438 at least in terms of, for example, the number of nodes in the input layer of the BERT 508.
[0087] 2. Operation 12 and 13, the scenario generation device 470 operates as follows. A large number of causal relationships are stored in the causal relationship storage unit 420 of the scenario generation device 470. The scenario candidate generation unit 422 extracts two causal relationships in which one result part matches the other cause part from the causal relationship storage unit 420, and stores them as scenario candidates in the scenario candidate storage unit 424. The scenario candidate storage unit 424 stores a large number of scenario candidates extracted from the causal relationship storage unit 420.
[0088] The scenario candidate evaluation unit 426 has three evaluators evaluate each of the scenario candidates stored in the scenario candidate storage unit 424 to determine whether the scenario candidate is appropriate as a causal scenario, and stores the results together with the evaluator's name in the evaluation result storage unit 480. The majority voting unit 428 reads out the evaluations by each evaluator for each scenario candidate from the evaluation result storage unit 480 and determines the evaluation by majority vote. This evaluation result is stored in the majority vote result storage unit 430 for each scenario candidate.
[0089] The training data creation unit 482 creates training data for each scenario candidate in the number equal to the number of evaluators + 1. More specifically, referring to Fig. 13, when there are three evaluators, the training data creation unit 482 creates four training data: majority input 500, first evaluator input 502, second evaluator input 504, and third evaluator input 506. That is, for each scenario candidate stored in the scenario candidate storage unit 424, the training data creation unit 482 reads out the majority result from the majority result storage unit 430, and creates an input x that concatenates an identifier "MAJ" indicating the majority result and the first and second sentences of the scenario candidate. M And the majority result y M The training data creation unit 482 similarly combines the evaluation results y 1 ANN1, an identifier indicating the first evaluator, and the input x 1 And the majority result y 1 The training data generating unit 482 further combines the input x 2 and output y 2 The second evaluator input is generated by combining y 2 is the evaluation result of this scenario candidate by the second evaluator. Finally, the training data creation unit 482 generates the input x 3 and output y 3 The third evaluator input is generated by combining y 3 is the evaluation result of this scenario candidate by a third evaluator.
[0090] 12 uses the training data thus created and stored in the training data storage unit 484 to fine-tune the BERT 508 of the scenario determination unit 488. This fine-tuning is performed by the backpropagation method, as in normal training.
[0091] 3. Scenario Judgment Device The configuration and operation of a scenario determination device trained by a scenario generation device 470 according to the second embodiment are similar to those in Fig. 12, and therefore detailed description will not be repeated here. What changes is that a scenario candidate to be determined is input to a scenario candidate generation unit 422, an input having the same configuration as the input x of the training data created by the training data creation unit 482 is created and provided to a BERT 508 of the scenario determination unit 488, and whether or not the input scenario candidate is appropriate as a causal relationship candidate is determined based on the output of the scenario determination unit 488. That is, as input during evaluation, in addition to the first and second sentences of the candidate constituting the scenario, which are the subject of the determination of whether or not they are appropriate as a scenario, the identifier "MAJ" is always input.
[0092] 4. Experiments and Effects FIG. 14 shows the results of an experiment for evaluating the performance of BERT trained by the scenario generating device 470 according to the second embodiment, in comparison with the results of other examples. The first line in FIG. 14 is an example using a simple BERT. The second line is an example using the BERT according to the above embodiment. The third line uses the training data for determining causal relationships used in the first embodiment in addition to the second line. In this example, in addition to the identifier of the evaluator, an identifier indicating whether the input is training data for scenario determination or data for determining causal relationships is added. When determining causal relationships, training was performed using the evaluation by the evaluator regarding causal relationships as teacher data. The fourth line is the result according to the method of Non-Patent Document 1.
[0093] By comparing the first and second rows, we can see that training BERT by adding rater identifiers to the training data improved both the F-measure and the average precision for determining causal scenarios.
[0094] Furthermore, by comparing the second and third lines, we found that the accuracy could be further improved by adding training data for another task, causal relationship judgment, which is different from scenario judgment, and by adding a task identifier for training. Therefore, it is expected that the accuracy of the model can be improved by adding some prefix, such as the evaluator identifier and the task identifier, to the training data as in the second embodiment.
[0095] Comparing the fourth line with the second and third lines, it can be seen that the accuracy of the BERT trained according to this embodiment is improved over the BERT trained according to the method of Non-Patent Document 1. That is, according to this second embodiment, it is possible to chain two causal relationships and determine whether or not a scenario is appropriate as a causal relationship more accurately than in the conventional method.
[0096] Fourth Third Embodiment 1. Configuration (1) Prior art The third embodiment and the fourth embodiment described below relate to a technique for generating a scenario by linking three or more causal relationships. In such cases, the conventional technique uses a score that indicates the appropriateness of each causal relationship (Non-Patent Document 5).
[0097] That is, referring to Figure 15, the score of causal relationship 1 is E(EC 1 ), and the score for causality 2 is E(EC 2 ), …, the score of causal relationship N is E(EC N ) Then, the score of the scenario that can be created by chaining causal relationships 1 to N is calculated as follows:
[0098] Score = E(EC 1 )×E(EC 2 )×…×E(EC N ) This score is rational, as it is based on the idea that a scenario that creates a chain of causal relationships is a good scenario.
[0099] (2) Score Calculation Method of the Embodiment However, in the second embodiment already described, it is possible to calculate a score for a scenario consisting of two causal relationships (called a "two-step score") with high accuracy. With this technology, it may be possible to calculate a score that determines the validity of a scenario consisting of three or more causal relationships, as in the third embodiment, with a different approach from that of the prior art and with higher accuracy. Such an approach is shown in FIG. 16.
[0100] Referring to FIG. 16, the score (multi-step score) of a scenario in which causal relationships 1, 2, 3, . . . , causal relationship N are chained is calculated as follows.
[0101] Score = S(EC 1 ,EC 2 ) ×S([EC 1 ,EC 2 ], E.C. 3 ) ×S([EC 1 ,EC 2 ,EC 3 ], E.C. 4 ) ×… ×S([EC 1 ,EC 2 ,…,EC N-1 ], E.C. N ) Here, S(EC M ,EC M+1 ) indicates the two-step score between causal relationship M and causal relationship M+1, [EC M ,EC M+1 ,…,EC M+K ] indicates a scenario in which K+1 causal relationships, i.e., causal relationship M, causal relationship M+1, ..., causal relationship M+K, are chained together. This score is considered to indicate the validity of the entire scenario when the validity of chaining causal relationships is multiplied. Therefore, this score can be used as an index for judging the validity of a scenario obtained by chaining three or more causal relationships.
[0102] (3) Score calculation program FIG. 18 is a flowchart showing a control structure of a program for implementing, by a computer, the method of calculating the score of a scenario based on the idea shown in FIG.
[0103] 18, this program first includes step 560 for performing initialization. It should be noted that here, it is assumed that the validity of a scenario in which N causal relations, from causal relation 1 to causal relation N, are chained is judged. In step 560, 1 is substituted into a variable score representing a score, and a variable EC x The causal relationship EC at the beginning of the scenario to be judged 1 is assigned.
[0104] This program further includes, following step 560, step 562 of calculating the score of the above-mentioned scenario by repeating process 564 while incrementing the value of variable j by 1 from 2 to N, and step 566 of outputting the score calculated in step 562 and terminating the process.
[0105] The process 564 includes a step 570 for updating the value of score according to the following formula: x [EC x ,EC j ].
[0106] score=score×S[EC x ,EC j ] 2. Operation In FIG. 18, score is initialized to 1 in step 560. Then, when process 564 is executed for the first time, j=2, so the value of score is S[EC 1 ,EC 2 ] is updated. The variable EC x In step 572, [EC 1 ,EC 2 ] will be updated.
[0107] The next time process 564 is executed (j=3), the value of score is S([EC 1 ,EC 2 ], E.C. 3 ) The process 564 is repeated in the same manner up to j=4, . . . , N, and as a result, the score becomes a value expressed by the following formula, which is output in step 566.
[0108] Score =S(EC 1 ,EC 2 ) ×S([EC 1 ,EC 2 ], E.C. 3 ) ×S([EC 1 ,EC 2 ,EC 3 ], E.C. 4 ) ×… ×S([EC 1 ,EC 2 ,…,EC N-1 ], E.C. N )
[0109] Fifth Fourth embodiment 1. Configuration (1) Score Calculation Method of the Embodiment In the fourth embodiment, similarly to the third embodiment, the score of the scenario is calculated by a calculation method different from that of the prior art. Referring to FIG. 17, the formula is different from that of the third embodiment and is as follows:
[0110]
number
[0111] (2) Score calculation program FIG. 19 shows a control structure of a program for causing a computer to execute the score calculation method according to the fourth embodiment.
[0112] 19, this program includes a step 580 for performing initialization. In the initialization, 1 is substituted for a variable "score" representing a score.
[0113] This program further includes step 582, which calculates score, which is the score of the entire scenario, by repeatedly executing process 584 while incrementing the value of variable i by 1 from 1 to N-1, and step 586, which outputs the score calculated in step 582 and terminates execution of the program.
[0114] The process 584 includes a step 590 of repeatedly executing a step 592 while incrementing the value of the variable j by 1 from i+1 to N. In the step 592, the score is updated according to the following formula:
[0115] Score = score × S(EC i ,EC j ) 2. Operation Referring to FIG. 19, in step 580, the variable score is assigned the value 1.
[0116] In step 582, 1 is substituted for the variable i. When the process 584 is executed for the first time, in step 590, i+1=2 is substituted for the variable j. In step 592, score=1×S[EC 1 ,EC 2 ] is used to update the score. In the second execution of step 592, i+2=3 is substituted for the variable j. In step 592, score=S[EC 1 ,EC 2 ]×S[EC 1 ,EC 3 ] will update the score.
[0117] By repeating this process until j=N, the score value is calculated as follows:
[0118]
number
[0119] Similarly, by updating the score while changing i=2, ..., N-1, the score is calculated as follows:
[0120]
number
[0121] A similar calculation can be realized by a program whose control structure is shown in Fig. 20. Referring to Fig. 20, this program includes step 620 of performing initialization in which 1 is substituted for a variable score, step 622 of calculating score by repeatedly executing process 624 while incrementing variable j by 1 from 2 to N, and step 626 of outputting the score calculated in step 622 and terminating execution of this program.
[0122] The process 624 includes a step 640 of repeatedly executing a step 642 while incrementing the value of a variable i by one from 1 to j-1.
[0123] By executing this program, the same results as those of the program shown in FIG. 19 can be obtained.
[0124] 3. Effects of the Third and Fourth Embodiments Fig. 21 shows the effects of the third and fourth embodiments of the present invention in the form of a table in comparison with the prior art, etc. Referring to Fig. 21, the first column shows the scoring method used for ranking, the second column shows the average precision rate when the scoring method in the first column is applied to a scenario created in three steps, and the third column shows the average precision rate when the scoring method in the first column is applied to a scenario created in four steps.
[0125] The first line shows the ranking method based on the model described in Non-Patent Document 1. The second line shows the results of calculating the two-step scores for only the beginning and end of the scenario. The third line shows the results of calculating the two-step scores for two consecutive causal relationship pairs and multiplying them together. The fourth line shows the results based on the third embodiment, and the fifth line shows the results based on the fourth embodiment.
[0126] The third to fifth lines are considered to be the results of using the two-step score shown in the second embodiment, and all of these showed higher average precision rates for both the first and second lines, and for both the three-step and four-step scenarios. In particular, the average precision rate for the four steps is found to be very different when comparing the values of these three lines with the values of the first and second lines. Therefore, it is considered that the greater the number of causal relationships that are chained when generating a scenario, the greater the difference in precision between the score calculated by combining the two-step scores according to the second embodiment of the present invention and the conventional method.
[0127] 6. Computer implementation Fig. 22 is an external view of a computer system for implementing each of the above-mentioned embodiments, and Fig. 23 is a hardware block diagram of the computer system shown in Fig. 22.
[0128] 22, this computer system 950 includes a computer 970 having a DVD (Digital Versatile Disc) drive 1002, and a keyboard 974, a mouse 976, and a monitor 972 for interacting with a user, all of which are connected to the computer 970. Of course, this is just one example of a configuration for user interaction, and any general hardware and software available for user interaction (e.g., a touch panel, voice input, pointing device in general) can be used.
[0129] 23, the computer 970 includes, in addition to a DVD drive 1002, a CPU 990, a GPU (Graphics Processing Unit) 992, a bus 1010 connected to the CPU 990, the GPU 992, and the DVD drive 1002, a ROM 996 connected to the bus 1010 and storing a boot-up program and the like of the computer 970, a RAM 998 connected to the bus 1010 and storing instructions constituting a program, a system program, working data, and the like, and a hard disk drive (HDD) 1000 which is a non-volatile memory connected to the bus 1010. The hard disk 1000 is for storing programs executed by the CPU 990 and the GPU 992, data used by the programs executed by the CPU 990 and the GPU 992, and the like. The computer 970 further includes a network I / F 1008 that provides a connection to a network 986 enabling communication with other terminals, and a USB port 1006 to which a USB memory 984 can be attached / detached and that provides communication between the USB memory 984 and each component within the computer 970.
[0130] In the above embodiment, the data, parameters, etc. of Figures 6 to 8, 10, and 12 are all stored in, for example, the HDD 1000, RAM 998, DVD 978, or USB memory 984 shown in Figure 23, or a storage medium of an external device (not shown) connected via the network I / F 1008 and network 986. Typically, these data, parameters, etc. are written into the HDD 1000 from outside, for example, and loaded into the RAM 998 when the computer 970 is executed.
[0131] The computer programs for operating this computer system to realize the functions of the training device 220 shown in FIG. 6, the causal relationship determination device 330 shown in FIG. 8, the scenario generation device 470 shown in FIG. 12, and each of these components, and the programs whose control structures are shown in FIG. 18 to FIG. 20, etc. are stored in a DVD 978 mounted in a DVD drive 1002, and transferred from the DVD drive 1002 to the HDD 1000. Alternatively, the programs are stored in a USB memory 984, and the USB memory 984 is mounted in a USB port 1006, and the programs are transferred to the hard disk 1000. Alternatively, the programs may be transmitted to the computer 970 via a network 986 and stored in the HDD 1000. The programs are loaded into the RAM 998 at the time of execution. Of course, the source program may be input using the keyboard 974, the monitor 972, and the mouse 976, and the compiled object program may be stored in the HDD 1000. In the case of a script language, a script input using the keyboard 974, etc. may be stored in the HDD 1000. In the case of a program that runs on a virtual machine, it is necessary to install a program that functions as a virtual machine in the computer 970 in advance.
[0132] The CPU 990 reads a program from the RAM 998 according to an address indicated by an internal register called a program counter (not shown), interprets the instruction, reads data required for executing the instruction from the RAM 998, the hard disk 1000, or other devices according to the address specified by the instruction and the data, and executes the process specified by the instruction. The CPU 990 stores the execution result data in the RAM 998, the hard disk 1000, a register in the CPU 990, or the like, at an address specified by the program and the data. At this time, the value of the program counter is also updated by the program. The computer program may be directly loaded into the RAM 998 from the DVD 978, the USB memory 984, or via a network. Among the programs executed by the CPU 990, some tasks (mainly numerical calculations) are dispatched to the GPU 992 according to instructions included in the program or according to the analysis results obtained when the CPU 990 executes the instruction.
[0133] The program for implementing the functions of each unit according to each embodiment described above by the computer 970 includes a plurality of instructions written and arranged to operate the computer 970 to implement those functions. Some of the basic functions required to execute the instructions are provided by an operating system (OS) or a third-party program running on the computer 970, or by modules of various tool kits installed on the computer 970. Thus, the program does not necessarily include all of the functions required to implement the system and method of this embodiment. The program only needs to include instructions to execute the operations of each of the above-mentioned devices and their components by calling appropriate functions or functions of a "programming tool kit" in a controlled manner to obtain the desired results. The operation method of the computer 970 for this purpose is well known, so it will not be repeated here. The GPU 992 is capable of parallel processing, and can execute a large amount of calculations associated with machine learning and inference execution in a parallel or pipelined manner simultaneously. For example, parallel computational elements discovered in a program when the program is compiled, or parallel computational elements discovered when the program is executed, are dispatched from the CPU 990 to the GPU 992 at any time and executed, and the results are returned to the CPU 990 directly or via a specified address in the RAM 998 and assigned to a specified variable in the program.
[0134] Seventh Variation In the above embodiment, the number of evaluators is three, but the number is not limited to three, and any number of evaluators can be used. It goes without saying that background knowledge other than the background knowledge 150 shown in Fig. 4 may be used. In that case, the number of multi-BERTs must be increased accordingly.
[0135] The embodiments disclosed herein are merely examples, and the present invention is not limited to the above-described embodiments. The scope of the present invention is indicated by the claims in the claims, taking into consideration the description of the detailed description of the invention, and includes all modifications within the meaning and scope equivalent to the wording described therein. [Explanation of symbols]
[0136] 50 Scenario Generation System 60, 98 Web 62 Causal Relationship Acquisition Unit 64 Scenario Generation Section 66 Causal Scenarios 70 Scenario candidate acquisition processing unit 72 Scenario Ranking Section 90 Causal Relationship of Events 94, 378 WHY background knowledge 96 CLUE Background Knowledge 110, 180 Machine learning models 120, 190, 194, 198, 202, 450 input 124, 206, 454, 510 classification layers 130 Input Layer 132 First Transformer Layer 134 Second Transformer Layer 136 Final Layer 150 Background knowledge 160 Synonyms 220 Training equipment 230 Causal Relation Candidate Memory Unit 232 Thesaurus Memory Unit 234 Binary Pattern Dictionary Storage Unit 236 Web Archive Storage Unit 238 Causal Relationship Assessment Division 240, 480 Evaluation result storage unit 242 Background knowledge extraction part 244 Background knowledge storage section 246, 432, 482 Training Data Creation Department 248, 434, 484 Training data storage 250, 436, 486 BERT Training Department 270, 354 Cause and Result Word Extraction Section 272, 356 Synonym Search Section 274, 358 Background knowledge generation part 278, 368 Question generation part 280, 370 Why-type question answering system 282, 372 Response Collection Department 284, 374 Answer Selection Section 286, 376 Binary Pattern Extraction Unit 300 BP storage unit 302 SIM-BP storage unit 304 SIM-EC storage unit 306 WHY storage section 330 Causal Relation Determination Device 350 possible causal relationships 352 Causal Relationship Candidate Reception Department 360 BP 362 SIM-BP 364 SIM-EC 380 First Input Generation Unit 384 Second Input Generation Unit 388 Third Input Generation Unit 392 4th Input Generation Unit 410, 470 Scenario generation device 420 Causal Relation Memory Unit 422 Scenario Candidate Generation Unit 424 Scenario candidate memory section 426 Scenario Candidate Evaluation Department 428 Majority Section 430 Majority result memory unit 438, 488 Scenario Judgment Section 500 Majority Input 502 First evaluator input 504 Second evaluator input 506 Third evaluator input
Claims
1. A model training device for training a machine learning model, comprising: The machine learning model includes a plurality of neural networks and a classification layer that outputs a classification result based on outputs of the plurality of neural networks; The model training device comprises: a binary pattern dictionary storage means for storing a binary pattern dictionary consisting of a plurality of binary patterns relating to causal relationships, the binary pattern being the shortest path connecting a cause noun and a result noun of a causal relationship in a dependency structure of a text, the cause noun and the result noun being replaced by variables; The method further includes a background knowledge extraction means for extracting, for each of a plurality of causal relationship candidates, a plurality of types of background knowledge related to the causal relationship candidate from a causal relationship database and a document archive, the plurality of types of background knowledge being associated with different ones of the plurality of neural networks for each type; Each of the plurality of causal relationship candidates includes a cause part and an effect part, the cause part includes a cause noun and a predicate of the cause part, and the effect part includes a result noun and a predicate of the result part, further comprising a training data generation means for generating training data for the machine learning model for each of the plurality of causal relationship candidates by using the plurality of types of background knowledge extracted from the causal relationship database and the document archive based on the causal relationship candidate; the training data generation means generates input data for each type of the plurality of types of background knowledge by combining a candidate causal relationship to be processed with one of the background knowledge of the corresponding type extracted based on the candidate causal relationship, and generates the training data by combining the input data generated for each type with an evaluation label for the candidate causal relationship; Further, a training means is provided for training the machine learning model using an output of the classification layer when the training data obtained from the causal relationship candidates for the plurality of types of background knowledge is input to the plurality of neural networks, and the evaluation label of the training data; The background knowledge extraction means a first background knowledge generating means for generating first background knowledge by extracting, for each of the plurality of causal relationship candidates, a binary pattern including a cause noun and a result noun of the causal relationship candidate as a cause noun and a result noun, respectively, from the document archive; a synonym acquisition means for acquiring, for each of the plurality of causal relationship candidates, a synonymous cause noun that is a synonym of a cause noun of the causal relationship candidate and a synonymous result noun that is a synonym of a result noun of the causal relationship candidate; a second background knowledge generating means for generating second background knowledge by extracting, from the document archive, a binary pattern including, as a cause noun, any of the synonymous cause nouns acquired by the synonym acquiring means, and any of the synonyms of the synonymous result noun, for each of the plurality of causal relationship candidates; a third background knowledge generating means for generating third background knowledge by extracting, for each of the plurality of causal relationship candidates, a causal relationship having one of the synonymous cause nouns and one of the synonymous result nouns as a cause noun and a result noun, respectively, from the causal relationship database; a fourth background knowledge extraction means for generating a why-type question from the result portion of each of the plurality of causal relationship candidates, and extracting, as fourth background knowledge, a binary pattern related to the causal relationship, which is extracted from an answer that satisfies a predetermined condition among answers to the why-type question by a why-type question answering system, The multiple types of background knowledge include the first background knowledge, the second background knowledge, the third background knowledge, and the fourth background knowledge.
2. 2. The model training apparatus according to claim 1, wherein the plurality of neural networks includes a plurality of BERTs having the same configuration.
3. The model training device comprises: An evaluation result storage means for storing individual evaluation results by a plurality of evaluators; and a majority vote result storage means for storing a majority vote evaluation result based on the individual evaluation results, The training data generating means For each of the plurality of causal relationship candidates, For each of the individual evaluation results for the causal relationship candidates, 3. The model training device according to claim 1, further comprising: an evaluator-specific training data generation means for generating, for each of the plurality of types of background knowledge extracted from the causal relationship candidates, training data that combines the causal relationship candidate, the background knowledge, an identifier indicating the evaluator, and the individual evaluation result for the causal relationship candidate represented by the identifier; and for each of the plurality of types of background knowledge extracted from the causal relationship candidates, training data that combines the causal relationship candidate, the background knowledge, an identifier indicating the majority vote evaluation result for the causal relationship candidate, and the majority vote evaluation result for the causal relationship candidate.
4. A model training method for training a machine learning model, comprising: The machine learning model includes a plurality of neural networks and a classification layer that outputs a classification result based on outputs of the plurality of neural networks; The model training method includes: a step of storing a binary pattern dictionary consisting of a plurality of binary patterns relating to causal relationships in a binary pattern dictionary storage means, the binary pattern being the shortest path connecting a cause noun and a result noun of a causal relationship in a dependency structure of a text, the cause noun and the result noun being replaced by variables; Further, the method includes a background knowledge extraction step of extracting, for each of a plurality of causal relationship candidates, a plurality of types of background knowledge related to the causal relationship candidate from a causal relationship database and a document archive, wherein the plurality of types of background knowledge are each associated with a different one of the plurality of neural networks; Each of the plurality of causal relationship candidates includes a cause part and an effect part, the cause part includes the cause noun and a predicate of the cause part, and the effect part includes the result noun and a predicate of the result part, further comprising a training data generation step of generating training data for the machine learning model for each of the plurality of causal relationship candidates by using the plurality of types of background knowledge extracted from the causal relationship database and the document archive based on the causal relationship candidate; the training data generating step includes a step of generating input data by combining a candidate causal relationship to be processed with one piece of background knowledge extracted based on the causal relationship for each type of the plurality of types of background knowledge; generating the training data by combining the input data generated for each type with evaluation labels for the causal relationship candidates; The model training method further includes a training step of training the machine learning model using an output of the classification layer when the input data included in the training data is input to a neural network corresponding to a type of the input data among the plurality of neural networks, and the evaluation label of the training data, for each of the training data; The background knowledge extraction step includes: For each of the plurality of causal relationship candidates, a first background knowledge generating step of generating first background knowledge by extracting binary patterns including the cause noun and the result noun of the causal relationship candidate as the cause noun and the result noun, respectively, from the document archive; a synonym acquisition step of acquiring a synonymous cause noun that is a synonym of the cause noun of the causal relationship candidate and a synonymous result noun that is a synonym of the result noun of the causal relationship candidate; a second background knowledge generating step of generating second background knowledge by extracting from the document archive a binary pattern including, as a cause noun, any of the synonymous cause nouns acquired in the synonymous word acquiring step, and any of the synonyms of the synonymous result noun, respectively; a third background knowledge generating step of generating third background knowledge by extracting, from the causal relation database, a causal relation having one of the synonymous cause nouns and one of the synonymous result nouns as a cause noun and a result noun, respectively; a fourth background knowledge extraction step of generating a why-type question from the result portion of the causal relationship candidate, and extracting, as fourth background knowledge, a binary pattern related to the causal relationship extracted from an answer that satisfies a predetermined condition among answers to the why-type question by a why-type question answering system, The model training method, wherein the multiple types of background knowledge include the first background knowledge, the second background knowledge, the third background knowledge, and the fourth background knowledge.
5. A computer program causing a computer to function as the model training device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Scenario generation device, and computer program for the same
JP2015121897A
Causal relation recognition device and computer program therefor
JP2018060364A
