[Paper Review] Controllable and Compositional Generation with Latent-Space Energy-Based Models
This paper proposes LACE (Latent-space Compositional Energy-based model), a method for controllable and compositional generation using energy-based models in the latent space of pre-trained generative models like StyleGAN. By training a classifier to model attribute-conditioned energy functions and sampling via adaptive ODE solvers, LACE enables fast, robust, and high-quality image generation with zero-shot composition of unseen attribute combinations at 1024×1024 resolution.
Controllable generation is one of the key requirements for successful adoption of deep generative models in real-world applications, but it still remains as a great challenge. In particular, the compositional ability to generate novel concept combinations is out of reach for most current models. In this work, we use energy-based models (EBMs) to handle compositional generation over a set of attributes. To make them scalable to high-resolution image generation, we introduce an EBM in the latent space of a pre-trained generative model such as StyleGAN. We propose a novel EBM formulation representing the joint distribution of data and attributes together, and we show how sampling from it is formulated as solving an ordinary differential equation (ODE). Given a pre-trained generator, all we need for controllable generation is to train an attribute classifier. Sampling with ODEs is done efficiently in the latent space and is robust to hyperparameters. Thus, our method is simple, fast to train, and efficient to sample. Experimental results show that our method outperforms the state-of-the-art in both conditional sampling and sequential editing. In compositional generation, our method excels at zero-shot generation of unseen attribute combinations. Also, by composing energy functions with logical operators, this work is the first to achieve such compositionality in generating photo-realistic images of resolution 1024x1024. Code is available at https://github.com/NVlabs/LACE.
Motivation & Objective
- Address the challenge of compositional generation in deep generative models, where novel combinations of attributes are difficult to generate.
- Overcome limitations of conditional GANs and latent direction methods, which struggle with unseen attribute combinations and require retraining.
- Enable efficient, high-resolution (1024×1024) image generation with controllability using pre-trained generators.
- Achieve robust and fast sampling by leveraging ODE solvers in the latent space instead of pixel-space Langevin dynamics.
- Enable logical composition of energy functions for generating complex, novel attribute combinations in photo-realistic images.
Proposed method
- Formulate a joint energy-based model (EBM) in the latent space of a pre-trained generator (e.g., StyleGAN), where the data distribution is implicit and the attribute distribution is modeled via a classifier.
- Use the reparameterization trick to express the EBM energy function in the latent space, transforming it into a known prior (standard Gaussian) and reducing training to classifier learning only.
- Sample from the EBM using probability flow ODEs derived from the reverse diffusion process, enabling efficient and robust sampling with adaptive step size.
- Leverage ODE solvers (e.g., dopri5) for sampling, which are more stable and less sensitive to hyperparameters than traditional Langevin dynamics.
- Enable compositional generation by composing multiple energy functions using logical operators (e.g., AND, OR) to generate images with complex attribute combinations.
- Train the attribute classifier in the data space and perform all sampling in the latent space, ensuring high efficiency and scalability to high-resolution images.
Experimental results
Research questions
- RQ1Can we achieve controllable image generation with zero-shot composition of unseen attribute combinations using a pre-trained generative model?
- RQ2Does sampling via ODE solvers in the latent space outperform traditional Langevin dynamics in terms of speed, stability, and image quality?
- RQ3Can energy functions for different attributes be composed using logical operations to generate novel, realistic image configurations?
- RQ4How does the proposed method compare to state-of-the-art baselines in conditional sampling and sequential editing tasks?
- RQ5To what extent can the method generalize to high-resolution (1024×1024) photo-realistic image generation with complex attribute control?
Key findings
- LACE achieves 25× faster training than StyleFlow on the FFHQ dataset, demonstrating significant efficiency gains.
- LACE sampling is at least 49× and 876× faster than pixel-space EBMs and score-based models, respectively, on CIFAR-10, with inference times of 0.50s per batch of 64 images.
- The method achieves a Fréchet Inception Distance (FID) of 6.63 and an Attribute Consistency Score (ACC) of 0.972 on CIFAR-10, outperforming LACE-LD and other baselines.
- LACE enables zero-shot generation of unseen attribute combinations, such as rare facial attribute combinations, with high visual fidelity.
- The ODE-based sampling is robust to hyperparameters: small absolute and relative tolerances (atol, rtol) consistently yield high-quality samples, unlike Langevin dynamics which suffer from an ACC-FID trade-off.
- Even with a simple Euler method, LACE maintains reasonable performance (FID 5.36–6.31), confirming the stability of the ODE formulation across different numerical solvers.
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.