Abstract
Generative Adversarial Networks (GANs) have achieved remarkable success in synthesizing realistic images, yet providing intuitive, fine-grained control over the generation process remains a challenge. We present CONGAN (CONstrained Generative Adversarial Network), a framework that allows users to interactively guide image generation using relative constraints, such as "Generate an image more like Image A than Image B." By integrating a memory-based process network with a triplet-based loss function, CONGAN enables iterative refinement of visual outputs without compromising image quality.
Introduction
While modern GANs can produce high-fidelity imagery, they often function as "black boxes." Existing methods for steering generation typically rely on predefined discrete labels or specific attributes. However, human intent is often subtle and difficult to capture with a single word. A user might desire a specific facial structure or a particular lighting condition that lacks a standard label.
CONGAN addresses this by placing the human in the loop, allowing them to steer the model through simple, relative comparisons. This approach leverages the psychological ease of comparative feedback over absolute numerical or categorical input.
The CONGAN Framework
The core innovation of CONGAN is its ability to accept and aggregate a set of relative constraints. The system is designed to be order-invariant, ensuring that the generated output remains stable regardless of the sequence in which constraints are provided. This is achieved through a specialized architecture consisting of three primary modules.
Architecture
- Read Network: A Convolutional Neural Network (CNN) that extracts visual features from the images provided in the user's constraints (e.g., the "positive" and "negative" examples).
- Process Network: Based on Memory Networks, this component uses an LSTM with content-based attention to aggregate multiple constraints into a single representation. This network is specifically designed to treat constraints as a set rather than a sequence.
- Write Network: A series of transpose convolutions that transforms the aggregated constraint representation and a noise vector into the final generated image.
The Constraint Critic
To train the model to respect these relative bounds, a "constraint critic" is introduced alongside the standard GAN discriminator. This critic employs a loss function inspired by t-Distributed Stochastic Triplet Embedding (t-STE). It measures the distance between the generated image and the constraint examples in a semantic space, effectively "pulling" the generator toward desired features and "pushing" it away from undesired ones.
Experimental Results
The model was evaluated on three datasets: MNIST (handwritten digits), CelebA (celebrity faces), and Zappos50k (shoes).
- Constraint Satisfaction: CONGAN achieved high satisfaction rates across all tasks, satisfying over 90% of constraints on MNIST and approximately 87% on the more complex CelebA and Zappos50k datasets.
- Iterative Refinement: Qualitative analysis shows that as users add more constraints (e.g., specifying gender, then facial hair, then accessories), the generator successfully evolves the image to incorporate these features while maintaining the underlying identity of the subject.
- Image Quality: Quantitative evaluations using Wasserstein GAN (WGAN) benchmarks demonstrate that CONGAN produces images of comparable quality to unsupervised models. This suggests that the added control does not come at the cost of visual realism.
Conclusion
CONGAN provides a robust framework for interactive image generation by utilizing relative human feedback. By treating constraints as an unordered set and employing a triplet-based loss, the model offers a more natural and intuitive interface for creative tasks. Future work will explore active ranking techniques, where the model suggests image pairs to the user to more efficiently navigate the latent search space.
Summary updated