SimKGC: Simple Contrastive Knowledge Graph Completion with Pre-trained Language Models

ACL 2022  ·  Liang Wang, Wei Zhao, Zhuoyu Wei, Jingming Liu ·

Knowledge graph completion (KGC) aims to reason over known facts and infer the missing links. Text-based methods such as KGBERT (Yao et al., 2019) learn entity representations from natural language descriptions, and have the potential for inductive KGC. However, the performance of text-based methods still largely lag behind graph embedding-based methods like TransE (Bordes et al., 2013) and RotatE (Sun et al., 2019b). In this paper, we identify that the key issue is efficient contrastive learning. To improve the learning efficiency, we introduce three types of negatives: in-batch negatives, pre-batch negatives, and self-negatives which act as a simple form of hard negatives. Combined with InfoNCE loss, our proposed model SimKGC can substantially outperform embedding-based methods on several benchmark datasets. In terms of mean reciprocal rank (MRR), we advance the state-of-the-art by +19% on WN18RR, +6.8% on the Wikidata5M transductive setting, and +22% on the Wikidata5M inductive setting. Thorough analyses are conducted to gain insights into each component. Our code is available at https://github.com/intfloat/SimKGC .

PDF Abstract ACL 2022 PDF ACL 2022 Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Link Prediction FB15k-237 SimKGCIB(+PB+SN) MRR 0.336 # 45
Hits@10 0.511 # 44
Hits@3 0.365 # 36
Hits@1 0.249 # 35
Link Prediction Wikidata5M SimKGC + Description MRR 0.358 # 4
Hits@1 0.313 # 4
Hits@3 0.376 # 4
Hits@10 0.441 # 2
Link Prediction WN18RR SimKGCIB(+PB+SN) MRR 0.671 # 2
Hits@10 0.817 # 2
Hits@3 0.731 # 2
Hits@1 0.588 # 3

Methods