Papers › LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention

LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention

2 Oct 2020EMNLP 2020 11arXiv:2010.01057archive 2025-07-28

Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto

Entity representations are useful in natural language tasks involving entities. In this paper, we propose new pretrained contextualized representations of words and entities based on the bidirectional transformer. The proposed model treats words and entities in a given text as independent tokens, and outputs contextualized representations of them. Our model is trained using a new pretraining task based on the masked language model of BERT. The task involves predicting randomly masked words and entities in a large entity-annotated corpus retrieved from Wikipedia. We also propose an entity-aware self-attention mechanism that is an extension of the self-attention mechanism of the transformer, and considers the types of tokens (words or entities) when computing attention scores. The proposed model achieves impressive empirical performance on a wide range of entity-related tasks. In particular, it obtains state-of-the-art results on five well-known datasets: Open Entity (entity typing), TACRED (relation classification), CoNLL-2003 (named entity recognition), ReCoRD (cloze-style question answering), and SQuAD 1.1 (extractive question answering). Our source code and pretrained representations are available at https://github.com/studio-ousia/luke.

PaperPDFConference PDFCodeCode 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="2010.01057")

Code

Syntology Ran 3 of 10 code samples harvested from 3 repositories linked to this paper; 7 have no recorded run. Of those that ran: 3 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 3 ran; community (archive-listed): 2 samples from 2 repositories, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

studio-ousia/luke officialmentioned in papermentioned on GitHubpytorch report
JiachengLi1995/UCTopic mentioned on GitHubpytorch report
huggingface/transformers mentioned on GitHubpytorch report
shmulvad/zero-for-ner mentioned on GitHubpytorch report
pwc-1/Paper-9 mindspore 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

10 samples harvested; 3 ran; 0 honoured the contract we drafted; 7 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.

3ran
7unverified

Licence: 0 of the 10 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 3 repositories linked to this paper, official or community; each sample names its own and says which. “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.

EntityAwareAttention studio-ousia/luke/luke/model.py official repository ran fingerprinted Apache-2.0 (permissive) · fb78ccc0f682352e · report
EntityEmbeddings studio-ousia/luke/luke/model.py official repository ran Apache-2.0 (permissive) · 8d7fce1bd60c4918 · report
LukeConfig studio-ousia/luke/luke/model.py official repository ran Apache-2.0 (permissive) · 65315a42df7afec6 · report
EntityAwareEncoder studio-ousia/luke/luke/model.py official repository unverified Apache-2.0 (permissive) · 5f47aef368b5af00 · report
EntityAwareLayer studio-ousia/luke/luke/model.py official repository unverified Apache-2.0 (permissive) · 75c5d0233ea564ee · report
LukeEncoder studio-ousia/luke/luke/model.py official repository unverified Apache-2.0 (permissive) · 6139734334c69c5d · report
LukeEntityAwareAttentionModel studio-ousia/luke/luke/model.py official repository unverified Apache-2.0 (permissive) · de51e92ef6ec77d5 · report
LukeModel studio-ousia/luke/luke/model.py official repository unverified Apache-2.0 (permissive) · 607f66ef6841b94f · report
LukeSelfAttention huggingface/transformers/src/transformers/models/luke/modeling_luke.py community (archive-listed) unverified Apache-2.0 (permissive) · 12ca593ec040ed10 · report
UCTopicModel JiachengLi1995/UCTopic/uctopic/models.py community (archive-listed) unverified MIT (permissive) · 42a369215b401697 · report

Tasks

Common Sense ReasoningEntity TypingExtractive Question-AnsweringLanguage ModelingLanguage ModellingNamed Entity RecognitionNamed Entity Recognition (NER)Question AnsweringRelation ClassificationRelation Extraction

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Common Sense Reasoning ReCoRD LUKE 483M EM 90.6 #10 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD LUKE 483M F1 91.2 #10 of 45 Archive leaderboard report
Entity Typing Open Entity MLMET F1 78.2 #1 of 13 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (English) LUKE 483M F1 94.3 #2 of 73 Archive leaderboard report
Named Entity Recognition (NER) CoNLL++ LUKE(Large) F1 95.89 #2 of 11 Archive leaderboard report
Question Answering SQuAD1.1 LUKE (single model) EM 90.202 #3 of 213 Archive leaderboard report
Question Answering SQuAD1.1 LUKE (single model) F1 95.379 #3 of 213 Archive leaderboard report
Question Answering SQuAD1.1 LUKE EM 90.2 #4 of 213 Archive leaderboard report
Question Answering SQuAD1.1 LUKE 483M F1 95.4 #208 of 213 Archive leaderboard report
Question Answering SQuAD1.1 dev LUKE EM 89.8 #2 of 55 Archive leaderboard report
Question Answering SQuAD1.1 dev LUKE 483M F1 95 #51 of 55 Archive leaderboard report
Question Answering SQuAD2.0 LUKE (single model) EM 87.429 #84 of 286 Archive leaderboard report
Question Answering SQuAD2.0 LUKE (single model) F1 90.163 #84 of 286 Archive leaderboard report
Question Answering SQuAD2.0 LUKE 483M F1 90.2 #284 of 286 Archive leaderboard report
Relation Classification TACRED LUKE 483M F1 72.7 #14 of 17 Archive leaderboard report
Relation Extraction TACRED LUKE F1 (1% Few-Shot) 17.0 #40 of 40 Archive leaderboard report
Relation Extraction TACRED LUKE F1 (5% Few-Shot) 51.6 #40 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.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

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