SetGNER: General Named Entity Recognition as Entity Set Generation
**任务形式:**识别flat、nest和不连续实体。
**任务建模方式:**采用基于pointer的方式实现任务建模,文本序列中的每个word可以用tag表示,具体为:
 三个特征的tags: ⟨∅⟩, indicating no-entityfound; ⟨#⟩, indicating fragment of entity is found;
 ⟨/s⟩, indicating the end of the generated sequence.
 Ptr(⟨∅⟩) = C,
 Ptr(⟨#⟩) = C + 1,
 Ptr(⟨/s⟩) = C + 2.
 序列中其余tags的表示:(j是word在序列中位置)
 Ptr(wj ) = C + 3 + j
pointer sequence for entity ei is defined as:
模型结构
1 word level 的encoder
先采用encoder编码器得到token level 的embedding的表示。
 之后,采用maxpool 操作,得到word level 的embedding表示。具体是对每个word的tokens中,计算tokens的start和end的表示。
 R是word level的表示,size是N*d
 
2 mention detector
2.1 预测每个head word下有多少个实体?
V = ReLU(WV R + bV )
 之后,使用softmax layer计算,得到
 loss函数:
 
2.2 预测一个word是否是entity的head或者tail?

3 parallel generator
由于目标序列由Pointer tags组成,因此在解码之前应将它们转换为单词/标签。我们将此操作表示为 Retrieve(·)
 
对于retrieve之后的序列,采用bart的decoder完成解码操作。

 loss 函数:
 
训练过程
还有一个反向生成过程。
 



![[机器学习-概念新] 什么是欧式距离、标准化欧式距离、马氏距离、余弦距离](https://img-blog.csdnimg.cn/20200703235519658.png)














