Numerically Accurate Hyperbolic Embeddings Using Tiling-Based Models

Tao Yu, Christopher De SaNeurIPS 2019

Hyperbolic embeddings are highly effective for representing hierarchical data because their volume grows exponentially with their radius, perfectly mirroring the expanding branches of a tree. However, this geometric advantage comes with a severe computational drawback: the "NaN problem." As points move further from the origin to represent deeper levels of a hierarchy, the numerical precision required to track them explodes, leading to massive instability.

This paper introduces a novel tiling-based model that solves this problem. By representing points using a combination of integer-based "tiles" and local floating-point coordinates, the model ensures provably bounded numerical error everywhere in the space. Furthermore, this hybrid coordinate system enables massive data compression, reducing embedding sizes down to just 2% of their original footprint.

The "NaN" Problem in Hyperbolic Space

Standard hyperbolic representations, such as the Poincaré disk or the Lorentz model, represent points using standard floating-point numbers. Because the space expands exponentially, distances and gradients near the "edge" of the space become ill-conditioned.

In these standard models, numerical error is unbounded. Gradients frequently overflow or underflow, causing the embedding to become distorted or collapse entirely into NaN (Not a Number) values. Previous workarounds involved using computationally expensive "BigFloats" or scaling down the entire embedding, which artificially increases distortion. This paper seeks a fundamental fix: a way to represent any point in hyperbolic space with a small, fixed, and bounded error, without resorting to high-precision arithmetic.

The Tiling-Based Solution

The authors propose a tiling-based coordinate system. Imagine navigating a giant tiled floor: instead of measuring your exact distance from the front door in millimeters (which would eventually require massive numbers), you simply identify the integer index of the tile you are standing on, and then use a small floating-point number to represent your exact position within that specific tile.

Visualization of a regular tiling in the Poincaré disk model.

To implement this, the authors developed two primary models:

  • L-tiling Model (2D): Built on the Lorentz model, this approach uses a Fuchsian group—a discrete group of isometries—to tile the hyperbolic plane. A point is represented as a pair $(g, x)$, where $g$ is an integer-based matrix representing the specific tile, and $x$ is a local coordinate within a "fundamental domain" (the base tile at the origin).
  • H-tiling Model (Higher Dimensions): Because regular honeycombed tilings do not exist in all higher dimensions (due to Coxeter's geometric constraints), the authors utilize the Poincaré half-space model to create an infinite square tiling. This allows the tiling concept to scale gracefully to $n$-dimensional spaces.

Optimization and Normalization

Training these embeddings requires adapting Riemannian Stochastic Gradient Descent (RSGD) to work with discrete tiles. When a point moves off its current tile during a gradient update, a "normalization" step snaps the local coordinate back into the fundamental domain and updates the integer tile index accordingly. Because the integer tiles handle the "large-scale" positioning, the floating-point coordinates only ever need to cover a small, bounded area.

Key Results: Massive Compression and Accuracy

The models were evaluated on standard hierarchical and graph datasets, including WordNet (Nouns, Verbs, Mammals), Bio-yeast (protein interactions), and Gr-QC (collaboration networks).

Hyperbolic error versus bits per node, alongside a table demonstrating the massive memory compression achieved by the tiling model.
  • Bounded Error & The "NaN" Cure: By computing distances and gradients using integer-backed tiles, the model avoids the ill-conditioned metrics that cause floating-point overflow. The representation error remains constant regardless of how far a point is from the origin.
  • Massive Compression: Because the local floating-point coordinates are strictly bounded, they can be aggressively quantized. Using variable bit-width encoding (VBW), the L-tiling model represented the WordNet Nouns embedding using only 2% of the memory required by a standard Poincaré embedding (approximately 6.2 MB versus 372 MB).
  • Superior Accuracy: Despite the massive compression, the tiling models maintain or improve accuracy. In 2D, the L-tiling model achieved a Mean Average Precision (MAP) of 0.413 on WordNet Nouns, significantly outperforming both the Poincaré (0.124) and Lorentz (0.382) baselines. The H-tiling model showed similar stability and performance in higher dimensions (5D, 10D).

Limitations and Future Work

While highly effective, the tiling approach does have limitations. A classic geometric result (Coxeter, 1956) proves that regular tilings do not exist in six or more dimensions. The authors work around this by using Cartesian products of 2D tilings or the H-tiling model, but these may not be the most "natural" geometric fits for all high-dimensional hyperbolic manifolds. Additionally, implementing tiling-based RSGD is more complex than standard manifold optimization due to the required tile-transition normalization steps.

Future work may explore non-regular tilings in higher dimensions to determine if they offer even better representation density for complex, non-tree-like graphs. Nonetheless, this tiling-based approach represents a major step forward in making hyperbolic embeddings numerically stable, highly compressible, and practical for large-scale deployment.

Summary updated

BibTeX
@inproceedings{yu2019numerically,
  author = {Tao Yu and Christopher De Sa},
  title = {{Numerically Accurate Hyperbolic Embeddings Using Tiling-Based Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure