Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

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

About

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 .

Liang Wang, Wei Zhao, Zhuoyu Wei, Jingming Liu• 2022

Related benchmarks

TaskDatasetResultRank
Link PredictionWN18RR (test)
Hits@1080
380
Link PredictionFB15k-237
MRR33.6
280
Knowledge Graph CompletionWN18RR
Hits@158.8
165
Knowledge Graph CompletionFB15k-237
Hits@100.511
108
Link PredictionWikidata5M (test)
MRR0.358
58
Link PredictionWN18RR v1 (test)
MRR0.666
24
Link PredictionFB15k-237 v1 (test)
Hit@100.511
23
Knowledge Graph CompletionUMLS
Hits@100.944
22
Knowledge Graph CompletionAnimalKB TextBench 1.0 (test)
MRR38.6
9
Knowledge Graph CompletionWikidata transductive 5M (test)
MRR0.358
8
Showing 10 of 12 rows

Other info

Code

Follow for update