arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.12288cs.AIcs.CL
收藏

基于提示的知识图谱基础模型用于通用上下文推理

A Prompt-Based Knowledge Graph Foundation Model for Universal In-Context Reasoning

State Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室);National Institute of Healthcare Data Science, Nanjing University(南京大学国家卫生数据科学研究院)

Yuanning Cui, Zequn Sun, Wei Hu

AI总结:

提出基于提示的KG-ICL基础模型,通过统一分词器和双消息传递神经网络实现跨43个知识图谱的通用上下文推理与泛化。

摘要:

为了促进跨各种场景的知识驱动任务,人们构建了广泛的知识图谱(KGs)。然而,现有工作通常为不同的KGs开发独立的推理模型,缺乏在多样化的KGs和推理设置之间泛化和迁移知识的能力。在本文中,我们提出了一种基于提示的KG基础模型,即KG-ICL,通过上下文学习来实现通用的推理能力。具体来说,我们引入了一个以与查询相关的示例事实为中心的提示图作为上下文,以理解查询关系。为了对提示图进行编码并使其具备对查询中未见实体和关系的泛化能力,我们首先提出了一个统一的分词器,将提示图中的实体和关系映射到预定义的标记。然后,我们提出了两个消息传递神经网络,分别执行提示编码和KG推理。我们在直推式和归纳式设置下对43个不同的KGs进行了评估。结果表明,所提出的KG-ICL在大多数数据集上优于基线,展示了其出色的泛化和通用推理能力。源代码可在GitHub上获取:https://github.com/nju-websoft/KG-ICL。

英文摘要:

Extensive knowledge graphs (KGs) have been constructed to facilitate knowledge-driven tasks across various scenarios. However, existing work usually develops separate reasoning models for different KGs, lacking the ability to generalize and transfer knowledge across diverse KGs and reasoning settings. In this paper, we propose a prompt-based KG foundation model via in-context learning, namely KG-ICL, to achieve a universal reasoning ability. Specifically, we introduce a prompt graph centered with a query-related example fact as context to understand the query relation. To encode prompt graphs with the generalization ability to unseen entities and relations in queries, we first propose a unified tokenizer that maps entities and relations in prompt graphs to predefined tokens. Then, we propose two message passing neural networks to perform prompt encoding and KG reasoning, respectively. We conduct evaluation on 43 different KGs in both transductive and inductive settings. Results indicate that the proposed KG-ICL outperforms baselines on most datasets, showcasing its outstanding generalization and universal reasoning capabilities. The source code is accessible on GitHub: https://github.com/nju-websoft/KG-ICL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑