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.
翻译:逻辑规则对于揭示关系间的逻辑联系至关重要,不仅能提升知识图谱的推理性能,还能提供可解释的推理结果。尽管已有诸多关于挖掘知识图谱中有意义逻辑规则的研究,现有方法仍面临规则空间搜索计算量大、难以扩展到大规模知识图谱的困境。此外,这些方法常忽略对揭示逻辑联系至关重要的关系语义信息。近年来,大语言模型凭借其涌现能力与泛化性,在自然语言处理及各类应用中展现出卓越性能。本文提出ChatRule这一新型框架,通过释放大语言模型的能力来挖掘知识图谱中的逻辑规则。具体而言,该框架首先构建基于大语言模型的规则生成器,利用知识图谱的语义与结构信息提示大语言模型生成逻辑规则;其次设计规则排序模块,通过整合现有知识图谱中的事实评估规则质量;最后构建规则验证器,利用大语言模型的推理能力通过思维链推理验证排序后规则的逻辑正确性。我们在四个大规模知识图谱上从规则质量指标与下游任务两个维度评估ChatRule,实验结果表明了该方法的有效性与可扩展性。