Capacity Bounds for Hyperbolic Neural Network Representations of Latent Tree Structures

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

Abstract

We study the representation capacity of deep hyperbolic neural networks (HNNs) with a ReLU activation function. We establish the first proof that HNNs can $\varepsilon$-isometrically embed any finite weighted tree into a hyperbolic space of dimension $d \ge 2$ with prescribed sectional curvature $\kappa < 0$, for any $\varepsilon > 1$ (where $\varepsilon=1$ is optimal). We establish rigorous upper bounds for the network complexity on an HNN implementing the embedding. We find that the network complexity of an HNN implementing the graph representation is independent of the representation fidelity/distortion. We contrast this result against our lower bounds on distortion which any ReLU multi-layer perceptron (MLP) must exert when embedding a tree with $L > 2^d$ leaves into a $d$-dimensional Euclidean space, which we show is at least $\Omega(L^{1/d})$; independently of the depth, width, and (possibly discontinuous) activation function defining the MLP.

Introduction

Hierarchical structures, or trees, are ubiquitous in computer science, from linguistic hierarchies to phylogenetic trees. However, representing these structures in the "flat" Euclidean space ($\mathbb{R}^d$) used by most machine learning models is a geometric challenge. Because trees expand exponentially as one moves away from the root, attempting to pack them into Euclidean space causes significant "distortion"—where distances between nodes in the embedding no longer reflect their true relationship in the tree.

While researchers have turned to hyperbolic spaces ($\mathbb{H}^d$), which possess a "tree-like" geometry that expands exponentially, the theoretical capacity of Hyperbolic Neural Networks (HNNs) to actually implement these embeddings remained unproven. This paper bridges the gap between metric embedding theory and deep learning architecture.

Methodology

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

  1. Linear Encoding Phase: Mapping data from the hyperbolic manifold to a tangent space (Euclidean) using a logarithmic map.
  2. Transformation Phase: Applying a standard MLP-style transformation (matrix multiplication + ReLU activation).
  3. Hyperbolic Decoding Phase: Mapping the results back to the hyperbolic manifold using an exponential map and applying a hyperbolic bias.
The workflow of an HNN layer, showing the transition from hyperbolic space to Euclidean features and back.

The theoretical proof follows a three-step strategy: first, proving that HNNs can "memorize" arbitrary functions from $\mathbb{R}^n$ to $\mathbb{H}^d$; second, constructing a sequence of embeddings from trees into hyperbolic spaces that become increasingly accurate as curvature becomes more negative; and finally, showing that an HNN with specific weights and biases can implement these near-perfect embeddings.

Theoretical Insights

  • Geometry Trumps Parameters: For hierarchical data, the shape of the representation space matters more than the size of the network. An MLP cannot overcome the fundamental geometric mismatch of Euclidean space simply by adding more layers or neurons.
  • The Distortion Bound: The authors prove a lower bound for MLPs: any MLP embedding a tree with $L$ leaves into $d$-dimensional Euclidean space must exert a distortion of at least $\Omega(L^{1/d})$. This holds regardless of the network's depth, width, or activation function.
  • Fidelity is "Free": Surprisingly, the network complexity (number of parameters) required for an HNN to represent a tree does not increase as the demand for higher fidelity (lower distortion) increases. This suggests HNNs are exceptionally efficient for high-precision hierarchical tasks.
Comparison of a binary tree (left) and the minimal length curves in hyperbolic space (right), illustrating their shared exponential expansion.

Key Results

  • Theoretical Guarantee: Theorem 4.2 establishes that for any finite weighted tree, there exists an HNN that can embed it into a 2D hyperbolic plane with distortion arbitrarily close to 1 (perfect isometry).
  • Complexity Bounds: The authors provide explicit upper bounds for HNN complexity. For an $N$-node tree, the required number of trainable parameters is roughly $O(N^2)$.
  • Experimental Superiority: In synthetic tests involving binary, ternary, and random trees (1,000 to 4,000 nodes), HNNs consistently achieved lower Mean Squared Error (MSE) in distance estimation than MLPs, even when both models were constrained to the same number of parameters. The performance gap widened significantly as the dimensionality of the embedding space increased.

Conclusion

While the current proofs apply to finite weighted trees, extending this to infinite structures or more general graph types remains an open challenge. Additionally, while $O(N^2)$ is polynomial, finding more compressed representations for massive graphs with millions of nodes is a likely next step for future research. Formalizing results for smooth activation functions like GELU or Swish would also be valuable for modern practitioners.

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