Adaptive Learning of the Latent Space of Wasserstein Generative Adversarial Networks

Yixuan Qiu, Qingyi Gao, Xiao WangarXiv 2024 · DOI

Abstract

Traditional generative models, such as Generative Adversarial Networks (GANs) and Variational Auto-Encoders (VAEs), typically rely on a fixed-dimension latent space, often requiring manual tuning to match the data's intrinsic complexity. This paper introduces the Latent Wasserstein GAN (LWGAN), a framework that adaptively learns the intrinsic dimensionality of a dataset during training. By integrating Wasserstein Auto-Encoders (WAE) with the adversarial training of WGANs and employing a rank-regularized objective, LWGAN identifies the optimal latent manifold. This approach prevents "manifold curling"—a common artifact in over-parameterized latent spaces—and achieves high-quality image generation with reduced model complexity.

Introduction

In generative modeling, the "latent dimension" refers to the size of the random noise vector used as input for the generator. Selecting this dimension is a critical yet often arbitrary process. If the dimension is too low, the model suffers from under-fitting, failing to capture the full complexity of the data. Conversely, if the dimension is too high, the model may over-fit, creating convoluted structures to fill the excess space. This phenomenon, known as "manifold curling," leads to blurry images and poor interpolation.

Real-world data, such as natural images, typically resides on a low-dimensional manifold embedded within a high-dimensional space. The LWGAN framework addresses the challenge of discovering this "true" dimensionality automatically, ensuring that the latent space matches the data's natural manifold.

The Dimensionality Dilemma

Most generative models assume data is drawn from a fixed latent space, usually a standard normal distribution $N(0, I_d)$. However, a mismatch between the chosen dimension ($d$) and the intrinsic dimension ($r$) of the data causes significant issues:

  1. Under-fitting ($d < r$): The model cannot represent the full surface of the data. For example, a 1D latent space attempting to map a 2D surface might only capture the outer contour, losing internal structural details.
  2. Over-fitting and Mismatch ($d > r$): To satisfy the distribution requirements of a high-dimensional prior, the model forces the low-dimensional data manifold to "curl" or wiggle through the latent space. This results in a loss of generative quality and inefficient data representation.

Methodology: The LWGAN Framework

LWGAN introduces several architectural innovations to solve the dimensionality problem:

1. Informative Latent Distribution

Instead of a fixed $N(0, I_d)$, LWGAN utilizes a generalized normal distribution $N(0, A_s)$. Here, $A_s$ is a diagonal matrix where $s$ elements are ones and $d-s$ elements are zeros. The value $s$ represents the "active" rank or the intrinsic dimension currently being tested by the model.

2. The LWGAN Objective

The framework combines the reconstruction loss of an auto-encoder with the adversarial "critic" of a WGAN. This dual objective ensures that the latent code accurately represents the input data while the generated output remains indistinguishable from real samples.

3. Rank Regularization

To identify the simplest sufficient model, the authors add a penalty term $\lambda_n \cdot \text{rank}(A)$ to the loss function. Similar to the Bayesian Information Criterion (BIC), this term pushes the model to minimize the latent dimension without sacrificing reconstruction accuracy.

4. Rank-Aware Networks

To avoid the computational cost of training separate models for every possible dimension, LWGAN uses "rank-aware" networks. The current rank $s$ is provided as a one-hot vector input to both the encoder and the critic. This allows a single set of parameters to be shared across all possible dimensions, creating a hierarchy of representations where lower-dimensional features are embedded within higher-dimensional ones.

Experimental Results

Synthetic and Benchmark Datasets

The researchers tested LWGAN on toy manifolds (Swiss Roll, S-curve, and a 4D Hyperplane), where it successfully identified the correct intrinsic dimensions (1, 2, and 4, respectively).

On the MNIST dataset, the model provided insights into the topological complexity of handwritten digits. It discovered that the digit "1" has a lower intrinsic dimension (~8) compared to the digit "2" (~12), aligning with previous mathematical studies on handwriting variability.

Large-Scale Image Generation

Using the CelebA dataset ($64 \times 64$ pixels), LWGAN identified an intrinsic dimension of 34. In performance benchmarks, LWGAN achieved superior Fréchet Inception Distance (FID) and Inception Scores compared to standard WAEs and CycleGANs. Notably, the study demonstrated that using the discovered dimension of 34 yielded results nearly identical in quality to using a much larger latent space (128), but with significantly lower model complexity and no manifold curling.

Conclusion and Future Directions

LWGAN provides a robust theoretical and practical framework for adaptive latent space learning. By proving that the estimated dimension $\hat{r}$ converges to the true dimension $r$ as sample sizes increase, the authors offer a mathematically grounded solution to a common problem in deep learning.

Future work includes extending the generator from a deterministic mapping to a stochastic one to improve sample variety. Additionally, the authors suggest that LWGAN's ability to perform "structural estimation" could have significant applications in fields like economics and social sciences, where underlying likelihood functions are often too complex to calculate directly.

Summary updated

BibTeX
@misc{qiu2024adaptive,
  author = {Yixuan Qiu and Qingyi Gao and Xiao Wang},
  title = {{Adaptive Learning of the Latent Space of Wasserstein Generative Adversarial Networks}},
  year = {2024},
  eprint = {2409.18374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.18374},
}
Figure