WO2022085533A1 - 回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム - Google Patents

回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム Download PDF

Info

Publication number
WO2022085533A1
WO2022085533A1 PCT/JP2021/037881 JP2021037881W WO2022085533A1 WO 2022085533 A1 WO2022085533 A1 WO 2022085533A1 JP 2021037881 W JP2021037881 W JP 2021037881W WO 2022085533 A1 WO2022085533 A1 WO 2022085533A1
Authority
WO
WIPO (PCT)
Prior art keywords
vector
question
background knowledge
answer
text
Prior art date
Application number
PCT/JP2021/037881
Other languages
English (en)
French (fr)
Inventor
鍾勲 呉
健太郎 鳥澤
ジュリアン クロエツェー
龍 飯田
Original Assignee
国立研究開発法人情報通信研究機構
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 国立研究開発法人情報通信研究機構 filed Critical 国立研究開発法人情報通信研究機構
Priority to US18/031,740 priority Critical patent/US20230385558A1/en
Publication of WO2022085533A1 publication Critical patent/WO2022085533A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification

Definitions

  • the present invention relates to a question answering system, in particular, used in a question answering system that extracts a passage containing an answer from a text archive to generate an answer to a question entered in natural language, and a passage containing a correct answer and a non-correct answer. It relates to a text classifier for answering to classify as a passage, a background knowledge representation generator used in the text classifier for answering, a training device thereof, and a computer program for training the background knowledge representation generator.
  • This application claims priority based on Japanese Application No. 2020-175841 filed on October 20, 2020, and incorporates all the contents described in the Japanese application.
  • Patent Document 1 As a reason-type question answering system using natural language processing, there is one disclosed in Patent Document 1 described later.
  • a plurality of passages consisting of a set of sentences that are likely to be answers (hereinafter referred to as "passage group”.
  • the sentences included in each passage are 5 to 7).
  • the text archive is extracted from the text archive and the most suitable answer to the question is selected.
  • a passage is a sentence consisting of a plurality of consecutive sentences in a text.
  • the reason type question answering system described in Patent Document 1 is also such a system, but as a premise, when a question is given, a plurality of passages that are likely to contain the correct answer to the question are extracted from the text archive and output. Use the answer candidate search system.
  • Patent Document 1 collects and stores a large amount of text existing on the Web in advance. From this web archive, we extract expressions that are thought to represent causal relationships. In the system disclosed in Patent Document 1, a clue word such as "because” or a specific causal relationship pattern such as "A causes B to occur” is used to recognize the causal relationship in the response passage. It is listed.
  • the why type question answering system disclosed in Patent Document 1 further determines whether or not the passage is suitable as an answer to the question from each of the answer passages, the knowledge about the extracted causal relationship, and the question. Extract the feature amount of. Then, the answer passage and the extracted feature amount are input to the pre-trained convolutional neural network (hereinafter referred to as "CNN (Convolutional Neural Network)").
  • CNN Convolutional Neural Network
  • the CNN outputs the likelihood (probability that the question is a question for the answer passage) indicating whether or not the answer passage is suitable as an answer to the question as a score. Why type question answering system ranks answer passages based on the score calculated for each answer passage in this way, and outputs the answer passage with the highest score as the answer to the question.
  • the causal part of the causal relationship expression that has the question in the result part is appropriate as the answer.
  • the most appropriate passage as an answer can be extracted from the answer passage group which is an answer candidate based on the causal relationship expression. Therefore, according to Patent Document 1, it is possible to select a more suitable answer to the type question as compared with the conventional case.
  • background knowledge has been thought to simply refer to passages that are thought to be highly relevant to the question, and the background knowledge is effectively used when actually identifying the answer. It was hard to say.
  • background knowledge can be used to determine with high accuracy whether or not the passage contains the correct answer, and to accurately identify the part that is considered to be particularly related to the question. Is desirable. For that purpose, how to express the background knowledge and how to use it to identify the answer is also an issue.
  • the present invention is a text classifier for specifying an answer and a background knowledge representation generator for that purpose, which can identify an answer candidate for a question with high accuracy by effectively utilizing the background knowledge about the question in order to extract an answer candidate for the question.
  • the purpose is to provide the training equipment as well as computer programs.
  • the text classifier for answer identification includes a linguistic representation model that receives a question text and an answer candidate text as inputs, a knowledge integration transformer that receives the output of the linguistic representation model as an input, and a question.
  • the knowledge integration transformer is configured to receive the background knowledge representation vector as attention, including a background knowledge representation generator that receives the text and the answer candidate text as input and outputs the background knowledge representation vector for the question text. And outputs a label indicating whether the answer candidate text contains an answer to the question text.
  • the knowledge integration transformer contains a plurality of knowledge integration transformer layers
  • the background knowledge representation generator outputs a plurality of background knowledge representation vectors corresponding to each of the plurality of knowledge integration transformer layers
  • the multiple knowledge integration transformer layers The representation vector corresponding to each knowledge integration transformer layer is received as an information source for attention.
  • the background knowledge representation generator has a background knowledge representation generator layer that outputs a background knowledge representation vector in response to an input vector representing a question and an answer candidate, and a background knowledge representation generator layer that outputs an input vector to the background knowledge representation generator layer. It includes an update part that is updated using the background knowledge representation vector output by the representation generator layer to be the next input vector to the background knowledge representation generator layer, and the updater is a preceding input vector to the background knowledge representation generator. Is updated using the degree of association between the background knowledge representation vector output by the background knowledge representation generator in response to the preceding input vector and the preceding input vector.
  • the computer program according to the second aspect of the present invention causes the computer to function as any of the above-mentioned answer-specific text classifiers.
  • the training device is a training device that trains a background knowledge representation generator that outputs a vector representation of background knowledge for a question represented by a question text using a plurality of training data items.
  • Multiple training data items include a question text and a background knowledge text about the question text, and given the question text and the background knowledge text, in the same format as the vector representation of the background knowledge represented by the background knowledge text.
  • a real representation generator consisting of a neural network that generates a real representation vector, a question text, and a random noise vector that represents a vector representation for any text, a vector representation of the above background knowledge generated from the noise vector.
  • a fake representation generator consisting of a neural network that outputs a fake representation vector of the same format, a discriminator consisting of a neural network for discriminating between a real representation vector and a fake representation vector, and a discriminator that minimizes sorting errors.
  • a hostile training device that trains the real representation generator and the discriminator to be, and the fake representation generator, respectively, by hostile learning to maximize the sorting error by the discriminator for the fake representation.
  • the fake representation generator when the training by the training device is completed is the background knowledge representation generator after training, and the output of the fake representation generator when the actual question text and arbitrary text are input is the actual question text. It is an expression vector of background knowledge about arbitrary text.
  • the computer program according to the fourth aspect of the present invention causes the computer to function as the above-mentioned training device.
  • FIG. 1 is a diagram showing an example of an answer passage used in a question answering system.
  • FIG. 2 is a diagram showing an example of background knowledge.
  • FIG. 3 is a diagram showing the relationship between the background knowledge and the response passage.
  • FIG. 4 is a block diagram showing an outline of the configuration of the answer specifying text classifier according to the first embodiment of this application.
  • FIG. 5 illustrates the mechanism of a system for obtaining a background knowledge representation generator (Background Knowledge Representation Generator: BKRG) by training a fake representation generator that creates a background knowledge representation vector from a question using hostile learning. It is a schematic diagram for doing.
  • FIG. 6 is a block diagram showing a basic configuration of an encoder constituting the fake expression generator shown in FIG. FIG.
  • FIG. 7 is a block diagram showing a schematic configuration of a BKRG training system that trains the fake expression generator shown in FIG. 5 to generate a causal relationship BKRG and a tool / purpose relationship BKRG.
  • FIG. 8 is a flowchart showing a control structure of the main routine of the program that realizes hostile learning by the system shown in FIG.
  • FIG. 9 is a flowchart showing a routine control structure for performing parameter learning of the fake expression generator in the program shown in FIG.
  • FIG. 10 is a block diagram showing a schematic configuration of the BERT shown in FIG.
  • FIG. 11 is a block diagram showing a schematic configuration of the BERT transformer layer.
  • FIG. 12 is a block diagram showing a schematic configuration of the knowledge integration transformer layer.
  • FIG. 13 is a block diagram showing a schematic configuration of a multi-head attention portion in the BERT transformer layer shown in FIG.
  • FIG. 14 is a block diagram showing one configuration of the head shown in FIG.
  • FIG. 15 is a tabular diagram showing statistics of why type question answering data.
  • FIG. 16 is a tabular diagram showing statistics of type question answering data.
  • FIG. 17 is a tabular diagram showing the experimental results showing the effect of the answer specifying text classifier according to the first embodiment.
  • FIG. 18 is a schematic diagram showing a processing process of the question answering system according to the second embodiment of this application.
  • FIG. 19 is a tabular diagram showing statistics of experimental data for testing the question answering system according to the second embodiment.
  • FIG. 20 is a tabular diagram showing experimental results showing the effect of the question answering system according to the second embodiment.
  • FIG. 21 is a diagram showing the appearance of a computer system that realizes each embodiment of the present invention.
  • FIG. 22 is a block diagram showing a hardware configuration of a computer system
  • FIG. 1 shows an example of a question 50 and an answer passage 52.
  • the answer passage 52 contains, for example, the sentence "The best way to prevent seasonal flu is to get vaccinated every year.” And “good health habits like wearing face masks and washing your.”
  • human beings since they have background knowledge in advance, it is easy to understand that these parts are suitable as answers to Question 50. However, it is not easy to let a computer perform processing based on such background knowledge.
  • the background knowledge representation generator is trained using semantic relationships such as causal relationships and tool / purpose relationships as training data.
  • Causal relationships are important background knowledge for giving answers to type questions
  • tool / purpose relationships are important background knowledge for giving answers to type questions.
  • FIG. 2 shows as an example of background knowledge 60, two sentences each showing a tool / purpose relationship extracted from different web documents. Prepare a large number of sentences that show the relationship between tools and purposes, as well as sentences that show the causal relationship. By using these sentences to train the background knowledge representation generator, when a type question or how a type question is entered into the question answering system, the question answering system will focus on the passage containing the answer from the passage group. Make it easy to find the part that should be.
  • FIG. 4 shows the configuration of the answer specifying text classifier 90 according to the first embodiment as a block diagram.
  • the answer-specific text classifier 90 is a BERT (Bidirectional Encoder Repression from), which is a linguistic expression model provided to receive an input 100 in which a question and a passage to be contrasted with the question are concatenated. Transformers) 102 is included.
  • BERT102 is a linguistic expression model described in Reference 1 below, and is well known for its easy pre-learning and high performance. The configuration of BERT102 will be briefly described later.
  • the input to BERT102 is placed at the beginning of the class token [CLS] representing the classification, the word string representing the question, the separation token [SEP] placed next, and the separation token. It consists of a word string representing a passage.
  • the length of the input 100 changes depending on the input sentence. Therefore, in this embodiment, the length of the input 100 is fixed to 512, and a predetermined character string is substituted for the insufficient portion.
  • the answer identification text classifier 90 further receives an input of the input 100 in parallel with the BERT 102, and converts each word for the question and the passage in the input 100 into a learned word embedding vector and outputs the vector conversion unit 112.
  • a multi-layered BKRG layer that receives the word embedding vector sequence q of the question text and the word embedding vector sequence p of the passage text converted by the vector conversion unit 112 and outputs the vector group 116 of the background knowledge representation related to the question from each layer.
  • the passage of the input 100 finally includes the answer to the question by performing language processing using the BKRG 114 including the BKRG 114 and the vector group 116 of the background knowledge representation as attention to the output of the BERT 102 provided after the output of the BERT 102.
  • a KI containing a plurality of KI (Knowledge Integration) transformer layers having the same number of layers as the BKRG 114, which outputs an output 106 including a label 108 indicating the above and a start / end position 110 of the answer portion in the passage.
  • transformer 104 includes transformer 104.
  • the KI transformer layer is based on the encoder block of the language model called the transformer described in Patent Document 2, and has been modified as described later with reference to FIG. 11 in order to extract answers based on background knowledge. It is a thing.
  • the BKRG 114 is provided corresponding to each layer other than the N layer BKRG layer 150, 154, ..., 158, and the N layer BKRG layer 150, etc., other than the uppermost BKRG layer 158.
  • N-1 update units 152, 156, ... To perform update processing on the input to the corresponding BKRG layer 150 or the like and give it to the BKRG layer 154 or the like of the next layer.
  • the word embedding vector sequence (q 1 , p 1 ) of the question output by the vector conversion unit 112 and the passage is input to the update unit 152 of the first layer.
  • the update unit 152 performs a predetermined update process on the vector sequence (q 1 , p 1 ) and outputs the updated vector sequence (q 2 , p 2 ). Similarly, a vector sequence (q N , p N ) is given to the BKRG layer 158 in the final stage.
  • the outputs of the BKRG layers 150, 154, ..., 158 are the vectors r 1 , r 2 , ..., R N constituting the vector group 116 of the background knowledge representation.
  • the BKRG layers 150, 154, ..., 158 and the like are pre-trained as described below.
  • the answer-specific text classifier 90 is also trained as a whole, but at that time, the parameters of the BKRG layers 150, 154, ..., 158, etc. are all fixed and are the same. Therefore, the BKRG layers 154, ..., 158 may be created by copying the trained BKRG layer 150, or the BKRG layer 150 may be repeatedly used as the BKRG layers 154, ..., 158.
  • the vector group 116 of the background knowledge representation output by the BKRG layers 150, 154, ..., 158 includes the vectors r 1 , r 2 , ..., R N output from these BKRG layers.
  • the KI transformer 104 like the BKRG 114, includes N KI transformer layers 130, 132, ..., 134. Specifically, the KI transformer 104 receives the output of the BERT 102 and the vector r 1 from the BKRG layer 150 of the same layer in the BKRG 114, the KI transformer layer 130, the output of the KI transformer layer 130 and the vector from the BKRG layer 154. One or more of the KI transformer layer 132 that receives r2 and one or more connected so as to receive the output of the KI transformer layer of the layer directly below and the vector r from the BKRG layer of the same layer at BKRG 114, respectively. Includes a KI transformer layer.
  • the KI transformer layer of the Nth layer of the uppermost layer receives the output from the KI transformer layer (not shown) of the lower N-1 layer and the vector r N output from the BKRG layer 158 of the Nth layer.
  • the KI transformer layer 134 that outputs the output 106.
  • the BKRG layers 150, 154, ..., 158 all have the same configuration, and their parameters are also the same. In practice, after training the BKRG layer 150, the BKRG layer 154, ..., 158 may be calculated by copying the BKRG layer 150 or using the BKRG layer 150 repeatedly. Therefore, only the BKRG layer 150 will be described below with its configuration and training method. Considering that the input should be to the KI transformer layer 130, it is desirable that the background knowledge is in some vector form. However, if the background knowledge is expressed as a vector, there is almost no clue to specify what kind of content should be expressed in what format.
  • GAN Generative Adversarial Network
  • FIG. 5 shows a basic configuration for training the BKRG layer 150 by GAN.
  • the GAN 180 uses pre-prepared training data items, each containing a question 190 and background knowledge 192 about the question, from question 190 and background knowledge 192, referred to as a real representation 196.
  • a real expression generator 194 that generates a vector expression
  • a fake expression generator 200 that generates a fake expression 202 called a fake expression 202 by sampling a noise 198 that represents an arbitrary text
  • a real expression 196 or a fake expression 202 It includes a classifier 204 for receiving input, classifying whether they are genuine or fake, and outputting a sorting result 206.
  • the real expression generator 194, the fake expression generator 200, and the separator 204 are all neural networks.
  • the fake expression generator 200 receives the word embedding vector conversion unit 224 that receives the noise 198 and converts it into the word embedding vector string 226 of the noise, and receives the question 190 and converts each word constituting the question 190 into words. It includes a word embedding vector conversion unit 220 that converts to a vector and outputs the word embedding vector sequence 222 of the question.
  • the fake expression generator 200 further adds the attention from the word embedding vector column 222 of the question to each vector of the word embedding vector column 226 of noise, and outputs the word embedding vector string 230 with attention modified by the attention. It includes an adder 228 and a CNN232 that has an input that receives the word embedding vector sequence 230 with attention and is trained to output a fake expression 202 that is a vector representation of question 190.
  • the real expression generator 194 shown in FIG. 5 also has the same configuration as the fake expression generator 200 including the CNN232.
  • the real expression generator 194 differs from the fake expression generator 200 in that the object of encoding is not the noise 198 but the background knowledge 192.
  • the separator 204 shown in FIG. 5 is a feedforward network having a logistic regression layer having a sigmoid function as an activation function in the final layer.
  • the real expression 196 or the fake expression 202 is input to the sorter 204.
  • the classifier 204 has two outputs, for example, when it is determined that the input is genuine representation 196, one is true and the other is false, and when it is determined that the input is fake representation 202, one is false and the other is true. Trained to be.
  • the real expression generator 194 and the classifier 204 make the real expression 196 distinguishable from the fake expression 202 (to minimize the error in sorting), and the fake expression generator 200 makes the fake expression 202 indistinguishable from the real expression 196.
  • these three networks are trained by hostile learning. That is, these three networks are trained according to the following equation.
  • b background knowledge
  • q question
  • z noise
  • D separator 204
  • F fake expression generator 200
  • R real expression generator 194
  • R (b; q) is given background knowledge b and question q.
  • the output of the real expression generator 194 (real expression 196), F (z; q) is the output of the fake expression generator 200 when the noise z and the question q are given (the fake expression 202), and db is the background.
  • Knowledge b represents the distribution according to
  • d z represents the distribution according to the noise z
  • E represents the expected value.
  • the training of the fake expression generator 200 is terminated when the determination of the separator 204 is finally 50% or when the learning of the specified number of repetitions is completed. This is based on game theory, and eventually the Nash equilibrium is reached, and the probability that the sorter 204 correctly sorts is 50%. If the fake expression 202 is generated from the question 190 and the noise using the fake expression generator 200 trained in this way, the fake expression 202 is distinguished from the real expression 196 generated by the real expression generator 194 from the question 190 and the background knowledge 192. It becomes something that cannot be done.
  • the output of the fake expression generator 200 outputs an expression as if the background knowledge was given to the fake expression generator 200 together with the question. Since this output is no longer appropriate to be called a fake representation, it is referred to below as the background knowledge representation vector.
  • the fake representation generator 200 after the training is also referred to as a background knowledge representation generator (BKRG).
  • BKRG background knowledge representation generator
  • the number of elements of the background knowledge representation vector is determined in advance so as to be the maximum number of elements of these vectors obtained from the training data.
  • Training by GAN180 is realized by computer hardware and a computer program (hereinafter referred to as "program") executed by the computer hardware. It is necessary to prepare training data for the training.
  • This embodiment provides a question answering system capable of answering both types of questions, why type questions and how type questions. For that purpose, it is necessary to prepare two BKRGs, a causal relationship BKRG and a tool / purpose relationship BKRG. In this embodiment, these outputs are concatenated to form one BKRG output.
  • FIG. 7 shows a schematic configuration of a training system for collecting training data and training BKRG.
  • this BKRG training system 240 collects a large amount of texts representing causal relationships from the Internet 250 and uses them to train the causal relationship BKRG 256 from the causal relationship BKRG training unit 252 and the Internet 250. It includes a tool / purpose-related BKRG training unit 254 that collects a large amount of texts representing tools / purpose-related and trains the tool / purpose-related BKRG258 using them.
  • the causal relationship BKRG training unit 252 includes a causal relationship extraction unit 270 that extracts texts representing causal relationships from the Internet 250, a causal relationship storage device 272 that stores texts extracted by the causal relationship extraction unit 270, and a causal relationship storage device.
  • the causal relationship learning data generation unit 274 for generating the learning data of the causal relationship BKRG256 by extracting and combining the question unit and the background knowledge unit from each of the causal relationships stored in 272, and thus generated.
  • the causal relationship BKRG256 is trained by hostile learning using the causal relationship learning data storage device 276 for storing the learning data and the learning data obtained from the causal relationship stored in the causal relationship learning data storage device 276. Includes Causality BKRG Training Department 278 for.
  • the causal relationship learning data generation unit 274 generates learning data from the causal relationship as follows.
  • a causal relationship consists of a causal part and a consequent part that represents the effect.
  • the consequent part is the question part
  • the cause part is the background knowledge part.
  • a causal relationship consider that "most people do not have antibodies against the new influenza virus (cause part), so a global pandemic and the associated social impact can occur (result part)".
  • the question “Why can a global pandemic and the associated social impact occur?"
  • From the consequent part becomes the question part, and the cause part "Most people have antibodies against the new influenza virus." "Because there is no" is the background knowledge department.
  • the tool / purpose relationship BKRG training unit 254 stores the tool / purpose relationship extraction unit 280 that extracts the text representing the tool / purpose relationship from the Internet 250 and the tool / purpose relationship extraction unit 280 that stores the text extracted by the tool / purpose relationship extraction unit 280.
  • the tool / purpose relationship learning data generation unit 284 generates learning data from the tool / purpose relationship as follows.
  • the tool / purpose relationship consists of a tool part and a purpose part.
  • the purpose department is the question department
  • the tool department is the background knowledge department.
  • the question "What should I do to prevent influenza infection when going to a crowded place?" Obtained from the target department becomes the question department, and the "wearing a mask" in the tool department becomes the background knowledge department.
  • the causal relationship BKRG256 and the tool / purpose relationship BKRG258 are trained separately in this way.
  • the same question is given to both the causal relationship BKRG256 and the tool / purpose relationship BKRG258 from the same question, and the vectors obtained from these are connected to form a background knowledge representation vector. That is, one BKRG is an arrangement of the causal relationship BKRG256 and the tool / purpose relationship BKRG258.
  • FIG. 8 is a flowchart showing the control structure of the program that realizes the training by GAN180.
  • the causal relationship BKRG256 and the tool / purpose relationship BKRG258 shown in FIG. 7 can be trained separately.
  • a program for realizing the training of the causal relationship BKRG256 will be described, but the same program may be used when training the tool / purpose relationship BKRG258.
  • the program communically connects the computer to the causal relationship learning data storage device 276 shown in FIG. 7, step 300, and the fake representation generator 200, the real representation generator 194, and the classification shown in FIG. It is determined whether or not the training end condition is satisfied as a result of step 304 and step 304 in which the training of the device 204 is performed by hostile learning between the real expression generator 194 and the classifier 204 and the fake expression generator 200.
  • the parameters of the fake expression generator 200 at that time are stored in a predetermined storage device. Includes step 308 and to end the execution of this program. If the determination in step 306 is negative, control returns to step 304. Therefore, step 304 is repeated until the end condition is satisfied.
  • Step 308 may allow the user to specify a file name and storage location for the parameters.
  • the program that realizes the hostile learning in step 304 of FIG. 8 is step 320, fake, sampling a plurality of samples consisting of a combination of a question and the background knowledge corresponding to the question from the training data.
  • the real representation 196 generated by the real representation generator 194 is a fake and the fake representation generator 200 is a fake.
  • the parameters of the sorter 204 and the real representation generator 194 are set.
  • the fake expression generator 200 generates a fake expression 202 from the fixing step 326 and the question 190 and the noise by the fake expression generator 200, and maximizes the probability that the classifier 204 erroneously determines the fake expression 202 as the real expression. Includes step 328 for learning the parameters of.
  • FIG. 10 shows a schematic configuration of BERT 102. It is known that BERT functions as a linguistic expression model that can be easily pre-learned and fine-tuned to perform translation with extremely high accuracy, for example, and to extract related parts for question answering. Has been done.
  • the BERT 102 includes a plurality of BERT transformer layers 602, 604, ..., 606 arranged in series in the same configuration as each other. All of these have the same configuration as the encoder block of the transformer like the KI transformer layer 130 and the like, and only a small part of the configuration is different from the KI transformer layer 130 and the like. Here, it is called a BERT transformer layer in order to distinguish it from the KI transformer layer.
  • the BERT transformer layer 602 receives the input word embedding vector string 600 as an input, and the BERT transformer layer 604 receives the output of the BERT transformer layer 602 as an input, and so on.
  • the word string 608 output by the final BERT transformer layer 606 is an input to the KI transformer 104.
  • the input word embedding vector sequence 600 is described so as to be collectively given to the BERT 102. However, in reality, the input word embedding vectors constituting the input word embedding vector string 600 are sequentially input to the BERT 102, and the word string 608 is also output in order.
  • the input to each subnet and its output is a vector of constant length, eg a 512-dimensional vector.
  • the length of this vector is chosen to be greater than the number of words in the longest input sentence to be processed.
  • the answer specifying text classifier 90 shown in FIG. 4 constitutes one neural network as a whole.
  • the fine tuning of the entire text classifier 90 for answer identification is performed by manually creating a pair of a question and an answer candidate passage, a label indicating whether or not the answer candidate passage includes an answer to the question, and the label thereof.
  • the update part of the BERT102, the KI transformer 104, and the BKRG114 is learned by the usual backpropagation method.
  • training of the BKRG layers 150, 154, ..., 158, etc. is completed, and the parameter values of the BKRG layers 150, 154, ..., 158 are fixed during the fine tuning.
  • the BERT 102 and the KI transformer 104 shown in FIG. 4 use an encoder block of a high-performance neural network model often used as a language model of a natural language called a transformer as a basic block (KI transformer of FIG. 4).
  • FIG. 11 shows an outline of the configuration of the BERT transformer layer
  • FIG. 12 shows an outline of the configuration of the KI transformer layer.
  • the BERT transformer layer and the KI transformer layer are almost the same as each other, only a part thereof is different.
  • a word conversion unit that converts an input sentence into a word embedding vector string by converting each word in the input sentence into a word embedding vector having a numerical value as an element.
  • a position encoder that encodes the position information indicating the position in the input sentence of the corresponding word is provided.
  • the output of the BERT transformer layer 602 is an input to the BERT transformer layer 604, and the same applies hereinafter.
  • the BERT 102 and the KI transformer 104 are connected so that the output of the final BERT transformer layer 606 of the BERT 102 becomes the input of the KI transformer layer 130 of the KI transformer 104.
  • the output stage of the KI transformer 104 is provided with a linear transformation subnet and a SoftMax layer in this order.
  • the SoftMax layer gives the probability of each output word.
  • the BERT transformer layer 602 receives the input 340, which is a word embedding vector string, and encodes the input 340 into a vector representation with self-attention.
  • a word embedding vector sequence is a series of word embedding vectors having the same configuration, and can be considered as a word embedding vector matrix depending on the viewpoint. In transformers, operations between matrices of vector sequences obtained for multiple words play an important role.
  • the self-attention means an attention to the input 340 by the same input 340. For example, the self-attention to a specific word of the input 340 is calculated by using the attention from all the other words of the input 340.
  • the BERT transformer layer 602 includes an encoder subnet 436 having a two-layer structure.
  • the encoder subnet 436 includes a first layer subnet 440 that receives the input 340 and a second layer subnet 442 that receives the output of the first layer subnet 440 and produces the output of the BERT transformer layer 602.
  • the first layer sub-network 440 receives the word embedding vector sequence 340, and uses these word embedding vector sequences 340 to calculate the self-attention regarding the corresponding word for each input word embedding vector, and from those attentions.
  • the word embedding vector string that is the input of the multi-head attention subnetwork 450 to each attention vector in the attention vector string output by the multi-head attention subnetwork 450 that outputs the attention vector string and the multi-head attention subnetwork 450.
  • Includes ADD & Norm subnetwork 452 that performs layer normalization after adding the corresponding word embedding vectors.
  • the multi-head attention subnet 450 uses a matrix consisting of a word embedding vector sequence, which is an input to the BERT transformer layer 602, by branching it into three. These three inputs are referred to as V (value), K (Key), and Q (Query) in order from the left in FIG. Details of the multi-head attention subnet 450 will be described later with reference to FIG.
  • the second layer subnet 442 is output to the fully connected subnet 460 including the fully connected feed forward network provided corresponding to each word position and the output of the fully connected subnet 460, which is output by the ADD & Norm subnet 452.
  • the ADD & Norm subnetwork 462 which performs the same processing as the ADD & Norm subnetwork 452 is included.
  • the output of the ADD & Norm subnet 462 is a word embedding vector string of the same length as the input to the BERT transformer layer 602.
  • the word embedding vector column can be thought of as a matrix having the word embedding vector as each row. Therefore, in practice, each operation in the BERT transformer layer 602 is executed as a matrix operation.
  • the KI transformer layer 130 shown in FIG. 12 has the same configuration as the BERT transformer layer 602 and the like. However, in the BERT transformer layer 602 and the like, instead of using the matrix Q obtained by branching the input in the previous stage, the BKRG layer (for example, the BKRG layer 150 shown in FIG. 1) corresponding to the KI transformer layer 130 is used. It differs from the BERT transformer layer 602 in that the background knowledge representation vector r output from is used. As for V and K, the output of the previous stage is branched and used as in the BERT transformer layer 602.
  • the KI transformer layer 130 includes an encoder subnet 476 having a two-layer structure.
  • the encoder sub-network 476 includes a first-layer sub-network 492 and a second-layer sub-network 494, similar to the encoder sub-network 436 of the BERT transformer layer 602.
  • the first layer sub-network 492 receives in order the word embedding vector strings received from the previous stage (in the case of the KI transformer layer 130, the output of BERT 102), and for each word embedding vector input using these word embedding vector strings.
  • the multi-head attention sub-network 510 that calculates the attention using the background knowledge expression vector related to the corresponding word and outputs the attention vector sequence consisting of those attentions, and the attention vector sequence output by the multi-head attention sub-network 510.
  • Each attention vector includes an ADD & Norm subnetwork 512 that performs layer normalization after adding the corresponding word embedding vector in the word embedding vector sequence that is the input of the multihead attention subnetwork 510.
  • the multi-head attention subnet 510 uses the matrix which is the input from the previous stage by branching it into two, V and K.
  • the Q input to the multi-head attention subnet 510 is r 1 given from the BKRG layer 150 (FIG. 4) of the same layer.
  • Q is a matrix (vector sequence)
  • r 1 is a vector. Therefore, it is not possible to perform a desired operation in the configuration as it is. Therefore, in this embodiment, as will be described later, the vector r 1 and the like are converted into a matrix having the same format as Q.
  • the second layer subnet 494 is output to the fully connected subnet 520 including the fully connected feed forward network provided corresponding to each word position and the output of the fully connected subnet 520, which is output by the ADD & Norm subnet 512.
  • the ADD & Norm subnetwork 522 that performs the same processing as the ADD & Norm subnetwork 462 is included.
  • the output of the ADD & Norm subnet 522 is a word embedding vector string having the same length as the input to the BERT transformer layer 602, and is an input to the KI transformer layer 132 (see FIG. 4).
  • FIG. 13 shows a schematic configuration of the multi-head attention subnet 450 shown in FIG. 11 in a general transformer.
  • the multi-head attention subnet 510 shown in FIG. 12 also uses the vector r instead of the matrix Q, and has a similar configuration, although there are differences in the calculation processing shown in the following equations 2 and 3.
  • the multi-head attention subnet 450 has a header unit 540 including a plurality of parts called headers, and a vector connection unit 542 connecting vectors output from the plurality of headers of the header unit 540. It includes a linear transformation subnet 544 that performs a linear transformation on the output of the vector coupling unit 542.
  • the header unit 540 receives a plurality of (h) headers 550 and three inputs obtained by branching a vector matrix which is an input from the lower layer for each header 550, and learns the value of each element in advance for them. Includes three linear transformation subnetworks 552 for performing linear transformations with the resulting matrices to generate three matrices V, K and Q and feeding them to each of the h headers of the header 550.
  • the background knowledge representation vector r is matrixed as described later.
  • the header 550 is a division circuit that divides the matrix obtained by the matrix product subnetwork 560 and the matrix product subnetwork 560 that perform multiplication between the matrix Q and the matrix K by a predetermined constant. 562 and including.
  • the header 550 is further a matrix product subnetwork that performs multiplication between the SoftMax layer 566 that performs SoftMax conversion on the matrix scaled by the division circuit 562, and the matrix after SoftMax and the matrix V after linear conversion by the SoftMax layer 566. Includes 568.
  • the matrix obtained from the matrix product sub-network 568 of h headers 550 is concatenated by the vector connecting unit 542.
  • the h headers 550 have the same configuration, but they are each randomly initialized during learning. As a result, these parameters after training are different from each other, and different results are obtained from h headers 550.
  • the vector r is converted into a matrix having the same format as Q by the following equation, and the above calculation is performed.
  • J 1 and dk are dk -dimensional vectors in which all elements are 1, and the symbol immediately before V on the right side represents multiplication (Hadamard product) for each element of the matrix.
  • the SoftMax operation converts a value indicating how much attention should be paid to the corresponding token so that the total total is 1.
  • r needs to be a vector of d k dimension
  • the output vector r BKRG of the actual BKRG may be less than d k dimension.
  • the vector rBKRG is converted into a dk-dimensional vector r by an operation according to the following equation.
  • the update units 152, 156, ... Shown in FIG. 4 are a part of the whole neural network and have the same configuration as each other.
  • the update unit 152 receives the word embedding vector sequence (q 1 , p 1 ) of the input question and passage.
  • This word embedding vector sequence is obtained by performing embedded vectorization learned in advance for each word of a question and a passage, and concatenating the obtained vectors.
  • the BKRG layer 150 responds to this vector sequence (q 1 , p 1 ) and processes it to generate a background knowledge vector r 1 for question q 1 for input to the KI transformer layer 130.
  • the update unit 152 uses the degree of association between the background knowledge vector r 1 and the vector sequence (q 1 , p 1 ) that was the input to the BKRG layer 150 to display the vector sequence (q 1 , p 1 ). It is updated to generate a vector sequence (q 2 , p 2 ), which is given to the next BKRG layer, the BKRG layer 154 and the update unit 156.
  • the BKRG layer 154 responds to this vector sequence (q 2 , p 2 ) and processes it to generate a new background knowledge vector r 2 , which is used as an input to the KI transformer layer 132.
  • the update unit 156 updates the vector sequence (q 2 , p 2 ) using the degree of association between the background knowledge vector r 2 and the vector sequence (q 2 , p 2 ) to generate the vector sequence (q 3 , p 3 ). Then, it is used as an input to the next BKRG layer. The same applies hereinafter.
  • it is calculated in the i-th BKRG layer as shown by the following equation.
  • the word embedding vector ⁇ x i j weighted by this relevance is obtained.
  • x i + 1 (x i + 1 is either q i + 1 or p i + 1 ) is calculated in highway network format (reference 3) using ⁇ x i and x i as follows.
  • the answer-specific text classifier 90 described above operates as follows. In the following explanation, it is assumed that BERT102 has already been pre-learned in Japanese. Further, in the fine tuning of the entire text classifier 90 for specifying the answer shown in FIG. 4, as described above, the pair of the question and the passage created in advance by hand or the like and whether or not the passage includes the answer to the question are checked.
  • the training data is used as a set of the label shown and the label showing the start position and the end position of the answer part, and is performed by the usual backpropagation method. Prior to this fine tuning, training of the BKRG layers 150, 154, ..., 158, etc. is completed, and the parameter values of the BKRG layers 150, 154, ..., 158 are fixed during the fine tuning.
  • the fake representation generator 200 is trained by hostile learning in conjunction with the real representation generator 194 and the separator 204 shown in FIG.
  • the causal relationship extraction unit 270 and the tool / purpose relationship extraction unit 280 shown in FIG. 7 collected texts showing the causal relationship and the tool / purpose relationship from the Internet 250, respectively, and the causal relationship storage device 272 and the tool / purpose relationship. It is stored in the purpose-related storage device 282.
  • the causal relationship learning data generation unit 274 and the tool / purpose relationship learning data generation unit 284 are composed of the causal relationship text and the tool / purpose relationship text stored in the causal relationship storage device 272 and the tool / purpose relationship storage device 282, respectively.
  • Causal relationship learning data and tool / purpose relationship learning data are generated, respectively, and stored in the causal relationship learning data storage device 276 and the tool / purpose relationship learning data storage device 286, respectively.
  • the causal relationship BKRG training unit 278 trains the causal relationship BKRG 256 using the causal relationship learning data stored in the causal relationship learning data storage device 276, and the tool / purpose relationship BKRG training unit 288 stores the tool / purpose relationship learning data.
  • the tool / purpose relationship BKRG258 is trained using the tool / purpose learning data stored in the device 286.
  • a computer is connected to the causal relationship learning data storage device 276. Specifically, the computer opens a file containing the causal relationship learning data existing in the causal relationship learning data storage device 276 realized by the external storage device, reads out the contents thereof, and stores them in the memory. Alternatively, the causal relationship learning data is read from the database storing these and stored in the memory (step 300).
  • a plurality of pairs of the question 190 and the background knowledge 192 for the question are sampled from the learning data (step 320).
  • the parameters of the fake expression generator 200 are fixed (step 322).
  • the real expression generator 194 uses the sampled question 190 and the background knowledge 192 for the question 190, the real expression generator 194 generates the real expression 196 and gives it to the separator 204.
  • the fake expression generator 200 generates a fake expression 202 using the same question 190 and randomly generated noise and gives it to the separator 204.
  • the sorter 204 determines whether the genuine expression 196 and the fake expression 202 are genuine or not, respectively.
  • step 324 the erroneous determination of the classifier 204 for this data is minimized, that is, the real expression 196 is erroneous as a fake and the fake expression 202 is erroneous as a real one.
  • the parameters of the fake expression generator 200 fixed so that the probability of determination is small, the parameters of the separator 204 and the real expression generator 194 are trained by the error back propagation method.
  • the parameters of the sorter 204 and the real expression generator 194 are fixed (step 326). While the parameters of the separator 204 are fixed, the fake expression generator 200 is trained using the question 190 and the randomly generated noise 198 (step 328). Specifically, the fake expression generator 200 generates the fake expression 202.
  • the classifier 204 determines whether or not the fake expression 202 is a genuine expression. This determination is made for a plurality of questions 190 so that the parameters of the fake expression generator 200 are maximized by the classifier 204, that is, the probability that the classifier 204 determines the fake expression 202 as a real expression increases. As described above, the parameters of the sorter 204 and the real expression generator 194 are fixed and the parameters of the fake expression generator 200 are adjusted.
  • the real expression / fake expression by the real expression generator 194 and the separator 204 and the fake expression generator 200 eventually reaches the Nash equilibrium in the game theory, and the judgment result by the separator 204 is 50% correct. , The misjudgment reaches 50%. Or it reaches a certain state close to the Nash equilibrium.
  • step 306 it is determined whether or not the accuracy of the determination of the separator 204 has reached the state of this Nash equilibrium or a constant state close to the Nash equilibrium. If the determination result is negative, the control returns to step 304 and continues hostile learning of the real expression generator 194, the fake expression generator 200, and the separator 204. If the determination result in step 306 is affirmative, the parameter of the fake expression generator 200 is stored in the storage device in step 308, and the process ends.
  • the causal relationship BKRG256 of this embodiment is obtained by the parameters of the fake expression generator 200 and the program that realizes the network structure of the fake expression generator 200.
  • the tool / purpose relationship BKRG258 can also be used. It can be obtained in the same way.
  • the BKRG layers 150, 154, 158, etc. shown in FIG. 4 are all obtained by connecting the causal relationship BKRG256 and the tool / purpose relationship BKRG258, and the outputs of both are connected to form a vector from the BKRG layer 150, etc. Output as r1 etc.
  • BERT102 pre-learning is performed by preparing a large number of sentences for pre-learning in advance, inputting one of those sentences with any one word deleted, and predicting that word. Will be done. In this method, there is no need to process the data to create so-called training data.
  • the pre-learning of the BERT 102 and the fine tuning of the text classifier 90 for specifying the answer are performed as described above. Therefore, the details are not repeated here.
  • the usual backpropagation method may be used, paying attention to the fact that the parameters of the BKRG layers 150, 154, ..., 158 are fixed.
  • the BERT 102 processes the input 100 according to the parameters after training and gives an output to the KI transformer layer 130.
  • the vector conversion unit 112 converts the questions and passages included in the input 100 into word embedding vector sequences, concatenates them, and gives them to the BKRG layer 150 and the update unit 152.
  • the BKRG layer 150 uses the word embedding vector sequence q 1 of the question as a question, processes the word embedding vector sequence p 1 of the passage as the noise 198 of FIG. 5, and generates a vector r 1 for the question. It is given to the KI transformer layer 130.
  • the KI transformer layer 130 performs an operation on the output of the BERT 102 using the vector r1 given from the BKRG layer 150 as an attention (matrix Q), and gives the result to the KI transformer layer 132. At this time, the vector r 1 is used to make the KI transformer layer 130 carefully read the part that is likely to be an answer when analyzing the target passage.
  • the update unit 152 uses the vector r 1 output by the BKRG layer 150, and embeds the word embedding vector sequence (q 1 , p 1 ) output by the vector conversion unit 112 using the conversion formula already described.
  • the vector sequence (q 2 , p 2 ) is updated and given to the BKRG layer 154 and the update unit 156.
  • the BKRG layer 154 processes q 2 of the word embedding vector sequence (q 2 , p 2 ) as a question, treats p 2 as noise 198 in FIG. 5, generates a vector r 2 for the question, and gives it to the KI transformer layer 132.
  • the KI transformer layer 132 performs an operation on the output of the KI transformer layer 130 with the vector r 2 given from the BKRG layer 154 as an attention (matrix V and K), and the result is further KI in the subsequent stage. Give to the transformer layer. At this time, the vector r 2 is used to make the KI transformer layer 132 carefully read the part that is likely to be an answer when analyzing the target passage.
  • the vector r N is given to the KI transformer layer 134 from the BKRG layer 158.
  • the KI transformer layer 134 performs processing with the vector r N as an attention on the output of the KI transformer layer in the previous stage, and outputs the result as an output 106.
  • a label indicating whether or not the passage constituting the input 100 includes an answer to the question constituting the input 100 is output, and each passage of the output 106 is output.
  • the start position and the end position of the answer word string are shown as probabilities.
  • the label and the answer specifying text classifier 90 for obtaining the start position and the end position of the answer are described as one.
  • the present invention is not limited to such embodiments, and these may be trained and used separately.
  • the fake expression generator 200 of FIG. 5 (as the learning data for hostile learning of the BKRG layers 150, 154, ..., 158 of FIG. 4, causal relationship data (obtained by the method described in Reference 4 below) and tools.
  • -Purpose-related data (acquired by the method described in Reference 5) was used.
  • This causal-related data includes about 100 million causal-related data automatically acquired from 4 billion web texts. In the experiment. One million of these were randomly sampled.
  • the tool / purpose data includes about 120 million tool / purpose-related data automatically acquired from 400 million web texts. In the experiment, one million of these were randomly sampled.
  • BERT LARGE was used for BERT 102.
  • the batch size at the time of learning 4,096, and the number of learning steps was 1.1 million.
  • Figure 17 shows the results of this experiment in tabular form.
  • the result 636 described as “Proposed” in the fourth line of the result column is the result by the system according to the above embodiment.
  • P @ 1 (Precision at top answer)” indicates the highest accuracy in the result of ranking for each question.
  • MAP Mel Age Precision
  • the result 630 in the result column shows the method described in Reference 6 below (CNN and Answer Presentation Generator (ARG)).
  • the result 632 in the result column shows the result when only BERT is used.
  • the result 634 in the result column uses the presentation output by the BKRG of the above embodiment as the input of the final SoftMax layer in the method using the BERT of the result 632. It is the result of using the added one.
  • the result 638 or less in the result column is the one obtained by removing some elements from the method according to the above embodiment shown in the result 636.
  • the result 638 is obtained by removing the question and the update of the passage pair by the update unit 152, 156, etc. shown in FIG.
  • the result 640 is the result when the causal relationship BKRG is removed from the method according to the above embodiment.
  • the result 642 is the result when the tool / purpose relation BRKG is removed.
  • the performance of the result 636 is higher than that of the results 638, 640 and the result 642. Therefore, a method for updating a question and a passage, such as the update unit 152 and the BKRG layer 154 shown in FIG. 4, a method that does not use a causal relationship or a tool / purpose relationship in the BKRG layer 150, 154, ..., 158, etc. It can be seen that all of the above contribute to the performance improvement of the above-described embodiment as shown by the result 636.
  • the answer-specific text classifier 90 according to the first embodiment applies the present invention to the Japanese why type question and how type question.
  • the present invention is applicable not only to Japanese but also to other languages such as English, and is also applicable to an open domain question answering system as well as a specific domain.
  • the question answering system according to the second embodiment relates to a question answering system that performs a question answering task in an English open domain.
  • This task is to receive a question, select a passage that is likely to contain the answer to the question, and then extract the answer from that passage.
  • the main question type is what type question. Answers often consist of words and noun phrases. What type question answers tend to be shorter than why type questions and how type question answers.
  • this task 750 is a task of receiving a question 760, searching for a plurality of passages 764, and extracting answers 774 from the passages 764. More specifically, the question-and-answer system for this task 750 includes a paragraph selector 766 that selects a set of paragraphs 768 that are likely to contain answers from the passage, and a paragraph selector 768 that is selected by the paragraph selector 766. Given the question 760, it includes a paragraph reader 770 that calculates a set of answer candidates 772 consisting of the word strings most likely to be the answer to the question 760. Answer 774 is extracted from this set of answer candidates 772.
  • DS-QA Distantly supervised open-domin QA
  • An exemplary question answering system for performing task 750 includes search 762 that receives question 760 and searches and retrieves passages 764 that may contain potential answers from the text archive.
  • Task 750 further selects from each of the paragraphs p 1 , ..., P N contained in passage 764 a paragraph that is likely to contain the correct answer, and a paragraph selector 766 for generating a set of paragraphs 768.
  • the paragraph reader 770 that extracts the part that seems to be the answer from each of the paragraphs included in the paragraph set 768 and generates the answer candidate set 772, and the answer that has the highest probability of being the correct answer to the question 760 from the answer candidate set 772. Includes a set of answer candidates 772 that outputs the candidates as answer 774.
  • q, P) of each answer a in the set of answer candidates 772 is defined as follows. Will be done. Where ap represents a paragraph containing the answer.
  • the second term corresponds to paragraph selector 766 and represents the probability that paragraph pi contains the answer to question q.
  • the first term corresponds to the paragraph reader 770 and shows the probability of extracting the answer a of the question q from the paragraph pi.
  • the paragraph selector 766 and paragraph reader 770 described in the first embodiment can be used.
  • the paragraph selector 766 has the same configuration as that described in the first embodiment, and has a value indicating whether or not the paragraph includes an answer to the question as a label for the combination of the question and each paragraph.
  • the paragraph reader 770 uses training data having the start part of the answer as a label and training data having the end part of the answer as a label for the combination of the question and the paragram containing the correct answer to the question.
  • Two answer-specific text classifiers 90 trained in the above can be used.
  • FIG. 19 shows the statistics of the training / evaluation data used in this experiment.
  • Results 800, 802 and Results 804 show the results of the conventional system.
  • the result 800 shows the result by the system based on LSTM (Long Short-Term Memory) according to the above-mentioned reference 11.
  • the result 802 is a combination of the system of Reference 11 and the ARG introduced by Reference 6, which is also based on LSTM.
  • the result 804 is based on MBERT, which is the system with the highest performance in the prior art.
  • the result 806 shows the result by the paragraph selector 766 and the paragraph reader 770 of the second embodiment.
  • the result 808 is the result when BKRG is not used in the second embodiment.
  • Result 810 shows the result when BKRG was used but the question / passage pair was not updated.
  • the result 812 shows the result when the paragraph selector 766 and the paragraph reader 770 of FIG. 18 are trained by adding the SQuaAD data described in Reference 13 to the training data. However, in the result 812, BKRG is not used.
  • EM indicates the rate of prediction results that exactly match any of the true answers (ground truth).
  • F1 roughly shows the average overlap between the prediction result and the true answer.
  • the background knowledge representation generator according to the present invention shows high performance for different tasks in different languages as compared with the prior art, and is effective in a question answering system. It turns out that.
  • BERT is used as the language expression model used for the text classifier for specifying the answer, but it is not limited to BERT.
  • BERT is used as the language expression model used for the text classifier for specifying the answer, but it is not limited to BERT.
  • XLNet Reference 14
  • RoBERTa Reference 15
  • ALBERT Reference 16
  • StructBERT Reference 17
  • FIG. 21 is an external view of a computer system that realizes each of the above embodiments.
  • FIG. 22 is a hardware block diagram of the computer system shown in FIG.
  • the computer system 950 includes a computer 970 having a DVD (Digital Versaille Disc) drive 1002, a keyboard 974, a mouse 976, and a monitor, both connected to the computer 970, for interacting with the user. Includes 972 and.
  • DVD Digital Versaille Disc
  • the computer 970 includes a computer 970 having a DVD (Digital Versaille Disc) drive 1002, a keyboard 974, a mouse 976, and a monitor, both connected to the computer 970, for interacting with the user. Includes 972 and.
  • DVD Digital Versaille Disc
  • the computer 970 includes a CPU (Central Processing Unit) 990, a GPU (Graphics Processing Unit) 992, and a bus 1010 connected to the CPU 990, GPU 992, and DVD drive 1002.
  • a CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • a bus 1010 connected to the CPU 990, GPU 992, and DVD drive 1002.
  • 996 a ROM (Read-Only Memory) 996 that is connected to the bus 1010 and stores the boot-up program of the computer 970
  • a RAM that is connected to the bus 1010 and stores the instructions, system programs, work data, etc. that make up the program.
  • (Random Access Memory) 998 and HDD (Hard Disk Drive) 1000 which is a non-volatile memory connected to the bus 1010 are included.
  • the HDD 1000 is for storing a program executed by the CPU 990 and the GPU 992, data used by the program executed by the CPU 990 and the GPU 992, and the like.
  • the computer 970 further has a network I / F1008 that provides a connection to a network 986 that enables communication with other terminals, and a USB memory 984 that can be attached and detached to provide communication between the USB memory 984 and each part in the computer 970.
  • the computer 970 is further connected to the microphone 982, the speaker 980, and the bus 1010, reads out an audio signal generated by the CPU 990 and stored in the RAM 998 or the HDD 1000 according to the instructions of the CPU 990, performs analog conversion and amplification processing, and performs analog conversion and amplification processing on the speaker 980. It includes an audio I / F 1004 for driving or digitizing an analog audio signal from the microphone 982 and storing it at an arbitrary address specified by the CPU 990 of the RAM 998 or HDD 1000.
  • the data and parameters of the fake expression generator 200, the real expression 196, the separator 204, the question 190, the background knowledge 192, etc. shown in FIG. 4 are all, for example, the HDD 1000, RAM 998, DVD 978 or USB shown in FIG. 22. It is stored in the memory 984, or a storage medium of an external device (not shown) connected via the network I / F1008 and the network 986. Typically, these data, parameters, etc. are written to the HDD 1000 from the outside and loaded into the RAM 998 when the computer 970 is executed.
  • the computer program for operating this computer system to realize the functions of the GAN 180 and its respective parts shown in FIG. 8, the training device by hostile learning for that purpose, and the functions of each component thereof is mounted on the DVD 978 mounted on the DVD drive 1002. It is stored and transferred from the DVD drive 1002 to the HDD 1000. Alternatively, this program is stored in the USB memory 984, the USB memory 984 is attached to the USB port 1006, and the program is transferred to the hard disk 1000. Alternatively, this program may be transmitted to the computer 970 via the network 986 and stored in the HDD 1000. The program is loaded into RAM 998 at run time. 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.
  • a script input using a keyboard 974 or the like may be stored in the HDD 1000.
  • a program that runs on a virtual machine it is necessary to install a program that functions as a virtual machine on the computer 970 in advance.
  • the CPU 990 reads a program from the RAM 998 according to an address indicated by a register (not shown) called a program counter inside the CPU 990, interprets an instruction, and outputs data necessary for executing the instruction to the RAM 998 according to the address specified by the instruction. , Read from the hard disk 1000 or other equipment and execute the process specified by the instruction.
  • the CPU 990 stores the execution result data at an address designated by the program, such as the RAM 998, the hard disk 1000, and the registers in the CPU 990. At this time, the value of the program counter is also updated by the program.
  • the computer program may be loaded directly into the RAM 998 from the DVD 978, from the USB memory 984, or over the network. In the program executed by the CPU 990, some tasks (mainly numerical calculation) are dispatched to the GPU 992 by the instruction included in the program or according to the analysis result at the time of instruction execution by the CPU 990.
  • the program that realizes the functions of each part according to each of the above-described embodiments by the computer 970 includes a plurality of instructions described and arranged to operate the computer 970 so as to realize those functions. Some of the basic functions required to execute this instruction are provided by an operating system (OS) running on the computer 970 or a third-party program, or modules of various toolkits installed on the computer 970. Therefore, this program does not necessarily have to include all the functions necessary to realize the system and method of this embodiment.
  • This program as described above, and as a component thereof, by instructing the appropriate function or the function of the "programming tool kit" in a controlled manner to obtain the desired result. It only needs to contain the instructions that execute the operation.
  • the GPU 992 can perform parallel processing, and can execute a large amount of calculations associated with machine learning simultaneously in parallel or in a pipeline. For example, parallel calculation elements found in the program when the program is compiled, or parallel calculation elements found when the program is executed, are dispatched from the CPU 990 to the GPU 992 and executed at any time, and the result is directly or RAM998. It is returned to the CPU 990 via the predetermined address of, and is assigned to a predetermined variable in the program.
  • Multi-passage BERT A globally normalized BERT model for open-domain question answering.
  • ENNLP-IJCNLP International Joint Conference on Natural Language Processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

質問に対する回答候補を抽出するために、質問に関する背景知識を有効に利用して、高い精度で質問に対する回答候補を特定できるようにする回答特定用テキスト分類器90は、質問と回答候補とを入力として受けるBERTと、BERTの出力を入力として受ける知識統合トランスフォーマと、質問と回答を入力として受け、当該質問に対する背景知識表現のベクトル群を出力する背景知識表現ジェネレータと、質問と回答候補とをそれぞれ埋め込みベクトル化し背景知識表現ジェネレータへ入力するベクトル変換部とを含み、知識統合トランスフォーマは、背景知識表現のベクトル群をアテンションとして受け、回答候補が、質問に対する正しい回答を含んでいるか否かを示すラベルを出力する。

Description

回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム
 この発明は質問応答システムに関し、特に、自然言語で入力された質問に対し、回答を含むパッセージをテキストアーカイブから抽出して回答を生成する質問応答システムに用いられ、正しい回答を含むパッセージとそうでないパッセージとに分類する回答特定用テキスト分類器、その回答特定用テキスト分類器で使用される背景知識表現ジェネレータ、その訓練装置、並びにその背景知識表現ジェネレータを訓練するためのコンピュータプログラムに関する。この出願は2020年10月20日出願の日本出願第2020-175841号に基づく優先権を主張し、前記日本出願に記載された全ての記載内容を援用するものである。
 自然言語処理を用いたなぜ型質問応答システムとして、後掲の特許文献1に開示されたものがある。なぜ型質問応答システムの場合、なに型質問応答システムと異なり、回答となる可能性が高い文の集合からなる複数のパッセージ(以下「パッセージ群」という。各パッセージに含まれる文は5から7個である。)をテキストアーカイブから抽出し、その中から質問に対する回答として最もふさわしいものを選択するものが多い。ここでパッセージとは、テキスト中の連続する複数の文からなるものをいう。特許文献1に記載のなぜ型質問応答システムもそのようなシステムだが、その前提として、質問が与えられるとその質問に対する正しい回答を含む可能性が高い複数のパッセージをテキストアーカイブから抽出して出力する回答候補検索システムを利用する。
 特許文献1に記載のシステムは、ウェブ上に存在する大量のテキストを予め収集し記憶する。このウェブアーカイブから、因果関係を表していると考えられる表現を抽出する。特許文献1に開示されたシステムでは、「なぜなら」のような手掛かり語又は「Aが原因でBが起こる」のような特定の因果関係パターンを用いて回答パッセージ中の因果関係を認識するものが挙げられている。
 特許文献1に開示されたなぜ型質問応答システムはさらに、回答パッセージの各々と、抽出された因果関係に関する知識と、質問とから、そのパッセージがその質問に対する回答としてふさわしいか否かを判定するための特徴量を抽出する。そして、予め訓練されたコンボリューショナル・ニューラル・ネットワーク(以下「CNN(Convolutional Neural Network)」という。)に、回答パッセージと、抽出された特徴量とを入力する。CNNは、その回答パッセージが質問に対する回答としてふさわしいか否かを示す尤度(その質問が、その回答パッセージに対する質問である確率)をスコアとして出力する。なぜ型質問応答システムは、このようにして各回答パッセージに対して算出されたスコアに基づいて回答パッセージをランキングし、最上位のスコアを持つ回答パッセージを質問に対する回答として出力する。
特開2017-49681号公報 特表2020-506466号公報
 なぜ型質問の場合、その回答としては、その質問を結果部分に持つような因果関係表現の原因部分がふさわしい。特許文献1では、回答候補である回答パッセージ群の中から、因果関係表現に基づいて回答として最も適切なパッセージを抽出できる。したがって特許文献1によれば、従来と比較してなぜ型質問に対する回答としてよりふさわしいものを選択できるとされている。
 しかし、特許文献1に開示された発明に限らず、多くの場合、依然として各パッセージが質問に対する回答かどうかを高い確率で正しく判定するのは難しいという問題がある。人間の場合には、質問応答において、同じように抽出されたパッセージから質問に対する回答を抽出する場合には、その人間の持っている背景知識を活用し、正しい回答を含むパッセージか否かと、正しい回答となる箇所とを正確に抽出できる。自然言語処理を用いた質問応答システムでも、そのような背景知識を効率よく利用できれば、質問応答システムがより高い精度で質問に対する回答を与えることができると考えられる。
 今までは、このような背景知識とは、単に質問との関連が高いと思われるパッセージのことを指すと考えられており、実際に回答を特定する際に背景知識を有効に活用しているとは言い難かった。質問応答システムの回答精度を高めるためには、背景知識を用いて、パッセージが正しい回答を含むか否かを高い精度で判定でき、さらに質問と特に関連あると考えられる部分を的確に特定できるようにすることが望ましい。そのためには、背景知識をどのように表現し、それを回答の特定にどのように利用すればよいかという点も問題となる。
 したがってこの発明は、質問に対する回答候補を抽出するために、質問に関する背景知識を有効に利用して、高い精度で質問に対する回答候補を特定できる回答特定用テキスト分類器及びそのための背景知識表現ジェネレータ、その訓練装置、並びにコンピュータプログラムを提供することを目的とする。
 本発明の第1の局面に係る回答特定用テキスト分類器は、質問テキストと、回答候補テキストとを入力として受ける、言語表現モデルと、言語表現モデルの出力を入力として受ける知識統合トランスフォーマと、質問テキストと前記回答候補テキストを入力として受け、当該質問テキストに対する背景知識の表現ベクトルを出力する、背景知識表現ジェネレータとを含み、知識統合トランスフォーマは、前記背景知識の表現ベクトルをアテンションとして受けるように構成され、回答候補テキストが、質問テキストに対する回答を含むか否かを示すラベルを出力する。
 好ましくは、知識統合トランスフォーマは複数の知識統合トランスフォーマ層を含み、背景知識表現ジェネレータは複数の知識統合トランスフォーマ層にそれぞれ対応する複数の背景知識の表現ベクトルを出力し、複数の知識統合トランスフォーマ層は、各知識統合トランスフォーマ層に対応する表現ベクトルをアテンションのための情報源として受ける。
 さらに好ましくは、背景知識表現ジェネレータは、質問と回答候補とを表す入力ベクトルに応答して背景知識の表現ベクトルを出力する背景知識表現ジェネレータ層と、背景知識表現ジェネレータ層への入力ベクトルを背景知識表現ジェネレータ層の出力する背景知識の表現ベクトルを用いて更新して背景知識表現ジェネレータ層への次の入力ベクトルとする更新部とを含み、更新部は、背景知識表現ジェネレータへの先行する入力ベクトルを、先行する入力ベクトルに応答して背景知識表現ジェネレータが出力する背景知識表現ベクトルと先行する入力ベクトルとの関連度を利用して更新する。
 本発明の第2の局面に係るコンピュータプログラムは、コンピュータを、上記したいずれかの回答特定用テキスト分類器として機能させる。
 本発明の第3の局面に係る訓練装置は、質問テキストの表す質問に対する背景知識のベクトル表現を出力する背景知識表現ジェネレータを、複数の訓練用データ項目を用いて訓練する訓練装置であって、複数の訓練用データ項目は、質問テキストと、当該質問テキストに関する背景知識テキストとを含み、質問テキストと、背景知識テキストとが与えられると、背景知識テキストが表す背景知識のベクトル表現と同じ形式の本物表現ベクトルを生成する、ニューラルネットワークからなる本物表現ジェネレータと、質問テキストと、任意のテキストに対するベクトル表現を表すランダムなノイズベクトルとが与えられると、ノイズベクトルから生成した上記背景知識に関するベクトル表現と同じ形式の偽物表現ベクトルを出力する、ニューラルネットワークからなる偽物表現ジェネレータと、本物表現ベクトルと、偽物表現ベクトルとを分別するための、ニューラルネットワークからなる分別器と、分別器による分別の誤りを最小化するように本物表現ジェネレータ及び分別器を、かつ、偽物表現に対する分別器による分別の誤りを最大化するように偽物表現ジェネレータを、それぞれ敵対的学習により訓練する敵対的訓練装置とを含み、敵対的訓練装置による訓練が完了したときの偽物表現ジェネレータが訓練後の背景知識表現ジェネレータであり、実際の質問テキストと任意のテキストが入力されたときの偽物表現ジェネレータの出力が、実際の質問テキストと任意のテキストに関する背景知識の表現ベクトルとなる。
 本発明の第4の局面に係るコンピュータプログラムは、コンピュータを、上記した訓練装置として機能させる。
 この出願に係る発明の目的、構成及び効果は、以下の図面とともに発明を実施するための形態の説明を参照することにより、より明確になるであろう。
図1は、質問応答システムで利用される回答パッセージの例を示す図である。 図2は、背景知識の例を示す図である。 図3は、背景知識と回答パッセージとの関係を示す図である。 図4は、この出願の第1実施形態に係る回答特定用テキスト分類器の構成の概略を示すブロック図である。 図5は、敵対的学習を使用して質問から背景知識の表現ベクトルを作成する偽物表現ジェネレータの訓練をすることで背景知識表現ジェネレータ(Background Knowledge Representation Generator:BKRG))を得るシステムの仕組みを説明するための模式図である。 図6は、図5に示す偽物表現ジェネレータを構成するエンコーダの基本的構成を示すブロック図である。 図7は、図5に示す偽物表現ジェネレータを訓練して因果関係BKRGと道具・目的関係BKRGを生成するBKRG訓練システムの概略構成を示すブロック図である。 図8は、図5に示すシステムによる敵対的学習を実現するプログラムのメインルーチンの制御構造を示すフローチャートである。 図9は、図8に示すプログラムの中で、偽物表現ジェネレータのパラメータ学習を行うためのルーチンの制御構造を示すフローチャートである。 図10は、図4に示すBERTの概略構成を示すブロック図である。 図11は、BERTトランスフォーマ層の概略構成を示すブロック図である。 図12は、知識統合トランスフォーマ層の概略構成を示すブロック図である。 図13は、図10に示すBERTトランスフォーマ層のうち、マルチヘッドアテンション部の概略構成を示すブロック図である。 図14は、図13に示すヘッドの一つの構成を示すブロック図である。 図15は、なぜ型質問応答用データの統計を示す表形式の図である。 図16は、どうやって型質問応答用データの統計を示す表形式の図である。 図17は、第1の実施形態に係る回答特定用テキスト分類器の効果を示す実験結果を示す表形式の図である。 図18は、この出願の第2の実施形態に係る質問応答システムの処理過程を示す模式図である。 図19は、第2の実施形態に係る質問応答システムのテストを行うための実験データの統計を示す表形式の図である。 図20は、第2の実施形態に係る質問応答システムの効果を示す実験結果を示す表形式の図である。 図21は、この発明の各実施形態を実現するコンピュータシステムの外観を示す図である。 図22は、図21に外観を示すコンピュータシステムのハードウェア構成を示すブロック図である。
 以下の説明及び図面では、同一の部品には同一の参照番号を付してある。したがって、それらについての詳細な説明は繰返さない。
 [第1の実施形態]
 〔回答パッセージと背景知識〕
 図1に質問50と回答パッセージ52との例を示す。図1を参照して、質問50に対して、回答パッセージ52には例えば”The best way to prevent seasonal flu is to get vaccinated every year.”という文と、”good health habits like wearing face masks and washing your hands often can help stop the spread of germs.”のように、回答としてふさわしい部分が存在する。人間の場合には、予め背景知識があるため、これらの部分が質問50に対する回答としてふさわしい記載であることが容易に分かる。しかし、そのような背景知識に基づく処理をコンピュータにさせるのは容易ではない。
 〔背景知識表現ジェネレータ〕
 なぜ型質問に対しては、因果関係が背景知識となり得る。なぜ型質問と同様になに型質問と異なる質問として、どうやって型質問がある。どうやって型質問については、道具・目的関係が背景知識となり得る。そこで、以下の実施形態では、因果関係及び道具・目的関係のような意味的関係を訓練データとして背景知識表現ジェネレータを訓練する。因果関係はなぜ型質問に対する回答を、道具・目的関係はどうやって型質問に対する回答を、それぞれ与えるための重要な背景知識となる。このような意味的関係を用いて背景知識表現ジェネレータを訓練することで、質問が与えられると、その質問に関連する部分を回答パッセージ中で特定できるようになり、質問に対する正しい回答を含むパッセージとそうでないパッセージとを高い精度で分類できる。
 背景知識表現生成器の訓練には、因果関係及び道具・目的関係の背景知識を多数収集する必要がある。これらの収集は人手でおこなってもよいが、背景知識表現ジェネレータを機械学習により訓練するためには、多数の背景知識をウェブから自動的に収集することが現実的である。その方法については後述する。
 図2は、別々のウェブ文書からそれぞれ抽出した、いずれも道具・目的関係を示す2つの文を背景知識60の例として示す。道具・目的関係を示すこのような文と、同様に因果関係を示す文を多数準備する。これらの文を用いて、背景知識表現ジェネレータを訓練することで、なぜ型質問又はどうやって型質問が質問応答システムに入力されたときに、パッセージ群から質問応答システムが回答を含むパッセージとその注目すべき部分とを容易に見つけ出すことができるようにする。
 図3にその概念を説明する。図3を参照して、質問50と回答パッセージ52とが与えられたときに、質問50を背景知識表現ジェネレータに与えると、その質問50のための背景知識を何らかの手法で表現した背景知識表現ベクトルが得られる。その背景知識表現ベクトルと回答パッセージ52の各文言との間の関係の大小を見ることにより、矢印70、72及び矢印74により示すように、回答パッセージ52中で注目すべき文言が特定され、これらが回答へのヒントとなる。その結果、回答特定が容易になる。しかしそのためには、背景知識表現ベクトルをどのように得るかが問題となる。そのための構成について以下に説明する。
 〔全体構成〕
 図4に、第1の実施形態に係る回答特定用テキスト分類器90の構成をブロック図として示す。図4を参照して、回答特定用テキスト分類器90は、質問と、その質問と対比されるパッセージとを連結した入力100を受けるように設けられた言語表現モデルであるBERT(Bidirectional Encoder Representation from Transformers)102を含む。BERT102は後掲の参考文献1に記載された言語表現モデルであり、事前学習が容易でかつ性能が高いことでよく知られている。BERT102の構成については簡単に後述する。
 BERT102への入力は、先頭に配置された、クラス分類を表すクラストークン[CLS]と、質問を表す単語列と、その次に配置された分離トークン[SEP]と、分離トークンの後に配置されたパッセージを表す単語列とからなる。入力100の長さは入力文によって変化する。そのため、この実施形態では入力100の長さを512に固定し、足りない部分には所定の文字列を代入することにした。
 回答特定用テキスト分類器90はさらに、BERT102と並列に入力100の入力を受け、入力100内の質問とパッセージに対する各単語を学習済の単語埋め込みベクトルに変換し出力するためのベクトル変換部112と、ベクトル変換部112により変換された質問テキストの単語埋め込みベクトル列qとパッセージテキストの単語埋め込みベクトル列pを受け、各層から、質問に関する背景知識表現のベクトル群116を出力する複数層のBKRG層を含むBKRG114と、BERT102の出力の後に設けられ、BERT102の出力に対し背景知識表現のベクトル群116をアテンションとして用いた言語処理を行って、最終的に入力100のパッセージが質問に対する回答を含むか否かを示すラベル108、及びパッセージ中でその回答となる部分の開始/終了位置110を含む出力106を出力する、BKRG114と同じ層数の複数のKI(Knowledge Integration:知識統合)トランスフォーマ層を含むKIトランスフォーマ104とを含む。KIトランスフォーマ層は、特許文献2に記載されたトランスフォーマと呼ばれる言語モデルのエンコーダブロックに基づくものであり、背景知識に基づいて回答を抽出するために、図11を参照して後述するように改造したものである。
 〔BKRG114〕
 BKRG114は、図4の例では、N層のBKRG層150、154、…、158と、これらN層のBKRG層150等のうち、最上層のBKRG層158以外の各層に対応して設けられ、対応するBKRG層150等への入力に対する更新処理を行って次の層のBKRG層154等に与えるためのN-1個の更新部152、156、…とを含む。第1層の更新部152には、ベクトル変換部112の出力する質問とパッセージとの単語埋め込みベクトル列(q,p)が入力される。更新部152はこのベクトル列(q,p)に対し所定の更新処理を行い更新後のベクトル列(q,p)を出力する。以下同様で、最終段のBKRG層158にはベクトル列(q,p)が与えられる。BKRG層150、154、…、158の出力は、背景知識表現のベクトル群116を構成するベクトルr、r、…、rである。BKRG層150、154、…、158等は後述するように予め訓練されている。回答特定用テキスト分類器90も全体として訓練されるが、その際にはBKRG層150、154、…、158等のパラメータはいずれも固定され、互いに同一である。したがってBKRG層154、…、158は訓練済のBKRG層150をコピーして作成してもよいし、BKRG層150をBKRG層154、…、158として繰り返し用いてもよい。
 なお、BKRG層150、154、…、158の出力する背景知識表現のベクトル群116は、これらBKRG層から出力されるベクトルr、r、…、rを含む。
 〔KIトランスフォーマ104〕
 KIトランスフォーマ104は、BKRG114と同様、N個のKIトランスフォーマ層130、132、…、134を含む。具体的には、KIトランスフォーマ104は、BERT102の出力と、BKRG114で同じ層のBKRG層150からのベクトルrとを受けるKIトランスフォーマ層130と、KIトランスフォーマ層130の出力とBKRG層154からのベクトルrとを受けるKIトランスフォーマ層132と、以下同様に、それぞれ直下の層のKIトランスフォーマ層の出力とBKRG114で同じ層のBKRG層からのベクトルrを受けるように接続された1または複数の図示しないKIトランスフォーマ層とを含む。最上層の第N層のKIトランスフォーマ層は、下層の第N-1層のKIトランスフォーマ層(図示せず)からの出力と、第N層のBKRG層158の出力するベクトルrとを受け、出力106を出力するKIトランスフォーマ層134である。
 以下、回答特定用テキスト分類器90の各部について説明する。
 〔BKRG〕
 BKRG層150、154、…、158はいずれも同一の構成を持ち、そのパラメータも同一である。実際上、BKRG層150の訓練をした後、BKRG層154、…、158についてはBKRG層150をコピーするか、又はBKRG層150を繰り返し用いて計算すればよい。したがってBKRG層150のみについて、以下でその構成及び訓練方法について説明する。KIトランスフォーマ層130への入力とすべきことから考えると、背景知識は何らかのベクトル形式であることが望ましいことは分かる。しかし、背景知識をベクトルで表現するとして、いったいどのような内容をどのような形式で表現すればよいか特定するための手がかりはないに等しい。
 ここで、コンピュータによる自動処理で背景知識表現をベクトル形式で作成できる可能性がある技術として、参考文献2に記載された敵対的学習(Generative Adversarial Network:GAN)という機械学習技術がある。GANは特に画像の生成に適用されることが多く、例えば写真とほとんど区別できないような偽の画像(偽物)を生成したりできる。この実施形態のような質問応答処理においても、背景知識の生成に威力を発揮する可能性がある。本実施形態でも、GANを利用してBKRG層150を訓練することを試みる。
 《BKRG層150の訓練》
 図5に、GANによりBKRG層150の訓練を行うための基本的構成を示す。図5を参照して、このGAN180は、予め準備された、各々が質問190とその質問に関する背景知識192とを含む訓練データ項目を用い、質問190と背景知識192とから、本物表現196と呼ばれるベクトル表現を生成する本物表現ジェネレータ194と、任意のテキストを表すノイズ198をサンプリングし、サンプリングしたノイズから偽物表現と呼ばれる偽物表現202を生成する偽物表現ジェネレータ200と、本物表現196又は偽物表現202の入力を受けて、それらが本物か偽物かを分別し分別結果206を出力するための分別器204とを含む。本物表現ジェネレータ194、偽物表現ジェネレータ200及び分別器204は、いずれもニューラルネットワークである。
 本物表現ジェネレータ194及び偽物表現ジェネレータ200はいずれもエンコーダと呼ばれる同様の構造を持つ。したがって偽物表現ジェネレータ200の構造のみについて以下に説明する。図6を参照して、偽物表現ジェネレータ200は、ノイズ198を受けてノイズの単語埋め込みベクトル列226に変換する単語埋め込みベクトル変換部224と、質問190を受け、質問190を構成する各単語を単語ベクトルに変換して質問の単語埋め込みベクトル列222を出力する単語埋め込みベクトル変換部220とを含む。
 偽物表現ジェネレータ200はさらに、ノイズの単語埋め込みベクトル列226の各ベクトルに対して、質問の単語埋め込みベクトル列222からのアテンションを加算しアテンションにより修飾されたアテンション付き単語埋め込みベクトル列230を出力するアテンション加算部228と、アテンション付き単語埋め込みベクトル列230を受ける入力を持ち、質問190のベクトル表現である偽物表現202を出力するよう訓練されるCNN232とを含む。
 図5に示す本物表現ジェネレータ194も、CNN232を含めて偽物表現ジェネレータ200と同様の構成を持つ。エンコードの対象となるものがノイズ198ではなく背景知識192であるという点で本物表現ジェネレータ194は偽物表現ジェネレータ200と異なっている。
 図5に示す分別器204は、最終層にシグモイド関数を活性化関数とするロジスティック回帰層を持つフィードフォワードネットワークである。分別器204へは本物表現196又は偽物表現202が入力される。分別器204の出力は2つであり、例えば、入力が本物表現196であると判定したときには一方が真で他方が偽、入力が偽物表現202であると判定したときには一方が偽で他方が真となるように訓練される。
 本物表現ジェネレータ194及び分別器204は本物表現196が偽物表現202と区別できるように(分別の誤りを最小化するように)、偽物表現ジェネレータ200は偽物表現202が本物表現196と区別できなくなるように(偽物表現202に対する分別器204の分別の誤りを最大化するように)、これら3つのネットワークが敵対的学習により訓練される。すなわち、これら3つのネットワークが、以下の式にしたがって訓練される。
Figure JPOXMLDOC01-appb-M000001
ただし、bは背景知識、qは質問、zはノイズ、Dは分別器204、Fは偽物表現ジェネレータ200、Rは本物表現ジェネレータ194、R(b;q)は背景知識bと質問qが与えられたときの本物表現ジェネレータ194の出力(本物表現196)、F(z;q)はノイズzと質問qが与えられたときの偽物表現ジェネレータ200の出力(偽物表現202)、dは背景知識bがしたがう分布、dはノイズzがしたがう分布、Eは期待値、をそれぞれ表す。
 最終的に分別器204の判定が50%となった時点、又は、指定の繰返し回数の学習が終了した時点で偽物表現ジェネレータ200の訓練を終了する。これはゲーム理論に基づくものであって、最終的にはナッシュ均衡に達し、分別器204が分別を正しく行う確率は50%となる。こうして訓練された偽物表現ジェネレータ200を用いて質問190とノイズとから偽物表現202を生成すれば、その偽物表現202は質問190と背景知識192とから本物表現ジェネレータ194が生成した本物表現196と区別ができないようなものとなる。
 すなわち、質問と任意のテキストが偽物表現ジェネレータ200に与えられたとして、偽物表現ジェネレータ200の出力は、あたかも質問とともに背景知識も偽物表現ジェネレータ200に与えられたかのような表現を出力する。この出力はもはや偽物表現と呼ぶのはふさわしくないので、以下では背景知識表現ベクトルとよぶ。また訓練が終了した後の偽物表現ジェネレータ200についても背景知識表現生成器(BKRG)と呼ぶ。なお、背景知識表現ベクトルの要素数は、訓練データから得られるこれらベクトルの要素数の最大数となるように予め決定する。
 後述するようにこのような工夫をして得た背景知識表現生成器を用いてパッセージが質問に対する正しい回答を与えるものか否かを判定したところ、従来と比較して明らかに高い精度が得られることがわかった。
 GAN180による訓練は、コンピュータハードウェアとそのコンピュータハードウェアにより実行されるコンピュータプログラム(以下「プログラム」という。)とにより実現される。その訓練のためには訓練用データを準備する必要がある。この実施形態では、なぜ型質問とどうやって型質問との双方のタイプの質問に対して回答可能な質問応答システムを提供する。そのためには、因果関係BKRGと道具・目的関係BKRGの2つのBKRGを用意する必要がある。この実施形態では、これらの出力を連結して一つのBKRGの出力とする。
 因果関係BKRGを訓練するためには因果関係を、道具・目的関係BKRGを訓練するためには道具・目的関係を、それぞれ収集する必要がある。訓練用データの収集及びBKRGの訓練を行うための訓練システムの概略構成を図7に示す。
 図7を参照して、このBKRG訓練システム240は、インターネット250から因果関係を表すテキストを大量に収集し、それらを用いて因果関係BKRG256の訓練を行う因果関係BKRG訓練部252と、インターネット250から道具・目的関係を表すテキストを大量に収集し、それらを用いて道具・目的関係BKRG258の訓練を行う道具・目的関係BKRG訓練部254とを含む。
 因果関係BKRG訓練部252は、インターネット250から因果関係を表すテキストを抽出する因果関係抽出部270と、因果関係抽出部270により抽出されたテキストを記憶する因果関係記憶装置272と、因果関係記憶装置272に記憶された因果関係の各々から質問部と背景知識部とを抽出して組み合わせることにより因果関係BKRG256の学習データを生成するための因果関係学習データ生成部274と、このようにして生成された学習データを記憶するための因果関係学習データ記憶装置276と、因果関係学習データ記憶装置276に記憶された因果関係から得られた学習データを用いた敵対的学習により因果関係BKRG256の訓練を行うための因果関係BKRG訓練部278とを含む。
 因果関係学習データ生成部274は因果関係から以下のようにして学習データを生成する。因果関係は、原因部と結果を表す帰結部とからなる。その帰結部を質問部とし、原因部を背景知識部とする。例えば因果関係として「大部分の人は新型インフルエンザウィルスに対する抗体を持っていないので(原因部)、グローバルなパンデミックとそれに伴う社会的インパクトが生じ得る(帰結部)」を考える。この場合、帰結部から得られる「グローバルなパンデミックとそれに伴う社会的インパクトが生じ得るのはなぜ?」という問いが質問部となり、原因部の「大部分の人は新型インフルエンザウィルスに対する抗体を持っていないので」が背景知識部となる。
 道具・目的関係BKRG訓練部254は、インターネット250から道具・目的関係を表すテキストを抽出する道具・目的関係抽出部280と、道具・目的関係抽出部280により抽出されたテキストを記憶する道具・目的関係記憶装置282と、道具・目的関係記憶装置282に記憶された関係の各々から質問部と背景知識部とを抽出して組み合わせることにより道具・目的関係BKRG258の学習データを生成するための道具・目的関係学習データ生成部284と、このようにして生成された学習データを記憶するための道具・目的関係学習データ記憶装置286と、道具・目的関係学習データ記憶装置286に記憶された道具・目的関係から得られた学習データを用いた敵対的学習により道具・目的関係BKRG258の訓練を行うための道具・目的関係BKRG訓練部288とを含む。
 道具・目的関係学習データ生成部284は道具・目的関係から以下のようにして学習データを生成する。道具・目的関係は、道具部と目的部とからなる。その目的部を質問部とし、道具部を背景知識部とする。例えば道具・目的関係として「混んだ場所に行くときには、インフルエンザの感染を防ぐために(目的部)、マスクを着用(道具部)しなければならない」を考える。この場合、目的部から得られる「混んだ場所にいくときには、インフルエンザの感染を防ぐためにどうする?」という問いが質問部となり、道具部の「マスクを着用」が背景知識部となる。
 この実施形態では、このように因果関係BKRG256と道具・目的関係BKRG258とを別々に訓練する。テスト時には同じ質問から因果関係BKRG256と道具・目的関係BKRG258の双方に同じ質問を与え、これらから得られたベクトルを連結して背景知識表現ベクトルとする。すなわち、因果関係BKRG256と道具・目的関係BKRG258とを並べたものを一つのBKRGとする。
 図8は、GAN180による訓練を実現するプログラムの制御構造を示すフローチャートである。図7に示す因果関係BKRG256及び道具・目的関係BKRG258は別々に訓練できる。ここでは因果関係BKRG256についてその訓練を実現するプログラムを説明するが、道具・目的関係BKRG258を訓練する場合も同様のプログラムを用いればよい。
 図8を参照して、このプログラムは、コンピュータを図7に示す因果関係学習データ記憶装置276と通信可能に接続するステップ300と、図5に示す偽物表現ジェネレータ200、本物表現ジェネレータ194、及び分別器204の訓練を、本物表現ジェネレータ194及び分別器204、並びに偽物表現ジェネレータ200の間の敵対的学習により行うステップ304と、ステップ304の結果、訓練の終了条件が充足されたか否かを判定し、判定結果に応じて制御の流れを分岐させるステップ306と、ステップ306において終了条件が成立していると判定されたことに応答して、そのときの偽物表現ジェネレータ200のパラメータを所定の記憶装置に保存しこのプログラムの実行を終了するステップ308とを含む。ステップ306の判定が否定のときには制御はステップ304に戻る。したがって、終了条件が充足されるまでステップ304が繰返される。ステップ308ではユーザがパラメータのファイル名及び保存箇所を指定できるようにしてもよい。
 図9を参照して、図8のステップ304における敵対的学習を実現するプログラムは、質問と、その質問に対応する背景知識との組み合わせからなる複数のサンプルを訓練データからサンプリングするステップ320、偽物表現ジェネレータ200のパラメータを固定するステップ322、320でサンプリングされたサンプルの質問及び背景知識を用いて、本物表現ジェネレータ194により生成される本物表現196を偽物と、偽物表現ジェネレータ200により生成される偽物表現202を本物と、それぞれ分別器204が誤って分別する確率を最小化するように本物表現ジェネレータ194及び分別器204の訓練を行うステップ324に続き、分別器204及び本物表現ジェネレータ194のパラメータを固定するステップ326、及び、質問190及びノイズから偽物表現ジェネレータ200により偽物表現202を生成し、これら偽物表現202を分別器204が誤って本物表現と判定する確率を最大化するよう偽物表現ジェネレータ200のパラメータの学習を行うステップ328を含む。
 《BERT102》
 図10に、BERT102の概略構成を示す。BERTは、事前学習が容易に行え、さらにファインチューニングを行うことによって非常に高い精度で例えば翻訳を行ったり、質問応答のための関連部分の抽出を行ったりする言語表現モデルとして機能することが知られている。
 BERT102は、互いに同じ構成で直列に配列された複数のBERTトランスフォーマ層602、604、…、606を含む。これらはいずれもKIトランスフォーマ層130等と同様、トランスフォーマのエンコーダブロックと同様の構成を持ち、KIトランスフォーマ層130等とはごく一部の構成が異なるだけである。ここではKIトランスフォーマ層と区別する意味でBERTトランスフォーマ層と呼ぶ。
 BERTトランスフォーマ層602は入力単語埋め込みベクトル列600を入力とし、BERTトランスフォーマ層604はBERTトランスフォーマ層602の出力を入力とし、以下同様である。最終のBERTトランスフォーマ層606の出力する単語列608はKIトランスフォーマ104への入力となる。なお、図10では入力単語埋め込みベクトル列600が一括してBERT102に与えられるように記載されている。しかし実際には、入力単語埋め込みベクトル列600を構成する入力単語埋め込みベクトルが順番にBERT102に入力され、単語列608も順番に出力される。
 これら複数のBERTトランスフォーマ層602、604、…、606は同じ構成だが、BERT102の事前学習及びファインチューニングによりパラメータの値は互いに異なる。各サブネットワークへの入力及びその出力は一定長のベクトル、例えば512次元のベクトルである。このベクトルの長さは、処理対象となる最長の入力文の単語数より多くなるように選ばれる。
 以下の説明では、BERT102は既に日本語での事前学習がされているものとする。また図4に示す回答特定用テキスト分類器90は全体として一つのニューラルネットワークを構成している。回答特定用テキスト分類器90の全体のファインチューニングは、予め人手等で作成した、質問と回答候補パッセージとの対と、その回答候補パッセージが質問に対する回答を含むか否かを示すラベル、及びその回答部分の開始位置と終了位置とを示すラベルを一組とした訓練データを用い、通常の誤差逆伝播法によりBERT102、KIトランスフォーマ104、BKRG114の更新部の学習を行う。なおこのファインチューニングに先立ってBKRG層150、154、…、158等の訓練は済ませておき、ファインチューニングの間はBKRG層150、154、…、158のパラメータの値は固定する。
 《トランスフォーマの構成》
 図4に示すBERT102及びKIトランスフォーマ104は、前述したとおり、トランスフォーマと呼ばれる自然言語の言語モデルとしてよく使用される高性能なニューラルネットワークモデルのエンコーダブロックを基本ブロックとして用いている(図4のKIトランスフォーマ層130、132、…、134及び図10のBERTトランスフォーマ層602、604、…、606)。図11にBERTトランスフォーマ層の構成の概略を示し、図12にKIトランスフォーマ層の構成の概略を示す。
 図11と図12を参照して、BERTトランスフォーマ層とKIトランスフォーマ層とは互いにほとんど同一であり、一部が異なるだけである。
 図示されてはいないが、例えばBERT102の入力段には、入力文中の各単語を、数値を要素とする単語埋め込みベクトルに変換することで入力文を単語埋め込みベクトル列に変換する単語変換部と、単語変換部の出力する単語埋め込みベクトル列内の各単語埋め込みベクトルに対して、対応する単語の入力文内の位置を示す位置情報をエンコードする位置エンコーダとが設けられる。このように位置情報をエンコードすることで、トランスフォーマでは、入力される単語列の順番を、RNN(Recurrent Neural Network)又はCNNを使用せずに利用して単語列をエンコードできる。
 BERTトランスフォーマ層602の出力は、BERTトランスフォーマ層604への入力となり、以下同様である。BERT102の最終のBERTトランスフォーマ層606の出力が、KIトランスフォーマ104のKIトランスフォーマ層130の入力となるようにBERT102とKIトランスフォーマ104とが接続されている。また、図4には、示されていないが、KIトランスフォーマ104の出力段には、線形変換サブネットワークとSoftMax層とがこの順に設けられる。SoftMax層が各出力単語の確率を与える。
 BERTトランスフォーマ層602は、単語埋め込みベクトル列である入力340を受けて入力340をセルフアテンション付きのベクトル表現にエンコードする。単語埋め込みベクトル列は、同じ構成の単語埋め込みベクトルが複数個連なったものであり、見方によっては単語埋め込みベクトル行列と考えることもできる。トランスフォーマでは、複数の単語について得られるベクトル列からなる行列間の演算が重要な機能を果たす。なお、セルフアテンションとは、入力340に対する同じ入力340によるアテンションを意味し、例えば、入力340の特定の単語に対するセルフアテンションは、入力340の他の全ての単語らからのアテンションを用いて算出する。
 図11に示されるように、BERTトランスフォーマ層602は二層構造からなるエンコーダサブネットワーク436を含む。エンコーダサブネットワーク436は、入力340を受ける第1層サブネットワーク440と、第1層サブネットワーク440の出力を受け、BERTトランスフォーマ層602の出力を生成する第2層サブネットワーク442とを含む。
 第1層サブネットワーク440は、単語埋め込みベクトル列340を受け、これらの単語埋め込みベクトル列340を用いて、入力される各単語埋め込みベクトルについて、その対応する単語に関するセルフアテンションを算出し、それらアテンションからなるアテンションベクトル列を出力するマルチヘッドアテンションサブネットワーク450と、マルチヘッドアテンションサブネットワーク450の出力するアテンションベクトル列内の各アテンションベクトルに、マルチヘッドアテンションサブネットワーク450の入力である単語埋め込みベクトル列内の対応する単語埋め込みベクトルを加算した後、レイヤノーマライゼーションを行うADD & Normサブネットワーク452とを含む。マルチヘッドアテンションサブネットワーク450は、BERTトランスフォーマ層602への入力である単語埋め込みベクトル列からなる行列を3つに分岐させて用いる。これら3つの入力は、図11において、左から順番にV(value)、K(Key)、及びQ(Query)と呼ばれる。マルチヘッドアテンションサブネットワーク450の詳細については図13を参照して後述する。
 第2層サブネットワーク442は、ADD & Normサブネットワーク452の出力する、各単語位置に対応して設けられた全結合フィードフォワードネットワークを含む全結合サブネットワーク460と、全結合サブネットワーク460の出力に対しADD & Normサブネットワーク452と同様の処理を行うADD & Normサブネットワーク462とを含む。ADD & Normサブネットワーク462の出力はBERTトランスフォーマ層602への入力と同じ長さの単語埋め込みベクトル列である。
 前記したように単語埋め込みベクトル列は単語埋め込みベクトルを各行とする行列と考えることができる。したがって、実際には、BERTトランスフォーマ層602における各演算は行列演算として実行される。
 図12に示す、KIトランスフォーマ層130は、BERTトランスフォーマ層602等と同じ構成を持つ。しかし、BERTトランスフォーマ層602等では前段の入力を分岐して得た行列Qを用いるのに代えて、KIトランスフォーマ層130と対応する(同じ)層のBKRG層(例えば図1に示すBKRG層150)から出力される背景知識表現ベクトルrを用いる点でBERTトランスフォーマ層602と異なる。V及びKについては、BERTトランスフォーマ層602と同様、前段の出力を分岐して用いる。
 具体的には、図12を参照して、KIトランスフォーマ層130は、二層構造からなるエンコーダサブネットワーク476を含む。エンコーダサブネットワーク476は、BERTトランスフォーマ層602のエンコーダサブネットワーク436と同様、第1層サブネットワーク492と第2層サブネットワーク494とを含む。
 第1層サブネットワーク492は、前段(KIトランスフォーマ層130の場合は、BERT102の出力)から受ける単語埋め込みベクトル列を順に受け、これらの単語埋め込みベクトル列を用いて、入力される各単語埋め込みベクトルについて、その対応する単語に関する背景知識表現ベクトルを用いてアテンションを算出し、それらアテンションからなるアテンションベクトル列を出力するマルチヘッドアテンションサブネットワーク510と、マルチヘッドアテンションサブネットワーク510の出力するアテンションベクトル列内の各アテンションベクトルに、マルチヘッドアテンションサブネットワーク510の入力である単語埋め込みベクトル列内の対応する単語埋め込みベクトルを加算した後、レイヤノーマライゼーションを行うADD & Normサブネットワーク512とを含む。BERTトランスフォーマ層602の場合と異なり、マルチヘッドアテンションサブネットワーク510は、前段からの入力である行列をV及びKの2つに分岐させて用いる。一方、マルチヘッドアテンションサブネットワーク510に入力されるQは、同じ層のBKRG層150(図4)から与えられるrである。ただし、Qは行列(ベクトル列)であるのに対し、rはベクトルである。そのためこのままでは構成で所望の演算を行うことができない。したがって、この実施形態では後述するようにベクトルr等をQと同形式の行列に変換する。
 第2層サブネットワーク494は、ADD & Normサブネットワーク512の出力する、各単語位置に対応して設けられた全結合フィードフォワードネットワークを含む全結合サブネットワーク520と、全結合サブネットワーク520の出力に対しADD & Normサブネットワーク462と同様の処理を行うADD & Normサブネットワーク522とを含む。ADD & Normサブネットワーク522の出力はBERTトランスフォーマ層602への入力と同じ長さの単語埋め込みベクトル列であって、KIトランスフォーマ層132(図4を参照)への入力となる。
 図13は、図11に示すマルチヘッドアテンションサブネットワーク450の、一般的なトランスフォーマでの概略構成を示す。図12に示すマルチヘッドアテンションサブネットワーク510も行列Qに代えてベクトルrを使用する点、下記の数2及び数3で示す計算処理の違いはあるが、類似の構成である。
 図13を参照して、マルチヘッドアテンションサブネットワーク450は、複数のヘッダと呼ばれる部分を含むヘッダ部540と、ヘッダ部540の複数のヘッダからそれぞれ出力されるベクトルを連結するベクトル連結部542と、ベクトル連結部542の出力に対して線形変換を行う線形変換サブネットワーク544とを含む。
 ヘッダ部540は、複数(h個)のヘッダ550と、各ヘッダ550に対して、下層からの入力であるベクトル列を分岐した3つの入力を受け、それらに対して予め各要素の値を学習した行列による線形変換を行って3個の行列V、K及びQを生成しヘッダ550のh個のヘッダの各々に与えるための3つの線形変換サブネットワーク552とを含む。なお、図12に示すKIトランスフォーマ層130等ではQに代えて背景知識表現ベクトルrを後述するように行列化したものを用いる。
 図14を参照して、ヘッダ550は、行列Qとの行列Kとの間で乗算を行う行列積サブネットワーク560と、行列積サブネットワーク560により得られる行列を、所定の定数で除算する除算回路562とを含む。ヘッダ550はさらに、除算回路562によりスケーリングされた行列に対しSoftMax変換を行うSoftMax層566と、SoftMax層566によるSoftMax後の行列と線形変換後の行列Vとの間で乗算を行う行列積サブネットワーク568とを含む。
 以上の変換は、上記したとおりベクトル及び行列演算の形式で行われる。これを式で表すと以下のとおりである。ただしdは線形変換後の行列Kの行数の平方根である。行列Kの行数が64であればd=8である。
Figure JPOXMLDOC01-appb-M000002
 h個のヘッダ550の行列積サブネットワーク568から得られる行列はベクトル連結部542により連結される。h個のヘッダ550の構成は同じだが、これらは学習時にそれぞれランダムに初期化される。その結果、学習後のこれらのパラメータは互いに異なっており、h個のヘッダ550からはそれぞれ異なる結果が得られる。
 なお、図12に示すKIトランスフォーマ層130等のマルチヘッドアテンションサブネットワーク510では、以下の式により、ベクトルrをQと同形式の行列に変換して上記した演算を行う。
Figure JPOXMLDOC01-appb-M000003
ただしJ1,dkは、全要素が1のd次元のベクトルであり、右辺のVの直前の記号は行列の要素ごとの乗算(アダマール積)を表す。SoftMax演算は対応するトークンにどの程度注意すべきかを示す値を全体の合計が1となるように変換する。rはd次元のベクトルである必要があるが、実際のBKRGの出力ベクトルrBKRGがd次元に満たない場合もある。その場合には以下の式にしたがった演算によりベクトルrBKRGをdk次元のベクトルrに変換する。
Figure JPOXMLDOC01-appb-M000004
 なお、BERTには、BERTBASEと呼ばれる基本的な構成と、BERTLARGEと呼ばれるより大規模な構成との2種類がある。層数をL、ヘッダ数をA、フィードフォワードネットワークの隠れユニット数をHとすると、BERTLARGEではL=24、H=1024、A=16、BERTBASEではL=12、H=768、A=12である。この実施形態及び後述する実験でのBERT102としては、BERTLARGEを用いている。
 《更新部》
 図4に示す更新部152、156、…は全体のニューラルネットワークの一部であり、互いに同じ構成を持つ。例えば更新部152は、入力された質問とパッセージの単語埋め込みベクトル列(q、p)を受ける。この単語埋め込みベクトル列は、質問とパッセージの各単語について予め学習した埋め込みベクトル化を行って、それぞれ得られたベクトルを連結することで得られる。BKRG層150はこのベクトル列(q、p)に応答し、これを処理して質問qに関する背景知識ベクトルrを生成してKIトランスフォーマ層130への入力とする。更新部152は、このとき、この背景知識ベクトルrとBKRG層150への入力であったベクトル列(q、p)との関連度を用いてベクトル列(q、p)を更新してベクトル列(q,p)を生成し、次のBKRG層であるBKRG層154及び更新部156に与える。BKRG層154はこのベクトル列(q,p)に応答しこれを処理して新たな背景知識ベクトルrを生成し、KIトランスフォーマ層132への入力とする。更新部156は背景知識ベクトルrとベクトル列(q,p)との関連度を用いてベクトル列(q,p)を更新してベクトル列(q,p)を生成し、次のBKRG層への入力とする。以下同様である。
 一般的にベクトル列q又はpのj番目の単語の単語埋め込みベクトルをx (x=q又はp)とすると、以下の式により示すように、i番目のBKRG層で算出された背景知識ベクトルrに対するその単語の関連度を計算することで、この関連度で重み付けされた単語埋め込みベクトル ̄x が得られる。
Figure JPOXMLDOC01-appb-M000005
 この結果、背景知識ベクトルrとの関連度により各ベクトルが重み付けされたベクトル列 ̄x(重み付けされたベクトル列q又はp)が得られる。
 xi+1(xi+1はqi+1又はpi+1のいずれか)は以下のように ̄x及びxを用いてハイウェイネットワーク形式(参考文献3)で計算される。
Figure JPOXMLDOC01-appb-M000006
 こうして更新された後のベクトル列(qi+1,pi+1)がi+1番目のBKRG層への入力となる。
 〔動作〕
 以上、構成について説明した回答特定用テキスト分類器90は以下のように動作する。 以下の説明では、BERT102は既に日本語での事前学習がされているものとする。また図4に示す回答特定用テキスト分類器90の全体のファインチューニングは、前述したとおり、予め人手等で作成した、質問とパッセージとの対と、そのパッセージが質問に対する回答を含むか否かを示すラベル、並びにその回答部分の開始位置と終了位置とを示すラベルを一組とした訓練データを用い、通常の誤差逆伝播法により行う。なおこのファインチューニングに先立ってBKRG層150、154、…、158等の訓練を済ませておき、ファインチューニングの間はBKRG層150、154、…、158のパラメータの値は固定する。
 《偽物表現ジェネレータ200の学習》
 最初に、図8にしたがい、図5に示す偽物表現ジェネレータ200の学習について説明する。偽物表現ジェネレータ200は、図5に示す本物表現ジェネレータ194及び分別器204と併せて敵対的学習により訓練される。この訓練に先立ち、図7に示す因果関係抽出部270及び道具・目的関係抽出部280により、インターネット250から因果関係及び道具・目的関係を示すテキストが収集され、それぞれ因果関係記憶装置272及び道具・目的関係記憶装置282に記憶される。因果関係学習データ生成部274及び道具・目的関係学習データ生成部284が、それぞれ因果関係記憶装置272及び道具・目的関係記憶装置282に記憶された因果関係のテキストと道具・目的関係のテキストとから、それぞれ因果関係学習データと道具・目的関係学習データとを生成し、それぞれ因果関係学習データ記憶装置276及び道具・目的関係学習データ記憶装置286に格納する。
 因果関係BKRG訓練部278が、因果関係学習データ記憶装置276に記憶された因果関係学習データを用いて因果関係BKRG256の訓練を行い、道具・目的関係BKRG訓練部288が道具・目的関係学習データ記憶装置286に記憶された道具・目的学習データを用いて道具・目的関係BKRG258の訓練をする。
 因果関係BKRG256と道具・目的関係BKRG258の訓練は、学習データが異なるだけで手順自体は同様である。したがって、ここでは因果関係BKRG256の訓練についてのみ、GAN180の動作を説明する。
 図8を参照して、この学習では、因果関係学習データ記憶装置276にコンピュータを接続する。具体的には、コンピュータが、外部記憶装置により実現される因果関係学習データ記憶装置276に存在する、因果関係学習データを含むファイルをオープンし、それらの内容を読み出してメモリに格納する。又はこれらを記憶したデータベースから因果関係学習データを読み出し、メモリに格納する(ステップ300)。
 続いて、本物表現ジェネレータ194及び分別器204と、偽物表現ジェネレータ200との間で敵対的学習を行う(ステップ304)。
 図9を参照して、ステップ304で行われる敵対的学習では、質問190と、その質問に対する背景知識192との複数の組を学習データからサンプリングする(ステップ320)。続いて偽物表現ジェネレータ200のパラメータを固定する(ステップ322)。サンプリングした質問190と、その質問190に対する背景知識192を用いて本物表現ジェネレータ194が本物表現196を生成し分別器204に与える。一方、偽物表現ジェネレータ200が同じ質問190とランダムに発生させたノイズとを用いて偽物表現202を生成し分別器204に与える。分別器204はこの本物表現196及び偽物表現202がそれぞれ本物か否かを判定する。サンプリングされた学習データの全体に対するこの判定結果を用い、ステップ324において、このデータに対する分別器204の誤判定が最小化されるように、すなわち本物表現196を偽物と、偽物表現202を本物と誤判定する確率が小さくなるように、偽物表現ジェネレータ200のパラメータを固定した状態で、誤差逆伝播法により分別器204及び本物表現ジェネレータ194のパラメータの訓練を行う。
 続いて、分別器204及び本物表現ジェネレータ194のパラメータを固定する(ステップ326)。分別器204のパラメータを固定したまま、質問190とランダムに発生させたノイズ198とを用い、偽物表現ジェネレータ200の学習を行う(ステップ328)。具体的には、偽物表現ジェネレータ200が偽物表現202を生成する。分別器204はこの偽物表現202が本物表現か否かを判定する。この判定を複数の質問190に対して行い、偽物表現ジェネレータ200のパラメータを分別器204による誤判定が最大化するように、すなわち分別器204が偽物表現202を本物表現と判定する確率が大きくなるように、分別器204及び本物表現ジェネレータ194のパラメータを固定して偽物表現ジェネレータ200のパラメータを調整する。
 こうした処理を繰り返すことにより、いずれは本物表現ジェネレータ194及び分別器204と偽物表現ジェネレータ200とによる本物表現・偽物表現はゲーム理論におけるナッシュ均衡に達し、分別器204による判定結果は、正解が50%、誤判定が50%という状態に達する。又はナッシュ均衡に近い一定の状態に達する。
 図8を参照して、ステップ306では分別器204の判定の精度がこのナッシュ均衡の状態、又はナッシュ均衡に近い一定の状態に達したか否かを判定する。判定結果が否定であれば制御はステップ304に戻り、本物表現ジェネレータ194、偽物表現ジェネレータ200及び分別器204の敵対的学習を続行する。ステップ306の判定結果が肯定であればステップ308で偽物表現ジェネレータ200のパラメータを記憶装置に保存し、処理を終了する。この偽物表現ジェネレータ200のパラメータと、偽物表現ジェネレータ200のネットワーク構造を実現するプログラムとにより、この実施形態の因果関係BKRG256が得られる。
 図7に示す道具・目的関係学習データ記憶装置286を用いた敵対的学習を、別の本物表現ジェネレータ194、偽物表現ジェネレータ200及び分別器204のセットに実行することにより、道具・目的関係BKRG258も同様にして得られる。図4に示すBKRG層150、154、及び158等は、いずれも因果関係BKRG256と道具・目的関係BKRG258とを連結して得られたもので、両者の出力が連結されてBKRG層150等からベクトルr等として出力する。
 《BERT102の訓練》
 BERT102の事前学習についてはよく知られた手法であり、ここではその詳細は繰り返さない。簡単にいえば、予め事前学習のための文を多数準備しておき、それらの文のうち任意の一つの単語を削除したものを入力として、その単語を予測するようにしてBERT102の事前学習が行われる。この方法では、いわゆる訓練データの作成のためにデータを加工する必要がない。
 BERT102の事前学習及び回答特定用テキスト分類器90のファインチューニングは前述したように行われる。したがってここではその詳細は繰り返さない。このファインチューニングでは、BKRG層150、154、…、158のパラメータを固定しておく点に注意して、通常の誤差逆伝播法を用いればよい。
 《テスト時の回答特定用テキスト分類器90の動作》
 図4を参照して、回答特定用テキスト分類器90のテスト時には、質問と、その質問に対する回答を含むか否かの判定対象となるパッセージとが入力100としてBERT102及びベクトル変換部112に与えられる。
 BERT102は、訓練後のパラメータにしたがって入力100を処理しKIトランスフォーマ層130に出力を与える。
 一方、ベクトル変換部112は入力100に含まれる質問及びパッセージをそれぞれ単語埋め込みベクトル列に変換して連結し、BKRG層150と更新部152とに与える。BKRG層150はこの単語埋め込みベクトル列のうち、質問の単語埋め込みベクトル列qを質問とし、パッセージの単語埋め込みベクトル列pを図5のノイズ198として処理し、質問に対するベクトルrを生成しKIトランスフォーマ層130に与える。
 KIトランスフォーマ層130は、BERT102の出力に対し、BKRG層150から与えられるベクトルrをアテンション(行列Q)として演算を行い、結果をKIトランスフォーマ層132に与える。このとき、ベクトルrは、KIトランスフォーマ層130に、対象となるパッセージを解析する際に回答になりそうな部分を注意深く読ませるために使用される。
 一方、BKRG114では、更新部152がBKRG層150の出力するベクトルrを用い、既に述べた変換式を用いてベクトル変換部112の出力した単語埋め込みベクトル列(q,p)を単語埋め込みベクトル列(q、p)に更新し、BKRG層154と更新部156に与える。
 BKRG層154は、単語埋め込みベクトル列(q、p)のqを質問、pを図5のノイズ198として処理し、質問に対するベクトルrを生成しKIトランスフォーマ層132に与える。
 KIトランスフォーマ層132は、KIトランスフォーマ層130と同様、KIトランスフォーマ層130の出力に対し、BKRG層154から与えられるベクトルrをアテンション(行列V及びK)として演算を行い、結果をさらに後段のKIトランスフォーマ層に与える。このとき、ベクトルrは、KIトランスフォーマ層132に、対象となるパッセージを解析する際に回答になりそうな部分を注意深く読ませるために使用される。
 以下、同様の処理が行われ、BKRG層158からはベクトルrがKIトランスフォーマ層134に与えられる。KIトランスフォーマ層134は、前段のKIトランスフォーマ層の出力に対し、ベクトルrをアテンションとした処理を行い、結果を出力106として出力する。出力106の先頭のトークン「CLS」に対応する部分には、入力100を構成するパッセージが、入力100を構成する質問に対する回答を含むか否かを示すラベルが出力され、出力106のパッセージの各単語に相当する部分のうち、回答となる単語列の開始位置と終了位置とが、それぞれ確率として示される。
 なお、図4に示す例では、ラベルと、回答の開始位置及び終了位置とを求めるための回答特定用テキスト分類器90を一つのものとして記載した。しかしこの発明はそうした実施形態には限定されず、これらを別々のものとして訓練し使用してもよい。
 〔実験結果〕
 上記した回答特定用テキスト分類器90により、日本語の質問に対して与えられたパッセージが正しい回答を含むものか否かを分別する実験(回答特定実験)を行った。実験はなぜ型質問応答とどうやって型質問応答の双方のタスクである。
 図5の偽物表現ジェネレータ200(図4のBKRG層150、154、…、158の敵対的学習用の学習データとしては、因果関係データ(後掲の参考文献4に記載の手法で獲得)及び道具・目的関係データ(参考文献5に記載の手法で獲得)を用いた。この因果関係データは、40億のウェブテキストから自動獲得した約1億件の因果関係データを含んでいる。実験では、これらのうち100万件をランダムサンプリングしたものを用いた。道具・目的データとしては、同じく4億件のウェブテキストから自動獲得した約1.2億件の道具・目的関係データを含んでいる。実験では、これらのうちから100万件をランダムサンプリングしたものを用いた。
 こうして得られたなぜ型質問応答容データとどうやって型質問応答データの各々について、実験のために、学習データ、開発データ、及び評価(テスト)データに分類した。分類されたデータの統計を図15及び図16にそれぞれ示す。
 BERT102には前述のようにBERTLARGEを用いた。その層数L=24、トランスフォーマエンコーダのヘッダ数A=16、フィードフォワードネットワークの隠れユニット数H=1、024である。その学習には22億文を用いた。学習時のバッチサイズ=4,096、学習のステップ数は110万であった。
 実験では、上記した実施形態に記載の方法で訓練した因果関係BKRG及び道具・目的関係BKRGを使用した。
 図17にこの実験の結果を表形式で示す。図17のうち、結果欄の4行目の「Proposed」と記載されている結果636が上記実施形態に係るシステムによる結果である。図17において、「P@1(Precision at top answer)」は、質問ごとにランク付けした結果における、最上位の精度を示す。「MAP(Mean Average Precision)」は、質問ごとにランク付けした結果における平均精度の平均を示す。
 結果欄の結果630は、後掲の参考文献6に記載の手法(CNNとAnswer Representation Generator(ARG))によるものを示す。結果欄の結果632はBERTのみを用いたときの結果を示す結果欄の結果634は、結果632のBERTを用いた手法に、上記実施形態のBKRGの出力するRepresentationを最後のSoftMax層の入力として加算したものを用いた結果である。
 これに対し、結果欄の結果638以下は、結果636に示す上記実施形態にしたがった手法から何らかの要素を取り除いたものである。結果638は、図4に示す更新部152、156等による質問とパッセージ対の更新を取り除いたものである。結果640は、上記実施形態にしたがった手法から、因果関係BKRGを取り除いた場合の結果である。結果642は道具・目的関係BRKGを取り除いた場合の結果である。
 図17の結果欄の1行目から3行目と4行目とを比較すると,4行目が最も高い精度を与えていることが分かる。すなわち、BKRGによる背景知識表現ベクトルを利用し、この背景知識表現ベクトルをKIトランスフォーマでBERTによる結果と統合することで、1行目の基本手法はもとより、BERTのみ(2行目)と比較しても、またBERT+BKRGの手法に対しても、高い精度が得られていることが分かる。
 さらに、結果638、640及び結果642のいずれと比較しても結果636の性能が高い。したがって、図4に示す更新部152及びBKRG層154のように入力される質問とパッセージとを更新する手法、BKRG層150、154、…、158等において因果関係又は道具・目的関係を用いない手法のいずれも、結果636により示される、上記実施形態の性能向上に寄与していることが分かる。
 [第2の実施形態]
 〔構成〕
 上記第1の実施形態に係る回答特定用テキスト分類器90は、この発明を日本語のなぜ型質問及びどうやって型質問に適用したものである。しかしこの発明は、日本語だけではなく他の言語、例えば英語に対しても適用可能であり、また特定のドメインではなくオープンドメインの質問応答システムに対しても適用可能である。この第2の実施形態に係る質問応答システムは英語のオープンドメインの質問応答タスクを行う質問応答システムに関する。
 このタスクは、質問を受け、質問に対する回答を含む可能性が高いパッセージを選択し、さらにそのパッセージから回答を抽出するというタスクである。主な質問タイプはなに型質問である。回答は、単語・名詞句からなる場合が多い。なに型質問の回答は、なぜ型質問及びどうやって型質問の回答より短い傾向がある。
 英語に関する質問応答システムに、後掲の参考文献7に記載されたDistantly supervised open-domain QA (DS-QA)と呼ばれるタスクがある。図18を参照して、このタスク750は、質問760を受け、複数のパッセージ764を検索762し、そのパッセージ764から回答774を抽出する、というタスクである。より具体的には、このタスク750のための質問応答システムは、パッセージから回答を含む確率が高いパラグラフの集合768を選択するパラグラフ選択器766と、パラグラフ選択器766が選択したパラグラフの集合768と質問760とが与えられたとき、質問760に対する回答となる確率が最も高い単語列からなる回答候補の集合772を算出するパラグラフリーダ770とを含む。この回答候補の集合772から回答774が抽出される。
 参考文献7に記載された、タスク750を実行する例示的な質問応答システムは、質問760を受けて、テキストアーカイブから回答候補を含む可能性があるパッセージ764を検索し取り出す検索762を含む。パッセージ764をPで表すと、P={p,…,p}、ただしp,…,pはいずれもパラグラフを表す(N=正の整数)。タスク750はさらに、パッセージ764に含まれるパラグラフp,…,pの各々から、正しい回答を含む能性が高いパラグラフを選択し、パラグラフの集合768を生成するためのパラグラフ選択器766と、パラグラフの集合768に含まれるパラグラフの各々から回答と思われる部分を抽出し回答候補の集合772を生成するパラグラフリーダ770と、回答候補の集合772から質問760に対する正しい回答である確率が最も高い回答候補を回答774として出力する回答候補の集合772を含む。
 この実施形態では、質問qに対し、パッセージ764としてP={p}が与えられたとき、回答候補の集合772の各回答aのスコアScore(a|q,P)は以下のように定義される。ただしapは回答を含むパラグラフを表す。
Figure JPOXMLDOC01-appb-M000007
この式のシグマ記号内の、第2項はパラグラフ選択器766に対応し、パラグラフpが質問qの回答を含む確率を表す。第1項はパラグラフリーダ770に対応し、パラグラフpから質問qの回答aを抽出する確率を示す。
 この実施形態では、パラグラフ選択器766及びパラグラフリーダ770として、上記第1実施形態に記載のものを利用できる。ただし、パラグラフ選択器766としては、上記第1実施形態に記載のものと同じ構成で、質問と各パラグラフとの組み合わせに対し、ラベルとしてそのパラグラムが質問に対する回答を含むか否かを示す値を付した訓練データで訓練したものを用いる。またパラグラフリーダ770としては、質問と、その質問に対する正しい回答を含むパラグラムとの組み合わせに対し、回答の開始部分をラベルとして持つ訓練データと、回答の終了部分をラベルとして持つ訓練データとをそれぞれ使用して訓練した2つの回答特定用テキスト分類器90を用いることができる。
 〔効果〕
 上記第2の実施形態に係るタスク750の性能を調べるために、以下のような実験を行った。図19に、この実験で使用した訓練・評価データの統計を示す。
 実験では、比較のために公知の3つのデータセット (Quasar-T (参考文献8)、SearchQA(参考文献9)、及びTriviaQA(参考文献10)を用い、3つの公知手法であるOpenQA(参考文献11)、TriviaQA(参考文献10)、及びMBERT(Multi-passage BERT)(参考文献12)と、上記第2の実施形態による提案法(Proposed)を比較した。実験の結果を図20に示す。
 図20を参照して、結果800、802及び結果804は従来のシステムによる結果を示す。結果800は、上記参考文献11による、LSTM(Long Short-Term Memory)をベースとしたシステムによる結果を示す。結果802は、同じく参考文献11のシステムと、参考文献6により紹介されたARGとを組み合わせたもので、これもLSTMをベースとしたものである。結果804はMBERTによるものであり、従来技術でもっとも性能が高いとされているシステムである。
 これに対し結果806は上記第2の実施形態のパラグラフ選択器766及びパラグラフリーダ770による結果を示す。結果808は、第2の実施形態においてBKRGを用いなかった場合の結果である。結果810はBKRGを用いたが質問・パッセージ対の更新を行わなかった場合の結果を示す。結果812は参考文献13に記載のSQuADデータを学習データに加えて図18のパラグラフ選択器766及びパラグラフリーダ770の学習を行った場合の結果を示す。ただし結果812ではBKRGは使用していない。
 評価には全てEMスコア及びF1スコアを用いた。EMは真の回答(ground truth)のいずれかと正確に一致した予測結果の率を示す。F1は予測結果と真の回答との間の平均的な重なりを大まかに示す。
 この結果から、上記第2の実施形態に係るパラグラフ選択器766及びパラグラフリーダ770を用いた場合、全てのデータセットに対し、従来の他の手法をいずれも上回る性能を示すことが分かる。特に、第2の実施形態によれば、従来技術で最も性能の高いMBERTに対してもかなりの性能向上が得られていることが分かる。また結果808及び結果810のいずれも結果806より性能が落ちてはいるが従来技術のいずれと比較しても高い性能を示していることから、BKRGを用いること、及びさらにBKRGを経の入力となる質問・パッセージ対の更新を用いることの双方とも第2の実施形態の性能向上に貢献していることが分かる。
 以上、第1及び第2の実施形態における実験結果から、この発明に係る背景知識表現ジェネレータは、異なる言語の異なるタスクに対して、従来技術と比較して高い性能を示し、質問応答システムにおいて有効であることが分かる。
 なお、以上の実施形態の説明では、回答特定用テキスト分類器に用いる言語表現モデルとしてBERTを用いているが、BERTに限定されるわけではない。例えばXLNet(参考文献14)、RoBERTa(参考文献15)、ALBERT(参考文献16)、StructBERT(参考文献17)等、トランスフォーマのエンコーダブロック又は同種のネットワークを基本として構成されている言語表現モデルを用いてもよい。
 [コンピュータによる実現]
 図21は、上記各実施形態を実現するコンピュータシステムの外観図である。図22は、図21に示すコンピュータシステムのハードウェアブロック図である。
 図21を参照して、このコンピュータシステム950は、DVD(Digital Versatile Disc)ドライブ1002を有するコンピュータ970と、いずれもコンピュータ970に接続された、ユーザと対話するためのキーボード974、マウス976、及びモニタ972とを含む。もちろんこれはユーザ対話のための構成の一例であって、ユーザ対話に利用できる一般のハードウェア及びソフトウェア(例えばタッチパネル、音声入力、ポインティングデバイス一般)であればどのようなものも利用できる。
 図22を参照して、コンピュータ970は、DVDドライブ1002に加えて、CPU(Central Processing Unit)990と、GPU(Graphics Processing Unit)992と、CPU990、GPU992、DVDドライブ1002に接続されたバス1010と、バス1010に接続され、コンピュータ970のブートアッププログラム等を記憶するROM(Read-Only Memory)996と、バス1010に接続され、プログラムを構成する命令、システムプログラム、及び作業データ等を記憶するRAM(Random Access Memory)998と、バス1010に接続された不揮発性メモリであるHDD(Hard Disk Drive)1000とを含む。HDD1000は、CPU990及びGPU992が実行するプログラム、並びにCPU990及びGPU992が実行するプログラムが使用するデータ等を記憶するためのものである。コンピュータ970はさらに、他端末との通信を可能とするネットワーク986への接続を提供するネットワークI/F1008と、USBメモリ984が着脱可能で、USBメモリ984とコンピュータ970内の各部との通信を提供するUSBポート1006とを含む。
 コンピュータ970はさらに、マイク982及びスピーカ980とバス1010とに接続され、CPU990により生成されRAM998又はHDD1000に保存された音声信号をCPU990の指示にしたがって読み出し、アナログ変換及び増幅処理をしてスピーカ980を駆動したり、マイク982からのアナログの音声信号をデジタル化し、RAM998又はHDD1000の、CPU990により指定される任意のアドレスに保存したりするための音声I/F1004を含む。
 上記実施形態では、図4に示す偽物表現ジェネレータ200、本物表現196、分別器204、質問190、背景知識192等のデータ及びパラメータ等は、いずれも例えば図22に示すHDD1000、RAM998、DVD978又はUSBメモリ984、若しくはネットワークI/F1008及びネットワーク986を介して接続された図示しない外部装置の記憶媒体等に格納される。典型的には、これらのデータ及びパラメータ等は、例えば外部からHDD1000に書込まれコンピュータ970の実行時にはRAM998にロードされる。
 このコンピュータシステムを図8に示すGAN180及びその各部、そのための敵対的学習による訓練装置、及びその各構成要素の機能を実現するよう動作させるためのコンピュータプログラムは、DVDドライブ1002に装着されるDVD978に記憶され、DVDドライブ1002からHDD1000に転送される。又は、このプログラムはUSBメモリ984に記憶され、USBメモリ984をUSBポート1006に装着し、プログラムをハードディスク1000に転送する。又は、このプログラムはネットワーク986を通じてコンピュータ970に送信されHDD1000に記憶されてもよい。プログラムは実行のときにRAM998にロードされる。もちろん、キーボード974、モニタ972及びマウス976を用いてソースプログラムを入力し、コンパイルした後のオブジェクトプログラムをHDD1000に格納してもよい。スクリプト言語の場合には、キーボード974等を用いて入力したスクリプトをHDD1000に格納してもよい。仮想マシン上で動作するプログラムの場合には、仮想マシンとして機能するプログラムを予めコンピュータ970にインストールしておく必要がある。
 CPU990は、その内部のプログラムカウンタと呼ばれるレジスタ(図示せず)により示されるアドレスにしたがってRAM998からプログラムを読み出して命令を解釈し、命令の実行に必要なデータを命令により指定されるアドレスにしたがってRAM998、ハードディスク1000又はそれ以外の機器から読み出して命令により指定される処理を実行する。CPU990は、実行結果のデータを、RAM998、ハードディスク1000、CPU990内のレジスタ等、プログラムにより指定されるアドレスに格納する。このとき、プログラムカウンタの値もプログラムによって更新される。コンピュータプログラムは、DVD978から、USBメモリ984から、又はネットワークを介して、RAM998に直接にロードしてもよい。なお、CPU990が実行するプログラムの中で、一部のタスク(主として数値計算)については、プログラムに含まれる命令により、又はCPU990による命令実行時の解析結果にしたがって、GPU992にディスパッチされる。
 コンピュータ970により上記した各実施形態に係る各部の機能を実現するプログラムは、それら機能を実現するようコンピュータ970を動作させるように記述され配列された複数の命令を含む。この命令を実行するのに必要な基本的機能のいくつかはコンピュータ970上で動作するオペレーティングシステム(OS)若しくはサードパーティのプログラム、又はコンピュータ970にインストールされる各種ツールキットのモジュールにより提供される。したがって、このプログラムはこの実施形態のシステム及び方法を実現するのに必要な機能全てを必ずしも含まなくてよい。このプログラムは、命令の中で、所望の結果が得られるように制御されたやり方で適切な機能又は「プログラミング・ツール・キット」の機能を呼出すことにより、上記した各装置及びその構成要素としての動作を実行する命令のみを含んでいればよい。そのためのコンピュータ970の動作方法は周知であるので、ここでは繰返さない。なお、GPU992は並列処理を行うことが可能であり、機械学習に伴う多量の計算を同時並列的又はパイプライン的に実行できる。例えばプログラムのコンパイル時にプログラム中で発見された並列的計算要素、又はプログラムの実行時に発見された並列的計算要素は、随時、CPU990からGPU992にディスパッチされ、実行され、その結果が直接に、又はRAM998の所定アドレスを介してCPU990に返され、プログラム中の所定の変数に代入される。
 〔参考文献1〕
 Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805.
 〔参考文献2〕
 Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014. Generative adversarial nets. In Proceedings of the 27th International Conference on Neural Information Processing Systems - Volume 2, NIPS’14, pages 2672-2680, Cambridge, MA, USA. MIT Press.
 〔参考文献3〕
 Rupesh K Srivastava, Klaus Greff, and Jurgen Schmidhuber. 2015. Training very deep networks. In Advances in Neural Information Processing Systems 28, pages 2377-2385.
 〔参考文献4〕
 Jong-Hoon Oh, Kentaro Torisawa, Chikara Hashimoto, Motoki Sano, Stijn De Saeger, and Kiyonori Ohtake. 2013. Why-question answering using intra- and inter-sentential causal relations. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1733-1743.
 〔参考文献5〕
 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.
 〔参考文献6〕
 Jong-Hoon Oh, Kazuma Kadowaki, Julien Kloetzer, Ryu Iida, and Kentaro Torisawa. 2019. Open-domain why-question answering with adversarial learning to encode answer texts. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4227-4237.
 〔参考文献7〕
 Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1870-1879.
 〔参考文献8〕
 Bhuwan Dhingra, Kathryn Mazaitis, and William W Cohen. 2017. Quasar: Datasets for question answering by search and reading. arXiv preprint arXiv:1707.03904.
 〔参考文献9〕
 Matthew Dunn, Levent Sagun, Mike Higgins, V. Ugur Gueney, Volkan Cirik, and Kyunghyun Cho. 2017. Searchqa: A new q&a dataset augmented with context from a search engine. CoRR, abs/1704.05179.
 〔参考文献10〕
 Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pages 1601-1611.
 〔参考文献11〕
 Yankai Lin, Haozhe Ji, Zhiyuan Liu, and Maosong Sun. 2018. Denoising distantly supervised open-domain question answering. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, pages 1736-1745.
 〔参考文献12〕
 Zhiguo Wang, Patrick Ng, Xiaofei Ma, Ramesh Nallapati, and Bing Xiang. 2019. Multi-passage BERT: A globally normalized BERT model for open-domain question answering. 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 5878-5882. Association for Computational Linguistics.
 〔参考文献13〕
 Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392.
 〔参考文献14〕
 Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le, “XLNet: Generalized Autoregressive Pretraining for Language Understanding”, [ONLINE], https://arxiv.org/abs/1906.08237
 〔参考文献15〕
 Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov、”RoBERTa: A Robustly Optimized BERT Pretraining Approach”, [ONLINE], https://arxiv.org/abs/1907.11692
 〔参考文献16〕
 Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut,”ALBERT: A Lite BERT for Self-supervised Learning of Language Representations”,[ONLINE], https://arxiv.org/abs/1909.11942
 〔参考文献17〕
 Wei Wang, Bin Bi, Ming Yan, Chen Wu, Zuyi Bao, Jiangnan Xia, Liwei Peng, Luo Si、”StructBERT: Incorporating Language Structures into Pre-training for Deep Language Understanding”, [ONLINE], https://arxiv.org/abs/1908.04577
 今回開示された実施形態は単に例示であって、この発明が上記した実施形態のみに制限されるわけではない。この発明の範囲は、発明の詳細な説明の記載を参酌した上で、請求の範囲の各請求項によって示され、そこに記載された文言と均等の意味及び範囲内での全ての変更を含む。
50、190、760 質問
52 回答パッセージ
60、192 背景知識
70、72、74 矢印
90 回答特定用テキスト分類器
100、340 入力
102 BERT
104 KIトランスフォーマ
106 出力
108 ラベル
110 開始/終了位置
112 ベクトル変換部
114 BKRG
116 背景知識表現のベクトル群
130、132、134 KIトランスフォーマ層
150、154、158 BKRG層
152、156 更新部
180 GAN
194 本物表現ジェネレータ
196 本物表現
198 ノイズ
200 偽物表現ジェネレータ
202 偽物表現
204 分別器
220、224 単語埋め込みベクトル変換部
222 質問の単語埋め込みベクトル列
226 ノイズの単語埋め込みベクトル列
228 アテンション加算部
230 アテンション付き単語埋め込みベクトル
232 CNN
240 BKRG訓練システム
250 インターネット
252 因果関係BKRG訓練部
254 道具・目的関係BKRG訓練部
256 因果関係BKRG
258 道具・目的関係BKRG
270 因果関係抽出部
272 因果関係記憶装置
274 因果関係学習データ生成部
276 因果関係学習データ記憶装置
278 因果関係BKRG訓練部
280 道具・目的関係抽出部
282 道具・目的関係記憶装置
284 道具・目的関係学習データ生成部
286 道具・目的関係学習データ記憶装置
288 道具・目的関係BKRG訓練部
436、476 エンコーダサブネットワーク
440、492 第1層サブネットワーク
442、494 第2層サブネットワーク
450、510 マルチヘッドアテンションサブネットワーク
452、462、512、522 ADD&Normサブネットワーク
460 全結合サブネットワーク
544、552 線形変換サブネットワーク
566 SoftMax層
520 フィードフォワードサブネットワーク
540 ヘッダ部
542 ベクトル連結部
550 ヘッダ
560、568 行列積サブネットワーク
562 除算回路
600 入力単語埋め込みベクトル列
602、604、606 BERTトランスフォーマ層
608 単語列
750 タスク
762 検索
764 パッセージ
766 パラグラフ選択器
768 パラグラフの集合
770 パラグラフリーダ
772 回答候補の集合
774 回答
 

Claims (6)

  1. 質問テキストと、回答候補テキストとを入力として受ける、言語表現モデルと、
     前記言語表現モデルの出力を入力として受ける知識統合トランスフォーマと、
     前記質問テキストと前記回答候補テキストを入力として受け、当該質問テキストに対する背景知識の表現ベクトルを出力する、背景知識表現ジェネレータとを含み、
     前記知識統合トランスフォーマは、前記背景知識の表現ベクトルをアテンションとして受けるように構成され、前記回答候補テキストが、前記質問テキストに対する回答を含むか否かを示すラベルを出力する、回答特定用テキスト分類器。
  2. 前記知識統合トランスフォーマは複数の知識総合トランスフォーマ層を含み、
     前記背景知識表現ジェネレータは前記複数の知識統合トランスフォーマ層にそれぞれ対応する複数の前記背景知識の表現ベクトルを出力し、
     前記複数の知識総合トランスフォーマ層は、前記複数の背景知識の表現ベクトルのうち、各知識総合トランスフォーマ層に対応する表現ベクトルを前記アテンションのための情報源として受ける、請求項1に記載の回答特定用テキスト分類器。
  3. 前記背景知識表現ジェネレータは、
     質問と回答候補とを表す入力ベクトルに応答して前記背景知識の表現ベクトルを出力する背景知識表現ジェネレータ層と、
     前記背景知識表現ジェネレータ層への入力ベクトルを当該背景知識表現ジェネレータ層の出力する前記背景知識の表現ベクトルを用いて更新して前記背景知識表現ジェネレータ層への次の入力ベクトルとする更新部とを含み、
     前記更新部は、前記背景知識表現ジェネレータへの先行する入力ベクトルを、当該先行する入力ベクトルに応答して前記背景知識表現ジェネレータが出力する前記背景知識表現ベクトルと前記先行する入力ベクトルとの関連度を利用して更新する、請求項1又は請求項2に記載の回答特定用テキスト分類器。
  4. コンピュータを、請求項1から請求項3のいずれか1項に記載の回答特定用テキスト分類器として機能させる、コンピュータプログラム。
  5. 質問テキストの表す質問に対する背景知識のベクトル表現を出力する背景知識表現ジェネレータを、複数の訓練用データ項目を用いて訓練する訓練装置であって、前記複数の訓練用データ項目は、質問テキストと、当該質問テキストに関する背景知識テキストとを含み、
     前記質問テキストと、前記背景知識テキストとが与えられると、前記背景知識テキストが表す背景知識のベクトル表現と同じ形式の本物表現ベクトルを生成する、ニューラルネットワークからなる本物表現ジェネレータと、
     前記質問テキストと、任意のテキストに対するベクトル表現を表すランダムなノイズベクトルとが与えられると、前記ノイズベクトルから生成した前記背景知識に関する前記ベクトル表現と同じ形式の偽物表現ベクトルを出力する、ニューラルネットワークからなる偽物表現ジェネレータと、
     前記本物表現ベクトルと、前記偽物表現ベクトルとを分別するための、ニューラルネットワークからなる分別器と、
     前記分別器による分別の誤りを最小化するように前記本物表現ジェネレータ及び前記分別器を、かつ、前記偽物表現に対する前記分別器による分別の誤りを最大化するように前記偽物表現ジェネレータを、それぞれ敵対的学習により訓練する敵対的訓練装置とを含み、
     前記敵対的訓練装置による訓練が完了したときの前記偽物表現ジェネレータが訓練後の前記背景知識表現ジェネレータであり、実際の質問テキストとノイズが入力されたときの前記偽物表現ジェネレータの出力が、前記実際の質問テキストに関する背景知識の表現ベクトルとなる、訓練装置。
  6. コンピュータを、請求項5に記載の訓練装置として機能させる、コンピュータプログラム。
     
PCT/JP2021/037881 2020-10-20 2021-10-13 回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム WO2022085533A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/031,740 US20230385558A1 (en) 2020-10-20 2021-10-13 Text classifier for answer identification, background knowledge representation generator and training device therefor, and computer program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-175841 2020-10-20
JP2020175841A JP2022067234A (ja) 2020-10-20 2020-10-20 回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム

Publications (1)

Publication Number Publication Date
WO2022085533A1 true WO2022085533A1 (ja) 2022-04-28

Family

ID=81290771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/037881 WO2022085533A1 (ja) 2020-10-20 2021-10-13 回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム

Country Status (3)

Country Link
US (1) US20230385558A1 (ja)
JP (1) JP2022067234A (ja)
WO (1) WO2022085533A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020893A (ja) * 2017-07-13 2019-02-07 国立研究開発法人情報通信研究機構 ノン・ファクトイド型質問応答装置
JP2019056975A (ja) * 2017-09-19 2019-04-11 株式会社Preferred Networks 改良型敵対的生成ネットワーク実現プログラム、改良型敵対的生成ネットワーク実現装置及び学習済モデル生成方法
JP2020004045A (ja) * 2018-06-27 2020-01-09 国立研究開発法人情報通信研究機構 質問応答装置及びコンピュータプログラム
JP2021018588A (ja) * 2019-07-19 2021-02-15 国立研究開発法人情報通信研究機構 質問応答システムのための回答分類器及び表現ジェネレータ、並びに表現ジェネレータを訓練するためのコンピュータプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020893A (ja) * 2017-07-13 2019-02-07 国立研究開発法人情報通信研究機構 ノン・ファクトイド型質問応答装置
JP2019056975A (ja) * 2017-09-19 2019-04-11 株式会社Preferred Networks 改良型敵対的生成ネットワーク実現プログラム、改良型敵対的生成ネットワーク実現装置及び学習済モデル生成方法
JP2020004045A (ja) * 2018-06-27 2020-01-09 国立研究開発法人情報通信研究機構 質問応答装置及びコンピュータプログラム
JP2021018588A (ja) * 2019-07-19 2021-02-15 国立研究開発法人情報通信研究機構 質問応答システムのための回答分類器及び表現ジェネレータ、並びに表現ジェネレータを訓練するためのコンピュータプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MAKOTO NAKATSUJI, SOHEI OKUI, AKIHISA FUJITA: "Neural Answer Construction Model for Non-Factoid Questions", THE IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, vol. J102-D, no. 4, 1 April 2019 (2019-04-01), pages 267 - 276, XP055922697, DOI: 10.14923/transinfj.2018DEP0004 *

Also Published As

Publication number Publication date
US20230385558A1 (en) 2023-11-30
JP2022067234A (ja) 2022-05-06

Similar Documents

Publication Publication Date Title
Young et al. Recent trends in deep learning based natural language processing
CN111401077B (zh) 语言模型的处理方法、装置和计算机设备
JP7290861B2 (ja) 質問応答システムのための回答分類器及び表現ジェネレータ、並びに表現ジェネレータを訓練するためのコンピュータプログラム
El Bazi et al. Arabic named entity recognition using deep learning approach.
CN110377916B (zh) 词预测方法、装置、计算机设备及存储介质
Kheddar et al. Deep transfer learning for automatic speech recognition: Towards better generalization
CN112749274B (zh) 基于注意力机制和干扰词删除的中文文本分类方法
CN113987187A (zh) 基于多标签嵌入的舆情文本分类方法、系统、终端及介质
CN112667813A (zh) 用于裁判文书的敏感身份信息的识别方法
Xu et al. Convolutional neural network using a threshold predictor for multi-label speech act classification
Tsirmpas et al. Neural Natural Language Processing for long texts: A survey of the state-of-the-art
Shah et al. A study of various word embeddings in deep learning
WO2022085533A1 (ja) 回答特定用テキスト分類器及び背景知識表現ジェネレータ及びその訓練装置、並びにコンピュータプログラム
CN112685548B (zh) 问题回答方法以及电子设备、存储装置
Kim et al. CNN based sentence classification with semantic features using word clustering
CN114722818A (zh) 一种基于对抗迁移学习的命名实体识别模型
Ribeiro et al. Automatic recognition of the general-purpose communicative functions defined by the ISO 24617-2 standard for dialog act annotation
Rodrigues et al. Sentence similarity recognition in Portuguese from multiple embedding models
Shafiq et al. Enhancing Arabic Aspect-Based Sentiment Analysis Using End-to-End Model
KR102649948B1 (ko) 계층 기반 단어 대체를 통한 텍스트 데이터 증강 장치 및 방법
KR102601803B1 (ko) 채용 중개 서비스에서 구직자 및 구인자의 매칭 확률 예측을 위한 신경망 모델 제공 전자 장치 및 방법
CN116561323B (zh) 一种基于方面词嵌入图卷积网络的情感分析方法
Dibitso et al. An Hybrid Part of Speech Tagger for Setswana Language using a Voting Method
Meguellati et al. Feature selection for location metonymy using augmented bag-of-words
Kulkarni et al. Deep Reinforcement-Based Conversational AI Agent in Healthcare System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21882674

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18031740

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21882674

Country of ref document: EP

Kind code of ref document: A1