Capacity Bounds for Hyperbolic Neural Network Representations of Latent Tree Structures

Anastasis Kratsios, Ruiyang Hong, Haitz Sáez de Ocáriz Borde

This paper, titled "Capacity Bounds for Hyperbolic Neural Network Representations of Latent Tree Structures," provides a rigorous mathematical foundation for a long-held belief in the machine learning community: hyperbolic spaces are fundamentally better than Euclidean spaces for representing hierarchical data.

TL;DR

The authors provide the first formal proof that Hyperbolic Neural Networks (HNNs) can embed any finite weighted tree with arbitrary precision into low-dimensional hyperbolic space. In contrast, they prove that standard Euclidean MLPs face a fundamental "distortion floor" that grows with the size of the tree, regardless of the network's depth or width.

What Problem Does This Paper Address?

Hierarchical structures, or trees, are ubiquitous in computer science, from linguistic hierarchies to phylogenetic trees. However, representing these structures in standard flat Euclidean space ($\mathbb{R}^d$) is notoriously difficult. Because trees expand exponentially as you move away from the root, trying to fit them into Euclidean space—which only expands polynomially—results in high "distortion." This means the distances between nodes in the embedding don't accurately reflect their true relationships in the tree.

While researchers have empirically observed that Hyperbolic Neural Networks (HNNs) perform better on these tasks, a formal proof of their representation capacity was missing. This paper fills that gap by quantifying exactly how much better HNNs are and what network complexity is required to achieve high-fidelity embeddings.

Methods

The authors analyze a specific HNN architecture where each layer consists of three phases:

  1. Linear Encoding Phase: Maps inputs from the hyperbolic manifold to a tangent space (which is Euclidean).
  2. Transformation Phase: Applies a standard affine transformation followed by a ReLU activation function.
  3. Hyperbolic Decoding Phase: Applies a hyperbolic bias and maps the features back onto the hyperbolic manifold.
Tree embedding error surfaces comparing MLPs and HNNs

The proof strategy involves showing that HNNs can "memorize" arbitrary functions. By constructing a sequence of embeddings into hyperbolic spaces with increasingly negative curvature, the authors demonstrate that HNNs can asymptotically reach zero distortion. Crucially, they derive explicit upper bounds on the depth, width, and number of trainable parameters needed for these embeddings.

Datasets

The theoretical results are validated using synthetic graph embedding experiments:

  • Tree Types: Binary trees, ternary trees, and random trees.
  • Scale: Graphs ranging from 1,000 to 4,000 nodes.
  • Setup: Nodes are initially laid out in $\mathbb{R}^2$ using a force-directed (spring) layout. The networks are then tasked with mapping these coordinates to a new embedding space to estimate the true "hop distance" between nodes.

Key Insights and Ideas

  • The Euclidean Impasse: The paper proves a lower bound on distortion for MLPs. If you have a tree with $L$ leaves, any MLP embedding it into $d$-dimensional Euclidean space will suffer a distortion of at least $\Omega(L^{1/d})$. This is a geometric limitation that cannot be solved by making the network deeper or wider.
  • Curvature as a Hyperparameter: HNNs succeed because they can leverage the sectional curvature ($\kappa$) of hyperbolic space. By making the space "more curved," the network can accommodate the exponential expansion of the tree.
  • Fidelity is "Free": A surprising finding is that the network complexity (depth/width) required to implement the embedding is independent of the desired fidelity ($\varepsilon$). Once the network is large enough to represent the tree structure, increasing the accuracy of the distances only requires adjusting the curvature and weights, not the network size.

Key Results

  • Theoretical Superiority: Theorem 4.2 establishes that for any $N$-point tree and any distortion target $\lambda > 1$, there exists an HNN that can achieve that target in just 2 dimensions.
  • Empirical Validation: In head-to-head tests with an equal number of parameters, HNNs consistently outperformed MLPs. As shown in the error surfaces below, HNNs maintain much lower Mean Squared Error (MSE) across different tree sizes and embedding dimensions.

Tree embedding error surfaces comparing MLPs and HNNs (Note: Figure 4.4 in the paper shows HNNs consistently achieving lower MSE loss than MLPs across binary, ternary, and random trees.)

Tree embedding error surfaces comparing MLPs and HNNs

Limitations and Future Work

  • Memorization vs. Generalization: The paper focuses on the representation capacity (the ability to fit a known tree). It does not explore how well these networks generalize to unseen nodes or how easily these optimal weights can be found using standard optimization techniques like SGD.
  • Complexity Bounds: While the authors provide polynomial upper bounds on network size, these bounds might be conservative. Future work could tighten these estimates.
  • Beyond Trees: The current proof is specific to tree structures. Extending these capacity bounds to more general graph structures (like cycles or expander graphs) remains an open challenge.

Summary updated

BibTeX
@article{kratsios2024capacity,
  author = {Anastasis Kratsios and Ruiyang Hong and Haitz Sáez de Ocáriz Borde},
  title = {{Capacity Bounds for Hyperbolic Neural Network Representations of Latent Tree Structures}},
  journal = {Neural Networks},
  year = {2024},
  doi = {10.1016/j.neunet.2024.106420},
}
Figure