[Paper Review] Improving Sampling from Generative Autoencoders with Markov Chains
This paper proposes a Markov Chain Monte Carlo (MCMC) sampling method to improve sample quality in generative autoencoders by sampling from the learned latent distribution $ˆ{P}(Z)$, which may deviate from the assumed prior $P(Z)$. By iteratively decoding and encoding, the MCMC process corrects poor initial samples, especially when the inference model's latent distribution diverges from the prior, leading to more realistic generations without architectural changes.
We focus on generative autoencoders, such as variational or adversarial autoencoders, which jointly learn a generative model alongside an inference model. Generative autoencoders are those which are trained to softly enforce a prior on the latent distribution learned by the inference model. We call the distribution to which the inference model maps observed samples, the learned latent distribution, which may not be consistent with the prior. We formulate a Markov chain Monte Carlo (MCMC) sampling process, equivalent to iteratively decoding and encoding, which allows us to sample from the learned latent distribution. Since, the generative model learns to map from the learned latent distribution, rather than the prior, we may use MCMC to improve the quality of samples drawn from the generative model, especially when the learned latent distribution is far from the prior. Using MCMC sampling, we are able to reveal previously unseen differences between generative autoencoders trained either with or without a denoising criterion.
Motivation & Objective
- To address the issue that generative autoencoders often learn a latent distribution $ˆ{P}(Z)$ that deviates from the intended prior $P(Z)$, undermining sample quality.
- To develop a method that enables sampling from $ˆ{P}(Z)$ rather than $P(Z)$, ensuring better alignment with the data-generating distribution $P(X)$.
- To improve sample quality in models like VAEs, AAEs, and their denoising variants, especially when the prior is only softly enforced.
- To validate that MCMC sampling reveals differences between models trained with and without denoising criteria.
Proposed method
- Formulate an MCMC process equivalent to alternating between decoding and encoding, where each step samples from $P_{\theta}(X|Z)$ and $Q_{\phi}(Z|X)$.
- Use the encoder and decoder functions as stochastic transitions in the MCMC chain, ensuring the stationary distribution is the learned latent distribution $ˆ{P}(Z)$.
- Initialize sampling from $\mathbf{z}_0 \sim P(Z)$, then iteratively apply $\mathbf{z}_{i+1} \sim Q_{\phi}(Z|X = d(\mathbf{z}_i; \theta))$ to refine latent samples.
- Apply batch normalization in training mode during MCMC to stabilize updates and compensate for poor initial inputs.
- Use the MCMC-sampled $\mathbf{z}_i$ to generate $\mathbf{x} \sim P_{\theta}(X|Z = \mathbf{z}_i)$, improving realism over initial samples.
- Apply the method to VAEs, DVAEs, AAEs, and DAAEs, comparing samples before and after MCMC steps.
Experimental results
Research questions
- RQ1Does MCMC sampling from the learned latent distribution $\u02C6{P}(Z)$ produce more realistic samples than sampling from the prior $P(Z)$?
- RQ2How does MCMC sampling affect sample quality in models where $\u02C6{P}(Z)$ significantly deviates from $P(Z)$?
- RQ3Can MCMC sampling correct artifacts introduced by latent space interpolations in generative autoencoders?
- RQ4How does the MCMC process reveal differences between denoising and non-denoising variants of generative autoencoders?
- RQ5To what extent does MCMC sampling improve samples from adversarial autoencoders with poor posterior approximation?
Key findings
- MCMC sampling significantly improves sample quality in VAEs and DVAEs, especially when initial samples from $P(Z)$ are noisy or unrealistic.
- After 10 MCMC steps, samples from VAEs and DVAEs become more realistic, with clearer facial features emerging from noisy backgrounds in CelebA experiments.
- In AAEs and DAAEs, where $\u02C6{P}(Z)$ deviates substantially from $P(Z)$, MCMC leads to pronounced improvements due to the model's poor prior alignment.
- The denoising properties of DAAEs are more apparent after MCMC sampling, as artifacts from initial noisy latent codes are corrected.
- Spherical interpolations between test images produce artifacts that are effectively corrected through MCMC sampling, improving visual coherence.
- The MCMC method is orthogonal to advanced posterior modeling and can be applied to existing models without architectural changes, enhancing generative performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.