Introduction
Generative Adversarial Networks, specifically StyleGAN, have revolutionized high-resolution image synthesis. However, a persistent challenge remains: the latent space ($W$) of these models is highly entangled. Modifying a single semantic attribute, such as adding a beard, often results in unintended changes to other features like eye color or facial structure. While existing solutions utilize supervised disentanglement via Normalizing Flows, these methods are computationally expensive and difficult to scale. This paper introduces StyleAutoEncoder (StyleAE), a lightweight plugin module that achieves precise attribute control with significantly reduced training and inference overhead.
The Disentanglement Problem
State-of-the-art disentanglement methods like StyleFlow or PluGeN rely on the mathematical properties of Normalizing Flows to map latent vectors to a feature-specific space. While effective, these models are notoriously sensitive to hyperparameters and require massive computational resources. StyleAE addresses this by replacing complex flow-based architectures with a standard AutoEncoder setup, demonstrating that mathematical invertibility is not a prerequisite for effective latent space disentanglement.
Methodology
StyleAE functions as an adapter sitting atop a pre-trained StyleGAN. It maps the style vector ($w$) into a target space bifurcated into two components:
- Attributes ($C$): Explicit coordinates corresponding to labeled features (e.g., "Smile" or "Beard").
- Residuals ($S$): Variables capturing all remaining information required to reconstruct the original image identity.
Dual-Loss Training
The model is optimized using a two-pronged loss strategy. First, an Attribute Loss ensures that the coordinates in $C$ align with the intended semantic labels. Second, an Image Loss is employed; rather than comparing latent vectors, the reconstructed vector is passed through the fixed StyleGAN generator to compare the resulting images. This ensures that structural details and identity are preserved during manipulation.
Key Results and Performance
StyleAE demonstrates superior efficiency compared to flow-based competitors. Training requires approximately 15 minutes, a 6x speedup over StyleFlow. Inference is even more efficient: generating 500 manipulated images takes roughly 20 seconds, whereas StyleFlow can take nearly an hour for the same task.
In terms of accuracy, StyleAE achieved a 96% success rate for adding beards and 100% for smiles. Crucially, the model maintains high image quality and identity preservation. Using Perceptual MSE (p-MSE) via ArcFace, StyleAE showed significantly lower error rates than competing methods, indicating that the subject's identity remains stable even under significant attribute changes.
Discussion and Future Work
The "plugin" philosophy of StyleAE allows researchers to leverage high-resolution pre-trained models without the astronomical costs of retraining. While the model performs exceptionally on human faces (FFHQ dataset), results on animal faces (AFHQv2) suggest that cross-species style transfer remains a challenge. Future research will focus on unsupervised attribute discovery and refining the architecture to handle non-linear relationships between complex features.
Summary updated