HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Liang Wang Wei Zhao Zhuoyu Wei Jingming Liu

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

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. 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 .

Code Repositories

meaningful96/satkgc
pytorch
Mentioned in GitHub
intfloat/simkgc
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
link-prediction-on-fb15k-237SimKGCIB(+PB+SN)
Hits@1: 0.249
Hits@10: 0.511
Hits@3: 0.365
MRR: 0.336
link-prediction-on-wikidata5mSimKGC + Description
Hits@1: 0.313
Hits@10: 0.441
Hits@3: 0.376
MRR: 0.358
link-prediction-on-wn18rrSimKGCIB(+PB+SN)
Hits@1: 0.588
Hits@10: 0.817
Hits@3: 0.731
MRR: 0.671

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp