Diffusion Variational Autoencoders

Henry Li, Ofir Lindenbaum, Xiuyuan Cheng, Alexander CloningerarXiv 2019

Introduction

Deep generative models, such as Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs), typically rely on the assumption that high-dimensional data can be mapped to a simple, predefined latent prior—most commonly a Gaussian or uniform distribution. However, real-world data often resides on complex, non-Euclidean manifolds, such as circles, tori, or disjoint clusters. When the geometry of the chosen prior fails to match the intrinsic geometry of the data—a problem known as prior mismatch—these models often suffer from posterior collapse in VAEs or mode collapse in GANs.

Variational Diffusion Autoencoders (VDAEs) address this challenge by replacing rigid priors with data-driven diffusion embeddings. By learning to approximate a random walk on the data manifold, VDAEs preserve the intrinsic topology of complex datasets, ensuring a stable and continuous mapping between the data and latent spaces.

Methodology: The VDAE Framework

The core innovation of the VDAE is the transition from a static prior to a dynamic, diffusion-based latent space. The framework integrates manifold learning with deep generative modeling through several key components:

  1. Diffusion Map Prior: Instead of a standard Gaussian, the model utilizes a diffusion map (approximated via SpectralNet) to establish an initial latent embedding. This embedding captures the data's natural connectivity and geometric structure.
  2. Random Walk Modeling: The VDAE is trained to model a single step of a random walk. The encoder maps an input $x$ to a neighborhood in the latent space, and the decoder learns to map a sampled neighbor $z'$ back to a corresponding neighbor $x'$ in the data space.
  3. Local ELBO: A "local evidence lower bound" (ELBO) is derived to maximize the likelihood of a data point given its random walk neighborhood, rather than just its own reconstruction.
  4. Locally bi-Lipschitz Property: To ensure stability, the authors introduce a metric to maintain a bi-Lipschitz mapping. This prevents the network from excessively stretching or compressing space, which is critical for maintaining a stable homeomorphism.
The VDAE architecture maps data from the input space (left) to a diffusion-based latent space (center), where it models random walk neighborhoods before decoding them back to the data manifold (right).

Key Insights

Topology as the Prior

A fundamental shift in VDAE is that the prior is not a researcher's choice but is inferred directly from the data. By using diffusion maps, the model inherently "understands" the topological features of the data—whether it forms a ring, a sphere, or separate clusters—before generation begins.

Sampling as a Random Walk

In contrast to standard VAEs where sampling involves picking a random point from a Gaussian, VDAE generates new data by taking steps of a random walk on the learned manifold. This ensures that generated samples remain "on-manifold," significantly reducing the risk of generating unrealistic "off-path" data points.

Illustration of points on a manifold during the diffusion process at t=1, representing the concentration of probability mass along the data's intrinsic structure.

Unsupervised Cluster Awareness

Because diffusion maps naturally separate distinct clusters, VDAEs can perform cluster-conditional generation without requiring labels during training. This allows for the generation of specific types of objects (e.g., a specific MNIST digit) by simply starting the random walk in the appropriate latent cluster.

Experimental Results

The VDAE was evaluated against synthetic manifolds (circles, tori, Stanford Bunny) and real-world datasets including MNIST, Frey Faces, and the COIL-20 object set.

  • Topological Fidelity: Using the Gromov-Wasserstein (G-W) distance to measure global shape preservation, VDAE significantly outperformed competitors. On a circular dataset, VDAE achieved a G-W distance of 2.6, compared to 46.1 for $\beta$-VAE and 14.9 for WGAN.
  • Mapping Stability: VDAE maintained consistently lower median bi-Lipschitz constants, indicating a more reliable and less distorted mapping between spaces.
  • Latent Space Quality: t-SNE visualizations demonstrated that VDAE effectively separated different classes (e.g., MNIST digits) into distinct, well-defined clusters, whereas traditional models often produced overlapping, tangled latent representations.

Conclusion and Future Work

VDAEs represent a significant step toward integrating geometric intuition into deep generative modeling. While the current implementation relies on user-defined affinity kernels and has been tested primarily with MLP architectures, future work could involve scaling the framework to high-resolution images using convolutional or transformer-based backends. Additionally, while the iterative random walk sampling is slightly slower than single-pass methods, its ability to maintain topological integrity offers a robust solution to the long-standing problem of prior mismatch.

Summary updated

BibTeX
@misc{li2019diffusion,
  author = {Henry Li and Ofir Lindenbaum and Xiuyuan Cheng and Alexander Cloninger},
  title = {{Diffusion Variational Autoencoders}},
  year = {2019},
  eprint = {1905.12724},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.12724},
}
Figure