WO2020235024A1 - 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム - Google Patents

情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム Download PDF

Info

Publication number
WO2020235024A1
WO2020235024A1 PCT/JP2019/020174 JP2019020174W WO2020235024A1 WO 2020235024 A1 WO2020235024 A1 WO 2020235024A1 JP 2019020174 W JP2019020174 W JP 2019020174W WO 2020235024 A1 WO2020235024 A1 WO 2020235024A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
learning
word
embedded vector
processing
Prior art date
Application number
PCT/JP2019/020174
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 US17/610,589 priority Critical patent/US20220215182A1/en
Priority to PCT/JP2019/020174 priority patent/WO2020235024A1/ja
Priority to JP2019569849A priority patent/JP6772394B1/ja
Publication of WO2020235024A1 publication Critical patent/WO2020235024A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation
    • G06F40/44Statistical methods, e.g. probability models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of 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

Definitions

  • the present invention relates to an information learning device, an information processing device, an information learning method, an information processing method and a program.
  • Non-Patent Document 1 In recent research on neural machine translation, subword units (subwords) are becoming widely used (for example, Non-Patent Document 1). There are several advantages to using subword units in neural machine translation, but the biggest reason for using subword units is to deal with unknown word problems during language generation. In the conventional neural machine translation, since the method of generating the word itself is performed, it is basically impossible to generate the word that does not appear in the training data. On the other hand, when the partial word unit is used, all the words that can be composed in the partial word unit can theoretically be generated, and the number of vocabularies that the system can theoretically generate can be explosively increased.
  • rare words for example, words that appear less than 5 times in training data are generally replaced with unknown words.
  • unknown words do not occur. Therefore, the learning of the embedded vector (embedded matrix) corresponding to the unknown word is not performed.
  • characters that are not included in the training data are included in the input sentence at the time of task execution (inference). In this case, an appropriate embedding vector cannot be assigned to such a character or a character string (word or the like) including the character.
  • the above problem is not limited to neural machine translation in a narrow sense (language translation), but is also common to neural machine translation in a broad sense (a series conversion model that outputs some series by inputting a sentence).
  • the sequence conversion model also includes, for example, document summarization, parsing, and response sentence generation.
  • the present invention has been made in view of the above points, and an object of the present invention is to improve the conversion accuracy of a series conversion model including unknown words.
  • the information learning device sets a first embedded vector related to the processing unit and a second embedded vector corresponding to the unknown word for each processing unit constituting the input sequence included in the learning data. Based on this, a generation unit that generates a third embedded vector, an execution unit that executes processing based on the parameters to be learned by inputting the third embedding vector generated for each processing unit, and the execution unit. It has a learning unit that learns the parameters based on the error with respect to the output corresponding to the input sequence in the learning data.
  • FIG. 1 is a diagram showing a hardware configuration example of the conversion device 10 according to the first embodiment.
  • the conversion device 10 of FIG. 1 includes a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, and the like, which are connected to each other by a bus B, respectively.
  • the program that realizes the processing in the conversion device 10 is provided by a recording medium 101 such as a CD-ROM.
  • a recording medium 101 such as a CD-ROM.
  • the program is installed in the auxiliary storage device 102 from the recording medium 101 via the drive device 100.
  • the program does not necessarily have to be installed from the recording medium 101, and may be downloaded from another computer via the network.
  • the auxiliary storage device 102 stores the installed program and also stores necessary files, data, and the like.
  • the memory device 103 reads and stores the program from the auxiliary storage device 102 when the program is instructed to start.
  • the CPU 104 executes the function related to the conversion device 10 according to the program stored in the memory device 103.
  • the interface device 105 is used as an interface for connecting to a network.
  • FIG. 2 is a diagram showing an example of a functional configuration at the time of translation of the conversion device 10 according to the first embodiment.
  • the conversion device 10 has a preprocessing unit 11, an analysis unit 12, and the like. Each of these parts is realized by a process of causing the CPU 104 to execute one or more programs installed in the conversion device 10.
  • the analysis unit 12 is used in "Luong, M.-T., Pham, H., and Manning, C.D .: Effective Approaches to Attention-based Neural Machine Translation, in Proceedings of EMNLP (2015)”.
  • RNN encoder model with attention mechanism (“Bahdanau, D., Cho, K., and Bengio, Y .: Neural Machine Translation by Jointly Learning to Align and Translate, inProceedings of IC”
  • a neural machine based on a trained model (a neural network in which parameters to be trained (hereinafter referred to as "learning parameters") are set) based on "2015)"), based on subword units related to input sentences.
  • Perform a translation eg, a natural language translation
  • the analysis unit 12 includes a coding unit 121 and a decoding unit 122.
  • the encoding unit 121 functions as an encoder / decoder model or an encoder of a series conversion model.
  • the decoding unit 122 functions as a decoder for the model.
  • Is described as (y i ) J j 1 .
  • I is the number of words included in the input sentence
  • J is the number of words included in the output sentence.
  • the baseline model will be described with words as processing units.
  • ⁇ (s) ( ⁇ ) be a function representing all the processing of the encoder composed of RNN.
  • E is an embedded matrix of the encoder of the baseline model.
  • the embedded matrix E is a weighted matrix and constitutes learning parameters. That is, E is sequentially updated at the time of learning.
  • the baseline model decoder (+ attention mechanism) will be explained.
  • the decoder uses the K best beam search (beam-search) to acquire the output sequence ⁇ Y (approximate solution) that maximizes the appearance probability when the input sequence X is given.
  • the search is performed while holding K output candidates at each processing time j.
  • the process of selecting the vocabulary to be generated at each process time j will be described.
  • a calculation is performed using the following equation (3).
  • F is an embedded matrix of the encoder of the baseline model.
  • the embedded matrix F is a weighted matrix and constitutes learning parameters. That is, F is sequentially updated at the time of learning.
  • the word with the highest probability of kth predicted at the processing time j-1 to ⁇ y j-1, k (where ⁇ y corresponds to the symbol to which the upper ⁇ of y is added in the mathematical formula). Let it be a one-hot vector corresponding to. However, for all k, ⁇ y (k) 0, k is always a one-hot vector corresponding to the special word BOS.
  • the decoder uses the resulting embedding vectors f j, the vector z j of the last hidden layer, k is calculated using Equation (4) below using the attention mechanism and RNN.
  • RNNAttn is a function that receives the input vectors f j and k and represents all the processes of calculating the vectors z j and k of the final hidden layer using the RNN and the attention mechanism.
  • the decoder from the vector z j of the resulting final hidden layer, the a reference for selecting words to generate scores calculated using the following equation (5).
  • the decoder After that, the decoder performs the K best beam search process to obtain the top K candidates at the process time j.
  • the conversion device 10 of the present embodiment has a preprocessing unit 11. Therefore, first, the preprocessing unit 11 will be described.
  • the pre-processing unit 11 executes pre-processing on an input sentence such as a sentence.
  • the input sentence is divided into arbitrary processing units (words, etc.), and an embedded vector (distributed expression) for the processed units after the division is obtained.
  • a plurality of layers of partial word units related to the processing unit are used for generating (deriving) the embedded vector of each processing unit.
  • the partial word unit in the present embodiment is determined by a method using BPE (byte-pair encoding) (Non-Patent Document 1).
  • the input sentence is divided into the finest parts (characters), and each subword (including the character) is sequentially merged (combined) to gradually assemble the subword from character to word. Will be done.
  • the process of assembling the process ends when the predetermined number of merges is reached.
  • the value of the number of merges (m) is a hyperparameter, and a value that is empirically considered to be good by human hands is used.
  • values of several thousand to tens of thousands are often used as m, and values of 1,000 or less and 100,000 or more tend to be rarely used. This is not expected to be very effective when the number of merges is small, because it is close to character-by-character processing and the amount of semantic information that each character has is limited, and when the number of merges is large. Is similar to word-by-word processing, and it is possible that the meaning of introducing partial words diminishes. For this reason, assuming that the number of vocabularies required for translation is millions, empirically, it seems reasonable to set the number of merges to thousands to tens of thousands.
  • BPE As a characteristic of BPE, when the number of merges is 0, it matches the processing in character units, and when the number of merges is infinite, it becomes the same as in word units. Therefore, if the methodology using partial word units is organized from the viewpoint of BPE, it can be regarded as a methodology that transitions from character unit processing to word unit processing in a stepwise (hierarchical) manner with discrete values from the viewpoint of the number of merges. it can. In other words, BPE can be regarded as a framework that includes both character-based processing and word-based processing due to its nature.
  • partial word unit is used as a concept that includes not only a part of a word that comes to mind intuitively but also the state of the word itself and the character unit.
  • the lower subword unit having a relatively small m is included in the upper subword unit having a large m. Therefore, the portion having a relatively small m with respect to the subword unit having the largest m.
  • the word unit is uniquely determined.
  • FIG. 3 is a diagram for explaining the characteristics of the subword units generated by BPE.
  • FIG. 3 an example of a subword unit of the character string "Britney" is shown.
  • m 1 , m 2 , and m 3 indicate specific values of the number of merges m, and have a relationship of m 1 ⁇ m 2 ⁇ m 3 .
  • the lower figure of FIG. 3 shows an example of information generated during coding by the coding unit 121.
  • the symbol "@@" in the figure is a special symbol inserted to indicate that the original word unit is obtained by combining with the following subword unit.
  • the subword unit having a relatively large number of merges m completely includes any one or more subword units having a relatively small number of merges m (in other words, the number of merges m).
  • a subword unit having a relatively large number of times is composed of a combination of one or more subword units having a relatively small number of merge times m).
  • the subword unit with a relatively small number of merges is uniquely determined with respect to the subword unit with a relatively large number of merges.
  • being uniquely determined means that there is no randomness. That is, it means that the value does not change every time the calculation is performed.
  • the pre-processing unit 11 generates a partial word unit from the input sentence by using the mapping function.
  • the preprocessing unit 11 of the present embodiment generates a subword unit for a plurality of types of merge times, not for a single subword unit for the number of merges. That is, the preprocessing unit 11 hierarchically generates subword units for each word, and generates an embedding vector for the word based on each subword unit.
  • FIG. 4 is a diagram showing a model configuration example of the coding unit 121 and the decoding unit 122 according to the first embodiment.
  • each input layer of the coding unit 121 and the decoding unit 122 are expanded. More specifically, each input layer is expanded so that it can handle subword units of a plurality of layers (subword units having a plurality of types of merges).
  • FIG. 4 shows an example in which the coding unit 121 can be input in units of three layers of partial words, and the decoding unit 122 can be input in units of partial words in two layers.
  • the decoding unit 122 It is also conceivable to modify the output of the decoding unit 122 so that it outputs a partial word unit of a plurality of layers. This can be technically easily dealt with if it is considered as a setting for multitask learning, but the decoding unit 122 performs a process of sequentially repeating word prediction, so that the consistency between a plurality of prediction results is achieved. In order to secure the above, a constrained decryption process or the like is required. This is not dealt with in this embodiment because the decoding process at the time of learning and evaluation becomes complicated. Therefore, in the present embodiment, the basic policy is to modify the input layers of the coding unit 121 and the decoding unit 122 while ensuring that the output portion of the decoding unit 122 does not need to be changed.
  • the extension of the input part of the decoding unit 122 is as follows.
  • the equation (3) is changed to the equation (7).
  • F r is an embedded matrix of the decoding unit 122
  • the embedded matrix Fr is a weighted matrix and constitutes learning parameters. That is, Fr is sequentially updated at the time of learning.
  • ⁇ r ( ⁇ y j-1, k ) is set in advance using the prediction result ⁇ y j-1, k as a key.
  • the target subword unit is uniquely determined, and the subword unit can be easily obtained. That is, the extension of the input portion of the decoding unit 122 is characterized by a partial word unit that can be uniquely determined by the mapping function from now on because the prediction result of the decoding unit 122 is ⁇ y j-1, k. It is equivalent to using it.
  • the expansion of the input portion on the encoding unit 121 side is as follows.
  • E q is the embedded matrix of the coding unit 121
  • the embedded matrix Eq is a weighted matrix and constitutes learning parameters. That is, Eq is sequentially updated at the time of learning.
  • ⁇ q (x i ) like ⁇ r ( ⁇ y j-1, k ), represents a mapping function that can be uniquely derived from x i , and returns a binary vector whose elements take 0 or 1. That is, the binary vector returned by phi q ( ⁇ ), the elements of each partial word units x i when the merge number is q is a binary vector is 1. If there are a plurality of types of q, the sum of the plurality of types of embedded vectors calculated for xi (sum of the elements) is calculated in the equation (8). In other words, such an operation is synonymous with that shown in FIG.
  • FIG. 5 is a diagram for explaining an extension of the coding unit 121.
  • the left side corresponds to the equation (1) and the right side corresponds to the equation (8).
  • the vector (x i ) multiplied by the embedded matrix E is a one-hot vector representation
  • the vector multiplied by the embedded matrix E q is each part of x i with respect to q.
  • is a binary vector elements of a word unit is 1 ( ⁇ q (x i) ). Therefore, the binary vector can have a plurality of elements of 1.
  • e i, q is an embedded vector for q with respect to the input words w i.
  • equation (8) e i for all q, the sum of q, the embedding vector e i for the input word w i.
  • FIG. 6 is a diagram showing an example of a functional configuration at the time of learning of the conversion device 10 according to the first embodiment.
  • the same parts as those in FIG. 2 are designated by the same reference numerals, and the description thereof will be omitted.
  • the conversion device 10 further includes a sampling unit 13 and a parameter learning unit 14. Each of these parts is realized by a process of causing the CPU 104 to execute one or more programs installed in the conversion device 10.
  • the sampling unit 13 samples (extracts) the learning data for one learning process from the learning data group D.
  • the learning data is a set of an input sequence (input sentence) X and an output sequence (output sentence) Y corresponding to the X (which is the correct answer for the X).
  • the parameter learning unit 14 learns each learning model (learning parameter group) of the coding unit 121 and the decoding unit 122 based on the learning data.
  • the conversion device 10 at the time of learning and the conversion device 10 at the time of inference may be configured by using a different computer.
  • FIG. 7 is a flowchart for explaining an example of the processing procedure of the learning process executed by the conversion device 10 in the first embodiment.
  • step S101 the pre-processing unit 11 samples a part of the learning data (hereinafter, referred to as "target learning data") from the learning data group D prepared in advance. Sampling may be performed using a known method.
  • the pre-processing unit 11 divides the input series (input sentence) of the target learning data into arbitrary processing units (for example, word units) (S102).
  • the pre-processing unit 11 converts each processing unit of the input series into an embedded vector using equation (8) (S103).
  • the hierarchy of q in the equation (8) (that is, the number of BPE merges) is preset as a hyperparameter.
  • the coding unit 121 takes a series of embedded vectors of each processing unit as an input, and executes a coding calculation by a known method (S104).
  • the decoding unit 122 takes the calculation result by the coding unit 121 (for example, the calculation result of the recursive layer of the coding unit 121) as an input, and executes the decoding calculation by a known method (S105).
  • the equation (7) is applied to the processing unit output from the decoding unit 122 for the j-1st processing unit. Is calculated.
  • the hierarchy of r in the equation (7) (that is, the number of BPE merges) is preset as a hyperparameter.
  • the layer of r may be the same as the layer of q, or may be different.
  • the embedding vector based on the hierarchical subword unit can be obtained for the processing unit.
  • the prediction result (inference result) of the j-th processing unit is obtained based on the embedded vector and the equations (4) to (6).
  • the parameter learning unit 14 outputs a loss function (that is, output of the target learning data) by a known method based on the prediction result of the output series which is the processing result by the decoding unit 122 and the output series of the target learning data.
  • the series (output statement) and the prediction result of the output series, which is the calculation result by the decoder 122, are calculated (S106).
  • the parameter learning unit 14 determines whether or not the calculation result of the loss function satisfies a predetermined convergence condition (S107).
  • the parameter learning unit 14 determines the learning parameters of the coding unit 121 and the decoding unit 122 by a known method based on the calculation result.
  • Update (S108) In this case, steps S101 and subsequent steps are repeated based on the updated learning parameters.
  • the parameter learning unit 14 assists the learning parameters of the coding unit 121 and the decoding unit 122 at this time, for example. It is stored in a storage device 102 or the like (S109). As a result, the coding unit 121 and the decoding unit 122 become a trained neural network.
  • step S101 the input sentence X to be translated is input in step S101, and the output sentence Y of the translation result is output in step S105. Step S106 and subsequent steps are not executed.
  • unknown words such as "Britney Spears” or low-frequency words can be correctly translated (generated).
  • subword units of various numbers and lengths are generated for one processing unit.
  • the subword unit may be hierarchized for only one of the input unit 121 and the decoding unit 122. That is, for the other, a subword unit having a single number of merges may be input.
  • BPE is adopted as a method for generating a partial word unit.
  • the BPE is characterized in that the subword unit having a relatively long character string length always includes the subword unit having a relatively short character string length.
  • the first embodiment can be applied to a series conversion model other than neural machine translation (for example, document summarization, parsing, response sentence generation, etc.).
  • FIG. 8 is a diagram showing a model configuration example of the coding unit 121 and the decoding unit 122 in the second embodiment. That is, in the second embodiment, FIG. 4 is replaced with FIG.
  • the coding unit 121 is extended so that subword units of a plurality of layers can be input.
  • the equation (1) is replaced by the following equation (9). That is, in the second embodiment, pre-processing unit 11, the embedding vector e i for the input word w i, is calculated by the following equation (9).
  • x i is one-hot vector representation of the input word w i
  • the decoding unit 122 in FIG. 8 outputs an S-expression of the syntax tree corresponding to the input sentence.
  • a known decoder may be used for the decoding unit 122 that outputs the S-expression.
  • the decoding unit 122 in FIG. 8 has a POS tag based on the general knowledge that the multi-task learning extension often improves task performance if an effective auxiliary task related to the target task can be found.
  • POS tags by incorporating a linearized form without normalization of are configured to be jointly inferred as ancillary tasks.
  • the scores in the linearized form with and without POS tag normalization are estimated independently and simultaneously as o j and a j in the output layer of the decoding unit 122 by the following equations. To.
  • W (o) is a decoder output matrix for the output vocabulary by POS tag normalization.
  • W (a) is a decoder output matrix for the output vocabulary without POS tag normalization.
  • the third embodiment will explain the differences from the second embodiment.
  • the points not particularly mentioned in the third embodiment may be the same as those in the second embodiment.
  • rare words for example, words that appear less than 5 times in the training data are generally replaced with unknown words.
  • unknown words are not generated. Therefore, the learning of the embedded vector (embedded matrix) corresponding to the unknown word is not performed.
  • characters that are not included in the training data are included in the input sentence at the time of task execution (inference). In this case, an appropriate embedding vector cannot be assigned to such a character or a character string (word or the like) including the character.
  • FIG. 9 is a diagram showing a model configuration example of the coding unit 121 and the decoding unit 122 according to the third embodiment. In FIG. 9, the difference from FIG. 8 will be described.
  • pre-processing unit 11 calculates the embedding vector e i for the input word w i using the following equation (11).
  • Equation (11) is modified as shown in the following equation (12).
  • Embedding vectors e i for the input word w i is that learning is calculated based on equation (11) takes place, the whole one-hot vector representation to, play the role of certain bias for unknown words ..
  • the embedded vector of the unknown word with average characteristics is learned for all vocabularies (that is, Eq is It is presumed that this is because it is learned).
  • Eq is It is presumed that this is because it is learned.
  • the fourth embodiment will be described.
  • the fourth embodiment will be described as different from the third embodiment.
  • the points not particularly mentioned in the fourth embodiment may be the same as those in the third embodiment.
  • FIG. 10 is a diagram showing a model configuration example of the coding unit 121 and the decoding unit 122 according to the fourth embodiment. In FIG. 10, the difference from FIG. 10 will be described.
  • the partial word unit is not input to the coding unit 121.
  • embedding vectors x of the input word w i' is added to i. That is, in the fourth embodiment, pre-processing unit 11 calculates the embedding vector e i for the input word w i using the following equation (13).
  • the embedded vector (UNK bias) u' may be added to the unknown word even for the model in which the partial word unit is not input. By doing so, the same effect as that of the third embodiment can be expected for such a model.
  • each of the above embodiments may be applied not only to a model used as a encoder and a decoder set such as the Encoder-decoder model, but also to a model in which the encoder is used alone. Further, each of the above embodiments may be applied to a model in which the decoder is replaced with a determination device.
  • the conversion device 10 has a determination unit that functions as a determination device instead of the decoding unit 122.
  • the output from the judgment unit is not the output series (output statement) but the judgment result.
  • a sentence is input to determine whether or not it is a question sentence (binary classification), and a sentence is input to estimate which of the predetermined categories the sentence belongs to (many). Classification) and so on.
  • the conversion device 10 is an example of an information processing device and an information learning device.
  • the pre-processing unit 11 is an example of a generation unit.
  • the coding unit 121 or the decoding unit 122 is an example of an execution unit.
  • the parameter learning unit 14 is an example of the learning unit.
  • Input word w i of the embedding vector x 'i, the embedding vector s of each partial word units of the input word w i' q is an example of a first embedded vector.
  • the embedded vector u' is an example of a second embedded vector.
  • Vector e i embedded in the third embodiment and the fourth embodiment is an example of a third embedding vectors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Machine Translation (AREA)

Abstract

情報学習装置は、学習データに含まれる入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成部と、前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習対象のパラメータに基づく処理を実行する実行部と、前記実行部による処理結果について、前記学習データにおいて前記入力系列に対応する出力に対する誤差に基づいて、前記パラメータを学習する学習部と、を有することで未知語を含む系列変換モデルの変換精度を向上させる。

Description

情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム
 本発明は、情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラムに関する。
 近年のニューラル機械翻訳の研究では、部分単語単位(subword)が広く用いられるようになりつつある(例えば、非特許文献1)。ニューラル機械翻訳において部分単語単位を用いる利点はいくつか考えられるが、部分単語単位を用いる最も大きな理由は、言語生成時の未知語問題への対応である。従来のニューラル機械翻訳では、単語そのものを生成する方式で行なっていたため、基本的に学習データに出現しない単語を生成することは不可能であった。一方、部分単語単位を用いると、部分単語単位で構成できる単語は理論的には全て生成可能となり、システムが理論的に生成可能な語彙数を爆発的に増やすことが可能となる。
Sennrich, R., Haddow, B., and Birch, A.: Neural Machine Translation of Rare Words with Subword Units, in Proceedings of ACL, pp. 1715-1725 (2016)
 ニューラル機械翻訳において、希少語(低頻度語)、例えば、訓練データ中に5回未満しか出現しない単語は、一般に未知語に置換される。しかし、部分単語単位を用いる場合、未知語が発生しなくなる。したがって、未知語に対応する埋め込みベクトル(埋め込み行列)の学習が行われなくなる。一方で、学習データに含まれていない文字がタスクの実行時(推論時)の入力文に含まれている可能性が有る。この場合、このような文字又は当該文字を含む文字列(単語等)に対して適切な埋め込みベクトルを割り当てることができなくなる。
 また、部分単語文字列が用いられない場合であっても、未知語に対応する埋め込みベクトルは、次の理由でうまく学習できないと考えられる。(1)未知語は、希少語の明らかな置き換えであるため、学習データ内における未知語の発生は比較的少ない。(2)系列変換モデルは希少な単語の訓練には比較的効果がない。
 なお、上記の課題は、狭義のニューラル機械翻訳(言語の翻訳)だけに限られず、広義のニューラル機械翻訳(文を入力として、何かしらの系列を出力する系列変換モデル)にも共通である。系列変換モデルには、狭義のニューラル機械翻訳の他、例えば、文書要約や、構文解析、及び応答文生成等もその範疇に含まれる。
 本発明は、上記の点に鑑みてなされたものであって、未知語を含む系列変換モデルの変換精度を向上させることを目的とする。
 そこで上記課題を解決するため、情報学習装置は、学習データに含まれる入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成部と、前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習対象のパラメータに基づく処理を実行する実行部と、前記実行部による処理結果について、前記学習データにおいて前記入力系列に対応する出力に対する誤差に基づいて、前記パラメータを学習する学習部と、を有する。
 未知語を含む系列変換モデルの変換精度を向上させることができる。
第1の実施の形態における変換装置10のハードウェア構成例を示す図である。 第1の実施の形態における変換装置10の翻訳時の機能構成例を示す図である。 BPEによって生成される部分単語単位の特性を説明するための図である。 第1の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。 符号化器の拡張を説明するための図である。 第1の実施の形態における変換装置10の学習時の機能構成例を示す図である。 第1の実施の形態における変換装置10が実行する学習処理の処理手順の一例を説明するためのフローチャートである。 第2の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。 第3の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。 第4の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。
 以下、図面に基づいて第1の実施の形態を説明する。図1は、第1の実施の形態における変換装置10のハードウェア構成例を示す図である。図1の変換装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、及びインタフェース装置105等を有する。
 変換装置10での処理を実現するプログラムは、CD-ROM等の記録媒体101によって提供される。プログラムを記憶した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。
 メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従って変換装置10に係る機能を実行する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。
 図2は、第1の実施の形態における変換装置10の翻訳時の機能構成例を示す図である。図2において、変換装置10は、事前処理部11及び解析部12等を有する。これら各部は、変換装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。
 解析部12は、「Luong, M.-T., Pham, H., and Manning, C. D.: Effective Approaches to Attention-based Neural Machine Translation, in Proceedings of EMNLP (2015)」で用いられている注意機構(attention mechanism)付きのRNN符号化/復号化器モデル(「Bahdanau, D., Cho, K., and Bengio, Y.: Neural Machine Translation by Jointly Learning to Align and Translate, in Proceedings of ICLR (2015)」)をベースラインモデルとする学習済みモデル(学習対象のパラメータ(以下、「学習パラメータ」という。)が設定されたニューラルネットワーク)に基づいて、入力文に関する部分単語単位に基づいてニューラル機械翻訳(例えば、自然言語の翻訳)を実行して、出力文を生成する。
 図2において、解析部12は、符号化部121及び復号化部122を含む。符号化部121は、符号化器/復号化器モデル(Encoder-decorder model)又は系列変換モデルの符号化器(enncoder)として機能する。復号化部122は、当該モデルの復号化器(decoder)として機能する。
 まず、ベースラインモデルにおける符号化器及び復号化器について定式化し、その後、本実施の形態における符号化部121及び復号化部122における符号化器及び復号化器に関する拡張について述べる。以下の説明において、X=(x i=1を入力系列(入力文)、Y=(y j=1を出力系列(出力文)とする。xは、i番目の入力単語wに対応するone-hotベクトル表現、yは、j番目の出力単語wに対応するone-hotベクトル表現である。また、one-hotベクトルのリスト(x,...,x)を、(x i=1と記述し、one-hotベクトルのリスト(y,...,y)を、(y j=1と記述する。Iは、入力文に含まれる単語数であり、Jは、出力文に含まれる単語数である。なお、ベースラインモデルについては、単語を処理単位として説明する。
 ベースラインモデルの符号化器について説明する。Ω(s)(・)をRNNで構成される符号化器の全ての処理を表す関数とする。この場合、符号化器は、以下の式(1)及び(2)によって示されるように、入力X=(x i=1を受け取って隠れ状態ベクトルのリストH=(h i=1を返す処理を実行する。
Figure JPOXMLDOC01-appb-M000001
但し、Eは、ベースラインモデルの符号化器の埋め込み行列である。埋め込み行列Eは重み付きの行列であり、学習パラメータを構成する。すなわち、Eは、学習時において逐次更新される。
 ベースラインモデルの復号化器(+注意機構(attention))について説明する。復号化器は、Kベストビーム探索(beam-search)を用いて、入力系列Xが与えられたときの出現確率が最大となる出力系列^Y(の近似解)を獲得する。ビーム探索では、各処理時刻jでK個の出力候補を保持しながら探索を行う。ここでは、各処理時刻jにおいて、生成する語彙を選択する処理を述べる。まず、時刻jにおける埋め込みベクトルの取得には、以下の式(3)を用いて計算を行う。
Figure JPOXMLDOC01-appb-M000002
但し、Fは、ベースラインモデルの符号化器の埋め込み行列である。埋め込み行列Fは重み付きの行列であり、学習パラメータを構成する。すなわち、Fは、学習時において逐次更新される。
 この時、~yj-1,k(但し、~yは、数式においてyの上~が付与された記号に対応する。)に処理時刻j-1で予測されたk番目に確率が高い単語に対応するone-hotベクトルとする。但し、全てのkに対して~y(k) 0,kは、必ず特殊単語BOSに対応するone-hotベクトルとする。
 次に、復号化器は、得られた埋め込みベクトルfを使って、RNNと注意機構を用いて最終隠れ層のベクトルzj,kを以下の式(4)を用いて計算する。
Figure JPOXMLDOC01-appb-M000003
ここで、RNNAttnは、入力ベクトルfj,kを受け取って、RNNと注意機構を用いて最終隠れ層のベクトルzj,kを計算する処理全てを表す関数とする。但し、u(j,k)は、処理時刻jにおけるk番目の候補が、処理時刻j-1の時の1からK番目のどの候補から生成されたかを示す値とする。よって、u(j,k)={1,...,K}である。この値は、j-1時刻の時にどのRNNを用いて処理が行われたのかを次の時刻jに伝達する役割を持っている。次に、復号化器は、得られた最終隠れ層のベクトルzから、生成する単語を選択する基準となるスコアを以下の式(5)を用いて計算する。
Figure JPOXMLDOC01-appb-M000004
 その後、復号化器は、Kベストビーム探索の処理を行い、処理時刻jにおける上位K個の候補を得る。
Figure JPOXMLDOC01-appb-M000005
ここで、K個の候補とともに、前述のu(j,k)の情報も取得される。
 学習時は、k=1として予測結果~yj-1,kの代わりに正解yj-1,kを利用することに相当する。
 次に、本実施の形態により拡張される符号化部121及び復号化部122について説明する。符号化器及び復号化器の拡張に伴い、本実施の形態の変換装置10は、事前処理部11を有する。そこで、まず、事前処理部11について説明する。
 事前処理部11は、文章等の入力文に対して事前処理を実行する。本実施の形態では、事前処理として、入力文について、任意の処理単位(単語等)への分割が実行され、分割後の処理単位についての埋め込みベクトル(分散表現)が求められる。本実施の形態では、各処理単位の埋め込みベクトルの生成(導出)に、当該処理単位に関する複数階層の部分単語単位が利用される。本実施の形態における部分単語単位は、BPE(byte-pair encoding )を用いた方法(非特許文献1)によって決定される。
 BPEでは、入力文を最も細かい部品(文字)まで分割し、各部分単語(文字を含む)を逐次的にマージ(結合)することで徐々に文字から単語へ部分単語を組み上げていく処理が実行される。その組み上げの処理に置いて、事前に決められたマージ回数に到達したら処理を終了する。
 一般的には、マージ回数(m)の値はハイパーパラメータであり、人手により経験的に良いと思われる値が用いられる。近年のニューラル機械翻訳では、mとして数千から数万の値が使われることが多く、千以下、十万以上の値はあまり用いられない傾向にある。これは、マージ回数が少ない場合は、文字単位の処理に近く、それぞれの文字が有する意味的な情報量が限定的になるため、あまり効果的ではないと予想され、また、マージ回数が多い場合は、単語単位の処理と近くなり、部分単語を導入した意味が薄れてしまうということが考えられる。このような理由から、翻訳で必要になる語彙数が数百万語彙だと仮定した場合、経験的に数千から数万のマージ回数とするのは妥当な値と考えられる。
 BPEの特性として、マージ回数が0回の場合は、文字単位の処理と一致し、マージ回数を無限大にすると単語単位と同じになる。よって、部分単語単位を用いる方法論をBPEの観点で整理すると、文字単位の処理から単語単位の処理までをマージ回数という観点で、離散値で段階的(階層的)に遷移する方法論と捉えることができる。つまり、BPEは、その性質上、文字単位の処理も単語単位の処理も包含する枠組みと捉えることができる。このことから、第1の実施の形態では、「部分単語単位」という用語は、直感的に思い浮かぶ単語の一部という意味だけではなく、単語そのものや文字単位の状態も含む概念として用いられる。また、第1の実施の形態では、mをBPEのマージ回数を表す変数とし、特に、BPE(m=0)を文字単位を用いる方法、BPE(m=∞)を単語単位を用いる方法を表すこととし、以下においては、文字単位や単語単位の場合を区別せず全て部分単語の文脈で説明を行う。
 BPEでは、相対的にmが小さい下位の部分単語単位は、mが大きい上位の部分単語単位に包含される関係にあるため、最もmが大きい部分単語単位に対し、相対的にmが小さい部分単語単位は一意に決定される。
 図3は、BPEによって生成される部分単語単位の特性を説明するための図である。図3では、「Britney」という文字列の部分単語単位の一例が示されている。図3において、m、m、mは、マージ回数mの具体的な値を示し、m<m<mの関係を有する。
 マージ回数がmの場合、「Britney」の部分単語単位は、「Britney」の1つである例が示されている。マージ回数がmの場合、「Britney」の部分単語単位は、「Bri」、「t」、「ney」の3つである例が示されている。マージ回数がmの場合、「Britney」の部分単語単位は、「B」、「ri」、「t」、「n」、「e」、「y」の5つである例が示されている。
 なお、図3の下側の図は、符号化部121による符号化の際に生成される情報の一例を示す。当該図における記号「@@」は、次の部分単語単位と結合することで元の単語単位になることを示すために挿入される特殊記号である。
 図3に示されるように、マージ回数mが相対的に大きい部分単語単位は、マージ回数mが相対的に小さいいずれか1以上の部分単語単位を完全に包含する(換言すれば、マージ回数mが相対的に大きい部分単語単位は、マージ回m数が相対的に小さい1以上の部分単語単位の組み合わせによって構成される。)。具体的には、マージ回数=mの部分単語単位は、マージ回数=m又はmの1以上の部分単語単位を包含する。マージ回数=mの各部分単語単位は、マージ回数=mの1以上の部分単語単位を包含する。
 したがって、或る文集合(コーパス)について、相対的にマージ回数が大きい部分単語単位に対して、相対的にマージ回数が小さい部分単語単位は、一意に決定される。ここで、一意に決定されるとは、ランダム性が無いことをいう。すなわち、計算するたびに値が変化しないことをいう。
 したがって、BPEでは、部分単語単位をマッピング関数を用いて容易に求めることができる。よって、事前処理部11は、当該マッピング関数を用いて入力文から部分単語単位を生成する。この際、本実施の形態の事前処理部11は、マージ回数が単一の部分単語単位ではなく、複数種類のマージ回数について部分単語単位を生成する。すなわち、事前処理部11は、各単語に対する部分単語単位を階層的に生成し、各部分単語単位に基づいて、当該単語の埋め込みベクトルを生成する。
 続いて、本実施の形態の符号化部121及び復号化部122について説明する。図4は、第1の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。
 図4に示されるように、本実施の形態では、符号化部121及び復号化部122のそれぞれの入力層が拡張される。より具体的には、複数階層の部分単語単位(マージ回数が複数種類の部分単語単位)が取り扱えるようそれぞれの入力層が拡張される。図4では、符号化部121について3階層の部分単語単位の入力が可能とされ、復号化部122について2階層の部分単語単位が入力可能とされた例が示されている。
 なお、復号化部122の出力に対して、複数階層の部分単語単位を出力するように修正することも考えられる。これはマルチタスク学習の設定と考えれば技術的には容易に対応可能であるが、復号化部122では、逐次的に単語予測を繰り返すという処理を行う性質上、複数の予測結果間の整合性を担保するには、制約付きの復号化処理などが必要となる。これは、学習と評価時の復号化(デコード)処理が煩雑になるため、本実施の形態では取り扱わないこととする。よって本実施の形態では、復号化部122の出力部分は変更不要なことを担保した状態で符号化部121及び復号化部122の入力層の修正を行うという考えを基本方針とする。
 この時、復号化部122の入力部分の拡張は以下の通りである。
Figure JPOXMLDOC01-appb-M000006
 すなわち、本実施の形態の復号化部122では、式(3)が式(7)に変更される。但し、Fは復号化部122の埋め込み行列であり、rはマージ回数である。すなわち、Fは、マージ回数=rに対する埋め込み行列である。例えば、復号化部122について図4の通りにマージ回数が設定された場合、r={1000,16k}である。なお、埋め込み行列Frは重み付きの行列であり、学習パラメータを構成する。すなわち、Frは、学習時において逐次更新される。
 前述のように、復号化部122の予測は単一であることを仮定するため、Ψ(~yj-1,k)は、予測結果~yj-1,kをキーとした事前に定義されたマッピング関数を表しており、要素が0又は1をとるバイナリベクトルを返す。すなわち、Ψ(・)によって返されるバイナリベクトルは、マージ回数がrである場合の~yj-1,kの各部分単語単位の要素が1であるバイナリベクトルである。例えば、BPE(m=16k)のrecordという部分単語単位が予測された場合、BPE(m=1k)で「record」の部分単語単位となる「rec」と「ord」とのそれぞれに対応する要素が1であるバイナリベクトルがマッピング関数で引かれるといった処理となる。r={1k,16k}である場合、式(7)では、~yj-1,kについて各rについて算出された埋め込みベクトルの総和(要素同士の総和)が算出される。
 なお、上述したように、相対的にmが小さい部分単語単位は包含関係にあるため、一意に対象となる部分単語単位が決まり、容易に部分単語単位を求めることができる。つまり、上記の復号化部122の入力部分の拡張は、復号化部122の予測結果が~yj-1,k一つであるため、これからマッピング関数で一意に決定できる部分単語単位を特徴として利用していることに相当する。
 同様に、符号化部121側の入力部分の拡張は以下の通りである。
Figure JPOXMLDOC01-appb-M000007
 すなわち、本実施の形態の符号化部121では、式(1)が式(8)に変更される。但し、Eは符号化部121の埋め込み行列であり、qはマージ回数である。すなわち、Eは、マージ回数=qに対する埋め込み行列である。例えば、符号化部121について図4の通りにマージ回数が設定された場合、q={300,1000,16k}である。なお、埋め込み行列Eは重み付きの行列であり、学習パラメータを構成する。すなわち、Eは、学習時において逐次更新される。
 φ(x)は、Ψr(~yj-1,k)と同様に、xから一意に導出可能なマッピング関数を表しており、要素が0又は1をとるバイナリベクトルを返す。すなわち、φ(・)によって返されるバイナリベクトルは、マージ回数がqである場合のxの各部分単語単位の要素が1であるバイナリベクトルである。qが複数通りであれば、式(8)では、xについて算出された複数通りの埋め込みベクトルの総和(要素同士の総和)が算出される。斯かる演算は、換言すれば、図5に示されるものと同義である。
 図5は、符号化部121の拡張を説明するための図である。図5において左側が式(1)に対応し、右側が式(8)に対応する。左側において、埋め込み行列Eに対して乗ぜられるベクトル(x)は、one-hotベクトル表現であるのに対し、右側において埋め込み行列Eに対して乗ぜられるベクトルは、xのqに対する各部分単語単位の要素が1であるバイナリベクトル(φ(x))である。したがって、当該バイナリベクトルは複数の要素が1となりうる。ei,qは、入力単語wに対するqについての埋め込みベクトルである。式(8)によれば、全てのqに対するei,qの総和が、入力単語wに対する埋め込みベクトルeとなる。
 図6は、第1の実施の形態における変換装置10の学習時の機能構成例を示す図である。図6中、図2と同一部分には同一符号を付し、その説明は省略する。
 学習時において、変換装置10は、更に、サンプリング部13及びパラメータ学習部14を有する。これら各部は、変換装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。
 サンプリング部13は、学習データ群Dの中から、1回分の学習処理の学習データをサンプリング(抽出)する。学習データは、入力系列(入力文)Xと、当該Xに対応する(当該Xに対して正解となる)出力系列(出力文)Yとの組みである。
 パラメータ学習部14は、学習データに基づいて、符号化部121及び復号化部122のそれぞれの学習モデル(学習パラメータ群)を学習する。
 なお、学習時の変換装置10と、推論時(タスク(入力系列Xに基づく出力系列Yの生成)の実行時)の変換装置10とは異なるコンピュータを用いて構成されてもよい。
 以下、変換装置10が実行する処理手順について説明する。図7は、第1の実施の形態における変換装置10が実行する学習処理の処理手順の一例を説明するためのフローチャートである。
 ステップS101において、事前処理部11は、予め用意されている学習データ群Dの中から、一部の学習データ(以下、「対象学習データ」という。)をサンプリングする。サンプリングは、公知の方法が用いられて実行されればよい。
 続いて、事前処理部11は、対象学習データの入力系列(入力文)を、任意の処理単位(例えば、単語単位)に分割する(S102)。
 続いて、事前処理部11は、入力系列の各処理単位を式(8)利用して埋め込みベクトルに変換する(S103)。ここで、式(8)のqの階層(すなわち、BPEのマージ回数)は、ハイパーパラメータとして予め設定される。各処理単位について、式(8)を用いて埋め込みベクトルが生成されることにより、各処理単位について、階層的な部分単語単位に基づく埋め込みベクトルが得られる。
 続いて、符号化部121は、各処理単位の埋め込みベクトルの系列を入力として、公知の方法により符号化の計算を実行する(S104)。
 続いて、復号化部122は、符号化部121による計算結果(例えば、符号化部121の再帰層の計算結果)を入力とし、公知の方法により復号化の計算を実行する(S105)。但し、この際、j番目の処理単位について復号化部122に入力される埋め込みベクトルは、j-1番目の処理単位について復号化部122から出力された処理単位に対して式(7)が適用されて計算される。ここで、式(7)のrの階層(すなわち、BPEのマージ回数)は、ハイパーパラメータとして予め設定される。なお、rの階層はqの階層と同じでもよいし、異なっていてもよい。式(7)を用いて埋め込みベクトルが生成されることにより、当該処理単位について、階層的な部分単語単位に基づく埋め込みベクトルが得られる。その後、当該埋め込みベクトルと、式(4)~(6)に基づいて、j番目の処理単位の予測結果(推論結果)が得られる。
 続いて、パラメータ学習部14は、復号化部122による処理結果である出力系列の予測結果と、対象学習データの出力系列とに基づいて、公知の方法により損失関数(すなわち、対象学習データの出力系列(出力文)と、復号化器122による計算結果である出力系列の予測結果との誤差)を計算する(S106)。
 続いて、パラメータ学習部14は、損失関数の計算結果が所定の収束条件を満たしたか否かを判定する(S107)。当該計算結果が当該収束条件を満たしていない場合(S107でNo)、パラメータ学習部14は、当該計算結果に基づいて、公知の方法により符号化部121及び復号化部122のそれぞれの学習パラメータを更新する(S108)。この場合、更新後の学習パラメータに基づいてステップS101以降が繰り返される。
 一方、損失関数の計算結果が所定の収束条件を満たした場合(S107でYes)、パラメータ学習部14は、この時点における符号化部121及び復号化部122のそれぞれの学習パラメータを、例えば、補助記憶装置102等に保存する(S109)。その結果、符号化部121及び復号化部122は、学習済みのニューラルネットワークとなる。
 なお、学習後のタスクの実行時(ニューラル機械翻訳の実行時)には、ステップS101において、翻訳対象の入力文Xが入力され、ステップS105において、翻訳結果の出力文Yが出力される。ステップS106以降が実行されない。
 このように学習された符号化部121及び復号化部122についての実験及び実験結果は、「Makoto Morishita, Jun Suzuki, Masaaki Nagata. Improving Neural Machine Translation by Incorporating Hierarchical Subword Features The 27th International Conference on Computational Linguistics (COLING).」の「4.Experiments」以降に記載されている通りである。例えば、「Table 9」には、フランス語から英語へ機械翻訳について、ベースラインモデルと本実施の形態との翻訳結果が示されている。
 これによれば、本実施の形態では、「Britney Spears」といった未知語又は低頻度語について、正しく翻訳できている(生成できている)ことが分かる。
 上述したように、第1の実施の形態によれば、符号化部121の入力及び復号化部122の入力について、一つの処理単位に対して様々な数及び長さの部分単語単位が生成される。したがって、一つの処理単位について、様々な数及び長さの部分単語単位を階層的に入力することができる。その結果、実験結果に示されるように、系列変換モデルの変換精度を向上させることができる。なお、符号化部121の入力及び復号化部122のいずれか一方のみについて、部分単語単位が階層化されるようにしてもよい。すなわち、他方については、マージ回数が単一の部分単語単位が入力されるようにしてよい。
 また、第1の実施の形態では、部分単語単位の生成方法として、BPEが採用される。BPEでは、相対的に文字列長が長い部分単語単位が、相対的に文字列長が短い部分単語単位を必ず包含するという特徴がある。その結果、ニューラル機械翻訳の処理効率を向上させることができる。
 なお、第1の実施の形態は、ニューラル機械翻訳以外の系列変換モデル(例えば、文書要約や、構文解析、及び応答文生成等)にも適用可能である。
 一例として、構文解析への適用例を第2の実施の形態として説明する。第2の実施の形態では第1の実施の形態と異なる点について説明する。第2の実施の形態において特に言及されない点については、第1の実施の形態と同様でもよい。
 図8は、第2の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。すなわち、第2の実施の形態では、図4が図8に置き換わる。
 図8に示されるように、符号化部121は、複数階層の部分単語単位を入力可能なように拡張されている。符号化部121に関して、x'は、入力文におけるi番目の入力単語wの埋め込みベクトル、s'は、wに関してマージ回数m=q(q階層目)の部分単語単位を示す。なお、第2の実施の形態では、単語と当該単語に関する部分単語単位とが明確に区別される。すなわち、第2の実施の形態における部分単語単位には、マージ回数m=∞の場合は含まれない。その結果、式(1)は、以下の式(9)に置き換わる。すなわち、第2の実施の形態において、事前処理部11は、入力単語wに対する埋め込みベクトルeを、以下の式(9)によって算出する。
Figure JPOXMLDOC01-appb-M000008
但し、xは、入力単語wのone-hotベクトル表現、sは、マージ回数m=qにおける入力単語wの部分単語単位群のバイナリベクトルである。
 なお、単語と部分単語単位との区別は便宜的なものであり、x'が、m=∞の場合のs'によって表現されてもよい。、この場合、式(9)ではなく、式(1)が利用されればよい。
 一方、図8の復号化部122は、入力文に対応する構文木のS式を出力する。S式を出力する復号化部122には、公知の復号器が用いられればよい。
 なお、図8の復号化部122は、ターゲットタスクに関連する効果的な補助タスクを見つけることができれば、マルチタスク学習拡張機能がタスクパフォーマンスを向上させることが多いという一般的な知識から、POSタグの正規化無しで線形化された形式を組み込むことによるPOSタグが、補助的なタスクとして共同で推定されるように構成されている。詳細には、POSタグ正規化有り及び無しの線形化された形式のスコアは、以下の式によって、復号化部122の出力層において、それぞれ独立に、かつ、同時にo及びaとして推定される。
Figure JPOXMLDOC01-appb-M000009
但し、W(o)は、POSタグ正規化による出力の語彙に対するデコーダ出力行列である。また、W(a)は、POSタグ正規化無しの出力語彙に対するデコーダ出力行列である。
 次に、第3の実施の形態について説明する。第3の実施の形態では第2の実施の形態と異なる点について説明する。第3の実施の形態において特に言及されない点については、第2の実施の形態と同様でもよい。
 系列変換モデルにおいて、希少語(低頻度語)、例えば、訓練データ中に5回未満しか出現しない単語は、一般に未知語に置換される。しかし、第1の実施の形態や第2の実施の形態のように部分単語単位を用いる場合、未知語が発生しなくなる。したがって、未知語に対応する埋め込みベクトル(埋め込み行列)の学習が行われなくなる。一方で、学習データに含まれていない文字がタスクの実行時(推論時)の入力文に含まれている可能性が有る。この場合、このような文字又は当該文字を含む文字列(単語等)に対して適切な埋め込みベクトルを割り当てることができなくなる。
 また、部分単語文字列が用いられない場合であっても、未知語に対応する埋め込みベクトルは、次の理由でうまく学習できないと考えられる。(1)未知語は、希少語の明らかな置き換えであるため、学習データ内における未知語の発生は比較的少ない。(2)系列変換モデルは希少な単語の訓練には比較的効果がない。
 第3の実施の形態では、このような課題を解決する例について説明する。図9は、第3の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。図9おいては、図8との違いについて説明する。
 図9に示されるように、未知語に対する埋め込みベクトル(UNK bias)u'が、入力単語wの埋め込みベクトルx'と、入力単語wの各部分単語単位に対する埋め込みベクトルs'とのそれぞれに加算される。すなわち、第3の実施の形態において、事前処理部11は、以下の式(11)を用いて入力単語wに対する埋め込みベクトルeを算出する。
Figure JPOXMLDOC01-appb-M000010
但し、uは、未知語に対するone-hotベクトル表現であり、学習時において既知である。なお、入力単語wが未知語の場合、x=uであるため、式(11)は、以下の式(12)に示されるように変形される。
Figure JPOXMLDOC01-appb-M000011
 入力単語wに対する埋め込みベクトルeが式(11)に基づいて算出されて学習が行われることで、未知語に対するone-hotベクトル表現が全体に対し、ある種バイアスの役割を果たすことになる。これは、未知語のベクトルを常に入力単語のベクトルに足しながら学習を行うことで、全ての語彙に対し、平均的な特徴をもった未知語の埋め込みベクトルが学習される(すなわち、Eが学習される)ためであると推察される。全ての語彙に対して平均的特徴を持つように未知語の埋め込みベクトルが学習された場合、入力された未知語wがコーパスに出現する未知語集合と意味的に遠いものであっても、wに付与される埋め込みベクトルは、従来手法と比較すると本来のwの特徴に近いものになりやすいと考えられる。その結果、未知語を含む系列変換モデルの変換精度の向上を期待することができる。
 なお、第3の実施の形態に関する実験及び当該実験によって確認された効果は、「Jun Suzuki, Sho Takase, Hidetaka Kamigaito, Makoto Morishita, Masaaki Nagata. An Empirical Study of Building a Strong Baseline for Constituency Parsing The 56th Annual Meeting of the Association for Computational Linguistics (ACL).」の「4 Experiments」及び「4.1 Results」等を参照されたい。
 次に、第4の実施の形態について説明する。第4の実施の形態では第3の実施の形態と異なる点について説明する。第4の実施の形態において特に言及されない点については、第3の実施の形態と同様でもよい。
 第3の実施の形態では、入力文の各単語の部分単語単位が符号化部121に入力されるモデルを説明した。但し、未知語のベクトルを常に入力単語のベクトルに足しながら学習を行う方法は、部分単語単位が入力されないモデルに対して適用されてもよい。第4の実施の形態では、このようなモデルについて説明する。
 図10は、第4の実施の形態における符号化部121及び復号化部122のモデル構成例を示す図である。図10においては、図10との違いについて説明する。
 図10において、符号化部121には、部分単語単位は入力されない。一方、入力単語wiごとに、未知語に対する埋め込みベクトル(UNK bias)u'が、入力単語wの埋め込みベクトルx'に加算される。すなわち、第4の実施の形態において、事前処理部11は、以下の式(13)を用いて入力単語wに対する埋め込みベクトルeを算出する。
Figure JPOXMLDOC01-appb-M000012
 このように、部分単語単位が入力されないモデルに対しても、未知語に対する埋め込みベクトル(UNK bias)u'の加算が行われてもよい。そうすることで、斯かるモデルについて、第3の実施の形態と同様の効果が期待できる。
 なお、上記の各実施の形態は、Encoder-decoderモデルのように符号化器及び復号化器セットとして用いるモデルだけでなく、符号化器が単体で用いられるモデルに適用されてもよい。また、復号器が判定器に置き換えられたモデルに対して上記各実施の形態が適用されてもよい。この場合、変換装置10は、復号化部122の代わりに判定器として機能する判定部を有する。判定部からの出力は、出力系列(出力文)ではなく判定結果となる。判定部の機能の一例として、文を入力として、それが質問文か否かを判定する(2値分類)、文を入力として、それが所定のカテゴリのどれに属する文なのか推定する(多クラス分類)等が挙げられる。
 なお、上記各実施の形態において、変換装置10は、情報処理装置及び情報学習装置の一例である。事前処理部11は、生成部の一例である。符号化部121又は復号化部122は、実行部の一例である。パラメータ学習部14は、学習部の一例である。入力単語wの埋め込みベクトルx'、入力単語wの各部分単語単位の埋め込みベクトルs'は、第1の埋め込みベクトルの一例である。埋め込みベクトルu'は、第2の埋め込みベクトルの一例である。第3の実施の形態及び第4の実施の形態における埋め込みベクトルeは、第3の埋め込みベクトルの一例である。
 以上、本発明の実施の形態について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。
10     変換装置
11     事前処理部
12     解析部
13     サンプリング部
14     パラメータ学習部
100    ドライブ装置
101    記録媒体
102    補助記憶装置
103    メモリ装置
104    CPU
105    インタフェース装置
121    符号化部
122    復号化部
B      バス

Claims (6)

  1.  学習データに含まれる入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成部と、
     前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習対象のパラメータに基づく処理を実行する実行部と、
     前記実行部による処理結果について、前記学習データにおいて前記入力系列に対応する出力に対する誤差に基づいて、前記パラメータを学習する学習部と、
    を有することを特徴とする情報学習装置。
  2.  入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成部と、
     前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習されたパラメータに基づく処理を実行する実行部と、
    を有することを特徴とする情報処理装置。
  3.  学習データに含まれる入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成手順と、
     前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習対象のパラメータに基づく処理を実行する実行手順と、
     前記実行手順による処理結果について、前記学習データにおいて前記入力系列に対応する出力に対する誤差に基づいて、前記パラメータを学習する学習手順と、
    をコンピュータが実行することを特徴とする情報学習方法。
  4.  入力系列を構成する処理単位ごとに、当該処理単位に関する第1の埋め込みベクトルと未知語に対応する第2の埋め込みベクトルとに基づいて、第3の埋め込みベクトルを生成する生成手順と、
     前記処理単位ごとに生成された前記第3の埋め込みベクトルを入力として、学習されたパラメータに基づく処理を実行する実行手順と、
    をコンピュータが実行することを特徴とする情報処理方法。
  5.  請求項1記載の情報学習装置としてコンピュータを機能させることを特徴とするプログラム。
  6.  請求項2記載の情報処理装置としてコンピュータを機能させることを特徴とするプログラム。
PCT/JP2019/020174 2019-05-21 2019-05-21 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム WO2020235024A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/610,589 US20220215182A1 (en) 2019-05-21 2019-05-21 Information processing apparatus, information learning apparatus, information processing method, information learning method and program
PCT/JP2019/020174 WO2020235024A1 (ja) 2019-05-21 2019-05-21 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム
JP2019569849A JP6772394B1 (ja) 2019-05-21 2019-05-21 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/020174 WO2020235024A1 (ja) 2019-05-21 2019-05-21 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2020235024A1 true WO2020235024A1 (ja) 2020-11-26

Family

ID=72829243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/020174 WO2020235024A1 (ja) 2019-05-21 2019-05-21 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム

Country Status (3)

Country Link
US (1) US20220215182A1 (ja)
JP (1) JP6772394B1 (ja)
WO (1) WO2020235024A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9690938B1 (en) 2015-08-05 2017-06-27 Invincea, Inc. Methods and apparatus for machine learning based malware detection
AU2017281232B2 (en) * 2016-06-22 2020-02-13 Invincea, Inc. Methods and apparatus for detecting whether a string of characters represents malicious activity using machine learning

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102357322B1 (ko) * 2016-05-06 2022-02-08 이베이 인크. 인공신경망 기계 번역시 메타 정보를 이용하는 기법
US11222253B2 (en) * 2016-11-03 2022-01-11 Salesforce.Com, Inc. Deep neural network model for processing data through multiple linguistic task hierarchies
US10713593B2 (en) * 2016-11-04 2020-07-14 Google Llc Implicit bridging of machine learning tasks
US11928600B2 (en) * 2017-10-27 2024-03-12 Salesforce, Inc. Sequence-to-sequence prediction using a neural network model
US11604956B2 (en) * 2017-10-27 2023-03-14 Salesforce.Com, Inc. Sequence-to-sequence prediction using a neural network model
US10346721B2 (en) * 2017-11-01 2019-07-09 Salesforce.Com, Inc. Training a neural network using augmented training datasets

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MORISHITA, MAKOTO ET AL.: "Improving Neural Machine Translation by Incorporating Hierarchical Subword Features", THE 32ND ANNUAL CONFERENCE OF THE JAPANESE SOCIETY FOR ARTIFICIAL INTELLIGENCE, 5 June 2018 (2018-06-05), pages 1 - 4, XP055761891 *
SUZUKI, JUN ET AL.: "An Empirical Study of Building a Strong Baseline for Constituency Parsing", PROCEEDINGS OF THE 56TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, vol. 2, 20 July 2018 (2018-07-20), pages 612 - 618, XP055761889 *

Also Published As

Publication number Publication date
JP6772394B1 (ja) 2020-10-21
US20220215182A1 (en) 2022-07-07
JPWO2020235024A1 (ja) 2021-06-10

Similar Documents

Publication Publication Date Title
Strubell et al. Linguistically-informed self-attention for semantic role labeling
Yu et al. Online segment to segment neural transduction
US9830315B1 (en) Sequence-based structured prediction for semantic parsing
Wu et al. Enhanced meta-learning for cross-lingual named entity recognition with minimal resources
Halteren et al. Improving accuracy in word class tagging through the combination of machine learning systems
JP4215418B2 (ja) 単語予測方法、音声認識方法、その方法を用いた音声認識装置及びプログラム
JP3768205B2 (ja) 形態素解析装置、形態素解析方法及び形態素解析プログラム
US7035789B2 (en) Supervised automatic text generation based on word classes for language modeling
CN111611810B (zh) 一种多音字读音消歧装置及方法
JP3986531B2 (ja) 形態素解析装置及び形態素解析プログラム
JP2008165786A (ja) 機械翻訳用のシーケンス分類
JP2008165783A (ja) シーケンス分類のためのモデルの識別トレーニング
CN111145718A (zh) 一种基于自注意力机制的中文普通话字音转换方法
WO2019167296A1 (ja) 自然言語処理のための装置、方法及びプログラム
CN113987169A (zh) 基于语义块的文本摘要生成方法、装置、设备及存储介质
JP6772394B1 (ja) 情報学習装置、情報処理装置、情報学習方法、情報処理方法及びプログラム
Marra et al. An unsupervised character-aware neural approach to word and context representation learning
JP2006338261A (ja) 翻訳装置、翻訳方法及び翻訳プログラム
CN117435716A (zh) 电网人机交互终端的数据处理方法及系统
JP6772393B1 (ja) 情報処理装置、情報学習装置、情報処理方法、情報学習方法及びプログラム
CN115860002A (zh) 一种基于事件抽取的作战任务生成方法及系统
Chang et al. Multilingual dependency parsing: A pipeline approach
Dolga et al. Machine understandable contracts with deep learning
JP7411149B2 (ja) 学習装置、推定装置、学習方法、推定方法及びプログラム
Latha et al. Visual audio summarization based on NLP models

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019569849

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

Country of ref document: EP

Kind code of ref document: A1