# US 2024/0202531 A1 · Training an autoencoder to obtain a generative model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202531 A1
- Document ID: US20240202531A1
- Status: Published application
- Kind: A1
- Application number: 18/508,078
- Filed: 2023-11-13
- Published: 2024-06-20
- Earliest claimed: 2022-12-12
- Applicants: Robert Bosch GmbH
- Inventors: Felix Schmitt
- Web page: https://patentgrep.com/patent/US20240202531A1

## CPC

- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/0475: Generative networks
- G06N 3/096: Transfer learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system and method are provided for training an autoencoder on training data to obtain a generative model for synthesizing new data. During the training, an affine transformation is applied to the output of the encoder to obtain representations of the training data instances in the latent space. Furthermore, a mean and covariance of the representations of the training data instances in the latent space is determined, and parameters of the affine transformation are updated to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance. The decoder of the trained autoencoder may be used as generative model, for example to synthesize input data to a test or simulation of a system, device, or machine, or to synthesize training data for the training of a(nother) machine learnable model.

## Claims

### Claim 1

A computer-implemented method of training an autoencoder on training data to obtain a generative model for synthesizing new data, comprising the following steps:
providing an autoencoder including an encoder configured to map input data instances to representations in a latent space and a decoder configured to obtain reconstructed versions of the input data instances from the representations in the latent space;
accessing training data including a plurality of training data instances; and
training the autoencoder on the training data, wherein the training includes, for a respective subset of the training data:
feeding training data instances from the subset into the encoder and obtaining representations of the training data instances in the latent space from output of the encoder,
feeding the representations of the training data instances into the decoder to obtain reconstructed versions of the training data instances,
determining a reconstruction loss based on differences between the training data instances and the reconstructed versions of the training data instances, and
based on the reconstruction loss, updating parameters of the encoder and the decoder so as to reduce the reconstruction loss;
wherein the method further comprises:
applying an affine transformation to the output of the encoder to obtain the representations of the training data instances in the latent space;
determining a mean and covariance of the representations of the training data instances in the latent space;
updating parameters of the affine transformation to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance; and
after the training, outputting at least a data representation of the decoder for use as generative model to synthesize new data based on a sampling of the latent space.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises determining the mean and the covariance as a running mean and a running covariance across the subsets of the training data.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the target mean is zero.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the target covariance is an identity covariance.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the updating of the parameters of the encoder and the decoder is further based on a regularization term which penalizes a deviation from a Gaussian probability distribution defined by the target mean and the target covariance.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the regularization term is a loss term which is based on Kullback-Leibler divergence.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the encoder and/or the decoder is a neural network.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the training data includes audio data and/or image data.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
after the training, outputting the parameters of the affine transformation.

### Claim 10

A computer-implemented method of synthesizing new data using a decoder of an autoencoder, wherein the autoencoder is trained on training data to obtain a generative model for synthesizing new data, the training including the following steps:
providing an autoencoder including an encoder configured to map input data instances to representations in a latent space and a decoder configured to obtain reconstructed versions of the input data instances from the representations in the latent space;
accessing training data including a plurality of training data instances; and
training the autoencoder on the training data, wherein the training includes, for a respective subset of the training data:
feeding training data instances from the subset into the encoder and obtaining representations of the training data instances in the latent space from output of the encoder,
feeding the representations of the training data instances into the decoder to obtain reconstructed versions of the training data instances,
determining a reconstruction loss based on differences between the training data instances and the reconstructed versions of the training data instances, and
based on the reconstruction loss, updating parameters of the encoder and the decoder so as to reduce the reconstruction loss;
wherein the training further comprises:
applying an affine transformation to the output of the encoder to obtain the representations of the training data instances in the latent space;
determining a mean and covariance of the representations of the training data instances in the latent space;
updating parameters of the affine transformation to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance; and
after the training, outputting at least a data representation of the decoder for use as generative model to synthesize new data based on a sampling of the latent space; and
wherein the method comprises the following steps:
sampling a latent space to obtain one or more samples, wherein the sampling assumes a probability distribution of the latent space which is defined by the target mean and the target covariance used during the training of the autoencoder;
feeding the one or more samples into the decoder to obtain one or more synthesized data instances.

### Claim 11 (depends on 10)

The method according to claim 10, further comprising:
using the one or more synthesized data instances as input data to a test or simulation of a system or a device or a machine.

### Claim 12 (depends on 10)

The method according to claim 10, further comprising:
using the one or more synthesized data instance as training data to train a machine learnable model.

### Claim 13

A computer-implemented method of performing anomaly detection using an encoder of an autoencoder as trained on training data to obtain a generative model for synthesizing new data, the training including the following steps:
providing an autoencoder including an encoder configured to map input data instances to representations in a latent space and a decoder configured to obtain reconstructed versions of the input data instances from the representations in the latent space;
accessing training data including a plurality of training data instances; and
training the autoencoder on the training data, wherein the training includes, for a respective subset of the training data:
feeding training data instances from the subset into the encoder and obtaining representations of the training data instances in the latent space from output of the encoder,
feeding the representations of the training data instances into the decoder to obtain reconstructed versions of the training data instances,
determining a reconstruction loss based on differences between the training data instances and the reconstructed versions of the training data instances, and
based on the reconstruction loss, updating parameters of the encoder and the decoder so as to reduce the reconstruction loss;
wherein the training further comprises:
applying an affine transformation to the output of the encoder to obtain the representations of the training data instances in the latent space;
determining a mean and covariance of the representations of the training data instances in the latent space;
updating parameters of the affine transformation to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance; and
after the training, outputting at least a data representation of the decoder for use as generative model to synthesize new data based on a sampling of the latent space;
wherein the method comprises the following steps:
obtaining input data;
feeding the input data into the encoder to obtain representations of the input data in the latent space;
marking the input data as anomalous when a probability distribution of the representations of the input data in the latent space deviate more than a predetermined amount from a probability distribution defined by the target mean and the target covariance used during the training of the autoencoder.

### Claim 14

A non-transitory computer-readable medium on which are stored data representing instructions for training an autoencoder on training data to obtain a generative model for synthesizing new data, the instructions, when executed by a processor system, causing the processor system to perform the following steps:
providing an autoencoder including an encoder configured to map input data instances to representations in a latent space and a decoder configured to obtain reconstructed versions of the input data instances from the representations in the latent space;
accessing training data including a plurality of training data instances; and
training the autoencoder on the training data, wherein the training includes, for a respective subset of the training data:
feeding training data instances from the subset into the encoder and obtaining representations of the training data instances in the latent space from output of the encoder,
feeding the representations of the training data instances into the decoder to obtain reconstructed versions of the training data instances,
determining a reconstruction loss based on differences between the training data instances and the reconstructed versions of the training data instances, and
based on the reconstruction loss, updating parameters of the encoder and the decoder so as to reduce the reconstruction loss;
wherein the instructions, when executed by a processor system, further causing the processor system to perform the following steps:
applying an affine transformation to the output of the encoder to obtain the representations of the training data instances in the latent space;
determining a mean and covariance of the representations of the training data instances in the latent space;
updating parameters of the affine transformation to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance; and
after the training, outputting at least a data representation of the decoder for use as generative model to synthesize new data based on a sampling of the latent space.

### Claim 15

A system configured to train an autoencoder on training data to obtain a generative model for synthesizing new data, the system configured to:
provide an autoencoder including an encoder configured to map input data instances to representations in a latent space and a decoder configured to obtain reconstructed versions of the input data instances from the representations in the latent space;
access training data including a plurality of training data instances; and
train the autoencoder on the training data, wherein the training includes, for a respective subset of the training data:
feeding training data instances from the subset into the encoder and obtaining representations of the training data instances in the latent space from output of the encoder,
feeding the representations of the training data instances into the decoder to obtain reconstructed versions of the training data instances,
determining a reconstruction loss based on differences between the training data instances and the reconstructed versions of the training data instances, and
based on the reconstruction loss, updating parameters of the encoder and the decoder so as to reduce the reconstruction loss;
wherein the system is further configured to:
apply an affine transformation to the output of the encoder to obtain the representations of the training data instances in the latent space;
determine a mean and covariance of the representations of the training data instances in the latent space;
update parameters of the affine transformation to shift the mean and covariance of the representations of the training data instances towards a target mean and a target covariance; and
after the training, output at least a data representation of the decoder for use as generative model to synthesize new data based on a sampling of the latent space.
