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

Liang Wang, Wei Zhao, Zhuoyu Wei, Jingming Liu
3/4/2022
318 citations
cs.CL
contrastive-ssl

Official code: intfloat/SimKGC (219 stars, Python, last commit 2022-12-24).

Abstract

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.

Show full abstract

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 .

View on arXivView PDF

Code Implementations(1)

intfloat/SimKGCOfficial100%

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

21941Python, ShellFeb 14, 20223 years ago
contrastive-learningknowledge-graph-completionnatural-language-processing

Similar Papers

Cite this paper

@article{wang2022simkgc,
  title  = {SimKGC: Simple Contrastive Knowledge Graph Completion with Pre-trained Language Models},
  author = {Liang Wang and Wei Zhao and Zhuoyu Wei and Jingming Liu},
  year   = {2022},
  eprint = {2203.02167},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.02167}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.02167.svg)](https://codeofpaper.com/paper/2203.02167)

Discussion