0
$\begingroup$

The question is actually less broad than it sounds. I generally do understand how variational autoencoders work.

From the encoding step we get four parts:

  • mean $\mu$
  • standard deviation $\sigma$
  • random value from normal distribution $\epsilon$
  • sample $z$

For the training process of the autoencoder, the decoder is fed with the sample $z$. If we wish to generate new samples, we manipulate the code that is fed to the decoder.

What output from the encoder to use for a pure encoding purpose (given a fully trained VAE)?

Please provide explanations and if possible a mathematical intuition / reasoning. If you have additional sources where this aspect is explained, please add links.

I'm deliberately and specifically using VAEs, that is not the question here.

$\endgroup$
  • $\begingroup$ Isn't the point that the procedure implements variational Bayes, so you have a probability distribution over encodings from which you can sample freely? $\endgroup$ – Sycorax May 23 at 13:30
  • $\begingroup$ @Sycorax That is why this questions comes up. Every material on VAEs focuses on the generative aspect but it is still an autoencoder and I would like to use it as such. $\endgroup$ – Spen May 23 at 13:34
  • 2
    $\begingroup$ Doesn't that suggest to you that you're using the wrong tool for the job: you want an encoder, not a probability model? In any case, it seems like you could use a kludge like just fixing each element at its mode, which for a normal prior distribution is the mean vector $\mu$. Alternatively, you could marginalize over the distribution by taking many posterior samples for each input and pushing those through your downstream task and averaging/etc. $\endgroup$ – Sycorax May 23 at 13:55
  • $\begingroup$ @Sycorax No, I'm specifically interested in properties that arise within the encoding (like disentanglement) of variational autoencoders. That was actually partially the question if using the mean vector $\mu$ would be a valid option. $\endgroup$ – Spen May 23 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.