WO2020174826A1 - 回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム - Google Patents

回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム Download PDF

Info

Publication number
WO2020174826A1
WO2020174826A1 PCT/JP2019/049385 JP2019049385W WO2020174826A1 WO 2020174826 A1 WO2020174826 A1 WO 2020174826A1 JP 2019049385 W JP2019049385 W JP 2019049385W WO 2020174826 A1 WO2020174826 A1 WO 2020174826A1
Authority
WO
WIPO (PCT)
Prior art keywords
answer
sentence
basis
model
unit
Prior art date
Application number
PCT/JP2019/049385
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
Priority claimed from JP2019032127A external-priority patent/JP2019220142A/ja
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/433,096 priority Critical patent/US20220043972A1/en
Priority to JP2021501617A priority patent/JP7120433B2/ja
Publication of WO2020174826A1 publication Critical patent/WO2020174826A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present disclosure relates to an answer generation device, an answer learning device, an answer generation method, and an answer generation program, and in particular, an answer generation device, an answer learning device, an answer generation method, and an answer for answering a question sentence with polarity.
  • an answer generation device an answer learning device, an answer generation method, and an answer for answering a question sentence with polarity.
  • the generator Regarding the generator.
  • Non-patent document 2 In recent years, machine reading technology (for example, BiDAF (Non-patent document 1)), in which a machine reads a sentence and answers a question, has been attracting attention.
  • SQuad Non-Patent Document 2 is present in a typical data set for machine reading, and it is possible to apply a large-scale deep learning technique.
  • SQuad is a data set for an extraction-type task in which a sentence of one paragraph is linked to one question, and the answer written in the sentence is extracted as it is and used as the answer.
  • the method for extraction-type tasks had a problem that the answer could not be output in a format not written in the text. Specifically, a question that can be answered with a polarity such as Yes or No cannot be answered with that polarity (Yes or No). In order to output an answer in a format not written in such a text, the machine needs not only to pay attention to the part related to the question in the sentence, but also to judge the answer to the question from the related part.
  • the present disclosure has been made in view of the above points, and provides a response generation device, a response generation method, and a response generation program that can accurately and polarly answer a question that can be answered with polarity.
  • the purpose is to provide.
  • the present disclosure has been made in view of the above points, and provides an answer learning device that can accurately learn a model for answering with polarity to a question that can be answered with polarity.
  • the purpose is to
  • a first aspect of the present disclosure is an answer generation device, and an input sentence is a vector representing the meaning of an input sentence, based on an input sentence and a question sentence divided into a plurality of spans which are sentence division units.
  • a pre-learned coding model for converting into an expression series a coding unit that converts into a vector expression series representing the meaning of the span and the question sentence, and based on the vector expression series
  • the answer Using a pre-learned extraction model for extracting a span suitable for the basis for extraction, a basis extraction unit for estimating basis information that is a span suitable for the basis for extracting the answer, the vector expression series, A basis search unit that estimates the basis range using a pre-learned search model that extracts the basis range that is the range that is the basis of the answer in the sentence based on the basis information, and the vector expression series Based on the basis information, using a pre-learned judgment model for determining the answer type that is the correct answer to the question sentence in the sentence, a determination unit to determine the
  • a second aspect of the present disclosure is an answer generation device, which is a vector that represents the meaning of an input sentence, based on an input sentence and a question sentence divided into a plurality of spans that are sentence division units.
  • an encoding unit that converts into a vector expression series representing the meaning of the span and the question sentence, and based on the vector expression series
  • the span is A basis extraction unit that estimates the basis score of each of the spans by using a pre-learned extraction model for calculating a basis score indicating a degree suitable for the basis for extracting the answer;
  • the model and the extraction model are a search model and a vector expression for extracting a base range that is a base of the answer in the sentence based on the vector expression series converted by using the encoding model. It is pre-learned by multitask learning of a plurality of models further including a judgment model for judging an answer type which is a correct answer to the question sentence in the sentence based on the series.
  • a third aspect of the present disclosure is an answer generation/learning apparatus, which is a sentence divided into a plurality of spans as sentence division units, a question sentence, and an answer type that is a correct answer to the question sentence in the sentence.
  • an input unit that accepts input of learning data including a range of grounds that is a range of the answer in the sentence and a basis information that is a span of the sentence in the sentence, and is divided into a plurality of spans.
  • the sentence and the question sentence are converted into a vector expression sequence representing the span and the meaning of the question sentence using an encoding model for converting the input sentence into a vector expression sequence representing the meaning of the input sentence.
  • a fourth aspect of the present disclosure is an answer generation method, in which an encoding unit inputs an input sentence based on an input sentence and a question sentence divided into a plurality of spans that are sentence division units.
  • the basis extraction unit uses a pre-learned coding model for converting into a vector expression series representing the meaning of, the conversion into a vector expression series representing the meaning of the span and the question sentence, the basis extraction unit, into the vector expression series Based on this, by using a pre-learned extraction model that extracts a span suitable for the basis for extracting the answer, the basis information that is a span suitable for the basis for extracting the answer is estimated, and the basis search unit , Estimating the rationale range by using a pre-learned search model that extracts a rationale range that is a range that is the basis of the answer in the sentence based on the vector representation series and the rationale information The part, based on the vector expression series and the basis information, using a pre-learned judgment model for judging the answer type that is the correct answer to
  • a fifth aspect of the present disclosure is an answer generation method, wherein an encoding unit inputs an input sentence based on an input sentence and a question sentence divided into a plurality of spans which are sentence division units.
  • the basis extraction unit uses a pre-learned coding model for converting into a vector expression series representing the meaning of, the conversion into a vector expression series representing the meaning of the span and the question sentence, the basis extraction unit, into the vector expression series
  • the coding model and the extraction model are search models that extract a ground range that is a range that serves as a ground for the answer in the sentence, based on the vector representation series converted using the coding model.
  • a multi-task learning of a plurality of models further including a judgment model for judging a correct answer type of an answer to the question sentence in
  • a sixth aspect of the present disclosure is an answer generation program, which is a vector that represents the meaning of an input sentence based on an input sentence and a question sentence divided into a plurality of spans that are sentence division units.
  • a pre-learned coding model for converting into an expression series converting into a vector expression series representing the meaning of the span and the question sentence, based on the vector expression series, on the basis of extracting the answer
  • a pre-learned extraction model to extract a suitable span, estimate the basis information that is a span suitable for the basis for extracting the answer, based on the vector expression series and the basis information
  • a pre-learned search model that extracts the basis range that is the range that is the basis of the answer in the sentence, the basis range is estimated, and the sentence is based on the vector expression series and the basis information.
  • It is an answer generation program for causing a computer to execute a process of judging an answer type for the question sentence by using a pre-learned judgment model for judging an answer type which is a
  • a seventh aspect of the present disclosure is an answer generation program, wherein an input sentence is a vector representing the meaning of the input sentence based on the inputted sentence and question sentence divided into a plurality of spans which are sentence division units.
  • the span extracts the answer.
  • a response generation program for causing a computer to execute a process of estimating a rationale score for each of the spans using a pre-learned extraction model for calculating a rationale score indicating a degree suitable for the rationale.
  • the encoding model and the extraction model are search models for extracting a base range that is a base of the answer in the sentence based on the vector representation series converted using the coding model, and It is learned in advance by multitask learning of a plurality of models further including a judgment model for judging an answer type which is a correct answer to the question sentence in the sentence, based on the vector expression series.
  • the response generation device According to the response generation device, the response generation method, and the program of the present disclosure, it is possible to accurately and polarly answer a question that can be polarly answered.
  • the answer learning device of the present disclosure it is possible to accurately learn a model for answering with a polarity to a question that can be answered with a polarity.
  • MS-MARCO In addition to SQuaD (Non-Patent Document 2), MS-MARCO (Reference Document 1) exists as a typical data set for machine reading. MS-MARCO is a data set in which a question is associated with nearly 10 paragraphs and a human generates an answer from the paragraph group. Such a task that outputs an answer to a question in a format not written in the text is called a generation task.
  • a generation task Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, Li Deng, "MS MARCO: A Human Generated MAchine Reading COmprehension Dataset", 2016.
  • Generation type task is a more difficult task compared to extraction type task because of the characteristic of "outputting the answer in a format not written in text".
  • S-Net (Reference 2) exists as a method of generation type tasks. [Reference 2] Chuanqi Tan, Furu Weiz, Nan Yang, Bowen Du, Weifeng Lv, Ming Zhouz, “S-NET: FROM ANSWER EXTRACTION TO ANSWER GENERATION FOR MACHINE READING COMPREHENSION”, 2017.
  • the answer learning device converts a sentence P that is a word sequence and a question sentence Q into a vector sequence
  • a machine reading unit converts the answer range score (s d :s e ) using a reading technique
  • the score of the vector series and the answer range is converted into a decision score by using a new determination unit, and learning is performed using the answer range score and the decision score.
  • FIG. 1 is a block diagram showing a configuration of an answer learning device 10 according to the first exemplary embodiment.
  • the answer learning device 10 is configured by a computer including a CPU, a RAM, and a ROM storing a program for executing an answer learning processing routine described later, and is functionally configured as shown below. .. As shown in FIG. 1, the answer learning device 10 according to the present embodiment includes an input unit 100, an analysis unit 200, and a parameter learning unit 300.
  • the input unit 100 includes a plurality of sentences including a sentence P, a question sentence Q, a correct answer Y indicating a polarity of an answer to the question sentence in the sentence P, and a start end D and a terminal end E of a range on which the answer in the sentence P is based. Accept learning data input.
  • the learning data includes a sentence P and a question sentence Q, which are text data, a correct answer Y indicating whether the answer is Yes/No, and a range (D: E).
  • D and E are represented by the position numbers of the words in the sentence P
  • D is the position number of the word at the start position of the range that is the basis of the reply
  • E is the word position number of the end position of the range that is the basis of the reply. The position number.
  • the text P and the question text Q which are text data, are expressed as a token series by the existing tokenizer. Although any unit can be used as the token, the token is referred to as a word in this embodiment.
  • the lengths of the sentence P and the question sentence Q expressed by the word series are defined by the number of words, and the number of words of the sentence P is L P and the number of words of the question sentence Q is L Q.
  • multiple learning data may be processed as a mini-batch for each mini-batch, or may be processed for each learning data.
  • the input unit 100 passes the sentence P and the question sentence Q out of the received learning data to the machine reading unit 210 and the learning data to the parameter learning unit 300.
  • the analysis unit 200 includes a machine reading unit 210 and a determination unit 220.
  • the machine reading unit 210 uses a reading model for estimating the range D:E that is the basis of the answer in the sentence P, and determines the start end s d and the end s e of the range. presume.
  • the machine reading unit 210 includes a word encoding unit 211, a word database (DB) 212, a first context encoding unit 213, an attention unit 214, a second context encoding unit 215, and a basis. And a search unit 216.
  • DB word database
  • the word encoding unit 211 generates a series of word vectors P 1 and Q 1 based on the sentence P and the question sentence Q.
  • the word encoding unit 211 extracts a vector corresponding to each word of the sentence P and the question sentence Q from the word DB 212, and generates a series of word vectors P 1 and Q 1 .
  • the series of word vectors P 1 is a matrix of size L P ⁇ d
  • the series of word vectors Q 1 is a matrix of size L Q ⁇ d.
  • the word encoding unit 211 passes the generated word vector series P 1 and Q 1 to the first context encoding unit 213.
  • the word DB 212 stores a plurality of word vectors.
  • a word vector is a set of real-valued vectors of a predetermined dimension that represent a word.
  • the word DB 212 uses a plurality of word vectors (word embedding) learned in advance by a neural network.
  • word vectors word embedding
  • an existing one such as word2vec or GloVe may be used.
  • a newly learned word vector can be connected to a word vector extracted from a plurality of existing word vectors.
  • Any word embedding technique such as a technique (reference 3) for encoding character information of a word can be used.
  • Word vectors can also be learned from gradients that can be calculated by the error backpropagation method.
  • the first context encoding unit 213 converts the word vector sequences P 1 and Q 1 generated by the word encoding unit 211 into vector sequences P 2 and Q 2 , respectively, using a neural network.
  • the first context encoding unit 213 converts the word vector series P 1 and Q 1 into vector series P 2 and Q 2 by the RNN.
  • An existing technology such as LSTM can be used for the structure of the RNN.
  • the first context encoding unit 213 uses a bidirectional RNN that is a combination of two types of RNNs: an RNN that processes a vector sequence in the forward direction and an RNN that processes the vector sequence in the backward direction.
  • the vector sequence P 2 converted by the first context encoding unit 213 is L P ⁇ d 1
  • the vector sequence Q 2 is L Q ⁇ d 1 . It becomes the matrix of Sa.
  • the first context encoding unit 213 passes the converted vector sequences P 2 and Q 2 to the attention unit 214 and the vector sequence Q 2 to the input conversion unit 221.
  • the attention unit 214 uses a neural network to generate a reading matrix B, which is a series of vectors representing the attention of the sentence P and the question sentence Q, based on the series P 2 and Q 2 of the vector.
  • the attention unit 214 first calculates the attention matrix from the vector series P 2 and Q 2. To calculate.
  • the attention matrix A for example, the following equation (1) can be used.
  • components are represented by matrix subscripts, and “:” represents the whole.
  • a i: represents the entire i-th row of the attention matrix A.
  • is an element product, and “,” is an operator that vertically joins the vectors and matrices.
  • w S is a learnable parameter of the model, Is.
  • Attention unit 214 based on attention matrix A, attention vector from sentence P toward question sentence Q , Attention vector from question Q to sentence P To calculate.
  • softmax is a softmax function, Is.
  • attention vector Can be represented by the following formula (3).
  • the i-th element (1 ⁇ i ⁇ L P) is the maximum value of the i-th vector of the attention matrix A (max value of j direction).
  • softmax i means that softmax is used in the i direction.
  • becomes a vector having a length L P by using the max function for the attention matrix A, and in Equation (3), each component of ⁇ is used as a weight, and the sum of the weights of the rows of P 2 is obtained. Is a vector of length d 1 .
  • Attention unit 214 is a series of vectors P 2 , attention vector , And attention vector Based on, the reading matrix B of length L P that expresses the result of the attention is obtained. For example, the reading matrix Is. However, ",” is an operator that horizontally joins vectors and matrices.
  • the attention unit 214 passes the reading matrix B to the input conversion unit 221 and the second context coding unit 215.
  • the second context encoding unit 215 converts the reading comprehension matrix B generated by the attention unit 214 into a reading comprehension matrix M that is a series of vectors using a neural network.
  • the second context encoding unit 215 converts the reading matrix B into the reading matrix M by the RNN.
  • an existing technology such as LSTM can be used for the structure of the RNN.
  • the second context encoding unit 215 passes the converted reading matrix M to the input conversion unit 221 and the ground search unit 216.
  • the grounds search unit 216 uses a reading comprehension model for estimating the range D:E that is the basis of the answer in the sentence P, and estimates the start end s d and the end s e of the range.
  • the rationale search unit 216 is configured by two neural networks of an RNN for the start end for estimating the start end s d of the range serving as the basis of the answer and an RNN for the end end for estimating the end s e. ..
  • the rationale search unit 216 first inputs the reading comprehension matrix M to the RNN for the start edge to obtain the series M 1 of vectors.
  • the grounds search part 216 calculates
  • the starting point s d is a score related to the starting point of the range that is the basis of the answer, and is represented by a vector. That is, it represents the probability (score) that the word corresponding to each dimension of the vector becomes the beginning of the answer range.
  • the reading matrix M is input to the terminating RNN to obtain the word vector M 2 .
  • the rationale search unit 216 obtains the end s e of the range that is the basis of the reply using the following formula (5).
  • the end s e is a score regarding the end of the range that is the basis of the answer, and is represented by a vector. That is, it represents the probability (score) at which the word corresponding to each dimension of the vector becomes the end of the answer range.
  • the estimated starting end s d and ending end s e are collectively called an answer range score.
  • w 1 and w 2 are parameters of the reading comprehension model represented by equations (4) and (5), and are updated by the parameter learning unit 300.
  • the grounds search unit 216 passes the estimated answer range score to the input conversion unit 221 and the parameter learning unit 300.
  • the judgment unit 220 judges the polarity of the answer to the question sentence Q by using a judgment model for judging whether the polarity of the answer to the question sentence Q is positive based on the information obtained by the processing of the machine reading unit 210. ..
  • the determination unit 220 includes an input conversion unit 221 and a score calculation unit 222.
  • the input conversion unit 221 generates vector sequences P 3 and Q 3 based on the result of encoding the sentence P by the machine reading unit 210 and the result of encoding the question sentence Q by the machine reading unit 210.
  • the input conversion unit 221 first receives an input of information obtained by the processing of the machine reading unit 210.
  • Information that receives an input can be classified into four types. That is, (1) a coding result of the sentence P, and a sequence of vectors of length L P in consideration of the question sentence Q (for example, the reading matrix B or M), (2) a coding result of the question sentence Q Is a vector sequence of length L Q (for example, a sequence of vectors Q 2 ), (3) a vector of length L P that is information about the answer range (for example, the estimated start end s d and end s e ), (4 ) Four types of matrices (for example, attention matrix A) of size L P ⁇ L Q , which are the results of semantic matching between the sentence P and the question sentence Q, are accepted.
  • matrices for example, attention matrix A
  • reading matrix B or M the reading matrix B or M
  • (2), (3) and (4) or a plurality of them may be additionally accepted.
  • a case will be described as an example where (1) the reading matrix B and (2) the vector sequence Q 2 are accepted as a simple format.
  • the input conversion unit 221 determines a vector sequence of length L P. , A sequence of vectors of length L Q To calculate.
  • An arbitrary neural network can be used as a method of calculating the vector series P 3 and Q 3 .
  • the following equations (6) and (7) can be used.
  • the number of dimensions of d 3 can be set arbitrarily.
  • d 3 d 2 in order to match the dimension with Q 2
  • the input conversion unit 221 passes the generated vector series P 3 and Q 3 to the score calculation unit 222.
  • the score calculation unit 222 determines the polarity of the response to the question sentence Q using a determination model that determines whether the polarity of the response to the question sentence Q is positive.
  • the score calculation unit 222 uses the framework of any sentence pair classification task to classify the answer to the question sentence Q into Yes or No based on the series P 3 and Q 3 of the vector.
  • the determination score k (real number from 0 to 1) used for is calculated.
  • the framework after decoder LSTM of ESIM (Reference 4), which is a typical model of entailment recognition which is one of sentence pair classification tasks, can be used for the classification problem.
  • Reference 4 Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang, Diana Inkpen, "Enhanced LSTM for Natural Language Inference", arXiv:1609.06038, 2017.
  • the vector series P 3 and Q 3 are subjected to average pooling (operation for taking the average in the column direction) or max pooling (operation for taking the maximum value in the column direction) to obtain the vector.
  • average pooling operation for taking the average in the column direction
  • max pooling operation for taking the maximum value in the column direction
  • the obtained vectors P a , Q a , P m, and Q m are combined to obtain a 4d three- dimensional vector J.
  • the vector J is converted into a real number (one-dimensional vector) by a multi-layer perceptron, and sigmoid transformation is performed to obtain a judgment score k.
  • the problem may not be classified into Yes/No, but may be classified into Yes, No, or unknown.
  • the softmax conversion may be used as the judgment score k.
  • the score calculation unit 222 passes the judgment score k to the parameter learning unit 300.
  • the correct answer Y included in the learning data and the result determined by the determining unit 220 match, and the start end D and the end E included in the learning data, and the start end s estimated by the machine reading unit 210.
  • the parameters of the reading model and the judgment model are learned so that d and the end s e match.
  • the parameter learning unit 300 calculates the linear sum of the objective function L C of the reading model used by the machine reading unit 210 and the objective function L J of the judgment model used by the determining unit 220 as the objective of the optimization problem. Let it be a function (Equation (8) below).
  • is a model parameter and can be learned by a learner.
  • an appropriate value such as 1 or 1/2 is set so that learning proceeds.
  • Non-Patent Document 1 proposes a cross entropy function represented by the following equation (9).
  • D and E represent the positions of the true start end D and the end E, respectively
  • s d,D is the value of the D-th element in the vector s d
  • s e,E is the vector. It represents the value of the E-th element in s e .
  • the objective function L J can also use an arbitrary objective function. For example, when the cross entropy function is used, the following equation (10) is obtained.
  • Y is the correct answer Y indicating the polarity of the true answer
  • the score k Yes k
  • the parameter learning unit 300 calculates the gradient of the objective function represented by the above equation (8) using the error backpropagation gradient method, and updates the parameter using an arbitrary optimization method.
  • FIG. 2 is a flowchart showing an answer learning processing routine according to the first embodiment. Further, the case where the answer learning device according to the present embodiment performs learning using a mini-batch will be described below, but a general neural network learning method may be used. The size of the mini-batch is set to 1 for simplicity.
  • the answer learning processing routine shown in FIG. 2 is executed in the answer learning device 10.
  • step S100 the input unit 100 causes the sentence P, the question sentence Q, the correct answer Y indicating the polarity of the answer to the question sentence in the sentence P, and the beginning D and the end of the range on which the answer in the sentence P is based.
  • Input of a plurality of learning data including E and E is accepted.
  • step S110 the input unit 100 divides the learning data received in step S100 into mini-batches.
  • a mini-batch is a set of learning data ⁇ obtained by randomly dividing a plurality of learning data.
  • is a natural number of 1 or more.
  • step S120 the word encoding unit 211 selects the first mini-batch.
  • step S130 the word encoding unit 211 generates the word vector series P 1 and Q 1 based on the sentence P and the question sentence Q included in the selected mini-batch.
  • step S140 the first context encoding unit 213 converts the word vector series P 1 and Q 1 generated in step S130 into a vector series P 2 and Q 2 , respectively, using a neural network.
  • step S150 the attention unit 214 uses a neural network to generate a reading matrix B representing the attention of the sentence P and the question sentence Q, based on the vector series P 2 and Q 2 .
  • step S160 the second context encoding unit 215 converts the reading matrix B generated in step S150 into the reading matrix M using a neural network.
  • step S170 rationale search unit 216, based on the reading matrix M, range underlies the answer in text P D: using a reading model for estimating E, starting of the range s d and termination s e To estimate.
  • step S180 the input conversion unit 221 determines the sequence of vectors P 3 and Q 3 based on the result of encoding the sentence P by the machine reading unit 210 and the result of encoding the question sentence Q by the machine reading unit 210. To generate.
  • step S190 the score calculation unit 222 uses the judgment model for judging whether the polarity of the answer to the question sentence Q is positive, based on the series P 3 and Q 3 of the vectors, and the polarity of the answer to the question sentence Q. To judge.
  • step S200 the parameter learning unit 300 estimates that the correct answer Y included in the learning data and the result determined by the determining unit 220 match, the start end D and the end E included in the learning data, and the machine reading unit 210.
  • the parameters of the reading comprehension model and the judgment model are updated so that the obtained start end s d and end end s e match.
  • step S210 the parameter learning unit 300 determines whether or not all mini-batches have been processed.
  • step S210 If all mini-batches have not been processed (NO in step S210), the next mini-batch is selected in step S220, and the process returns to step S130.
  • step S230 the parameter learning unit 300 makes a convergence determination as to whether learning has converged.
  • step S230 If the learning has not converged (NO in step S230), the process returns to step S110, and the processes from step S110 to step S230 are performed again.
  • the parameter learning unit 300 stores the learned parameter in the memory (not shown) in step S240.
  • step S120 the step of selecting the first sentence P and the question Q, and before the step S210, all the sentences P and the question Q in the mini-batch It is determined whether or not the process has been performed. If the determination result is negative, the next sentence P and question Q are selected and the process returns to step S130. If the determination is positive, the process proceeds to step S210.
  • the configuration may be such that steps and are added.
  • Information obtained by the process of accepting the input of learning data including the start end and the end and using the reading comprehension model for estimating the range based on the sentence and the question sentence, and estimating the start and end of the range Based on, the judgment model that judges whether the polarity of the answer to the question sentence is positive is used to judge the polarity of the answer to the question sentence, and the correct answer included in the learning data and the judged result are Then, by learning the parameters of the reading model and the judgment model so that the start and end included in the learning data and the estimated start and end match, to the question that can be answered with polarity, A model for answering with polarity with high accuracy can be learned.
  • FIG. 3 is a block diagram showing the configuration of the answer generation device 20 according to the first embodiment.
  • the same components as those of the answer learning device 10 described above are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the answer generation device 20 is configured by a computer including a CPU, a RAM, and a ROM that stores a program for executing an answer generation processing routine described later, and is functionally configured as shown below. .. As shown in FIG. 3, the answer generation device 20 according to the present embodiment includes an input unit 400, an analysis unit 200, and an output unit 500. The analysis unit 200 uses the parameters learned by the answer learning device 10.
  • the input unit 400 receives input of a sentence P and a question sentence Q.
  • the input unit 400 passes the received sentence P and question sentence Q to the machine reading unit 210.
  • the output unit 500 outputs the judgment score k obtained by the score calculation unit 222 of the judgment unit 220 as the reply, with the answer range score obtained by the ground search unit 216 of the machine reading unit 210 as the basis of the reply.
  • the output unit 500 outputs, as a response, a judgment result having a larger score among the Yes score and the No score of the judgment score k, and outputs only the judgment result of the score exceeding the threshold value. Can be selected.
  • the output unit 500 can also select an arbitrary output format for the answer range score. Since the answer range score includes the start end s d and the end end s e , it is conceivable to use various methods as the output calculation method. For example, as in Non-Patent Document 1, a technique under the constraint that start s d is before the end s e, the product of the starting end s d and end s e outputs a word string of a range of maximum, such as Can be used.
  • FIG. 4 is a flowchart showing an answer generation processing routine according to the first embodiment.
  • the same processes as those in the answer learning process routine according to the first embodiment are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the response generation processing routine shown in FIG. 4 is executed in the response generation device 20.
  • step S300 the input unit 400 receives input of the sentence P and the question sentence Q.
  • step S400 the output unit 500 uses the answer range score obtained in step S170 as a basis for the answer by a predetermined method, and generates the judgment score k obtained in step S190 as an answer by the predetermined method.
  • step S430 the output unit 500 outputs the grounds and answers for all the answers obtained in step S400.
  • a reading comprehension model for estimating the range that is the basis of the answer to the question sentence in the sentence. Based on the information obtained by the process of estimating the start end and the end of the range, using the pre-learned judgment model for judging whether the polarity of the answer to the question sentence is positive, By determining the polarity of the answer to, the question that can be answered with the polarity can be answered with accuracy with the polarity.
  • ⁇ Outline of answer learning device When a person understands and answers natural language, he/she can infer the answer to the question he/she understood, based on his/her own experience, common sense, and world knowledge. For example, when a person reads a sentence and answers a question about the sentence, he or she finds the answer not only from the sentence but also from his or her own experience. However, in the case of AI, it is necessary to infer the answer only from the information contained in the sentence that is the subject of the question.
  • the knowledge necessary to answer the question is not necessarily stated in one place.
  • the necessary knowledge may be written in multiple places in the text, or it may be necessary to supplement the world knowledge.
  • the question and answer that thinks by combining the descriptions in multiple places in the sentence is a difficult question and answer because it requires understanding of long-term dependency that the neural network is not good at.
  • by extracting only the sentences necessary for an answer as the basis sentences it is possible to match the basis sentences whose positions are distant from each other and realize the long-term dependency.
  • the text with the necessary knowledge is obtained by searching the Web, etc., and for the new sentence connected to the sentence to be asked. It is realized by answering questions.
  • it is difficult to match by simply connecting the sentences, because the part required for the answer in the original sentence and the newly connected text are located apart from each other.
  • by extracting them as the basis sentences matching is possible even when the basis sentences are located at distant places.
  • FIG. 5 is a block diagram showing the configuration of the answer learning device 30 according to the second embodiment.
  • symbol is attached
  • the answer learning device 30 is configured by a computer including a CPU, a RAM, and a ROM that stores a program for executing an answer learning processing routine described later, and is functionally configured as shown below. .. As shown in FIG. 5, the answer learning device 30 according to this embodiment includes an input unit 100, an analysis unit 600, and a parameter learning unit 700.
  • the analysis unit 600 includes a machine reading unit 610 and a determination unit 220.
  • the machine reading unit 610 uses the reading model for estimating the range D:E that is the basis of the answer in the sentence P based on the sentence P and the question sentence Q, and determines the start end s d and the end s e of the range. presume.
  • the machine reading unit 210 includes a word encoding unit 211, a word database (DB) 212, a first context encoding unit 213, an attention unit 214, a second context encoding unit 215, and a basis.
  • An extraction unit 617 and a grounds search unit 216 are provided.
  • the grounds extraction unit 617 uses the extraction model that extracts the grounds information that is the grounds for the answers to the question texts, and the grounds information for the answers to the question texts Q. To extract.
  • the grounds extraction unit 617 first inputs the reading comprehension matrix M converted by the second context encoding unit 215 (may be the reading comprehension matrix B before conversion), and uses the neural network to input each sentence P of each sentence. A series H of vectors representing the meaning of a sentence is extracted.
  • the basis extraction unit 617 can use Undirectional-RNN as a neural network, for example.
  • grounds extractor 617 defines the operation one time to extract a single basis statement is generated by the RNN extraction model state z t. That is, the basis extraction unit 617 determines that the elements of the series H of vectors corresponding to the basis sentence extracted at time t-1. To generate the state z t by inputting R to the extracted model RNN. However, s t-1 is a subscript of the base sentence extracted at time t-1. In addition, the set of sentences s t extracted by time t is S t .
  • the grounds extraction unit 617 uses the extraction model to obtain a glimpse vector that is a question sentence vector considering the importance at time t. e t (Equation (13) below) is generated by performing a glimpse operation (reference document 5) on the question sentence Q.
  • e t (Equation (13) below) is generated by performing a glimpse operation (reference document 5) on the question sentence Q.
  • the extraction result of the basis sentence can include the contents corresponding to the entire question.
  • the initial value of the RNN of the extraction model is a vector obtained by maxpooling a vector sequence obtained by affine-transforming the vector sequence H.
  • the grounds extraction unit 617 selects the ⁇ th sentence according to the probability distribution represented by the following formula (14) at time t by the extraction model.
  • S t ⁇ is the basis sentence extracted at time t.
  • the rationale extraction unit 617 passes the grounds search unit 216 and the parameter learning unit 700.
  • the grounds search unit 216 uses the reading model for estimating the range D:E that is the grounds for the answer in the sentence P, and determines the start end s d and the end s e of the range. presume.
  • a series of vectors Is a sentence-level vector series, so it is converted to a word-level vector series as follows.
  • word_to_sent(i) j when the word i is included in the sentence j.
  • the matrix that vertically connects M and H'is As described above, this M′ may be used instead of M in the subsequent processing.
  • the reading comprehension matrix M has been described as an example, but another matrix such as the reading comprehension matrix B may be used.
  • the variables such as i and j used in the description of the grounds search unit 216 are limited to those described here.
  • the correct answer Y included in the learning data and the result determined by the determining unit 220 match, and the start end D and the end E included in the learning data and the start end s estimated by the machine reading unit 610.
  • the reading comprehension model, the judgment model, and the extraction model of the reading model, the judgment model, and the extraction model are matched so that the d and the end s e match, and the basis information of the correct answer in the sentence P included in the learning data matches the basis information extracted by the basis extracting unit 617. Learn the parameters.
  • the set of rationale paragraphs S t ⁇ which is the rationale information that is the correct answer to the answer Y is one set, and the learning data is assumed to include a plurality of sets.
  • the parameter learning unit 700 uses the objective function L C for the reading model used by the machine reading unit 610, the objective function L J for the determination model used by the determination unit 220, and the objective for the extraction model used by the grounds extraction unit 617.
  • the linear sum with the function L s is the objective function of the optimization problem (Equation (15) below).
  • the objective functions L C and L J are the same as in the first embodiment.
  • the objective function Ls is an objective function that has been subjected to coverage regularization (reference document 6).
  • an objective function represented by the following formula (16) can be used as the objective function Ls. [Reference 6] A. See, P.P. J. Liu and C. D. Manning, "Get to the point: ummarization with pointer-generator networks", ACL, 2017, pp. 1073-1083.
  • the parameter learning unit 700 calculates the gradient of the objective function represented by the above equation (16) using the error backpropagation gradient method, and updates each parameter using an arbitrary optimization method.
  • FIG. 6 is a flowchart showing an answer learning processing routine according to the second embodiment. Further, the case where the answer learning device according to the present embodiment performs learning using a mini-batch will be described below, but a general neural network learning method may be used. The size of the mini-batch is set to 1 for simplicity.
  • the same components as those in the answer learning processing routine according to the first embodiment described above are designated by the same reference numerals, and detailed description thereof will be omitted.
  • step S555 the grounds extraction unit 617 executes grounds information extraction processing.
  • step S600 the parameter learning unit 700 estimates that the correct answer Y included in the learning data and the result determined by the determination unit 220 match, the start end D and the end E included in the learning data, and the machine reading unit 210.
  • the reading model and the judgment model are matched so that the generated starting end s d and the ending end s e match and the basis information of the answer in the sentence P included in the learning data and the basis information extracted by the basis extracting unit 617 match. And learn the parameters of the extraction model.
  • FIG. 7 is a flowchart showing a ground information extraction processing routine in the answer learning device according to the second embodiment.
  • the grounds extraction unit 617 Based on the information obtained by the processing of the machine reading unit 610, the grounds extraction unit 617 uses the grounds information extraction processing to extract the grounds information, which is the information that serves as the grounds for answering the questions, and then uses the extraction model Extract the basis information of the answer to Q.
  • step S510 the rationale extraction unit 617, an operation to extract one basis statement is defined as 1 time, the state z t at time t generated by the RNN extraction model.
  • step S520 evidence extraction unit 617, a glimpse vector e t a question message vector in consideration of the importance at time t, generated by performing the glimpse operation on question Q.
  • step S540 the grounds extraction unit 617 determines whether the termination condition is satisfied.
  • step S540 If the end condition is not satisfied (NO in step S540 above), the grounds extraction unit 617 adds 1 to t in step S550, and returns to step S510. On the other hand, when the termination condition is satisfied (YES in step S540 above), the grounds extraction unit 617 returns.
  • the extraction model for extracting the ground information that is the information that serves as the ground for the answer to the question sentence.
  • the basis information of the answer to the question sentence is extracted, and the parameters of the extraction model are learned so that the basis information of the answer in the sentence included in the learning data matches the basis information extracted by the basis extraction unit.
  • the multitask learning refers to learning about a plurality of models that solve a plurality of different tasks in a state where a part of the plurality of models is shared.
  • a model of each encoding unit (strictly speaking, a parameter of the model of each encoding unit) is shared, and an extraction model, a reading model, which uses the shared encoding result of each encoding unit as a common input, And the multitask learning of the extraction model, the reading model, the judgment model, and the coding model is performed so that the output of the judgment model approaches the information that is the correct answer.
  • FIG. 8 is a block diagram showing the configuration of the answer generation device 40 according to the second embodiment.
  • the same components as those of the answer learning device 30 described above are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the answer generation device 40 is configured by a computer including a CPU, a RAM, and a ROM that stores a program for executing an answer generation processing routine described later, and is functionally configured as follows. .. As illustrated in FIG. 8, the answer generation device 40 according to the second embodiment includes an input unit 400, an analysis unit 600, and an output unit 800.
  • the output unit 800 outputs, as an answer, the polarity of the answer judged by the judgment unit 220 and the ground information extracted by the ground extraction unit 617.
  • FIG. 9 is a flowchart showing an answer generation processing routine according to the second embodiment. It should be noted that the same processes as those in the answer generation processing routine according to the first embodiment and the answer learning processing routine according to the second embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted.
  • step S700 the output unit 800 outputs the grounds and answers for all the answers obtained in step S400, and the ground information obtained in step S555.
  • the configuration shown in FIG. 10 is used as the configuration of each part of the answer generation device.
  • the determination unit 220 is configured by using RNN and linear transformation, determines whether to answer with Yes/No/extract type answer, and determines the three values of Yes/No/extract type answer. Is output.
  • the grounds search unit 216 is configured by using two sets of RNN and linear transformation, one set outputs the end point of the response, and the other set outputs the start point of the response.
  • the grounds extraction part 617 is comprised using RNN and extraction model 617A.
  • the second context encoding unit 215 is configured by using RNN and self attention, and the attention unit 214 is configured by bidirectional attention.
  • the first context coding unit 213 is configured by using two RNNs, and the word coding unit 211 is configured by using two sets of word embedding and character embedding.
  • FIG. 11 is used as the configuration of the extraction model 617A.
  • This structure is based on the extraction-type sentence summary model proposed in Reference 7. [Reference 7] Y. C. Chen and M.D. Bansal, "Fast abstract summarization with reinforce-selected sentence rewriting", ACL, 2018, pp. 675-686.
  • the method of Reference 7 is a method of extracting the sentence in the summary source sentence while paying attention to the summary source sentence, but in the present embodiment, the sentence in the sentence P is extracted while paying attention to the question sentence Q.
  • the extraction model 617A intends that the extraction result includes the contents corresponding to the entire question by performing the glimpse operation on the question sentence Q.
  • the model in which the extraction model 617A is changed to a model in which the basis score of each sentence is obtained by the affine conversion and the sigmoid function is used.
  • the prediction accuracy of answer type T, answer A, and ground sentence S was evaluated.
  • the answer type T is composed of three labels of “Yes, No, and extraction” in the task setting of HotpotQA. Both the answer and the base sentence extraction were evaluated for perfect match (EM) and partial match. The index of partial coincidence is the harmonic mean (F1) of precision and recall.
  • the answer is evaluated by matching the answer type T, and is also evaluated by matching the answer A in the case of extraction. Partial matching of the basis sentence extraction was measured by matching the extracted sentence id with the true basis sentence id. Therefore, partial matching at the word level is not considered.
  • the answer accuracy when limited to the “Yes/No” question is described as YN.
  • the joint EM and the joint F1 are used as the indexes in consideration of both the accuracy of the response and the grounds.
  • the distractor setting is a setting that assumes that it is possible to narrow down a large amount of text to a small amount of text related to a question by existing technology.
  • the fullwiki setting is a setting in which a small amount of text is narrowed down by a TF-IDF similarity search.
  • the accuracy of the baseline model in the development data is significantly different from the numerical value in the test data because it was learned by our follow-up experiment. This is due to the difference in hyperparameters.
  • the EM of the base sentence extraction exceeds the baseline model by 24.5 points.
  • EM increased 1.0 points and F1 increased 1.4 points.
  • the judgment accuracy of "Yes/No" is improved by 5.6 points.
  • the base line model and the present embodiment all use the same model except the extraction model 617A.
  • Table 4 shows the experimental results for the fullwiki setting in the development data.
  • the EM based on the baseline model exceeds 6.5 points, but in F1, it is below the baseline model.
  • EM increased 0.9 points and F1 increased 0.8 points.
  • the judgment accuracy of "Yes/No" is improved by 3.0 points. Therefore, it can be interpreted that the extraction model 617A is still learning the lower layer RNN.
  • the accuracy of the Joint index is also improved.
  • the present example exceeded all the indexes as compared with the method not using the glimpse operation.
  • the extraction model for extracting the basis information that is the basis of the answer to the question sentence is extracted.
  • the question that can be answered with the polarity is further You can answer with accuracy and polarity.
  • the answer learning device performs multitask learning on each task of the grounds extraction unit, grounds search unit, and judgment unit, the grounds for the range are estimated and the judgment score is calculated by referring to the grounds information. Is realized.
  • teacher data that defines the correct answer sentence as the basis sentence was required.
  • the creation of this teacher data is a difficult and costly task because a human needs to work while considering "which sentence is needed for an answer".
  • the reason extraction unit calculates, for each span into which the sentence is divided, a reason score indicating how suitable the span is as a basis for extracting an answer.
  • the span which is the unit of ground information
  • the span is a paragraph, not a sentence.
  • a paragraph instead of a sentence as the unit of ground information, it becomes easy to create teacher data. This is because a paragraph has a larger granularity than a sentence and contains a lot of information. Therefore, in many teacher data, one paragraph including an answer may be used as a base paragraph as it is. Therefore, no additional work is required by humans.
  • paragraphs may be different from commonly used paragraphs, and it is possible to regard the whole bulleted item as a paragraph, for example, and to consider each item as a separate paragraph.
  • a "paragraph" will be described below as an example, but as in the above embodiment, it is also possible to perform the following process on a sentence basis.
  • a sentence divided into predetermined units is called a "span", and sentences and paragraphs are included in this.
  • the answer type is either “YES”, “NO”, or “extraction type” in which the answer is extracted from the sentence.
  • the basis range is a word string in the range showing the basis in the sentence, and when the answer type is the extraction type, the character string included in this range is also used as an answer, and thus is also referred to as an answer range.
  • the ground information is a set of spans serving as grounds. That is, the basis range (response range) is the basis at the word level, and the basis information can be said to be the basis at the span (sentence or paragraph) level.
  • the present embodiment differs from the second embodiment in that the answer generation device calculates and visualizes the evidence score.
  • the paragraphs that form the sentence are regarded as one sentence and are input to the encoding unit for each paragraph, and the encoding unit causes the word encoding unit 211, the first context encoding unit 213, the attention unit 214, and the second unit.
  • a pre-learned language model such as BERT (Bidirectional Encoder Representations from Transforms) described in Reference 9 is used as a model corresponding to the context encoding unit 215.
  • the answer learning device is different from the second embodiment in that a paragraph is used as a unit of basis information, and what is set in a paragraph unit is used as basis information of correct answer of learning data.
  • FIG. 12 is a block diagram showing the configuration of the answer learning device 50 according to the third embodiment.
  • the same components as those of the answer learning device 30 according to the second embodiment described above are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the answer learning device 50 is composed of a computer including a CPU, a RAM, and a ROM storing a program for executing a processing routine similar to the answer learning processing routine shown in FIG. It is configured as shown below. As shown in FIG. 12, the answer learning device 50 according to this embodiment includes an input unit 100, an analysis unit 900, and a parameter learning unit 700.
  • the analysis unit 900 includes an encoding unit 910, a grounds extraction unit 617, a grounds search unit 216, and a judgment unit 220.
  • the encoding unit 910 includes a word encoding unit 211, a word database (DB) 212, a first context encoding unit 213, an attention unit 214, and a second context encoding unit 215.
  • DB word database
  • the BERT model which is a pre-learned language model used in the encoding unit 910, has a limit on the length of the text that can be input, the sentence is divided and input for each paragraph.
  • the input of the BERT model is one text generated by connecting the question sentence and the text of one paragraph.
  • the output of the BERT model is one fixed length vector and one vector series.
  • the fixed-length vector is a d 4 dimensional vector representing the meaning of the question and the entire paragraph.
  • the length (the number of tokens) of the vector series is the same as the number of tokens of the input “one text generated by connecting the question text and the text of one paragraph”.
  • One vector in the vector series is d 4 dimensional which represents the meaning of 1 token, and the size of the vector series is d 4 dimensional ⁇ the number of tokens.
  • the token unit is a word, but a partial word unit or the like may be used.
  • the encoding unit 910 inputs the one text generated by concatenating the question sentence and the text of one paragraph into the BERT model to obtain one fixed-length vector and one vector series, and performs processing for each paragraph ( The number of paragraphs is n).
  • the encoding unit 910 obtains fixed length vectors V 1 ,..., V n, which are n four- dimensional vectors, and n vector series U 1 ,..., U n .
  • V i is a fixed-length vector representing the i-th paragraph that is the result of context encoding
  • U i is a vector sequence representing the meaning of the question sentence and each word of the i-th paragraph.
  • the number of paragraphs n is a variable different from “n” in the above formula (12).
  • the fixed-length vectors V 1 ,..., V n that are n four- dimensional vectors and the n vector series U 1 ,..., U n are an example of a vector expression series that represents the meaning of the question sentence and the span.
  • the fixed-length vector expresses the meaning of a word or a sentence as a vector, and is also referred to as "vector expression”.
  • a vector series is an array of vector expressions, such as when expressing the meaning of a sentence, and is also referred to as a “vector expression series”.
  • the “vector expression series” corresponding to the input sentence is a “vector expression”, and thus the “vector expression series” is a concept including “vector series”.
  • the encoding unit 910 also creates a vector series U i ′ representing the meaning of each word of the question sentence by the following two processes.
  • the extracted vector series has the same number of words as the question sentence and the length, and each vector included in the vector series represents one word of the question sentence.
  • the vector series extracted for each of the n vector series U i is averaged or summed to obtain one vector series, which is defined as the vector series U i ′.
  • the grounds extraction unit 617 uses the extraction model that extracts the grounds information that is the grounds for the answers to the question texts, and the grounds information of the answers to the question texts Q. To extract.
  • the grounds extraction unit 617 first inputs n fixed-length vectors V i obtained by the processing of the encoding unit 910, and uses a neural network to represent the meaning of each paragraph of the sentence P. A series H of is extracted.
  • the basis extraction unit 617 can use Undirectional-RNN as a neural network, for example.
  • the basis extraction unit 617 may generate a series H of vectors by arranging n fixed length vectors V i without using a neural network.
  • grounds extractor 617 defines the operation one time to extract one rationale paragraph, generated by the RNN extraction model state z t. That is, the basis extraction unit 617 determines that the elements of the series H of vectors corresponding to the basis paragraph extracted at time t-1. To generate the state z t by inputting R to the extracted model RNN. However, s t-1 is the subscript of the basis paragraph extracted at time t-1. Moreover, the set of extracted paragraphs s t a to time t and S t.
  • Rationale extraction unit 617 a state z t, based on the vector sequences U i 'representing the meaning of each word in question, by extraction model, a question sentence vectors in consideration of importance at time t glimpse vector e t (Equation (13) above is generated by performing a glimpse operation on the question sentence Q (Reference Document 5 above).
  • vector y j in the formula (13) is calculated by substituting the j-th vector of the vector sequences U i '.
  • v g , W g1 , and W g2 in the above formulas (11) to (13) and v p , W p1 , W p2 , and W p3 in the above formula (14) are parameters of the extraction model. Yes, and is updated by the parameter learning unit 700.
  • h j in the above equation (14) is the j-th vector of the series H of vectors.
  • the extraction result of the basis paragraph can include the contents corresponding to the entire question.
  • the initial value of the RNN of the extraction model is a vector obtained by maxpooling a vector sequence obtained by affine-transforming the vector sequence H.
  • the grounds extraction unit 617 selects the ⁇ th paragraph according to the probability distribution represented by the above equation (14) at time t by the extraction model.
  • the value u j t in the above equation (14) is a value different from the vector series U i ′.
  • the rationale extraction unit 617 passes the grounds search unit 216 and the parameter learning unit 700.
  • the ground search unit 216 Based on the vector sequence U i corresponding to the correct basis information (paragraph) in the learning data among the n vector sequences U i output from the encoding unit 910, the ground search unit 216 responds in the sentence P.
  • the reading model for estimating the range D:E which is the basis of the above, the starting end s d and the ending end s e of the range are estimated.
  • the ground search unit 216 uses two methods, a deep learning model for the start end for estimating the start end s d of the range serving as the basis for the answer and a deep learning model for the end for estimating the end s e . It is composed of a neural network.
  • This deep learning model includes, for example, a linear conversion layer or a multilayer linear conversion layer.
  • the rationale search unit 216 first inputs the vector series U i corresponding to the rationale information (paragraph) that is the correct answer into the deep learning model for the start point, and scores about the start point of the answer range that is the basis of the answer. Is calculated for each word in the ground information (paragraph) that is the correct answer.
  • the ground search unit 216 inputs the vector series U i corresponding to the ground information (paragraph) that is the correct answer into the deep learning model for the terminal, and the score related to the terminal of the answer range that is the range that is the basis of the answer Is calculated for each word in the ground information (paragraph) that is the correct answer.
  • the score related to the start and the score calculated for each word in the basis information (paragraph) that is the correct answer are collectively called the answer range score.
  • the parameters of the deep learning model for the start end and the deep learning model for the end end are updated by the parameter learning unit 700.
  • the grounds search unit 216 passes the calculated answer range score to the parameter learning unit 700.
  • the internal processing of the grounds searching unit 216 and the configuration of the neural network may be the same as those of the grounds searching unit 216 of the second embodiment.
  • the determination unit 220 determines the polarity of the answer to the question sentence Q by using a determination model that determines whether the polarity of the answer to the question sentence Q is positive based on the information obtained by the processing of the encoding unit 910. ..
  • the determination unit 220 includes an input conversion unit 221 and a score calculation unit 222.
  • the input conversion unit 221 extracts the fixed length vector V i corresponding to the ground information (paragraph) of the correct answer of the learning data from the n fixed length vectors V i output by the encoding unit 910, and extracts the fixed length vector V i extracted. the vector V i, and passes to the score calculation unit 222.
  • the score calculation unit 222 determines the polarity of the response to the question sentence Q using a determination model that determines whether the polarity of the response to the question sentence Q is positive.
  • the score calculation unit 222 uses a judgment model which is a deep learning model including a linear conversion layer or a multilayer linear conversion layer based on the fixed-length vector V i corresponding to the basis information (paragraph) of the correct answer. Then, a judgment score representing the judgment result of whether the answer is Yes, No, or the extraction type answer is calculated.
  • the judgment score calculated here is a three-dimensional vector.
  • the internal processing of the judgment unit 220 and the configuration of the neural network may be the same as those of the judgment unit 220 of the first embodiment.
  • the configuration may be such that the classification is classified into Yes, No, or extraction type, and the same processing as the determination unit 220 of the first embodiment may be performed.
  • the score calculation unit 222 passes the judgment score to the parameter learning unit 700.
  • the correct answer Y ⁇ included in the learning data matches the result determined by the determining unit 220, and the start end D ⁇ and the end E ⁇ included in the learning data and the ground search unit 216 estimate the result.
  • the starting end s d and the ending end s e match, and the basis information of the correct answer in the sentence P included in the learning data matches the basis information extracted by the basis extracting unit 617, so that the reading model, the judgment model, and the Learn the parameters of the extraction model.
  • a sentence P a question Q, an answer Y ⁇ that is a correct answer that is one of YES, NO, and an extraction type, a start end D ⁇ and an end E ⁇ that are the range of grounds that are the correct answer of the answer Y.
  • the set of rationale paragraphs S t ⁇ which is the rationale information that is the correct answer to the answer Y is one set, and the learning data is assumed to include a plurality of sets.
  • the correct answer Y ⁇ is information indicating whether the answer type is YES, NO, or extraction type.
  • the correct answer basis information is a set of paragraphs as a span that is a basis for determining the answer type or extracting the range of the reason, and is a subset of all paragraphs included in the sentence P.
  • the basis information is a set of paragraphs that are the basis of the determination of YES or NO.
  • the basis information is a set of paragraphs including the true answer range.
  • FIG. 13 is a block diagram showing the configuration of the answer generation device 60 according to the third embodiment of the present disclosure.
  • the same components as those in the answer learning device 50 according to the third embodiment described above are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the answer generation device 60 is composed of a computer including a CPU, a RAM, and a ROM that stores a program for executing a processing routine similar to the answer generation processing routine shown in FIG. It is configured as shown below. As shown in FIG. 13, the answer generation device 60 according to the present embodiment includes an input unit 400, an analysis unit 900, and an output unit 800.
  • the analysis unit 900 includes an encoding unit 910, a grounds extraction unit 617, a grounds search unit 216, and a judgment unit 220.
  • the grounds extraction unit 617 uses the extraction model that extracts the grounds information that is the grounds for the answers to the question texts, and the grounds information of the answers to the question texts Q. And the basis score is calculated for each paragraph that is the span of the sentence P.
  • the basis extraction unit 617 uses the extraction model based on the state z t , the glimpse vector e t, and the series H of the vectors to calculate each paragraph of the sentence P. For, regarding, the basis score indicating the degree to which the relevant paragraph is suitable as the basis for extracting the answer is calculated.
  • the value P( ⁇ ; S (t-1) ) is calculated for the paragraph ⁇ according to the above equation (14), and this value is set as the score A t ( ⁇ ). Then, the grounds score paragraph [delta], defined by max t A t ( ⁇ ) or sum t A t ( ⁇ ).
  • the basis score can be calculated by the same process even when the span is a sentence rather than a paragraph.
  • the rationale score represents a score indicating the degree to which the sentence is suitable as the rationale for extracting the answer.
  • the rationale extraction unit 617 passes the extracted rationale information and the rationale score for each paragraph to the output unit 800, and also passes the extracted rationale information to the rationale search unit 216 and the input conversion unit 221.
  • the ground search unit 216 determines the answer in the sentence P. Using the reading model for estimating the base range D:E, the start end s d and the end end s e of the range are estimated.
  • the input conversion unit 221 extracts the fixed length vector V i corresponding to the paragraph extracted as the ground information by the ground extraction unit 617 from the n fixed length vectors V i output by the encoding unit 910, and the extracted fixed length vector V i is extracted.
  • the long vector V i is passed to the score calculation unit 222.
  • the score calculation unit 222 determines the polarity of the response to the question sentence Q using a determination model that determines whether the polarity of the response to the question sentence Q is positive.
  • the score calculation unit 222 is a deep learning model including a linear conversion layer or a multilayer linear conversion layer based on the fixed length vector V i corresponding to the paragraph extracted as the ground information by the ground extraction unit 617.
  • the judgment model is used to calculate a judgment score indicating the judgment result of whether the answer is Yes, No, or the extraction type answer.
  • the output unit 800 includes a set St of paragraphs extracted by the basis extraction unit 617, a basis score of each paragraph, and a determination score output by the determination unit 220 indicating Yes/No/extraction type three determination results.
  • the answer start score and the answer end score of each word obtained by the ground search unit 216 are input.
  • the score can be input to the output unit 800 as a search score.
  • the score output by the search method may be used as the search score when the paragraph is narrowed down by a general search from the entire Wikipedia (R).
  • the output unit 800 responds to an arbitrary word string of the paragraph extracted as the ground information by the ground extraction unit 617 with the product or the sum of the answer start score of the beginning of the word string and the answer end score of the end of the section. Calculate word string score.
  • the answer word string score is a score indicating that the word string is the answer or the basis of the answer.
  • the answer word string score is given to an arbitrary word string in the sentence, that is, all the candidates that can be considered as the extracting type answer. Given.
  • the number of words in the basis paragraph extracted by the basis extraction unit 617 is L
  • the number of candidates is two or more overlapping combinations L C 2 in which 2 pieces are selected from L pieces.
  • the output unit 800 calculates the reading comprehension score for all combinations of the basis paragraph extracted by the basis extraction unit 617, the answer classification judgment result, and the answer word string according to the following formula.
  • Reading score (search score x search score weight) + (foundation score x basis score weight) + (answer word string score x answer word string score weight) + (judgment score x judgment score weight)
  • each score weight is a numerical value that can be determined by the user, for example, all 1's.
  • the search score term is used only when the search score is given.
  • the output unit 800 outputs the combination of the reading comprehension score, the basis paragraph, the judgment result, and the answer word string in descending order of reading comprehension score.
  • the number to be output is determined by the number specified in advance or the threshold of the reading comprehension score.
  • the grounds search unit and the judgment unit perform processing based on the grounds information extracted by the grounds extraction unit. Based processing becomes possible, and it is possible to answer accurately. Further, the basis score can be calculated and visualized for each paragraph, and the answer can be output in a form that the user can easily interpret.
  • the basis paragraph is extracted as the basis information, it is easy to create teacher data to be input to the response learning device, and it is possible to learn a model that can accurately estimate the polarity of the response.
  • the series of vectors P 3 and Q 3 are generated based on the result of coding the sentence P by the machine reading unit 210 and the result of coding the question sentence Q by the machine reading unit 210.
  • the polarity of the response to the question sentence Q may be determined using a determination model that determines whether or not the polarity of the response to Q is positive.
  • the second context coding unit 215 passes the converted reading comprehension matrix M, and the ground search unit 216 passes the estimated answer range score to the input conversion unit 221.
  • the input conversion unit 221 can use the following formula (17) or formula (18) as a method of calculating the vector series P 3 .
  • the input conversion unit 221 can use the following Expression (19) as a method of calculating the vector series Q 3 .
  • the same operation may be performed on the attention matrix A T and the vector series P, and the obtained vector series may be used as the vector series Q 3 , or the obtained vector series may be combined with the vector series Q 2. Good.
  • the score calculation unit 222 can use a modified version of the existing framework of the sentence pair classification task.
  • it is a method of using the final state of the output of the LSTM when the vector series Q 3 is input to the LSTM, or an active pooling (an operation of taking a weighted average in the column direction, and the vector series P is used as the weight). 3 is used, or the estimated start end s d , end s e, etc. are used).
  • the vector series P 3 to be classified in the above embodiment tends to include not only the information of the sentence P but also the information of the question sentence Q. Therefore, the score calculation unit 222 may obtain the vector J using only the vector series P 3 without using the vector series Q 3 .
  • the information accepted by the input conversion unit 221 can be only (1) the reading matrix B. Further, the above equation (6) is used to convert the vector into the series P 3 . At this time, the definition of J is Is.
  • the answer learning device 10 may be configured to further include a question determination unit that determines whether or not the input question sentence Q is a “question that can be answered with Yes or No”.
  • the determination unit 220 does not output (Yes/No), that is, the machine reading unit. It can be configured to output only from 210.
  • the question determination unit if the output of the determination unit 220 is a binary Yes/No value, and if it is inappropriate to answer Yes or No, the answer may be Yes or No. Can be prevented. In addition, it is possible to exclude a question that is inappropriate to answer Yes or No from the learning data, and perform more appropriate learning.
  • the meaning of “unknown” becomes clearer. If the question determination unit is not provided, the meaning of “unknown” is “it is an inappropriate question to answer with Yes or No”, or “(because there is no description in the sentence P that is the basis of the answer, etc.). 2) “I don't know” are mixed, but the meaning of “unknown” can be narrowed down to the latter if the question judgment unit makes a judgment.
  • the question determination unit can also be provided in the answer generation device 20. Since the answer generation device 20 includes the question determination unit, when the output of the determination unit 220 is a binary value Yes/No, and when it is inappropriate to answer Yes or No, the answer generation device 20 answers Yes or No. You can prevent it.
  • the present embodiment has been described by taking the case of using the judgment model for judging whether the answer is Yes/No, the present invention is not limited to this, and the judgment model shows that the answer is Yes. /No/extract type answer, and when the answer is an extract type answer, the output unit outputs the reason sentence or the basis search output by the reason extracting unit 617 as the extract type answer. You may output the range of the grounds of the answer output by the part 216.
  • the polarity of the answer is Yes or No has been described as an example, but the polarity of the answer is not limited to this, and the polarity of the answer may be OK or NG, for example.
  • the grounds extraction unit 617 may not pass the grounds information to the grounds search unit 216.
  • the rationale search unit 216 estimates the beginning and end of the range that is the basis of the reply in the sentence P, without using the rationale information.
  • the grounds search unit 216 may use the n vector sequences U i output from the encoding unit 910 as they are to estimate the start and end of the range in the sentence P on which the answer is based. Good.
  • the reason information may not be passed from the reason extraction unit 617 to the input conversion unit 221 of the determination unit 220.
  • the input conversion unit 221 passes the n fixed-length vectors V i output by the encoding unit 910 to the score calculation unit 222 as they are.
  • the score calculation unit 222 may calculate the determination score based on the n fixed length vectors V i .
  • the program can be stored in a computer-readable recording medium and provided.
  • the processor is A pre-learned coding model for converting an input sentence into a vector expression sequence representing the meaning of the input sentence, based on the input sentence and the question sentence divided into a plurality of spans that are sentence division units. Using, to convert into a vector representation series representing the meaning of the span and the question sentence, Based on the vector expression series, using a pre-learned extraction model that extracts a span suitable for the basis for extracting the answer, the ground information that is the span suitable for the basis for extracting the answer is estimated.
  • the answer type for the question sentence is determined by using a pre-learned decision model that determines the answer type that is the correct answer to the question sentence in the sentence. , Answer generator.
  • the processor is A pre-learned coding model for converting an input sentence into a vector expression sequence representing the meaning of the input sentence, based on the input sentence and the question sentence divided into a plurality of spans that are sentence division units. Using, to convert into a vector expression series representing the meaning of the span and the question sentence, Estimate the rationale score for each of the spans using a pre-learned extraction model to calculate a rationale score that indicates the degree to which the span is suitable for extracting the answer based on the vector representation series.
  • the encoding model and the extraction model are Based on the vector expression series converted using the encoding model, a search model for extracting a ground range that is a range that is the basis of the answer in the text, and based on the vector expression series, in the text
  • An answer generation device which has been learned in advance by multitask learning of a plurality of models further including a judgment model for judging an answer type which is a correct answer to the question sentence.
  • the processor is A sentence divided into a plurality of spans, which is a unit of sentence division, a question sentence, an answer type that is a correct answer to the question sentence in the sentence, and a basis range that is a range that is the basis of the answer in the sentence. And accepting input of learning data including ground information that is a span serving as a ground for the response in the sentence, The meaning of the span and the question sentence is expressed by using an encoding model for converting the sentence divided into a plurality of spans and the question sentence into a vector expression series representing the meaning of the input sentence.
  • Convert to vector representation series Based on the vector expression series, using an extraction model for extracting the basis information, estimating the basis information, Based on the vector expression series and the basis information of the learning data, using a search model for extracting the basis range, to estimate the basis range, Based on the vector expression series and the basis information of the learning data, using a judgment model for judging the answer type to the question sentence, to determine the answer type to the question sentence,
  • the extracted basis information matches the basis information of the learning data
  • the estimated basis range matches the basis range of the learning data
  • the determined answer type of the learning data The parameters of the coding model, the extraction model, the search model, and the judgment model are learned so as to match the answer type. Answer learning device.
  • a non-transitory storage medium storing a program executable by a computer to execute an answer generation process
  • the answer generation process is A pre-learned coding model for converting an input sentence into a vector expression sequence representing the meaning of the input sentence, based on the input sentence and the question sentence divided into a plurality of spans that are sentence division units.
  • Using, to convert into a vector expression series representing the meaning of the span and the question sentence Based on the vector expression series, using a pre-learned extraction model that extracts a span suitable for the basis for extracting the answer, the ground information that is the span suitable for the basis for extracting the answer is estimated.
  • the answer type for the question sentence is determined by using a pre-learned decision model that determines the answer type that is the correct answer to the question sentence in the sentence.
  • the answer generation process is A pre-learned coding model for converting an input sentence into a vector expression sequence representing the meaning of the input sentence, based on the input sentence and the question sentence divided into a plurality of spans that are sentence division units.
  • Estimate the rationale score for each of the spans using a pre-learned extraction model to calculate a rationale score that indicates the degree to which the span is suitable for extracting the answer based on the vector representation series.
  • the encoding model and the extraction model are Based on the vector expression series converted using the encoding model, a search model for extracting a ground range that is a range that is the basis of the answer in the text, and based on the vector expression series, in the text It is learned in advance by multitask learning of a plurality of models further including a judgment model for judging an answer type which is a correct answer to the question sentence, Non-transitory storage medium.
  • a non-transitory storage medium storing a computer-executable program for executing an answer learning process
  • the answer learning process is A sentence divided into a plurality of spans that are division units of a sentence, a question sentence, an answer type that is a correct answer to the question sentence in the sentence, and a basis range that is a range that is the basis of the answer in the sentence
  • accepting input of learning data including ground information that is a span serving as a ground for the response in the sentence,
  • the meaning of the span and the question sentence is expressed by using an encoding model for converting the sentence divided into a plurality of spans and the question sentence into a vector expression series representing the meaning of the input sentence.

Abstract

符号化部が、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する。根拠抽出部が、前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する。

Description

回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム
 本開示は、回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラムに係り、特に、質問文に対して極性で回答するための回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラムに関する。
 近年、機械が文章を読み解いて質問に答える機械読解技術(例えば、BiDAF(非特許文献1))が注目を集めている。機械読解の代表的なデータセットにはSQuAD(非特許文献2)が存在し、大規模な深層学習技術の適用が可能となっている。
 SQuADは1つの質問に対して1段落の文章が紐づき、文章に書いてある回答をそのまま抽出して回答とする抽出型のタスクのためのデータセットである。
Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, Hananneh Hajishirzi, "BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION", Published as a conference paper at ICLR, 2017. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, Percy Liang, "SQuAD: 100,000+ Questions for Machine Comprehension of Text", Computer Science Department Stanford University, 2016.
 しかし、抽出型タスクのための手法では、テキストに書いていない形式で答えを出力することができない、という問題があった。具体的には、Yes又はNo等の極性で回答することができる質問に対して、その極性(Yes又はNo)で回答する、ということができない。このようなテキストに書いていない形式で答えを出力するためには、機械が文章の中から質問に関連する部分に注目するだけでなく、関連部分から質問に対する回答を判断する必要がある。
 本開示は上記の点に鑑みてなされたものであり、極性で回答することができる質問に対して、精度よく、極性で回答することができる回答生成装置、回答生成方法、及び回答生成プログラムを提供することを目的とする。
 また、本開示は上記の点に鑑みてなされたものであり、極性で回答することができる質問に対して、精度よく、極性で回答するためのモデルを学習することができる回答学習装置を提供することを目的とする。
 本開示の第1態様は、回答生成装置であって、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、前記ベクトル表現系列に基づいて、前記回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定する根拠抽出部と、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定する根拠探索部と、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する判断部と、を備えて構成される。
 本開示の第2態様は、回答生成装置であって、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する根拠抽出部と、を備え、前記符号化モデル及び前記抽出モデルは、前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデルを更に含む複数のモデルのマルチタスク学習により予め学習されたものである。
 本開示の第3態様は、回答生成学習装置であって、文章の分割単位である複数のスパンに分割された文章と、質問文と、前記文章における前記質問文に対する回答の正解である回答種別と、前記文章における前記回答の根拠となる範囲である根拠範囲と、前記文章における前記回答の根拠となるスパンである根拠情報とを含む学習データの入力を受け付ける入力部と、複数のスパンに分割した前記文章と、前記質問文とを、入力文を入力文の意味を表すベクトル表現系列に変換するための符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、前記ベクトル表現系列に基づいて、前記根拠情報を抽出する抽出モデルを用いて、前記根拠情報を推定する根拠抽出部と、前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記根拠範囲を抽出する探索モデルを用いて、前記根拠範囲を推定する根拠探索部と、前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記質問文に対する回答種別を判断する判断モデルを用いて、前記質問文に対する回答種別を判断する判断部と、前記根拠抽出部により抽出された前記根拠情報が前記学習データの前記根拠情報と一致し、前記根拠探索部により推定された前記根拠範囲が前記学習データの前記根拠範囲と一致し、前記判断部により判断された前記回答種別が前記学習データの前記回答種別と一致するように、前記符号化モデル、前記抽出モデル、前記探索モデル、及び前記判断モデルのパラメータを学習するパラメータ学習部と、を備えて構成される。
 本開示の第4態様は、回答生成方法であって、符号化部が、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、根拠抽出部が、前記ベクトル表現系列に基づいて、前記回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、根拠探索部が、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、判断部が、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する。
 本開示の第5態様は、回答生成方法であって、符号化部が、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、根拠抽出部が、前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する回答生成方法であって、前記符号化モデル及び前記抽出モデルは、前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデルを更に含む複数のモデルのマルチタスク学習により予め学習されたものである。
 本開示の第6態様は、回答生成プログラムであって、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、前記ベクトル表現系列に基づいて、前記回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する処理をコンピュータに実行させるための回答生成プログラムである。
 本開示の第7態様は、回答生成プログラムであって、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する
 処理をコンピュータに実行させるための回答生成プログラムであって、前記符号化モデル及び前記抽出モデルは、前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデルを更に含む複数のモデルのマルチタスク学習により予め学習されたものである。
 本開示の回答生成装置、回答生成方法、及びプログラムによれば、極性で回答することができる質問に対して、精度よく、極性で回答することができる。
 また、本開示の回答学習装置によれば、極性で回答することができる質問に対して、精度よく、極性で回答するためのモデルを学習することができる。
第1の実施形態の形態に係る回答学習装置の構成を示す機能ブロック図である。 第1の実施形態に係る回答学習装置の回答学習処理ルーチンを示すフローチャートである。 第1の実施形態に係る回答生成装置の構成を示す機能ブロック図である。 第1の実施形態に係る回答生成装置の回答生成処理ルーチンを示すフローチャートである。 第2の実施形態に係る回答学習装置の構成を示す機能ブロック図である。 第2の実施形態に係る回答学習装置の回答学習処理ルーチンを示すフローチャートである。 第2の実施形態に係る回答学習装置の根拠情報抽出処理ルーチンを示すフローチャートである。 第2の実施形態に係る回答生成装置の構成を示す機能ブロック図である。 第2の実施形態に係る回答生成装置の回答生成処理ルーチンを示すフローチャートである。 第2の実施形態に係る回答生成装置のベースラインモデルの例を示す図である。 第2の実施形態に係る根拠抽出部の抽出モデルの構成例を示す図である。 第3の実施形態に係る回答学習装置の構成を示す機能ブロック図である。 第3の実施形態に係る回答生成装置の構成を示す機能ブロック図である。
 以下、本開示の実施形態について図面を用いて説明する。
<第1の実施形態に係る回答学習装置の概要>
 第1の実施形態は、入力された質問に対し、テキストに書いていない形式で答えを出力する新しいタスク設定として、「Yes又はNo等の極性で回答することができる質問に対してYes又はNo等の極性で回答する」タスクを提案する。本実施形態では、回答の極性がYes又はNoである場合を例に説明する。このYes又はNoで回答するタスクは、既存研究の存在しない全く新しいタスクである。
 機械読解の代表的なデータセットには、SQuAD(非特許文献2)の他にMS-MARCO(参考文献1)が存在する。MS-MARCOは1つの質問に10近くの段落が紐づき、その段落群から人間が答えを生成したデータセットである。このような、質問に対して、文章に書かれていない形式で回答を出力するタスクを生成型タスクという。
[参考文献1]Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, Li Deng, ”MS MARCO: A Human Generated MAchine Reading COmprehension Dataset”, 2016.
 抽出型・生成型の2種類のタスクが存在する一方で、既存の機械読解技術の多くは抽出型のタスクを設定した技術が多い。
 生成型のタスクは、「テキストに書いていない形式で答えを出力する」という特性から、抽出型のタスクに比べて難しい課題となっている。
 生成型のタスクは、人間がゼロから生成した答えを正解とするデータセットを用いるので、機械も答えをゼロから作り出す必要がある。生成型のタスクの手法には、S-Net(参考文献2)が存在する。
[参考文献2]Chuanqi Tan, Furu Weiz, Nan Yang, Bowen Du, Weifeng Lv, Ming Zhouz, ”S-NET: FROM ANSWER EXTRACTION TO ANSWER GENERATION FOR MACHINE READING COMPREHENSION”, 2017.
 一般的な質問応答において、Yes又はNoで回答すべき状況は多く現れる。しかし、参考文献2のような生成型の手法をこのような状況で適用した場合、回答としてYes又はNoを生成する可能性を含むものの、その可能性は極めて低く、正しく応答をすることができない。
 本実施形態では、「Yes又はNoで回答することができる質問に対してYes又はNoで回答する」タスクに特化した手法を提案するため、Yes又はNoで回答すべき状況で正しく応答することが可能である。そのため、機械によって質問応答可能な範囲を大きく広げることができる。
 本実施形態に係る回答学習装置は、単語系列である文章Pと質問文Qをベクトル系列に変換し、機械読解部が読解技術を用いて回答範囲スコア(s:s)に変換し、ベクトル系列と回答範囲のスコアから新しい技術である判断部を用いて判断スコアに変換し、回答範囲スコアと判断スコアを用いて学習する。
 すなわち、Yes、Noの単なる2値判定(文章P全体を特徴量として、何も考えず機械学習で判定)を行うのではなく、機械読解技術によって、質問文Qに対する回答が書かれている場所を同定し、それを根拠としてYesかNoかの判定を行う。
 この際、機械読解部と判定部とのニューラルネットワークは層を共有しているので、Yes/No判定に合わせた機械読解、読解に基づくYes/No判定の両側面から学習することが可能となる。
<第1の実施形態に係る回答学習装置の構成>
 図1を参照して、第1の実施形態に係る回答学習装置10の構成について説明する。図1は、第1の実施形態に係る回答学習装置10の構成を示すブロック図である。
 回答学習装置10は、CPUと、RAMと、後述する回答学習処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図1に示すように、本実施形態に係る回答学習装置10は、入力部100と、解析部200と、パラメータ学習部300とを備えて構成される。
 入力部100は、文章Pと、質問文Qと、文章Pにおける当該質問文に対する回答の極性を示す正解Yと、文章Pにおける回答の根拠となる範囲の始端D及び終端Eとを含む複数の学習データの入力を受け付ける。
 具体的には、学習データは、テキストデータからなる文章P及び質問文Qと、回答がYes/Noのいずれかであるかを示す正解Yと、文章Pにおける回答の根拠となる範囲(D:E)で構成される。ここで、D、Eは文章P中の単語の位置番号で表現され、Dは回答の根拠となる範囲の開始位置の単語の位置番号、Eは回答の根拠となる範囲の終了位置の単語の位置番号である。
 テキストデータである文章P及び質問文Qは、既存のトークナイザによってトークン系列として表現されている。なお、トークンとして任意の単位を用いることができるが、本実施形態では、トークンを単語と表記する。
 単語系列で表現されている文章P及び質問文Qの長さを単語の数で定義し、文章Pの単語の数をL、質問文Qの単語の数をLとする。
 なお、複数の学習データをミニバッチとしてミニバッチ毎にまとめて処理してもよいし、学習データ毎に処理されてもよい。
 そして、入力部100は、受け付けた学習データのうち、文章Pと質問文Qとを、機械読解部210に、学習データをパラメータ学習部300に渡す。
 解析部200は、機械読解部210と、判断部220とを備えて構成される。
 機械読解部210は、文章P及び質問文Qに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 具体的には、機械読解部210は、単語符号化部211と、単語データベース(DB)212と、第1文脈符号化部213と、アテンション部214と、第2文脈符号化部215と、根拠探索部216とを備えて構成される。
 単語符号化部211は、文章P及び質問文Qに基づいて、単語ベクトルの系列P及びQを生成する。
 具体的には、単語符号化部211は、単語DB212から文章P及び質問文Qの各単語に対応するベクトルを抽出し、単語ベクトルの系列P及びQを生成する。
 単語DB212に格納されるベクトルの次元をdとすると、単語ベクトルの系列PはL×d、単語ベクトルの系列QはL×dの大きさの行列である。
 そして、単語符号化部211は、生成した単語ベクトルの系列P及びQを、第1文脈符号化部213に渡す。
 単語DB212は、複数の単語ベクトルが格納されている。単語ベクトルは、単語を表す所定次元の実数値ベクトルの集合である。
 具体的には、単語DB212は、予めニューラルネットワークにより学習された複数の単語ベクトル(word embedding)を用いる。これには例えばword2vecやGloVeのような、既存のものを用いてもよい。単語ベクトルには、既存の複数の単語ベクトルから抽出される単語ベクトルに、新しく学習した単語ベクトルを繋げることができる。なお、単語の文字情報を符号化する技術(参考文献3)等、任意の単語embedding技術が使用可能である。単語ベクトルは、誤差逆伝播法によって計算できる勾配から学習することも可能である。
[参考文献3]Yoon Kim, Yacine Jernite, David Sontag, Alexander M. Rush, ”Character-Aware Neural Language Models”, arXiv:1508.06615, 2016.
 第1文脈符号化部213は、単語符号化部211により生成された単語ベクトルの系列P及びQを、ニューラルネットワークを用いてベクトルの系列P及びQにそれぞれ変換する。
 具体的には、第1文脈符号化部213は、単語ベクトルの系列P及びQを、RNNによってベクトルの系列P及びQにする。RNNの構造には、LSTM等の既存技術を用いることができる。
 本実施形態では、第1文脈符号化部213は、ベクトルの系列を順方向に処理するRNNと、逆方向に処理するRNNとの2種類のRNNを組み合わせた双方向RNNを用いる。双方向RNNの出力するベクトルの次元をdとすると、第1文脈符号化部213が変換するベクトルの系列PはL×d、ベクトルの系列QはL×dの大きさの行列となる。
 そして、第1文脈符号化部213は、変換したベクトルの系列P及びQを、アテンション部214に、ベクトルの系列Qを、入力変換部221にそれぞれ渡す。
 アテンション部214は、ニューラルネットワークを用いて、ベクトルの系列P及びQに基づいて、文章P及び質問文Qのアテンションを表すベクトルの系列である読解行列Bを生成する。
 具体的には、アテンション部214は、まず、ベクトルの系列P及びQから、アテンション行列
Figure JPOXMLDOC01-appb-I000001

を計算する。アテンション行列Aは、例えば、下記式(1)を用いることができる。
Figure JPOXMLDOC01-appb-M000002
 上記式(1)において、行列の添え字で成分を表し、”:”は全体を表す。例えば、Ai:は、アテンション行列Aの第i行全体を表す。また、上記式(1)において、”○”は要素積であり、”,”はベクトル・行列を縦方向に結合する演算子である。wは、モデルの学習可能なパラメータであり、
Figure JPOXMLDOC01-appb-I000003

である。
 アテンション部214は、アテンション行列Aを基に、文章Pから質問文Q方向へのアテンションベクトル
Figure JPOXMLDOC01-appb-I000004

、質問文Qから文章P方向へのアテンションベクトル
Figure JPOXMLDOC01-appb-I000005

を計算する。
 ここで、アテンションベクトル
Figure JPOXMLDOC01-appb-I000006

は、下記式(2)で表すことができる。
Figure JPOXMLDOC01-appb-M000007
 softmaxは、ソフトマックス関数であり、
Figure JPOXMLDOC01-appb-I000008

である。
 また、アテンションベクトル
Figure JPOXMLDOC01-appb-I000009

は、下記式(3)で表すことができる。
Figure JPOXMLDOC01-appb-M000010
 ここで、
Figure JPOXMLDOC01-appb-I000011

は、L次元のベクトルであり、そのi番目の要素(1≦i≦L)は、アテンション行列Aのi番目のベクトルの最大値(j方向のmax値)である。softmaxは、i方向にsoftmaxを用いるという意味である。
 βは、アテンション行列Aにmax関数を用いることにより、長さがLのベクトルとなり、式(3)において、βの各成分を重みとしてPの各行の重みの和を取ることにより、
Figure JPOXMLDOC01-appb-I000012

は長さdのベクトルとなる。
 また、
Figure JPOXMLDOC01-appb-I000013

をL回繰り返し計算して縦に並べた行列が、
Figure JPOXMLDOC01-appb-I000014

となる。
 アテンション部214は、ベクトルの系列P、アテンションベクトル
Figure JPOXMLDOC01-appb-I000015

、及びアテンションベクトル
Figure JPOXMLDOC01-appb-I000016

に基づいて、アテンションの結果を表現する長さLの読解行列Bを求める。例えば、読解行列
Figure JPOXMLDOC01-appb-I000017

である。ただし、”,”は、ベクトル・行列を横に結合する演算子である。
 そして、アテンション部214は、読解行列Bを、入力変換部221及び第2文脈符号化部215に渡す。
 第2文脈符号化部215は、アテンション部214により生成された読解行列Bを、ニューラルネットワークを用いてベクトルの系列である読解行列Mに変換する。
 具体的には、第2文脈符号化部215は、読解行列Bを、RNNによって読解行列Mにする。RNNの構造には、第1文脈符号化部213と同様に、LSTM等の既存技術を用いることができる。
 第2文脈符号化部215のRNNが出力する単語ベクトルの次元をdとすると、読解行列
Figure JPOXMLDOC01-appb-I000018

となる。
 そして、第2文脈符号化部215は、変換した読解行列Mを、入力変換部221及び根拠探索部216に渡す。
 根拠探索部216は、読解行列Mに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 具体的には、根拠探索部216は、回答の根拠となる範囲の始端sを推定するための始端用RNN及び終端sを推定するための終端用RNNの2つのニューラルネットワークによって構成される。
 根拠探索部216は、まず、読解行列Mを、始端用RNNに入力してベクトルの系列Mを得る。
 根拠探索部216は、回答の根拠となる範囲の始端sを、下記式(4)を用いて求める。
Figure JPOXMLDOC01-appb-M000019
 ここで、始端sは、回答の根拠となる範囲の始端に関するスコアであり、ベクトルで表される。すなわち、ベクトルの各次元に対応する単語が回答範囲の始端になる確率(スコア)を表す。
 同様に、読解行列Mを、終端用RNNに入力して単語ベクトルMを得る。
 根拠探索部216は、回答の根拠となる範囲の終端sを、下記式(5)を用いて求める。
Figure JPOXMLDOC01-appb-M000020
 ここで、終端sは、回答の根拠となる範囲の終端に関するスコアであり、ベクトルで表される。すなわち、ベクトルの各次元に対応する単語が回答範囲の終端になる確率(スコア)を表す。
 推定した始端s及び終端sをまとめて回答範囲スコアと呼ぶ。なお、上記式(4)及び式(5)において、w及びwは、式(4)及び式(5)で表される読解モデルのパラメータであり、パラメータ学習部300により更新される。
 そして、根拠探索部216は、推定した回答範囲スコアを、入力変換部221及びパラメータ学習部300に渡す。
 判断部220は、機械読解部210の処理によって得られる情報に基づいて、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 具体的には、判断部220は、入力変換部221と、スコア計算部222とを備えて構成される。
 入力変換部221は、機械読解部210により文章Pを符号化した結果と、機械読解部210により質問文Qを符号化した結果とに基づいて、ベクトルの系列P及びQを生成する。
 具体的には、入力変換部221は、まず、機械読解部210の処理によって得られる情報の入力を受け付ける。
 入力を受け付ける情報は、4種類に分類することができる。すなわち、(1)文章Pの符号化結果であり、かつ、質問文Qを考慮した長さLのベクトルの系列(例えば、読解行列B又はM)、(2)質問文Qの符号化結果である長さLのベクトル系列(例えば、ベクトルの系列Q)、(3)回答範囲に関する情報である長さLのベクトル(例えば、推定した始端sと終端s)、(4)文章Pと質問文Qとの意味的マッチング結果である大きさL×Lの行列(例えば、アテンション行列A)の4種類を受け付ける。
 ここで、受け付ける情報は、必ずしも4種類全てを受け付ける必要はなく、最低限の構成として(1)の1種類(読解行列B又はM)があれば本実施形態の目的を達することができる。(2)、(3)及び(4)は、いずれかのみ、あるいは複数を追加として受け付けても良い。本実施形態では、単純な形式として(1)読解行列B、及び(2)ベクトルの系列Qを受け付ける場合を例に説明する。
 入力変換部221は、受け付けた読解行列B及びベクトルの系列Qに基づいて、長さLのベクトルの系列
Figure JPOXMLDOC01-appb-I000021

、長さLのベクトルの系列
Figure JPOXMLDOC01-appb-I000022

を計算する。
 ベクトルの系列P及びQの計算方法として、任意のニューラルネットワークを用いることができる。例えば、下記式(6)及び式(7)を用いることができる。
Figure JPOXMLDOC01-appb-M000023
 なお、dの次元数は、任意に設定することができる。式(6)及び式(7)を用いた場合、Qとの次元を合わせるため、d=dであり、式(6)におけるRNNの出力の次元もd=dとなる。
 そして、入力変換部221は、生成したベクトルの系列P及びQを、スコア計算部222に渡す。
 スコア計算部222は、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 具体的には、スコア計算部222は、ベクトルの系列P及びQに基づいて、任意の文ペア分類タスクのフレームワークを用いて、質問文Qに対する回答がYesかNoかに分類するために用いる判断スコアk(0から1の実数)を求める。
 例えば、文ペア分類タスクの1つである含意認識の代表的なモデルであるESIM(参考文献4)のdecoder LSTM後のフレームワークを分類問題に用いることができる。
[参考文献4]Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang, Diana Inkpen, ”Enhanced LSTM for Natural Language Inference”, arXiv:1609.06038, 2017.
 この場合、ベクトルの系列P及びQをaverage pooling(列方向の平均を取る操作)、又はmax pooling(列方向の最大値を取る操作)をして、ベクトル
Figure JPOXMLDOC01-appb-I000024

を得る。
 得られたベクトルP、Q、P及びQを結合して、4d次元のベクトルJを得る。ベクトルJを多層パーセプトロンによって、実数(1次元のベクトル)にし、シグモイド変換をして判断スコアkを得る。
 なお、Yes/Noの分類問題でなく、Yes、No、又は不明の3つに分類するように構成してもよい。この場合、ベクトルJを多層パーセプトロンによって3次元のベクトルに変換した後で、ソフトマックス変換したものを判断スコアkとしてもよい。
 そして、スコア計算部222は、判断スコアkを、パラメータ学習部300に渡す。
 パラメータ学習部300は、学習データに含まれる正解Yと、判断部220により判断された結果とが一致し、学習データに含まれる始端D及び終端Eと、機械読解部210により推定された始端s及び終端sとが一致するように、読解モデル及び判断モデルのパラメータを学習する。
 具体的には、パラメータ学習部300は、機械読解部210で用いる読解モデルについての目的関数Lと、判断部220で用いる判断モデルについての目的関数Lの線形和を、最適化問題の目的関数とする(下記式(8))。
Figure JPOXMLDOC01-appb-M000025
 ここで、λはモデルのパラメータであり、学習器によって学習可能である。λの値を事前に指定する場合、1や1/2等、学習が進むように適当な値を定める。
 目的関数Lは、任意の機械読解技術の目的関数を用いることができる。例えば、非特許文献1では、下記式(9)で表されるクロスエントロピー関数を提案している。
Figure JPOXMLDOC01-appb-M000026
 上記式(9)において、D及びEは、それぞれ真の始端D及び終端Eの位置を表し、sd,Dは、ベクトルsにおけるD番目の要素の値を、se,Eは、ベクトルsにおけるE番目の要素の値を表す。
 目的関数Lも任意の目的関数を用いることができる。例えば、クロスエントロピー関数を用いた場合、下記式(10)となる。
Figure JPOXMLDOC01-appb-M000027
 上記式(10)において、Yは、真の回答の極性を示す正解Yであり、正解YがYesである場合、スコアkYes=k、正解YがNoである場合、スコアkNo=1-kである。つまり、正解YがYesの場合L=log(k)、正解YがNoの場合L=log(1-k)となる。
 そして、パラメータ学習部300は、上記式(8)で表される目的関数の勾配を、誤差逆伝播勾配法を用いて計算し、任意の最適化手法を用いてパラメータを更新する。
<第1の実施形態に係る回答学習装置の作用>
 図2は、第1の実施形態に係る回答学習処理ルーチンを示すフローチャートである。また、以下では本実施形態に係る回答学習装置が、ミニバッチを用いて学習する場合について説明するが、一般的なニューラルネットワークの学習方法を用いてもよい。なお、簡便のため、ミニバッチのサイズを1とする。
 入力部100に複数の学習データが入力されると、回答学習装置10において、図2に示す回答学習処理ルーチンが実行される。
 まず、ステップS100において、入力部100は、文章Pと、質問文Qと、文章Pにおける当該質問文に対する回答の極性を示す正解Yと、文章Pにおける回答の根拠となる範囲の始端D及び終端Eとを含む複数の学習データの入力を受け付ける。
 ステップS110において、入力部100は、ステップS100により受け付けた学習データを、ミニバッチに分割する。ミニバッチとは、複数の学習データをランダムに分割した学習データε個の集合である。εは1以上の自然数である。
 ステップS120において、単語符号化部211は、1番目のミニバッチを選択する。
 ステップS130において、単語符号化部211は、選択されているミニバッチに含まれる文章P及び質問文Qに基づいて、単語ベクトルの系列P及びQを生成する。
 ステップS140において、第1文脈符号化部213は、上記ステップS130により生成された単語ベクトルの系列P及びQを、ニューラルネットワークを用いてベクトルの系列P及びQにそれぞれ変換する。
 ステップS150において、アテンション部214は、ニューラルネットワークを用いて、ベクトルの系列P及びQに基づいて、文章P及び質問文Qのアテンションを表す読解行列Bを生成する。
 ステップS160において、第2文脈符号化部215は、上記ステップS150により生成された読解行列Bを、ニューラルネットワークを用いて読解行列Mに変換する。
 ステップS170において、根拠探索部216は、読解行列Mに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 ステップS180において、入力変換部221は、機械読解部210により文章Pを符号化した結果と、機械読解部210により質問文Qを符号化した結果とに基づいて、ベクトルの系列P及びQを生成する。
 ステップS190において、スコア計算部222は、ベクトルの系列P及びQに基づいて、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 ステップS200において、パラメータ学習部300は、学習データに含まれる正解Yと、判断部220により判断された結果とが一致し、学習データに含まれる始端D及び終端Eと、機械読解部210により推定された始端s及び終端sとが一致するように、読解モデル及び判断モデルのパラメータを更新する。
 ステップS210において、パラメータ学習部300は、全てのミニバッチについて処理を行ったか否かを判定する。
 全てのミニバッチについて処理を行っていない場合の場合(ステップS210のNO)、ステップS220において、次のミニバッチを選択し、ステップS130に戻る
 一方、全てのミニバッチについて処理を行っている場合の場合(ステップS210のYES)、ステップS230において、パラメータ学習部300は、学習が収束したか否かについての収束判定を行う。
 学習が収束していない場合(ステップS230のNO)、ステップS110に戻り、再度ステップS110~ステップS230までの処理を行う。
 一方、学習が収束している場合(ステップS230のYES)、ステップS240において、パラメータ学習部300は、学習したパラメータを、メモリ(図示省略)に格納する。
 なお、ミニバッチのサイズを2以上とする場合、上記ステップS120の後に、1番目の文章P及び質問Qを選択するステップと、上記ステップS210の前に、ミニバッチ内の全ての文章P及び質問Qについて処理を行ったか否かを判定し、当該判定結果が否定的な場合に、次の文章P及び質問Qを選択して上記ステップS130に戻り、当該判定が肯定的な場合に上記ステップS210に進むステップとを追加する構成とすればよい。
 以上説明したように、本実施形態に係る回答学習装置によれば、文章と、質問文と、当該文章における当該質問文に対する回答の極性を示す正解と、当該文章における回答の根拠となる範囲の始端及び終端とを含む学習データの入力を受け付け、当該文章及び当該質問文に基づいて、当該範囲を推定するための読解モデルを用いて、当該範囲の始端及び終端を推定する処理によって得られる情報に基づいて、質問文に対する回答の極性が正か否かを判断する判断モデルを用いて、当該質問文に対する回答の極性を判断し、学習データに含まれる正解と、判断された結果とが一致し、学習データに含まれる始端及び終端と、推定された始端及び終端とが一致するように、読解モデル及び判断モデルのパラメータを学習することにより、極性で回答することができる質問に対して、精度よく、極性で回答するためのモデルを学習することができる。
<第1の実施形態に係る回答生成装置の構成>
 図3を参照して、第1の実施形態に係る回答生成装置20の構成について説明する。図3は、第1の実施形態に係る回答生成装置20の構成を示すブロック図である。なお、上述の回答学習装置10と同様の構成については、同一の符号を付して詳細な説明は省略する。
 回答生成装置20は、CPUと、RAMと、後述する回答生成処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図3に示すように、本実施形態に係る回答生成装置20は、入力部400と、解析部200と、出力部500とを備えて構成される。なお、解析部200は、回答学習装置10により学習されたパラメータを用いる。
 入力部400は、文章Pと、質問文Qとの入力を受け付ける。
 そして、入力部400は、受け付けた文章P及び質問文Qを、機械読解部210に渡す。
 出力部500は、機械読解部210の根拠探索部216により得られた回答範囲スコアを回答の根拠とし、判断部220のスコア計算部222により得られた判断スコアkを回答として出力する。
 ここで、出力部500は、判断スコアkのYesのスコア、Noのスコアのうち、スコアが大きい判断結果を回答として出力する、閾値を超えたスコアの判断結果だけを出力するといった任意の出力形式を選択することができる。
 また、出力部500は、回答範囲スコアについても同様に、任意の出力形式を選択することができる。回答範囲スコアには始端sと終端sとが含まれるので、出力の計算方法として様々な手法を用いることが考えられる。例えば、非特許文献1のように、始端sが終端sよりも前になる制約下で、始端sと終端sとの積が最大になる範囲の単語列を出力する、といった手法を用いることができる。
<第1の実施形態に係る回答生成装置の作用>
 図4は、第1の実施形態に係る回答生成処理ルーチンを示すフローチャートである。なお、第1の実施形態に係る回答学習処理ルーチンと同様の処理については、同一の符号を付して詳細な説明は省略する。
 入力部400に文章Pと、質問文Qとが入力されると、回答生成装置20において、図4に示す回答生成処理ルーチンが実行される。
 ステップS300において、入力部400は、文章Pと、質問文Qとの入力を受け付ける。
 ステップS400において、出力部500は、上記ステップS170により得られた回答範囲スコアを所定の方法により回答の根拠とし、上記ステップS190により得られた判断スコアkを所定の方法により回答として生成する。
ステップS430において、出力部500は、上記ステップS400により得られた全ての回答の根拠及び回答を出力する。
 以上説明したように、本実施形態に係る回答生成装置によれば、入力された文章及び質問文に基づいて、当該文章における当該質問文に対する回答の根拠となる範囲を推定するための読解モデルを用いて、当該範囲の始端及び終端を推定する処理によって得られる情報に基づいて、質問文に対する回答の極性が正か否かを判断するための予め学習された判断モデルを用いて、当該質問文に対する回答の極性を判断することにより、極性で回答することができる質問に対して、精度よく、極性で回答することができる。
<第2の実施形態に係る回答学習装置の概要>
 人間が自然言語を理解して回答する場合は、自身のもつ経験、常識、及び世界知識を踏まえて、理解した質問に対して回答を推論することができる。例えば、人間が文章を読んでその文章に対する質問に回答をする場合には、文章からだけでなく、自分のもつ経験等から回答を見つけている。しかし、AIの場合は質問の対象となっている文章に含まれている情報だけから回答を推論する必要がある。
 特にYes/Noで答えるべき質問は、質問に答えるために必要な知識が一か所に記載されているとは限らない。例えば、必要な知識が文章内の複数箇所に書いてある場合や世界知識から補わなければならない場合がある。しかし、文章内の複数箇所にある記述や世界知識を組み合わせて考えるためには、テキストの長期の依存関係を理解する必要がある。そのため、Yes/Noの質問応答を精度よく行うことは難しい。
 そこで、第2の実施形態では、「Yes又はNoで回答することができる質問に対してYes又はNoで回答する」タスクを精度よく行うために、必要な知識が文章内の複数箇所に書いてある質問や必要な知識を世界知識から補わなければならない質問に注目する。本実施形態では、第1の実施形態と同様に、回答の極性がYes又はNoである場合を例に説明する。
 文章内の複数箇所にある記述を組み合わせて考える質問応答は、ニューラルネットワークが苦手とする長期の依存関係の理解を要求するため、難しい質問応答である。本実施形態では、回答に必要な文だけを根拠文として抽出することにより、位置が離れた根拠文同士のマッチングを可能にし、長期の依存関係を理解することを実現する。
 この根拠文の抽出によって、ユーザーはYes/Noの回答だけでなくその根拠となる文を過不足なく確認することが可能となり、解釈性を向上することもできる。
 また、必要な知識を世界知識から補う必要がある質問応答に対しては、必要な知識が書いてあるテキストをWebでの検索等によって得て、質問対象の文章に繋げた新しい文章に対して質問応答を行うことで実現する。通常、単純に文章を繋げるだけでは、元の文章中の回答に必要な部分と新しく繋げたテキストが離れた箇所にあるためマッチングを取ることが難しい。しかし、本実施形態においては根拠文としてそれらを抽出することによって、根拠文が離れた箇所にある場合であってもマッチングが可能となる。
<第2の実施形態に係る回答学習装置の構成>
 図5を参照して、第2の実施形態に係る回答学習装置30の構成について説明する。図5は、第2の実施形態に係る回答学習装置30の構成を示すブロック図である。なお、上述の第1の実施形態に係る回答学習装置10と同様の構成については、同一の符号を付して詳細な説明は省略する。
 回答学習装置30は、CPUと、RAMと、後述する回答学習処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図5に示すように、本実施形態に係る回答学習装置30は、入力部100と、解析部600と、パラメータ学習部700とを備えて構成される。
 解析部600は、機械読解部610と、判断部220とを備えて構成される。機械読解部610は、文章P及び質問文Qに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 具体的には、機械読解部210は、単語符号化部211と、単語データベース(DB)212と、第1文脈符号化部213と、アテンション部214と、第2文脈符号化部215と、根拠抽出部617と、根拠探索部216とを備えて構成される。
 根拠抽出部617は、機械読解部610の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、質問文Qに対する回答の根拠情報を抽出する。
 具体的には、根拠抽出部617は、まず、第2文脈符号化部215により変換された読解行列M(変換前の読解行列Bでもよい)を入力とし、ニューラルネットワークを用いて文章Pの各文の意味を表すベクトルの系列Hを抽出する。根拠抽出部617は、例えば、ニューラルネットワークとして、Undirectional-RNNを用いることができる。
 次に、根拠抽出部617は、根拠文を1つ抽出する操作を1時刻と定義し、状態zを抽出モデルのRNNによって生成する。すなわち、根拠抽出部617は、時刻t-1に抽出された根拠文に対応するベクトルの系列Hの要素
Figure JPOXMLDOC01-appb-I000028

を抽出モデルのRNNに入力することにより、状態zを生成する。ただし、st-1は時刻t-1に抽出された根拠文の添字である。また、時刻tまでに抽出された文sの集合をSとする。
 根拠抽出部617は、状態zと、質問文の各単語に対するベクトルyからなるベクトルの系列Y’に基づいて、抽出モデルにより、時刻tにおける重要性を考慮した質問文ベクトルであるglimpseベクトルe(下記式(13))を、質問文Qに対するglimpse操作(参考文献5)を行うことで生成する。このように、抽出モデルでは質問文Qに対するglimpse操作を行うことで、根拠文の抽出結果が質問全体に対応する内容を包含することができる。
[参考文献5]O. Vinyals, S. Bengio and M. Kudlur, “Order matters: Sequence to sequence for sets”, ICLR (2016).
Figure JPOXMLDOC01-appb-M000029
 抽出モデルのRNNの初期値はベクトルの系列Hをaffine変換したベクトル系列をmaxpoolingしたベクトルとする。
 根拠抽出部617は、状態zと、glimpseベクトルeと、ベクトルの系列Hとに基づいて、抽出モデルにより、時刻tにおいて下記式(14)で表される確率分布に従って第δ文を選び、文s=δを、時刻tに抽出された根拠文とする。
Figure JPOXMLDOC01-appb-M000030
 そして、根拠抽出部617は、抽出した文sの集合Sを根拠情報として、根拠探索部216及びパラメータ学習部700に渡す。
 根拠探索部216は、上記第1の実施形態と同様に、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 具体的には、上記第1の実施形態で説明した読解行列
Figure JPOXMLDOC01-appb-I000031

を利用すると共に、文の意味を表すベクトルの系列Hを利用する。
 また、ベクトルの系列
Figure JPOXMLDOC01-appb-I000032

は文レベルのベクトル系列であるため、以下のように、単語レベルのベクトル系列に変換する。
 まず、単語のインデックスをi(i=1,…,L)、文のインデックスをj(j=1,…,m)とする。関数word_to_sentを、単語iが文jに含まれるときword_to_sent(i)=jで定める。新しい単語レベルのベクトル系列H’を、h’=h_word_to_sent(i)と定義することで、
Figure JPOXMLDOC01-appb-I000033

を定める。
 そして、MとH’を縦に連結した行列を
Figure JPOXMLDOC01-appb-I000034

として、このM’を後段の処理におけるMの代わりに用いてもよい。なお、上記では、読解行列Mを利用する場合を例に説明したが、読解行列Bなど別の行列を利用してもよい。また、上記の根拠探索部216の説明で用いたiやjといった変数は、ここの説明に限るものである。
 パラメータ学習部700は、学習データに含まれる正解Yと、判断部220により判断された結果とが一致し、学習データに含まれる始端D及び終端Eと、機械読解部610により推定された始端s及び終端sとが一致し、学習データに含まれる文章Pにおける正解の根拠情報と、根拠抽出部617により抽出された根拠情報とが一致するように、読解モデル、判断モデル及び抽出モデルのパラメータを学習する。
 具体的には、文章Pと、質問Qと、YES、NO、及び抽出型の何れかである正解となる回答Y^、回答Yの正解となる根拠範囲である始端D^及び終端E^と、回答Yの正解となる根拠情報である根拠段落の集合S^とを1セットとし、学習データが、複数セット含むものとする。また、パラメータ学習部700は、機械読解部610で用いる読解モデルについての目的関数Lと、判断部220で用いる判断モデルについての目的関数Lと、根拠抽出部617で用いる抽出モデルについての目的関数Lとの線形和を、最適化問題の目的関数とする(下記式(15))。
Figure JPOXMLDOC01-appb-M000035
 ここで、λ、λ、λはハイパーパラメータであり、1/3等の学習が進むように適当な値を定める。また、サンプルによって持つ教師データが異なる場合も、持たないデータに関する項のλを0とすることで一律に扱うことができる。例えば、根拠探索部216の出力に対応するデータがないサンプルに対しては、λ=0とする。
 目的関数L及びLについては、第1の実施形態と同様である。目的関数Lsは、coverage正則化(参考文献6)を行った目的関数である。例えば、目的関数Lsは下記式(16)のような目的関数を用いることができる。
[参考文献6]A. See, P. J. Liu and C. D. Manning, “Get to the point: ummarization with pointer-generator networks”, ACL, 2017, pp.1073-1083.
Figure JPOXMLDOC01-appb-M000036
 上記式(16)において、
Figure JPOXMLDOC01-appb-I000037

は、正解の根拠情報として与えられた根拠文の集合Sの中で時刻tの抽出確率P(δ;St-1)が最小の文sとし、cは、coverageベクトルであり、
Figure JPOXMLDOC01-appb-I000038

である。Tは終了時刻である。すなわち、t=Tが学習の終了条件となる。このcoverageにより、抽出結果を質問全体に対応する内容を包含させることが可能となる。ただし、抽出の終了条件を学習するために、抽出終了ベクトル
Figure JPOXMLDOC01-appb-I000039

を学習可能なパラメータとする。文の意味を表すベクトルの系列Hに抽出終了ベクトル
Figure JPOXMLDOC01-appb-I000040

を加え、文章Pの文数mを実際の文数+1とする。Tも真の根拠文の数+1とし、学習時は時刻T-1までに全ての根拠文を出力した後、時刻Tに抽出終了ベクトル
Figure JPOXMLDOC01-appb-I000041

を抽出するように学習を行う。テスト時は、抽出終了ベクトルを出力した時点で抽出を終了する。
 そして、パラメータ学習部700は、上記式(16)で表される目的関数の勾配を、誤差逆伝播勾配法を用いて計算し、任意の最適化手法を用いて各パラメータを更新する。
<第2の実施形態に係る回答学習装置の作用>
 図6は、第2の実施形態に係る回答学習処理ルーチンを示すフローチャートである。また、以下では本実施形態に係る回答学習装置が、ミニバッチを用いて学習する場合について説明するが、一般的なニューラルネットワークの学習方法を用いてもよい。なお、簡便のため、ミニバッチのサイズを1とする。なお、上述の第1の実施形態に係る回答学習処理ルーチンと同様の構成については、同一の符号を付して詳細な説明は省略する。
 ステップS555において、根拠抽出部617は、根拠情報抽出処理を実行する。
 ステップS600において、パラメータ学習部700は、学習データに含まれる正解Yと、判断部220により判断された結果とが一致し、学習データに含まれる始端D及び終端Eと、機械読解部210により推定された始端s及び終端sとが一致し、学習データに含まれる文章Pにおける回答の根拠情報と、根拠抽出部617により抽出された根拠情報とが一致するように、読解モデル、判断モデル及び抽出モデルのパラメータを学習する。
 図7は、第2の実施形態に係る回答学習装置における根拠情報抽出処理ルーチンを示すフローチャートである。根拠抽出部617は、根拠情報抽出処理により、機械読解部610の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、質問文Qに対する回答の根拠情報を抽出する。
 ステップS500において、根拠抽出部617は、t=1とする。
 ステップS510において、根拠抽出部617は、根拠文を1つ抽出する操作を1時刻と定義し、時刻tにおける状態zを抽出モデルのRNNによって生成する。
 ステップS520において、根拠抽出部617は、時刻tにおける重要性を考慮した質問文ベクトルであるglimpseベクトルeを、質問文Qに対してglimpse操作を行うことにより生成する。
 ステップS530において、根拠抽出部617は、時刻tにおいて上記式(14)で表される確率分布に従って第δ文を選び、文s=δとする。
 ステップS540において、根拠抽出部617は、終了条件を満たしているか否かを判定する。
 終了条件を満たしていない場合(上記ステップS540のNO)、根拠抽出部617は、ステップS550においてtに1を加算し、ステップS510に戻る。一方、終了条件を満たしている場合(上記ステップS540のYES)、根拠抽出部617は、リターンする。
 以上説明したように、本実施形態に係る回答学習装置によれば、機械読解部の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、質問文に対する回答の根拠情報を抽出し、学習データに含まれる文章における回答の根拠情報と、根拠抽出部により抽出された根拠情報とが一致するように、抽出モデルのパラメータを学習することにより、極性で回答することができる質問に対して、更に精度よく、極性で回答するためのモデルを学習することができる。
 また、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルと、根拠(回答)範囲を抽出する読解モデルと、回答を判断する判断モデルとのマルチタスク学習を行うことにより、根拠文が離れた個所にある場合でも、質問文とのマッチングを取ることを可能にする。ここで、マルチタスク学習とは、複数の異なるタスクを解く複数のモデルについて、当該複数のモデルの一部分を共有した状態で学習することをいう。本実施形態では、各符号化部のモデル(厳密には各符号化部のモデルのパラメータ)を共有し、共有した各符号化部による符号化結果を共通の入力とした抽出モデル、読解モデル、及び判断モデルの出力が正解となる情報に近付くよう、抽出モデル、読解モデル、判断モデル、及び符号化モデルのマルチタスク学習を行う。
<第2の実施形態に係る回答生成装置の構成>
 図8を参照して、第2の実施形態に係る回答生成装置40の構成について説明する。図8は、第2の実施形態に係る回答生成装置40の構成を示すブロック図である。なお、上述の回答学習装置30と同様の構成については、同一の符号を付して詳細な説明は省略する。回答生成装置40は、CPUと、RAMと、後述する回答生成処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図8に示すように、第2の実施形態に係る回答生成装置40は、入力部400と、解析部600と、出力部800とを備えて構成される。
 出力部800は、判断部220により判断された回答の極性と、根拠抽出部617により抽出された根拠情報とを回答として出力する。
<第2の実施形態に係る回答生成装置の作用>
 図9は、第2の実施形態に係る回答生成処理ルーチンを示すフローチャートである。なお、第1の実施形態に係る回答生成処理ルーチン及び第2の実施形態に係る回答学習処理ルーチンと同様の処理については、同一の符号を付して詳細な説明は省略する。
 ステップS700において、出力部800は、上記ステップS400により得られた全ての回答の根拠及び回答、及び上記ステップS555により得られた根拠情報を出力する。
<第2の実施形態に係る回答生成装置の実施例>
 次に、第2の実施形態に係る回答生成装置の実施例について説明する。本実施例では、回答生成装置の各部の構成として、図10に示した構成を用いる。具体的には、判断部220は、RNNと線形変換とを用いて構成され、Yes/No/抽出型の回答の何れかで答えるかを判断し、Yes/No/抽出型の回答の3値の何れかを出力とする。また、根拠探索部216は、RNNと線形変換との組を2つ用いて構成され、一方の組は回答の終点、他方の組は回答の始点を出力とする。根拠抽出部617は、RNNと抽出モデル617Aとを用いて構成される。第2文脈符号化部215は、RNNとセルフアテンションとを用いて構成され、アテンション部214は、双方向アテンションにより構成される。
 第1文脈符号化部213は、2つのRNNを用いて構成され、単語符号化部211は、単語埋め込みと文字埋め込みとの組を2つ用いて構成される。
 また、抽出モデル617Aの構成として、図11に示す構成を用いている。この構成は、参考文献7に提案されている抽出型文章要約モデルをベースとしている。
[参考文献7]Y.C. Chen and M. Bansal, “Fast abstractive summarization with reinforce-selected sentence rewriting”, ACL, 2018, pp.675-686.
 参考文献7の手法は、要約元文章に注意しながら要約元文章中の文を抽出する手法であるが、本実施例では質問文Qに注意しながら文章P中の文を抽出する。抽出モデル617Aでは、質問文Qに対するglimpse操作を行うことで、抽出結果が質問全体に対応する内容を包含することを意図している。
<第2の実施形態に係る回答生成装置の実施例における実験結果>
 次に、第2の実施形態に係る回答生成装置の実施例における実験結果について説明する。
<<実験設定>>
 実験はGPUに、”NVIDIA Tesla P100(株式会社エルザジャパン製)”を4枚用いて行った。実装にはPytorchを用いた。Bi-RNNの出力の次元をd=300で統一した。dropoutのkeep ratioは0.8とした。バッチサイズを72、学習率を0.001とした。上記以外の設定はベースラインモデルと同じ設定である。抽出モデル617AはRNNにGRUを用いた、ベクトルの初期化を正規分布で、行列の初期化をxavier normal分布で行った。デコード時のbeam sizeを2とした。
 また、ベースラインモデルとして、本実施例に係る回答生成装置の構成(図10)のうち、抽出モデル617Aをaffine変換とsigmoid関数により各文の根拠スコアを得るモデルに変更したモデルを用いた。
 本実験では、回答タイプT・回答A・根拠文Sの予測精度を評価した。ここで、回答タイプTは、HotpotQAのタスク設定における「Yes・No・抽出」の3ラベルから構成される。回答、根拠文抽出ともに完全一致(EM)と部分一致を評価した。部分一致の指標は適合率と再現率の調和平均(F1)である。回答は、回答タイプTの一致で評価し、抽出の場合は回答Aの一致でも評価する。根拠文抽出の部分一致については抽出された文のidの真の根拠文idへの一致で測った。そのため、単語レベルでの部分一致は考慮されない。回答タイプに関して、「Yes・No」質問に限定したときの回答精度をYNと記した。また、回答と根拠の精度双方を考慮した指標としてjoint EM及びjoint F1(参考文献8)を用いる。
[参考文献8]Z. Yang, P. Qi, S. Zhang, Y. Bengio, W. W. Cohen, R. Salakhutdinov and C. D. Manning, “HotpotQA: A dataset for diverse, explainable multi-hop question answering”, EMNLP, 2018, pp.2369-2380.
 本実験では、distractor設定とfullwiki設定との場合について行う。distractor設定は、大量のテキストを質問に関連する少量のテキストに絞ることが既存技術によって可能であるという仮定を置いた設定である。また、fullwiki設定は、TF-IDF類似度検索によって少量テキストへの絞り込みを行った設定である。
<<実験結果>>
 テストデータにおける実験結果は、distractor設定の結果を表1に、fullwiki設定の結果を表2に示す。
Figure JPOXMLDOC01-appb-T000042
Figure JPOXMLDOC01-appb-T000043
 distractor設定、fullwiki設定共に、本実施例はベースラインモデルを大きく上回り、state-of-the-artの精度を達成した。特に根拠文の完全一致はdistractor設定で37.5ポイント(+185%)、fullwiki設定で10.3ポイント(+268%)と大きく向上している。そのため、本実施例は根拠文を過不足なく抽出することに秀でた手法であると言える。開発データでのdistractor設定における実験結果を表3に示す。
Figure JPOXMLDOC01-appb-T000044
 開発データでのベースラインモデルは我々の追実験によって学習されたため、精度がテストデータでの数値と大きく異なっている。これはハイパーパラメータの違いに起因する。まず、本実施例はベースラインモデルを根拠文抽出のEMで24.5ポイント上回っている。F1でも6.7ポイントの向上が見られる。さらに、回答でもEMで1.0ポイント、F1で1.4ポイントの上昇がある。特に「Yes・No」の判断精度については、5.6ポイント向上している。べースラインモデルと本実施例とでは、抽出モデル617A以外は全て同じモデルを用いている。それにも関わらず「Yes・No」の判断精度が向上していることは、抽出モデル617Aとのマルチタスク学習が下層のRNNを回答にも資する特徴量を獲得するように学習できると解釈できる。結果として、Joint指標でも精度が向上している。比較手法として、glimpse操作を用いずにRNNによる文抽出だけを行う手法を実験したが、全ての指標で本実施例が上回ることを確認した。
 開発データでのfullwiki設定における実験結果を表4に示す。
Figure JPOXMLDOC01-appb-T000045
 本実施例はベースラインモデルを根拠のEMで6.5ポイント上回っているが、F1ではベースラインモデルを下回っている。回答ではEMで0.9ポイント、F1で0.8ポイントの上昇がある。特に「Yes・No」の判断精度については、3.0ポイント向上している。そのため、やはり抽出モデル617Aによって下層のRNNの学習が進んでいると解釈できる。結果として、Joint指標でも精度が向上している。また、本実施例がglimpse操作を用いない手法と比較して全ての指標で上回っていることを確認した。
 以上の結果から、少量の関連テキストの中から特に必要な文を検索することについては、distractor設定では部分一致で84.7%の精度を達成したこと、及び必要な文を使って「Yes・No」の判断精度を上げることについては、5.6ポイントの精度の向上が観察できた。
 以上説明したように、本実施形態に係る回答生成装置によれば、機械読解部の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、前記質問文に対する回答の根拠情報を抽出し、判断された回答の極性と、抽出された根拠情報とを回答として出力することにより、極性で回答することができる質問に対して、更に精度よく、極性で回答することができる。
 また、回答学習装置では、根拠抽出部、根拠探索部、及び判断部のそれぞれのタスクに関してマルチタスク学習を行っているため、根拠情報を参考にした、根拠となる範囲の推定や判断スコアの計算が実現される。
<第3の実施形態に係る回答学習装置の概要>
 上記第2の実施形態では、質問文に対する回答を出力するとき、回答の根拠として、根拠となる範囲と、文の集合である根拠情報を出力することで、回答結果をユーザーが解釈しやすい形にしていた。
 この際、根拠情報に含まれるそれぞれの文が、回答を抽出する根拠としてどれぐらい適しているかを示す、根拠スコアを提示していなかった。
 また、学習のためには、根拠文となる正解の文を定義した教師データが必要であった。この教師データの作成は、人間が「回答のためにどの文が必要か」を考えながら作業を行う必要があるため、難しく高コストなタスクである。
 そこで、本実施形態では、根拠抽出部において、文章を分割したスパンごとに、そのスパンが回答を抽出する根拠としてどれぐらい適しているかを示す、根拠スコアを算出する。
 また、本実施形態では、根拠情報の単位であるスパンを、文ではなく段落とする。根拠情報の単位として文ではなく段落を用いることで、教師データの作成が容易となる。なぜなら、段落は文よりも粒度が大きく多くの情報を含むため、多くの教師データでは、回答を含む1段落をそのまま根拠段落として使用すればよい。そのため、人間の追加の作業が不要である。
 なお、段落は、一般的に使われる段落と異なってもよく、例えば箇条書きの全体を段落としてみなすことも可能であるし、1つ1つのアイテムをそれぞれ別段落とみなすことも可能である。文章を分割する単位として、以降は「段落」を例として説明を行うが、上記の実施形態と同様に、文を単位として以降の処理を行うことも可能である。文章を所定単位で分割したものを「スパン」と呼称し、文や段落はこれに含まれるものとする。
 また、回答種別とは、「YES」、「NO」、又は文章から回答を抽出する「抽出型」のいずれである。根拠範囲とは、文章の中の根拠を表す範囲の単語列であり、回答種別が抽出型である場合、この範囲に含まれる文字列を回答としても用いるため、回答範囲とも称する。また、根拠情報とは、根拠となるスパンの集合である。すなわち、根拠範囲(回答範囲)は単語レベルの根拠であり、根拠情報は、スパン(文や段落)レベルの根拠とも言える。
 また、本実施形態では、回答生成装置が、根拠スコアを算出して可視化する点が、第2の実施形態と異なっている。
 また、文章を構成する段落を1つの文章とみなし、段落毎に符号化部に入力し、符号化部が、単語符号化部211、第1文脈符号化部213、アテンション部214、及び第2文脈符号化部215に相当するモデルとして、参考文献9に記載のBERT(Bidirectional Encoder Representations from Transformers)などの事前学習済み言語モデルを利用する点が、第2の実施形態と異なっている。
[参考文献9]BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, <online>, <URL: https://www.aclweb.org/anthology/N19-1423/>.
 また、回答学習装置では、根拠情報の単位として段落を用い、学習データの正解の根拠情報として、段落単位で設定したものを用いる点が、第2の実施形態と異なっている。
 なお、上記以外の点が、第2の実施形態と同様であるため、同一符号を付して説明を省略する。
<第3の実施形態に係る回答学習装置の構成>
 図12を参照して、第3の実施形態に係る回答学習装置50の構成について説明する。図12は、第3の実施形態に係る回答学習装置50の構成を示すブロック図である。なお、上述の第2の実施形態に係る回答学習装置30と同様の構成については、同一の符号を付して詳細な説明は省略する。
 回答学習装置50は、CPUと、RAMと、上記図6に示した回答学習処理ルーチンと同様の処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図12に示すように、本実施形態に係る回答学習装置50は、入力部100と、解析部900と、パラメータ学習部700とを備えて構成される。
 解析部900は、符号化部910と、根拠抽出部617と、根拠探索部216と、判断部220とを備えて構成される。
 符号化部910は、単語符号化部211と、単語データベース(DB)212と、第1文脈符号化部213と、アテンション部214と、第2文脈符号化部215と、を備えている。
 符号化部910で用いられる事前学習済み言語モデルであるBERTモデルには入力可能なテキストの長さに制約があるため、文章を段落ごとに分割して入力する。
 具体的には、BERTモデルの入力を、質問文と1段落のテキストを連結して生成した1テキストとする。BERTモデルの出力は、1つの固定長ベクトルと、1つのベクトル系列である。固定長ベクトルは、質問と1段落全体の意味をあらわすd次元のベクトルである。ベクトル系列の長さ(トークン数)は、入力となる「質問文と1段落のテキストを連結して生成した1テキスト」のトークン数と同じである。ベクトル系列のうちの1ベクトルが、1トークンの意味を表すd次元であり、ベクトル系列のサイズは、d次元×トークン数となる。本実施形態では、トークンの単位を単語とするが、部分単語単位などを用いてもよい。
 符号化部910は、質問文と1段落のテキストを連結して生成した1テキストをBERTモデルに入力して、1つの固定長ベクトルと、1つのベクトル系列を求める処理を、文章の各段落(段落数をnとする)について行う。これにより、符号化部910では、n個のd次元ベクトルである固定長ベクトルV,…,Vとn個のベクトル系列U,…,Uを得る。Vは、文脈符号化結果であるi番目の段落を表す固定長ベクトル、Uは質問文とi番目の段落の各単語の意味を表すベクトル系列である。なお、段落数nは、上記式(12)中の「n」とは別の変数である。n個のd次元ベクトルである固定長ベクトルV,…,Vとn個のベクトル系列U,…,Uが、質問文とスパンの意味を表すベクトル表現系列の一例である。固定長ベクトルは単語や文章の意味をベクトルで表現したものであり、「ベクトル表現」とも表される。また、ベクトル系列は文章の意味を表現する際などに、ベクトル表現を並べたものであり、これは「ベクトル表現系列」とも表される。入力文が1単語からなる場合、当該入力文に対応する「ベクトル表現系列」は「ベクトル表現」になるため、「ベクトル表現系列」は、「ベクトル系列」をも含む概念である。
 また、符号化部910は、質問文の各単語の意味を表すベクトル系列U’を、以下の2つの処理で作成する。
 第1処理では、符号化部910の出力するn個のベクトル系列Uの各々について、当該ベクトル系列Uから、質問文に相当する位置のベクトルだけを抽出して、ベクトル系列を抽出する。ここで、抽出されるベクトル系列は、質問文の単語数と長さが一致し、ベクトル系列に含まれる各ベクトルは質問文の1単語を表す。
 第2処理では、n個のベクトル系列Uの各々について抽出したベクトル系列の平均又は和をとり、1つのベクトル系列を求め、ベクトル系列U’とする。
 根拠抽出部617は、符号化部910の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、質問文Qに対する回答の根拠情報を抽出する。
 具体的には、根拠抽出部617は、まず、符号化部910の処理によって得られたn個の固定長ベクトルVを入力とし、ニューラルネットワークを用いて文章Pの各段落の意味を表すベクトルの系列Hを抽出する。根拠抽出部617は、例えば、ニューラルネットワークとして、Undirectional-RNNを用いることができる。若しくは、根拠抽出部617は、ニューラルネットワークを用いずに、n個の固定長ベクトルVを並べてベクトルの系列Hを生成してもよい。
 次に、根拠抽出部617は、根拠段落を1つ抽出する操作を1時刻と定義し、状態zを抽出モデルのRNNによって生成する。すなわち、根拠抽出部617は、時刻t-1に抽出された根拠段落に対応するベクトルの系列Hの要素
Figure JPOXMLDOC01-appb-I000046

を抽出モデルのRNNに入力することにより、状態zを生成する。ただし、st-1は時刻t-1に抽出された根拠段落の添字である。また、時刻tまでに抽出された段落sの集合をSとする。
 根拠抽出部617は、状態zと、質問文の各単語の意味を表すベクトル系列U’に基づいて、抽出モデルにより、時刻tにおける重要性を考慮した質問文ベクトルであるglimpseベクトルe(上記式(13))を、質問文Qに対するglimpse操作(上記参考文献5)を行うことで生成する。なお、上記式(13)におけるベクトルyに、ベクトル系列U’のj番目のベクトルを代入して計算する。また、上記式(11)~式(13)におけるv、Wg1、及びWg2と、上記式(14)におけるv、Wp1、Wp2、及びWp3とは、抽出モデルのパラメータであり、パラメータ学習部700により更新される。また、上記式(14)におけるhは、ベクトルの系列Hのj番目のベクトルである。
 このように、抽出モデルでは質問文Qに対するglimpse操作を行うことで、根拠段落の抽出結果が質問全体に対応する内容を包含することができる。
 抽出モデルのRNNの初期値はベクトルの系列Hをaffine変換したベクトル系列をmaxpoolingしたベクトルとする。
 根拠抽出部617は、状態zと、glimpseベクトルeと、ベクトルの系列Hとに基づいて、抽出モデルにより、時刻tにおいて上記式(14)で表される確率分布に従って第δ段落を選び、段落s=δを、時刻tに抽出された根拠段落とする。ただし、上記式(14)における値u は、ベクトル系列U’とは別の値である。
 そして、根拠抽出部617は、抽出した段落sの集合Sを根拠情報として、根拠探索部216及びパラメータ学習部700に渡す。
 根拠探索部216は、符号化部910の出力するn個のベクトル系列Uのうち、学習データ中の正解となる根拠情報(段落)に対応するベクトル系列Uに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 具体的には、根拠探索部216は、回答の根拠となる範囲の始端sを推定するための始端用の深層学習モデル及び終端sを推定するための終端用の深層学習モデルの2つのニューラルネットワークによって構成される。この深層学習モデルは、例えば、線形変換層又は多層線形変換層などを含む。
 根拠探索部216は、まず、正解となる根拠情報(段落)に対応するベクトル系列Uを、始端用の深層学習モデルに入力して、回答の根拠となる範囲である回答範囲の始端に関するスコアを、正解となる根拠情報(段落)中の各単語について計算する。
 また、根拠探索部216は、正解となる根拠情報(段落)に対応するベクトル系列Uを、終端用の深層学習モデルに入力して、回答の根拠となる範囲である回答範囲の終端に関するスコアを、正解となる根拠情報(段落)中の各単語について計算する。
 正解となる根拠情報(段落)中の各単語について計算した始端に関するスコア及び終端に関するスコアをまとめて回答範囲スコアと呼ぶ。なお、始端用の深層学習モデル及び終端用の深層学習モデルのパラメータは、パラメータ学習部700により更新される。
 そして、根拠探索部216は、計算した回答範囲スコアを、パラメータ学習部700に渡す。
 なお、根拠探索部216の内部の処理やニューラルネットワークの構成については、上記第2の実施形態の根拠探索部216と同様のものを用いてもよい。
 判断部220は、符号化部910の処理によって得られる情報に基づいて、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 具体的には、判断部220は、入力変換部221と、スコア計算部222とを備えて構成される。
 入力変換部221は、符号化部910が出力するn個の固定長ベクトルVのうち、学習データの正解の根拠情報(段落)に対応する固定長ベクトルVを抽出し、抽出した固定長ベクトルVを、スコア計算部222に渡す。
 スコア計算部222は、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 具体的には、スコア計算部222は、正解の根拠情報(段落)に対応する固定長ベクトルVに基づいて、線形変換層又は多層線形変換層などを含む深層学習モデルである判断モデルを用いて、Yes、No、及び抽出型の回答の何れかで答えるかの判断結果を表す判断スコアを計算する。ここで計算される判断スコアは、3次元のベクトルである。
 なお、判断部220の内部の処理やニューラルネットワークの構成については、上記第1の実施形態の判断部220と同様のものを用いてもよい。例えば、Yes、No、又は抽出型の3つに分類するように構成して、上記第1の実施形態の判断部220と同様の処理を行うようにしてもよい。
 そして、スコア計算部222は、判断スコアを、パラメータ学習部700に渡す。
 パラメータ学習部700は、学習データに含まれる正解Y^と、判断部220により判断された結果とが一致し、学習データに含まれる始端D^及び終端E^と、根拠探索部216により推定された始端s及び終端sとが一致し、学習データに含まれる文章Pにおける正解の根拠情報と、根拠抽出部617により抽出された根拠情報とが一致するように、読解モデル、判断モデル及び抽出モデルのパラメータを学習する。
 具体的には、文章Pと、質問Qと、YES、NO、及び抽出型の何れかである正解となる回答Y^、回答Yの正解となる根拠範囲である始端D^及び終端E^と、回答Yの正解となる根拠情報である根拠段落の集合S^とを1セットとし、学習データが、複数セット含むものとする。
 ここで、正解となる回答Y^は、回答種別がYES、NO、抽出型のいずれであるかを示す情報とする。正解となる根拠情報とは、回答種別を判断する、又は根拠範囲を抽出する際の根拠となるスパンとしての段落の集合であり、文章Pに含まれる全段落の部分集合である。回答種別が極性であるYES又はNOである場合、根拠情報はYES又はNOの判断の根拠となる段落からなる集合である。回答種別が抽出型の場合、根拠情報は、真の回答範囲を含む段落からなる集合である。
 なお、回答学習装置50の他の構成及び作用については、第2の実施形態と同様であるため、説明を省略する。
<第3の実施形態に係る回答生成装置の構成>
 図13を参照して、本開示の第3の実施形態に係る回答生成装置60の構成について説明する。図13は、本開示の第3の実施形態に係る回答生成装置60の構成を示すブロック図である。なお、上述の第3の実施形態に係る回答学習装置50と同様の構成については、同一の符号を付して詳細な説明は省略する。
 回答生成装置60は、CPUと、RAMと、上記図9に示した回答生成処理ルーチンと同様の処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。図13に示すように、本実施形態に係る回答生成装置60は、入力部400と、解析部900と、出力部800とを備えて構成される。
 解析部900は、符号化部910と、根拠抽出部617と、根拠探索部216と、判断部220とを備えて構成される。
 根拠抽出部617は、符号化部910の処理によって得られる情報に基づいて、質問文に対する回答の根拠となる情報である根拠情報を抽出する抽出モデルを用いて、質問文Qに対する回答の根拠情報を抽出すると共に、文章Pのスパンである各段落について根拠スコアを算出する。
 具体的には、根拠抽出部617は、根拠スコアを算出する際に、状態zと、glimpseベクトルeと、ベクトルの系列Hとに基づいて、抽出モデルを用いて、文章Pの各段落について、当該段落が回答を抽出する根拠に適している度合いを示す根拠スコアを算出する。
 例えば、時刻tにおいて段落δについて上記(14)式に従って値P(δ;S(t-1))を計算し、この値をスコアA(δ)とする。そして、段落δの根拠スコアを、max A(δ)又はsum A(δ)で定義する。
 なお、根拠スコアは、スパンが段落でなく文であった場合も、同様の処理で計算することができる。その場合、根拠スコアは、その文が回答を抽出する根拠に適している度合いを示すスコアを表す。
 根拠抽出部617は、抽出した根拠情報と、各段落についての根拠スコアとを、出力部800に渡すと共に、抽出した根拠情報を、根拠探索部216及び入力変換部221に渡す。
 根拠探索部216は、符号化部910の出力するn個のベクトル系列Uのうち、根拠抽出部617が根拠情報として抽出した段落に対応するベクトル系列Uに基づいて、文章Pにおける回答の根拠となる範囲D:Eを推定するための読解モデルを用いて、当該範囲の始端s及び終端sを推定する。
 入力変換部221は、符号化部910が出力するn個の固定長ベクトルVのうち、根拠抽出部617が根拠情報として抽出した段落に対応する固定長ベクトルVを抽出し、抽出した固定長ベクトルVを、スコア計算部222に渡す。
 スコア計算部222は、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断する。
 具体的には、スコア計算部222は、根拠抽出部617が根拠情報として抽出した段落に対応する固定長ベクトルVに基づいて、線形変換層又は多層線形変換層などを含む深層学習モデルである判断モデルを用いて、Yes、No、及び抽出型の回答の何れかで答えるかの判断結果を表す判断スコアを計算する。
 出力部800は、根拠抽出部617によって抽出した段落の集合Stと、各段落の根拠スコアと、判断部220によって出力された、Yes/No/抽出型の3種の判断結果を示す判断スコアと、根拠探索部216によって得られた、各単語の回答始端スコア及び回答終端スコアを入力とする。
 また、回答生成装置60に入力する時点で、文章を構成する各段落にスコアが与えられている場合、そのスコアを検索スコアとして出力部800に入力することができる。例えばWikipedia(R)全体から、当該段落を一般的な検索によって絞り込む際に、検索手法が出力するスコアを、検索スコアとして用いてもよい。
 出力部800は、根拠抽出部617が根拠情報として抽出した段落の任意の単語列に対して、当該単語列の始端の回答始端スコア及び当該区間の終端の回答終端スコアの積又は和で、回答単語列スコアを計算する。回答単語列スコアは、その単語列が回答または回答の根拠であることを示すスコアである。
 この回答単語列スコアの計算によって、回答種別の判断結果が「抽出型」の場合、文章中の任意の単語列、つまり抽出型の回答として考えうる全ての候補に対して、回答単語列スコアが与えられる。候補数は、根拠抽出部617が抽出した根拠段落の単語数をLとすると、L個から2個を選ぶ重複組み合わせ通りである。
 また、出力部800は、以下の式に従って、根拠抽出部617が抽出した根拠段落、回答種別の判断結果、及び回答単語列の全ての組み合わせに対して読解スコアを計算する。
読解スコア=(検索スコア×検索スコア重み)+(根拠スコア×根拠スコア重み)+(回答単語列スコア×回答単語列スコア重み)+(判断スコア×判断スコア重み)
 ただし、各スコア重みはユーザーが決定できる数値であり、例えばすべて1である。検索スコアの項は検索スコアが与えられている場合のみ用いる。
 出力部800は、読解スコア、根拠段落、判断結果、及び回答単語列の組み合わせを、読解スコアが高い順に出力する。出力する個数は、事前に指定された個数や読解スコアの閾値で決定する。
 なお、回答生成装置60の他の構成及び作用については、第2の実施形態と同様であるため、説明を省略する。
 以上説明したように、第3の実施形態の回答生成装置によれば、根拠探索部及び判断部が、根拠抽出部が抽出した根拠情報に基づいて処理を行うため、より明示的に根拠情報に基づいた処理が可能になり、精度良く回答することができる。また、段落毎に根拠スコアを算出して可視化することができ、ユーザーがより解釈しやすい形で回答を出力することができる。
 また、根拠情報として根拠段落を抽出するため、回答学習装置に入力する教師データの作成が容易になるとと共に、精度よく回答の極性を推定できるモデルを学習することができる。
 なお、本開示は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 上述の実施形態では、機械読解部210により文章Pを符号化した結果と、機械読解部210により質問文Qを符号化した結果とに基づいて、ベクトルの系列P及びQを生成したが、機械読解部210により推定された回答の根拠となる範囲の始端s及び終端sの少なくとも一方、又は文章Pと質問文Qとの関係性を表すアテンション行列Aを更に入力として、質問文Qに対する回答の極性が正か否かを判断する判断モデルを用いて、質問文Qに対する回答の極性を判断してもよい。
 この場合、第2文脈符号化部215は、変換した読解行列Mを、根拠探索部216は、推定した回答範囲スコアを、それぞれ入力変換部221に渡す。
 例えば、入力変換部221は、ベクトルの系列Pの計算方法として、下記式(17)や、式(18)を用いることができる。
Figure JPOXMLDOC01-appb-M000047
 ただし,Linear()は線形変換を示す。
 また、例えば、入力変換部221は、ベクトルの系列Qの計算方法として、下記式(19)を用いることができる。
Figure JPOXMLDOC01-appb-M000048
 同様の操作をアテンション行列A、ベクトルの系列Pに対して行い、得られたベクトル系列を、ベクトルの系列Qとしてもよく、得られたベクトル系列にベクトルの系列Qを結合したものとしてもよい。
 このようなバリエーションによって、入力変換部221で必要な変数が決定する。
 また、タスク特有の問題に対処するため、スコア計算部222は、文ペア分類タスクの既存フレームワークに工夫を加えたものを用いることができる。
 例えば、上記ESIMのフレームワークを用いた場合に、以下の工夫を用いることができる。
<<工夫1>>
 文章Pが文ではなく、文章であるので、文ペア分類タスクに比べて系列の長さLが大きくなってしまう。この問題に対処するため、max pooling、average poolingをより長い系列向きの手法に置き換える。
 具体的には、ベクトルの系列Qを、LSTMに入力したときのLSTMの出力の最終状態を使う手法や、attentive pooling(列方向の重み付き平均を取る操作であり、重みとしてベクトルの系列Pの線形変換や推定した始端s、終端s等を用いる)に置き換えることができる。
<<工夫2>>
 文ペア分類タスクに比べて、上記実施形態の分類対象となるベクトルの系列Pは、文章Pの情報だけでなく、質問文Qの情報も豊富に含んでいる傾向がある。そのため、スコア計算部222においてベクトルの系列Qを用いず、ベクトルの系列Pのみを用いてベクトルJを求めてもよい。
 この場合、入力変換部221が受け付ける情報は、(1)読解行列Bのみとすることができる。また、ベクトルの系列Pへの変換は、上記式(6)を用いる。このとき、Jの定義は、
Figure JPOXMLDOC01-appb-I000049

である。
 また、回答学習装置10は、入力された質問文Qが、「Yes又はNoで答えることができる質問」なのか否かを判定する質問判定部を更に備える構成としてもよい。
 質問判定部の判定方法については、ルールベースや、機械学習による判定など、従来手法を用いればよい。この場合、質問判定部の判定の結果、「Yes又はNoで答えることができる質問ではない」と判定された時には、判断部220からの出力(Yes/No)を行わない、すなわち、機械読解部210からの出力のみを行うように構成することもできる。
 このように、質問判定部を備えることにより、判断部220の出力がYes/Noの2値の場合、YesかNoかで答えることが不適切な場合に、YesかNoかで答えてしまう事を防ぐことができる。また、学習データからYesかNoかで答えることが不適切な質問を除外でき、より適切な学習を行うことができる。
 また、判断部220の出力がYes/No/不明の3値である場合、「不明」となった場合の意味合いが、より明確となる。質問判定部を備えていない場合、「不明」の意味は、「Yes又はNoで答えることが不適切な質問である」、又は「(文章Pに回答の根拠となる記載がない等の理由で)分からない」の2つが混在してしまうが、質問判定部による判定を行えば、「不明」の意味は後者に絞ることができる。
 また、当該質問判定部は、回答生成装置20に備えることもできる。回答生成装置20は、質問判定部を備えることにより、判断部220の出力がYes/Noの2値の場合、YesかNoかで答えることが不適切な場合に、YesかNoかで答えてしまう事を防ぐことができる。
 また、本実施形態は、回答が、Yes/Noの何れであるかを判断する判断モデルを用いる場合を例に説明したが、これに限定されるものではなく、判断モデルが、回答が、Yes/No/抽出型の回答の何れかであるかを判断し、抽出型の回答である場合に、出力部が、抽出型の回答として、根拠抽出部617により出力された根拠文、又は根拠探索部216により出力された回答の根拠の範囲を出力してもよい。
 また、上述の実施形態では、回答の極性を、Yes又はNoである場合を例に説明したが、これに限定されるものではなく、回答の極性を、例えば、OK又はNGとしてもよい。
 また、第3の実施形態の回答生成装置60において、根拠抽出部617は、根拠情報を根拠探索部216へ渡さないようにしてもよい。この場合には、根拠探索部216が、根拠情報を用いずに、文章Pにおける回答の根拠となる範囲の始端及び終端を推定する。具体的には、根拠探索部216は、符号化部910の出力するn個のベクトル系列Uをそのまま用いて、文章Pにおける回答の根拠となる範囲の始端及び終端を推定するようにすればよい。
 また、第3の実施形態の回答生成装置60において、根拠抽出部617から、根拠情報を判断部220の入力変換部221へ渡さないようにしてもよい。この場合には、入力変換部221は、符号化部910が出力するn個の固定長ベクトルVをそのままスコア計算部222に渡す。また、スコア計算部222は、n個の固定長ベクトルVに基づいて、判断スコアを計算するようにすればよい。
 上記のように、根拠探索部216及び判断部220が、根拠抽出部617が抽出した根拠情報を用いない場合であっても、回答学習装置50では、根拠抽出部617、根拠探索部216、判断部220のそれぞれのタスクに関してマルチタスク学習を行っているため、根拠情報を参考にした、根拠となる範囲の推定や判断スコアの計算が、実現される。
 また、本願明細書中において、プログラムが予めインストールされている実施形態として説明したが、当該プログラムを、コンピュータ読み取り可能な記録媒体に格納して提供することも可能である。
 以上の実施形態に関し、更に以下の付記を開示する。
 (付記項1)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、
 前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、
 前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する、
 回答生成装置。
 (付記項2)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する、
 回答生成装置であって、
 前記符号化モデル及び前記抽出モデルは、
 前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び
 前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデル
 を更に含む複数のモデルのマルチタスク学習により予め学習されたものである
 回答生成装置。
 (付記項3)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 文章の分割単位である複数のスパンに分割された文章と、質問文と、前記文章における前記質問文に対する回答の正解である回答種別と、前記文章における前記回答の根拠となる範囲である根拠範囲と、前記文章における前記回答の根拠となるスパンである根拠情報とを含む学習データの入力を受け付け、
 複数のスパンに分割した前記文章と、前記質問文とを、入力文を入力文の意味を表すベクトル表現系列に変換するための符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記根拠情報を抽出する抽出モデルを用いて、前記根拠情報を推定し、
 前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記根拠範囲を抽出する探索モデルを用いて、前記根拠範囲を推定し、
 前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記質問文に対する回答種別を判断する判断モデルを用いて、前記質問文に対する回答種別を判断し、
 前記抽出された前記根拠情報が前記学習データの前記根拠情報と一致し、前記推定された前記根拠範囲が前記学習データの前記根拠範囲と一致し、前記判断された前記回答種別が前記学習データの前記回答種別と一致するように、前記符号化モデル、前記抽出モデル、前記探索モデル、及び前記判断モデルのパラメータを学習する、
 回答学習装置。
 (付記項4)
 回答生成処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体であって、
 前記回答生成処理は、
 入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、
 前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、
 前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する、
 非一時的記憶媒体。
 (付記項5)
 回答生成処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体であって、
 前記回答生成処理は、
 入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記スパンが前記回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定し、
 前記符号化モデル及び前記抽出モデルは、
 前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び
 前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデル
 を更に含む複数のモデルのマルチタスク学習により予め学習されたものである、
 非一時的記憶媒体。
 (付記項6)
 回答学習処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体であって、
 前記回答学習処理は、
 文章の分割単位である複数のスパンに分割された文章と、質問文と、前記文章における前記質問文に対する回答の正解である回答種別と、前記文章における前記回答の根拠となる範囲である根拠範囲と、前記文章における前記回答の根拠となるスパンである根拠情報とを含む学習データの入力を受け付け、
 複数のスパンに分割した前記文章と、前記質問文とを、入力文を入力文の意味を表すベクトル表現系列に変換するための符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
 前記ベクトル表現系列に基づいて、前記根拠情報を抽出する抽出モデルを用いて、前記根拠情報を推定し、
 前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記根拠範囲を抽出する探索モデルを用いて、前記根拠範囲を推定し、
 前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記質問文に対する回答種別を判断する判断モデルを用いて、前記質問文に対する回答種別を判断し、
 前記抽出された前記根拠情報が前記学習データの前記根拠情報と一致し、前記推定された前記根拠範囲が前記学習データの前記根拠範囲と一致し、前記判断された前記回答種別が前記学習データの前記回答種別と一致するように、前記符号化モデル、前記抽出モデル、前記探索モデル、及び前記判断モデルのパラメータを学習する、
 非一時的記憶媒体。
10、30、50     回答学習装置
20、40、60     回答生成装置
100 入力部
200、600、900      解析部
210、610       機械読解部
211 単語符号化部
213 第1文脈符号化部
214 アテンション部
215 第2文脈符号化部
216 根拠探索部
220 判断部
221 入力変換部
222 スコア計算部
300、700       パラメータ学習部
400 入力部
500、800       出力部
617 根拠抽出部
910 符号化部

Claims (8)

  1.  入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、
     前記ベクトル表現系列に基づいて、前記質問文に対する回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定する根拠抽出部と、
     前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定する根拠探索部と、
     前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する判断部と、
     を備えることを特徴とする回答生成装置。
  2.  前記回答種別は、前記質問文に対する回答の極性、又は前記文章から回答を抽出することであり、
     前記判断部が判断した前記回答種別が、前記文章から回答を抽出することである場合、前記根拠探索部により得られた前記根拠範囲に含まれる文字列を、前記質問文に対する回答として出力する出力部
     を更に備えることを特徴とする請求項1記載の回答生成装置。
  3.  入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、
     前記ベクトル表現系列に基づいて、前記スパンが前記質問文に対する回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する根拠抽出部と、
     を備え、
     前記符号化モデル及び前記抽出モデルは、
     前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び
     前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデル
     を更に含む複数のモデルのマルチタスク学習により予め学習されたものである
     ことを特徴とする回答生成装置。
  4.  文章の分割単位である複数のスパンに分割された文章と、質問文と、前記文章における前記質問文に対する回答の正解である回答種別と、前記文章における前記回答の根拠となる範囲である根拠範囲と、前記文章における前記回答の根拠となるスパンである根拠情報とを含む学習データの入力を受け付ける入力部と、
     複数のスパンに分割した前記文章と、前記質問文とを、入力文を入力文の意味を表すベクトル表現系列に変換するための符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換する符号化部と、
     前記ベクトル表現系列に基づいて、前記根拠情報を抽出する抽出モデルを用いて、前記根拠情報を推定する根拠抽出部と、
     前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記根拠範囲を抽出する探索モデルを用いて、前記根拠範囲を推定する根拠探索部と、
     前記ベクトル表現系列と、前記学習データの前記根拠情報とに基づいて、前記質問文に対する回答種別を判断する判断モデルを用いて、前記質問文に対する回答種別を判断する判断部と、
     前記根拠抽出部により抽出された前記根拠情報が前記学習データの前記根拠情報と一致し、前記根拠探索部により推定された前記根拠範囲が前記学習データの前記根拠範囲と一致し、前記判断部により判断された前記回答種別が前記学習データの前記回答種別と一致するように、前記符号化モデル、前記抽出モデル、前記探索モデル、及び前記判断モデルのパラメータを学習するパラメータ学習部と、
     を備えることを特徴とする回答学習装置。
  5.  符号化部が、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
     根拠抽出部が、前記ベクトル表現系列に基づいて、前記質問文に対する回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、
     根拠探索部が、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、
     判断部が、前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する
     ことを特徴とする回答生成方法。
  6.  符号化部が、入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
     根拠抽出部が、前記ベクトル表現系列に基づいて、前記スパンが前記質問文に対する回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する
     回答生成方法であって、
     前記符号化モデル及び前記抽出モデルは、
     前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び
     前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデル
     を更に含む複数のモデルのマルチタスク学習により予め学習されたものである
     ことを特徴とする回答生成方法。
  7.  入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
     前記ベクトル表現系列に基づいて、前記質問文に対する回答を抽出する根拠に適しているスパンを抽出する予め学習された抽出モデルを用いて、前記回答を抽出する根拠に適しているスパンである根拠情報を推定し、
     前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する予め学習された探索モデルを用いて、前記根拠範囲を推定し、
     前記ベクトル表現系列と、前記根拠情報とに基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する予め学習された判断モデルを用いて、前記質問文に対する回答種別を判断する
     処理をコンピュータに実行させるための回答生成プログラム。
  8.  入力された、文章の分割単位である複数のスパンに分割された文章及び質問文に基づいて、入力文を入力文の意味を表すベクトル表現系列に変換するための予め学習された符号化モデルを用いて、前記スパン及び前記質問文の意味を表すベクトル表現系列に変換し、
     前記ベクトル表現系列に基づいて、前記スパンが前記質問文に対する回答を抽出する根拠に適している度合いを示す根拠スコアを算出するための予め学習された抽出モデルを用いて、前記スパンの各々の根拠スコアを推定する
     処理をコンピュータに実行させるための回答生成プログラムであって、
     前記符号化モデル及び前記抽出モデルは、
     前記符号化モデルを用いて変換された前記ベクトル表現系列に基づいて、前記文章における前記回答の根拠となる範囲である根拠範囲を抽出する探索モデル、及び
     前記ベクトル表現系列に基づいて、前記文章における前記質問文に対する回答の正解である回答種別を判断する判断モデル
     を更に含む複数のモデルのマルチタスク学習により予め学習されたものである
     回答生成プログラム。
PCT/JP2019/049385 2019-02-25 2019-12-17 回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム WO2020174826A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/433,096 US20220043972A1 (en) 2019-02-25 2019-12-17 Answer generating device, answer learning device, answer generating method, and answer generating program
JP2021501617A JP7120433B2 (ja) 2019-02-25 2019-12-17 回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019032127A JP2019220142A (ja) 2018-06-18 2019-02-25 回答学習装置、回答学習方法、回答生成装置、回答生成方法、及びプログラム
JP2019-032127 2019-02-25

Publications (1)

Publication Number Publication Date
WO2020174826A1 true WO2020174826A1 (ja) 2020-09-03

Family

ID=72265353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/049385 WO2020174826A1 (ja) 2019-02-25 2019-12-17 回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム

Country Status (3)

Country Link
US (1) US20220043972A1 (ja)
JP (1) JP7120433B2 (ja)
WO (1) WO2020174826A1 (ja)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288058A (zh) * 2020-11-05 2021-01-29 杭州师范大学 一种基于增强现实的答案智能填写方法
CN112686263A (zh) * 2020-12-29 2021-04-20 科大讯飞股份有限公司 文字识别方法、装置、电子设备及存储介质
CN112860863A (zh) * 2021-01-30 2021-05-28 云知声智能科技股份有限公司 一种机器阅读理解方法及装置
CN112863627A (zh) * 2021-03-12 2021-05-28 云知声智能科技股份有限公司 医疗质控信息检测方法、系统以及存储介质
CN113159187A (zh) * 2021-04-23 2021-07-23 北京金山数字娱乐科技有限公司 分类模型训练方法及装置、目标文本确定方法及装置
CN113282722A (zh) * 2021-05-07 2021-08-20 中国科学院深圳先进技术研究院 机器阅读理解方法、电子设备及存储介质
CN113434657A (zh) * 2021-07-21 2021-09-24 广州华多网络科技有限公司 电商客服应答方法及其相应的装置、设备、介质
JP2021152963A (ja) * 2020-12-25 2021-09-30 北京百度網訊科技有限公司 語義特徴の生成方法、モデルトレーニング方法、装置、機器、媒体及びプログラム
CN113704437A (zh) * 2021-09-03 2021-11-26 重庆邮电大学 一种融合多头注意力机制和相对位置编码的知识库问答方法
CN113821600A (zh) * 2021-09-26 2021-12-21 欧冶云商股份有限公司 基于语义理解的加工委托信息提取方法和装置
JP2022047529A (ja) * 2020-09-11 2022-03-24 アクタピオ,インコーポレイテッド 学習装置、学習方法および学習プログラム
KR102379660B1 (ko) * 2020-11-30 2022-03-29 주식회사 티맥스에이아이 딥러닝 기반 의미역 분석을 활용하는 방법
CN114372458A (zh) * 2022-01-20 2022-04-19 北京零点远景网络科技有限公司 一种基于政务工单的突发事件检测方法
WO2022078348A1 (zh) * 2020-10-14 2022-04-21 深圳壹账通智能科技有限公司 邮件内容提取方法、装置、电子设备及存储介质
WO2022079826A1 (ja) * 2020-10-14 2022-04-21 日本電信電話株式会社 学習装置、情報処理装置、学習方法、情報処理方法及びプログラム
CN114970563A (zh) * 2022-07-28 2022-08-30 山东大学 融合内容和形式多样性的中文问题生成方法和系统
JP2022126428A (ja) * 2021-02-18 2022-08-30 ヤフー株式会社 情報提供装置、情報提供方法および情報提供プログラム
WO2024074100A1 (zh) * 2022-10-04 2024-04-11 阿里巴巴达摩院(杭州)科技有限公司 自然语言处理、模型训练方法、装置、设备及存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019220142A (ja) * 2018-06-18 2019-12-26 日本電信電話株式会社 回答学習装置、回答学習方法、回答生成装置、回答生成方法、及びプログラム
US20210383199A1 (en) * 2020-06-03 2021-12-09 Google Llc Object-Centric Learning with Slot Attention
US11755570B2 (en) * 2020-12-09 2023-09-12 Adobe, Inc. Memory-based neural network for question answering
CN112966499A (zh) * 2021-03-17 2021-06-15 中山大学 一种基于自适应融合多注意力网络的问题和答案匹配方法
CN115168548B (zh) * 2022-09-05 2022-11-22 吉奥时空信息技术股份有限公司 一种基于召回-排序的地址匹配方法
CN115563283B (zh) * 2022-10-20 2023-04-25 北京大学 一种基于提示学习的文本分类方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008282366A (ja) * 2007-05-14 2008-11-20 Nippon Telegr & Teleph Corp <Ntt> 質問応答装置、質問応答方法、質問応答プログラム並びにそのプログラムを記録した記録媒体
JP2013254420A (ja) * 2012-06-08 2013-12-19 Nippon Telegr & Teleph Corp <Ntt> 質問応答装置、モデル学習装置、方法、及びプログラム
JP2015011426A (ja) * 2013-06-27 2015-01-19 独立行政法人情報通信研究機構 ノン・ファクトイド型質問応答システム及びコンピュータプログラム
JP2018060273A (ja) * 2016-10-03 2018-04-12 エヌ・ティ・ティ レゾナント株式会社 情報処理装置、情報処理方法、及びプログラム
WO2019012908A1 (ja) * 2017-07-13 2019-01-17 国立研究開発法人情報通信研究機構 ノン・ファクトイド型質問応答装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8666983B2 (en) * 2003-06-13 2014-03-04 Microsoft Corporation Architecture for generating responses to search engine queries
US10762438B1 (en) * 2016-06-30 2020-09-01 Facebook, Inc. Extracting questions and answers
US10726206B2 (en) * 2018-01-30 2020-07-28 Disney Enterprises, Inc. Visual reference resolution using attention memory for visual dialog
US11227218B2 (en) * 2018-02-22 2022-01-18 Salesforce.Com, Inc. Question answering from minimal context over documents

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008282366A (ja) * 2007-05-14 2008-11-20 Nippon Telegr & Teleph Corp <Ntt> 質問応答装置、質問応答方法、質問応答プログラム並びにそのプログラムを記録した記録媒体
JP2013254420A (ja) * 2012-06-08 2013-12-19 Nippon Telegr & Teleph Corp <Ntt> 質問応答装置、モデル学習装置、方法、及びプログラム
JP2015011426A (ja) * 2013-06-27 2015-01-19 独立行政法人情報通信研究機構 ノン・ファクトイド型質問応答システム及びコンピュータプログラム
JP2018060273A (ja) * 2016-10-03 2018-04-12 エヌ・ティ・ティ レゾナント株式会社 情報処理装置、情報処理方法、及びプログラム
WO2019012908A1 (ja) * 2017-07-13 2019-01-17 国立研究開発法人情報通信研究機構 ノン・ファクトイド型質問応答装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MAEDA, EISAKU ET AL.: "Question and Answer System: SAIQA", EXPERTS THAT CAN ANSWER ANYTHING, vol. 52, no. 2, 10 February 2003 (2003-02-10), pages 122 - 133 *

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7420775B2 (ja) 2020-09-11 2024-01-23 アクタピオ,インコーポレイテッド 学習装置、学習方法および学習プログラム
JP2022047529A (ja) * 2020-09-11 2022-03-24 アクタピオ,インコーポレイテッド 学習装置、学習方法および学習プログラム
WO2022079826A1 (ja) * 2020-10-14 2022-04-21 日本電信電話株式会社 学習装置、情報処理装置、学習方法、情報処理方法及びプログラム
WO2022078348A1 (zh) * 2020-10-14 2022-04-21 深圳壹账通智能科技有限公司 邮件内容提取方法、装置、电子设备及存储介质
CN112288058A (zh) * 2020-11-05 2021-01-29 杭州师范大学 一种基于增强现实的答案智能填写方法
KR102379660B1 (ko) * 2020-11-30 2022-03-29 주식회사 티맥스에이아이 딥러닝 기반 의미역 분석을 활용하는 방법
JP2021152963A (ja) * 2020-12-25 2021-09-30 北京百度網訊科技有限公司 語義特徴の生成方法、モデルトレーニング方法、装置、機器、媒体及びプログラム
CN112686263B (zh) * 2020-12-29 2024-04-16 科大讯飞股份有限公司 文字识别方法、装置、电子设备及存储介质
CN112686263A (zh) * 2020-12-29 2021-04-20 科大讯飞股份有限公司 文字识别方法、装置、电子设备及存储介质
CN112860863A (zh) * 2021-01-30 2021-05-28 云知声智能科技股份有限公司 一种机器阅读理解方法及装置
JP7410066B2 (ja) 2021-02-18 2024-01-09 Lineヤフー株式会社 情報提供装置、情報提供方法および情報提供プログラム
JP2022126428A (ja) * 2021-02-18 2022-08-30 ヤフー株式会社 情報提供装置、情報提供方法および情報提供プログラム
CN112863627A (zh) * 2021-03-12 2021-05-28 云知声智能科技股份有限公司 医疗质控信息检测方法、系统以及存储介质
CN112863627B (zh) * 2021-03-12 2023-11-03 云知声智能科技股份有限公司 医疗质控信息检测方法、系统以及存储介质
CN113159187A (zh) * 2021-04-23 2021-07-23 北京金山数字娱乐科技有限公司 分类模型训练方法及装置、目标文本确定方法及装置
CN113282722B (zh) * 2021-05-07 2024-03-29 中国科学院深圳先进技术研究院 机器阅读理解方法、电子设备及存储介质
CN113282722A (zh) * 2021-05-07 2021-08-20 中国科学院深圳先进技术研究院 机器阅读理解方法、电子设备及存储介质
CN113434657A (zh) * 2021-07-21 2021-09-24 广州华多网络科技有限公司 电商客服应答方法及其相应的装置、设备、介质
CN113704437B (zh) * 2021-09-03 2023-08-11 重庆邮电大学 一种融合多头注意力机制和相对位置编码的知识库问答方法
CN113704437A (zh) * 2021-09-03 2021-11-26 重庆邮电大学 一种融合多头注意力机制和相对位置编码的知识库问答方法
CN113821600B (zh) * 2021-09-26 2023-12-19 欧冶云商股份有限公司 基于语义理解的加工委托信息提取方法和装置
CN113821600A (zh) * 2021-09-26 2021-12-21 欧冶云商股份有限公司 基于语义理解的加工委托信息提取方法和装置
CN114372458B (zh) * 2022-01-20 2023-04-07 北京零点远景网络科技有限公司 一种基于政务工单的突发事件检测方法
CN114372458A (zh) * 2022-01-20 2022-04-19 北京零点远景网络科技有限公司 一种基于政务工单的突发事件检测方法
CN114970563A (zh) * 2022-07-28 2022-08-30 山东大学 融合内容和形式多样性的中文问题生成方法和系统
WO2024074100A1 (zh) * 2022-10-04 2024-04-11 阿里巴巴达摩院(杭州)科技有限公司 自然语言处理、模型训练方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US20220043972A1 (en) 2022-02-10
JP7120433B2 (ja) 2022-08-17
JPWO2020174826A1 (ja) 2021-11-25

Similar Documents

Publication Publication Date Title
WO2020174826A1 (ja) 回答生成装置、回答学習装置、回答生成方法、及び回答生成プログラム
JP7247878B2 (ja) 回答学習装置、回答学習方法、回答生成装置、回答生成方法、及びプログラム
CN109033068B (zh) 基于注意力机制的用于阅读理解的方法、装置和电子设备
CN108959246B (zh) 基于改进的注意力机制的答案选择方法、装置和电子设备
CN108959396B (zh) 机器阅读模型训练方法及装置、问答方法及装置
Cho Natural language understanding with distributed representation
JP7139626B2 (ja) フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム
CN109766407B (zh) 数据处理方法和系统
CN109344242B (zh) 一种对话问答方法、装置、设备及存储介质
CN111046187A (zh) 基于对抗式注意力机制的一样本知识图谱关系学习方法及系统
KR102361616B1 (ko) 문맥 정보를 고려한 개체명 인식 방법 및 장치
JP6738769B2 (ja) 文ペア分類装置、文ペア分類学習装置、方法、及びプログラム
WO2019244803A1 (ja) 回答学習装置、回答学習方法、回答生成装置、回答生成方法、及びプログラム
CN111027292B (zh) 一种限定采样文本序列生成方法及其系统
CN113268609A (zh) 基于知识图谱的对话内容推荐方法、装置、设备及介质
Nagaraj et al. Kannada to English Machine Translation Using Deep Neural Network.
WO2019229931A1 (ja) 情報処理装置、制御方法、及びプログラム
Thomas et al. Chatbot using gated end-to-end memory networks
Farazi et al. Accuracy vs. complexity: a trade-off in visual question answering models
Wang et al. An end-to-end actor-critic-based neural coreference resolution system
CN114492451A (zh) 文本匹配方法、装置、电子设备及计算机可读存储介质
WO2021027257A1 (zh) 计算机执行的、利用神经网络进行语言处理的方法及装置
CN112560440A (zh) 一种基于深度学习的面向方面级情感分析的句法依赖方法
US20240037335A1 (en) Methods, systems, and media for bi-modal generation of natural languages and neural architectures
Yang et al. Common sense-based reasoning using external knowledge for question answering

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: 19917163

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021501617

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19917163

Country of ref document: EP

Kind code of ref document: A1