Abstract
Many graph neural networks have been developed to learn graph representations in either Euclidean or hyperbolic space, with all nodes' representations embedded in a single space. However, a graph can have hyperbolic and Euclidean geometries at different regions of the graph. Thus, it is sub-optimal to indifferently embed an entire graph into a single space. In this paper, we explore and analyze two notions of local hyperbolicity, describing the underlying local geometry: geometric (Gromov) and model-based, to determine the preferred space of embedding for each node. The two hyperbolicities' distributions are aligned using the Wasserstein metric such that the calculated geometric hyperbolicity guides the choice of the learned model hyperbolicity. As such our model Joint Space Graph Neural Network (JSGNN) can leverage both Euclidean and hyperbolic spaces during learning by allowing node-specific geometry space selection. We evaluate our model on both node classification and link prediction tasks and observe promising performance compared to baseline models.
Introduction
Standard Graph Neural Networks (GNNs), such as GCN or GAT, typically operate within Euclidean space. While effective for grid-like data, Euclidean geometry struggles to represent hierarchical or "tree-like" structures without significant distortion. Conversely, Hyperbolic GNNs excel at representing hierarchies but underperform on lattice-like or loopy structures. Real-world graphs are often a "geometric soup," containing regions that are highly hierarchical alongside others that are relatively flat. Forcing an entire graph into a single geometric space is inherently sub-optimal. This paper introduces Joint Space Graph Neural Network (JSGNN), a framework designed to perform node-specific space selection by analyzing the local geometry of each node's neighborhood.
Quantifying Local Geometry
To bridge the gap between Euclidean and hyperbolic representations, the authors utilize Gromov’s $\delta$-hyperbolicity, a mathematical metric that quantifies the "tree-likeness" of a local region. A lower $\delta$ value indicates a more hyperbolic (tree-like) structure, while higher values suggest a more Euclidean (lattice-like) geometry. By calculating this metric for every node's 2-hop neighborhood, the model gains a prior understanding of the local geometric landscape.
As shown in the figure above, pure lattices (a) and pure trees (b) exhibit distinct distributions of geometric hyperbolicity (d, e). Hybrid graphs (c) contain a mixture of these geometries (f), necessitating a model that can adaptively select the appropriate embedding space for each node.
The Joint Space Graph Neural Network (JSGNN)
JSGNN employs a dual-branch architecture consisting of a Euclidean GAT and a Hyperbolic GAT (HGAT). The core innovation lies in how the model selects between these branches:
- Model Hyperbolicity and Selection: The model learns an attention mechanism to choose between the two spaces. This "model hyperbolicity" is guided by the pre-calculated geometric $\delta$ values.
- Wasserstein Distribution Alignment: To ensure the model's learned selections are grounded in the graph's actual geometry, the authors use the Wasserstein metric (Earth Mover's Distance) to align the distribution of model choices with the distribution of geometric hyperbolicity.
- Non-uniformity Loss: To prevent the model from producing ambiguous 50/50 selections, a specific loss term pushes the selection weights toward binary choices (0 or 1), ensuring each node is embedded in the single most suitable space.
Experimental Evaluation
The model was evaluated on seven benchmark datasets, including citation networks (Cora, Citeseer, Pubmed), flight networks (Airport), and hierarchical structures (Disease).
Key Results
JSGNN consistently outperformed or matched state-of-the-art baselines in both node classification and link prediction tasks:
- Node Classification: On the Cora dataset, JSGNN achieved 82.94% accuracy, surpassing both the purely Euclidean GAT (81.68%) and the purely hyperbolic HGAT (78.81%).
- Link Prediction: The model demonstrated significant gains in link prediction, where capturing correct geometry is critical. It achieved a near-perfect 99.43% ROC AUC on Cora.
- Versatility: In the "Disease" dataset (a perfect tree), JSGNN correctly identified the hyperbolic nature of every node, matching the performance of specialized hyperbolic models.
Conclusion and Future Work
JSGNN demonstrates that localized geometric metrics can effectively guide GNNs to select the optimal embedding space for individual nodes, reducing representation distortion. While the current model uses fixed 2-hop neighborhoods for geometric calculations, future work may explore adaptive neighborhood sizes and scaling the approach to extremely large graphs with millions of nodes. By moving beyond single-space embeddings, JSGNN provides a more flexible and accurate framework for representing the complex, heterogeneous geometries found in real-world data.
Summary updated