Knowledge graphs (KGs), as a structured form of knowledge representation, have been widely applied in the real world. Recently, few-shot knowledge graph completion (FKGC), which aims to predict missing facts for unseen relations with few-shot associated facts, has attracted increasing attention from practitioners and researchers. However, existing FKGC methods are based on metric learning or meta-learning, which often suffer from the out-of-distribution and overfitting problems. Meanwhile, they are incompetent at estimating uncertainties in predictions, which is critically important as model predictions could be very unreliable in few-shot settings. Furthermore, most of them cannot handle complex relations and ignore path information in KGs, which largely limits their performance. In this paper, we propose a normalizing flow-based neural process for few-shot knowledge graph completion (NP-FKGC). Specifically, we unify normalizing flows and neural processes to model a complex distribution of KG completion functions. This offers a novel way to predict facts for few-shot relations while estimating the uncertainty. Then, we propose a stochastic ManifoldE decoder to incorporate the neural process and handle complex relations in few-shot settings. To further improve performance, we introduce an attentive relation path-based graph neural network to capture path information in KGs. Extensive experiments on three public datasets demonstrate that our method significantly outperforms the existing FKGC methods and achieves state-of-the-art performance. Code is available at https://github.com/RManLuo/NP-FKGC.git.
翻译:知识图谱作为知识的结构化表示形式,已在现实世界得到广泛应用。近年来,少样本知识图谱补全旨在通过少量关联事实预测未见关系的缺失事实,引起了从业者和研究者的广泛关注。然而,现有FKGC方法基于度量学习或元学习,常面临分布外和过拟合问题。同时,它们无法有效估计预测中的不确定性——这在少样本场景下模型预测可能极不可靠时至关重要。此外,大多数方法难以处理复杂关系且忽略路径信息,这严重限制了其性能。本文提出了一种基于归一化流的神经过程的少样本知识图谱补全方法(NP-FKGC)。具体而言,我们通过统一归一化流与神经过程来建模知识图谱补全函数的复杂分布,为预测少样本关系的事实同时估计不确定性提供了新途径。接着,我们提出随机流形解码器以融合神经过程并处理少样本场景下的复杂关系。为进一步提升性能,我们引入基于注意力关系路径的图神经网络以捕捉知识图谱中的路径信息。在三个公开数据集上的大量实验表明,本方法显著优于现有FKGC方法,达到了最先进的性能。代码已开源至https://github.com/RManLuo/NP-FKGC.git。