StyleGenes: Discrete and Efficient Latent Distributions for GANs

Evangelos Ntavelis,Mohamad Shahbazi,Iason Kastanis,Radu Timofte,Martin Danelljan,Luc Van Gool
2023-05-01
Abstract:We propose a discrete latent distribution for Generative Adversarial Networks (GANs). Instead of drawing latent vectors from a continuous prior, we sample from a finite set of learnable latents. However, a direct parametrization of such a distribution leads to an intractable linear increase in memory in order to ensure sufficient sample diversity. We address this key issue by taking inspiration from the encoding of information in biological organisms. Instead of learning a separate latent vector for each sample, we split the latent space into a set of genes. For each gene, we train a small bank of gene variants. Thus, by independently sampling a variant for each gene and combining them into the final latent vector, our approach can represent a vast number of unique latent samples from a compact set of learnable parameters. Interestingly, our gene-inspired latent encoding allows for new and intuitive approaches to latent-space exploration, enabling conditional sampling from our unconditionally trained model. Moreover, our approach preserves state-of-the-art photo-realism while achieving better disentanglement than the widely-used StyleMapping network.
Computer Vision and Pattern Recognition,Machine Learning
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve The paper proposes a method for discrete latent distribution in Generative Adversarial Networks (GANs) called **StyleGenes**. The main goal of the paper is to improve the latent space representation in GANs through a method inspired by the encoding of information in biological organisms. #### Main Issues: 1. **Design of Discrete Latent Space**: Traditional GANs use continuous distributions as latent space, while this paper proposes a new discrete latent distribution. This method allows for direct optimization of samples and can generate a large number of unique images. 2. **Interpretability and Conditional Generation**: By designing the latent space as a series of "genes" (i.e., small latent codes), it becomes easier to analyze the relationship between the latent space and the generated images. Additionally, this method supports conditional generation without retraining or adding extra modules. 3. **Parameter Efficiency**: Traditional methods require a large number of parameters to represent complex style distributions, whereas StyleGenes significantly reduces the number of required parameters by combining a small number of "gene variants," thereby improving efficiency. #### Core Contributions: 1. **Compact Discrete Latent Distribution Representation**: The paper proposes a compact discrete latent distribution representation method inspired by the encoding of DNA in biological organisms. This representation method can generate exponentially diverse samples. 2. **Analysis of Gene and Semantic Attribute Association**: The structure of the discrete latent space naturally allows for the analysis of the relationship between each gene and specific image attributes. 3. **Conditional Generation**: Conditional generation can be achieved without retraining or adding extra modules. 4. **Better Decoupling**: The discrete latent space is more decoupled than the widely used W space in StyleGAN. 5. **Continuous Attributes**: Although the latent distribution is discrete, the generated style space still has continuous attributes, supporting smooth interpolation. Through these improvements, the paper demonstrates that StyleGenes performs comparably or even better than baseline methods on multiple commonly used image generation datasets and shows significant advantages in conditional generation tasks.