Logical rules are essential for uncovering the logical connections between relations, which could improve the reasoning performance and provide interpretable results on knowledge graphs (KGs). Although there have been many efforts to mine meaningful logical rules over KGs, existing methods suffer from the computationally intensive searches over the rule space and a lack of scalability for large-scale KGs. Besides, they often ignore the semantics of relations which is crucial for uncovering logical connections. Recently, large language models (LLMs) have shown impressive performance in the field of natural language processing and various applications, owing to their emergent ability and generalizability. In this paper, we propose a novel framework, ChatRule, unleashing the power of large language models for mining logical rules over knowledge graphs. Specifically, the framework is initiated with an LLM-based rule generator, leveraging both the semantic and structural information of KGs to prompt LLMs to generate logical rules. To refine the generated rules, a rule ranking module estimates the rule quality by incorporating facts from existing KGs. Last, a rule validator harnesses the reasoning ability of LLMs to validate the logical correctness of ranked rules through chain-of-thought reasoning. ChatRule is evaluated on four large-scale KGs, w.r.t. different rule quality metrics and downstream tasks, showing the effectiveness and scalability of our method.
翻译:逻辑规则对于揭示关系之间的逻辑联系至关重要,能够提升知识图谱(KGs)的推理性能并提供可解释的结果。尽管已有许多研究致力于从知识图谱中挖掘有意义的逻辑规则,但现有方法存在规则空间搜索计算强度大且缺乏大规模知识图谱可扩展性的问题。此外,这些方法往往忽略了关系语义——这一对揭示逻辑联系至关重要的因素。近期,大语言模型(LLMs)凭借其涌现能力与泛化性,在自然语言处理及各类应用中展现出卓越性能。本文提出一个新颖框架ChatRule,释放大语言模型在知识图谱逻辑规则挖掘中的潜力。具体而言,该框架首先基于LLM的规则生成器,通过融合知识图谱的语义与结构信息引导大语言模型生成逻辑规则;随后设计规则排序模块,结合现有知识图谱中的事实评估规则质量;最后,规则验证器利用大语言模型的推理能力,通过思维链推理验证已排序规则的逻辑正确性。我们在四个大规模知识图谱上,从规则质量指标与下游任务两个维度对ChatRule进行评估,实验结果表明了该方法的有效性与可扩展性。