A Wrapped Normal Distribution on Hyperbolic Space for Gradient-Based Learning

Yoshihiro Nagano, Shoichiro Yamaguchi, Yasuhiro Fujita, Masanori Koyama

Introduction

Many real-world datasets, including social networks, biological taxonomies, and linguistic hierarchies, possess an inherent "tree-like" structure. Traditional machine learning models typically embed such data into Euclidean space. However, Euclidean geometry is fundamentally ill-suited for representing hierarchies: while the number of nodes in a tree grows exponentially with depth, the volume of Euclidean space only grows polynomially with radius. This mismatch leads to "crowding," forcing models to utilize high-dimensional spaces to preserve structural relationships.

Hyperbolic space offers a solution, as its volume grows exponentially with radius, providing a natural home for hierarchies. Despite this, most hyperbolic machine learning has remained deterministic. To build probabilistic models like Variational Autoencoders (VAEs), a differentiable "Normal distribution" for hyperbolic space is required. Previous attempts were often non-differentiable or relied on inefficient sampling methods. This paper introduces the pseudo-hyperbolic Gaussian, a fully differentiable distribution that enables efficient gradient-based learning in hyperbolic manifolds.

Methodology: The Wrapped Normal Distribution

The authors propose a "wrapped" approach to define the pseudo-hyperbolic Gaussian ($\mathcal{G}(\mu, \Sigma)$). This method leverages the relationship between the curved hyperbolic manifold and its flat tangent spaces.

The process involves four primary steps:

  1. Sampling: A standard Gaussian vector is sampled in a flat Euclidean space.
  2. Interpretation: This vector is treated as an element of the tangent space at the origin of the hyperbolic manifold.
  3. Parallel Transport: The vector is moved from the origin to the target mean ($\mu$) via parallel transport, preserving its orientation and magnitude relative to the manifold's curvature.
  4. Projection (Exponential Map): The vector is projected onto the hyperbolic surface using the exponential map.
The exponential map $z = \exp_\mu(u)$ wraps a tangent vector $u$ onto the hyperbolic manifold.

The core contribution is the derivation of an analytical log-density function. By calculating the Jacobian of this wrapping transformation, the authors enable the "reparameterization trick," allowing for standard backpropagation in deep learning frameworks. The authors utilize the Lorentz (Hyperboloid) model of hyperbolic space, citing its superior numerical stability and simpler closed-form expressions for geodesics compared to the Poincaré Disk model.

Experimental Evaluation

The pseudo-hyperbolic Gaussian was evaluated across several domains to test its ability to capture hierarchical structures and its efficiency in low-dimensional settings.

Synthetic Hierarchies and VAEs

On a synthetic binary tree (depth 8), the Hyperbolic VAE (H-VAE) significantly outperformed the Vanilla Euclidean VAE. The H-VAE achieved a correlation of 0.768 between latent distances and true tree distances, compared to 0.644 for the Euclidean model. Qualitatively, the H-VAE naturally recovers the tree structure in its latent space without explicit supervision.

Comparison of latent space representations for a synthetic tree. The Hyperbolic VAE (c) preserves the hierarchical branching structure much more effectively than the Vanilla VAE (b).

MNIST and WordNet

In MNIST digit reconstruction, the H-VAE achieved higher log-likelihoods than the Vanilla VAE, particularly in 2D latent spaces. For lexical hierarchies like WordNet, the hyperbolic approach demonstrated remarkable efficiency. In a 5-dimensional space, it achieved a Mean Average Precision (MAP) of 0.506, nearly doubling the 0.296 MAP of the Euclidean version.

Atari 2600 Breakout

Experiments with game state trajectories in Breakout revealed that the hyperbolic latent space naturally encodes temporal progression. The distance of a latent vector from the origin (its norm) correlated strongly with the number of blocks remaining, suggesting the model used the radial dimension to represent game progress.

Conclusion

The pseudo-hyperbolic Gaussian provides a robust, differentiable framework for probabilistic modeling in non-Euclidean geometries. By enabling efficient sampling and gradient-based optimization, it opens the door for more sophisticated hierarchical representations in deep learning, from complex graph neural networks to advanced generative models.

Summary updated

BibTeX
@inproceedings{nagano2019wrapped,
  author = {Yoshihiro Nagano and Shoichiro Yamaguchi and Yasuhiro Fujita and Masanori Koyama},
  title = {{A Wrapped Normal Distribution on Hyperbolic Space for Gradient-Based Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure