
摘要
实体表示在涉及实体的自然语言处理任务中具有重要作用。本文提出了一种基于双向Transformer的新颖预训练上下文表示方法,用于词和实体的联合建模。该模型将文本中的词与实体均视为独立的标记(token),并输出它们的上下文相关表示。模型通过一种基于BERT的掩码语言建模思想设计的新预训练任务进行训练,该任务旨在预测从维基百科获取的大规模带实体标注语料库中随机掩码的词和实体。此外,我们提出了一种面向实体的自注意力机制(entity-aware self-attention),作为Transformer原始自注意力机制的扩展,该机制在计算注意力分数时会考虑标记的类型(即词或实体),从而增强模型对实体信息的感知能力。所提出的模型在多种与实体相关的任务上均取得了出色的实验性能。特别是在五个知名数据集上达到了当前最优(state-of-the-art)结果:Open Entity(实体类型识别)、TACRED(关系分类)、CoNLL-2003(命名实体识别)、ReCoRD(填空式问答)以及SQuAD 1.1(抽取式问答)。本文的源代码及预训练表示均已公开,获取地址为:https://github.com/studio-ousia/luke。
代码仓库
shmulvad/zero-for-ner
pytorch
GitHub 中提及
pwc-1/Paper-9/tree/main/luke
mindspore
studio-ousia/luke
官方
pytorch
GitHub 中提及
huggingface/transformers
pytorch
GitHub 中提及
JiachengLi1995/UCTopic
pytorch
GitHub 中提及
2023-MindSpore-1/ms-code-156
mindspore
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| common-sense-reasoning-on-record | LUKE 483M | EM: 90.6 F1: 91.2 |
| entity-typing-on-open-entity-1 | MLMET | F1: 78.2 |
| named-entity-recognition-ner-on-conll-2003 | LUKE 483M | F1: 94.3 |
| named-entity-recognition-on-conll | LUKE(Large) | F1: 95.89 |
| question-answering-on-squad11 | LUKE (single model) | EM: 90.202 F1: 95.379 |
| question-answering-on-squad11 | LUKE 483M | F1: 95.4 |
| question-answering-on-squad11 | LUKE | EM: 90.2 |
| question-answering-on-squad11-dev | LUKE | EM: 89.8 |
| question-answering-on-squad11-dev | LUKE 483M | F1: 95 |
| question-answering-on-squad20 | LUKE 483M | F1: 90.2 |
| question-answering-on-squad20 | LUKE (single model) | EM: 87.429 F1: 90.163 |
| relation-classification-on-tacred-1 | LUKE 483M | F1: 72.7 |
| relation-extraction-on-tacred | LUKE | F1 (1% Few-Shot): 17.0 F1 (5% Few-Shot): 51.6 |