Table of Contents
Fetching ...

HyperGraphRAG: Retrieval-Augmented Generation via Hypergraph-Structured Knowledge Representation

Haoran Luo, Haihong E, Guanting Chen, Yandan Zheng, Xiaobao Wu, Yikai Guo, Qika Lin, Yu Feng, Zemin Kuang, Meina Song, Yifan Zhu, Luu Anh Tuan

TL;DR

HyperGraphRAG introduces a hypergraph-structured knowledge representation to capture n-ary relations in retrieval-augmented generation, addressing the expressiveness gaps of binary graphs. It details knowledge hypergraph construction via LLM-based n-ary relation extraction, a dual retrieval strategy over entities and hyperedges, and a hypergraph-guided generation pipeline that fuses structured knowledge with chunk-based text. Across medicine, agriculture, CS, and law, HyperGraphRAG consistently outperforms baselines in answer accuracy, retrieval relevance, and generation quality, while maintaining favorable time and cost metrics. The work demonstrates substantial practical potential for knowledge-intensive tasks and outlines future expansions to multimodal data, reinforcement learning, and federated settings.

Abstract

Standard Retrieval-Augmented Generation (RAG) relies on chunk-based retrieval, whereas GraphRAG advances this approach by graph-based knowledge representation. However, existing graph-based RAG approaches are constrained by binary relations, as each edge in an ordinary graph connects only two entities, limiting their ability to represent the n-ary relations (n >= 2) in real-world knowledge. In this work, we propose HyperGraphRAG, a novel hypergraph-based RAG method that represents n-ary relational facts via hyperedges, and consists of knowledge hypergraph construction, retrieval, and generation. Experiments across medicine, agriculture, computer science, and law demonstrate that HyperGraphRAG outperforms both standard RAG and previous graph-based RAG methods in answer accuracy, retrieval efficiency, and generation quality. Our data and code are publicly available at https://github.com/LHRLAB/HyperGraphRAG.

HyperGraphRAG: Retrieval-Augmented Generation via Hypergraph-Structured Knowledge Representation

TL;DR

HyperGraphRAG introduces a hypergraph-structured knowledge representation to capture n-ary relations in retrieval-augmented generation, addressing the expressiveness gaps of binary graphs. It details knowledge hypergraph construction via LLM-based n-ary relation extraction, a dual retrieval strategy over entities and hyperedges, and a hypergraph-guided generation pipeline that fuses structured knowledge with chunk-based text. Across medicine, agriculture, CS, and law, HyperGraphRAG consistently outperforms baselines in answer accuracy, retrieval relevance, and generation quality, while maintaining favorable time and cost metrics. The work demonstrates substantial practical potential for knowledge-intensive tasks and outlines future expansions to multimodal data, reinforcement learning, and federated settings.

Abstract

Standard Retrieval-Augmented Generation (RAG) relies on chunk-based retrieval, whereas GraphRAG advances this approach by graph-based knowledge representation. However, existing graph-based RAG approaches are constrained by binary relations, as each edge in an ordinary graph connects only two entities, limiting their ability to represent the n-ary relations (n >= 2) in real-world knowledge. In this work, we propose HyperGraphRAG, a novel hypergraph-based RAG method that represents n-ary relational facts via hyperedges, and consists of knowledge hypergraph construction, retrieval, and generation. Experiments across medicine, agriculture, computer science, and law demonstrate that HyperGraphRAG outperforms both standard RAG and previous graph-based RAG methods in answer accuracy, retrieval efficiency, and generation quality. Our data and code are publicly available at https://github.com/LHRLAB/HyperGraphRAG.

Paper Structure

This paper contains 38 sections, 46 equations, 12 figures, 5 tables, 2 algorithms.

Figures (12)

  • Figure 1: An illustration of HyperGraphRAG.
  • Figure 2: Comparison of knowledge representation: standard RAG uses chunks as units, GraphRAG captures binary relations with graphs, and HyperGraphRAG models n-ary relations with hyperedges.
  • Figure 3: An overview of HyperGraphRAG, which constructs a knowledge hypergraph from domain knowledge, retrieves n-ary facts based on user questions, and generates knowledgeable responses.
  • Figure 4: Results of the ablation study.
  • Figure 5: (a-e) Visualizations of knowledge hypergraphs constructed in 5 domains. (f) Statistical comparison highlights HyperGraphRAG’s richer expressiveness over GraphRAG and LightRAG.
  • ...and 7 more figures

Theorems & Definitions (6)

  • proof
  • proof
  • proof
  • proof
  • proof
  • proof