Abstract
We present a framework for training GANs with explicit control over generated facial images. We are able to control the generated image by settings exact attributes such as age, pose, expression, etc. Most approaches for manipulating GAN-generated images achieve partial control by leveraging the latent space disentanglement properties, obtained implicitly after standard GAN training. Such methods are able to change the relative intensity of certain attributes, but not explicitly set their values. Recently proposed methods, designed for explicit control over human faces, harness morphable 3D face models (3DMM) to allow fine-grained control capabilities in GANs. Unlike these methods, our control is not constrained to 3DMM parameters and is extendable beyond the domain of human faces. Using contrastive learning, we obtain GANs with an explicitly disentangled latent space. This disentanglement is utilized to train control-encoders mapping human-interpretable inputs to suitable latent vectors, thus allowing explicit control. In the domain of human faces we demonstrate control over identity, age, pose, expression, hair color and illumination. We also demonstrate control capabilities of our framework in the domains of painted portraits and dog image generation. We demonstrate that our approach achieves state-of-the-art performance both qualitatively and quantitatively.
Introduction
Generative Adversarial Networks (GANs), particularly architectures like StyleGAN2, have reached a level of maturity where they can produce high-fidelity, photorealistic images. However, a persistent challenge remains: providing users with explicit, fine-grained control over the generated output. Current methodologies typically fall into two categories. The first relies on the implicit disentanglement of a pre-trained GAN's latent space to find "directions" for attribute manipulation (e.g., making a face appear older). While effective for relative changes, these methods struggle with setting precise values, such as an exact age or head tilt angle. The second category utilizes 3D Morphable Models (3DMM) for supervision. While these offer explicit control, they are limited by the parameters of the underlying 3D model and are difficult to generalize to non-human domains like animals or art.
GAN-Control addresses these limitations by introducing a framework for explicit, human-interpretable control that is not tethered to 3D rendering pipelines. By leveraging contrastive learning supervised by off-the-shelf predictors, the framework achieves a highly disentangled latent space capable of precise attribute setting across diverse domains.
Methodology
The GAN-Control framework is implemented in two primary phases:
Disentanglement via Contrastive Learning
The architecture, based on StyleGAN2, divides the latent space into $N+1$ distinct sub-spaces. Each sub-space is dedicated to a specific attribute—such as Identity, Pose, Age, or Expression—with an additional sub-space for residual information. To enforce this separation, the authors employ a factorized contrastive loss. During training, batches of images are generated where pairs share a specific sub-vector (e.g., the same "Age" vector but different "Identity" vectors). Pre-trained, off-the-shelf models (e.g., age estimators or face recognizers) act as differentiable predictors. The loss function penalizes the generator if images sharing a sub-vector result in different predicted attributes, or if images with different sub-vectors appear identical in that specific attribute.
Explicit Control Encoders
Following the training of the disentangled GAN, small Multi-Layer Perceptron (MLP) encoders are trained to map human-interpretable values (e.g., "Age = 40" or "Yaw = 15°") directly into the corresponding latent sub-spaces. This allows for direct parameterization of the generation process at inference time.
Experiments and Results
The framework was evaluated on three datasets: FFHQ (human faces), MetFaces (painted portraits), and a custom Dog Faces dataset.
Performance and Photorealism
In comparative user studies, GAN-Control significantly outperformed state-of-the-art methods like DiscoFaceGAN and CONFIG. Participants chose GAN-Control as the most realistic 67% of the time. Quantitatively, the model demonstrated superior control precision; for instance, head pose error was reduced to 2.29°, compared to 3.92° for DiscoFaceGAN.
Domain Agnosticism and Identity Preservation
A key strength of the framework is its ability to treat "Identity" as an attribute. This ensures that a person's core facial features remain consistent even as other attributes like age or lighting are varied. Furthermore, because the method relies on general predictors rather than domain-specific 3D models, it successfully extends to artistic paintings and animal faces.
Conclusion
GAN-Control provides a robust solution for explicit attribute manipulation in GANs. By moving away from 3DMM-based supervision toward a contrastive learning approach with general predictors, the framework achieves state-of-the-art photorealism and control precision. While the method's performance is currently linked to the quality of the predictors used, its extensibility to various domains and its ability to maintain identity during complex edits mark a significant advancement in controllable image synthesis.
Summary updated