Papers
Topics
Authors
Recent
Search
2000 character limit reached

HyperbolicRAG: Hierarchy-Aware Retrieval

Updated 1 December 2025
  • HyperbolicRAG is a retrieval-augmented generation framework that uses the Poincaré ball model to encode both semantic similarity and hierarchical abstraction.
  • It fuses Euclidean and hyperbolic retrieval signals, enabling fine-grained matching and global, hierarchy-aware reasoning for complex knowledge graphs.
  • Empirical evaluations on multi-hop question answering tasks show robust improvements in evidence retrieval over standard and graph-based methods.

HyperbolicRAG is a retrieval-augmented generation (RAG) framework that employs hyperbolic geometry to jointly model semantic similarity and hierarchical abstraction in retrieval pipelines for LLMs. By embedding information units within a shared Poincaré manifold and fusing retrieval signals from both Euclidean and hyperbolic space, HyperbolicRAG enables fine-grained semantic matching together with global hierarchy-aware reasoning for complex knowledge graphs. Empirical results show robust gains in evidence retrieval and multi-hop question answering tasks over standard and graph-based RAG approaches (Linxiao et al., 24 Nov 2025).

1. Hyperbolic Geometry in Representation Learning

HyperbolicRAG leverages the Poincaré ball model of hyperbolic space to encode latent hierarchy. The dd-dimensional Poincaré ball of negative curvature c-c is defined as Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}, with the metric gx=λx2gEg_x = \lambda_x^2 g^E, where λx=2/(1cx2)\lambda_x = 2/(1 - c\|x\|^2) and gEg^E is the Euclidean metric. The geodesic distance between two points u,vHdcu, v \in \mathbb{H}_d^c is

dHc(u,v)=1carcosh(1+2cuv2(1cu2)(1cv2)).d_{\mathbb{H}^c}(u, v) = \frac{1}{\sqrt{c}} \operatorname{arcosh}\left(1 + 2c\frac{\|u-v\|^2}{(1 - c\|u\|^2)(1 - c\|v\|^2)}\right).

Hierarchical containment is represented by the radial coordinate: nodes near the origin encode high-level abstractions, and nodes near the boundary encode specific facts. The exponential volume growth of hyperbolic space enables the representation of large trees and hierarchies with low distortion (Linxiao et al., 24 Nov 2025).

2. Depth-Aware Representation Learning Pipeline

For each candidate node (fact, passage, entity), an initial Euclidean embedding zvEz_v^E is computed via a pretrained encoder. These features pass through a multi-stage transformation:

  • Hierarchy Feature Extraction: uv=ϕ(zvE)u_v = \phi(z_v^E) via a small MLP.
  • Depth Prediction: c-c0, predicting radial depth within c-c1 adaptively for passages, facts, or entities.
  • Fusion and Radial Alignment: A gated feature fusion combines c-c2 and hierarchy features; the result is rescaled such that the radial norm encodes depth:

c-c3

with hyperparameters c-c4, c-c5.

  • Poincaré Mapping: The rescaled embedding is mapped into hyperbolic space by:

c-c6

This architecture achieves joint semantic-containment optimization: direction encodes local semantics, while norm encodes abstraction depth. The design allows passage and fact embeddings to simultaneously capture fine-grained similarity and strict containment relationships (Linxiao et al., 24 Nov 2025).

3. Unsupervised Contrastive Regularization

Contrastive learning enforces cross-level geometric consistency. For each passage, positives are facts present within that passage, and negatives are facts outside of it (and vice versa for facts). Hyperbolic margin-based losses are used:

  • Passage-to-Fact:

c-c7

  • Fact-to-Passage:

c-c8

  • Total Loss:

c-c9

This strict alignment pushes each passage closer to its own facts (and vice versa) than to negatives, encoding containments in hyperbolic space (Linxiao et al., 24 Nov 2025).

4. Mutual-Ranking Fusion Mechanism

Retrieval aggregates ranked signals from both Euclidean and hyperbolic branches:

  • Euclidean Branch: Queries encoded in Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}0 are used for top-Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}1 fact retrieval by cosine similarity, with personalized PageRank (PPR) propagation over a passage–entity graph.
  • Hyperbolic Branch: Queries are projected into Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}2, and top-Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}3 facts are ranked by negative hyperbolic distance, followed by PPR.
  • Mutual Fusion: For each passage, combined rank scores from both branches are fused, with a “reciprocal rank” bonus for agreement: gx=λx2gEg_x = \lambda_x^2 g^E7 This late-fusion rewards consistency and enables retrieval of passages that are salient in both spaces (Linxiao et al., 24 Nov 2025).

5. Empirical Results and Ablations

Comprehensive evaluation on QA benchmarks (NQ, PopQA, MuSiQue, 2WikiMultihopQA, HotpotQA) with 1,000 queries each demonstrated the following Recall@5 values (average over all datasets): BM25 55.1%, NV-Embed-v2 73.4%, HippoRAG2 78.2%, HyperbolicRAG 79.0% (best). On multi-hop subsets, HyperbolicRAG achieved 76.2%, 92.1%, 96.3% for MuSiQue, 2Wiki, and Hotpot, respectively. End-to-end QA scores (Exact Match / F1 average) were 49.0/60.0 (NV-Embed-v2), 51.0/62.7 (HippoRAG2), and 51.4/63.3 (HyperbolicRAG) (Linxiao et al., 24 Nov 2025). Ablation studies showed that:

  • Removing the hyperbolic branch lowered Recall@5 (to 74.7%, 90.4%, 96.2% on multi-hop).
  • Hyperbolic branch alone also reduced recall versus fusion, but outperformed standard Euclidean-only alignment.
  • The dual-branch fusion is essential for state-of-the-art evidence recall, especially on multi-hop reasoning.

Performance was stable across diverse embedding backbones (GTE-Qwen2-7B, GritLM-7B, NV-Embed-v2-7B, Qwen3-8B), LLM generators (LLaMA-3 70B, QWQ-32B), and robust to curvature parameter Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}4 variation (Linxiao et al., 24 Nov 2025).

6. Implementation Guidelines and Hyperparameters

Key hyperparameters include curvature Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}5 (default 1.0); radial alignment coefficients Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}6 (e.g., Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}7); margin Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}8 (default 1.0); PPR restart probability (e.g., Hdc={xRd:cx2<1}\mathbb{H}^c_d = \{x\in\mathbb{R}^d : c\|x\|^2 < 1\}9); number of top-gx=λx2gEg_x = \lambda_x^2 g^E0 facts for initialization (gx=λx2gEg_x = \lambda_x^2 g^E1); embedding dimension gx=λx2gEg_x = \lambda_x^2 g^E2; hierarchy MLP dimension gx=λx2gEg_x = \lambda_x^2 g^E3; and learning rates for encoder (gx=λx2gEg_x = \lambda_x^2 g^E4) and depth predictor (gx=λx2gEg_x = \lambda_x^2 g^E5). Recommended implementation practices include precomputing embeddings, building the passage–entity graph once, enforcing numerical stability in distance/activation calculations, and monitoring radial norms to prevent boundary saturation (gx=λx2gEg_x = \lambda_x^2 g^E6). The use of the same graph adjacency and PPR parameters in both branches ensures comparability (Linxiao et al., 24 Nov 2025).

7. Significance and Connections to Graph Geometry

HyperbolicRAG bridges advances in geometric graph modeling and neural retrieval. Its use of the Poincaré ball for containment-aware embeddings is motivated by findings in hyperbolic random graph models (Aldecoa et al., 2015), which showed that hyperbolic geometry naturally reproduces complex network phenomena such as power-law degree distributions and hierarchical clustering. By combining this with modern contrastive learning and dual-space mutual ranking, HyperbolicRAG provides a principled and empirically validated approach to hierarchy-aware retrieval for LLMs. This suggests broad applicability for hierarchical and multi-hop reasoning tasks where information structure is inherently non-Euclidean (Linxiao et al., 24 Nov 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to HyperbolicRAG.