1. Auto-encoder

1.1. Auto-encoder

스크린샷 2023-10-29 오후 2.40.40.png

To understand GAN, we first need to understand the concept of encoder and decoder. I believe learningnAuto-encoder is a good way to digest this concept.

As shown on the diagram, the auto-encoder architecture consists of following components:

Then, the process of auto-encoder can be represented as the following:

$$ z=f(x), x=g(z) \newline x=g(f(x)) $$

To put it intuitively, the encoder learns how to nicely compress the original data and the decoder learns how to remap/reconstruct the compressed data to the original vector space.

1.2. Variational Auto-encoder

To take one step further, we have variational auto-encoder as well. VAE not only aims to reconstruct the input but also make sure the latent space is normally distributed. The diagram of the structure is shown below:

스크린샷 2023-10-29 오후 2.45.20.png

As shown in the diagram, the encoder assumes that the vector space has the normal distribution, and it updates the mean and the standard deviation during the training process.

In order to make sure the latent space to be normally distributed, it includes similarity loss, a KL divergence between latent space distribution and standard gaussian (zero mean and unit variance).

2. GAN (Generative Adversarial Network)