Papers › KEPLER: A Unified Model for Knowledge Embedding and Pre-trained Language Representation

KEPLER: A Unified Model for Knowledge Embedding and Pre-trained Language Representation

13 Nov 2019arXiv:1911.06136archive 2025-07-28

Xiaozhi Wang, Tianyu Gao, Zhaocheng Zhu, Zhengyan Zhang, Zhiyuan Liu, Juanzi Li, Jian Tang

Pre-trained language representation models (PLMs) cannot well capture factual knowledge from text. In contrast, knowledge embedding (KE) methods can effectively represent the relational facts in knowledge graphs (KGs) with informative entity embeddings, but conventional KE models cannot take full advantage of the abundant textual information. In this paper, we propose a unified model for Knowledge Embedding and Pre-trained LanguagE Representation (KEPLER), which can not only better integrate factual knowledge into PLMs but also produce effective text-enhanced KE with the strong PLMs. In KEPLER, we encode textual entity descriptions with a PLM as their embeddings, and then jointly optimize the KE and language modeling objectives. Experimental results show that KEPLER achieves state-of-the-art performances on various NLP tasks, and also works remarkably well as an inductive KE model on KG link prediction. Furthermore, for pre-training and evaluating KEPLER, we construct Wikidata5M, a large-scale KG dataset with aligned entity descriptions, and benchmark state-of-the-art KE methods on it. It shall serve as a new KE benchmark and facilitate the research on large KG, inductive KE, and KG with text. The source code can be obtained from https://github.com/THU-KEG/KEPLER.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1911.06136")

Code

Syntology Ran 1 of 5 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: official repository: 5 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

THU-KEG/KEPLER officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

5 samples harvested; 1 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
4unverified

Licence: 5 of the 5 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from THU-KEG/KEPLER. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

safe_readline THU-KEG/KEPLER/fairseq/binarizer.py official repository ran MIT recorded; this copy not marked cleared · pointer only · 82bdf940665aeeb4 · report
dataset_dest_prefix THU-KEG/KEPLER/preprocess.py official repository unverified MIT recorded; this copy not marked cleared · pointer only · 9eda7f80331d658c · report
load_checkpoint THU-KEG/KEPLER/fairseq/checkpoint_utils.py official repository unverified MIT recorded; this copy not marked cleared · pointer only · c5ea9d48b6fc2167 · report
load_checkpoint_to_cpu THU-KEG/KEPLER/fairseq/checkpoint_utils.py official repository unverified MIT recorded; this copy not marked cleared · pointer only · df40d96cc20e7f57 · report
save_checkpoint THU-KEG/KEPLER/fairseq/checkpoint_utils.py official repository unverified MIT recorded; this copy not marked cleared · pointer only · b3616a62387703cb · report

Tasks

Entity EmbeddingsEntity TypingInductive knowledge graph completionKnowledge Graph CompletionKnowledge Graph EmbeddingsKnowledge GraphsLanguage ModelingLanguage ModellingLink PredictionRelation ClassificationRelation Extraction

Datasets

Introduced by this paper, per the archive.

Wikidata5M

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Inductive knowledge graph completion Wikidata5m-ind KEPLER-Wiki-rel Hits@1 0.222 #2 of 3 Archive leaderboard report
Inductive knowledge graph completion Wikidata5m-ind KEPLER-Wiki-rel Hits@10 0.73 #2 of 3 Archive leaderboard report
Inductive knowledge graph completion Wikidata5m-ind KEPLER-Wiki-rel Hits@3 0.514 #2 of 3 Archive leaderboard report
Inductive knowledge graph completion Wikidata5m-ind KEPLER-Wiki-rel MRR 0.402 #2 of 3 Archive leaderboard report
Link Prediction Wikidata5M SimplE Hits@1 0.252 #9 of 14 Archive leaderboard report
Link Prediction Wikidata5M SimplE Hits@10 0.377 #9 of 14 Archive leaderboard report
Link Prediction Wikidata5M SimplE Hits@3 0.317 #9 of 14 Archive leaderboard report
Link Prediction Wikidata5M SimplE MRR 0.296 #9 of 14 Archive leaderboard report
Link Prediction Wikidata5M RotatE Hits@1 0.234 #10 of 14 Archive leaderboard report
Link Prediction Wikidata5M RotatE Hits@10 0.39 #10 of 14 Archive leaderboard report
Link Prediction Wikidata5M RotatE Hits@3 0.322 #10 of 14 Archive leaderboard report
Link Prediction Wikidata5M RotatE MRR 0.29 #10 of 14 Archive leaderboard report
Link Prediction Wikidata5M ComplEx Hits@1 0.228 #11 of 14 Archive leaderboard report
Link Prediction Wikidata5M ComplEx Hits@10 0.373 #11 of 14 Archive leaderboard report
Link Prediction Wikidata5M ComplEx Hits@3 0.310 #11 of 14 Archive leaderboard report
Link Prediction Wikidata5M ComplEx MRR 0.281 #11 of 14 Archive leaderboard report
Link Prediction Wikidata5M TransE Hits@1 0.17 #12 of 14 Archive leaderboard report
Link Prediction Wikidata5M TransE Hits@10 0.392 #12 of 14 Archive leaderboard report
Link Prediction Wikidata5M TransE Hits@3 0.311 #12 of 14 Archive leaderboard report
Link Prediction Wikidata5M TransE MRR 0.253 #12 of 14 Archive leaderboard report
Link Prediction Wikidata5M DistMult Hits@1 0.208 #13 of 14 Archive leaderboard report
Link Prediction Wikidata5M DistMult Hits@10 0.334 #13 of 14 Archive leaderboard report
Link Prediction Wikidata5M DistMult Hits@3 0.278 #13 of 14 Archive leaderboard report
Link Prediction Wikidata5M DistMult MRR 0.253 #13 of 14 Archive leaderboard report
Link Prediction Wikidata5M KEPLER-Wiki-rel Hits@1 0.173 #14 of 14 Archive leaderboard report
Link Prediction Wikidata5M KEPLER-Wiki-rel Hits@10 0.277 #14 of 14 Archive leaderboard report
Link Prediction Wikidata5M KEPLER-Wiki-rel Hits@3 0.224 #14 of 14 Archive leaderboard report
Link Prediction Wikidata5M KEPLER-Wiki-rel MRR 0.210 #14 of 14 Archive leaderboard report
Relation Classification TACRED KEPLER F1 71.7 #11 of 17 Archive leaderboard report
Relation Extraction TACRED KEPLER F1 71.7 #16 of 40 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections