WO2019168189A1 - フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム - Google Patents

フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム Download PDF

Info

Publication number
WO2019168189A1
WO2019168189A1 PCT/JP2019/008245 JP2019008245W WO2019168189A1 WO 2019168189 A1 WO2019168189 A1 WO 2019168189A1 JP 2019008245 W JP2019008245 W JP 2019008245W WO 2019168189 A1 WO2019168189 A1 WO 2019168189A1
Authority
WO
WIPO (PCT)
Prior art keywords
phrase
relationship
label
vector
relation
Prior art date
Application number
PCT/JP2019/008245
Other languages
English (en)
French (fr)
Inventor
いつみ 斉藤
京介 西田
久子 浅野
準二 富田
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US16/977,049 priority Critical patent/US11568132B2/en
Publication of WO2019168189A1 publication Critical patent/WO2019168189A1/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/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/383Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • 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
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Definitions

  • the present invention relates to a phrase generation relationship estimation model learning device, a phrase generation device, a method, and a program.
  • Non-Patent Document 1 uses the corpus as an input, and acquires the triple as inter-relationship knowledge using the co-occurrence information of the predicate term structure and the distribution of inter-node relationships.
  • Non-Patent Document 2 uses a large amount of triplet data created by hand to learn a neural network and estimate a relation score.
  • Kenichi Otomo Tomohide Shibata, Ikuo Kurohashi, “Acquisition of knowledge of inter-relationships using co-occurrence information of predicate term structure and distribution of inter-node relations” (3 months)
  • Xiang Li Aynaz Taheri, Lifu Tu, Kevin Gimpel, "Commonsense Knowledge Base Completion", Proc. Of ACL, 2016.
  • the present invention has been made to solve the above problems, and generates a relationship estimation model capable of accurately estimating the relationship between phrases and a phrase having a relationship with an input phrase.
  • An object of the present invention is to provide a phrase generation relationship estimation model learning device, method, and program capable of simultaneously learning a phrase generation model capable of learning.
  • the phrase generation relationship estimation model learning device includes at least a combination of phrases and a connection expression indicating a relationship between phrases or a relationship label indicating a relationship represented by the connection expression.
  • a phrase generation model including a decoder that generates a phrase having the relationship represented by the connection expression or the relation label with respect to the phrase, and each phrase included in a combination of phrases converted using the encoder
  • the relation score is calculated from the vector and the vector representing the connection expression or the relation label.
  • the relationship estimation model which is configured to include a learning unit for learning.
  • the learning unit includes a combination of phrases and at least one of a connection expression indicating the relationship between phrases or a relationship label indicating the relationship represented by the connection expression.
  • a connection expression indicating the relationship between phrases or a relationship label indicating the relationship represented by the connection expression.
  • the phrase generation device includes an input unit that accepts a pair consisting of an input phrase and at least one of a connection expression or a relation label representing the relationship between phrases, and a phrase that is converted into a vector in advance.
  • the input phrase is converted into a vector, and the conversion is performed using a pre-learned decoder that generates a phrase having the relationship represented by the connection expression or the relation label with respect to the phrase.
  • a phrase generating unit that generates a phrase having a relationship represented by the connection expression or the relation label with respect to the input phrase from the input vector and the input connection expression or the relation label; and the encoder And a vector representing each phrase included in the phrase combination, and the connection representation Outputs the relation score from a triple consisting of the two pairs and the generated phrase using a previously learned relation estimation model that outputs a relation score from a vector representing the relation label And an estimation unit.
  • the input unit accepts a pair consisting of an input phrase and at least one of a connection expression or a relationship label representing the relationship between phrases
  • the phrase generation unit vectorizes the phrase.
  • a pre-learned decoder that converts the input phrase into a vector
  • a pre-learned encoder that converts the phrase into a vector and generates a phrase having a relationship represented by the connection representation or the relation label with respect to the phrase
  • an estimation unit A vector representing each phrase included in a combination of phrases, converted using the encoder, and the connection From the vector representing the current or the relationship label, the relationship score is output from the triple consisting of the two pairs and the generated phrase using a pre-learned relationship estimation model that outputs a relationship score.
  • the program according to the present invention is a program for causing a computer to function as each part of the phrase generation relationship estimation model learning device or the phrase generation device according to the above invention.
  • a phrase having a relationship with an input phrase is generated by learning a phrase generation model including a decoder that generates a phrase having the relationship represented by the connection expression or the relation label with respect to the phrase from the label.
  • generation model which can be learned can be learned is acquired.
  • a phrase is converted into a vector from a pair consisting of a phrase and at least one of the connection expression or the relationship label indicating the relationship represented by the connection expression.
  • a phrase having a relationship represented by the connection expression or the relation label is generated for the phrase from the encoder and the converted vector and a relation label indicating the relation represented by the connection expression or the connection expression.
  • connection expression is an expression that expresses the relationship in the sentence such as “So”
  • the relationship label is a label that expresses the relationship such as “reason” and “result”, and the meaning of the connection expression. It is an abstraction.
  • the label is a superordinate concept including a connection expression and a relation label, and is label data such as “so” and “reason”.
  • the input triplet is ⁇ text 1: raining, text 2: wet ground, label: result ⁇ , and the output is the relation score.
  • a triple of a phrase and a connection expression connecting between the phrases is extracted using a dependency structure. Then, using the extracted triples, a relationship estimation model that is a neural network model for estimating the relationship is learned.
  • the relationship estimation apparatus 100 stores a CPU, a RAM, a program for executing a relationship estimation processing routine described later, and various data. It can be composed of a computer including a ROM. Functionally, the relationship estimation apparatus 100 includes an input unit 10, a calculation unit 20, and an output unit 40 as shown in FIG.
  • the input unit 10 receives a triple ⁇ Phrase 1, Phrase 2, Label ⁇ consisting of two phrases (text) and a label which is a connection expression representing the relationship between them.
  • a triple ⁇ Phrase 1, Phrase 2, Label ⁇ consisting of two phrases (text) and a label which is a connection expression representing the relationship between them.
  • the connection expression itself is used as a label representing the relationship between two texts included in the triplet will be described as an example.
  • the calculation unit 20 includes an estimation unit 21 and a storage unit 22.
  • the storage unit 22 stores a relationship estimation model learned by a relationship estimation model learning device 150 described later.
  • a neural network is used for the relationship estimation model, and the learning method will be described in the relationship estimation model learning device 150. Any neural network may be used. Another machine learning may be used, but the neural network is more effective.
  • the estimation unit 21 estimates the relationship score for the input triple using the relationship estimation model stored in the storage unit 22 and outputs the relationship score from the output unit 40.
  • the relationship score is a numerical value indicating whether or not there is a relationship indicated by a label between two phrases in a triplet given as an input. For example, a value from 0 to 1 is taken, and the closer to 1, the closer the relationship is.
  • each of the three inputs ⁇ phrase 1, phrase 2, label ⁇ is converted into a vector.
  • the converted phrase 1 vector is h
  • the phrase 2 vector is t
  • the connection expression vector is r.
  • the conversion method may be anything as long as it is a technique for vectorizing phrases and words. In this embodiment, the technique of Non-Patent Document 3 is used.
  • Non-Patent Document 3 Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. In Proceedings of NIPS, 2013.
  • the estimation unit 21 outputs a relation score of 0.87 for the triplet ⁇ phrase 1: raining, phrase 2: the ground gets wet, label: so ⁇ .
  • the estimation unit 21 determines the output relation score with a predetermined threshold, and estimates whether the phrase 1 and the phrase 2 have a relation “result” indicated by “NO”. For example, if the relation score value is 0.6 and the threshold value is 0.4 mm, it is estimated that there is a relation because 0.6> 0.4. However, since threshold determination requires knowledge acquisition or a score drop to 0/1, depending on the application, the value of the relation score may be output as it is without performing threshold determination.
  • the relationship estimation model learning device 150 stores a CPU, a RAM, a program for executing a relationship estimation model learning processing routine to be described later, and various data. And a computer including a ROM. Functionally, the relationship estimation model learning device 150 includes an input unit 50, a calculation unit 60, and an output unit 90 as shown in FIG.
  • the input unit 50 accepts input text.
  • the calculation unit 60 includes a learning data generation unit 62 and a learning unit 63.
  • the learning data generation unit 62 includes a basic analysis unit 71, a phrase extraction unit 72, and a connection expression database 73.
  • the basic analysis unit 71 performs dependency analysis on the input text.
  • Fig. 6 shows an example of input text
  • Fig. 7 shows an example of dependency analysis results. Any dependency analysis may be used.
  • CaboCha which is a known morphological analyzer is used.
  • the phrase extraction unit 72 extracts a phrase from the dependency analysis result.
  • the phrase is assumed to have a subject and predicate in a dependency relationship as a minimum unit, and up to n other adjective clauses (n is an arbitrary natural number).
  • the basic unit is basically the combination of subject + verb, but the sa-variant noun verb may be used alone.
  • each character string before and after the connection expression may be extracted as a phrase without considering the dependency relationship. For example, if a sentence “aaaa [connection expression] bbbb” exists, “aaaa” and “bbbb” may be extracted as phrases.
  • [connection expression] represents a phrase including the connection expression
  • “aaaa” and “bbbb” represent phrases having a positional relationship before and after the phrase including the connection expression.
  • phrase extraction part 72 extracts the phrase which has a dependency relation with the clause in which the connection expression is included among the combinations of the said phrase, and produces the triple which consists of ⁇ phrase 1, phrase 2, connection expression ⁇ . .
  • connection expression used as a label in this embodiment is predetermined by an expression representing the relationship between phrases. For example, conjunctions such as “so”, “so”, “for”, “to”, “case”, “when”, “time”, “ba”, “from”, “ga” can be used as connection expressions.
  • a connection expression is registered in advance in the connection expression database 73 as shown in FIG.
  • N types of connection expressions there are N types of connection expressions, N types of labels are included in the final triplet.
  • extraction unit 72 there is a method of performing the following three processes after extraction, in addition to the method of extracting the triplet and outputting it as it is (extraction method 1) as described above. is there.
  • connection expression database 73 Using the connection expression database 73, the connection expression is converted into a relation label and ⁇ phrase 1, phrase 2, relation label ⁇ is output.
  • the triple that is input to the relationship estimation apparatus 100 is ⁇ phrase 1, phrase 2, relationship label ⁇ .
  • the triple that is input to the relationship estimation apparatus 100 is ⁇ phrase 1, phrase 2, relationship label ⁇ .
  • the triple that is input to the relationship estimation apparatus 100 is ⁇ phrase 1, phrase 2, connection expression ⁇ or ⁇ phrase 1, phrase 2, relationship label ⁇ .
  • the learning unit 63 learns the relationship estimation model using the triple ⁇ phrase 1, phrase 2, label ⁇ extracted by the learning data generation unit 62 as correct answer data in learning.
  • the relationship estimation model uses a neural network (hereinafter referred to as NN) such as a multilayer perceptron, performs loss calculation by the following method, and updates NN parameters.
  • NN neural network
  • the data used for learning is to use a negative example, and a negative example is obtained by randomly replacing one element of a triple of positive examples.
  • Loss calculation method 1 Corresponding to the above-described relation score calculation method 1, loss calculation is performed using the following equation.
  • score (h ', t', r ') represents a negative score.
  • Loss can be calculated using hinge loss, sigmoid loss, softmax loss, etc.
  • Loss calculation method 2 Corresponding to the above-described relation score calculation method 2, loss calculation is performed using the following equation.
  • Loss can be calculated using hinge loss, sigmoid loss, softmax loss, etc.
  • step S100 dependency analysis is performed on the input text.
  • step S102 a phrase is extracted based on the dependency analysis result for the input text.
  • step S104 from the phrase combinations extracted in step S102, the phrase having a dependency relationship with the phrase including the connected expression is extracted, and a triplet composed of ⁇ phrase 1, phrase 2, label ⁇ is created.
  • step S106 each of phrase 1, phrase 2, and label included in the triple set created in step S104 is converted into a vector.
  • step S108 the result of converting the triple ⁇ phrase 1, phrase 2, label ⁇ into a vector is used as correct answer data in learning, the relationship estimation model is learned, and the relationship estimation model learning processing routine is executed. finish.
  • step S120 each of phrase 1, phrase 2, and label included in the triple received by the input unit 10 is converted into a vector.
  • step S122 a relation score is calculated based on the result of converting the triple ⁇ phrase 1, phrase 2, label ⁇ into a vector in step S120 and the relation estimation model.
  • step S124 it is determined whether or not the phrase 1 and the phrase 2 have the relationship indicated by the label by determining whether or not the relationship score calculated in step S122 is equal to or greater than a predetermined threshold.
  • the determination result is output by the output unit 40, and the relationship estimation processing routine is terminated.
  • connection expression representing the relationship between phrases is included based on the dependency analysis result for the input text.
  • connection expression and the relation label do not correspond one-to-one (for example, the connection expression “for” and the relation label “cause” and “purpose”), the data provided manually Based on this, you can correct mistakes and learn.
  • connection expression itself such as “NO”
  • abstract relationship such as “cause”
  • effect of the extraction method 3 is also acquired.
  • the relationship between phrases can be estimated with high accuracy.
  • an attention-based encoder-decoder model in a neural network is used as a phrase generation model in order to generate a phrase (see FIG. 11).
  • the point of considering relation label information is different from the conventional model.
  • the Encoder-decoder model consists of a neural network (this is called an “encoder”) responsible for converting information corresponding to text into an intermediate state (a series of vectors, hereinafter also referred to as intermediate output), and the intermediate output as text. It is a neural network composed of a neural network (which is called a “decoder”) that has a function of converting.
  • the decoder uses the label r as an input for each time.
  • x j, y t is obtained by converting the words contained in the input / output phrase in a predetermined dimensional vector.
  • a method for converting a word into a vector of a predetermined dimension a general conversion method for inputting a word into a neural network may be used.
  • the input / output phrase is a word vector series.
  • v r is a vector of a predetermined dimension corresponding to the label.
  • the label is converted into a vector as follows, for example. 1. Label type is M, and numbers 1 to M are assigned to each label. 2.
  • the vector v r uses the neural network parameter matrix to weight the M-dimensional one-hot vector r whose number assigned to the label is 1 and the other elements are 0. It will be what you did.
  • a neural network parameter when converting a word or label into a vector representation used in the neural network is hereinafter referred to as embedding.
  • c t is the input side of the context vectors weighted in attention
  • s t represents an intermediate output of the hidden layer of LSTM. As shown above, it is used to combine the v r as an input of the decoder.
  • a similar method is proposed in Non-Patent Document 4, etc., but a model like this configuration is proposed to generate a phrase. There is no existing method.
  • the parameter ⁇ represents a set of learnable parameters of the neural network and is obtained by learning.
  • the parameters of the Encoder-decoder model of the phrase generation device 200 need to be learned in advance.
  • Triple data is used as learning data at that time.
  • ⁇ phrase 1, label: r ⁇ is input using ⁇ phrase 1, label 2, label ⁇ , and ⁇ phrase 2 ⁇ is input.
  • label: r ′ ⁇ as input
  • learning is also performed on data in which input and output are interchanged.
  • the relationship represented by the label has a direction, a reverse label r ′ is newly introduced. Therefore, in the Encoder-decoder model, the number of vocabulary of the relation label is twice the number of vocabulary of the original label.
  • the loss function L encdec of Encoder-decoder is expressed as follows using the cross entropy function in the same manner as the normal Encoder-decoder model.
  • N is the number of data
  • L is the number of words in the phrase Y on the output side
  • c t is the context vector on the input side
  • r is the label.
  • the phrase generation device 200 includes a CPU, a RAM, a ROM that stores a program and various data for executing a phrase generation processing routine to be described later.
  • the phrase generation device 200 functionally includes an input unit 210, a calculation unit 220, and an output unit 240 as shown in FIG.
  • the input unit 210 accepts a pair consisting of an input phrase (text) and a label representing the relationship between phrases.
  • the calculation unit 220 includes a phrase generation unit 221 and a storage unit 222.
  • the storage unit 222 stores a phrase generation model learned by a phrase generation model learning device described later.
  • an attention-based Encoder-decoder IV model (see FIG. 11) is used for the phrase generation model, and the learning method will be described in the phrase generation model learning apparatus.
  • the phrase generation unit 221 uses the phrase generation model stored in the storage unit 222 to generate a phrase having a relationship represented by a label with respect to the input pair of input phrases, and outputs the phrase by the output unit 240 To do.
  • the input phrase is first converted into a vector by the encoder LSTM, and a phrase is generated from the converted vector and the vector representing the input label using an attention-based decoder, and input.
  • the phrase is output as a phrase having the relationship represented by the label.
  • the phrase generation model learning device includes an input unit 50, a calculation unit 60, and an output unit 90.
  • the learning unit 63 of the calculation unit 60 learns the phrase generation model using the triplet ⁇ phrase 1, phrase 2, label ⁇ extracted by the learning data generation unit 62 as learning data.
  • the phrase generation model uses the attention-based Encoder-decoder IV model, calculates the loss function shown in the above equation (4), and updates the parameters of the encoder and decoder.
  • phrase 1 take test
  • the phrase generation model learning device executes a processing routine similar to the relationship estimation model learning processing routine shown in FIG. 9 and generates the generated triple ⁇ phrase 1, phrase 2 , Label ⁇ is used as correct answer data in learning by using a pair ⁇ phrase 1, label ⁇ ⁇ phrase 2, a pair ⁇ phrase 2, label ' ⁇ ⁇ phrase 1 obtained from the label ⁇ .
  • phrase generation device 200 ⁇ Operation of the phrase generation device according to the second embodiment of the present invention>
  • the phrase generation device 200 stores the phrase generation model in the storage unit 222.
  • the input unit 210 receives the two sets ⁇ phrase 1, label ⁇ to be estimated
  • the phrase generation device 200 executes the phrase generation processing routine shown in FIG.
  • step S220 the phrase 1 included in the duplex set received by the input unit 210 is converted into a vector by the LSTM of the phrase generation model encoder.
  • step S222 using a phrase generation model attention-based decoder, a phrase is generated from the vector converted in step S220 and a vector representing a label included in the pair, and a label is assigned to phrase 1. Is output by the output unit 240 as the phrase 2 having the relationship represented by, and the phrase generation processing routine is terminated.
  • the phrase is converted from the encoder that converts the phrase into the vector, the converted vector, and the connection expression or the relation label.
  • a phrase generation model capable of generating a phrase having a relationship to an input phrase by learning a phrase generation model including a decoder that generates a phrase having a relationship represented by a connection expression or a relationship label Can learn.
  • an encoder that converts a phrase into a vector from a set of a phrase and a connection expression or a relation label, and a converted vector, A phrase having a relationship with an input phrase is obtained by using a phrase generation model including a decoder that generates a phrase having a relationship represented by the connection expression or the relationship label with respect to the phrase from the connection expression or the relationship label. Can be generated.
  • a relationship estimation model and a phrase generation model as shown in FIG. 14 are learned simultaneously. Specifically, embedding for converting an input phrase into a word vector series and label into a vector, and LSTM for converting from a word vector series into a phrase vector, a relationship estimation model and a phrase generation model Share. Each specific configuration is shown below.
  • the basic structure of the model uses a model similar to that of Non-Patent Document 2 described above, but the method for generating the input vector is different. In order to explain specifically below, the model proposed in Non-Patent Document 2 will be described first.
  • a model for estimating a triple relation score score (t 1 , r, t 2 ) It is defined as follows using a network.
  • Relationship estimation model of the present embodiment also defines the relationship estimation model using the same formulation as above but, v in modeling is different from the Non-Patent Document 2.
  • Non-Patent Document 2 described above simple modeling is performed with two types of word vector averages and LSTM maxpooling as vector expressions of phrases.
  • each phrase vector is defined as follows using LSTM attention pooling.
  • x i j and h i j represent the hidden layer vectors of the embedding and LSTM of the j-th word of the phrase t i , respectively.
  • v In is passed to higher layers after batch normalization and dropout.
  • the LSTM for vectorizing each phrase and the word / label embedding are shared with the phrase generation model described in the second embodiment.
  • ⁇ Learning> ⁇ Loss function>
  • learning is performed while simultaneously considering the loss function of the relationship estimation model and the phrase generation model. Specifically, learning is performed using a loss function shown in the following equation.
  • is a model parameter
  • L triple represents a loss function related to the relationship estimation model
  • L encdec represents a loss function related to the phrase generation model.
  • the loss function L triple of the relationship estimation model is expressed by the following equation using binary cross entropy that has the highest accuracy from the results of Li et al.
  • is a variable representing a triplet
  • l is a binary variable which is 1 for positive examples and 0 for negative examples
  • is a sigmoid function.
  • the loss function of the encoder and decoder of the phrase generation model is the same as in the second embodiment.
  • ⁇ Negative sampling> When learning a binary classification model using binary cross entropy, it is necessary to prepare a negative example.
  • the randomly sampled t ′ and t 2 ′ are sampled from candidates that appear at the time of learning, and r ′ is sampled from all the label candidates. Accordingly, during learning, learning is performed while sampling three negative examples for each positive example. However, the negative example is used only for the relationship estimation model. Since the phrase generation model wants to learn from the correct triplet, it learns from only the positive triplet.
  • the phrase generation relationship estimation model learning device includes an input unit 50, a calculation unit 60, and an output unit 90.
  • the learning unit 63 of the calculation unit 60 is obtained from the triple set ⁇ phrase 1, phrase 2, label ⁇ extracted by the learning data generation unit 62 and the triple set ⁇ phrase 1, phrase 2, label ⁇ .
  • the pair ⁇ phrase 1, label ⁇ ⁇ phrase 2, double pair ⁇ phrase 2, label ' ⁇ ⁇ phrase 1 is used as correct data in learning, and is obtained from the triple ⁇ phrase 1, phrase 2, label ⁇ .
  • a phrase generation model including an encoder that further converts a phrase into a vector using a negative example, and a decoder that generates a phrase having a relationship represented by the label with respect to the phrase based on the converted vector and the label , As well as a vector representing each phrase included in a phrase combination and a vector representing a label, which are converted using a common encoder From learns the relationship estimation model is a neural network for outputting a relationship score simultaneously.
  • the parameters of the phrase generation model and the relationship estimation model are updated so as to minimize the loss function of the above equation (11).
  • the phrase generation device 300 includes a CPU, a RAM, a ROM that stores a program and various data for executing a phrase generation processing routine described later, and , Can be configured with a computer including.
  • the phrase generation device 300 includes an input unit 310, a calculation unit 320, and an output unit 340 as shown in FIG.
  • the input unit 310 accepts a pair consisting of an input phrase (text) and a label representing the relationship between phrases.
  • the calculation unit 320 includes a phrase generation unit 221, a storage unit 322, and an estimation unit 323.
  • the storage unit 322 stores a relationship estimation model and a phrase generation model learned by the phrase generation relationship estimation model learning device.
  • the attention generation Encoder-decoder model is used as the phrase generation model as described above, and the relationship estimation model is the LSTM at attention pooling as described above. It is assumed that a neural network model to be used for conversion is used.
  • the phrase generation unit 221 uses the phrase generation model stored in the storage unit 322 to generate a phrase having a relationship represented by the label with respect to the input pair of input phrases, and outputs the phrase to the estimation unit 323. To do.
  • the estimation unit 323 uses the relationship estimation model stored in the storage unit 322, the estimation unit 323 estimates a relationship score for the triple set including the input pair and the phrase generated by the phrase generation unit 221. And output by the output unit 340.
  • each phrase is converted into a vector by using a neural network common to the encoder of the phrase generation model, and the relationship score is estimated from the vector representing each phrase and the vector representing the label.
  • the phrase generation relationship estimation model learning device executes a processing routine similar to the relationship estimation model learning processing routine shown in FIG. 9 and generates the generated triple ⁇ phrase 1, Phrase 2, label ⁇ and the triplet ⁇ phrase 1, label 2, label ⁇ obtained from the triplet ⁇ phrase 1, label ⁇ ⁇ phrase 2, double pair ⁇ phrase 2, label ' ⁇ ⁇ phrase 1 Are used as correct answer data in learning, and a negative example obtained from the triple ⁇ phrase 1, phrase 2, label ⁇ is further used to simultaneously learn the relationship estimation model and the phrase generation model.
  • phrase generation device 300 stores the relationship estimation model and the phrase generation model in the storage unit 322. To store. Then, when the input unit 310 receives the two sets ⁇ phrase 1, label ⁇ to be estimated, the phrase generation device 300 executes a phrase generation processing routine shown in FIG.
  • step S320 the phrase 1 included in the duplex set received by the input unit 310 is converted into a vector by the LSTM of the phrase generation model encoder.
  • step S322 using a phrase generation model attention-based decoder, a phrase is generated from the vector converted in step S320 and a vector representing a label included in the pair, and a label is assigned to phrase 1.
  • Phrase 2 have the relationship represented by.
  • step S324 a relationship score is calculated based on the triple set received by the input unit 310, the triple set including the phrase generated in step S322, and the relationship estimation model. At the same time, the triplet is output by the output unit 340, and the phrase generation processing routine is terminated.
  • the encoder that converts a phrase into a vector, and the connection expression or the relationship label for the phrase Represents a phrase generation model including a decoder that generates a phrase having a relationship represented by: a vector representing each phrase included in a combination of phrases converted using the encoder, and the connection representation or the relationship label
  • a relationship estimation model that takes a vector as an input and outputs a relationship score a relationship estimation model that can accurately estimate the relationship between phrases and a phrase that has a relationship to the input phrase
  • the phrase generation model that can be generated can be learned simultaneously. Further, by using simultaneous learning of a phrase generation model and a relationship estimation model that share some neural networks, the accuracy of the triple relationship estimation model is improved.
  • generates the phrase which has the relationship which a connection expression or a relationship label represents with respect to a phrase
  • the phrase generation model to include, generate a phrase that has a relationship to the input phrase, and use the relationship estimation model that outputs the relationship score to estimate the relationship score. It is possible to generate a phrase having a relationship with respect to.
  • ConceptNet has more labels.
  • the number of vocabularies is about 20,000, but the average word length of phrases is about twice that of ConceptNet for Japanese data.
  • For Japanese data we created a triple ⁇ t 1 , t 2 , r ⁇ related to frequent words crawled from the web using crowdsourcing. To remove the data that causes noise, the task of selecting the appropriate r for the three workers ⁇ t 1 , t 2 , r ⁇ created by a certain author while hiding r
  • test data and validation data were randomly selected from data that matched r selected by everyone, and other data were used as learning data. The test and validation data in Japanese was created so that the positive and negative examples would be 1: 1, similar to the ConceptNet data.
  • the sample was first sampled and then created by randomly selecting one triplet of each positive example and replacing it with another element in the test data.
  • Non-Patent Document 2 The method (DNN AVG, DNN LSTM) of Non-Patent Document 2 is used as the baseline of the relationship estimation model.
  • the input vector v in is the average of word vectors, and the LSTM maxpooling.
  • t 1 and t 2 are separately vectorized and connected.
  • En Encoder-decoder single model (EncDec w / o relation single) that does not use relationship labels was used as the baseline of the phrase generation model.
  • the l ⁇ ⁇ of the loss function was fixed at 1.0.
  • the embedding initial value of the word and the label is a vector calculated in advance using fastText (see Non-Patent Document 6) based on a text file obtained by combining triple learning data and Wikipedia (R).
  • Non-Patent Document 6 Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information.
  • ArXiv preprint arXiv: 1607.04606, 2016.
  • Table 2 shows the evaluation results of the relationship estimation (binary classification).
  • the lower row shows the best accuracy reported in Non-Patent Document 2 in the paper.
  • the line + data is an evaluation when learning data is increased from 100k to 300k.
  • the accuracy of the proposed method according to the embodiment of the present invention is improved compared to the existing method. In particular, under the condition where the data is increased, the accuracy is improved by 2% or more, which is approaching the upper limit (up to 0.95) by humans.
  • Comparison between the single model (proposed w / o EncDec) and the simultaneous learning model (proposed w / EncDec) ⁇ shows that both ConceptNet and Japanese data have better accuracy than the single model by simultaneous learning. This is probably because the loss function of the phrase generation problem worked as a constraint for the relationship estimation problem, and a better phrase vector was obtained.
  • Table 3 shows the accuracy of the phrase generation model.
  • the relationship estimation device 100 and the relationship estimation model learning device 150 are configured as separate devices
  • the relationship estimation device 100 and the relationship estimation model learning device are 150 may be configured as one apparatus.
  • the phrase generation devices 200 and 300, the phrase generation model learning device, and the phrase generation relationship estimation model learning device are configured as separate devices
  • the phrase generation devices 200 and 300 and the phrase generation model learning are described.
  • the devices may be configured as one device.
  • relationship estimation model learning device relationship estimation device, phrase generation device, phrase generation model learning device, and phrase generation relationship estimation model learning device have a computer system inside. If a WWW system is used, a homepage providing environment (or display environment) is also included.

Landscapes

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

Abstract

フレーズ間の関係性を精度良く推定することができる関係性推定モデルと、入力フレーズに対して関係性を有するフレーズを生成することができるフレーズ生成モデルとを同時に学習することができる。 3つ組を学習データとして用いて、フレーズをベクトルに変換するエンコーダ、及び変換されたベクトルと、接続表現又は関係ラベルとに基づいて、フレーズに対して接続表現又は関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、接続表現又は関係ラベルを表すベクトルから、関係スコアを出力する関係性推定モデルを学習する。

Description

フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム
 本発明は、フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラムに関する。
 2つのテキストとその間の関係性を表す関係ラベル(以降、単にラベルともいう)からなる3つ組{フレーズ1、フレーズ2、ラベル }が入力として与えられた際に、3つの組み合わせの信頼度スコア(以下関係スコア)を出力する、関係性推定技術がある。関係スコアとは、入力として与えた3つ組{フレーズ1、フレーズ2、ラベル}の組み合わせが正しいか否かを数値化したものである。
 非特許文献1は、コーパスを入力とし、述語項構造の共起情報と節間関係の分布を用いて、前記3つ組を事態間関係知識として獲得するものである。
 非特許文献2は、人手により作成された大量の3つ組データを使って、ニューラルネットワークの学習を行い、関係スコアを推定するものである。
大友謙一、柴田知秀、黒橋禎夫、「述語項構造の共起情報と節間関係の分布を用いた事態間関係知識の獲得」、言語処理学会 第17 回年次大会 発表論文集 (2011 年3 月) Xiang Li, Aynaz Taheri, Lifu Tu, Kevin Gimpel," Commonsense Knowledge Base Completion ", Proc. of ACL, 2016.
 従来技術では、関係性推定において3つ組{フレーズ1、フレーズ2、ラベル}を入力とし、関係スコアを出力するためのモデルを学習している。そのため{フレーズ1、ラベル}を入力としてフレーズ2を予測したいような場合には、フレーズ2を用意し{フレーズ1、フレーズ2、ラベル}という組み合わせを作成してから関係スコアを計算する必要があり、{フレーズ1、ラベル}を入力として、フレーズ1と、ラベルにより定義される関係性を持つ、任意のフレーズ2を生成することはできないという課題がある。
 本発明は、上記課題を解決するために成されたものであり、フレーズ間の関係性を精度良く推定することができる関係性推定モデルと、入力フレーズに対して関係性を有するフレーズを生成することができるフレーズ生成モデルとを同時に学習することができるフレーズ生成関係性推定モデル学習装置、方法、及びプログラムを提供することを目的とする。
 また、入力フレーズに対して関係性を有するフレーズを生成すると共に、関係スコアを推定することができるフレーズ生成装置、方法、及びプログラムを提供することを目的とする。
 上記目的を達成するために、本発明に係るフレーズ生成関係性推定モデル学習装置は、フレーズの組み合わせと、フレーズ間の関係性を表わす接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる3つ組を学習データとして用いて、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとに基づいて、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する関係性推定モデルを学習する学習部を含んで構成されている。
 本発明に係るフレーズ生成関係性推定モデル学習方法は、学習部が、フレーズの組み合わせと、フレーズ間の関係性を表わす接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる3つ組を学習データとして用いて、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとに基づいて、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する関係性推定モデルを学習する。
 また、本発明に係るフレーズ生成装置は、入力フレーズと、フレーズ間の関係性を表わす接続表現又は関係ラベルとの少なくとも一方とからなる2つ組を受け付ける入力部と、フレーズをベクトルに変換する予め学習されたエンコーダを用いて、前記入力フレーズをベクトルに変換し、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成する予め学習されたデコーダを用いて、前記変換されたベクトルと、入力された前記接続表現又は前記関係ラベルとから、前記入力フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するフレーズ生成部と、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する予め学習された関係性推定モデルを用いて、前記2つ組と前記生成されたフレーズとからなる3つ組から、前記関係スコアを出力する推定部と、を含んで構成されている。
 本発明に係るフレーズ生成方法は、入力部が、入力フレーズと、フレーズ間の関係性を表わす接続表現又は関係ラベルとの少なくとも一方とからなる2つ組を受け付け、フレーズ生成部が、フレーズをベクトルに変換する予め学習されたエンコーダを用いて、前記入力フレーズをベクトルに変換し、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成する予め学習されたデコーダを用いて、前記変換されたベクトルと、入力された前記接続表現又は前記関係ラベルとから、前記入力フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成し、推定部が、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する予め学習された関係性推定モデルを用いて、前記2つ組と前記生成されたフレーズとからなる3つ組から、前記関係スコアを出力する。
 本発明に係るプログラムは、コンピュータを、上記発明に係るフレーズ生成関係性推定モデル学習装置又はフレーズ生成装置の各部として機能させるためのプログラムである。
 本発明のフレーズ生成関係性推定モデル学習装置、方法、及びプログラムによれば、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとから、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデルを学習することにより、入力フレーズに対して関係性を有するフレーズを生成することができるフレーズ生成モデルを学習することができる、という効果が得られる。
 本発明のフレーズ生成装置、方法、及びプログラムによれば、フレーズと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる2つ組から、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとから、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデルを用いることにより、入力フレーズに対して関係性を有するフレーズを生成することができる、という効果が得られる。
本発明の第1の実施の形態に係る関係性推定装置の構成を示すブロック図である。 関係スコアの計算方法を説明するための図である。 関係スコアの計算方法を説明するための図である。 本発明の第1の実施の形態に係る関係性推定モデル学習装置の構成を示すブロック図である。 本発明の第1の実施の形態に係る関係性推定モデル学習装置の学習データ生成部の構成を示すブロック図である。 入力テキストの一例を示す図である。 係り受け解析結果の一例を示す図である。 接続表現データベースの一例を示す図である。 本発明の第1の実施の形態に係る関係性推定モデル学習装置における関係性推定モデル学習処理ルーチンを示すフローチャートである。 本発明の第1の実施の形態に係る関係性推定装置における関係性推定処理ルーチンを示すフローチャートである。 フレーズ生成モデルの一例を示す図である。 本発明の第2の実施の形態に係るフレーズ生成装置の構成を示すブロック図である。 本発明の第2の実施の形態に係るフレーズ生成装置におけるフレーズ生成処理ルーチンを示すフローチャートである。 関係性推定モデル及びフレーズ生成モデルの一例を示す図である。 本発明の第3の実施の形態に係るフレーズ生成装置の構成を示すブロック図である。 本発明の第3の実施の形態に係るフレーズ生成装置におけるフレーズ生成処理ルーチンを示すフローチャートである。
 以下、図面を参照して本発明の実施の形態を詳細に説明する。
[第1の実施の形態]
<本発明の第1の実施の形態の概要>
 関係性推定では、2つのテキストとその間の関係性を表す接続表現又は関係ラベルであるラベルからなる3つ組{フレーズ1、フレーズ2、ラベル}が入力として与えられた際に、3つの組み合わせの信頼度スコア(以下関係スコア)を出力する。
 ここで、接続表現とは、「ので」など、文中における、関係を表す表現そのものであり、関係ラベルとは、「理由」「結果」など、関係を表すラベルであり、接続表現の持つ意味を抽象化したものである。ラベルとは、接続表現や、関係ラベルを含む上位概念であり、「ので」「理由」などのラベルデータのことである。
 例えば、入力となる3つ組が、{テキスト1:雨が降る,テキスト2:地面が濡れる,ラベル:結果}であり、出力が関係スコアとなる。
 本実施の形態では、2つのテキストの関係として、ラベルが正しいか否かを推定する方法について説明する。
 また、本発明の実施の形態では接続表現を起点として、係り受け構造を用いてフレーズとその間をつなぐ接続表現の3つ組を抽出する。そして、抽出した3つ組を用いて、関係性を推定するニューラルネットワークモデルである関係性推定モデルを学習する。
<本発明の第1の実施の形態に係る関係性推定装置の構成>
 次に、本発明の第1の実施の形態に係る関係性推定装置の構成について説明する。図1に示すように、本発明の第1の実施の形態に係る関係性推定装置100は、CPUと、RAMと、後述する関係性推定処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この関係性推定装置100は、機能的には図1に示すように入力部10と、演算部20と、出力部40とを備えている。
 入力部10は、2つのフレーズ(テキスト)と、その間の関係性を表す接続表現であるラベルからなる3つ組{フレーズ1、フレーズ2、ラベル}を受け付ける。
 なお、本実施の形態では、3つ組に含まれる、2つのテキスト間の関係性を表すラベルとして、接続表現そのものを用いる場合を例に説明する。
 演算部20は、推定部21と、記憶部22とを備える。
 記憶部22には、後述する関係性推定モデル学習装置150により学習された、関係性推定モデルが記憶される。
 関係性推定モデルにはニューラルネットワークを用いることとし、学習方法については関係性推定モデル学習装置150において説明する。ニューラルネットワークであればどのようなものでもよい。また、別の機械学習でもよいが、ニューラルネットワークの方が効果は高い。
 推定部21は、記憶部22に記憶されている関係性推定モデルを用いて、入力された3つ組に対する関係スコアを推定し、出力部40により出力する。
 関係スコアとは、入力として与えた3つ組の2つのフレーズ間にラベルが示す関係性があるか否かを数値化したものである。例えば、0~1の値を取り、1に近い程、関係があることを示すものとする。
 推定部21の処理について以下に説明する。
 まず入力{フレーズ1、フレーズ2、ラベル}の3つをそれぞれベクトルに変換する。
変換したフレーズ1のベクトルをh、フレーズ2のベクトルをt、接続表現のベクトルをrとする。変換方法は、フレーズや単語をベクトル化する手法であれば何でもよい。本実施の形態では非特許文献3の手法を利用する。
[非特許文献3]Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. In Proceedings of NIPS, 2013.
 関係スコア計算方法には、以下の2つの方法が考えられる。
(スコア計算方法1)
 図2に示すように、h、t、rを連結し、多層パーセプトロンなどを用いて、1次元の出力値である関係スコアscore(h,t,r)を出力する。
(スコア計算方法2)
 図3に示すように、hとrを連結し、多層パーセプトロンなどを用いて、r次元のベクトルE_hrを出力し、tから、多層パーセプトロンなどを用いて、r次元のベクトルE_tを出力し、E_hrとE_tの近さで関係スコアを計算する。両ベクトルの近さは、例えばコサイン類似度等を用いればよい。
 例えば、推定部21は、3つ組{フレーズ1:雨が降る,フレーズ2:地面が濡れる,ラベル:ので}に対して、関係スコア0.87を出力する。
 また、推定部21は、出力された関係スコアを所定の閾値で判定し、フレーズ1とフレーズ2には「ので」が示す「結果」という関係性があるか否かを推定する。例えば、関係スコアの値が0.6、閾値が0.4 の場合は、0.6>0.4なので関係性がある、と推定する。ただし、閾値判定は知識獲得や0/1にスコアを落とし込む必要がある場合なので、用途によっては閾値判定を行わずに、関係スコアの値をそのまま出力してもよい。
<本発明の第1の実施の形態に係る関係性推定モデル学習装置の構成>
 次に、本発明の第1の実施の形態に係る関係性推定モデル学習装置の構成について説明する。図4に示すように、本発明の実施の形態に係る関係性推定モデル学習装置150は、CPUと、RAMと、後述する関係性推定モデル学習処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この関係性推定モデル学習装置150は、機能的には図4に示すように入力部50と、演算部60と、出力部90とを備えている。
 入力部50は、入力テキストを受け付ける。
 演算部60は、学習データ生成部62と、学習部63とを備えている。
 学習データ生成部62は、図5に示すように、基本解析部71と、フレーズ抽出部72と、接続表現データベース73とを備えている。
 基本解析部71は、入力テキストに対して係り受け解析を行う。
 図6に、入力テキストの例を示し、図7に、係り受け解析結果の例を示す。係り受け解析は任意のものを用いればよく、例えば、既知の形態素解析器であるCaboChaを利用する。
 フレーズ抽出部72は、係り受け解析結果からフレーズを抽出する。本実施の形態では、フレーズとは、係り受け関係にある主語と述語を最小単位として,その他形容詞節を最大n個(nは任意の自然数)まで考慮するものとする。
 上記図7を係り受け解析結果の例とすると、下記のようなフレーズが抽出される。フレーズを抽出する際には、解析結果の原型(ただし、必ずしも原型にしなくてもよい)を利用し、「壊れたので」→「壊れる」、「買い換えました」→「買い換える」のように変換したものを抽出する。
携帯電話が壊れる
買い換える
xxx7に買い換える
xxx5を換える
 なお、フレーズを抽出する際には、基本的に主語+動詞の組み合わせを基本単位とするが、サ変名詞動詞は単独でもよいものとする。
 また、係り受け関係を考慮せずに、接続表現の前後の文字列それぞれを、フレーズとして抽出してもよい。例えば、「aaaa[接続表現]bbbb」という文が存在する場合に、「aaaa」と「bbbb」とをそれぞれフレーズとして抽出してもよい。この場合、[接続表現]が接続表現を含む文節を表し、「aaaa」と「bbbb」が接続表現を含む前記文節を挟んで、前及び後の位置関係にあるフレーズを表している。
 そして、フレーズ抽出部72は、上記フレーズの組み合わせのうち、接続表現が含まれる文節と係り受け関係にあるフレーズを抽出し、{フレーズ1、フレーズ2、接続表現}からなる3つ組を作成する。
 本実施の形態においてラベルとして用いる接続表現とは、フレーズ間の関係性を表す表現であらかじめ定められたものとする。例えば、「なので」「ので」「ために」「と」「たら」「場合」「とき」「時」「ば」「から」「が」などの接続詞は接続表現として用いることが可能である。本実施の形態では、図8(A)に示すように、接続表現データベース73に接続表現が予め登録されているものとする。
 上記図7の係り受け解析結果の例では、以下の3つ組が作成される。
{携帯電話が壊れる、買い換える、ので}
{携帯電話が壊れる、xxx7に買い換える、ので}
{携帯電話が壊れる、xxx5を買い換える、ので}
 接続表現の種類をN通りとすると、最終的な3つ組に含まれるラベルの種類はN通りとなる。
 また、フレーズ抽出部72の別の実施例として、上記のように3つ組を抽出してそのまま出力する方法(抽出方法1とする)以外に、抽出後に次の3通りの処理を行う方法がある。
(抽出方法2)
 図8(B)に示すように、接続表現データベース73に、接続表現と接続表現が表す関係性を示す関係ラベルが予め登録されているものとする。
 接続表現データベース73を用いて、接続表現を関係ラベルに変換して{フレーズ1、フレーズ2、関係ラベル}を出力する。
 上記図7の係り受け解析結果の例では、以下の3つ組が作成される。
{携帯電話が壊れる、買い換える、原因}
{携帯電話が壊れる、xxx7に買い換える、原因}
{携帯電話が壊れる、xxx5を買い換える、原因}
 関係ラベルの種類をM通りとすると、最終的に出力されるラベルの種類はM通りとなる。
 上記抽出方法2を用いる場合には、関係性推定装置100の入力となる3つ組は、{フレーズ1、フレーズ2、関係ラベル}となる。
(抽出方法3)
 人手により、接続表現を関係ラベルに変換したもの{フレーズ1、フレーズ2、関係ラベル}、抽出方法2の{フレーズ1、フレーズ2、関係ラベル}を合わせて出力する。最終的に出力されるラベルの種類はM通りとなる。
 上記抽出方法3を用いる場合には、関係性推定装置100の入力となる3つ組は、{フレーズ1、フレーズ2、関係ラベル}となる。
(抽出方法4)
 人手により、接続表現を関係ラベルに変換したもの{フレーズ1、フレーズ2、関係ラベル}と、抽出方法1の{フレーズ1、フレーズ2、接続表現}を合わせて出力する。最終的に出力されるラベルの種類はN+M通りとなる。
 上記抽出方法4を用いる場合には、関係性推定装置100の入力となる3つ組は、{フレーズ1、フレーズ2、接続表現}又は{フレーズ1、フレーズ2、関係ラベル}となる。
 学習部63は、学習データ生成部62で抽出した3つ組{フレーズ1、フレーズ2、ラベル}を学習における正解データとして用い、関係性推定モデルの学習を行う。
 関係性推定モデルは前述したように、多層パーセプトロン等のニューラルネットワーク(以下NN)を用い、下記の方法で損失計算を行い、NNのパラメータの更新を行うこととする。
 なお、学習に用いるデータは、負例を足して用いる事とし、正例の3つ組の一つの要素をランダムに置き換えたものを負例とする。
(損失計算方法1)
 上記の関係スコア計算方法1に対応して、以下の式で損失計算を行う。
Figure JPOXMLDOC01-appb-M000001

 
 ただし、score(h',t',r')は、負例のスコアを表す。Lossの計算は,hinge loss, sigmoid loss, softmax lossなどが利用可能である。
(損失計算方法2)
 上記の関係スコア計算方法2に対応して、以下の式で損失計算を行う。
Figure JPOXMLDOC01-appb-M000002

 
 ただし、E_h'r'-E_t'は、負例のスコアを表す。Lossの計算は,hinge loss, sigmoid loss, softmax lossなどが利用可能である。
<本発明の第1の実施の形態に係る関係性推定モデル学習装置の作用>
 次に、本発明の第1の実施の形態に係る関係性推定モデル学習装置150の作用について説明する。入力部50において入力テキストを受け付けると、関係性推定モデル学習装置150は、図9に示す関係性推定モデル学習処理ルーチンを実行する。
 まず、ステップS100で、入力テキストに対して係り受け解析を行う。
 そして、ステップS102で、入力テキストに対する係り受け解析結果に基づいて、フレーズを抽出する。
 ステップS104では、上記ステップS102で抽出されたフレーズの組み合わせのうち、接続表現が含まれる文節と係り受け関係にあるフレーズを抽出し、{フレーズ1、フレーズ2、ラベル}からなる3つ組を作成する
 ステップS106では、上記ステップS104で作成された3つ組に含まれるフレーズ1、フレーズ2、及びラベルの各々をベクトルに変換する。
 そして、ステップS108では、3つ組{フレーズ1、フレーズ2、ラベル}をベクトルに変換した結果を、学習における正解データとして用い、関係性推定モデルの学習を行い、関係性推定モデル学習処理ルーチンを終了する。
<本発明の第1の実施の形態に係る関係性推定装置の作用>
 次に、本発明の第1の実施の形態に係る関係性推定装置100の作用について説明する。関係性推定モデル学習装置150によって予め学習された関係性推定モデルが関係性推定装置100に入力されると、関係性推定装置100は、関係性推定モデルを記憶部22へ格納する。そして、入力部10が、推定対象の3つ組{フレーズ1、フレーズ2、ラベル}を受け付けると、関係性推定装置100は、図10に示す関係性推定処理ルーチンを実行する。
 ステップS120で、入力部10により受け付けた3つ組に含まれるフレーズ1、フレーズ2、及びラベルの各々をベクトルに変換する。
 ステップS122では、上記ステップS120で3つ組{フレーズ1、フレーズ2、ラベル}をベクトルに変換した結果と、関係性推定モデルとに基づいて、関係スコアを算出する。
 ステップS124では、上記ステップS122で算出された関係スコアが所定の閾値以上であるか否かを判定することにより、フレーズ1とフレーズ2にはラベルが示す関係性があるか否かを判定し、判定結果を出力部40により出力して、関係性推定処理ルーチンを終了する。
 以上説明したように、本発明の第1の実施の形態に係る関係性推定モデル学習装置によれば、入力テキストに対する係り受け解析結果に基づいて、フレーズ間の関係性を表わす接続表現が含まれる文節と係り受け関係にあるフレーズの組み合わせを抽出し、フレーズの組み合わせと接続表現又は関係ラベルとからなる3つ組を作成することにより、学習データの作成コストをかけることなく、フレーズ間の関係性を精度良く推定することができる関係性推定モデルを学習することができる。
 また、上記抽出方法1または2を用いる場合には、入力テキストから接続表現を用いて抽出した3つ組のデータを学習データとして、フレーズのニューラル関係知識推定モデルを構築することにより、人手データなしに、接続表現に基づくニューラル関係性のモデル化が可能となる。また、人手の正解なしで,あらかじめ定めた関係ラベルと任意のフレーズの3つ組みに対する関係スコアを求めるモデルを構築することができる。
 上記抽出方法2を用いる場合には、「ので」のような接続表現そのものではなく、「原因」のように抽象化した関係性の推定ができる。
 また、上記抽出方法3を用いる場合には、接続表現と関係ラベルが一対一に対応しない場合(例えば、接続表現「ため」と関係ラベル「原因」「目的」)でも、人手で与えられたデータを元に間違いを訂正して学習できる。
 また、上記抽出方法4を用いる場合には、「ので」のような接続表現そのものと、「原因」のように抽象化した関係の両方が推定ができる。また、抽出方法3の効果も得られる。人手対応づけラベルと、接続表現を混ぜるパタンでは、人手変換きる確実なラベルとそうでない場合を同時に考慮するモデルを作ることができる。
 また、本発明の第1の実施の形態に係る関係性推定装置によれば、フレーズ間の関係性を精度良く推定することができる。
[第2の実施の形態]
<本発明の第2の実施の形態の原理>
 まず、入力フレーズに対して関係性を有するフレーズを生成するモデルについて説明する。本実施の形態では、フレーズを生成するためにニューラルネットワークにおけるアテンションベースのEncoder-decoderモデルを、フレーズ生成モデルとして用いる(図11参照)。さらに、従来のアテンションベースのEncoder-decoderモデルに加えて関係ラベルの情報を考慮する点が従来のモデルと異なる。Encoder-decoderモデルは、テキストに対応する情報を中間状態(ベクトルの系列。以降、中間出力ともいう。)に変換する機能を担うニューラルネットワーク(これを「エンコーダ」という)と、中間出力をテキストに変換する機能を担うニューラルネットワーク(これを「デコーダ」という)とから構成されるニューラルネットワークである。デコーダでは、ラベルr を各時刻の入力として用いている。
 本実施の形態ではフレーズの単語列に加えて、ラベルrの情報が存在するため、関係ラベルを考慮したEncoder-decoder モデルを構築する。ここで、入力フレーズの単語ベクトル系列を
Figure JPOXMLDOC01-appb-I000003

 
、出力フレーズの単語ベクトル系列を
Figure JPOXMLDOC01-appb-I000004

 
とすると、Yの出力確率は下記のように定式化できる。
Figure JPOXMLDOC01-appb-M000005

 
(1)
Figure JPOXMLDOC01-appb-I000006

 
(2)
Figure JPOXMLDOC01-appb-I000007

 
(3)
 ここで、xj,ytは入力/出力フレーズに含まれる単語を所定次元のベクトルに変換したものである。単語の所定次元のベクトルへの変換方法は、ニューラルネットワークに単語を入力する際の、一般的な変換方法を用いればよい。入力/出力フレーズは、単語ベクトル系列となる。
 vrはラベルに対応する所定次元のベクトルである。ラベルは、例えば以下のようにベクトルに変換する。
1.ラベルの種類をMとし、各ラベルに1からMまでの番号を割り当てる。
2. ベクトルvrは、当該ラベルに割り当てられた番号の要素が1で、それ以外の要素が0となるM次元のone-hotベクトルrに対し、ニューラルネットワークのパラメータ行列を用いて重みづけを行ったものとなる。
 上記のように、単語やラベルをニューラルネットワーク内で用いるベクトル表現に変換する際のニューラルネットワークのパラメータを、以降embeddingと呼ぶ。
 ctはattention で重みづけられた入力側のコンテキストベクトル、stはLSTM の隠れ層の中間出力を表す。上記に示すように、デコーダの入力としてvr を結合して用いている。このような方法でデコーダ側に追加情報としてラベルを入力する方法については非特許文献4などでも類似の手法が提案されているが、フレーズを生成するために本構成のようなモデルを提案している既存手法は存在しない。パラメータθはニューラルネットワークの学習可能なパラメータの集合を表し、学習によって求められる。
[非特許文献4] Jiwei Li, Michel Galley, Chris Brockett, Georgios Spithourakis, Jianfeng Gao, and Bill Dolan. A persona-based neural conversation model. In Proceedings of the 54th Annual Meeting of the ACL, pp. 994-1003, 2016.
 本実施の形態では、フレーズ生成装置200のEncoder-decoder モデルのパラメータは、予め学習しておく必要がある。その際の学習データとして3つ組データを用いる。3つ組データの場合、どちらのフレーズを入力としても問題ないため、1組の{フレーズ1、フレーズ2、ラベル}を用いて、{フレーズ1、ラベル:r}を入力として{フレーズ2}を推定する場合と、{フレーズ2、ラベル:r′}を入力として{フレーズ1}を推定する場合のように、入力と出力を入れ替えたデータについても学習を行う。この際、ラベルが表す関係性には方向があるため、新たに逆向きのラベルr′を導入する。従って、Encoder-decoderモデルにおいては、関係ラベルの語彙数は元のラベルの語彙数の2倍になる。
 また、Encoder-decoder の損失関数Lencdecについては、通常のEncoder-decoder モデルと同様にcross entropy 関数を用いて次のように表す。
Figure JPOXMLDOC01-appb-M000008

 
  (4)
 ここで、N はデータ数、L は出力側のフレーズY の単語数、ctは入力側のコンテキストベクトル、r はラベルを表す。
<本発明の第2の実施の形態に係るフレーズ生成装置の構成>
 次に、本発明の第2の実施の形態に係るフレーズ生成装置の構成について説明する。図12に示すように、本発明の第2の実施の形態に係るフレーズ生成装置200は、CPUと、RAMと、後述するフレーズ生成処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。このフレーズ生成装置200は、機能的には図12に示すように入力部210と、演算部220と、出力部240とを備えている。
 入力部210は、入力フレーズ(テキスト)と、フレーズ間の関係性を表すラベルとからなる2つ組を受け付ける。
 演算部220は、フレーズ生成部221と、記憶部222とを備える。
 記憶部222には、後述するフレーズ生成モデル学習装置により学習された、フレーズ生成モデルが記憶される。
 フレーズ生成モデルには上述したようにアテンションベースのEncoder-decoder モデル(上記図11参照)を用いることとし、学習方法についてはフレーズ生成モデル学習装置において説明する。
 フレーズ生成部221は、記憶部222に記憶されているフレーズ生成モデルを用いて、入力された2つ組の入力フレーズに対してラベルが表す関係性を有するフレーズを生成し、出力部240により出力する。
 具体的には、まず、エンコーダのLSTMにより、入力フレーズをベクトルに変換し、アテンションベースのデコーダを用いて、変換されたベクトルと、入力されたラベルを表すベクトルとから、フレーズを生成し、入力フレーズに対してラベルが表す関係性を有するフレーズとして出力する。
<本発明の第2の実施の形態に係るフレーズ生成モデル学習装置の構成>
 次に、本発明の第2の実施の形態に係るフレーズ生成モデル学習装置の構成について説明する。なお、フレーズ生成モデル学習装置の構成は、第1の実施の形態に係る関係性推定モデル学習装置150と同様の構成であるため、同一符号を付して説明を省略する。
 本発明の第2の実施の形態に係るフレーズ生成モデル学習装置は、入力部50と、演算部60と、出力部90とを備えている。
 演算部60の学習部63は、学習データ生成部62で抽出した3つ組{フレーズ1、フレーズ2、ラベル}を学習データとして用いて、フレーズ生成モデルの学習を行う。
 フレーズ生成モデルは前述したように、アテンションベースのEncoder-decoder モデルを用い、上記(4)式に示す損失関数の計算を行い、エンコーダ及びデコーダのパラメータの更新を行うこととする。
 また、3つ組{フレーズ1、フレーズ2、ラベル}があるとき、2つ組{フレーズ1、ラベル}からフレーズ2の生成、2つ組{フレーズ2、ラベル}からフレーズ1の生成を一つのフレーズ生成モデルで学習する。
 両方向の関係を1つのフレーズ生成モデルで扱うため、逆方向のラベルを定義し、ラベルの空間を2倍にしてモデル学習を行う。
 元の3つ組の接続表現のラベルr=rkのとき、逆向きのラベルを新しいラベルrk’として扱う。
 例えば、3つ組(フレーズ1=テストを受ける、フレーズ2=勉強する、ラベル=ために)があるとき、下記のように2つ生成し、学習データとして用いる。
2つ組{テストを受ける、ために}→勉強する
2つ組{勉強する、ために’}→テストを受ける
<本発明の第2の実施の形態に係るフレーズ生成モデル学習装置の作用>
 次に、本発明の第2の実施の形態に係るフレーズ生成モデル学習装置の作用について説明する。入力部50において入力テキストを受け付けると、フレーズ生成モデル学習装置は、上記図9に示す関係性推定モデル学習処理ルーチンと同様の処理ルーチンを実行し、生成された3つ組{フレーズ1、フレーズ2、ラベル}から得られる、2つ組{フレーズ1、ラベル}→フレーズ2、2つ組{フレーズ2、ラベル’}→フレーズ1を、学習における正解データとして用い、フレーズ生成モデルの学習を行う。
<本発明の第2の実施の形態に係るフレーズ生成装置の作用>
 次に、本発明の第2の実施の形態に係るフレーズ生成装置200の作用について説明する。フレーズ生成モデル学習装置によって予め学習されたフレーズ生成モデルがフレーズ生成装置200に入力されると、フレーズ生成装置200は、フレーズ生成モデルを記憶部222へ格納する。そして、入力部210が、推定対象の2つ組{フレーズ1、ラベル}を受け付けると、フレーズ生成装置200は、図13に示すフレーズ生成処理ルーチンを実行する。
 ステップS220で、入力部210により受け付けた2つ組に含まれるフレーズ1を、フレーズ生成モデルのエンコーダのLSTMによりベクトルに変換する。
 ステップS222では、フレーズ生成モデルのアテンションベースのデコーダを用いて、上記ステップS220で変換されたベクトルと、2つ組に含まれるラベルを表すベクトルとから、フレーズを生成し、フレーズ1に対してラベルが表す関係性を有するフレーズ2として出力部240により出力して、フレーズ生成処理ルーチンを終了する。
 以上説明したように、本発明の第2の実施の形態に係るフレーズ生成モデル学習装置によれば、フレーズをベクトルに変換するエンコーダ、及び変換されたベクトルと、接続表現又は関係ラベルとから、フレーズに対して接続表現又は関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデルを学習することにより、入力フレーズに対して関係性を有するフレーズを生成することができるフレーズ生成モデルを学習することができる。
 また、これまでは関係性を有するフレーズ候補をあらかじめ用意する必要があったが、事前に候補を用意することなく関係性を有するフレーズが生成可能となるフレーズ生成モデルを学習することができる。
 また、本発明の第2の実施の形態に係るフレーズ生成装置によれば、フレーズと、接続表現又は関係ラベルとからなる2つ組から、フレーズをベクトルに変換するエンコーダ、及び変換されたベクトルと、接続表現又は関係ラベルとから、フレーズに対して接続表現又は関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデルを用いることにより、入力フレーズに対して関係性を有するフレーズを生成することができる。
 また、ラベルを、Encoder-decoderモデルの追加入力として扱うことにより、ラベルによって異なるフレーズ生成が可能となる。
[第3の実施の形態]
<本発明の第3の実施の形態の原理>
 本発明の第3の実施の形態では、図14に示すような関係性推定モデルとフレーズ生成モデルを同時に学習する。具体的には、入力フレーズを単語ベクトル系列に、ラベルをベクトルに変換するためのembeddingと、単語ベクトル系列からフレーズのベクトルに変換するためのLSTMとを、関係性推定モデルとフレーズ生成モデルとで共有する。それぞれの具体的な構成を下記に示す。
<関係性推定モデル>
 まず、第3の実施の形態における関係性推定モデルについて説明する。
 モデルの基本的な構造は上記非特許文献2と類似したモデルを使用するが、入力となるベクトルの生成方法が異なっている。以下具体的に説明するため、まず上記非特許文献2で提案したモデルについて説明する。
 上記非特許文献2では、任意の3つ組{t1,t2,r}が与えられた時、3つ組の関係スコアscore(t1,r,t2) を推定するモデルを、ニューラルネットワークを用いて次のように定義している。
Figure JPOXMLDOC01-appb-M000009

 
(5)
 ここで、
Figure JPOXMLDOC01-appb-I000010

 
はt1、t2 を結合した単語列のベクトル表現、
Figure JPOXMLDOC01-appb-I000011

 
はラベルrのベクトル表現を表す。g は非線形関数を表し、上記非特許文献2ではReLU を用いる。最終層のスコアは1次元の出力とする。これらは、任意の3つ組が与えられた時その3つ組が正しい組み合わせか否かを判別するモデルと考えることができる。
 本実施の形態の関係性推定モデルも上記と同様の定式化を用いて関係性推定モデルを定義するが、vin のモデル化が上記非特許文献2と異なる。上記非特許文献2では、フレーズのベクトル表現として、単語ベクトルの平均、LSTM のmaxpooling の二種類とシンプルなモデル化を行っている。一方、本実施の形態の関係性推定モデルでは各フレーズのベクトルをLSTM のattention pooling を用いて下記のように定義する。ここで、xi j,hi jはそれぞれフレーズtiのj番目単語のembedding とLSTM の隠れ層ベクトルを表す。
Figure JPOXMLDOC01-appb-M000012

 
(6)
Figure JPOXMLDOC01-appb-I000013

 
(7)
Figure JPOXMLDOC01-appb-I000014

 
(8)
Figure JPOXMLDOC01-appb-I000015

 
(9)
Figure JPOXMLDOC01-appb-I000016

 
(10)
 vinは、batch normalizationとdropoutを行った上で上位の層に受け渡す。各フレーズをベクトル化するためのLSTM、単語・ラベルのembedding は、上記第2の実施の形態で説明したフレーズ生成モデルと共有する。
<学習>
<損失関数>
 本実施の形態では、関係性推定モデル及びフレーズ生成モデルの損失関数を同時に考慮しながら学習を行う。具体的には、下記の式に示す損失関数を用いて学習を行う。
Figure JPOXMLDOC01-appb-M000017

 
(11)
 ここで、θはモデルパラメータであり、Ltriple は関係性推定モデルに関する損失関数、Lencdec はフレーズ生成モデルに関する損失関数を表す。関係性推定モデルの損失関数Ltriple についてはLi ら上記非特許文献2の結果から最も精度が良かったbinary cross entropy を用いて下記の式で表す。
Figure JPOXMLDOC01-appb-M000018

 
(12)
 ここで、τは三つ組を表す変数、l は正例に対して1、負例に対して0 となるバイナリ変数、σはシグモイド関数である。上記の定式化は、任意の3つ組τ={t1,t2,r}に対して正例のスコアが1、負例のスコアが0に近くなるように学習を行う。
 フレーズ生成モデルのエンコーダ及びデコーダの損失関数については、上記第2の実施の形態と同様である。
<負例サンプリング>
 Binary cross entropy を用いて2値分類モデルの学習を行う場合、負例を用意する必要がある。本実施の形態では、上記非特許文献2の研究で最も精度が良かったランダムサンプリングを用いて負例の生成を行う。具体的には、それぞれの正例3つ組データτ={t1,t2,r}に対して、t1、t2、r を1つずつランダムに置き換えたデータτneg1{t1’,t2,r}、τneg2={t1,t2,r’}、τneg3 ={t1,t2’,r}を生成する。ランダムにサンプリングされるt’,t2’ はそれぞれ学習時に出現した候補からサンプリングされ、r’は全ラベル候補の中からサンプリングされる。従って、学習中は、正例1つにつき3個の負例をサンプリングしながら学習を行う。ただし、負例は関係性推定モデルのみに用いる。フレーズ生成モデルは正しい3つ組から学習を行いたいため、正例の3つ組のみから学習を行う。
<本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置の構成>
 次に、本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置の構成について説明する。なお、フレーズ生成関係性推定モデル学習装置の構成は、第1の実施の形態に係る関係性推定モデル学習装置と同様の構成であるため、同一符号を付して説明を省略する。
 本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置は、入力部50と、演算部60と、出力部90とを備えている。
 演算部60の学習部63は、学習データ生成部62で抽出した3つ組{フレーズ1、フレーズ2、ラベル}と、当該3つ組{フレーズ1、フレーズ2、ラベル}から得られる、2つ組{フレーズ1、ラベル}→フレーズ2、2つ組{フレーズ2、ラベル’}→フレーズ1とを、学習における正解データとして用い、当該3つ組{フレーズ1、フレーズ2、ラベル}から得られる負例を更に用いて、フレーズをベクトルに変換するエンコーダ、及び変換されたベクトルと、ラベルとに基づいて、フレーズに対して当該ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、共通するエンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、ラベルを表すベクトルとから、関係スコアを出力するニューラルネットワークである関係性推定モデルを同時に学習する。
 具体的には、上記(11)式の損失関数を最小化するように、フレーズ生成モデル及び関係性推定モデルのパラメータの更新を行う。
<本発明の第3の実施の形態に係るフレーズ生成装置の構成>
 次に、本発明の第3の実施の形態に係るフレーズ生成装置の構成について説明する。なお、第2の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。
 図15に示すように、本発明の第3の実施の形態に係るフレーズ生成装置300は、CPUと、RAMと、後述するフレーズ生成処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。このフレーズ生成装置300は、機能的には図15に示すように入力部310と、演算部320と、出力部340とを備えている。
 入力部310は、入力フレーズ(テキスト)と、フレーズ間の関係性を表すラベルとからなる2つ組を受け付ける。
 演算部320は、フレーズ生成部221と、記憶部322と、推定部323とを備える。
 記憶部322には、フレーズ生成関係性推定モデル学習装置により学習された、関係性推定モデル及びフレーズ生成モデルが記憶される。
 上記図14に示すように、フレーズ生成モデルには上述したようにアテンションベースのEncoder-decoder モデルを用いることとし、関係性推定モデルについては、上述したように各フレーズのベクトルをLSTM のattention pooling を用いて変換するニューラルネットワークモデルを用いることとする。
 フレーズ生成部221は、記憶部322に記憶されているフレーズ生成モデルを用いて、入力された2つ組の入力フレーズに対してラベルが表す関係性を有するフレーズを生成し、推定部323に出力する。
 推定部323は、記憶部322に記憶されている関係性推定モデルを用いて、入力された2つ組と、フレーズ生成部221により生成されたフレーズとからなる3つ組に対する関係スコアを推定し、出力部340により出力する。
 このとき、関係性推定モデルにおいて、フレーズ生成モデルのエンコーダと共通のニューラルネットワークを用いて、各フレーズをベクトルに変換し、各フレーズを表すベクトルと、ラベルを表すベクトルから、関係スコアを推定する。
<本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置の作用>
 次に、本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置の作用について説明する。入力部310において入力テキストを受け付けると、フレーズ生成関係性推定モデル学習装置は、上記図9に示す関係性推定モデル学習処理ルーチンと同様の処理ルーチンを実行し、生成した3つ組{フレーズ1、フレーズ2、ラベル}と、当該3つ組{フレーズ1、フレーズ2、ラベル}から得られる、2つ組{フレーズ1、ラベル}→フレーズ2、2つ組{フレーズ2、ラベル’}→フレーズ1とを、学習における正解データとして用い、当該3つ組{フレーズ1、フレーズ2、ラベル}から得られる負例を更に用いて、関係性推定モデルとフレーズ生成モデルとの同時学習を行う。
<本発明の第3の実施の形態に係るフレーズ生成装置の作用>
 次に、本発明の第3の実施の形態に係るフレーズ生成装置300の作用について説明する。フレーズ生成関係性推定モデル学習装置によって予め学習された関係性推定モデル及びフレーズ生成モデルがフレーズ生成装置300に入力されると、フレーズ生成装置300は、関係性推定モデル及びフレーズ生成モデルを記憶部322へ格納する。そして、入力部310が、推定対象の2つ組{フレーズ1、ラベル}を受け付けると、フレーズ生成装置300は、図16に示すフレーズ生成処理ルーチンを実行する。
 ステップS320で、入力部310により受け付けた2つ組に含まれるフレーズ1を、フレーズ生成モデルのエンコーダのLSTMによりベクトルに変換する。
 ステップS322では、フレーズ生成モデルのアテンションベースのデコーダを用いて、上記ステップS320で変換されたベクトルと、2つ組に含まれるラベルを表すベクトルとから、フレーズを生成し、フレーズ1に対してラベルが表す関係性を有するフレーズ2とする。
 ステップS324では、入力部310により受け付けた2つ組と、上記ステップS322で生成されたフレーズとからなる3つ組と、関係性推定モデルとに基づいて、関係スコアを算出し、算出した関係スコアと共に、当該3つ組を出力部340により出力して、フレーズ生成処理ルーチンを終了する。
 以上説明したように、本発明の第3の実施の形態に係るフレーズ生成関係性推定モデル学習装置によれば、フレーズをベクトルに変換するエンコーダ、及び前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルを入力として、関係スコアを出力する関係性推定モデルを学習することにより、フレーズ間の関係性を精度良く推定することができる関係性推定モデルと、入力フレーズに対して関係性を有するフレーズを生成することができるフレーズ生成モデルとを同時に学習することができる。また、一部のニューラルネットワークを共通としたフレーズ生成モデルと関係性推定モデルとの同時学習を用いることで,3つ組の関係性推定モデルの精度が向上する。
 また、本発明の第3の実施の形態に係るフレーズ生成装置によれば、フレーズをベクトルに変換するエンコーダ、及びフレーズに対して接続表現又は関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデルを用いて、入力フレーズに対して関係性を有するフレーズを生成し、関係スコアを出力する関係性推定モデルを用いて、関係スコアを推定することにより、関係スコア付きで、入力フレーズに対して関係性を有するフレーズを生成することができる。
<実験>
<実験データ>
 実験データは、上記非特許文献2が公開しているConceptNet(英語)のデータと、発明者らが独自にアノテーションした日本語のオープンドメインデータを用いる。表1にそれぞれのデータの概要を示す。
Figure JPOXMLDOC01-appb-T000019

 
 ConceptNet の方がラベル数が多い。語彙数はいずれも2 万程度だが、フレーズの平均単語長は日本語データがConceptNet の倍程度と長くなっている。日本語データに関しては、クラウドソーシングを用いてweb上からクロールした頻出単語に関連する3つ組{t1,t2,r}を作成した。ノイズとなるデータを除去するため、ある作成者が作成した3つ組{t1,t2,r}について、rを隠した状態で別の3 名のワーカーに適切なr を選択するタスクを行ってもらい、2 人以上が同じラベルを選択したデータのみを使用した。また、test データとvalidation データに関しては、全員の選択したr が一致したデータからランダムに選択し、それ以外を学習データとした。日本語のtest, validation データは、ConceptNet データと同様に正例と負例が1:1 となるようにデータを作成した。
 具体的には、まず正例をサンプリングした後、各正例の3 つ組の要素1つをランダムに選択しテストデータ中の別の要素と置換して作成した。
<評価方法と比較手法>
 関係性推定モデルのベースラインとして、上記非特許文献2の手法(DNN AVG, DNN LSTM) を用いる。これらは、入力ベクトルvinがそれぞれ単語ベクトルの平均、LSTM のmaxpooling をとったものである。ただし、LSTM のモデルでは、t1とt2 を別々にベクトル化して連結した。
 本実施の形態の提案手法に関しては、関係性推定モデルを単独で用いた場合(proposed w/o EncDec)と双方を同時に学習した場合(proposed w/ EncDec)の精度評価を行った。評価指標は2値判別の正解率を用いた。また、ConceptNetの実験に関しては上記非特許文献2と同様に、train データで学習を行い、validation 1 データでハイパーパラメータの調整、評価をvalidation 2, test データで行った。日本語データも同様にtrain, validation1、2でパラメータを決定しtest で評価をした。
 フレーズ生成モデルのベースラインとして、関係ラベルを用いないEncoder-decoder 単独モデル(EncDec w/o relation single)を用いた。また、関係ラベルを考慮した単独モデル(EncDec w/relation single)と、関係性推定モデルとの同時学習(EncDec w/relation Multi)を比較した。評価は、単語レベルの正解率で評価を行った。
<実験設定>
 本実験例で用いたパラメータについて説明する。LSTMの隠れ層、単語・ラベルのembedding は200 次元、関係性推定モデルの中間層の次元を1000l、学習時のバッチサイズは128、ドロップアウトは0.2、weight decayは0.00001 に設定した。また、フレーズ生成モデルのエンコーダには1 層の双方向LSTM、デコーダには1 層のLSTM を用いた。最適化法はSGD を用い,初期学習率は1.0 に設定し減衰率を0.5 としてスケジューリングを行った。
 損失関数のl は1.0 に固定した。単語、ラベルのembedding 初期値は、3つ組の学習データとWikipedia(R)を結合したテキストファイルを基にfastText(非特許文献6参照)を用いて事前に計算したベクトルを用いた。
[非特許文献6] Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. arXiv preprint arXiv:1607.04606, 2016.
<実験結果>
<関係性の推定>
 表2 に関係性の推定(2 値分類)の評価結果を示す。
Figure JPOXMLDOC01-appb-T000020

 
 下層の行には、上記非特許文献2が論文中で報告している中で最も良い精度を示している。ここで+data という行は、学習データを100k から300k に増やした場合の評価である。表2 の結果より、本発明の実施の形態の提案手法は既存手法に比べて精度が向上しており、ConceptNet のデータでは従来研究の最高値を超える結果が得られた。特に、データを増やした条件では2%以上の精度向上が見られ、人間による上限(~0.95) にも近づいている。単独モデル(proposed w/o EncDec) と同時学習モデル(proposed w/EncDec) の比較により、ConceptNet、 Japanese データともに、同時学習によって単独モデルよりも良い精度が得られていることがわかる。これは、関係性推定問題にとってはフレーズ生成問題の損失関数が制約として働き、より良いフレーズベクトルが得られたためと考えられる。
<フレーズ生成>
 表3 に、フレーズ生成モデルの精度を示す。
Figure JPOXMLDOC01-appb-T000021

 
 結果から、ベースラインと関係を考慮したEncoder-decoderモデルで大きな精度差が見られ、関係ラベルを考慮することにより生成の精度が大幅に向上していることがわかる。マルチタスク学習にしたことによるフレーズ生成モデル側の精度向上はあまり見られないが、教師なしデータを追加することによりフレーズ生成モデルの精度も向上させることができる。
 なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 例えば、上述した実施の形態では、関係性推定装置100と関係性推定モデル学習装置150とを別々の装置として構成する場合を例に説明したが、関係性推定装置100と関係性推定モデル学習装置150とを1つの装置として構成してもよい。また、フレーズ生成装置200、300とフレーズ生成モデル学習装置、フレーズ生成関係性推定モデル学習装置とを別々の装置として構成する場合を例に説明したが、フレーズ生成装置200、300とフレーズ生成モデル学習装置とを1つの装置として構成してもよい。
 上述の関係性推定モデル学習装置、関係性推定装置、フレーズ生成装置、フレーズ生成モデル学習装置、フレーズ生成関係性推定モデル学習装置は、内部にコンピュータシステムを有しているが、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
10、50、210、310 入力部
20、60、220、320 演算部
21、323 推定部
22、222、322 記憶部
40、90、240、340 出力部
62 学習データ生成部
63 学習部
71 基本解析部
72 フレーズ抽出部
73 接続表現データベース
100 関係性推定装置
150 関係性推定モデル学習装置
200、300 フレーズ生成装置
221 フレーズ生成部

Claims (6)

  1.  フレーズの組み合わせと、フレーズ間の関係性を表わす接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる3つ組を学習データとして用いて、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとに基づいて、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する関係性推定モデルを学習する学習部
     を含むフレーズ生成関係性推定モデル学習装置。
  2.  入力テキストに対するテキスト解析結果に基づいて、フレーズ間の関係性を表わす予め定められた接続表現が含まれる文節と所定の関係にあるフレーズの組み合わせを抽出し、前記抽出されたフレーズの組み合わせと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる3つ組を作成する学習データ生成部を更に含み、
     前記学習部は、前記学習データ生成部によって作成された前記3つ組を学習データとして用いて、前記フレーズ生成モデル及び前記関係性推定モデルを学習する請求項1記載のフレーズ生成関係性推定モデル学習装置。
  3.  入力フレーズと、フレーズ間の関係性を表わす接続表現又は関係ラベルとの少なくとも一方とからなる2つ組を受け付ける入力部と、
     フレーズをベクトルに変換する予め学習されたエンコーダを用いて、前記入力フレーズをベクトルに変換し、
     前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成する予め学習されたデコーダを用いて、前記変換されたベクトルと、入力された前記接続表現又は前記関係ラベルとから、前記入力フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するフレーズ生成部と、
     前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する予め学習された関係性推定モデルを用いて、前記2つ組と前記生成されたフレーズとからなる3つ組から、前記関係スコアを出力する推定部と、
     を含むフレーズ生成装置。
  4.  学習部が、フレーズの組み合わせと、フレーズ間の関係性を表わす接続表現又は前記接続表現が表す関係性を示す関係ラベルの少なくとも一方とからなる3つ組を学習データとして用いて、フレーズをベクトルに変換するエンコーダ、及び前記変換されたベクトルと、前記接続表現又は前記接続表現が表す関係性を示す関係ラベルとに基づいて、前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成するデコーダを含むフレーズ生成モデル、並びに、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する関係性推定モデルを学習する
     フレーズ生成関係性推定モデル学習方法。
  5.  入力部が、入力フレーズと、フレーズ間の関係性を表わす接続表現又は関係ラベルとの少なくとも一方とからなる2つ組を受け付け、
     フレーズ生成部が、フレーズをベクトルに変換する予め学習されたエンコーダを用いて、前記入力フレーズをベクトルに変換し、
     前記フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成する予め学習されたデコーダを用いて、前記変換されたベクトルと、入力された前記接続表現又は前記関係ラベルとから、前記入力フレーズに対して前記接続表現又は前記関係ラベルが表す関係性を有するフレーズを生成し、
     推定部が、前記エンコーダを用いて変換される、フレーズの組み合わせに含まれる各フレーズを表すベクトルと、前記接続表現又は前記関係ラベルを表すベクトルから、関係スコアを出力する予め学習された関係性推定モデルを用いて、前記2つ組と前記生成されたフレーズとからなる3つ組から、前記関係スコアを出力する
     フレーズ生成方法。
  6.  コンピュータを、請求項1又は2記載のフレーズ生成関係性推定モデル学習装置又は請求項3記載のフレーズ生成装置を構成する各部として機能させるためのプログラム。
PCT/JP2019/008245 2018-03-02 2019-03-01 フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム WO2019168189A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/977,049 US11568132B2 (en) 2018-03-02 2019-03-01 Phrase generation relationship estimation model learning device, phrase generation device, method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-038055 2018-03-02
JP2018038055A JP7139626B2 (ja) 2018-03-02 2018-03-02 フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム

Publications (1)

Publication Number Publication Date
WO2019168189A1 true WO2019168189A1 (ja) 2019-09-06

Family

ID=67805823

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/008245 WO2019168189A1 (ja) 2018-03-02 2019-03-01 フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム

Country Status (3)

Country Link
US (1) US11568132B2 (ja)
JP (1) JP7139626B2 (ja)
WO (1) WO2019168189A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795934A (zh) * 2019-10-31 2020-02-14 北京金山数字娱乐科技有限公司 语句分析模型的训练方法及装置、语句分析方法及装置
US20220108085A1 (en) * 2020-10-01 2022-04-07 Shrey Pathak Automated Patent Language Generation

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7358748B2 (ja) * 2019-03-01 2023-10-11 富士通株式会社 学習方法、抽出方法、学習プログラムおよび情報処理装置
JP7444625B2 (ja) 2020-02-03 2024-03-06 株式会社野村総合研究所 質問回答装置
EP4131056A4 (en) * 2020-04-30 2023-04-26 Mitsubishi Electric Corporation DEVICE, METHOD AND PROGRAM FOR GENERATION OF TRAINING DATA
US11983205B2 (en) * 2021-02-01 2024-05-14 Adobe Inc. Semantic phrasal similarity
CN113342943B (zh) * 2021-08-05 2021-12-07 北京明略软件系统有限公司 一种分类模型的训练方法和装置

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016170636A (ja) * 2015-03-12 2016-09-23 日本電信電話株式会社 接続関係推定装置、方法、及びプログラム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6721179B2 (ja) * 2016-10-05 2020-07-08 国立研究開発法人情報通信研究機構 因果関係認識装置及びそのためのコンピュータプログラム
US10380983B2 (en) * 2016-12-30 2019-08-13 Google Llc Machine learning to generate music from text
US10915817B2 (en) * 2017-01-23 2021-02-09 Fotonation Limited Method of training a neural network
CN109844743B (zh) * 2017-06-26 2023-10-17 微软技术许可有限责任公司 在自动聊天中生成响应
US10642846B2 (en) * 2017-10-13 2020-05-05 Microsoft Technology Licensing, Llc Using a generative adversarial network for query-keyword matching

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016170636A (ja) * 2015-03-12 2016-09-23 日本電信電話株式会社 接続関係推定装置、方法、及びプログラム

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NISHIMURA, KAZUMA ET AL.: "Answer Sentence Generation Method Using Statistical Machine Translation in a Speech-Oriented Guidance System", IPSJ SIG TECHNICAL REPORT, August 2011 (2011-08-01), pages 1 - 6 *
OHKAWA, YOSHIKI ET AL.: "Proposal of a language model for generating response sentence that estimates the emotions of interlocutors", PROCEEDINGS OF THE 29TH ANNUAL CONFERENCE OF JSAI, 30 May 2015 (2015-05-30), pages 1 - 2 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795934A (zh) * 2019-10-31 2020-02-14 北京金山数字娱乐科技有限公司 语句分析模型的训练方法及装置、语句分析方法及装置
CN110795934B (zh) * 2019-10-31 2023-09-19 北京金山数字娱乐科技有限公司 语句分析模型的训练方法及装置、语句分析方法及装置
US20220108085A1 (en) * 2020-10-01 2022-04-07 Shrey Pathak Automated Patent Language Generation
US11972225B2 (en) * 2020-10-01 2024-04-30 Shrey Pathak Automated patent language generation

Also Published As

Publication number Publication date
JP7139626B2 (ja) 2022-09-21
US11568132B2 (en) 2023-01-31
US20210042469A1 (en) 2021-02-11
JP2019153093A (ja) 2019-09-12

Similar Documents

Publication Publication Date Title
WO2019168189A1 (ja) フレーズ生成関係性推定モデル学習装置、フレーズ生成装置、方法、及びプログラム
CN108733792B (zh) 一种实体关系抽取方法
CN107798140B (zh) 一种对话系统构建方法、语义受控应答方法及装置
Yao et al. Bi-directional LSTM recurrent neural network for Chinese word segmentation
Tien et al. Sentence modeling via multiple word embeddings and multi-level comparison for semantic textual similarity
JP6603828B1 (ja) フレーズ生成モデル学習装置、フレーズ生成装置、方法、及びプログラム
CN110704576B (zh) 一种基于文本的实体关系抽取方法及装置
CN109308353B (zh) 词嵌入模型的训练方法及装置
CN113704416B (zh) 词义消歧方法、装置、电子设备及计算机可读存储介质
CN111027595A (zh) 双阶段语义词向量生成方法
Imaduddin et al. Word embedding comparison for indonesian language sentiment analysis
CN110532395B (zh) 一种基于语义嵌入的词向量改进模型的建立方法
WO2019160096A1 (ja) 関係性推定モデル学習装置、方法、及びプログラム
Sartakhti et al. Persian language model based on BiLSTM model on COVID-19 corpus
CN113255320A (zh) 基于句法树和图注意力机制的实体关系抽取方法及装置
CN112559723A (zh) 一种基于深度学习的faq检索式问答构建方法及系统
CN108536781B (zh) 一种社交网络情绪焦点的挖掘方法及系统
CN116049387A (zh) 一种基于图卷积的短文本分类方法、装置、介质
CN114564563A (zh) 一种基于关系分解的端到端实体关系联合抽取方法及系统
CN104572632B (zh) 一种确定具有专名译文的词汇的翻译方向的方法
Başarslan et al. Sentiment analysis with ensemble and machine learning methods in multi-domain datasets
Nazarizadeh et al. Using Group Deep Learning and Data Augmentation in Persian Sentiment Analysis
Hu et al. A cross-media deep relationship classification method using discrimination information
CN115329075A (zh) 基于分布式机器学习的文本分类方法
Du et al. Sentiment classification via recurrent convolutional neural networks

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19760712

Country of ref document: EP

Kind code of ref document: A1