[Paper Review] Exponential Tilting of Generative Models: Improving Sample Quality by Training and Sampling from Latent Energy
This paper proposes a method to improve sample quality in pre-trained likelihood-based generative models—such as normalizing flows and VAEs—by training a latent energy-based model (EBM) on the model's latent space. The EBM is trained via maximum likelihood to refine latent variables, which are then sampled via Langevin dynamics and decoded to produce higher-quality, sharper images with minimal computational overhead.
In this paper, we present a general method that can improve the sample quality of pre-trained likelihood based generative models. Our method constructs an energy function on the latent variable space that yields an energy function on samples produced by the pre-trained generative model. The energy based model is efficiently trained by maximizing the data likelihood, and after training, new samples in the latent space are generated from the energy based model and passed through the generator to producing samples in observation space. We show that using our proposed method, we can greatly improve the sample quality of popular likelihood based generative models, such as normalizing flows and VAEs, with very little computational overhead.
Motivation & Objective
- Improve sample quality of pre-trained likelihood-based generative models without retraining the base model.
- Address the limitation that non-adversarial models like VAEs and normalizing flows often produce lower-quality samples than GANs.
- Develop a method that enhances sample quality through improved sampling rather than modifying training objectives.
- Enable efficient training and sampling from a latent EBM that leverages the pre-trained generator’s structure.
- Provide a general framework to connect energy-based models with existing likelihood-based generative models.
Proposed method
- Construct an exponential tilting of the pre-trained generative model by defining a new joint distribution: $ p_{\phi^{*},\theta}(\mathbf{x}) = \frac{p_{\phi^{*}}(\mathbf{x}) \exp(-E_{\theta}(\mathbf{x}))}{Z_{\phi^{*},\theta}} $, where $ E_{\theta}(\mathbf{x}) $ is an energy function on the data space.
- Train the energy function $ E_{\theta}(\mathbf{x}) $ by maximizing the likelihood of real data, using the gradient: $ \frac{\partial L(\theta)}{\partial\theta} = \mathbb{E}_{p_D}[\partial E_\theta / \partial\theta] - \mathbb{E}_{p_{\phi^{*},\theta}}[\partial E_\theta / \partial\theta] $.
- Sample from the latent EBM using Stochastic Gradient Langevin Dynamics (SGLD), which iteratively updates latent variables via $ \mathbf{z}_{i+1} = \mathbf{z}_i - \frac{\epsilon}{2} \nabla_{\mathbf{z}} E_\theta(G_{\phi^*}(\mathbf{z})) + \sqrt{\epsilon} \mathbf{\omega} $, with $ \mathbf{\omega} \sim \mathcal{N}(0,\mathbf{I}) $.
- Generate final samples by decoding the refined latent variables through the pre-trained generator $ G_{\phi^*}(\mathbf{z}) $, improving sample realism and sharpness.
- Train the latent EBM with only 100–200 steps for normalizing flows and up to 1,000 steps for VAEs, resulting in minimal computational overhead.
- Use the same energy function architecture (e.g., CNN) for $ E_{\theta}(\mathbf{x}) $, trained end-to-end on the data distribution using real and generated samples.
Experimental results
Research questions
- RQ1Can we improve sample quality in pre-trained likelihood-based generative models without retraining the base model?
- RQ2Does training an energy-based model on the latent space of a pre-trained generator lead to sharper and more realistic samples?
- RQ3How does the proposed method compare to existing techniques that modify training objectives or use GAN-style discriminator guidance?
- RQ4What is the computational cost of training the latent EBM, and can it be kept minimal while still improving sample quality?
- RQ5Can the method be generalized across different types of likelihood-based models, such as VAEs, normalizing flows, and their hybrids?
Key findings
- The proposed method significantly improves sample quality on MNIST, Fashion-MNIST, and CIFAR-10, as evidenced by FID scores dropping from 29.4 to 12.3 on MNIST when using GLOW with latent EBM.
- On CIFAR-10, the FID score of GLOW improved from 76.2 to 67.8 after applying the latent EBM, indicating reduced noise and better structural fidelity.
- For VAEs, the FID score decreased from 18.9 to 16.0 when using the latent EBM, achieving better sample quality without modifying the original VAE objective.
- The method outperforms alternative approaches like two-stage VAEs and VAEs with flow-based normalizing flows in terms of FID, while maintaining a structured latent space.
- Training the latent EBM required only 100–200 steps for normalizing flows and up to 1,000 steps for VAEs, demonstrating low computational overhead compared to full EBM training on pixel space.
- Qualitative results show that latent EBM sampling produces sharper, more semantically meaningful samples with smoother contours and cleaner backgrounds, especially on complex datasets like CIFAR-10.
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.