KG-BERT: BERT for Knowledge Graph Completion

Liang Yao, Chengsheng Mao, Yuan Luo
9/7/2019
cs.CLcs.AI

Official code: yao8839836/kg-bert (795 stars, Apache-2.0, last commit 2025-07-23).

Abstract

Knowledge graphs are important resources for many artificial intelligence tasks but often suffer from incompleteness. In this work, we propose to use pre-trained language models for knowledge graph completion. We treat triples in knowledge graphs as textual sequences and propose a novel framework named Knowledge Graph Bidirectional Encoder Representations from Transformer (KG-BERT) to model these triples. Our method takes entity and relation descriptions of a triple as input and computes scoring function of the triple with the KG-BERT language model. Experimental results on multiple benchmark knowledge graphs show that our method can achieve state-of-the-art performance in triple classification, link prediction and relation prediction tasks.

View on arXivView PDF

Code Implementations(1)

yao8839836/kg-bertOfficial100%
Apache-2.0

KG-BERT: BERT for Knowledge Graph Completion

795149PythonSep 4, 20191 years agoApache-2.0
bertknowledge-graph

Similar Papers

Cite this paper

@article{yao2019kgbert,
  title  = {KG-BERT: BERT for Knowledge Graph Completion},
  author = {Liang Yao and Chengsheng Mao and Yuan Luo},
  year   = {2019},
  eprint = {1909.03193},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.03193}
}

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/1909.03193.svg)](https://codeofpaper.com/paper/1909.03193)

Discussion