Abstract
Generative Adversarial Networks (GANs) are the driving force behind the state-of-the-art in image generation. Despite their ability to synthesize high-resolution photo-realistic images, generating content with on-demand conditioning of different granularity remains a challenge. This challenge is usually tackled by annotating massive datasets with the attributes of interest, a laborious task that is not always a viable option. Therefore, it is vital to introduce control into the generation process of unsupervised generative models. In this work, we focus on controllable image generation by leveraging GANs that are well-trained in an unsupervised fashion. To this end, we discover that the representation space of intermediate layers of the generator forms a number of clusters that separate the data according to semantically meaningful attributes (e.g., hair color and pose). By conditioning on the cluster assignments, the proposed method is able to control the semantic class of the generated image. Our approach enables sampling from each cluster by Implicit Maximum Likelihood Estimation (IMLE). We showcase the efficacy of our approach on faces (CelebA-HQ and FFHQ), animals (Imagenet) and objects (LSUN) using different pre-trained generative models. The results highlight the ability of our approach to condition image generation on attributes like gender, pose and hair style on faces, as well as a variety of features on different object classes.
Introduction
State-of-the-art Generative Adversarial Networks (GANs) can synthesize incredibly realistic images, but they are often "unconditional"—they transform a random noise vector into a random image. To generate a face with a specific hair color or a car at a specific angle, researchers typically train conditional GANs, which require massive datasets where every image is manually labeled.
Labeling is expensive, slow, and often impractical for the sheer variety of features users might want to control. This paper addresses the challenge of introducing fine-grained control into a model that was trained without any labels at all, effectively adding "steering wheels" to pre-trained, unsupervised generators.
Methodology
The proposed method follows a three-step pipeline that operates on top of any pre-trained GAN, such as StyleGAN or BigGAN:
- Discovery via Clustering: Random latent codes are passed through the first few layers of the generator. The authors discovered that at these intermediate stages, the network’s internal representations naturally group together based on semantic features. Simple k-means clustering is used on these representations to identify these groups (e.g., one cluster for "side profile," another for "front-facing").
- Mapping with IMLE: Once clusters are identified, a method is needed to sample specifically from the latent subspace that leads to a specific cluster. The authors use Implicit Maximum Likelihood Estimation (IMLE) to learn a mapping ($T_c$) from a simple auxiliary distribution to the specific latent codes belonging to a cluster.
- Conditional Synthesis: At inference time, a user selects a cluster (an attribute), samples from the learned auxiliary distribution, and passes it through the mapping and the pre-trained generator to produce the desired image.
Hierarchical Semantic Discovery
A key insight of this work is that intermediate layers of a generator act as semantic maps. While the initial latent space ($z$) is often entangled, the intermediate layers organize features into linearly separable groups.
Furthermore, the authors observed hierarchical control: by choosing different layers to cluster, they can control different levels of granularity. Early layers tend to control coarse geometry like pose and gender, while deeper layers control finer details like hair tone and lighting. This allows for a structured discovery of attributes across different depths of the network.
Experimental Results
The researchers evaluated their method across diverse benchmarks, including CelebA-HQ and FFHQ for faces, ImageNet for animals, and LSUN for objects and scenes (cars, churches, bridges, and living rooms).
Key Findings:
- Quantitative Accuracy: Using the Microsoft Azure Face API for verification, the method achieved 100% accuracy in generating the desired gender and 95% accuracy in generating the correct head "yaw" (pose).
- Superiority over Baselines: The method significantly outperformed existing unsupervised clustering GANs (like ClusterGAN), which often fail to find clear separations for complex attributes like pose.
- Cross-Class Generalization: Interestingly, a mapping learned to control the "pose" of a dog can often be applied to a generator for cats or rabbits, suggesting that GANs learn universal geometric primitives.
Conclusion
This approach provides a robust, non-adversarial way to refine pre-trained models for controllable synthesis. By using IMLE instead of another GAN to learn mappings, the method avoids common pitfalls like mode collapse or training instability. While the method still faces challenges with attribute entanglement (e.g., "baldness" often being correlated with "male" in training data), it represents a significant step toward fully unsupervised, controllable image generation.
Summary updated