最近被报名了一个比赛,比赛任务是命名实体识别相关的。之前根本就不了解这方面的东西,临时看了几篇论文,似懂非懂。
简介
文章提出了一种entity typing task:给定一个句子和一个entity mention,预测实体的类别(type)。其创新在于type的diversity,可以给出不同粒度上的type。主要利用的方法是基于head word 的距离监督。
Task and Data
上图是任务的三个例子:左边是句子,其中亮蓝色花括号中是entity mention。右边是相应的type labels。可以看出,右边的标签比已有的一些本体库中定义的标签要多,粒度也更细。
作者众包构建了一个新的数据集,该数据集中type数量非常多,粒度更细。如下图所示:
作者将这些标签分为三类:
距离监督
细粒度(fine-grained)NER系统通常通过entity linking来获得训练数据:从KBs(knowledge bases)中提取实体类别。这种方法有两方面的缺陷:
- KBs的不完备性会影响recall
- 缺失上下文信息会影响precision
文章通过Wikipedia来缓解recall的影响,提取mention在Wikipedia定义中的相关type(相当于扩大了知识库?)
通过基于head word的距离监督来提供上下文信息以缓解precious的问题。很多时候,mention之前出现的词提供了有用的上下文信息。For example, when describing Titan V as “the newly released graphics card”, the head words and phrases of this mention (“graphics card” and “card”) provide a somewhat noisy, but very easy to gather, context-sensitive type signal.
Model
Context Representation
给定句子x1,x2,...,xnx_1, x_2, ... , x_nx1,x2,...,xn,用预训练的词向量wiw_iwi来表示单词xix_ixi,用向量lil_ili表示该单词是在mention之前、之中还是之后。将[xi,li][x_i, l_i][xi,li]作为双向LSTM的输入,得到每个token的contextualized representation hih_ihi。 最后,通过 MLP-based attention 将上下文表示为 hih_ihi 的加权和:
ai=SoftMaxi(va⋅relu(Wahi))
a_i = SoftMax_i(v_a\cdot relu(W_ah_i))
ai=SoftMaxi(va⋅relu(Wahi))
其中,va,Wav_a,W_ava,Wa是 MLP-based attention 的参数.
Mention Representation
mention m的表示由两部分组成:
- a character-based representation produced by a CNN on the entire mention span
- a weighted sum of the pre-trained word embeddings in the mention span computed by attention
最后,将context representation 和mentionrepresentation连接起来:r=[c;m]r=[c;m]r=[c;m]
Label Prediction
学习一个type label embedding matrix Wt∈Rn×dW_t\in R^{n\times d}Wt∈Rn×d,其中,n是label的总数量,d是token的表示r的维数。Wt∈Rn×dW_t\in R^{n\times d}Wt∈Rn×d由三部分组成:Wgeneral,Wfine,WultraW_{general}, W_{fine}, W_{ultra}Wgeneral,Wfine,Wultra,分别代表三类tpye的embedding。每一个label的概率为其与r的内积的sigmoid:
y=σ(Wtr)
y=\sigma(W_tr)
y=σ(Wtr)
如果 yt>0.5y_t>0.5yt>0.5 则输出 label t。如果不存在大于0.5的 yty_tyt, 则输出最大的 yty_tyt 对应的 t.
Multitask Objective