Hyperbolic Neural Networks

Octavian-Eugen Ganea, Gary Bécigneul, Thomas Hofmann

Introduction

Most machine learning models operate in Euclidean space ($\mathbb{R}^n$). This is largely because Euclidean geometry is intuitive, and fundamental mathematical operations like vector addition and inner products are straightforward to compute. However, Euclidean space is fundamentally a poor fit for hierarchical or tree-like data.

Consider a tree structure: the number of nodes grows exponentially with depth. In Euclidean space, the volume of a sphere only grows polynomially with its radius. This discrepancy means that embedding a complex tree in Euclidean space requires a massive number of dimensions to avoid "squashing" the branches together—a phenomenon known as distortion. In contrast, hyperbolic space exhibits exponential volume growth, making it a natural, low-distortion home for trees and hierarchies. While previous research successfully created hyperbolic embeddings, the field lacked the mathematical machinery to process these embeddings through deep neural network layers without constantly mapping them back to Euclidean space.

This paper introduces Hyperbolic Neural Networks (HNNs), a principled framework for building deep learning models directly within hyperbolic space. By bridging the gap between Möbius gyrovector spaces and Riemannian geometry, the authors derive hyperbolic versions of fundamental neural network building blocks, enabling models to better represent data with inherent hierarchical structures.

Methods: Building Blocks of Hyperbolic Networks

The authors work primarily with the Poincaré ball model of hyperbolic geometry. To construct neural networks in this space, they had to redefine basic operations that are typically taken for granted in Euclidean space:

  • Möbius Operations: Using the formalism of "gyrovector spaces," the authors define Möbius addition and Möbius scalar multiplication. These operations allow for "vector-like" manipulations that strictly stay within the bounds of the Poincaré ball.
  • Matrix-Vector Multiplication: To perform linear transformations ($Mx$), the framework maps points to a Euclidean tangent space, performs the standard multiplication, and then maps the result back to the hyperbolic manifold.
  • Poincaré Hyperplanes: To perform classification tasks, such as Multinomial Logistic Regression (MLR), the authors define a hyperbolic version of a "flat" decision boundary. This relies on hyperbolic distance and "gyroangles."
Visualization of a Poincaré hyperplane
  • Hyperbolic RNNs & GRUs: Extending these operations to sequential data, the authors re-derive the gated recurrent unit (GRU) architecture. This allows the network to maintain a "hidden state" that evolves along the curved manifold of hyperbolic space.

A mathematically elegant feature of this framework is that it is parameterized by a curvature constant $c$. As $c \to 0$, all these hyperbolic operations smoothly transform back into their standard Euclidean counterparts, proving that Euclidean and hyperbolic networks are points on a continuum of geometric manifolds rather than entirely disjoint concepts.

Datasets and Key Insights

The authors evaluated their models on tasks where hierarchy is either explicit or implicit:

  1. SNLI (Stanford Natural Language Inference): A large-scale dataset for textual entailment.
  2. Noisy-Prefix Recognition: A synthetic task designed to test "tree-likeliness," where the model must decide if one sentence is a noisy version of a prefix of another.
  3. WordNet Hierarchy: A subset of the WordNet noun hierarchy used to test the Hyperbolic MLR’s ability to classify nodes within a pre-trained hyperbolic embedding space.

A major insight from these experiments is the concept of Geometry as a Prior. Choosing hyperbolic geometry acts as a structural prior; if the data is hierarchical (like language or biological taxonomies), the geometry naturally handles relationships that would otherwise require a much wider or deeper Euclidean network. Consequently, hyperbolic models can achieve high accuracy with very few dimensions (e.g., $d=5$). In the WordNet task, the hyperbolic classifier significantly outperformed Euclidean versions in low-dimensional settings because it inherently respected the underlying "anatomy" of the tree.

Key Results

The empirical results demonstrate the practical advantages of Hyperbolic Neural Networks, particularly on highly structured data.

Performance comparison on SNLI and PREFIX tasks
  • Noisy-Prefix Task: On the most "tree-like" synthetic data (PREFIX-10%), the Fully Hyperbolic RNN achieved a 96.91% accuracy, reducing the error rate by a factor of 3.35x compared to the Fully Euclidean RNN (89.62%).
  • SNLI: The hyperbolic models performed on par with or slightly better than Euclidean variants. This is particularly notable given that optimization tools for hyperbolic space were less mature at the time of publication.
  • WordNet Classification: The Hyperbolic Multinomial Logistic Regression (MLR) consistently outperformed Euclidean MLR across various subtrees (Animals, Groups, Workers, Mammals), especially when the embedding dimension was heavily constrained ($d=2$ or $d=3$).

Limitations and Future Work

Despite these strong results, HNNs come with specific challenges:

  • Optimization Complexity: Standard optimizers like Adam are designed for Euclidean space. While the authors utilized Riemannian gradients, the non-convex nature of hyperbolic space makes initialization and convergence more sensitive than in standard networks.
  • Scaling and Overhead: While the mathematics are elegant, the extra steps required to map to tangent spaces and back add computational overhead compared to highly optimized simple matrix multiplications in $\mathbb{R}^n$.
  • Feature Diversity: Hyperbolic space is ideal for hierarchies, but not all data is strictly a tree. Future work could explore "mixed-curvature" networks that combine Euclidean, spherical, and hyperbolic layers to handle diverse, multi-modal data types.

Summary updated

BibTeX
@inproceedings{ganea2018hyperbolic,
  author = {Octavian-Eugen Ganea and Gary Bécigneul and Thomas Hofmann},
  title = {{Hyperbolic Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=SyNFBPbuZH},
}
Figure