Training method, storage medium, and training device
A training method of an autoencoder that performs encoding and decoding, for a computer to execute a process includes encoding input data by the autoencoder; obtaining a probability distribution of feature data obtained by encoding the input data; generating first decoded data by decoding the feature data by the autoencoder; adding a noise to the feature data by the autoencoder; generating second decoded data by decoding the feature data to which the noise is added by the autoencoder; and training the autoencoder to train the probability distribution of the feature data so that a first error between the first decoded data and the input data, a second error between the first decoded data and the second decoded data, and an information entropy of the probability distribution are decreased.
1 . A training method implemented by a computer of training an autoencoder that is a neural network model including an encoder and a decoder, the training method comprising:
encoding input data by the encoder of the autoencoder to obtain feature data having fewer dimensions than the input data;
obtaining a probability distribution of the feature data obtained by inputting the feature data to a model trained to estimate, in response to the feature data, the probability distribution of the feature data;
generating first decoded data by decoding the feature data by the decoder of the autoencoder;
adding a noise to the feature data;
generating second decoded data by decoding, using the decoder of the autoencoder, the feature data to which the noise is added;
calculating a weighted sum of: a first error between the first decoded data and the input data, a second error between the first decoded data and the second decoded data, and an information entropy of the probability distribution; and
training the autoencoder and the model by updating parameters of the autoencoder and parameters of the model so as to minimize the calculated weighted sum, thereby the autoencoder and the model are trained to enable the autoencoder to extract the feature data having a probability density that is proportional to a probability density of the input data.
2 . The training method according to claim 1 , wherein
the model is a Gaussian mixture model, wherein
the training includes training the autoencoder to train an encoding parameter of the autoencoder, a decoding parameter of the autoencoder, and a parameter of the Gaussian mixture model.
3 . The training method according to claim 1 , wherein
the obtaining includes obtaining the probability distribution based on a similarity between the first decoded data and the input data.
4 . The training method according to claim 1 , wherein
the obtaining includes obtaining the probability distribution parametrically.
5 . The training method according to claim 1 , wherein
the noise is a uniform random number, based on a distribution of which an average is zero, that has dimensions as many as the feature data and is uncorrelated between dimensions.
6 . The training method according to claim 1 , wherein
the first error is based on an error function defined so that a differentiated result satisfies a certain condition.
7 . The training method according to claim 1 , wherein
the first error is a squared error between the first decoded data and the input data.
8 . The training method according to claim 1 , wherein
the first error is a logarithm of the squared error between the first decoded data and the input data.
9 . The training method according to claim 1 , wherein
the second error is a squared error between the first decoded data and the second decoded data.
10 . The training method according to claim 1 , wherein the process further comprising
performing anomaly detection on input new data based on the trained autoencoder and the probability distribution.
11 . A non-transitory computer-readable storage medium storing a training program of training an autoencoder that is a neural network model including an encoder and a decoder, the training program comprising instructions for causing at least one computer to execute a process, the process comprising:
encoding input data by the encoder of the autoencoder to obtain feature data having fewer dimensions than the input data;
obtaining a probability distribution of the feature data obtained by inputting the feature data to a model trained to estimate, in response to the feature data, the probability distribution of the feature data;
generating first decoded data by decoding the feature data by the decoder of the autoencoder;
adding a noise to the feature data;
generating second decoded data by decoding, using the decoder of the autoencoder, the feature data to which the noise is added; by the autoencoder; and
calculating a weighted sum of: a first error between the first decoded data and the input data, a second error between the first decoded data and the second decoded data, and an information entropy of the probability distribution; and
training the autoencoder and the model by updating parameters of the autoencoder and parameters of the model so as to minimize the calculated weighted sum, thereby the autoencoder and the model are trained to enable the autoencoder to extract the feature data having a probability density that is proportional to a probability density of the input data.
12 . A training device of training an autoencoder that is a neural network model including an encoder and a decoder, the training device comprising:
one or more memories; and
one or more processors coupled to the one or more memories and the one or more processors configured to:
encode input data by the encoder of the autoencoder to obtain feature data having fewer dimensions than the input data,
obtain a probability distribution of the feature data obtained by inputting the feature data to a model trained to estimate, in response to the feature data, the probability distribution of the feature data,
generate first decoded data by decoding the feature data by the decoder of the autoencoder,
add a noise to the feature data,
generate second decoded data by decoding, using the decoder of the autoencoder, the feature data to which the noise is added,
calculate a weighted sum of: a first error between the first decoded data and the input data, a second error between the first decoded data and the second decoded data, and an information entropy of the probability distribution, and
train the autoencoder and the model by updating parameters of the autoencoder and parameters of the model so as to minimize the calculated weighted sum, thereby the autoencoder and the model are trained to enable the autoencoder to extract the feature data having a probability density that is proportional to a probability density of the input data.