基于核心的高效图RAG层次结构
Core-based Hierarchies for Efficient GraphRAG
AI总结:
针对图RAG中Leiden聚类不可复现的问题,提出用k-core分解替代,构建确定性、密度感知的层次结构,并设计轻量级启发式方法,在保证连接性的同时降低LLM成本,提升答案全面性和多样性。
摘要:
检索增强生成(RAG)通过引入外部知识增强了大型语言模型。然而,现有的基于向量的方法通常无法处理需要跨多个文档推理的全局理解任务。GraphRAG通过将文档组织成具有层次化社区的知识图谱来解决这一问题,这些社区可以被递归总结。当前的GraphRAG方法依赖Leiden聚类进行社区检测,但我们证明,在平均度数为常数且大多数节点度数较低的稀疏知识图谱上,模块度优化允许指数级数量的近似最优划分,使得基于Leiden的社区本质上不可复现。为了解决这个问题,我们提出用k-core分解替代Leiden,它在线性时间内产生确定性的、密度感知的层次结构。我们引入一组轻量级启发式方法,利用k-core层次结构构建大小有界、保持连接性的社区用于检索和总结,同时采用一种令牌预算感知的采样策略来降低LLM成本。我们在包括金融收益报告、新闻文章和播客在内的真实世界数据集上评估了我们的方法,使用三个LLM进行答案生成,并由五个独立的LLM裁判进行逐项比较评估。跨数据集和模型,我们的方法一致地提高了答案的全面性和多样性,同时减少了令牌使用量,证明了基于k-core的GraphRAG是一种有效且高效的全局理解框架。
英文摘要:
Retrieval-Augmented Generation (RAG) enhances large language models by incorporating external knowledge. However, existing vector-based methods often fail on global sensemaking tasks that require reasoning across many documents. GraphRAG addresses this by organizing documents into a knowledge graph with hierarchical communities that can be recursively summarized. Current GraphRAG approaches rely on Leiden clustering for community detection, but we prove that on sparse knowledge graphs, where average degree is constant and most nodes have low degree, modularity optimization admits exponentially many near-optimal partitions, making Leiden-based communities inherently non-reproducible. To address this, we propose replacing Leiden with k-core decomposition, which yields a deterministic, density-aware hierarchy in linear time. We introduce a set of lightweight heuristics that leverage the k-core hierarchy to construct size-bounded, connectivity-preserving communities for retrieval and summarization, along with a token-budget-aware sampling strategy that reduces LLM costs. We evaluate our methods on real-world datasets including financial earnings transcripts, news articles, and podcasts, using three LLMs for answer generation and five independent LLM judges for head-to-head evaluation. Across datasets and models, our approach consistently improves answer comprehensiveness and diversity while reducing token usage, demonstrating that k-core-based GraphRAG is an effective and efficient framework for global sensemaking.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。