From Discrimination to Generation: Knowledge Graph Completion with Generative Transformer

4 Feb 2022  ·  Xin Xie, Ningyu Zhang, Zhoubo Li, Shumin Deng, Hui Chen, Feiyu Xiong, Mosha Chen, Huajun Chen ·

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

PDF Abstract

Results from the Paper

Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Link Prediction FB15k-237 GenKGC Hits@10 0.439 # 60
Hits@3 0.355 # 40
Hits@1 0.192 # 49
Link Prediction WN18RR GenKGC Hits@10 0.535 # 55
Hits@3 0.403 # 46
Hits@1 0.287 # 57