用大模型+知识图谱检索,解决复杂逻辑推理难题
A Large Language Model Based Method for Complex Logical Reasoning over Knowledge Graphs
- 将复杂逻辑查询拆解为子查询,结合检索与大模型推理
- 在标准数据集上MRR显著优于传统嵌入方法,尤其对高复杂度查询
- 无需特定任务训练,适合需要深度推理的应用场景
基于一阶逻辑(FOL)的的知识图谱(KG)推理面临现实KG不完备性和查询结构复合性的双重挑战。现有方法依赖实体与关系的连续空间嵌入,通过可微集合运算回答查询,但在涉及多操作符、深层推理链或异构模式的复杂查询上泛化能力不足。本文提出ROG框架,采用集成式设计:先基于查询感知检索相关子图作为上下文证据,再利用大语言模型(LLM)进行逐步逻辑推理。该方法将复杂FOL查询分解为一系列简单子查询,避免任务特定的嵌入优化。在标准知识图谱推理基准上的实验表明,ROG在均倒数排名(MRR)指标上持续优于强嵌入基线,尤其在高复杂度查询类型上表现突出。结果表明,将结构化知识图谱检索与大模型驱动的逻辑推理结合,为复杂知识图谱推理提供了鲁棒且有效的替代方案。
原文摘要 · Abstract (English)
Reasoning over knowledge graphs (KGs) with first-order logic (FOL) queries is challenging due to the inherent incompleteness of real-world KGs and the compositional complexity of logical query structures. Most existing methods rely on embedding entities and relations into continuous geometric spaces and answer queries via differentiable set operations. While effective for simple query patterns, these approaches often struggle to generalize to complex queries involving multiple operators, deeper reasoning chains, or heterogeneous KG schemas. We propose ROG (Reasoning Over knowledge Graphs with large language models), an ensemble-style framework that combines query-aware KG neighborhood retrieval with large language model (LLM)-based chain-of-thought reasoning. ROG decomposes complex FOL queries into sequences of simpler sub-queries, retrieves compact, query-relevant subgraphs as contextual evidence, and performs step-by-step logical inference using an LLM, avoiding the need for task-specific embedding optimization. Experiments on standard KG reasoning benchmarks demonstrate that ROG consistently outperforms strong embedding-based baselines in terms of mean reciprocal rank (MRR), with particularly notable gains on high-complexity query types. These results suggest that integrating structured KG retrieval with LLM-driven logical reasoning offers a robust and effective alternative for complex KG reasoning tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。