(Deep) Generative Geodesics

Beomsu Kim, Michael Anthony Puthawala, Jong Chul Ye, Emanuele Sansone

TL;DR

This paper introduces a novel Riemannian metric to measure similarity between data points generated by deep generative models, independent of the model's internal structure. This metric defines "generative distances" and "generative geodesics," enabling efficient computation of paths that respect the learned data distribution, leading to improved clustering, visualization, and interpolation.

What Problem Does This Paper Address?

Deep generative models learn to map simple latent distributions to complex data distributions. While previous work has explored the local geometry of these data distributions (e.g., using pullback metrics), understanding the global geometric properties and how to navigate the data manifold in a meaningful way has remained challenging. Specifically, how do we define a "shortest path" or a notion of distance between two generated data points that truly reflects the underlying generative process, rather than just their Euclidean distance or their positions in the latent space? This paper aims to bridge this gap by proposing a global metric that captures the intrinsic geometry of the data distribution learned by a generative model.

Methods

The core contribution is a new Riemannian metric, termed the "generative metric" ($g_{\psi, \lambda}$), defined on the data space. This metric is derived from the data likelihood function ($p_\psi(x)$) provided by the generative model and a parameter $\lambda$ that balances the influence of the data density with a prior term. Crucially, this metric is agnostic to the specific architecture or parameterization of the generative model, requiring only the ability to evaluate the data likelihood.

From this metric, the authors define:

  • Generative Distances: The shortest path distance between two points on the data manifold, as measured by the generative metric.
  • Generative Geodesics: The actual paths that achieve this shortest distance.

To make these concepts computationally tractable, they propose an approximation strategy:

  1. Graph Construction: An $\epsilon$-graph is built on a set of data points (either training or synthetic).
  2. Edge Weighting: Edges of the graph are weighted using the proposed generative metric, approximated via numerical quadrature.
  3. Shortest Path Computation: Standard graph algorithms (like Dijkstra's) are used on the weighted graph to find approximate generative distances and geodesics.

The paper provides theoretical guarantees that this graph-based approximation converges to the true generative distance and geodesic as the number of data points increases and $\epsilon$ decreases.

Datasets

The paper uses several standard datasets for evaluation:

  • Toy Datasets: Narrow MoG (Mixture of Gaussians), two concentric circles, and two spirals. These are used to demonstrate the effectiveness of geodesic affinity for clustering.
  • Two Moons Dataset: Used to visualize interpolations and compare latent space interpolation with geodesic interpolation.
  • MNIST Dataset: Used for visualizing interpolations between digits, comparing geodesic interpolation with diffusion model trajectories.

No new datasets are introduced; the focus is on applying the proposed metric to existing data.

Key Insights and Ideas

  • Global Geometric Understanding: The paper shifts focus from local geometry to a global understanding of the data manifold learned by generative models, providing a more holistic view.
  • Model-Agnostic Metric: The generative metric's independence from the generative model's internal parameters is a significant advantage, allowing it to be applied to any model that can provide data likelihoods.
  • Geodesics as Meaningful Paths: Generative geodesics offer a principled way to define "smooth" or "natural" transitions between data points, reflecting the underlying data distribution, which is often superior to simple Euclidean or latent space interpolation.
  • Graph-Based Approximation: The clever use of graph theory to approximate Riemannian geodesics efficiently overcomes the curse of dimensionality and makes the approach practical.

Key Results

  • Improved Clustering: Geodesic affinity matrices, derived from the generative distances, lead to more robust and accurate clustering results compared to Euclidean affinity on various toy datasets. The geodesic approach is shown to be less sensitive to the choice of hyperparameters.
  • Linearly Separable Embeddings: t-SNE embeddings computed using the generative metric result in linearly separable clusters, enabling near-perfect classification with a linear classifier.
  • Smoother Interpolations: Visualizations show that geodesic interpolations between data points (e.g., digits in MNIST, or points on the two moons dataset) are significantly smoother and more natural than latent space interpolations, avoiding sudden skips or artifacts.

Limitations and Future Work

  • Approximation Dependence: The accuracy of the generative geodesics depends on the quality of the graph approximation, which is influenced by the choice of $\epsilon$ and the density of sampled points.
  • Computational Cost: While efficient, the graph construction and shortest path computation can still be computationally intensive for very large datasets.
  • Hyperparameter Tuning: The generative metric itself involves hyperparameters ($\lambda$, $\rho_0$) that require tuning, although the paper suggests strategies for their selection.

Future work could involve exploring more sophisticated graph construction and weighting techniques, applying the metric to a wider range of generative models and applications, and further theoretical investigations into the properties of these generative geodesics.

Summary updated

BibTeX
@inproceedings{kim2024deep,
  author = {Beomsu Kim and Michael Anthony Puthawala and Jong Chul Ye and Emanuele Sansone},
  title = {{(Deep) Generative Geodesics}},
  booktitle = {GRaM @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=hOOMfL20GK},
}
Figure