Table of Contents
Fetching ...

HyperRAG: Reasoning N-ary Facts over Hypergraphs for Retrieval Augmented Generation

Wen-Sheng Lien, Yu-Kai Chan, Hao-Lung Hsiao, Bo-Kai Ruan, Meng-Fen Chiang, Chien-An Chen, Yi-Ren Yeh, Hong-Han Shuai

TL;DR

HyperRAG is proposed, a RAG framework tailored for n-ary hypergraphs with two complementary retrieval variants that enables accurate factual tracking, adaptive high-order traversal, and interpretable multi-hop reasoning under context constraints, benefiting both open and closed-domain QA.

Abstract

Graph-based retrieval-augmented generation (RAG) methods, typically built on knowledge graphs (KGs) with binary relational facts, have shown promise in multi-hop open-domain QA. However, their rigid retrieval schemes and dense similarity search often introduce irrelevant context, increase computational overhead, and limit relational expressiveness. In contrast, n-ary hypergraphs encode higher-order relational facts that capture richer inter-entity dependencies and enable shallower, more efficient reasoning paths. To address this limitation, we propose HyperRAG, a RAG framework tailored for n-ary hypergraphs with two complementary retrieval variants: (i) HyperRetriever learns structural-semantic reasoning over n-ary facts to construct query-conditioned relational chains. It enables accurate factual tracking, adaptive high-order traversal, and interpretable multi-hop reasoning under context constraints. (ii) HyperMemory leverages the LLM's parametric memory to guide beam search, dynamically scoring n-ary facts and entities for query-aware path expansion. Extensive evaluations on WikiTopics (11 closed-domain datasets) and three open-domain QA benchmarks (HotpotQA, MuSiQue, and 2WikiMultiHopQA) validate HyperRAG's effectiveness. HyperRetriever achieves the highest answer accuracy overall, with average gains of 2.95% in MRR and 1.23% in Hits@10 over the strongest baseline. Qualitative analysis further shows that HyperRetriever bridges reasoning gaps through adaptive and interpretable n-ary chain construction, benefiting both open and closed-domain QA.

HyperRAG: Reasoning N-ary Facts over Hypergraphs for Retrieval Augmented Generation

TL;DR

HyperRAG is proposed, a RAG framework tailored for n-ary hypergraphs with two complementary retrieval variants that enables accurate factual tracking, adaptive high-order traversal, and interpretable multi-hop reasoning under context constraints, benefiting both open and closed-domain QA.

Abstract

Graph-based retrieval-augmented generation (RAG) methods, typically built on knowledge graphs (KGs) with binary relational facts, have shown promise in multi-hop open-domain QA. However, their rigid retrieval schemes and dense similarity search often introduce irrelevant context, increase computational overhead, and limit relational expressiveness. In contrast, n-ary hypergraphs encode higher-order relational facts that capture richer inter-entity dependencies and enable shallower, more efficient reasoning paths. To address this limitation, we propose HyperRAG, a RAG framework tailored for n-ary hypergraphs with two complementary retrieval variants: (i) HyperRetriever learns structural-semantic reasoning over n-ary facts to construct query-conditioned relational chains. It enables accurate factual tracking, adaptive high-order traversal, and interpretable multi-hop reasoning under context constraints. (ii) HyperMemory leverages the LLM's parametric memory to guide beam search, dynamically scoring n-ary facts and entities for query-aware path expansion. Extensive evaluations on WikiTopics (11 closed-domain datasets) and three open-domain QA benchmarks (HotpotQA, MuSiQue, and 2WikiMultiHopQA) validate HyperRAG's effectiveness. HyperRetriever achieves the highest answer accuracy overall, with average gains of 2.95% in MRR and 1.23% in Hits@10 over the strongest baseline. Qualitative analysis further shows that HyperRetriever bridges reasoning gaps through adaptive and interpretable n-ary chain construction, benefiting both open and closed-domain QA.
Paper Structure (41 sections, 16 equations, 7 figures, 5 tables)

This paper contains 41 sections, 16 equations, 7 figures, 5 tables.

Figures (7)

  • Figure 1: Structural Comparison of (a) Knowledge Graphs and (b) Hypergraphs. For a given question $q$, (a) requires 3-hop reasoning over binary facts, while (b) enables single-hop inference via an $n$-ary relational fact, yielding a more compact and expressive multi-entity representation.
  • Figure 2: The overall framework of HyperRAG.
  • Figure 3: The visualization shows the efficiency-effectiveness tradeoff in multi-hop QA: retrieval time ($x$-axis), answer quality (Hits@10, $y$-axis), and context volume (bubble size, log-scaled by retrieved tokens).
  • Figure 4: Prompt for Entity Salience Scoring ($p_{\text{entity}}$).
  • Figure 5: Prompt templates for (a) Open-Domain Question Answering, and (b) Closed-Domain Question Answering.
  • ...and 2 more figures

Theorems & Definitions (3)

  • Definition 2.1: $n$-ary Relational Knowledge Graph
  • Definition A.1: Faithful Reduction to Binaries
  • Example : Role Ambiguity