Knowledge graph completion aims to address the problem of extending a KG with missing triples. In this paper, we provide an approach GenKGC, which converts knowledge graph completion to sequence-to-sequence generation task with the pre-trained language model. We further introduce relation-guided demonstration and entity-aware hierarchical decoding for better representation learning and fast inference. Experimental results on three datasets show that our approach can obtain better or comparable performance than baselines and achieve faster inference speed compared with previous methods with pre-trained language models. We also release a new large-scale Chinese knowledge graph dataset AliopenKG500 for research purpose. Code and datasets are available in https://github.com/zjunlp/PromptKG/tree/main/GenKGC.
翻译:知识图谱补全旨在解决知识图谱中缺失三元组的扩展问题。本文提出GenKGC方法,将知识图谱补全转化为基于预训练语言模型的序列到序列生成任务。我们进一步引入关系引导的示范学习与实体感知的分层解码策略,以改进表示学习并实现快速推理。在三个数据集上的实验结果表明,我们的方法能够取得优于或相媲美于基线模型的性能,且相较于基于预训练语言模型的现有方法具有更快的推理速度。此外,我们发布了面向研究的大规模中文知识图谱数据集AliopenKG500。代码与数据集已开源至https://github.com/zjunlp/PromptKG/tree/main/GenKGC。