JP6893483B2 - Information estimation device and information estimation method - Google Patents
Information estimation device and information estimation method Download PDFInfo
- Publication number
- JP6893483B2 JP6893483B2 JP2018021943A JP2018021943A JP6893483B2 JP 6893483 B2 JP6893483 B2 JP 6893483B2 JP 2018021943 A JP2018021943 A JP 2018021943A JP 2018021943 A JP2018021943 A JP 2018021943A JP 6893483 B2 JP6893483 B2 JP 6893483B2
- Authority
- JP
- Japan
- Prior art keywords
- value
- output
- layer
- distribution
- autoencoder
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 43
- 238000009826 distribution Methods 0.000 claims description 175
- 238000004364 calculation method Methods 0.000 claims description 112
- 238000012545 processing Methods 0.000 claims description 33
- 238000005457 optimization Methods 0.000 claims description 20
- 238000013528 artificial neural network Methods 0.000 claims description 19
- 239000011159 matrix material Substances 0.000 claims description 14
- 238000007405 data analysis Methods 0.000 claims description 4
- 239000000203 mixture Substances 0.000 claims description 3
- 230000010354 integration Effects 0.000 claims 2
- 239000000284 extract Substances 0.000 claims 1
- 230000006870 function Effects 0.000 description 35
- 230000013016 learning Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 15
- 210000002569 neuron Anatomy 0.000 description 9
- 239000003086 colorant Substances 0.000 description 5
- 238000002474 experimental method Methods 0.000 description 4
- 238000012549 training Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 241000238097 Callinectes sapidus Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000012886 linear function Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000004800 variational method Methods 0.000 description 1
Images
Landscapes
- Complex Calculations (AREA)
Description
本発明は、ニューラルネットワークを用いた推定処理を行う情報推定装置及び情報推定方法に関する。本発明は、特に、オートエンコーダの一種であるバリエーショナルオートエンコーダ(Variational AutoEncoder)を改良した情報推定装置及び情報推定方法に関する。 The present invention relates to an information estimation device and an information estimation method that perform estimation processing using a neural network. The present invention particularly relates to an information estimation device and an information estimation method in which a variational autoencoder, which is a kind of autoencoder, is improved.
ニューラルネットワーク(NN: Neural Network)を用いた推定器は、他の推定器と比べ、画像やセンサー信号データなど、大量の情報を入力データとして処理し、推定を行うことができることから様々な分野への応用に期待されている。 Compared to other estimators, estimators using neural networks (NN: Neural Network) can process a large amount of information such as images and sensor signal data as input data and perform estimation, so they can be used in various fields. It is expected to be applied to.
ニューラルネットワークには、オートエンコーダ(Auto-encoder)と呼ばれるものが存在する。オートエンコーダはニューラルネットワークによる教師無し学習器であり、典型的には、オートエンコーダのニューラルネットワーク構造において、入力層で次元数を意味するニューロン数が多く、徐々に後続の層のニューロンの数が減っていき、中心部分の潜在空間を表す層で最も次元数が圧縮されてニューロンの数が少なくなる。一方、中心部分の潜在空間を表す層以降では、逆にニューロンの数が増えていき、最後の出力層ではニューロンの数が入力層と同じになる構造を有している。すなわち、入力層の次元数と出力層の次元数は同一であり、中心部分の潜在空間を表す層の次元数は、入力層及び出力層の次元数よりも少なく設定される。なお、入力層から潜在空間を表す層までの前半部分はエンコーダと呼ばれ、潜在空間を表す層から出力層までの後半部分はデコーダと呼ばれる。 There is what is called an auto-encoder in a neural network. An autoencoder is an unsupervised learner with a neural network, typically in the neural network structure of an autoencoder, the number of neurons in the input layer, which means the number of dimensions, is large, and the number of neurons in the subsequent layers gradually decreases. In the layer representing the latent space in the central part, the number of dimensions is compressed most and the number of neurons decreases. On the other hand, after the layer representing the latent space in the central part, the number of neurons increases conversely, and the final output layer has a structure in which the number of neurons becomes the same as that of the input layer. That is, the number of dimensions of the input layer and the number of dimensions of the output layer are the same, and the number of dimensions of the layer representing the latent space of the central portion is set to be smaller than the number of dimensions of the input layer and the output layer. The first half from the input layer to the layer representing the latent space is called an encoder, and the second half from the layer representing the latent space to the output layer is called a decoder.
ラベルのない学習データ(nXin次元のベクトルx)を入力すると、まずエンコーダで、次元数を減らした潜在空間のデータ(nz次元のベクトルz:潜在変数とも呼ばれる)に圧縮される。潜在空間の中では元データの類似度に応じて複数の塊に集まって存在する。さらに、その圧縮された空間のデータzがデコーダを通り、入力xを復元(Reconstruction)することができる。これが古典的なオートエンコーダであり、固定値である入力xに基づいてオートエンコーダから出力される値は、入力xと同様にある固定値に一意的に決まり、決定論的(Deterministic)である。 When unlabeled training data (n Xin- dimensional vector x) is input, the encoder first compresses it into latent space data (n z- dimensional vector z: also called latent variable) with a reduced number of dimensions. In the latent space, they are gathered in a plurality of chunks according to the similarity of the original data. Further, the data z in the compressed space can pass through the decoder and the input x can be reconstructed. This is a classical autoencoder, and the value output from the autoencoder based on the input x, which is a fixed value, is uniquely determined by a fixed value like the input x, and is deterministic (Deterministic).
それに対し、確率的要素を含んだもの、すなわち、ある固定された入力xに対して毎回計算ごとに出力値が変わる確率的な(Stochastic)オートエンコーダとして、非特許文献1には、バリエーショナルオートエンコーダ(Variational AutoEncoder、以降、VAEと略す)が提案されている。
On the other hand, as a probabilistic (Stochastic) autoencoder that includes a stochastic element, that is, the output value changes for each calculation for a certain fixed input x, Variational Auto is described in Non-Patent
上述した古典的なオートエンコーダでは、入力されたベクトルデータxに対し、圧縮されたnz次元の潜在空間でのベクトルデータzが一意的に決まるよう構成されているが、一方、VAEでは、入力されたベクトルデータxに対し、圧縮されたnz次元の潜在空間でのベクトルzが一意的に決まるのではなく、ある事後確率分布p(z|x)をとる確率変数のベクトルとして求められる。その事後確率分布p(z|x)は、例えば、nz次元の多変量ガウス分布によって表される。以下、非特許文献1において提案されている理論について説明する。
The classic autoencoder described above is configured to uniquely determine the vector data z in the compressed nz- dimensional latent space with respect to the input vector data x, whereas the VAE is configured to uniquely determine the input vector data z. The vector z in the compressed nz-dimensional latent space is not uniquely determined with respect to the obtained vector data x, but is obtained as a vector of a random variable having a certain posterior probability distribution p (z | x). The posterior probability distribution p (z | x) is represented by, for example, an nz- dimensional multivariate Gaussian distribution. Hereinafter, the theory proposed in
VAEでは、与えられたデータxは、それを生じさせる元となった潜在的要因の全てのzの値を積分することで説明される。それは数式的に以下のように記述される。 In a VAE, given data x is described by integrating the values of all z of the potential factors that gave rise to it. It is mathematically described as follows.
ここで、pθとは、あるパラメータθでその分布形状が決定される確率を意味する。右辺の全てのzを積分することで説明されたデータxの確率が大きいほど、データxが説明されていることを意味する。 Here, p θ means the probability that the distribution shape is determined by a certain parameter θ. The greater the probability of the data x explained by integrating all the z on the right side, the more the data x is explained.
データxが与えられたとき、その要因となった潜在的確率変数zはどのような分布をとるのかを表す事後確率分布p(z|x)を求めたい。しかし、この事後確率分布p(z|x)は解析的には計算不可能であるため、例えば変分法が用いられる。すなわち、p(z|x)に近いとされたある提案関数qφ(あるパラメータφでその分布形状が決定される確率分布)があると仮定すると、以下の関係式が成り立ち、この関係式から提案関数qφを求め、それをp(z|x)の近似解とすることができる。 Given the data x, we want to find the posterior probability distribution p (z | x) that represents the distribution of the potential random variable z that caused it. However, since this posterior probability distribution p (z | x) cannot be calculated analytically, for example, the variational method is used. That is, assuming that there is a proposed function q φ (probability distribution in which the distribution shape is determined by a certain parameter φ) that is close to p (z | x), the following relational expression holds, and from this relational expression The proposed function q φ can be obtained and used as an approximate solution of p (z | x).
ここで、上式(1)の左辺は、前述の与えられたデータxの説明がどれだけできるか、もっともらしさを表す対数尤度である。 Here, the left side of the above equation (1) is a log-likelihood that expresses the plausibility of how much the above-mentioned given data x can be explained.
上式(1)の右辺第1項のDKLは、KLダイバージェンス(KL Divergence)を意味し、2つの関数がどれだけ近いか、距離を表すゼロ以上の値を返す関数である。事後確率分布p(z|x)を近似させた提案関数qφを求めるためには、その分布がどういう関数で表されるのかを決め、その関数のパラメータθ、φを決定する。大量にあるデータxに対して、前述の式がより最適な状態でパラメータθ、φで成り立っているとすると、左辺の尤度のlogpθ(x)が説明できているので高いはずであり、提案関数qφが、知ることができない事後確率分布p(z|x)に近づいているので右辺第1項のDKLはゼロに近づくとみなせる。 D KL of the first term on the right side of the above equation (1) means KL Divergence, and is a function that returns a value of zero or more indicating how close the two functions are and the distance. In order to obtain the proposed function q φ that approximates the posterior probability distribution p (z | x), it is determined what kind of function the distribution is represented by, and the parameters θ and φ of that function are determined. Assuming that the above equation holds for the parameters θ and φ in a more optimal state for a large amount of data x, it should be high because the logp θ (x) of the likelihood on the left side can be explained. Since the proposed function q φ approaches the posterior probability distribution p (z | x) that cannot be known, it can be considered that the D KL of the first term on the right side approaches zero.
一方、右辺第2項をL(θ,φ;x)と書くと、右辺第2項は、以下のように2つの項で表される。 On the other hand, if the second term on the right side is written as L (θ, φ; x), the second term on the right side is represented by two terms as follows.
上式(2)の第1項は、正則化(Regularization)を意味する項であり、上式(2)の第2項は、入力されたデータを出力において復元(Reconstruction)できるかを意味する項である。尤度を表すlogpθ(x)を高くするためには、L(θ,φ;x)を最大化する必要があり、上式(2)の第1項及び第2項を最大化させる必要がある。学習における最適化とは、大量の学習データxに対して目的関数L(θ,φ;x)を最大にするパラメータθ、φを求めることである。そのためには、大量のデータ処理能力のあるニューラルネットワークを用いることが最適であり、パラメータ最適化計算ツールとして使用する。 The first term of the above equation (2) means regularization, and the second term of the above equation (2) means whether the input data can be reconstructed at the output. It is a term. In order to increase the logp θ (x) representing the likelihood, it is necessary to maximize L (θ, φ; x), and it is necessary to maximize the first and second terms of the above equation (2). There is. Optimization in learning is to find parameters θ and φ that maximize the objective function L (θ, φ; x) for a large amount of learning data x. For that purpose, it is optimal to use a neural network capable of processing a large amount of data, and it is used as a parameter optimization calculation tool.
非特許文献1で提案されているVAEでは、qφ(z|x)を、nz次元多変量ガウス分布と考えて、その形状を決定するパラメータφを、ガウス分布の平均μzと分散共分散行列Σzの分散diag(Σz)の2つであるとして計算している。なお、diagは行列の対角項を意味している。また、残りの非対角部分offdiag(Σz)に関しては、非特許文献1ではゼロとしており、したがって、共分散値offdiag(Σz)に関しては、非特許文献1で提案されているVAEでは計算されず、指定されていない。すなわち、非特許文献1で提案されているVAEでは、以下の式のような条件が設定されている。
In the VAE proposed in
パラメータφはエンコーダの出力値として計算され、潜在空間の層のニューロン数は、nz次元×2となる。つまり、以下のnz次元×2個のパラメータの値が順番にエンコーダから出力される。 The parameter φ is calculated as the output value of the encoder, and the number of neurons in the layer of the latent space is nz dimension × 2. That is, the values of the following n z dimensions × 2 parameters are output from the encoder in order.
前述のように、最適化計算では、目的関数L(θ,φ;x)を最大化する必要があり、そのためには、正則化を意味する上式(2)の第1項 As described above, in the optimization calculation, it is necessary to maximize the objective function L (θ, φ; x), and for that purpose, the first term of the above equation (2) meaning regularization.
を最大にする必要がある。この項を最大にするということは、 Should be maximized. Maximizing this term means
を最小化するということであり、求めようとする分布qφ(z|x)が分布pθ(z)にできるだけ近い形状でなければならないということである。pθ(z)はzの事前分布pθ(z)を意味し、非特許文献1によれば、平均μ0はゼロの値のベクトル、分散値Σ0は単位ベクトルとなる、以下の式のような標準ガウス分布として計算する。
This means that the distribution q φ (z | x) to be obtained must have a shape as close as possible to the distribution p θ (z). p θ (z) means the prior distribution p θ (z) of z, and according to
上記の式より、正則化を意味する上式(2)の第1項は、以下の式のように表される。 From the above equation, the first term of the above equation (2), which means regularization, is expressed as the following equation.
もう1つのパラメータθは、非特許文献1によると、デコーダの出力値を意味することになる。デコーダでは、ある具体的なzの値をサンプリングし、前述のように得られた確率分布qφ(z|x)、すなわち、知り得ない事後確率p(z|x)に限りなく近づけた確率分布qφ(z|x)から復元させる。前述の復元に関する上式(2)の第2項は、復元されたxが、入力されたデータxに対応して同じ値となるかを表す対数尤度を意味する。
According to
つまり、前述のようにデコーダの最終層から出力される値はxそのものではなく、そのxがとる確率分布pθ(x|z)の形状を決定するパラメータθとする。仮に、データxが白黒の画像である場合、その確率分布をベルヌーイ分布と置き、ベルヌーイ分布を決定するパラメータθを使って、入力xと同じである確率pθ(x|z)を計算し、さらにそのlogをとることでlog[pθ(z|x)]を計算する。前述の復元に関する上式(2)の第2項の期待値の部分 That is, as described above, the value output from the final layer of the decoder is not x itself, but a parameter θ that determines the shape of the probability distribution pθ (x | z) taken by that x. If the data x is a black-and-white image, the probability distribution is set as the Bernoulli distribution, and the parameter θ that determines the Bernoulli distribution is used to calculate the probability p θ (x | z) that is the same as the input x. Further, the log [p θ (z | x)] is calculated by taking the log. The expected value of the second term of the above equation (2) regarding the above-mentioned restoration
は、バッチの複数のサンプルで処理することで、同等の期待値計算をしているものとみなされる。 Is considered to have the same expected value calculation by processing with multiple samples in batch.
図1は、従来技術におけるVAEの一例を模式的に示す図である。図1に示すように、入力X(nXin次元のベクトル)は、ニューラルネットワークで構成されたエンコーダを通り、エンコーダから、ガウス分布の平均(nz次元)と分散値(nz次元)とが出力される。また、エンコーダの出力結果に基づいてある具体的なzの値がサンプリングされて、ニューラルネットワークで構成されたデコーダに入力され、デコーダからnXout次元のベクトルが出力される。なお、デコーダからの出力は、入力Xと同じとなるよう最適化され、入力と出力の次元数は同じ(nXin=nXout)である。 FIG. 1 is a diagram schematically showing an example of VAE in the prior art. As shown in FIG. 1, the input X (n Xin dimension vector) passes through an encoder composed of a neural network, and the mean ( nz dimension) and the variance value ( nz dimension) of the Gaussian distribution are obtained from the encoder. It is output. Further, a specific value of z is sampled based on the output result of the encoder and input to the decoder composed of the neural network, and the n Xout dimension vector is output from the decoder. The output from the decoder is optimized to be the same as the input X, and the number of dimensions of the input and the output is the same (n Xin = n Xout ).
非特許文献1で提案されているVAEは確率的要素を備えているが、ニューラルネットワークの潜在空間での出力は、zの値そのものではなく、zがとり得る値の確率分布の形状を決定づけるパラメータである。上述のように、非特許文献1で提案されているVAEでは、qφ(z|x)をnz次元多変量ガウス分布と考え、VAEの潜在空間の層におけるパラメータφはnz個の平均とnz個の分散値であり、また、共分散値はすべてゼロとして単純化している。
The VAE proposed in
しかしながら、より複雑な分布をとらせようと設計者がデザインする場合には、その分布形状を決定づけるパラメータがより多く必要となる。例えば、潜在空間の分布を10次元多変量ガウス分布にした場合、その形状を決定づけるパラメータの数は、10個の平均値、10個の分散値に加えて、(10×10−10)/2=45個の共分散値が必要となる。また、潜在空間の分布を混合ガウス分布などにする場合には、さらに複雑となる。 However, when a designer designs a more complicated distribution, more parameters are required to determine the distribution shape. For example, when the distribution of the latent space is a 10-dimensional multivariate Gaussian distribution, the number of parameters that determine the shape is (10 × 10-10) / 2 in addition to the 10 mean values and 10 variance values. = 45 covariance values are required. Further, when the distribution of the latent space is a mixed Gaussian distribution or the like, it becomes more complicated.
上記の課題を解決するため、本発明は、確率的要素を備えた新たなオートエンコーダを実現する情報推定装置及び情報推定方法を提供することを目的とする。 In order to solve the above problems, it is an object of the present invention to provide an information estimation device and an information estimation method that realize a new autoencoder having a stochastic element.
上記目的を達成するため、本発明によれば、従来技術におけるVAEのエンコーダの潜在空間での出力zを、出力zの分布を決定づけるパラメータとするのではなく、前述の古典的なオートエンコーダと同様に出力zの値そのものであるようにし、かつ、出力zの値は、古典的なオートエンコーダのような決定論的なある値ではなく、ある確率分布からサンプリングされた確率変数であるようにした情報推定装置及び情報推定方法が提供される。 In order to achieve the above object, according to the present invention, the output z in the latent space of the VAE encoder in the prior art is not used as a parameter that determines the distribution of the output z, but is the same as the above-mentioned classical autoencoder. The output z value itself is set to be the value of the output z itself, and the value of the output z is not a deterministic value like a classical autoencoder, but a random variable sampled from a probability distribution. An information estimation device and an information estimation method are provided.
上記目的を達成するため、例えば、本発明に係る情報推定装置は、ニューラルネットワークを使用して推定処理を行う情報推定装置であって、
エンコーダ及びデコーダにより構成されたオートエンコーダを備え、前記オートエンコーダに入力された入力データに基づいて前記エンコーダ及び前記デコーダで順次計算処理を行い、前記推定処理の結果として前記オートエンコーダから出力データを出力するよう構成されているオートエンコーダ計算部を有し、
データの一部をドロップアウトさせるドロップアウト層と、前記ドロップアウト層から出力されたデータに対して重みの計算を行う全結合層との組み合わせからなる少なくとも1つの一体化層を、前記エンコーダの最終層として設けることで、前記エンコーダからの出力値である潜在空間での出力値が多次元確率変数ベクトルとなるように構成されている。
In order to achieve the above object, for example, the information estimation device according to the present invention is an information estimation device that performs estimation processing using a neural network.
An autoencoder composed of an encoder and a decoder is provided, calculation processing is sequentially performed by the encoder and the decoder based on input data input to the autoencoder, and output data is output from the autoencoder as a result of the estimation processing. Has an autoencoder calculator that is configured to
The final encoder has at least one integrated layer consisting of a combination of a dropout layer that drops out part of the data and a fully coupled layer that calculates weights for the data output from the dropout layer. By providing it as a layer, the output value in the latent space, which is the output value from the encoder, is configured to be a multidimensional random variable vector.
また、上記目的を達成するため、例えば、本発明に係る情報推定方法は、ニューラルネットワークを使用して推定処理を行う情報推定装置で行われる情報推定方法であって、
エンコーダ及びデコーダにより構成されたオートエンコーダを用いて、前記オートエンコーダに入力された入力データに基づいて前記エンコーダ及び前記デコーダで順次計算処理を行い、前記推定処理の結果として前記オートエンコーダから出力データを出力するオートエンコーダ計算ステップを有し、
データの一部をドロップアウトさせるドロップアウト層と、前記ドロップアウト層から出力されたデータに対して重みの計算を行う全結合層との組み合わせからなる少なくとも1つの一体化層を、前記エンコーダの最終層として設けることで、前記エンコーダからの出力値である潜在空間での出力値を多次元確率変数ベクトルとする。
Further, in order to achieve the above object, for example, the information estimation method according to the present invention is an information estimation method performed by an information estimation device that performs estimation processing using a neural network.
Using an autoencoder composed of an encoder and a decoder, the encoder and the decoder sequentially perform calculation processing based on the input data input to the autoencoder, and as a result of the estimation processing, output data from the autoencoder is output. Has an autoencoder calculation step to output
The final encoder has at least one integrated layer consisting of a combination of a dropout layer that drops out part of the data and a fully coupled layer that calculates weights for the data output from the dropout layer. By providing it as a layer, the output value in the latent space, which is the output value from the encoder, becomes a multidimensional random variable vector.
本発明は、確率的要素を備えた新たなオートエンコーダを実現し、潜在空間における次元数(ニューロンの数)の増加を抑えながら、潜在空間における確率分布についてに任意の確率分布の形状に対応できるという効果を有する。また、本発明は、潜在空間における確率分布の形状を解析的な計算によって推測できるため、潜在空間における入力データの分離の様子をより正確に評価することができるという効果を有する。 The present invention realizes a new autoencoder equipped with a stochastic element, and can correspond to the shape of an arbitrary probability distribution for the probability distribution in the latent space while suppressing an increase in the number of dimensions (the number of neurons) in the latent space. It has the effect of. Further, since the shape of the probability distribution in the latent space can be estimated by analytical calculation, the present invention has an effect that the state of separation of input data in the latent space can be evaluated more accurately.
以下、図面を参照しながら、本発明の第1及び第2の実施の形態について説明する。 Hereinafter, the first and second embodiments of the present invention will be described with reference to the drawings.
<第1の実施の形態>
本発明の第1の実施の形態では、オートエンコーダの潜在空間での出力zを、出力zの分布を決定づけるパラメータとするのではなく、前述の古典的なオートエンコーダと同様に出力zの値そのものであるようにし、かつ、出力zの値を、古典的なオートエンコーダの場合のような決定論的なある値とするのではなく、ある確率分布からサンプリングされた確率変数とする。
<First Embodiment>
In the first embodiment of the present invention, the output z in the latent space of the autoencoder is not used as a parameter that determines the distribution of the output z, but the value of the output z itself is the same as that of the above-mentioned classical autoencoder. And the value of the output z is not a deterministic value as in the case of a classical autoencoder, but a random variable sampled from a probability distribution.
具体的には、本発明の第1の実施の形態では、エンコーダを構成するニューラルネットワーク内にドロップアウト層を追加することで、固定値である入力データに対して、エンコーダから出力される値を確率変数に変換する。さらに、ドロップアウトによるベルヌーイ分布がニューラルネットワーク上でどのような形状で伝搬するかを解析的に計算することで、その確率変数の分布形状を計算しておき、従来技術におけるVAEと同様、正則化計算に使用する。 Specifically, in the first embodiment of the present invention, by adding a dropout layer in the neural network constituting the encoder, the value output from the encoder is set with respect to the input data which is a fixed value. Convert to a random variable. Furthermore, by analytically calculating the shape of the Bernoulli distribution due to dropout on the neural network, the distribution shape of the random variable is calculated and regularized as in the case of VAE in the prior art. Used for calculation.
以下、図2〜図5を参照しながら、本発明の実施の形態におけるオートエンコーダの構造について説明する。図2は、本発明の第1の実施の形態におけるオートエンコーダの第1の例を模式的に示す図であり、図3は、本発明の第1の実施の形態におけるオートエンコーダの第1の例に関して、DF層の詳細を示す図である。また、図4は、本発明の第1の実施の形態におけるオートエンコーダの第2の例を示す図であり、図5は、本発明の第1の実施の形態におけるオートエンコーダの第2の例に関して、DF層の詳細を示す図である。なお、図2及び図3に示す例では、エンコーダにドロップアウト層が1つ設けられており、図4及び図5に示す例では、エンコーダにドロップアウト層が2つ設けられている。 Hereinafter, the structure of the autoencoder according to the embodiment of the present invention will be described with reference to FIGS. 2 to 5. FIG. 2 is a diagram schematically showing a first example of the autoencoder according to the first embodiment of the present invention, and FIG. 3 is a diagram showing a first example of the autoencoder according to the first embodiment of the present invention. It is a figure which shows the detail of the DF layer with respect to an example. Further, FIG. 4 is a diagram showing a second example of the autoencoder according to the first embodiment of the present invention, and FIG. 5 is a diagram showing a second example of the autoencoder according to the first embodiment of the present invention. It is a figure which shows the detail of the DF layer with respect to. In the examples shown in FIGS. 2 and 3, the encoder is provided with one dropout layer, and in the examples shown in FIGS. 4 and 5, the encoder is provided with two dropout layers.
本発明の第1の実施の形態におけるオートエンコーダでは、古典的なオートエンコーダのエンコーダに、入力データの一部を欠損させてランダム性を生むドロップアウト層と、ドロップアウト層と、重みの計算を行う全結合(Fully Connected:FC)層を設ける。さらに、そのドロップアウト層とFC層から、出力される値の分布を解析的に計算し、それを正則化の条件に使用する。なお、本明細書では簡易表現のため、ドロップアウト層及びFC層を組み合わせた一体化層をDF層と呼び、ドロップアウト層における計算処理とFC層における計算処理が一緒に行われるものとして説明する。 In the autoencoder according to the first embodiment of the present invention, the encoder of a classical autoencoder is subjected to a dropout layer in which a part of input data is deleted to generate randomness, a dropout layer, and a weight calculation. A Fully Connected (FC) layer is provided. Furthermore, the distribution of the values output from the dropout layer and the FC layer is analytically calculated and used as a condition for regularization. In this specification, for the sake of simplicity, the integrated layer in which the dropout layer and the FC layer are combined is referred to as a DF layer, and the calculation process in the dropout layer and the calculation process in the FC layer are described together. ..
まず、エンコーダにドロップアウト層が1つ設けられた場合について説明する。図2には、エンコーダにドロップアウト層が1つ設けられた場合が図示されている。図1に示す従来のVAEでは、潜在空間での値の次元数はzの確率分布のパラメータの数であったのに対し、図2に示すオートエンコーダでは、本発明の第1の実施の形態では、潜在空間での値の次元数はzの次元数nzそのものとなる。 First, a case where one dropout layer is provided in the encoder will be described. FIG. 2 shows a case where the encoder is provided with one dropout layer. In the conventional VAE shown in FIG. 1, the number of dimensions of the value in the latent space is the number of parameters of the probability distribution of z, whereas in the autoencoder shown in FIG. 2, the first embodiment of the present invention is used. Then, the number of dimensions of the value in the latent space is the number of dimensions n z of z itself.
また、図3には、エンコーダにドロップアウト層が1つ設けられた場合におけるエンコーダのDF1層が図示されている。なお、図3は、図2のエンコーダに含まれるドロップアウト層及びFC層の部分を抜き出して図示したものである。図3のDF1層への入力値XinDF1は固定値であり、その出力XoutDF1はドロップアウト層によって変換された確率変数である。出力XoutDF1の確率分布は、例えば特許文献1で提案された計算方法を用いて計算することができる。以下に、その計算方法について説明する。
Further, FIG. 3 shows a DF1 layer of the encoder when the encoder is provided with one dropout layer. Note that FIG. 3 is an extracted view of the dropout layer and the FC layer included in the encoder of FIG. The input value Xin DF1 to the DF1 layer in FIG. 3 is a fixed value, and its output Xout DF1 is a random variable converted by the dropout layer. The probability distribution of the output Xout DF1 can be calculated using, for example, the calculation method proposed in
DF1層への入力をXinDF1、出力をXoutDF1とし、DF1層のドロップアウト層にあらかじめ設定されたドロップアウト率(データをランダムに欠損させる確率)をpDrop DF1とする。また、DF1層のFC層にあらかじめ設定された重みをWi,j DF1とし、バイアスをbi DF1とする。ただし、添え字i及びjは、1≦i≦nXout DF1、1≦j≦nXin DF1を満たす整数である。なお、明細書中の表記nXin DF1は、nの下付き添字がXinDF1であることを表し、明細書中の表記nXout DF1は、nの下付き添字がXoutDF1であることを表す。 The input to the DF1 layer is Xin DF1 , the output is Xout DF1, and the dropout rate (probability of randomly losing data) set in the dropout layer of the DF1 layer is p Drop DF1 . Moreover, the preset weights FC layer of DF1 layer W i, and j DF1, the bias and b i DF1. However, the subscripts i and j are integers satisfying 1 ≦ i ≦ n Xout DF1 and 1 ≦ j ≦ n Xin DF1. The notation n Xin DF1 in the specification indicates that the subscript of n is Xin DF1 , and the notation n Xout DF1 in the specification indicates that the subscript of n is Xout DF1 .
DF1層への入力XinDF1は固定値であり、定数からなるnXin DF1次元のベクトルであって、以下のように表される。 The input Xin DF1 to the DF1 layer is a fixed value, an n Xin DF1 dimensional vector consisting of constants, and is expressed as follows.
一方、DF1層からの出力XoutDF1は、以下のように表される。 On the other hand, the output Xout DF1 from the DF1 layer is represented as follows.
DF1層からの出力XoutDF1は、nXout DF1次元のベクトルであり、このベクトルXoutDF1のi番目の要素は以下のとおりである。 The output Xout DF1 from the DF1 layer is an n Xout DF1 dimensional vector, and the i-th element of this vector Xout DF1 is as follows.
ここで、ドロップアウト層におけるドロップアウトにより、右辺のWi,j DF1XinDF1 j項(1≦j≦nXin DF1)が、確率pdrop DF1でランダムに消える(ゼロとなる)。したがって、各項の和である左辺のXoutDF1 iは“サンプリング和”としてとらえて計算することができる。このことから、出力XoutDF1は確率変数であり、例えば、以下のようなnXout DF1次元の多変量ガウス分布に従う確率変数であるとする。 Here, due to the dropout in the dropout layer , the Wi , j DF1 Xin DF1 j term (1 ≦ j ≦ n Xin DF1 ) on the right side randomly disappears (becomes zero) with the probability p drop DF1. Therefore, the Xout DF1 i on the left side, which is the sum of each term, can be calculated as the "sampling sum". From this, it is assumed that the output Xout DF1 is a random variable, and for example, it is a random variable that follows the following n Xout DF 1- dimensional multivariate Gaussian distribution.
ただし、μout DF1は、平均値を示すnXout DF1次元のベクトル、Σout DF1は、nXout DF1×nXout DF1の分散共分散行列である。平均値μout DF1及び分散共分散行列Σout DF1は、以下の式から得られる。 However, μ out DF1 is an n Xout DF 1- dimensional vector showing an average value, and Σ out DF1 is a variance-covariance matrix of n Xout DF1 × n Xout DF1. The mean value μ out DF1 and the variance-covariance matrix Σ out DF1 are obtained from the following equations.
図3のDF1層からの出力は、図2のオートエンコーダのエンコーダからの出力であり、エンコーダから出力される潜在空間における値zの確率分布qφ(z|x)に対応している。これより表記について、XoutDF1をzに、μout DF1をμzに、Σout DF1をΣzに、nXin DF1をnhに、nXout DF1をnzにそれぞれ置き換えることができ、エンコーダから出力される潜在空間における値zは、以下の多変量ガウス分布として表される。 The output from the DF1 layer of FIG. 3 is the output from the encoder of the autoencoder of FIG. 2, and corresponds to the probability distribution q φ (z | x) of the value z in the latent space output from the encoder. From this, regarding the notation, Xout DF1 can be replaced with z, μ out DF1 with μ z , Σ out DF1 with Σ z , n Xin DF1 with n h , and n Xout DF1 with n z. The output value z in the latent space is represented by the following multivariate Gaussian distribution.
ただし、μzはnz次元のベクトル、Σzはnz×nzの分散共分散行列である。 However, μ z is an n z- dimensional vector, and Σ z is a variance-covariance matrix of n z × n z.
次に、エンコーダにドロップアウト層が2つ設けられた場合について説明する。図4には、より複雑な場合として、エンコーダにドロップアウト層が2つ設けられた場合が図示されている。また、図5には、エンコーダにドロップアウト層が2つ設けられた場合におけるエンコーダのDF1層、ReLu(Rectified Linear Unit)層、DF2層が図示されている。なお、図5は、図4のエンコーダに含まれる2つのドロップアウト層及びFC層と、これらの間に挟まれたReLu層の部分を抜き出して図示したものである。以下、DF層が2つ存在する場合の計算方法について説明する。 Next, a case where the encoder is provided with two dropout layers will be described. FIG. 4 illustrates a more complex case where the encoder is provided with two dropout layers. Further, FIG. 5 shows a DF1 layer, a ReLu (Rectified Linear Unit) layer, and a DF2 layer of the encoder when the encoder is provided with two dropout layers. Note that FIG. 5 shows an extracted portion of the two dropout layers and the FC layer included in the encoder of FIG. 4 and the ReLu layer sandwiched between them. Hereinafter, the calculation method when two DF layers are present will be described.
図5の場合、ReLu層を挟んで、2つのDF層、すなわちDF1層及びDF2層が設けられている。1つ目のDF1層への入力、出力は上述のとおりである。また、DF1層とDF2層の間にあるReLu層などの非線形関数の計算方法としては、例えば、特許文献1に挙げたような多変量ガウス近似として計算する方法や、単純に、ガウス関数が負の領域にあるか正の領域にあるかの判断で近似して計算する方法(本願出願時には非公開であるが、本発明者を発明者とする特許出願(特願2017−196740)に係る明細書及び図面に記載された計算方法)など使用可能であるが、本発明はこれらの計算方法に限定されるものではない。
In the case of FIG. 5, two DF layers, that is, a DF1 layer and a DF2 layer are provided with the ReLu layer interposed therebetween. The inputs and outputs to the first DF1 layer are as described above. Further, as a method of calculating a non-linear function such as the ReLu layer between the DF1 layer and the DF2 layer, for example, a method of calculating as a multivariate Gaussian approximation as described in
以下、2つ目のDF2層への入力、出力について説明する。DF2層への入力をXinDF2、出力をXoutDF2とし、DF2層のドロップアウト率をpDrop DF2とする。また、DF2層のFC層の重みをWi,j DF2とし、バイアスをbi DF2とする。ただし、添え字i及びjは、1≦i≦nXout DF2、1≦j≦nXin DF2を満たす整数である。なお、明細書中の表記nXin DF2は、nの下付き添字がXinDF2であることを表し、明細書中の表記nXout DF2は、nの下付き添字がXoutDF2であることを表す。 Hereinafter, the input and output to the second DF2 layer will be described. The input to the DF2 layer is Xin DF2 , the output is Xout DF2, and the dropout rate of the DF2 layer is p Drop DF2 . Moreover, the weight of the FC layer of DF2 layer W i, and j DF2, the bias and b i DF2. However, the subscripts i and j are integers that satisfy 1 ≦ i ≦ n Xout DF2 and 1 ≦ j ≦ n Xin DF2. The notation n Xin DF2 in the specification indicates that the subscript of n is Xin DF2 , and the notation n Xout DF2 in the specification indicates that the subscript of n is Xout DF2 .
DF2層への入力XinDF2、出力XoutDF2は両方とも、多変量ガウス分布に従う確率変数となり、以下のように表される。 Both the input Xin DF2 and the output Xout DF2 to the DF2 layer are random variables that follow a multivariate Gaussian distribution and are expressed as follows.
ただし、μin DF2はnXin DF2次元のベクトル、Σin DF2はnXin DF2×nXin DF2の分散共分散行列であり、μout DF2はnXout DF2次元のベクトル、Σout DF2はnXout DF2×nXout DF2の分散共分散行列である。 However, μ in DF2 is an n Xin DF2 dimensional vector, Σ in DF2 is a variance-covariance matrix of n Xin DF2 × n Xin DF2 , μ out DF2 is an n Xout DF2 dimensional vector, and Σ out DF2 is an n Xout DF2. × n Xout DF2 variance-covariance matrix.
平均値に関しては、以下のように計算できる。 The average value can be calculated as follows.
また、分散共分散行列に関しては、以下のように計算できる。 The variance-covariance matrix can be calculated as follows.
上記の右辺の第1項に関しては、以下のように計算できる。 The first term on the right side of the above can be calculated as follows.
図5のDF2層からの出力は、図4のオートエンコーダのエンコーダからの出力であり、エンコーダから出力される潜在空間における値zの確率分布qφ(z|x)に対応している。したがって、ドロップアウト層が1つ存在する場合と同様に、表記について、XoutDF2をzに、μout DF2をμzに、Σout DF2をΣzに、nXin DF2をnhに、nXout DF2をnzにそれぞれ置き換えることができ、エンコーダから出力される潜在空間における値zは、以下の多変量ガウス分布として表される。 The output from the DF2 layer of FIG. 5 is the output from the encoder of the autoencoder of FIG. 4, and corresponds to the probability distribution q φ (z | x) of the value z in the latent space output from the encoder. Therefore, as in the case where there is one dropout layer, the notation is such that Xout DF2 is z, μ out DF2 is μ z , Σ out DF2 is Σ z , n Xin DF2 is n h , and n X out. DF2 can be replaced with n z , respectively, and the value z in the latent space output from the encoder is expressed as the following multivariate Gaussian distribution.
なお、ここでは、ドロップアウト層が2つ存在する場合について説明しているが、ドロップアウト層が3つ以上存在していてもよい。例えば、DF2層からの出力値が更なるドロップアウト層(3つ目のドロップアウト層)に入力されてもよく、この場合も、上述したDF2層における計算方法と同様の計算方法によって、更なるドロップアウト層からの出力値を求めることができる。 Although the case where two dropout layers are present is described here, three or more dropout layers may be present. For example, the output value from the DF2 layer may be input to a further dropout layer (third dropout layer), and in this case as well, further by a calculation method similar to the calculation method in the DF2 layer described above. The output value from the dropout layer can be calculated.
以上のように、本発明の第1の実施の形態では、固定値である入力データをドロップアウトによって確率変数に変換して確率分布を生じさせ、解析計算方法により、その確率分布を計算する。また、この計算結果を、従来技術におけるVAEと同様に、正則化の条件に使用する。すなわち、下記の式で表される確率分布qφ(z|x)が、下記の式で表される事前分布pθ(z)とあまりに異ならないよう、同じ形状に留めるための条件を課す。 As described above, in the first embodiment of the present invention, input data having a fixed value is converted into a random variable by dropout to generate a probability distribution, and the probability distribution is calculated by an analysis calculation method. Further, this calculation result is used as a condition for regularization as in the case of VAE in the prior art. That is, a condition is imposed so that the probability distribution q φ (z | x) represented by the following formula does not differ too much from the prior distribution p θ (z) represented by the following formula.
例えば、上記の確率分布qφ(z|x)と事前分布pθ(z)とが同じ形状に留まっているかを判定するため、前述のように多変量ガウス分布のKLダイバージェンスを使い、2つの多変量ガウス分布の距離を最小にするようなコスト関数を設定する。その式を以下に示す。 For example, in order to determine whether the above probability distribution q φ (z | x) and the prior distribution p θ (z) remain in the same shape, two KL divergence of the multivariate Gaussian distribution are used as described above. Set a cost function that minimizes the distance of the multivariate Gaussian distribution. The formula is shown below.
本発明の第1の実施の形態における計算方法は、非特許文献1に開示されている従来技術の計算方法と比較すると、共分散の値を計算している点で大きく異なっている。すなわち、非特許文献1では共分散の値を求めておらず、共分散の値をゼロの値としており、あるいは、共分散の値を求めるためにはさらにニューロンの数を増やす必要があったのに対し、本発明の第1の実施の形態では、エンコーダのより少ないニューロンの数でありながら、上述した解析計算によって共分散の値の計算も行っている。
The calculation method in the first embodiment of the present invention is significantly different from the calculation method of the prior art disclosed in
また、本発明の第1の実施の形態における計算方法によれば、オートエンコーダの出力が入力データを再現できるかという条件の判定について、従来技術に係るVAEの判定より簡単に行うことができる。従来技術によれば、エンコーダの出力値はzの確率分布のパラメータであるため、例えばデコーダに入力するための値を得るためには、さらにその確率分布を作って、zの値をサンプリングしなければならない。一方、本発明の第1の実施の形態では、エンコーダの出力そのものが、zの値であり、すなわち、エンコーダの出力値をそのままデコーダの入力値として使用することができる。zの値を得た後のデコーダにおける処理は、本発明の第1の実施の形態も従来技術も同じである。 Further, according to the calculation method in the first embodiment of the present invention, the determination of the condition that the output of the autoencoder can reproduce the input data can be performed more easily than the determination of VAE according to the prior art. According to the prior art, the output value of the encoder is a parameter of the probability distribution of z. Therefore, for example, in order to obtain a value to be input to the decoder, the probability distribution must be further created and the value of z must be sampled. Must be. On the other hand, in the first embodiment of the present invention, the output of the encoder itself is a value of z, that is, the output value of the encoder can be used as it is as the input value of the decoder. The processing in the decoder after obtaining the value of z is the same as in the first embodiment of the present invention and in the prior art.
また、本発明の第1の実施の形態では、ドロップアウト率は、エンコーダで生成するzの確率分布を表現するために使用されることから、例えばドロップアウト層が1つの場合は、ドロップアウト率は相対的に大きい値(例えば、0.7以上の値)とすることが望ましい。 Further, in the first embodiment of the present invention, the dropout rate is used to express the probability distribution of z generated by the encoder. Therefore, for example, when there is one dropout layer, the dropout rate is used. Is preferably a relatively large value (for example, a value of 0.7 or more).
次に、本発明の第1の実施の形態における処理を実行することが可能な情報推定装置について説明する。図6は、本発明の第1の実施の形態における情報推定装置の構成の一例を示すブロック図である。図6の情報推定装置10は、ニューラルネットワークを用いて推定処理を行う推定器であり、オートエンコーダ計算部20、エンコーダ出力分布形状計算部30、コスト関数計算部40、パラメータ最適化計算部50を有する。
Next, an information estimation device capable of executing the process according to the first embodiment of the present invention will be described. FIG. 6 is a block diagram showing an example of the configuration of the information estimation device according to the first embodiment of the present invention. The
図6に示すブロック図は、本発明に関連した機能を表しているにすぎず、実際の実装では、ハードウェア、ソフトウェア、ファームウェア、又はそれらの任意の組み合わせによって実現されてもよい。ソフトウェアで実装される機能は、1つ又は複数の命令若しくはコードとして任意のコンピュータ可読媒体に記憶され、これらの命令又はコードは、CPU(Central Processing Unit:中央処理ユニット)やGPU(Graphics Processing Unit:グラフィックスプロセッシングユニット)などのハードウェアベースの処理ユニットによって実行可能である。また、本発明に関連した機能は、IC(Integrated Circuit:集積回路)やICチップセットなどを含む様々なデバイスによって実現されてもよい。 The block diagram shown in FIG. 6 merely represents a function related to the present invention, and in an actual implementation, it may be realized by hardware, software, firmware, or any combination thereof. Functions implemented in hardware are stored in any computer-readable medium as one or more instructions or codes, and these instructions or codes are stored in a CPU (Central Processing Unit) or GPU (Graphics Processing Unit:). It can be executed by a hardware-based processing unit such as a graphics processing unit). Further, the functions related to the present invention may be realized by various devices including an IC (Integrated Circuit), an IC chipset, and the like.
オートエンコーダ計算部20は、ニューラルネットワークにより構成されたエンコーダ及びデコーダを含むオートエンコーダを有し、入力データXについてエンコーダ及びデコーダで計算処理を行って、出力データXを出力する機能を有する。オートエンコーダ計算部20における計算に用いられるオートエンコーダは、図2〜図5を参照しながら説明したように、1つ又は2つ以上のドロップアウト層がエンコーダ内に設けられており、ドロップアウト層においてデータの一部がランダムに欠損される。これにより、オートエンコーダのエンコーダからの出力(潜在空間における出力)の値zを確率変数とすることができる。
The
エンコーダ出力分布形状計算部30は、入力のデータxがエンコーダでドロップアウトによってどのような確率分布の形状になったかを解析的に計算する機能を有する。エンコーダ出力分布形状計算部30は、例えば、入力データx、ドロップアウト層におけるドロップアウト率、パラメータ(例えば、FC層における重み及びバイアス)から、潜在空間における出力zの分布形状を計算することができる。
The encoder output distribution
コスト関数計算部40は、ドロップアウトによるエンコーダ出力分布形状計算部30で計算された分布形状(潜在空間における出力zの分布形状)から正則化の条件を満たすか計算し、さらに、オートエンコーダ計算部20から算出される出力xが入力xとどれだけ似ているかを計算することで、これら2つの計算結果を合わせた全体のコスト関数の値を計算する機能を有する。
The cost
パラメータ最適化計算部50は、コスト関数計算部40で計算されたコスト関数の値が最適化されるように、オートエンコーダ計算部20で参照した重み及びバイアスをどの値に最適化するのかを計算する機能を有する。パラメータ最適化計算部50は、コスト関数の値が最小になるようパラメータ(重み及びバイアス)を計算し、この計算の結果得られたパラメータはオートエンコーダ計算部20に供給されて、オートエンコーダのパラメータが更新される。
The parameter
以上のように構成された情報推定装置10において、大量の入力データXに対して繰返し最適化が行われることで、オートエンコーダから最適解が得られるように最適化が行われる。
In the
次に、図7を参照しながら、図6に図示されている情報推定装置10における処理の一例について説明する。図7は、本発明の第1の実施の形態における情報推定装置の処理の一例を示すフローチャートである。
Next, an example of processing in the
図7に示すフローチャートにおいて、最初に、オートエンコーダ計算部20は、オートエンコーダのパラメータ(重み、バイアス)を初期化する(ステップS101)。そして、学習データXがオートエンコーダの入力Xとして入力されると(ステップS102)、オートエンコーダ計算部20は、オートエンコーダのエンコーダにおいて潜在空間での値zを計算する(ステップS103)。
In the flowchart shown in FIG. 7, the
また、エンコーダ出力分布形状計算部30は、ドロップアウト率、入力データX、パラメータ(重み、バイアス)から、潜在空間での値zの分布形状を計算する(ステップS104)。エンコーダ出力分布形状計算部30で計算された潜在空間での値zの分布形状に係る情報は、コスト関数計算部40に供給される。
Further, the encoder output distribution
オートエンコーダ計算部20は、さらに、潜在空間での値zを用いて、オートエンコーダのデコーダの出力Xを計算する(ステップS105)。オートエンコーダ計算部20で計算されたオートエンコーダのデコーダの出力Xは、コスト関数計算部40に供給される。
The
コスト関数計算部40は、潜在空間での値zの分布形状に係る情報に基づいて正則化の条件を満たすかを計算し、さらに、出力Xが入力Xとどれだけ似ているかを計算して、これらの2つの計算結果を合わせた全体のコスト関数の値を計算する(ステップS106)。
The cost
パラメータ最適化計算部50は、コスト関数計算部40で計算されたコスト関数の値が最小になるようパラメータ(重み及びバイアス)を計算し、この計算結果に基づいて、オートエンコーダ計算部20におけるオートエンコーダのパラメータが更新される(ステップS107)。
The parameter
未処理の新しい学習データXが存在する場合(ステップS108で「はい」)にはステップS102に戻り、新しい学習データXについて同様の処理(ステップS103〜S107の処理)が実行される。すなわち、大量の学習データXについて、ステップS103〜S107の処理が繰り返し実行される。一方、すべての学習データXについて処理が実行され、未処理の新しい学習データXが存在しない場合(ステップS108で「いいえ」)には、処理は終了となる。 If there is unprocessed new learning data X (“Yes” in step S108), the process returns to step S102, and the same processing (processing of steps S103 to S107) is executed for the new learning data X. That is, the processes of steps S103 to S107 are repeatedly executed for a large amount of training data X. On the other hand, when the processing is executed for all the training data X and there is no new unprocessed learning data X (“No” in step S108), the processing ends.
次に、本発明の第1の実施の形態における情報推定装置を用いて実際に学習最適化計算を行った場合の実験結果について示す。なお、以下に記載する実験においては、図2及び図3に示されているオートエンコーダを採用し、エンコーダにドロップアウト層を1つ設けている。また、潜在空間での値zの次元数nzをnz=2としている。さらに、本発明に係る技術分野で利用されているMNISTデータ(0〜9の手書き数字の画像セット)を使用して学習を行うことで、入力されたMNISTデータを出力において復元するオートエンコーダを構築している。
Next, the experimental results when the learning optimization calculation is actually performed using the information estimation device according to the first embodiment of the present invention will be shown. In the experiment described below, the autoencoder shown in FIGS. 2 and 3 is adopted, and the encoder is provided with one dropout layer. Further, the number of dimensions n z of the value z in the latent space is set to n z = 2. Further, by performing learning using MNIST data (an image set of
最適化のためのアルゴリズムには、二乗平均平方根(RMS:root mean square)方式を使い、学習率0.001でオートエンコーダの重みとバイアスを計算している。また、上述の事前分布は、以下のようにして計算している。 The root mean square (RMS) method is used as the optimization algorithm, and the weight and bias of the autoencoder are calculated with a learning rate of 0.001. The above prior distribution is calculated as follows.
なお、もちろん、分散共分散行列の非対角項の部分、すなわち、共分散値を0以外の値にして、正の相関や負の相関を持たせることもできる。 Of course, the off-diagonal portion of the variance-covariance matrix, that is, the covariance value can be set to a value other than 0 to have a positive correlation or a negative correlation.
図9及び図10に、本発明の第1の実施の形態における情報推定装置を用いた実験によって得られた、潜在空間の次元数nzがnz=2の場合の潜在空間におけるzの値の分布を示す。なお、2次元のガウス分布を視覚化表示する方法としては、例えば、図8(a)に示すように、ガウス分布の幅を表すσの等高線の楕円と、さらにその分布に従って点在するモンテカルロ的(何度も試行を繰り返すこと)にサンプリングした点の散布図とを示す表示方法と、図8(b)に示すように、ガウス分布の幅を表すσの等高線の楕円と、さらに、そのガウス楕円の中心値、つまり平均値の点とを示す表示方法がある。図9は、実験結果を図8(a)の表示方法で表した図であり、図10は、実験結果を図8(b)の表示方法で表した図である。 9 and 10 show the value of z in the latent space when the number of dimensions n z of the latent space is n z = 2, which was obtained by an experiment using the information estimation device according to the first embodiment of the present invention. The distribution of is shown. As a method of visualizing and displaying the two-dimensional Gaussian distribution, for example, as shown in FIG. 8A, an ellipse of σ contour lines representing the width of the Gaussian distribution and a Monte Carlo-like ellipse scattered according to the distribution. A display method showing a scatter plot of the sampled points (by repeating the trial many times), an ellipse with a contour line of σ representing the width of the Gaussian distribution, and the Gaussian as shown in FIG. 8 (b). There is a display method that shows the center value of the ellipse, that is, the point of the average value. FIG. 9 is a diagram showing the experimental results by the display method of FIG. 8 (a), and FIG. 10 is a diagram showing the experimental results by the display method of FIG. 8 (b).
図9及び図10に図示されている実験結果は、MNISTデータを用いて5000回の最適化学習を行った状態で、モンテカルロ的に400個サンプリングした場合の潜在空間におけるzの値の分布を示している。MNISTデータの手書き数字0〜9いずれかのある1つの画像入力データに対し、1つのzの値の分布(楕円)が潜在空間に存在する。図9及び図10では、MNISTデータの画像の異なる手書き数字0〜9のそれぞれに対応する潜在空間でのzの値が異なる色によって表されている。
The experimental results shown in FIGS. 9 and 10 show the distribution of the z value in the latent space when 400 pieces are sampled in a Monte Carlo manner in a state where the optimization learning is performed 5000 times using the MNIST data. ing. For one image input data having any of the
なお、本発明に係る技術分野では、通常、MNISTデータの手書き数字0〜9に対応して、例えばVAEにおける潜在空間での値zを色分け表示することが行われている。図9及び図10も、当業者が容易に理解できるようにこうした慣例にならって作成されたものであって本来はカラー図面であるが、モノクロ図面では色を表現することが困難である。図9及び図10に関して、手書き数字0〜9及び各数字に対応づけられた色について概略的に説明すると、潜在空間での値zは、手書き数字が0の場合は赤、1の場合は緑、2の場合は青、3の場合は黄色、4の場合は水色、5の場合は紫、6の場合はオレンジ、7の場合はピンク、8の場合は灰色、9の場合は黒にそれぞれ対応している。また、必ずしも正確な表現ではないが、図9及び図10の中心に対して、赤の点は1時の方向、緑の点は9時の方向、青の点は12時の方向、黄色の点は5時の方向、水色の点は5時の方向、紫の点は6時の方向、オレンジの点は5時の方向、ピンクの点は6時の方向、灰色の点は11時の方向、黒の点は4時の方向に塊を形成して広がりを有している。このように、図9及び図10では、2次元の潜在空間内で、同じ色同士、つまり同じ手書き数字同士が塊を形成して広がっている。したがって、入力されたMNISTデータに対して、手書き数字0〜9のいずれの画像であったのかを、正解ラベル無しの教師無し学習で、自動的に分類ができていることがわかる。
In the technical field according to the present invention, the value z in the latent space in, for example, VAE is displayed in different colors corresponding to the
なお、例えば図9では、本発明の第1の実施の形態における解析的な計算によって得られた、潜在空間でのzの値のガウス分布のパラメータ(平均値、分散共分散値)に基づいて、各手書き数字の入力に対応する事後確率分布をqφ(z|x)が楕円で表されている。さらに、解析的な計算によって得られた事後確率分布(楕円)が正しいかどうかを視覚的に検証すべく、それぞれの楕円に対してモンテカルロ的にドロップアウトにより確率的に400個分散させた点を散布図としてプロットしている。これは、確かに解析的な計算によって得られた楕円が、ドロップアウトにより生じた確率分布をとらえていると評価するために行ったものであるが、実際に実施する場合には、このような細かい点を描画するための標本計算は不要である。 For example, in FIG. 9, based on the Gaussian distribution parameters (mean value, variance-covariance value) of the z value in the latent space obtained by the analytical calculation in the first embodiment of the present invention. , The posterior probability distribution corresponding to the input of each handwritten number is represented by an ellipse of q φ (z | x). Furthermore, in order to visually verify whether the posterior probability distribution (ellipse) obtained by analytical calculation is correct, 400 points were stochastically dispersed for each ellipse by Monte Carlo dropout. It is plotted as a scatter plot. This was done to evaluate that the ellipse obtained by the analytical calculation certainly captures the probability distribution generated by the dropout, but when it is actually implemented, it is like this. No sample calculation is required to draw fine points.
一方、非特許文献1に開示されている従来技術に係るVAEでは、図1を参照して説明したように、オートエンコーダの中心の潜在空間に関して計算できるのは、zの値そのものではなく、zがとる分布のパラメータである。したがって、従来技術に係るVAEでは、図9及び図10に示すようなzの値の散布図を直接描画することができない。このように、従来技術に係るVAEでは共分散値の計算は行われないことから、平均、分散、共分散の全てを使って初めて分かる確率分布の形状、すなわち、図9及び図10に示されている楕円形状を描くことができない。したがって、従来技術に係るVAEでは、実際の個々のzの値が潜在空間内で、異なる入力の手書き数字画像ごとに重なっているのか、あるいはきちんと分離できているのかを見ることもできない。
On the other hand, in the VAE according to the prior art disclosed in
また、もし、従来のVAEで得られる結果を用いて図9及び図10に示すような分布を表示しようとする場合には、zがとる分布のパラメータとして平均値μzと分散値diag(Σz)だけではなく、潜在空間における共分散値offdiag(Σz)の出力も用意して重みを学習させ、学習後の完成した分布からサンプリングを行ったうえで散布図として表示する必要がある。すなわち、従来のVAEで共分散値を計算しようとした場合には、分布形状を決定づけるパラメータがより多く必要となり、より複雑な構造を設計する必要がある。 Further, if the distribution as shown in FIGS. 9 and 10 is to be displayed using the results obtained by the conventional VAE, the mean value μ z and the variance value diag (Σ) are used as the parameters of the distribution taken by z. It is necessary to prepare not only z ) but also the output of the covariance value offdiag (Σ z ) in the latent space to learn the weights, sample the completed distribution after learning, and then display it as a scatter plot. That is, when trying to calculate the covariance value by the conventional VAE, more parameters for determining the distribution shape are required, and it is necessary to design a more complicated structure.
また、図11(a)及び(b)は、本発明の第1の実施の形態における情報推定装置を用いた実験結果を評価するために作成された図である。図11(a)及び(b)は、2次元の潜在空間における20×20の各グリッドでサンプリングを行って、各グリッドの値をデコーダで手書き数字の画像に復元した結果を、そのグリッドの位置を反映させたまま並べてプロットした図である。なお、図11(a)には、オートエンコーダの最適化学習の回数がゼロ(学習回数=0、すなわち学習前)のときに得られた出力が図示されており、図11(b)には、オートエンコーダの最適化学習の回数が5000回目(学習回数=5000、すなわち学習後)のときに得られた出力が図示されている。 11 (a) and 11 (b) are diagrams created for evaluating the experimental results using the information estimation device according to the first embodiment of the present invention. In FIGS. 11A and 11B, sampling is performed on each 20 × 20 grid in a two-dimensional latent space, and the value of each grid is restored to an image of handwritten numbers by a decoder. It is a figure plotted side by side while reflecting. Note that FIG. 11 (a) shows the output obtained when the number of times of optimization learning of the autoencoder is zero (number of times of learning = 0, that is, before learning), and FIG. 11 (b) shows. , The output obtained when the number of times of optimization learning of the autoencoder is the 5000th time (the number of times of learning = 5000, that is, after learning) is shown in the figure.
最適化学習の回数がゼロのときには、オートエンコーダからの出力は、入力された手書き数字画像を復元できておらず、図11(a)に示すようにただのランダムなノイズである。一方、最適化学習の回数が5000回目では、オートエンコーダからの出力は、図11(a)に示すように入力された手書き数字画像を復元できていることがわかる。また、形状が似たような数字は、潜在空間内で似たような箇所に存在しており、従来技術に係るVAEと同じような結果が得られている。 When the number of optimization learnings is zero, the output from the autoencoder cannot restore the input handwritten numeric image, and is just random noise as shown in FIG. 11A. On the other hand, when the number of times of optimization learning is 5000, it can be seen that the output from the autoencoder can restore the input handwritten numeric image as shown in FIG. 11A. Further, numbers having similar shapes exist in similar places in the latent space, and the same result as VAE according to the prior art is obtained.
<第2の実施の形態>
次に、本発明の第2の実施の形態について説明する。上述した第1の実施の形態では、潜在空間でのzの値の確率分布qφ(z|x)は多変量ガウス分布であるとして計算を行っている。しかしながら、DF層からの出力XoutDFを計算するためのxinDF jWi,j DF項の中に、他の項に比べて逸脱して大きい値を持つ項が存在する場合には、上述した第1の実施の形態のようなDF層からの出力XoutDFを多変量ガウス分布とする近似が成り立たない。その場合は、特許文献1に記述されるように、ピーク項と呼ばれる逸脱したxinDF jWi,j DF項に対しては、ピーク項がドロップアウトされた場合及びドロップアウトされなかった場合を個別に考えることで、確率変数ではなく、条件確率下での定数ととらえ、それぞれの場合の下で、上述した第1の実施の形態のような多変量ガウス分布として計算することができる。そして、その場合は、複数の場合ごとの条件確率下での多変量ガウス分布となるため、DF層からの出力XoutDFは多変量“混合”ガウス分布となる。
<Second embodiment>
Next, a second embodiment of the present invention will be described. In the first embodiment described above, the probability distribution q φ (z | x) of the value of z in the latent space is calculated assuming that it is a multivariate Gaussian distribution. However, if there is a term in the xin DF j Wi, j DF term for calculating the output Xout DF from the DF layer that deviates from the other terms and has a larger value, it is described above. The approximation of the output Xout DF from the DF layer as a multivariate Gaussian distribution as in the first embodiment does not hold. In that case, as described in
なお、上述の第1の実施の形態では、DF層からの出力XoutDFの重みの計算に相当する項をWi,j DFXinDF jと記載していたが、第2の実施の形態では、xinDF jWi,j DFと記載する。両者は表記が異なっているもの、同一の項を表している。 In the first embodiment described above, the term corresponding to the calculation of the weight of the output Xout DF from the DF layer is described as Wi , j DF Xin DF j, but in the second embodiment, it is described as Wi, j DF Xin DF j. , Xin DF j Wi, j DF . Both have different notations and represent the same term.
ドロップアウト層と全結合層からなるDF層に関して、その出力ベクトルのi番目の要素XoutDF iは、重みWと入力XinDFとの積の和に、バイアス項bi DFを加えたものであり、以下の式のように表される。 Respect DF layer made of the drop-out layer and the total binding layer, i-th element Xout DF i of the output vector, the sum of the product of the weight W and the input Xin DF, and plus the bias term b i DF , Is expressed as the following equation.
その中のある1つの項が、他の項より逸脱してその絶対値が大きいピーク項(j=peak)である場合、つまり以下の式が成り立つ場合には、2つのガウス分布が混合した混合ガウス分布となる。 If one of the terms deviates from the other term and has a larger absolute value (j = peak), that is, if the following equation holds, then the two Gaussian distributions are mixed. It has a Gaussian distribution.
なお、上記の式の不等号「≫」は、左辺の値が右辺の値より逸脱して大きいことを意味する。 The inequality sign ">>" in the above equation means that the value on the left side deviates from the value on the right side and is larger.
以下、より一般的な場合として、DF層(例えば、図3のDF1層)からの出力ベクトルXoutDFの確率分布について、どのように多変量混合ガウス分布として計算されるのかについて説明する。 Hereinafter, as a more general case, how the probability distribution of the output vector Xout DF from the DF layer (for example, the DF1 layer in FIG. 3) is calculated as a multivariate mixed Gaussian distribution will be described.
第1の実施の形態と全く同様に、nXout DF次元の出力ベクトルXoutDFは、nXout DF個の要素を持つ確率変数ベクトルであり、i番目の要素(1≦i≦nXout DF)を、XoutDF iと表す。それぞれの要素XoutDF iは、以下の式のように、インデックスj(1≦j≦nXin DF)で表されるnXin DF個のxW項を持った式となる。 Exactly as in the first embodiment, the output vector Xout DF of the n Xout DF dimension is a random variable vector having n Xout DF elements, and the i-th element (1 ≦ i ≦ n Xout DF ) is set. , Xout DF i . Each element Xout DF i is an expression having n Xin DF xW terms represented by an index j (1 ≦ j ≦ n Xin DF ) as shown in the following formula.
ここで、前述のピーク項(j=peak)とは、ある1つのインデックスi番目の行(XoutDF i)の中で逸脱して大きい値を持つxW項ではなく、1≦i≦nXout DFの範囲のすべての行の中において、共通のインデックスjを持つ最も逸脱したxW項の値であり、j番目の列(“カラム”)のことである。そのため、あるインデックスiで特定される1つの行だけからピーク項を決定することはできず、例えば以下のような手順で、すべての行のインデックスiを見ながら、ピーク項(j=peak)のカラムを見つけ出す必要がある。 Here, the above-mentioned peak term (j = peak) is not an xW term having a large value deviating from the i-th row (Xout DF i ) of a certain index, but 1 ≦ i ≦ n Xout DF. The most deviant xW term value with a common index j in all rows of the range, the jth column (“column”). Therefore, the peak term cannot be determined from only one row specified by a certain index i. For example, the peak term (j = peak) can be determined while looking at the index i of all rows by the following procedure. You need to find the column.
まず、すべてのnXin DF個のカラムに対して、逸脱度を示すカラムの箱PeakScorej(1≦j≦nXin DF)を用意し、以下のように初期値をゼロとする。 First, for all n Xin DF columns, a column box PeakScore j (1 ≦ j ≦ n Xin DF ) indicating the degree of deviation is prepared, and the initial value is set to zero as follows.
次に、あるi番目の行におけるピーク項を探す。すなわち、i番目の行のすべてのxWj項(1≦j≦nXin DF)の平均値xWMeaniを計算する。 Next, look for the peak term in the i-th row. That is, the average value xWMean i of all xW j terms (1 ≦ j ≦ n Xin DF ) in the i-th row is calculated.
なお、右辺は、あるi番目の行において、すべてのインデックスjのxWj項の平均値を計算することを意味する。さらに、そのあるi番目の行における、それぞれのxWj項(1≦j≦nXin DF)について、平均値からどれだけ逸脱しているかを示す値xWDeviationi,jを計算する。この値は、例えば以下の式のように、平均値との差分の絶対値として計算される。 The right side means that the average value of the xW j term of all the indexes j is calculated in the i-th row. Further, for each xW j term (1 ≦ j ≦ n Xin DF ) in the i-th row, the values xWDaviation i, j indicating how much the value deviates from the average value are calculated. This value is calculated as the absolute value of the difference from the average value, for example, as in the following formula.
これにより、あるi番目の行におけるj番目のxWj項が平均値からどれだけ逸脱しているかを示すスコア(逸脱度)を計算することができる。すべての行(すべてのインデックスi)について上記の計算を行い、累積的に各インデックスjに対するスコアを蓄積していく。例えば以下のように、xWDeviationi,jの値を前述したカラムの箱PeakScorejに足し合わせる。 As a result, it is possible to calculate a score (deviation degree) indicating how much the j-th xW j term in a certain i-th row deviates from the average value. The above calculation is performed for all rows (all indexes i), and the scores for each index j are cumulatively accumulated. For example, as shown below , the values of xWDeviation i, j are added to the above-mentioned column box PeakScore j.
以上の計算をすべての行(すべてのインデックスi:1≦i≦nXout DF)について繰り返し、PeakScorejを更新していくことで、最終的に、各カラム(各インデックスj)の逸脱度を得ることができる。そして、最終的に得られたPeakScorej(1≦j≦nXin DF)を値が大きいものから順に並べて、PeakScorejが大きい値から順番に所定の個数(例えば、K個)のインデックスjを記録する。これにより、K個のインデックスj(jk=1,jk=2,…,jk=K)が、コラムとしてのピーク項xWjの候補として特定される。 By repeating the above calculation for all rows (all indexes i: 1 ≦ i ≦ n Xout DF ) and updating PeakScore j , the deviation degree of each column (each index j) is finally obtained. be able to. Then, the finally obtained PeakScore j (1 ≦ j ≦ n Xin DF ) is arranged in order from the one with the largest value, and a predetermined number (for example, K) of indexes j are recorded in order from the value with the largest PeakScore j. To do. As a result, K indexes j (j k = 1 , j k = 2 , ..., J k = K ) are specified as candidates for the peak term xW j as a column.
次に、それぞれのピーク項xWjに対して、ドロップアウトされた場合/ドロップアウトされなかった場合の組み合わせを考え、混合ガウス分布を作成する。K個のピーク項を考慮した場合には、混合ガウス分布の混合数は2K個となる。 Next, for each peak term xW j , a mixed Gaussian distribution is created by considering the combination of the case where the dropout is performed and the case where the peak term is not dropped out. When K peak terms are taken into consideration, the number of mixed Gaussian distributions is 2 K.
なお、ピーク項として記録する個数(K個)が大きいほど、正確に真の確率分布を計算することができるが、一方、Kの値を大きくすれば計算負荷が大きくなってしまう。したがって、Kの値は、計算負荷とのトレードオフにより、計算処理できる範囲でユーザが事前に指定してもよい。ピーク項の個数(Kの値)は1又は2以上の整数とすることが可能であり、また、ピーク項の個数(Kの値)をゼロとした場合は、上述した本発明の第1の実施の形態と同様の計算となる。 The larger the number (K) recorded as the peak term, the more accurately the true probability distribution can be calculated, but on the other hand, the larger the value of K, the larger the calculation load. Therefore, the value of K may be specified in advance by the user within a range in which calculation processing can be performed, due to a trade-off with the calculation load. The number of peak terms (value of K) can be an integer of 1 or 2 or more, and when the number of peak terms (value of K) is zero, the first aspect of the present invention described above. The calculation is the same as that of the embodiment.
以下、第1の実施の形態に係る計算において、K個のすべてのピーク項xWj(j=jK=1,jK=2,…,jk=K)についてドロップアウトされた場合/ドロップアウトされなかった場合を考慮し、それぞれの場合における条件確率の下でガウス分布として近似した出力XoutDFの確率分布を計算する計算方法について、具体的な例を用いて説明する。 Hereinafter, in the calculation according to the first embodiment, when all K peak terms xW j (j = j K = 1 , j K = 2 , ..., J k = K ) are dropped out / dropped. A calculation method for calculating the probability distribution of the output Xout DF approximated as a Gaussian distribution under the conditional probability in each case will be described using a specific example in consideration of the case where the output is not out.
ここでは、具体例としてピーク項の個数を2個(K=2)とし、前述のPeakScorejから計算された2つのピーク項xWjのインデックスj(j=jK=1,jK=2)が、jK=1=3、jK=2=5であった場合を考える。すなわち、ピーク項はxWj=3とxWj=5である。 Here, as a specific example, the number of peak terms is set to 2 (K = 2), and the index j (j = j K = 1 , j K = 2 ) of the two peak terms xW j calculated from the above-mentioned PeakScore j). However, consider the case where j K = 1 = 3 and j K = 2 = 5. That is, the peak terms are xW j = 3 and xW j = 5 .
2つのピーク項xWj=3、xWj=5がドロップアウトされた場合/ドロップアウトされなかった場合の組み合わせは、下記のケース(1)〜(4)の2K=2=4通り存在する。 There are 4 combinations of 2 K = 2 = 4 in the following cases (1) to (4) when the two peak terms xW j = 3 and xW j = 5 are dropped out / not dropped out. ..
(1)xWj=3がドロップアウトされた、xWj=5がドロップアウトされた
(2)xWj=3がドロップアウトされた、xWj=5がドロップアウトされなかった
(3)xWj=3がドロップアウトされなかった、xWj=5がドロップアウトされた
(4)xWj=3がドロップアウトされなかった、xWj=5がドロップアウトされなかった
(1) xW j = 3 was dropped out, xW j = 5 was dropped out (2) xW j = 3 was dropped out, xW j = 5 was not dropped out (3) xW j = 3 was not dropped out, xW j = 5 was dropped out (4) xW j = 3 was not dropped out, xW j = 5 was not dropped out
上記4つのケース(1)〜(4)を考慮すると、出力XoutDFの確率分布は4つの多変量混合ガウス分布となる。ケース(1)〜(4)のそれぞれのケースが起こり得る確率は、DF層におけるドロップアウト率をpDrop DFとすると、以下のようになる。 Considering the above four cases (1) to (4), the probability distribution of the output Xout DF is a four multivariate mixed Gaussian distribution. The probabilities that each of the cases (1) to (4) can occur are as follows, where the dropout rate in the DF layer is p Drop DF .
ピーク項に対応するインデックスjK=1=3、jK=2=5以外のすべてのインデックスjにおけるxinDF jWi,j DF項(1≦j、j≠3,j≠5≦nXin DF)は、ドロップアウトにより消えたり残ったりとゆらゆら変化する確率変数である。一方、ピーク項xinDF j=3Wi,j=3 DFとxinDF j=5Wi,j=5 DFは、それぞれの項がドロップアウトされた場合/ドロップアウトされなかった場合を考えるので、それぞれの条件下での固定値として取り扱うことができる。このことから、第2の実施の形態では、第1の実施の形態に係る計算において、あるi番目の行における確率変数として考えるxinDF jWi,j DF項群のうち、ピーク項xinDF j=3Wi,j=3 DFとピーク項xinDF j=5Wi,j=5 DFは取り除いて、以下のように計算する。 Xin DF j Wi, j DF term (1 ≤ j, j ≠ 3, j ≠ 5 ≤ n Xin) in all indexes j except index j K = 1 = 3, j K = 2 = 5 corresponding to the peak term DF ) is a random variable that fluctuates as it disappears or remains due to a dropout. On the other hand, the peak terms xin DF j = 3 Wi, j = 3 DF and xin DF j = 5 Wi, j = 5 DF consider the case where each term is dropped out / not dropped out. , Can be treated as a fixed value under each condition. Therefore, in the second embodiment, the peak term xin DF of the xin DF j Wi, j DF term group considered as a random variable in the i-th row in the calculation according to the first embodiment. Remove j = 3 Wi, j = 3 DF and peak term xin DF j = 5 Wi, j = 5 DF , and calculate as follows.
したがって、ケース(1)〜(4)のそれぞれの場合において、平均値は以下のようになる。 Therefore, in each of the cases (1) to (4), the average value is as follows.
また、分散値は、以下のように、第1の実施の形態と同様の式で計算できる。 Further, the variance value can be calculated by the same formula as in the first embodiment as follows.
ただし、ListWDFxDF iに関して、2つのピーク項を確率変数でなく定数として取り扱うため、バイアス項と同様にピーク項xinDF j=3Wi,j=3 DFとピーク項xinDF j=5Wi,j=5 DFを無視することができる。したがって、以下の式のように、ピーク項に対応するインデックスjK=1=3、jK=2=5を除くxinDF jWi,j DF項のリストListWDFxDF j≠3,j≠5,iを計算に使用する。 However, regarding ListW DF x DF i , since the two peak terms are treated as constants instead of random variables, the peak terms xin DF j = 3 Wi, j = 3 DF and the peak terms xin DF j = 5 are treated in the same way as the bias term. Wi, j = 5 DF can be ignored. Accordingly, as shown in the following expression, the index j K = 1 = 3, j K = xin DF j W i except 2 = 5, j list of DF claim ListW DF x DF j ≠ 3 corresponding to the peak section, j ≠ 5, i is used in the calculation.
このようにピーク項を除いたListWDFxDF iを使用して、前述した式から分散値Var(XoutDF i)を求める。分散値Var(XoutDF i)は、ケース(1)〜(4)において、すべて同じ値となる。 Using ListW DF x DF i excluding the peak term in this way, the variance value Var (Xout DF i ) is obtained from the above equation. The variance value Var (Xout DF i ) is the same value in all cases (1) to (4).
また、共分散値も第1の実施の形態と同様に求められる。 Further, the covariance value is also obtained as in the first embodiment.
共分散値は、ケース(1)〜(4)において、すべて同じ値となる。 The covariance values are all the same in cases (1) to (4).
最終的に、分散共分散行列は、すべてのケース(1)〜(4)において同じ値となる。 Finally, the covariance matrix has the same value in all cases (1)-(4).
以上、4つのケース(1)〜(4)について、各ケースが起こり得る確率値と、各ケースにおける平均値、分散値、共分散値が計算できる。これらを単純に確率値を重みとして足し合わせることで、以下の式のように、4つのガウス分布を混合させた多変量混合ガウス分布として、出力値の確率分布を計算することができる。 As described above, for each of the four cases (1) to (4), the probability value at which each case can occur and the average value, variance value, and covariance value in each case can be calculated. By simply adding these as weights to the probability values, the probability distribution of the output value can be calculated as a multivariate mixed Gaussian distribution in which four Gaussian distributions are mixed, as shown in the following equation.
また、第1の実施の形態では、出力値の確率分布qφ(z|x)が正則化の条件を満たすかを判定するために、多変量ガウス分布である確率分布qφ(z|x)と事前分布pθ(z)とのKLダイバージェンスを計算している。一方、第2の実施の形態では、出力値の確率分布qφ(z|x)が混合ガウス分布である。混合ガウスのKLダイバージェンスの計算には、解析的解は存在しないが、非特許文献2に挙げられるような、変分近似(Variational Approximation)法など、様々な近似計算法で計算することができる。
In the first embodiment, the probability of the output value distribution q phi | to (z x) to determine whether the condition is satisfied regularization probability multivariate Gaussian distribution q φ (z | x ) And the prior distribution p θ (z) are calculated for KL divergence. On the other hand, in the second embodiment, the probability distribution q φ (z | x) of the output value is a mixed Gaussian distribution. There is no analytical solution for the calculation of KL divergence of mixed gauss, but it can be calculated by various approximate calculation methods such as the variational approximation method as mentioned in
以上の第2の実施の形態に係る計算方法により、第1の実施の形態の拡張として、潜在空間でのzの値の確率分布qφ(z|x)を多変量混合ガウス分布として計算することができる。その計算結果として、図12及び図13に、それぞれ、ピーク項の個数を4個(K=4)として、2K=4=16個のガウス分布からなる混合ガウス分布で、潜在変数の潜在空間でのzの値の確率分布qφ(z|x)を2次元でプロットさせたものを示す。この場合、入力画像としては、図の右上に小さく示される文字「H」の画像を入れた。図9に示すガウス分布のときと同様に、モンテカルロの分布(散布図や1次元のヒストグラム)と解析的分布(2次元の等高線、1次元の関数の形状)が一致し、解析的に分布を混合ガウスとして計算できていることがわかる。 By the above calculation method according to the second embodiment, as an extension of the first embodiment, the probability distribution q φ (z | x) of the value of z in the latent space is calculated as a multivariate mixed Gaussian distribution. be able to. As a result of the calculation, in FIGS. 12 and 13, the latent space of the latent variable is a mixed Gaussian distribution consisting of 2 K = 4 = 16 Gaussian distributions, where the number of peak terms is 4 (K = 4), respectively. The probability distribution q φ (z | x) of the value of z in is plotted in two dimensions. In this case, as the input image, an image of the small letter "H" shown in the upper right of the figure was inserted. Similar to the Gaussian distribution shown in FIG. 9, the Monte Carlo distribution (scatter plot and one-dimensional histogram) and the analytical distribution (two-dimensional contour lines and one-dimensional function shape) match, and the distribution is analytically distributed. It can be seen that it can be calculated as a mixed gauss.
また、図5に図示されているように複数のドロップアウト層を設けた場合においても、混合ガウス分布の条件確率下でのそれぞれのガウス分布について個別に第1の実施の形態と同様の計算を行うことで、出力値qφ(z|x)の確率分布を計算することができる。ただし、エンコーダに設けられたDF層で計算が行われるとガウス分布がさらに複数の混合ガウス分布に分かれるため、複数の各DF層を伝搬するごとに、混合数がどんどん増えていく。そのため、例えば既存の技術を利用して、似ている混合ガウス分布同士を融合させるなどの処理を行うことで、ガウス分布の混合数を低減させながら計算を行ってもよい。 Further, even when a plurality of dropout layers are provided as shown in FIG. 5, the same calculation as in the first embodiment is individually performed for each Gaussian distribution under the conditional probability of the mixed Gaussian distribution. By doing so, the probability distribution of the output value q φ (z | x) can be calculated. However, when the calculation is performed on the DF layer provided in the encoder, the Gaussian distribution is further divided into a plurality of mixed Gaussian distributions, so that the number of mixturees increases steadily as each of the plurality of DF layers propagates. Therefore, for example, the calculation may be performed while reducing the mixed number of Gaussian distributions by performing processing such as fusing similar mixed Gaussian distributions by using an existing technique.
また、本発明の第2の実施の形態に係る情報推定装置は、本発明の第1の実施の形態に係る情報推定装置の構成(図6に図示されている構成)を拡張することによって実現可能である。例えば、オートエンコーダ計算部20に、DF層の出力値XoutDF iを計算する際に現れる重みWと入力XinDFとの積であるxW項のピーク項を決定する機能を有するデータ解析部を設ければよい。そして、オートエンコーダ計算部20が、データ解析部で特定されたK個のピーク項について上述した計算を実行するよう拡張されることで、潜在空間において、多変量混合ガウス分布に従ったzの値を出力することが可能となる。また、正則化の条件に係る計算についても、オートエンコーダ計算部20が上述した計算を実行するよう拡張されればよい。
Further, the information estimation device according to the second embodiment of the present invention is realized by expanding the configuration (configuration shown in FIG. 6) of the information estimation device according to the first embodiment of the present invention. It is possible. For example, the
本発明は、ニューラルネットワークを使用した推定技術に適用可能であり、確率的要素を備えた新たなオートエンコーダを実現することが可能である。 The present invention is applicable to an estimation technique using a neural network, and it is possible to realize a new autoencoder having a stochastic element.
10 情報推定装置
20 オートエンコーダ計算部
30 エンコーダ出力分布形状計算部
40 コスト関数計算部
50 パラメータ最適化計算部
10
Claims (12)
エンコーダ及びデコーダにより構成されたオートエンコーダを備え、前記オートエンコーダに入力された入力データに基づいて前記エンコーダ及び前記デコーダで順次計算処理を行い、前記推定処理の結果として前記オートエンコーダから出力データを出力するよう構成されているオートエンコーダ計算部を有し、
データの一部をドロップアウトさせるドロップアウト層と、前記ドロップアウト層から出力されたデータに対して重みの計算を行う全結合層との組み合わせからなる少なくとも1つの一体化層を、前記エンコーダの最終層として設けることで、前記エンコーダからの出力値である潜在空間での出力値が多次元確率変数ベクトルとなるように構成されている情報推定装置。 An information estimation device that performs estimation processing using a neural network.
An autoencoder composed of an encoder and a decoder is provided, calculation processing is sequentially performed by the encoder and the decoder based on input data input to the autoencoder, and output data is output from the autoencoder as a result of the estimation processing. Has an autoencoder calculator that is configured to
The final encoder has at least one integrated layer consisting of a combination of a dropout layer that drops out part of the data and a fully coupled layer that calculates weights for the data output from the dropout layer. An information estimation device configured to be provided as a layer so that the output value in the latent space, which is the output value from the encoder, becomes a multidimensional random variable vector.
前記リストに含まれる各項のうちの一部が、前記ドロップアウト率に従ってゼロとなる請求項1に記載の情報推定装置。 The autoencoder calculation unit drops out a part of the data input to the integrated layer in the dropout layer according to a predetermined dropout rate, and in the fully connected layer, from the dropout layer. It is configured to calculate a biased value of the sum of the list of terms obtained by multiplying the vector value of the output data by a matrix of weights.
The information estimation device according to claim 1, wherein a part of each item included in the list becomes zero according to the dropout rate.
前記リストに含まれる各項の和にドロップアウトされずに残る比率を掛けて、さらにバイアスを加えることで、前記リストの和が従う分布の平均値を計算し、
前記リストの分散値を計算して標本平均の分散値計算を行うことで、前記リストの和が従う分布の分散値を計算し、
前記リストの和が従う分布の前記分散値から、前記リストの和のある2つの要素の相関を示す共分散値を計算し、
前記平均値、前記分散値、前記共分散値から、前記潜在空間での出力値である多次元確率変数ベクトルが従う確率分布の形状を解析的に計算するよう構成されている請求項3に記載の情報推定装置。 Encoder output distribution shape calculation unit
By multiplying the sum of each term included in the list by the ratio that remains without being dropped out and further biasing, the average value of the distribution that the sum of the list follows is calculated.
By calculating the variance value of the list and performing the variance value calculation of the sample mean, the variance value of the distribution according to the sum of the list is calculated.
From the variance value of the distribution followed by the sum of the list, the covariance value showing the correlation of the two elements with the sum of the list is calculated.
The third aspect of claim 3, wherein the shape of the probability distribution followed by the multidimensional random variable vector, which is the output value in the latent space, is analytically calculated from the average value, the variance value, and the covariance value. Information estimation device.
前記コスト関数に基づいて、前記正則化処理及び前記復元処理を最適化するパラメータを計算し、前記オートエンコーダの計算で用いられるパラメータを前記最適化パラメータで更新するパラメータ最適化計算部とを、
有する請求項1から4のいずれか1つに記載の情報推定装置。 Regularization processing that makes the probability distribution followed by the multidimensional random variable vector, which is the output value in the latent space, stay in the same shape as the prior distribution, and the output data output from the autoencoder to the autoencoder. A cost function calculation unit that calculates a cost function that evaluates the restoration process that restores the input data, and
A parameter optimization calculation unit that calculates parameters for optimizing the regularization process and the restoration process based on the cost function and updates the parameters used in the calculation of the autoencoder with the optimization parameters.
The information estimation device according to any one of claims 1 to 4.
前記オートエンコーダ計算部は、前記ピーク項が前記ドロップアウト層においてドロップアウトされる場合と、前記ピーク項が前記ドロップアウト層においてドロップアウトされない場合とに分けて、それぞれの場合のガウス分布の平均値、分散値、共分散値を計算し、さらに、それぞれの場合が起こる確率値を用いて、それぞれの場合のガウス分布の混合和を計算することで、多変量混合ガウス分布を算出するよう構成されている請求項2に記載の情報推定装置。 A term obtained by multiplying the vector value of the data output from the dropout layer by a weight matrix, which is used when calculating each element of the multidimensional random variable vector data which is the data output from the integrated layer. In the list of, the terms specified by the common index included in each element of the multidimensional random variable vector are referred to, and the indexes of the terms having a value larger than the terms specified by the other indexes are specified by a predetermined number. It has a data analysis unit that extracts and identifies as a peak term with a value larger than the other terms.
The auto-encoder calculation unit divides the case where the peak term is dropped out in the dropout layer and the case where the peak term is not dropped out in the dropout layer, and the average value of the Gaussian distribution in each case. , Variance value, and covariance value are calculated, and the mixture of Gaussian distributions in each case is calculated using the probability value that each case occurs, so that the multivariate mixed Gaussian distribution is calculated. The information estimation device according to claim 2.
エンコーダ及びデコーダにより構成されたオートエンコーダを用いて、前記オートエンコーダに入力された入力データに基づいて前記エンコーダ及び前記デコーダで順次計算処理を行い、前記推定処理の結果として前記オートエンコーダから出力データを出力するオートエンコーダ計算ステップを有し、
データの一部をドロップアウトさせるドロップアウト層と、前記ドロップアウト層から出力されたデータに対して重みの計算を行う全結合層との組み合わせからなる少なくとも1つの一体化層を、前記エンコーダの最終層として設けることで、前記エンコーダからの出力値である潜在空間での出力値を多次元確率変数ベクトルとする情報推定方法。 It is an information estimation method performed by an information estimation device that performs estimation processing using a neural network.
Using an autoencoder composed of an encoder and a decoder, the encoder and the decoder sequentially perform calculation processing based on the input data input to the autoencoder, and as a result of the estimation processing, output data from the autoencoder is output. Has an autoencoder calculation step to output
The final encoder has at least one integrated layer consisting of a combination of a dropout layer that drops out part of the data and a fully coupled layer that calculates weights for the data output from the dropout layer. An information estimation method in which an output value in a latent space, which is an output value from the encoder, is used as a multidimensional random variable vector by providing it as a layer.
前記リストに含まれる各項のうちの一部が、前記ドロップアウト率に従ってゼロとなる請求項7に記載の情報推定方法。 In the autoencoder calculation step, a part of the data input to the integrated layer is dropped out in the dropout layer according to a predetermined dropout rate, and in the fully connected layer, from the dropout layer. Calculate the sum of the list of terms obtained by multiplying the vector value of the output data by the weight matrix and biasing the value.
The information estimation method according to claim 7, wherein a part of each item included in the list becomes zero according to the dropout rate.
前記リストに含まれる各項の和にドロップアウトされずに残る比率を掛けて、さらにバイアスを加えることで、前記リストの和が従う分布の平均値を計算するステップと、
前記リストの分散値を計算して標本平均の分散値計算を行うことで、前記リストの和が従う分布の分散値を計算するステップと、
前記リストの和が従う分布の前記分散値から、前記リストの和のある2つの要素の相関を示す共分散値を計算するステップと、
前記平均値、前記分散値、前記共分散値から、前記潜在空間での出力値である多次元確率変数ベクトルが従う確率分布の形状を解析的に計算するステップとを、
有する請求項9に記載の情報推定方法。 Encoder output distribution shape calculation step
The step of calculating the average value of the distribution that the sum of the list follows by multiplying the sum of each term included in the list by the ratio that remains without being dropped out and further biasing it.
By calculating the variance value of the list and calculating the variance value of the sample mean, the step of calculating the variance value of the distribution according to the sum of the list, and
A step of calculating a covariance value indicating the correlation between two elements having a sum of the list from the variance value of the distribution followed by the sum of the list.
A step of analytically calculating the shape of the probability distribution followed by the multidimensional random variable vector, which is the output value in the latent space, from the average value, the variance value, and the covariance value.
The information estimation method according to claim 9.
前記コスト関数に基づいて、前記正則化処理及び前記復元処理を最適化するパラメータを計算し、前記オートエンコーダの計算で用いられるパラメータを前記最適化パラメータで更新するパラメータ最適化計算ステップとを、
有する請求項7から10のいずれか1つに記載の情報推定方法。 Regularization processing that makes the probability distribution followed by the multidimensional random variable vector, which is the output value in the latent space, stay in the same shape as the prior distribution, and the output data output from the autoencoder to the autoencoder. A cost function calculation step that calculates a cost function that evaluates the restoration process that restores the input data that is input, and
A parameter optimization calculation step of calculating the parameters for optimizing the regularization process and the restoration process based on the cost function and updating the parameters used in the calculation of the autoencoder with the optimization parameters.
The information estimation method according to any one of claims 7 to 10.
前記オートエンコーダ計算ステップは、前記ピーク項が前記ドロップアウト層においてドロップアウトされる場合と、前記ピーク項が前記ドロップアウト層においてドロップアウトされない場合とに分けて、それぞれの場合のガウス分布の平均値、分散値、共分散値を計算し、さらに、それぞれの場合が起こる確率値を用いて、それぞれの場合のガウス分布の混合和を計算することで、多変量混合ガウス分布を算出する請求項8に記載の情報推定方法。 A term obtained by multiplying the vector value of the data output from the dropout layer by a weight matrix, which is used when calculating each element of the multidimensional random variable vector data which is the data output from the integrated layer. In the list of, the terms specified by the common index included in each element of the multidimensional random variable vector are referred to, and the indexes of the terms having a value larger than the terms specified by the other indexes are specified by a predetermined number. It has a data analysis step to extract and identify as a peak term with a value greater than the other terms.
The auto-encoder calculation step is divided into a case where the peak term is dropped out in the dropout layer and a case where the peak term is not dropped out in the dropout layer, and the average value of the Gaussian distribution in each case. , Variance value, covariance value, and further, using the probability value at which each case occurs, the mixture of Gaussian distributions in each case is calculated to calculate the multivariate mixed Gaussian distribution. Information estimation method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018021943A JP6893483B2 (en) | 2018-02-09 | 2018-02-09 | Information estimation device and information estimation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018021943A JP6893483B2 (en) | 2018-02-09 | 2018-02-09 | Information estimation device and information estimation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019139482A JP2019139482A (en) | 2019-08-22 |
JP6893483B2 true JP6893483B2 (en) | 2021-06-23 |
Family
ID=67694065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018021943A Active JP6893483B2 (en) | 2018-02-09 | 2018-02-09 | Information estimation device and information estimation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6893483B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7046768B2 (en) * | 2018-09-20 | 2022-04-04 | 株式会社デンソーアイティーラボラトリ | Information estimation device and information estimation method |
CN111161249B (en) * | 2019-12-31 | 2023-06-02 | 复旦大学 | Unsupervised medical image segmentation method based on domain adaptation |
WO2021161823A1 (en) * | 2020-02-14 | 2021-08-19 | 住友電気工業株式会社 | Determination device, restoration model generation method, and computer program |
JP7092312B2 (en) * | 2020-03-31 | 2022-06-28 | 東芝情報システム株式会社 | Plane data processing device, plane data processing method and plane data processing program |
JP7275350B2 (en) * | 2021-05-20 | 2023-05-17 | アクタピオ,インコーポレイテッド | Information processing method, information processing device, and information processing program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3385889A4 (en) * | 2015-12-01 | 2019-07-10 | Preferred Networks, Inc. | Abnormality detection system, abnormality detection method, abnormality detection program, and method for generating learned model |
US10776712B2 (en) * | 2015-12-02 | 2020-09-15 | Preferred Networks, Inc. | Generative machine learning systems for drug design |
-
2018
- 2018-02-09 JP JP2018021943A patent/JP6893483B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019139482A (en) | 2019-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6893483B2 (en) | Information estimation device and information estimation method | |
Aghasi et al. | Net-trim: Convex pruning of deep neural networks with performance guarantee | |
Falco et al. | Spectral and spatial classification of hyperspectral images based on ICA and reduced morphological attribute profiles | |
WO2022041678A1 (en) | Remote sensing image feature extraction method employing tensor collaborative graph-based discriminant analysis | |
Huang et al. | Sparse signal recovery via generalized entropy functions minimization | |
CN111696027B (en) | Multi-modal image style migration method based on adaptive attention mechanism | |
Dobrescu et al. | Understanding deep neural networks for regression in leaf counting | |
CN104268593A (en) | Multiple-sparse-representation face recognition method for solving small sample size problem | |
US20170177924A1 (en) | Attribute factor analysis method, device, and program | |
US11423043B2 (en) | Methods and systems for wavelet based representation | |
Wu et al. | Fractional spectral graph wavelets and their applications | |
JP7046768B2 (en) | Information estimation device and information estimation method | |
Shen et al. | Efficient hyperspectral sparse regression unmixing with multilayers | |
CN112949658A (en) | Deep learning method with stable performance | |
Sondak et al. | Learning a reduced basis of dynamical systems using an autoencoder | |
Rodner et al. | Learning with few examples for binary and multiclass classification using regularization of randomized trees | |
Ortelli et al. | Faster estimation of discrete choice models via dataset reduction | |
Bartan et al. | Neural Fisher discriminant analysis: Optimal neural network embeddings in polynomial time | |
Hou et al. | Remote sensing textual image classification based on extreme learning machine and hybrid rice optimization algorithm | |
Zhang et al. | Wasserstein generative recurrent adversarial networks for image generating | |
WO2020040007A1 (en) | Learning device, learning method, and learning program | |
Xiong et al. | Graph independence testing | |
CN113283519A (en) | Deep neural network approximate model analysis method based on discrete coefficients | |
Pintea et al. | Asymmetric kernel in Gaussian Processes for learning target variance | |
Cui et al. | Topology Inference of Directed Graphs by Gaussian Processes With Sparsity Constraints |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200630 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210428 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210525 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210601 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6893483 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |