Skip to main content
QUICK REVIEW

[论文解读] TENER: Adapting Transformer Encoder for Named Entity Recognition

Hang Yan, Bocao Deng|arXiv (Cornell University)|Nov 10, 2019
Topic Modeling参考文献 39被引用 245
一句话总结

TENER 通过使注意力具有方向性和距离感、使用未缩放的注意力,以及采用基于 Transformer 的字符编码器,来调整 Transformer 编码器以用于命名实体识别(NER),在六个数据集上达到先前无预训练的 SOTA。

ABSTRACT

The Bidirectional long short-term memory networks (BiLSTM) have been widely used as an encoder in models solving the named entity recognition (NER) task. Recently, the Transformer is broadly adopted in various Natural Language Processing (NLP) tasks owing to its parallelism and advantageous performance. Nevertheless, the performance of the Transformer in NER is not as good as it is in other NLP tasks. In this paper, we propose TENER, a NER architecture adopting adapted Transformer Encoder to model the character-level features and word-level features. By incorporating the direction and relative distance aware attention and the un-scaled attention, we prove the Transformer-like encoder is just as effective for NER as other NLP tasks.

研究动机与目标

  • 激励在 NER 中使用基于 Transformer 的编码器,并找出 vanilla Transformer 为什么在 NER 中表现不佳。
  • 提出适应性改进:用于 NER 的方向性和距离感相对位置编码以及未缩放的注意力。
  • 将基于 Transformer 的字符编码器与词级 Transformer 编码器整合,以获得更健壮的词表征。
  • 在多个人英文及中文 NER 数据集上评估改编后的 Transformer(AdaTrans),并与基于 BiLSTM 的模型进行比较。

提出的方法

  • 使用基于相对位置编码的、具有方向性和距离感注意力的改编 Transformer 编码器。
  • 用未缩放的、更加尖锐的注意力替代经典的缩放点积注意力,以在上下文选择中引入稀疏性。
  • 引入相对位置编码 R_{t-j} 和可学习的偏置 (u, v),以在注意力中捕捉距离和方向。
  • 将 Transformer 编码器应用于词级和字符级表示(两者均为 AdaTrans)。
  • 将编码器得到的字符特征与预训练词向量拼接,形成词表示。
  • 在顶部使用 CRF 层来建模标签依赖,并用 Viterbi 解码。

实验结果

研究问题

  • RQ1是否可以将 Transformer 编码器改造成达到与 BiLSTM 基于的编码器相当或更高的 NER 性能?
  • RQ2方向性和距离感相对位置编码是否在多语言中优于 vanilla Transformer 的 NER 性能?
  • RQ3未缩放的点积注意力是否能为 NER 任务产生更尖锐、效果更好的注意力?
  • RQ4基于 Transformer 的字符编码器是否有利于捕捉子词模式并缓解 NER 中的 OOV?
  • RQ5相较于先前的最先进模型,AdaTrans 在英语和中文 NER 数据集上的表现如何?

主要发现

模型CoNLL2003 F1OntoNotes 5.0 F1
BiLSTM-CRF(对比)88.83-
Transformer89.5786.73
TENER (Ours)91.3388.43
带缩放91.0687.94
带 CNN-char91.4588.25
TENER 搭配 ELMo92.6289.78
  • TENER 显著提升了 Transformer 在 NER 上相对于普通 Transformer 的性能,并且在若干数据集上可以超过 BiLSTM 基于的模型。
  • 使用方向性和距离感的相对位置编码再加未缩放的注意力可带来显著提升;缩放的注意力会降低性能。
  • AdaTrans 同时提升字符级和词级编码,在六个数据集上实现无预训练的最先进结果。在英文 CoNLL2003 和 OntoNotes 5.0 上,TENER 分别达到 91.33 和 88.43 F1(非上下文嵌入)。
  • 在不使用预训练的设置中,带 CNN-char 的 TENER 和非缩放通常表现最佳;缩放注意力始终表现不佳。
  • 使用 ELMo 嵌入时,TENER 进一步提升至 92.62(CoNLL2003)和 89.78(OntoNotes 5.0)。
  • TENER 在 OntoNotes 5.0 开发集上的收敛速度与 BiLSTM 一样快,并且在收敛速度上超过了 vanilla Transformer。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。