arXiv:2410.12288cs.AIcs.CL2024-10NeurIPS被引 41

用提示学习统一跨知识图谱推理,实现通用问答能力

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

  • 以查询相关事实为中心构造提示图,指导模型理解查询关系
  • 在43个知识图谱上测试,多数数据集超越基线模型
  • 适合需要跨领域知识推理的研究者与开发者

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

原文摘要 · Abstract (English)

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.

知识图谱提示学习通用推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。