Retrieval-Augmented Generation (RAG) enhances the reasoning ability of Large Language Models (LLMs) by dynamically integrating external knowledge, thereby mitigating hallucinations and strengthening contextual grounding for structured data such as graphs. Nevertheless, most existing RAG variants for textual graphs concentrate on low-dimensional structures -- treating nodes as entities (0-dimensional) and edges or paths as pairwise or sequential relations (1-dimensional), but overlook cycles, which are crucial for reasoning over relational loops. Such cycles often arise in questions requiring closed-loop inference about similar objects or relative positions. This limitation often results in incomplete contextual grounding and restricted reasoning capability. In this work, we propose Topology-enhanced Retrieval-Augmented Generation (TopoRAG), a novel framework for textual graph question answering that effectively captures higher-dimensional topological and relational dependencies. Specifically, TopoRAG first lifts textual graphs into cellular complexes to model multi-dimensional topological structures. Leveraging these lifted representations, a topology-aware subcomplex retrieval mechanism is proposed to extract cellular complexes relevant to the input query, providing compact and informative topological context. Finally, a multi-dimensional topological reasoning mechanism operates over these complexes to propagate relational information and guide LLMs in performing structured, logic-aware inference. Empirical evaluations demonstrate that our method consistently surpasses existing baselines across diverse textual graph tasks.
翻译:检索增强生成(RAG)通过动态整合外部知识,增强了大语言模型(LLM)的推理能力,从而缓解幻觉问题并强化对图等结构化数据的上下文锚定。然而,现有大多数面向文本图的RAG变体主要关注低维结构——将节点视为实体(0维),边或路径视为成对或序列关系(1维),却忽略了循环结构,而循环对于关系环路推理至关重要。此类循环常出现在需要对相似对象或相对位置进行闭环推理的问题中。这一局限往往导致上下文锚定不完整,推理能力受限。本文提出拓扑增强检索增强生成(TopoRAG),一种用于文本图问答的新型框架,能有效捕获高维拓扑与关系依赖。具体而言,TopoRAG首先将文本图提升为胞复形以建模多维拓扑结构。基于这些提升后的表示,我们提出一种拓扑感知的子复形检索机制,以提取与输入查询相关的胞复形,提供紧凑且信息丰富的拓扑上下文。最后,一个多维拓扑推理机制在这些复形上进行关系信息传播,并引导LLM执行结构化、逻辑感知的推理。实证评估表明,我们的方法在多种文本图任务上持续超越现有基线。