ChatRule: Mining Logical Rules with Large Language Models for Knowledge Graph Reasoning
Linhao Luo11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Jiaxin Ju22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPT Bo Xiong33{}^{3}start_FLOATSUPERSCRIPT 3 end_FLOATSUPERSCRIPT Yuan-Fang Li11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Gholamreza Haffari11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Shirui Pan22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPT 11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPTMonash University, 22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPTGriffith University, 33{}^{3}start_FLOATSUPERSCRIPT 3 end_FLOATSUPERSCRIPTUniversity of Stuttgart {linhao.luo, yuanfang.li, Corresponding author.
Abstract
Logical rules are essential for uncovering the logical connections between relations, which could improve 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 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, the ranked rules can be used to conduc
中文速览
知识图谱上的逻辑规则挖掘长期面临两大痛点:传统方法需要在海量规则空间里穷举搜索、难以扩展到大规模图谱,而且几乎所有方法都忽视了关系名称本身携带的语义信息。ChatRule 框架通过把大语言模型(LLM,large language model)引入规则挖掘流程来同时解决这两个问题:先用广度优先搜索从知识图谱中采样结构路径,再将这些路径与精心设计的提示词一起喂给 LLM(如 ChatGPT),让模型凭借其海量语义知识直接"写出"候选逻辑规则;随后用基于知识图谱已有事实计算的支持度、置信度等指标对候选规则打分排序,过滤掉 LLM 幻觉产生的错误规则;最终将高质量规则用于知识图谱推理。在四个大规模知识图谱上的实验表明,ChatRule 在规则质量和知识图谱补全等下游任务上均显著优于现有最优方法,且无需针对具体图谱训练任何模型,实用性和可解释性兼备。
原文 arXiv:2309.01538;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2309.01538v3