Diffusion Variational Autoencoders

Luis A. Pérez Rey, Vlado Menkovski, Jim Portegies

Abstract

Standard Variational Autoencoders (VAEs) often struggle to model data with non-Euclidean structures, such as rotations or periodic patterns, due to a "manifold mismatch" between the data and the latent space. This paper introduces the Diffusion Variational Autoencoder ($\Delta$VAE), which utilizes Brownian motion on arbitrary closed manifolds to create latent spaces that match the intrinsic topology of the data. By employing a random walk reparametrization and a curvature-based KL-divergence approximation, $\Delta$VAE achieves superior geometry preservation and unsupervised discovery of latent factors in non-Euclidean domains.

The Manifold Mismatch Problem

In a standard VAE, the latent space is typically assumed to be Euclidean (e.g., $\mathbb{R}^n$). However, many real-world datasets possess underlying structures that are fundamentally non-Euclidean. For instance, consider a video of an airplane spinning on a turntable. The "true" latent factor is the angle of rotation, which lives on a circle ($S^1$).

If one attempts to force this circular data into a 1D Euclidean line, a topological conflict arises: two images taken at $1^\circ$ and $359^\circ$ are physically almost identical, but in a linear latent space, they are forced to opposite ends of the spectrum. This mismatch leads to discontinuities and prevents the model from learning a truly continuous and meaningful representation.

Methods: The $\Delta$VAE Framework

The authors propose the $\Delta$VAE, which allows researchers to choose a latent space $Z$ that is a Riemannian manifold, such as a sphere, a torus, or a projective space. The "Diffusion" in the name refers to the encoder's distribution; instead of a standard Gaussian, the model uses the transition kernels of Brownian motion (heat kernels) on the chosen manifold.

Figure 2: The random walk reparametrization approximates Brownian motion on a manifold Z through projected steps.

Key technical innovations include:

  • Random Walk Reparametrization: To make the model trainable via backpropagation, Brownian motion is approximated using a series of small random steps in ambient space, which are then projected back onto the manifold (as seen in Figure 2). This serves as a "reparametrization trick" for non-Euclidean spaces.
  • KL-Divergence Approximation: Calculating KL divergence on a manifold is computationally intensive. The authors use a "parametrix expansion"—an asymptotic expansion involving the manifold's scalar curvature—to provide a fast, differentiable approximation for the loss function.
  • Projection Maps: Specific projection functions ensure that latent points remain on the intended surface (e.g., Torus, $S^d$, $SO(3)$) during training.

Key Results and Insights

The $\Delta$VAE was evaluated on several benchmarks, including binarized MNIST and synthetic datasets involving periodic translations and object rotations.

Figure 1: The $\Delta$VAE captures the continuous rotation of an airplane in an $S^1$ latent space without supervision.
  • Unsupervised Discovery: In object rotation experiments using ModelNet airplanes (Figure 1), the $\Delta$VAE with an $S^1$ latent space perfectly captured the rotation angle in a continuous loop. Euclidean models, by contrast, created "breaks" in the representation to accommodate the circular data in a linear space.
  • Superior Geometry Preservation: In periodic translation tasks (toroidal topology), the $\Delta$VAE achieved a Distance Distortion of 0.073, compared to 1.0172 for a standard Euclidean VAE. This order-of-magnitude improvement demonstrates how well the latent space reflects the true data structure.
  • Topology as a Prior: Choosing the right manifold acts as a powerful inductive bias. If the data involves rotations, using $SO(3)$ as a latent space is more effective than simply increasing the depth of a standard Euclidean VAE.

Limitations and Future Work

While powerful, the $\Delta$VAE currently requires the researcher to pre-select the manifold topology. Additionally, the mathematical framework is currently restricted to "closed" manifolds (compact and without boundary). Future work aims to develop algorithms that can automatically identify the correct manifold structure and extend the framework to open manifolds or those with boundaries.

Summary updated

BibTeX
@inproceedings{rey2020diffusion,
  author = {Luis A. Pérez Rey and Vlado Menkovski and Jim Portegies},
  title = {{Diffusion Variational Autoencoders}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.24963/ijcai.2020/375},
}
Figure