Table of Contents
Fetching ...

ArchRAG: Attributed Community-based Hierarchical Retrieval-Augmented Generation

Shu Wang, Yixiang Fang, Yingli Zhou, Xilin Liu, Yuchi Ma

TL;DR

ArchRAG introduces a graph-based RAG framework that leverages attributed communities (ACs) and a novel hierarchical index (C-HNSW) to address low community quality, single-granularity retrieval, and high token costs in graph-based RAG. The offline phase builds a knowledge graph from corpora, applies an LLM-driven hierarchical clustering to form ACs, and constructs a multi-layer C-HNSW index for efficient retrieval. The online phase performs hierarchical search across levels and uses adaptive filtering-based generation to integrate retrieved content, enabling effective handling of both abstract and specific QA tasks. Empirical results show ArchRAG achieves state-of-the-art accuracy on several QA benchmarks while dramatically reducing token usage, demonstrating practical benefits in efficiency and reliability for graph-based RAG systems.

Abstract

Retrieval-Augmented Generation (RAG) has proven effective in integrating external knowledge into large language models (LLMs) for solving question-answer (QA) tasks. The state-of-the-art RAG approaches often use the graph data as the external data since they capture the rich semantic information and link relationships between entities. However, existing graph-based RAG approaches cannot accurately identify the relevant information from the graph and also consume large numbers of tokens in the online retrieval process. To address these issues, we introduce a novel graph-based RAG approach, called Attributed Community-based Hierarchical RAG (ArchRAG), by augmenting the question using attributed communities, and also introducing a novel LLM-based hierarchical clustering method. To retrieve the most relevant information from the graph for the question, we build a novel hierarchical index structure for the attributed communities and develop an effective online retrieval method. Experimental results demonstrate that ArchRAG outperforms existing methods in both accuracy and token cost.

ArchRAG: Attributed Community-based Hierarchical Retrieval-Augmented Generation

TL;DR

ArchRAG introduces a graph-based RAG framework that leverages attributed communities (ACs) and a novel hierarchical index (C-HNSW) to address low community quality, single-granularity retrieval, and high token costs in graph-based RAG. The offline phase builds a knowledge graph from corpora, applies an LLM-driven hierarchical clustering to form ACs, and constructs a multi-layer C-HNSW index for efficient retrieval. The online phase performs hierarchical search across levels and uses adaptive filtering-based generation to integrate retrieved content, enabling effective handling of both abstract and specific QA tasks. Empirical results show ArchRAG achieves state-of-the-art accuracy on several QA benchmarks while dramatically reducing token usage, demonstrating practical benefits in efficiency and reliability for graph-based RAG systems.

Abstract

Retrieval-Augmented Generation (RAG) has proven effective in integrating external knowledge into large language models (LLMs) for solving question-answer (QA) tasks. The state-of-the-art RAG approaches often use the graph data as the external data since they capture the rich semantic information and link relationships between entities. However, existing graph-based RAG approaches cannot accurately identify the relevant information from the graph and also consume large numbers of tokens in the online retrieval process. To address these issues, we introduce a novel graph-based RAG approach, called Attributed Community-based Hierarchical RAG (ArchRAG), by augmenting the question using attributed communities, and also introducing a novel LLM-based hierarchical clustering method. To retrieve the most relevant information from the graph for the question, we build a novel hierarchical index structure for the attributed communities and develop an effective online retrieval method. Experimental results demonstrate that ArchRAG outperforms existing methods in both accuracy and token cost.

Paper Structure

This paper contains 28 sections, 4 theorems, 1 equation, 15 figures, 8 tables, 3 algorithms.

Key Result

Lemma 1

Given a large text corpus or a large set of text documents with a total of $D$ tokens, the time complexity of the offline indexing process of ArchRAG is $O(I\frac{D}{w} + \frac{1-a^L}{1-a}(n*t+I\frac{D}{w}+\pi(m)+n\log n))$, where ${\bf I}$ is the generation time of the LLM for a single inference, $

Figures (15)

  • Figure 1: The general workflow of graph-based RAG, which retrieves relevant information (e.g., nodes, subgraphs, or textual information) to facilitate the LLM generation.
  • Figure 2: ArchRAG consists of two phases: offline indexing and online retrieval. For the online retrieval phase, we show an example of using ArchRAG to answer a question in the HotpotQA dataset.
  • Figure 3: Head-to-head win rates for abstract QA, comparing each row method against each column (higher is better). VR, LR, and AR denote Vanilla RAG, HyLightRAG, and ArchRAG, respectively.
  • Figure 4: Comparison of query efficiency.
  • Figure 5: C-HNSW and Base-HNSW query efficiency.
  • ...and 10 more figures

Theorems & Definitions (9)

  • Definition 1: Hierarchical Navigable Small World (HNSW) malkov2018efficient
  • Lemma 1
  • proof
  • Lemma 2
  • proof
  • Lemma 3
  • proof
  • Lemma 4
  • proof