arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.14907cs.AI
收藏

KGPFN:通过上下文学习解锁知识图谱基础模型的潜力

KGPFN: Unlocking the Potential of Knowledge Graph Foundation Model via In-Context Learning

Department of Computer Science and Engineering, HKUST, Hong Kong, China(香港科技大学计算机科学与工程系);Department of Computer Science and Engineering, HKBU, Hong Kong, China(香港城市大学计算机科学与工程系)

Yisen Gao, Jiaxin Bai, Haoyu Huang, Zhongwei Xie, Yufei Li, Hong Ting Tsang, Sirui Han, Yangqiu Song

AI总结:

KGPFN通过结合先验数据拟合网络与上下文学习,统一了可转移关系规律与推理时的上下文学习,有效提升知识图谱推理能力。

摘要:

知识图谱(KG)基础模型旨在通过学习可转移的关系结构来泛化到具有未见实体和关系的图中。然而,大多数现有方法主要强调关系层面的普遍性,而上下文学习作为基础模型的另一支柱在KG推理中仍被低估。在KG中,上下文本质上是结构化且异质的:有效的预测需要根据查询实体周围的局部上下文以及总结关系在多个实例中行为的全局上下文进行条件化。我们提出KGPFN,一种利用先验数据拟合网络的知识图谱基础模型,统一了可转移的关系规律与推理时的上下文学习。KGPFN首先通过关系图上的消息传递学习关系表示,以捕捉跨图的关系不变性。对于查询特定的推理,它使用多层NBFNet编码局部邻域作为局部上下文。为了实现大规模的ICL,它通过检索查询关系的大规模实例及其局部邻域构建关系特定的全局上下文,并在先验数据拟合网络框架内聚合,该框架结合了特征级和样本级注意力。通过在多样化的KG上进行多图预训练,KGPFN学习何时实例化可重用的模式以及何时使用上下文证据覆盖它们。在57个KG基准测试中,KGPFN通过仅使用上下文学习实现了对之前未见图的强适应性,一致优于竞争性的KG基础模型微调版本。我们的代码可在https://github.com/HKUST-KnowComp/KGPFN上获得。

英文摘要:

Knowledge graph (KG) foundation models aim to generalize to graphs with unseen entities and relations by learning transferable relational structure. Most existing methods, however, focus on relation-level universality, leaving in-context learning, the other pillar of foundation models, largely unexplored for KG reasoning. Context in KGs is structured and heterogeneous: accurate prediction requires conditioning both on the local neighborhood of the query entities and on global context that summarizes how the query relation behaves across many instances. We propose KGPFN, a KG foundation model built on a Prior-Data Fitted Network (PFN) that combines transferable relational representations with inference-time in-context learning over structured context. KGPFN learns relation representations by message passing on relation graphs and extracts multi-scale local context from the intermediate head representations of a multi-layer NBFNet. It then builds relation-specific global context from positive and negative examples of the query relation, together with their local structural representations, and aggregates this context with feature-level and sample-level attention. Through multi-graph pretraining, KGPFN learns to combine structural representations with labeled contextual evidence without inference-time parameter updates. On 57 knowledge graphs, KGPFN achieves the best average MRR both without and with fine-tuning, and context sensitivity analyses highlight the value of negative context examples. Our code is available at https://github.com/HKUST-KnowComp/KGPFN.

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

↑